]> source.dussan.org Git - nextcloud-server.git/commitdiff
it may take time for zip file download, so give a message
authorArthur Schiwon <blizzz@owncloud.com>
Fri, 16 Mar 2012 15:25:41 +0000 (16:25 +0100)
committerArthur Schiwon <blizzz@owncloud.com>
Fri, 16 Mar 2012 15:25:41 +0000 (16:25 +0100)
files/js/files.js

index a678e12cc2d42aaac6fbf9fd7c3a14b0c5781954..539d5598899aa9ddee31cbee3a3e97895cb15573 100644 (file)
@@ -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{
-                                                               
+
                                                        }
                                                }
                                        );