Repository navigation
Expand file tree
/
Copy pathprojects.ejs
More file actions
195 lines (162 loc) · 7.03 KB
/
Copy pathprojects.ejs
File metadata and controls
195 lines (162 loc) · 7.03 KB
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
<!DOCTYPE html>
<html id="ng-app" ng-app="app"> <!-- id="ng-app" IE<8 -->
<head>
<title>photo Upload</title>
<link rel="stylesheet"
href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css"/>
<!-- Fix for old browsers -->
<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<!--<script src="../bower_components/angular/angular.js"></script>-->
<script src="http://code.angularjs.org/1.4.4/angular.min.js"></script>
<script src="http://sensorspace.ca/sllb/angular-file-upload.min.js"></script>
<script src="http://sensorspace.ca/sllb/controllers.js"></script>
<style>
.my-drop-zone {
border: dotted 3px lightgray;
}
.nv-file-over {
border: dotted 3px red;
}
/* Default class applied to drop zones on over */
.another-file-over-class {
border: dotted 3px green;
}
html, body {
height: 100%;
}
</style>
</head>
<!-- 1. nv-file-drop | nv-file-drop="options" -->
<body ng-controller="TestController" nv-file-drop uploader="uploader">
<div class="container">
<div class="navbar navbar-default">
<div class="navbar-header">
<a class="navbar-brand">Photo Upload App</a>
</div>
</div>
<div class="row">
<div class="col-md-3">
<img ng-src="{{image}}"> </img>
<!-- 2. nv-file-select | nv-file-select="options" -->
Multiple
<input nv-file-select uploader="uploader" type="file" multiple/><br/>
Single
<input nv-file-select id="uploadFile" uploader="uploader" type="file" accept="image/*" / >
</div>
<div class="col-md-9" style="margin-bottom: 40px">
<table border=1 cellpadding=5>
<tr>
<td colspan=6> <a href="/logout<% if (typeof accessToken !==
'undefined') { %>?access_token=<%= accessToken %><% } %>"><h3>Log
out</h3></a></td>
</tr>
</table>
<h3>Upload queue</h3>
<p>Queue length: {{ uploader.queue.length }}</p>
<table class="table">
<thead>
<tr>
<th width="50%">Name</th>
<th ng-show="uploader.isHTML5">Size</th>
<th ng-show="uploader.isHTML5">Progress</th>
<th>Status</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in uploader.queue">
<td><strong>{{ item.file.name }}</strong></td>
<td ng-show="uploader.isHTML5" nowrap>{{
item.file.size/1024/1024|number:2 }} MB
</td>
<td ng-show="uploader.isHTML5">
<div class="progress" style="margin-bottom: 0;">
<div class="progress-bar" role="progressbar"
ng-style="{ 'width': item.progress + '%' }"></div>
</div>
</td>
<td class="text-center">
<span ng-show="item.isSuccess"><i
class="glyphicon glyphicon-ok"></i></span>
<span ng-show="item.isCancel"><i
class="glyphicon glyphicon-ban-circle"></i></span>
<span ng-show="item.isError"><i
class="glyphicon glyphicon-remove"></i></span>
</td>
<td nowrap>
<button type="button" class="btn btn-success btn-xs"
ng-click="item.upload()"
ng-disabled="item.isReady || item.isUploading || item.isSuccess || item.$invalid">
<span class="glyphicon glyphicon-upload"></span>
Upload
</button>
<button type="button" class="btn btn-warning btn-xs"
ng-click="item.cancel()"
ng-disabled="!item.isUploading">
<span class="glyphicon glyphicon-ban-circle"></span>
Cancel
</button>
<button type="button" class="btn btn-danger btn-xs"
ng-click="item.remove()">
<span class="glyphicon glyphicon-trash"></span>
Remove
</button>
</td>
</tr>
</tbody>
</table>
<div>
<p>
Queue progress:
<div class="progress" style="">
<div class="progress-bar" role="progressbar"
ng-style="{ 'width': uploader.progress + '%' }"></div>
</div>
</p>
<button type="button" class="btn btn-success btn-s"
ng-click="uploader.uploadAll()"
ng-disabled="!uploader.getNotUploadedItems().length">
<span class="glyphicon glyphicon-upload"></span> Upload all
</button>
<button type="button" class="btn btn-warning btn-s"
ng-click="uploader.cancelAll()"
ng-disabled="!uploader.isUploading">
<span class="glyphicon glyphicon-ban-circle"></span> Cancel
all
</button>
<button type="button" class="btn btn-danger btn-s"
ng-click="uploader.clearQueue()"
ng-disabled="!uploader.queue.length">
<span class="glyphicon glyphicon-trash"></span> Remove all
</button>
</div>
</div>
<div class="col-md-9" style="margin-bottom: 40px"
ng-controller="FilesController" data-ng-init="load()">
<h3>Files in the container</h3>
<table class="table">
<tbody>
<tr ng-repeat="file in files" >
<td>
<a href="/api/containers/container1/download/{{file.name}}">
<img src="/api/containers/container1/download/{{file.name}}" height="150" width="150">
</a>
</td>
<td>
<button type="button" class="btn btn-danger btn-xs"
ng-click="delete($index, file.name)"
title="Delete the file">
<span class="glyphicon glyphicon-trash"></span>
Remove
</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</body>
</html>