Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
jnxyx committed Sep 12, 2016
1 parent a253de8 commit ae3bc14
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 151 deletions.
2 changes: 0 additions & 2 deletions example/diff01.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
id: 'uploadContainer',
dragElement: getClass('upload-drop')[0],
dragClass: 'drag',
uploadContainer: getId('uploadContainer'),
uploadTemp: '<a class="container" href="javascript:void(0)"><img src="{src}" /></a>',
// size: '92kb',
// ext: '.jpg',
validateCallBack: function(info) {
Expand Down
40 changes: 2 additions & 38 deletions example/normal01.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,6 @@
<meta charset="utf-8">
<title>myUpload</title>
<style type="text/css">
a {
display: inline-block;
width: 100px;
height: 100px;
background: #f9cccc;
border-radius: 5px;
position: relative;
overflow: hidden;
cursor: pointer;
margin: 5px;
}

a:hover {
background: #f3d6d6;
}

a input[type="file"] {
position: absolute;
right: 0;
top: 0;
/*width: 99px;
height: 99px;*/
font-size: 99px;
opacity: 0;
outline: none;
filter: alpha(opacity=0);
}

.upload-drop {
width: 500px;
Expand All @@ -44,18 +17,11 @@
background-color: #f3d6d6;
}

a.container img {
width: 100%;
height: 100%;
}
</style>
</head>

<body>
<div>
<a href="javascript:void(0)">
<input type="file" id="myUpload" name="myUpload" value=''>
</a>
<div id="uploadContainer">
<!-- <a class="container" href=""><img src="http://my.com/upload/upload/20160729083006_106.png" />
</a> -->
Expand All @@ -68,11 +34,9 @@
<script type="text/javascript">
var upload = Upload({
url: '/upload/myUpload.php',
element: getId('myUpload'),
id: 'uploadContainer',
dragElement: getClass('upload-drop')[0],
dragClass: 'drag',
uploadContainer: getId('uploadContainer'),
uploadTemp: '<a class="container" href="javascript:void(0)"><img src="{src}" /></a>'
dragClass: 'drag'
});

function getId(id) {
Expand Down
38 changes: 1 addition & 37 deletions example/normal02.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,6 @@
<meta charset="utf-8">
<title>myUpload</title>
<style type="text/css">
a {
display: inline-block;
width: 100px;
height: 100px;
background: #f9cccc;
border-radius: 5px;
position: relative;
overflow: hidden;
cursor: pointer;
margin: 5px;
}

a:hover {
background: #f3d6d6;
}

a input[type="file"] {
position: absolute;
right: 0;
top: 0;
/*width: 99px;
height: 99px;*/
font-size: 99px;
opacity: 0;
outline: none;
filter: alpha(opacity=0);
}

.upload-drop {
width: 500px;
Expand All @@ -44,18 +17,11 @@
background-color: #f3d6d6;
}

a.container img {
width: 100%;
height: 100%;
}
</style>
</head>

<body>
<div>
<a href="javascript:void(0)">
<input type="file" id="myUpload" name="myUpload" value=''>
</a>
<div id="uploadContainer">
<!-- <a class="container" href=""><img src="http://my.com/upload/upload/20160729083006_106.png" />
</a> -->
Expand All @@ -68,11 +34,9 @@
<script type="text/javascript">
var upload = Upload({
url: '/upload/myUpload.php',
element: getId('myUpload'),
id: 'uploadContainer',
dragElement: getClass('upload-drop')[0],
dragClass: 'drag',
uploadContainer: getId('uploadContainer'),
uploadTemp: '<a class="container" href="javascript:void(0)"><img src="{src}" /></a>',
size: '92kb',
ext: '.jpg,.png',
validateCallBack: function(info) {
Expand Down
38 changes: 1 addition & 37 deletions example/simple01.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,6 @@
<meta charset="utf-8">
<title>myUpload</title>
<style type="text/css">
a {
display: inline-block;
width: 100px;
height: 100px;
background: #f9cccc;
border-radius: 5px;
position: relative;
overflow: hidden;
cursor: pointer;
margin: 5px;
}

a:hover {
background: #f3d6d6;
}

a input[type="file"] {
position: absolute;
right: 0;
top: 0;
/*width: 99px;
height: 99px;*/
font-size: 99px;
opacity: 0;
outline: none;
filter: alpha(opacity=0);
}

.upload-drop {
width: 500px;
Expand All @@ -44,18 +17,11 @@
background-color: #f3d6d6;
}

a.container img {
width: 100%;
height: 100%;
}
</style>
</head>

<body>
<div>
<a href="javascript:void(0)">
<input type="file" id="myUpload" name="myUpload" value=''>
</a>
<div id="uploadContainer">
<!-- <a class="container" href=""><img src="http://my.com/upload/upload/20160729083006_106.png" />
</a> -->
Expand All @@ -66,9 +32,7 @@
<script type="text/javascript">
var upload = Upload({
url: '/upload/myUpload.php',
element: getId('myUpload'),
uploadContainer: getId('uploadContainer'),
uploadTemp: '<a class="container" href="javascript:void(0)"><img src="{src}" /></a>'
id: 'uploadContainer'
});

function getId(id) {
Expand Down
39 changes: 2 additions & 37 deletions example/simple02.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,6 @@
<meta charset="utf-8">
<title>myUpload</title>
<style type="text/css">
a {
display: inline-block;
width: 100px;
height: 100px;
background: #f9cccc;
border-radius: 5px;
position: relative;
overflow: hidden;
cursor: pointer;
margin: 5px;
}

a:hover {
background: #f3d6d6;
}

a input[type="file"] {
position: absolute;
right: 0;
top: 0;
/*width: 99px;
height: 99px;*/
font-size: 99px;
opacity: 0;
outline: none;
filter: alpha(opacity=0);
}

.upload-drop {
width: 500px;
Expand All @@ -43,19 +16,12 @@
.upload-drop.drag {
background-color: #f3d6d6;
}

a.container img {
width: 100%;
height: 100%;
}

</style>
</head>

<body>
<div>
<a href="javascript:void(0)">
<input type="file" id="myUpload" name="myUpload" value=''>
</a>
<div id="uploadContainer">
<!-- <a class="container" href=""><img src="http://my.com/upload/upload/20160729083006_106.png" />
</a> -->
Expand All @@ -68,8 +34,7 @@
<script type="text/javascript">
var upload = Upload({
url: '/upload/myUpload.php',
element: getId('myUpload'),
uploadContainer: getId('uploadContainer'),
id: 'uploadContainer',
success: function(results) {
if (results.data.length) {
for (var i = 0; i < results.data.length; i++) {
Expand Down

0 comments on commit ae3bc14

Please sign in to comment.