Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(698)

Unified Diff: ui/file_manager/file_manager/foreground/js/ui/directory_tree.js

Issue 939013002: Files.app: Update filetype icons. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/file_manager/file_manager/foreground/images/filetype/filetype_word.png ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/file_manager/foreground/js/ui/directory_tree.js
diff --git a/ui/file_manager/file_manager/foreground/js/ui/directory_tree.js b/ui/file_manager/file_manager/foreground/js/ui/directory_tree.js
index ca9be48c43b4b3d84c3e424100f9234034a40404..8c2563545ef94b436f39a870b845dfe2327d97c9 100644
--- a/ui/file_manager/file_manager/foreground/js/ui/directory_tree.js
+++ b/ui/file_manager/file_manager/foreground/js/ui/directory_tree.js
@@ -41,10 +41,8 @@ Object.freeze(DirectoryItemTreeBaseMethods);
var TREE_ITEM_INNTER_HTML =
'<div class="tree-row">' +
' <paper-ripple fit class="recenteringTouch"></paper-ripple>' +
- ' <span class="expand-icon">' +
- ' <core-icon icon="expand-more" class="expand-icon"></core-icon>' +
- ' </span>' +
- ' <core-icon class="icon"></core-icon>' +
+ ' <span class="expand-icon"></span>' +
+ ' <span class="icon"></span>' +
' <span class="label entry-name"></span>' +
'</div>' +
'<div class="tree-children"></div>';
@@ -354,7 +352,7 @@ function SubDirectoryItem(label, dirEntry, parentDirItem, tree) {
if (location && location.rootType && location.isRootEntry) {
icon.setAttribute('volume-type-icon', location.rootType);
} else {
- icon.icon = 'folder';
+ icon.setAttribute('file-type-icon', 'folder');
item.updateSharedStatusIcon();
}
@@ -397,14 +395,11 @@ SubDirectoryItem.prototype.setContextMenu = function(menu) {
* @override
*/
SubDirectoryItem.prototype.updateSharedStatusIcon = function() {
- var iconElement = this.querySelector('.icon');
+ var icon = this.querySelector('.icon');
this.parentTree_.fileSystemMetadata.notifyEntriesChanged([this.dirEntry_]);
this.parentTree_.fileSystemMetadata.get([this.dirEntry_], ['shared']).then(
function(metadata) {
- if (metadata[0].shared)
- iconElement.icon = 'folder-shared';
- else
- iconElement.icon = 'folder';
+ icon.classList.toggle('shared', metadata[0] && metadata[0].shared);
});
};
« no previous file with comments | « ui/file_manager/file_manager/foreground/images/filetype/filetype_word.png ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698