use background image instead of img for Files delete icon

This commit is contained in:
Jan-Christoph Borchardt 2013-07-18 18:40:09 +02:00
parent cab792323d
commit 197c979d26
2 changed files with 5 additions and 4 deletions

View File

@ -125,12 +125,9 @@ var FileActions = {
if (typeof trashBinApp !== 'undefined' && trashBinApp) {
var html = '<a href="#" original-title="' + t('files', 'Delete permanently') + '" class="action delete" />';
} else {
var html = '<a href="#" original-title="' + t('files', 'Delete') + '" class="action delete" />';
var html = '<a href="#" original-title="' + t('files', 'Delete') + '" 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);

View File

@ -659,6 +659,10 @@ div.crumb:active {
}
/* icons */
.folder-icon, .delete-icon, .edit-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 {