-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathindex.html
executable file
·103 lines (91 loc) · 3.65 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Embernati Upload Demo</title>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
</head>
<body>
<!-- Main application template. -->
<script type="text/x-handlebars">
<h2 class="welcome-header">File upload demo</h2>
<span class="welcome-header">
({{#link-to 'files'}}Files{{/link-to}}, {{#link-to 'notFiles'}}Not Files{{/link-to}})
</span>
<br>
{{outlet}}
<div id="global-dropzone" {{bind-attr class="showDropZone:visible"}}>
<h2>Drop files to upload</h2>
</div>
</script>
<!-- Not Files template -->
<script type="text/x-handlebars" id="notFiles">
<div class="col-uploads">
<h4 class="msg-drop extra">Dropping files here has no effect.</h4>
</div>
</script>
<!-- Files template. -->
<script type="text/x-handlebars" id="files">
<div class="col-uploads">
<button {{action "uploadAll"}} {{bind-attr class=":btn :btn-primary hasUploads::disabled"}}>Upload All</button>
<button {{action "removeCompleted"}} {{bind-attr class=":btn :btn-default :btn-remove-completed hasCompleted::disabled"}}>Remove Completed</button>
<label class="total-size">Total file size: </label> {{totalFileSize}}
<br><br>
{{#each uploadFile in controller}}
<div class="upload-file-block">
<div class="image-preview">
{{#if uploadFile.isDisplayableImage}}
<img class="image-preview" {{bind-attr src=uploadFile.base64Image}} />
{{else}}
<img class="image-preview" src="img/image-unknown.gif">
{{/if}}
</div>
<div class="details-block">
<label>Name:</label> {{input value=uploadFile.name}} <br>
<label>Size:</label> {{uploadFile.size}}<br>
{{#if uploadFile.didUpload}}
<span class="has-success">
<span class="glyphicon glyphicon-ok form-control-feedback"></span>
<span class="form-control-feedback">Success</span>
</span>
{{else}}
<a {{action "uploadFile" uploadFile}}>Upload</a>
{{/if}}
<a {{action "removeFile" uploadFile}} class="remove-from-list">Remove from List</a>
{{#if uploadFile.showProgressBar}}
<div class="progress progress-striped">
<div class="progress-bar progress-bar-info" {{bind-attr style="uploadFile.progressStyle"}}></div>
</div>
{{/if}}
</div>
</div>
{{else}}
<h4 class="msg-drop">Drop files here to upload</h4>
{{/each}}
</div>
<div class="col-log">
<div class="well">
<label>Upload Logs</label>
<ul>
{{#each url in uploadedLog}}
<li><a {{bind-attr href="url"}} target="_blank">{{url}}</a></li>
{{/each}}
</ul>
</div>
</div>
</script>
<!-- Since we're not using buildtools, pull all the files in manually in specific order. -->
<script src="js/libs/jquery-1.10.2.js"></script>
<script src="js/libs/handlebars-1.1.2.js"></script>
<script src="js/libs/ember-1.4.0.js"></script>
<script src="js/app.js"></script>
<script src="js/controllers/files.js"></script>
<script src="js/models/file_upload.js"></script>
<script src="js/routes/routes.js"></script>
<script src="js/routes/files.js"></script>
<script src="js/routes/index.js"></script>
<script src="js/views/application.js"></script>
</body>
</html>