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

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

Issue 293643002: Use special icon for shared folders in file list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove curly bracket from one-line if statements. Created 6 years, 7 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
Index: ui/file_manager/file_manager/foreground/js/file_grid.js
diff --git a/ui/file_manager/file_manager/foreground/js/file_grid.js b/ui/file_manager/file_manager/foreground/js/file_grid.js
index d705827811a73644abc0f621b0727e73305346ff..d3ea59fc26d1df2ec6f711a01ad389d42102e5a2 100644
--- a/ui/file_manager/file_manager/foreground/js/file_grid.js
+++ b/ui/file_manager/file_manager/foreground/js/file_grid.js
@@ -146,9 +146,17 @@ FileGrid.decorateThumbnail = function(li, entry, metadataCache, volumeManager) {
FileGrid.decorateThumbnailBox = function(
box, entry, metadataCache, volumeManager, fillMode, quality,
opt_imageLoadCallback) {
+ var locationInfo = volumeManager.getLocationInfo(entry);
box.className = 'img-container';
+
if (entry.isDirectory) {
box.setAttribute('generic-thumbnail', 'folder');
+ if (locationInfo && locationInfo.isDriveBased) {
+ metadataCache.get(entry, 'drive', function(metadata) {
+ if (metadata.shared)
+ box.classList.add('shared');
+ });
+ }
if (opt_imageLoadCallback)
setTimeout(opt_imageLoadCallback, 0, null /* callback parameter */);
return;
@@ -156,7 +164,6 @@ FileGrid.decorateThumbnailBox = function(
var metadataTypes = 'thumbnail|filesystem';
- var locationInfo = volumeManager.getLocationInfo(entry);
if (locationInfo && locationInfo.isDriveBased) {
metadataTypes += '|drive';
} else {
« no previous file with comments | « ui/file_manager/file_manager/foreground/css/file_types.css ('k') | ui/file_manager/file_manager/foreground/js/file_table.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698