diff options
author | zotlabs <mike@macgirvin.com> | 2017-11-30 16:24:18 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-11-30 16:24:18 -0800 |
commit | cc0d53e6959f333d26003af64439b2fd8a8d665c (patch) | |
tree | 91f72a99b493bb71285660171d653cc81f9a7bf8 /view | |
parent | cce2b08e6bcb16b1c9fde13b2597ce66fc0c45d6 (diff) | |
download | volse-hubzilla-cc0d53e6959f333d26003af64439b2fd8a8d665c.tar.gz volse-hubzilla-cc0d53e6959f333d26003af64439b2fd8a8d665c.tar.bz2 volse-hubzilla-cc0d53e6959f333d26003af64439b2fd8a8d665c.zip |
made it to prepareHtml
Diffstat (limited to 'view')
-rw-r--r-- | view/js/mod_cloud.js | 8 | ||||
-rw-r--r-- | view/tpl/cloud_directory.tpl | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/view/js/mod_cloud.js b/view/js/mod_cloud.js index 2215a9df9..0756c34e3 100644 --- a/view/js/mod_cloud.js +++ b/view/js/mod_cloud.js @@ -16,7 +16,7 @@ function UploadInit() { var fileselect = $("#files-upload"); var filedrag = $("#cloud-drag-area"); var submit = $("#upload-submit"); - + var count = 1; $('#invisible-cloud-file-upload').fileupload({ url: 'file_upload', @@ -26,6 +26,7 @@ function UploadInit() { maxChunkSize: 100000, // 4 * 1024 * 1024, add: function(e,data) { + $(data.files).each( function() { this.count = ++ count; prepareHtml(this) }); data.submit(); }, @@ -117,8 +118,9 @@ function UploadFileSelectHandler(e) { } } -function prepareHtml(f, i) { - var num = i - 1; +function prepareHtml(f) { + var num = f.count - 1; + var i = f.count; $('#cloud-index #new-upload-progress-bar-' + num.toString()).after( '<tr id="new-upload-' + i + '" class="new-upload">' + '<td><i class="fa ' + getIconFromType(f.type) + '" title="' + f.type + '"></i></td>' + diff --git a/view/tpl/cloud_directory.tpl b/view/tpl/cloud_directory.tpl index 88b6bf563..7017df344 100644 --- a/view/tpl/cloud_directory.tpl +++ b/view/tpl/cloud_directory.tpl @@ -52,7 +52,7 @@ <td class="d-none d-md-table-cell"></td> </tr> {{/if}} - <tr id="new-upload-progress-bar--1"></tr> {{* this is needed to append the upload files in the right order *}} + <tr id="new-upload-progress-bar-1"></tr> {{* this is needed to append the upload files in the right order *}} {{foreach $entries as $item}} <tr id="cloud-index-{{$item.attachId}}"> <td><i class="fa {{$item.iconFromType}}" title="{{$item.type}}"></i></td> |