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

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

Issue 837563002: Show a little circly/arrowey badge for files that have been copied locally. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add copy support to test import_history and update media import handler test to check for copy resu… Created 5 years, 11 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/files/ui/copied_badge.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/file_grid.js
diff --git a/ui/file_manager/file_manager/foreground/js/ui/file_grid.js b/ui/file_manager/file_manager/foreground/js/ui/file_grid.js
index fc20538dd28962c30c4d542a76a96397b9196210..8c0983325b62fc585cac77be424be0af3f0611b3 100644
--- a/ui/file_manager/file_manager/foreground/js/ui/file_grid.js
+++ b/ui/file_manager/file_manager/foreground/js/ui/file_grid.js
@@ -294,11 +294,23 @@ FileGrid.applyHistoryBadges_ = function(entry, box, history) {
// a possibly-fragile sibling selector we just
// plop the imported class on the parent of both.
box.parentElement.classList.add('imported');
+ } else {
+ history.wasCopied(entry, importer.Destination.GOOGLE_DRIVE)
+ .then(
+ function(copied) {
+ if (copied) {
+ // TODO(smckay): update badges when history changes
+ // "box" is currently the sibling of the elemement
+ // we want to style. So rather than employing
+ // a possibly-fragile sibling selector we just
+ // plop the imported class on the parent of both.
+ box.parentElement.classList.add('copied');
+ }
+ });
}
});
};
-
/**
* Item for the Grid View.
* @constructor
« no previous file with comments | « ui/file_manager/file_manager/foreground/images/files/ui/copied_badge.png ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698