diff options
Diffstat (limited to 'data/assets/js/admin/tabs')
| -rw-r--r-- | data/assets/js/admin/tabs/files.js | 8 | 
1 files changed, 6 insertions, 2 deletions
diff --git a/data/assets/js/admin/tabs/files.js b/data/assets/js/admin/tabs/files.js index c3737d0..82af4b4 100644 --- a/data/assets/js/admin/tabs/files.js +++ b/data/assets/js/admin/tabs/files.js @@ -10,6 +10,7 @@ jQuery(function($) {          "data-name='%{name|h}' ",          "data-size='%{size|h}' ",          "data-path='%{path|h}' ", +        "data-url='%{url|h}' ",        ">",          "<i class='fa fa-file-o'></i>",          " ", @@ -130,7 +131,7 @@ jQuery(function($) {      } else {        // select and download file        $(this).click(); -      $('#files-download').click(); +      $('#file-actions a[data-id="download"]').click();      }      // stop event @@ -164,7 +165,10 @@ jQuery(function($) {      $('body').trigger('click');      if (data.id == 'download') { -      alert('TODO: download file'); +      // alert('TODO: download file'); +      var url = $('#files .active').data('url'); +      if (url) +        location.href = url;      } else if (data.id == 'move') {        alert('TODO: move file');      } else if (data.id == 'delete') {  | 
