diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2012-03-16 16:25:41 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2012-03-16 16:25:41 +0100 |
commit | 3267d91bdaed42633656723ec4e239d1fe460824 (patch) | |
tree | e3fd0d20fb4b54901616561bb1df98206de38c67 /files | |
parent | a77edf88c6da02456569b2810830c19f7d2648b3 (diff) | |
download | nextcloud-server-3267d91bdaed42633656723ec4e239d1fe460824.tar.gz nextcloud-server-3267d91bdaed42633656723ec4e239d1fe460824.zip |
it may take time for zip file download, so give a message
Diffstat (limited to 'files')
-rw-r--r-- | files/js/files.js | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/files/js/files.js b/files/js/files.js index a678e12cc2d..539d5598899 100644 --- a/files/js/files.js +++ b/files/js/files.js @@ -3,11 +3,11 @@ $(document).ready(function() { //little hack to set unescape filenames in attribute $(this).attr('data-file',decodeURIComponent($(this).attr('data-file'))); }); - + if($('tr[data-file]').length==0){ $('.file_upload_filename').addClass('highlight'); } - + $('#file_action_panel').attr('activeAction', false); //drag/drop of files @@ -16,7 +16,7 @@ $(document).ready(function() { $('div.crumb').droppable(crumbDropOptions); $('ul#apps>li:first-child').data('dir',''); $('ul#apps>li:first-child').droppable(crumbDropOptions); - + // Triggers invisible file input $('.file_upload_button_wrapper').live('click', function() { $(this).parent().children('.file_upload_start').trigger('click'); @@ -81,9 +81,9 @@ $(document).ready(function() { } } } - + }); - + // Sets the select_all checkbox behaviour : $('#select_all').click(function() { if($(this).attr('checked')){ @@ -97,7 +97,7 @@ $(document).ready(function() { } procesSelection(); }); - + $('td.filename input:checkbox').live('click',function(event) { if (event.shiftKey) { var last = $(lastChecked).parent().parent().prevAll().length; @@ -126,23 +126,22 @@ $(document).ready(function() { } procesSelection(); }); - + $('#file_newfolder_name').click(function(){ if($('#file_newfolder_name').val() == 'New Folder'){ $('#file_newfolder_name').val(''); } }); - + $('.download').click('click',function(event) { var files=getSelectedFiles('name').join(';'); - - //send the browser to the download location var dir=$('#dir').val()||'/'; -// alert(files); + $('#notification').text(t('files','generating ZIP-file, it may take some time.')); + $('#notification').fadeIn(); window.location='ajax/download.php?files='+encodeURIComponent(files)+'&dir='+encodeURIComponent(dir); return false; }); - + $('.delete').click(function(event) { var files=getSelectedFiles('name'); event.preventDefault(); @@ -228,7 +227,7 @@ $(document).ready(function() { form.hide(); } }); - + //add multiply file upload attribute to all browsers except konqueror (which crashes when it's used) if(navigator.userAgent.search(/konqueror/i)==-1){ $('.file_upload_start').attr('multiple','multiple') @@ -255,7 +254,7 @@ $(document).ready(function() { text=text.substr(0,text.length-6)+'...'; crumb.text(text); } - + $(window).click(function(){ $('#new>ul').hide(); $('#new').removeClass('active'); @@ -279,14 +278,14 @@ $(document).ready(function() { if($(this).children('p').length==0){ return; } - + $('#new li').each(function(i,element){ if($(element).children('p').length==0){ $(element).children('input').remove(); $(element).append('<p>'+$(element).data('text')+'</p>'); } }); - + var type=$(this).data('type'); var text=$(this).children('p').text(); $(this).data('text',text); @@ -348,7 +347,7 @@ $(document).ready(function() { tr.find('td.filename').attr('style','background-image:url('+path+')'); }); }else{ - + } } ); |