Show Delete Icon in Breadcrumb in Trashbintags/v18.0.0beta1
@@ -200,9 +200,10 @@ | |||
* Makes a breadcrumb structure based on the given path | |||
* | |||
* @param {String} dir path to split into a breadcrumb structure | |||
* @param {String} [rootIcon=icon-home] icon to use for root | |||
* @return {Object.<String, String>} map of {dir: path, name: displayName} | |||
*/ | |||
_makeCrumbs: function(dir) { | |||
_makeCrumbs: function(dir, rootIcon) { | |||
var crumbs = []; | |||
var pathToHere = ''; | |||
// trim leading and trailing slashes | |||
@@ -221,7 +222,7 @@ | |||
name: t('core', 'Home'), | |||
dir: '/', | |||
class: 'crumbhome', | |||
linkclass: 'icon-home' | |||
linkclass: rootIcon || 'icon-home' | |||
}); | |||
for (var i = 0; i < parts.length; i++) { | |||
var part = parts[i]; |
@@ -78,7 +78,7 @@ | |||
* user friendly name. | |||
*/ | |||
this.breadcrumb._makeCrumbs = function() { | |||
var parts = OCA.Files.BreadCrumb.prototype._makeCrumbs.apply(this, arguments) | |||
var parts = OCA.Files.BreadCrumb.prototype._makeCrumbs.apply(this, [...arguments, 'icon-delete no-hover']) | |||
for (var i = 1; i < parts.length; i++) { | |||
parts[i].name = getDeletedFileName(parts[i].name) | |||
} |
@@ -165,7 +165,8 @@ img, object, video, button, textarea, input, select, div[contenteditable='true'] | |||
.icon-delete { | |||
@include icon-color('delete', 'actions', $color-black, 1, true); | |||
&.no-permission { | |||
&.no-permission, | |||
&.no-hover { | |||
&:hover, | |||
&:focus { | |||
@include icon-color('delete', 'actions', $color-black, 1, true); |
@@ -1197,7 +1197,8 @@ div.crumb { | |||
// Some sane max-width for each folder name | |||
max-width: 200px; | |||
&.icon-home { | |||
&.icon-home, | |||
&.icon-delete { | |||
// Hide home text | |||
text-indent: -9999px; | |||
} |