|
3 | 3 | <div class="panel-heading"> |
4 | 4 | <a href="" ui-sref="^.list" class="btn btn-xs btn-default"><i class="fa fa-arrow-left"></i></a> |
5 | 5 | {{ 'Upload files' | translate }} |
6 | | - </div> |
7 | | - <div class="panel-body"> |
8 | | - |
9 | | - <div class="col-md-2"> |
10 | | - <div class="file-input btn btn-block btn-success btn-file"> |
11 | | - {{ 'Browse files' | translate }}… <input nv-file-select type="file" uploader="ctrl.uploader" |
12 | | - multiple/> |
| 6 | + <span class="text-muted" translate>You can just drag them in this window!</span> |
| 7 | + <span class="pull-right"> |
| 8 | + <div class="file-input btn btn-xs btn-success btn-file"> |
| 9 | + {{ 'Browse' | translate }}… |
| 10 | + <input nv-file-select type="file" uploader="ctrl.uploader" multiple/> |
13 | 11 | </div> |
14 | | - <span class="text-muted" translate>Or you can just drag them in this window!</span> |
15 | | - </div> |
16 | | - |
17 | | - <div class="col-md-10"> |
18 | | - |
19 | | - <div class="row"> |
20 | | - <div class="col-md-12"> |
21 | | - <div ng-if="ctrl.uploader.progress"> |
22 | | - <br/> |
| 12 | + </span> |
| 13 | + </div> |
23 | 14 |
|
24 | | - <div class="progress"> |
25 | | - <div class="progress-bar" role="progressbar" ng-style="{ 'width': ctrl.uploader.progress + '%' }"> |
26 | | - {{ctrl.uploader.progress}}% |
27 | | - </div> |
28 | | - </div> |
29 | | - </div> |
| 15 | + <table class="table table-bordered table-stiped"> |
| 16 | + <tr> |
| 17 | + <th width="50%" translate>Name</th> |
| 18 | + <th ng-show="ctrl.uploader.isHTML5" translate>Size</th> |
| 19 | + <th ng-show="ctrl.uploader.isHTML5" translate>Progress</th> |
| 20 | + <th translate>Status</th> |
| 21 | + <th translate>Actions</th> |
| 22 | + </tr> |
| 23 | + <tr ng-repeat="item in ctrl.uploader.queue"> |
| 24 | + <td><strong>{{ item.file.name }}</strong> |
| 25 | + </td> |
| 26 | + <td ng-show="ctrl.uploader.isHTML5" nowrap>{{ item.file.size/1024/1024|number:2 }} MB |
| 27 | + </td> |
| 28 | + <td ng-show="ctrl.uploader.isHTML5"> |
| 29 | + <div class="progress" style="margin-bottom: 0;"> |
| 30 | + <div class="progress-bar" role="progressbar" ng-style="{ 'width': item.progress + '%' }"></div> |
| 31 | + </div> |
| 32 | + </td> |
| 33 | + <td class="text-center"> |
| 34 | + <span ng-show="item.isSuccess"><i class="glyphicon glyphicon-ok"></i></span> |
| 35 | + <span ng-show="item.isCancel"><i class="glyphicon glyphicon-ban-circle"></i></span> |
| 36 | + <span ng-show="item.isError"><i class="glyphicon glyphicon-remove"></i></span> |
| 37 | + </td> |
| 38 | + <td nowrap> |
| 39 | + <div class="input-group pull-right btn-group btn-group-xs"> |
| 40 | + <button type="button" class="btn btn-success btn-xs" ng-click="item.upload()" |
| 41 | + ng-disabled="item.isReady || item.isUploading || item.isSuccess"> |
| 42 | + <span class="glyphicon glyphicon-upload"></span> |
| 43 | + </button> |
| 44 | + <button type="button" class="btn btn-warning btn-xs" ng-click="item.cancel()" |
| 45 | + ng-disabled="!item.isUploading"> |
| 46 | + <span class="glyphicon glyphicon-ban-circle"></span> |
| 47 | + </button> |
| 48 | + <button type="button" class="btn btn-danger btn-xs" ng-click="item.remove()"> |
| 49 | + <span class="glyphicon glyphicon-trash"></span> |
| 50 | + </button> |
30 | 51 | </div> |
| 52 | + </td> |
| 53 | + </tr> |
| 54 | + </table> |
31 | 55 |
|
32 | | - <div class="panel panel-default"> |
33 | | - <div class="panel-heading"> |
34 | | - {{ 'Upload queue' | translate }} |
35 | | - <small> {{ ctrl.uploader.queue.length }} {{ 'in queue' | translate }}</small> |
36 | | - <div class="pull-right btn-group"> |
37 | | - <button type="button" class="btn btn-success btn-xs" ng-click="ctrl.uploader.uploadAll()" |
38 | | - ng-disabled="!ctrl.uploader.getNotUploadedItems().length"> |
39 | | - <span class="glyphicon glyphicon-upload"></span> {{ 'Upload all' | translate }} |
40 | | - </button> |
41 | | - <button type="button" class="btn btn-warning btn-xs" ng-click="ctrl.uploader.cancelAll()" |
42 | | - ng-disabled="!ctrl.uploader.isUploading"> |
43 | | - <span class="glyphicon glyphicon-ban-circle"></span> {{ 'Cancel all' | translate }} |
44 | | - </button> |
45 | | - <button type="button" class="btn btn-danger btn-xs" ng-click="ctrl.uploader.clearQueue()" |
46 | | - ng-disabled="!ctrl.uploader.queue.length"> |
47 | | - <span class="glyphicon glyphicon-trash"></span> {{ 'Remove all' | translate }} |
48 | | - </button> |
49 | | - </div> |
| 56 | + <div class="panel-footer"> |
| 57 | + <div class="row"> |
| 58 | + <div class="col-md-3"> |
| 59 | + {{ 'Upload queue' | translate }} |
| 60 | + <small> {{ ctrl.uploader.queue.length }} {{ 'in queue' | translate }}</small> |
| 61 | + </div> |
| 62 | + <div class="col-md-6"> |
| 63 | + <div class="progress" style="margin-bottom: 0px;" ng-if="ctrl.uploader.progress"> |
| 64 | + <div class="progress-bar" role="progressbar" ng-style="{ 'width': ctrl.uploader.progress + '%' }"> |
| 65 | + {{ctrl.uploader.progress}}% |
50 | 66 | </div> |
51 | | - <table class="table table-bordered table-stiped"> |
52 | | - <tr> |
53 | | - <th width="50%" translate>Name</th> |
54 | | - <th ng-show="ctrl.uploader.isHTML5" translate>Size</th> |
55 | | - <th ng-show="ctrl.uploader.isHTML5" translate>Progress</th> |
56 | | - <th translate>Status</th> |
57 | | - <th translate>Actions</th> |
58 | | - </tr> |
59 | | - <tr ng-repeat="item in ctrl.uploader.queue"> |
60 | | - <td><strong>{{ item.file.name }}</strong> |
61 | | - </td> |
62 | | - <td ng-show="ctrl.uploader.isHTML5" nowrap>{{ item.file.size/1024/1024|number:2 }} MB |
63 | | - </td> |
64 | | - <td ng-show="ctrl.uploader.isHTML5"> |
65 | | - <div class="progress" style="margin-bottom: 0;"> |
66 | | - <div class="progress-bar" role="progressbar" ng-style="{ 'width': item.progress + '%' }"></div> |
67 | | - </div> |
68 | | - </td> |
69 | | - <td class="text-center"> |
70 | | - <span ng-show="item.isSuccess"><i class="glyphicon glyphicon-ok"></i></span> |
71 | | - <span ng-show="item.isCancel"><i class="glyphicon glyphicon-ban-circle"></i></span> |
72 | | - <span ng-show="item.isError"><i class="glyphicon glyphicon-remove"></i></span> |
73 | | - </td> |
74 | | - <td nowrap> |
75 | | - <div class="input-group pull-right btn-group btn-group-xs"> |
76 | | - <button type="button" class="btn btn-success btn-xs" ng-click="item.upload()" |
77 | | - ng-disabled="item.isReady || item.isUploading || item.isSuccess"> |
78 | | - <span class="glyphicon glyphicon-upload"></span> |
79 | | - </button> |
80 | | - <button type="button" class="btn btn-warning btn-xs" ng-click="item.cancel()" |
81 | | - ng-disabled="!item.isUploading"> |
82 | | - <span class="glyphicon glyphicon-ban-circle"></span> |
83 | | - </button> |
84 | | - <button type="button" class="btn btn-danger btn-xs" ng-click="item.remove()"> |
85 | | - <span class="glyphicon glyphicon-trash"></span> |
86 | | - </button> |
87 | | - </div> |
88 | | - </td> |
89 | | - </tr> |
90 | | - </table> |
| 67 | + </div> |
| 68 | + </div> |
| 69 | + <div class="col-md-3" class="text-nowrap"> |
| 70 | + <div class="pull-right btn-group" class="text-nowrap"> |
| 71 | + <a class="btn btn-success btn-xs" ng-click="ctrl.uploader.uploadAll()" |
| 72 | + ng-disabled="!ctrl.uploader.getNotUploadedItems().length"> |
| 73 | + {{ 'Upload' | translate }} |
| 74 | + </a> |
| 75 | + <a class="btn btn-warning btn-xs" ng-click="ctrl.uploader.cancelAll()" |
| 76 | + ng-disabled="!ctrl.uploader.isUploading"> |
| 77 | + {{ 'Cancel' | translate }} |
| 78 | + </a> |
| 79 | + <a class="btn btn-danger btn-xs" ng-click="ctrl.uploader.clearQueue()" |
| 80 | + ng-disabled="!ctrl.uploader.queue.length"> |
| 81 | + {{ 'Remove' | translate }} |
| 82 | + </a> |
91 | 83 | </div> |
92 | 84 | </div> |
93 | 85 | </div> |
|
0 commit comments