]> source.dussan.org Git - nextcloud-server.git/commitdiff
Replace delete icon with spinner
authorVictor Dubiniuk <victor.dubiniuk@gmail.com>
Mon, 29 Jul 2013 16:27:11 +0000 (19:27 +0300)
committerVictor Dubiniuk <victor.dubiniuk@gmail.com>
Mon, 29 Jul 2013 16:27:11 +0000 (19:27 +0300)
apps/files/js/filelist.js
core/css/styles.css

index 04a9fb91649d7d34ef3c23f56b4354f4e1317b3c..dc820dc93e29331084eddacb7f744c8d04378c87 100644 (file)
@@ -371,9 +371,7 @@ var FileList={
                }
                for (var i=0; i<files.length; i++) {
                        var deleteAction = $('tr').filterAttr('data-file',files[i]).children("td.date").children(".action.delete");
-                       var oldHTML = deleteAction.html();
-                       var newHTML = '<img class="move2trash" data-action="Delete" title="'+t('files', 'perform delete operation')+'" src="'+ OC.imagePath('core', 'loading.gif') +'"></a>';
-                       deleteAction.html(newHTML);
+                       deleteAction.removeClass('delete-icon').addClass('progress-icon');
                }
                // Finish any existing actions
                if (FileList.lastAction) {
@@ -394,8 +392,8 @@ var FileList={
                                                procesSelection();
                                        } else {
                                                $.each(files,function(index,file) {
-                                                       var deleteAction = $('tr').filterAttr('data-file',file).children("td.date").children(".move2trash");
-                                                       deleteAction.html(oldHTML);
+                                                       var deleteAction = $('tr').filterAttr('data-file',files[i]).children("td.date").children(".action.delete");
+                                                       deleteAction.removeClass('progress-icon').addClass('delete-icon');
                                                });
                                        }
                                });
index 490619c00d418fb76f83409eec337f625b6feaa4..365de759fdc14e4ee12fb5190c0dba877cf3d979 100644 (file)
@@ -659,7 +659,7 @@ div.crumb:active {
 }
 
 /* icons */
-.folder-icon, .delete-icon, .edit-icon {
+.folder-icon, .delete-icon, .edit-icon, .progress-icon {
        background-repeat: no-repeat;
        background-position: center;
 }
@@ -669,7 +669,7 @@ div.crumb:active {
        background-image: url('../img/actions/delete-hover.svg');
 }
 .edit-icon { background-image: url('../img/actions/rename.svg'); }
-
+.progress-icon { background-image: url('../img/loading.gif'); }
 
 /* buttons */
 button.loading {