From 10f8d643dc44ddf82db3cfd91d529d47cfe2d94d Mon Sep 17 00:00:00 2001 From: Vincent Chan Date: Wed, 15 Jun 2016 13:16:11 +0200 Subject: store icons in class --- apps/files/css/files.css | 4 ---- apps/files/js/file-upload.js | 7 +++++-- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'apps/files') diff --git a/apps/files/css/files.css b/apps/files/css/files.css index ccf91e377c9..f8a2d17aaf6 100644 --- a/apps/files/css/files.css +++ b/apps/files/css/files.css @@ -85,10 +85,6 @@ background-color: rgb(179, 230, 255)!important; } -.dropping-to-dir .thumbnail { - background-image: url(/nextcloud/core/img/filetypes/folder-drag-accept.svg)!important; -} - /* icons for sidebar */ .nav-icon-files { background-image: url('../img/folder.svg'); diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js index d53ce1bd7ec..2453cc5207c 100644 --- a/apps/files/js/file-upload.js +++ b/apps/files/js/file-upload.js @@ -667,7 +667,7 @@ OC.Upload = { OC.Upload._hideProgressBar(); } }); - fileupload.on('fileuploaddragover', function(e, data){ + fileupload.on('fileuploaddragover', function(e){ $('#app-content').addClass('file-drag'); var filerow = $(e.delegatedEvent.target).closest('tr'); @@ -675,17 +675,20 @@ OC.Upload = { if(!filerow.hasClass('dropping-to-dir')){ $('.dropping-to-dir').removeClass('dropping-to-dir'); $('.dir-drop').removeClass('dir-drop'); + $('.icon-filetype-folder-drag-accept').removeClass('icon-filetype-folder-drag-accept'); } if(filerow.attr('data-type') === 'dir'){ $('#app-content').addClass('dir-drop'); filerow.addClass('dropping-to-dir'); + filerow.find('.thumbnail').addClass('icon-filetype-folder-drag-accept'); } }); - fileupload.on('fileuploaddragleave fileuploaddrop', function (e, data){ + fileupload.on('fileuploaddragleave fileuploaddrop', function (){ $('#app-content').removeClass('file-drag'); $('.dropping-to-dir').removeClass('dropping-to-dir'); $('.dir-drop').removeClass('dir-drop'); + $('.icon-filetype-folder-drag-accept').removeClass('icon-filetype-folder-drag-accept'); }); } else { // for all browsers that don't support the progress bar -- cgit v1.2.3