Browse Source
Show Delete Icon in Breadcrumb in Trashbin
Signed-off-by: Gary Kim <gary@garykim.dev>
pull/17414/head
Gary Kim
6 years ago
No known key found for this signature in database
GPG Key ID: 9349B59FB54594AC
6 changed files with
10 additions and
7 deletions
-
apps/files/js/breadcrumb.js
-
apps/files_trashbin/js/files_trashbin.js
-
apps/files_trashbin/js/files_trashbin.js.map
-
apps/files_trashbin/src/filelist.js
-
core/css/icons.scss
-
core/css/styles.scss
|
|
@ -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; |
|
|
|
} |
|
|
|