diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2013-12-02 15:27:40 +0100 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2013-12-02 16:30:03 +0100 |
commit | ee66db447fc12aed4ef441710a29fab2e03aa47e (patch) | |
tree | dc9ec7b20ce51f677396041198082a33fd068292 /apps/files_trashbin/js | |
parent | a81d4175ba1d0625a0096c6383f1af4505eb1d4d (diff) | |
download | nextcloud-server-ee66db447fc12aed4ef441710a29fab2e03aa47e.tar.gz nextcloud-server-ee66db447fc12aed4ef441710a29fab2e03aa47e.zip |
make it possible to select folders
Diffstat (limited to 'apps/files_trashbin/js')
-rw-r--r-- | apps/files_trashbin/js/trash.js | 41 |
1 files changed, 6 insertions, 35 deletions
diff --git a/apps/files_trashbin/js/trash.js b/apps/files_trashbin/js/trash.js index b157fdf1025..48e9629f7de 100644 --- a/apps/files_trashbin/js/trash.js +++ b/apps/files_trashbin/js/trash.js @@ -66,41 +66,6 @@ $(document).ready(function() { procesSelection(); }); - $('#fileList').on('click', 'td.filename a', function(event) { - if (event.shiftKey) { - event.preventDefault(); - var last = $(lastChecked).parent().parent().prevAll().length; - var first = $(this).parent().parent().prevAll().length; - var start = Math.min(first, last); - var end = Math.max(first, last); - var rows = $(this).parent().parent().parent().children('tr'); - for (var i = start; i < end; i++) { - $(rows).each(function(index) { - if (index == i) { - var checkbox = $(this).children().children('input:checkbox'); - $(checkbox).attr('checked', 'checked'); - $(checkbox).parent().parent().addClass('selected'); - } - }); - } - } - var checkbox = $(this).parent().children('input:checkbox'); - lastChecked = checkbox; - if ($(checkbox).attr('checked')) { - $(checkbox).removeAttr('checked'); - $(checkbox).parent().parent().removeClass('selected'); - $('#select_all').removeAttr('checked'); - } else { - $(checkbox).attr('checked', 'checked'); - $(checkbox).parent().parent().toggleClass('selected'); - var selectedCount = $('td.filename input:checkbox:checked').length; - if (selectedCount == $('td.filename input:checkbox').length) { - $('#select_all').attr('checked', 'checked'); - } - } - procesSelection(); - }); - $('.undelete').click('click', function(event) { event.preventDefault(); var files = getSelectedFiles('file'); @@ -184,6 +149,12 @@ $(document).ready(function() { }); + $('#fileList').on('click', 'td.filename input', function() { + var checkbox = $(this).parent().children('input:checkbox'); + $(checkbox).parent().parent().toggleClass('selected'); + procesSelection(); + }); + $('#fileList').on('click', 'td.filename a', function(event) { var mime = $(this).parent().parent().data('mime'); if (mime !== 'httpd/unix-directory') { |