Browse Source

Merge pull request #16 from dom111/master-topic-7-add_download_links

Moved download link to be first item
Dom Hastings 6 years ago
parent
commit
6c9fc78222
2 changed files with 4 additions and 4 deletions
  1. 0 0
      src/webdav-min.js
  2. 4 4
      src/webdav.js

File diff suppressed because it is too large
+ 0 - 0
src/webdav-min.js


+ 4 - 4
src/webdav.js

@@ -198,10 +198,6 @@
 
             // parent folder doesn't have a 'name'
             if (file.name) {
-                if (!file.directory) {
-                    file.item.append('<a href="' + file.path + file.name + '" download="' + file.name + '" class="download">download</a>');
-                }
-
                 if (file['delete']) {
                     file.item.append('<a href="#delete" title="Delete" class="delete">delete</a>');
                     file.item.append('<a href="#move" title="Move" class="move">move</a>');
@@ -209,6 +205,10 @@
 
                 file.item.append('<a href="#rename" title="Rename" class="rename">rename</a>');
                 file.item.append('<a href="#copy" title="Copy" class="copy">copy</a>');
+
+                if (!file.directory) {
+                    file.item.append('<a href="' + file.path + file.name + '" download="' + file.name + '" class="download">download</a>');
+                }
             }
 
             _bindEvents(file);

Some files were not shown because too many files changed in this diff