Browse Source

Merge pull request #17414 from gary-kim/enh/15155/delete-icon-in-trashbin

Show Delete Icon in Breadcrumb in Trashbin
tags/v18.0.0beta1
Roeland Jago Douma 4 years ago
parent
commit
e4948f5d86
No account linked to committer's email address

+ 3
- 2
apps/files/js/breadcrumb.js View File

@@ -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];

+ 1
- 1
apps/files_trashbin/js/files_trashbin.js
File diff suppressed because it is too large
View File


+ 1
- 1
apps/files_trashbin/js/files_trashbin.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
apps/files_trashbin/src/filelist.js View File

@@ -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)
}

+ 2
- 1
core/css/icons.scss View File

@@ -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);

+ 2
- 1
core/css/styles.scss View File

@@ -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;
}

Loading…
Cancel
Save