diff options
author | Jan-Christoph Borchardt <hey@jancborchardt.net> | 2013-08-15 15:31:42 -0700 |
---|---|---|
committer | Jan-Christoph Borchardt <hey@jancborchardt.net> | 2013-08-15 15:31:42 -0700 |
commit | d2767faf6104f4a4f0330c1771c488beea6245cd (patch) | |
tree | 8a40a297db061318519e902fa7755da5f5bf18fc | |
parent | bd1895bdf8dff07bf9dc9803ce991e39daa52acc (diff) | |
parent | b632b8f4e41f12d62fd4abdefa63fc9f9accd432 (diff) | |
download | nextcloud-server-d2767faf6104f4a4f0330c1771c488beea6245cd.tar.gz nextcloud-server-d2767faf6104f4a4f0330c1771c488beea6245cd.zip |
Merge pull request #4113 from owncloud/delete-fix
Delete icon fix
-rw-r--r-- | apps/files/css/files.css | 8 | ||||
-rw-r--r-- | apps/files/js/fileactions.js | 7 | ||||
-rw-r--r-- | apps/files/js/filelist.js | 10 | ||||
-rw-r--r-- | core/css/styles.css | 20 | ||||
-rw-r--r-- | core/img/actions/delete-hover.png | bin | 0 -> 295 bytes | |||
-rw-r--r-- | core/img/actions/delete-hover.svg | 12 | ||||
-rw-r--r-- | core/img/actions/delete.png | bin | 295 -> 254 bytes | |||
-rw-r--r-- | core/img/actions/delete.svg | 14 | ||||
-rw-r--r-- | core/js/js.js | 1 |
9 files changed, 46 insertions, 26 deletions
diff --git a/apps/files/css/files.css b/apps/files/css/files.css index 86fb0dc6046..50aa58b53d7 100644 --- a/apps/files/css/files.css +++ b/apps/files/css/files.css @@ -147,14 +147,14 @@ a.action>img { max-height:16px; max-width:16px; vertical-align:text-bottom; } display:none; } #fileList tr:hover a.action, #fileList a.action.permanent { - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=.5)"; - filter: alpha(opacity=.5); + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; + filter: alpha(opacity=50); opacity: .5; display:inline; } #fileList tr:hover a.action:hover { - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=1)"; - filter: alpha(opacity=1); + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; + filter: alpha(opacity=100); opacity: 1; display:inline; } diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index de67d13559e..5027211b536 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -123,14 +123,11 @@ var FileActions = { img = img(file); } if (typeof trashBinApp !== 'undefined' && trashBinApp) { - var html = '<a href="#" original-title="' + t('files', 'Delete permanently') + '" class="action delete" />'; + var html = '<a href="#" original-title="' + t('files', 'Delete permanently') + '" class="action delete delete-icon" />'; } else { - var html = '<a href="#" original-title="' + t('files', 'Delete') + '" class="action delete" />'; + var html = '<a href="#" class="action delete delete-icon" />'; } var element = $(html); - if (img) { - element.append($('<img class ="svg" src="' + img + '"/>')); - } element.data('action', actions['Delete']); element.on('click', {a: null, elem: parent, actionFunc: actions['Delete']}, actionHandler); parent.parent().children().last().append(element); diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index f7cc3767b25..10801af3ead 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -15,7 +15,7 @@ var FileList={ // filename td td = $('<td></td>').attr({ "class": "filename", - "style": 'background-image:url('+iconurl+')' + "style": 'background-image:url('+iconurl+'); background-size: 16px;' }); td.append('<input type="checkbox" />'); var link_elem = $('<a></a>').attr({ @@ -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) { @@ -395,8 +393,8 @@ var FileList={ checkTrashStatus(); } 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'); }); } }); diff --git a/core/css/styles.css b/core/css/styles.css index 1b58899eef6..c3d34253857 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -833,9 +833,25 @@ div.crumb:active { } /* icons */ +.folder-icon, .delete-icon, .edit-icon, .progress-icon { + background-repeat: no-repeat; + background-position: center; +} .folder-icon { background-image: url('../img/places/folder.svg'); } .delete-icon { background-image: url('../img/actions/delete.svg'); } +.delete-icon:hover, .delete-icon:focus { + 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'); + background-size: 16px; + /* force show the loading icon, not only on hover */ + -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; + filter:alpha(opacity=100); + opacity: 1 !important; + display: inline !important; +} /* buttons */ button.loading { @@ -855,6 +871,10 @@ button.loading { ::-moz-focus-inner { border: 0; } +.lte8 .delete-icon { background-image: url('../img/actions/delete.png'); } +.lte8 .delete-icon:hover, .delete-icon:focus { + background-image: url('../img/actions/delete-hover.png'); +} /* IE8 needs background to be set to same color to make transparency look good. */ .lte9 #body-login form input[type="text"] { diff --git a/core/img/actions/delete-hover.png b/core/img/actions/delete-hover.png Binary files differnew file mode 100644 index 00000000000..99f549faf9b --- /dev/null +++ b/core/img/actions/delete-hover.png diff --git a/core/img/actions/delete-hover.svg b/core/img/actions/delete-hover.svg new file mode 100644 index 00000000000..568185c5c70 --- /dev/null +++ b/core/img/actions/delete-hover.svg @@ -0,0 +1,12 @@ +<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"> + <metadata> + <rdf:RDF> + <cc:Work rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/> + <dc:title/> + </cc:Work> + </rdf:RDF> + </metadata> + <path fill="#d40000" d="M8,1c-3.866,0-7,3.134-7,7s3.134,7,7,7,7-3.134,7-7-3.134-7-7-7zm-2.8438,2.75l2.8438,2.8438,2.844-2.8438,1.406,1.4062-2.8438,2.8438,2.8438,2.844-1.406,1.406-2.844-2.8438-2.8438,2.8438-1.4062-1.406,2.8438-2.844-2.8438-2.8438,1.4062-1.4062z"/> +</svg> diff --git a/core/img/actions/delete.png b/core/img/actions/delete.png Binary files differindex 99f549faf9b..0d8c89a56e2 100644 --- a/core/img/actions/delete.png +++ b/core/img/actions/delete.png diff --git a/core/img/actions/delete.svg b/core/img/actions/delete.svg index 568185c5c70..ef564bfd482 100644 --- a/core/img/actions/delete.svg +++ b/core/img/actions/delete.svg @@ -1,12 +1,6 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"> - <metadata> - <rdf:RDF> - <cc:Work rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/> - <dc:title/> - </cc:Work> - </rdf:RDF> - </metadata> - <path fill="#d40000" d="M8,1c-3.866,0-7,3.134-7,7s3.134,7,7,7,7-3.134,7-7-3.134-7-7-7zm-2.8438,2.75l2.8438,2.8438,2.844-2.8438,1.406,1.4062-2.8438,2.8438,2.8438,2.844-1.406,1.406-2.844-2.8438-2.8438,2.8438-1.4062-1.406,2.8438-2.844-2.8438-2.8438,1.4062-1.4062z"/> + <g transform="translate(0 -1036.4)"> + <path d="m3 1040.4 1-1 4 3 4-3 1 1-3 4 3 4-1 1-4-3-4 3-1-1 3-4z"/> + </g> </svg> diff --git a/core/js/js.js b/core/js/js.js index 60a29342f26..c2b81ae3272 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -762,7 +762,6 @@ $(document).ready(function(){ $('.password .action').tipsy({gravity:'se', fade:true, live:true}); $('#upload').tipsy({gravity:'w', fade:true}); $('.selectedActions a').tipsy({gravity:'s', fade:true, live:true}); - $('a.delete').tipsy({gravity: 'e', fade:true, live:true}); $('a.action').tipsy({gravity:'s', fade:true, live:true}); $('td .modified').tipsy({gravity:'s', fade:true, live:true}); |