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

Unified Diff: chrome/browser/resources/ntp4/apps_page.js

Issue 7685049: ntp4: app install improvements (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rbyers suggestions Created 9 years, 4 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 | « chrome/browser/extensions/extension_install_ui.cc ('k') | chrome/browser/resources/ntp4/nav_dot.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/ntp4/apps_page.js
diff --git a/chrome/browser/resources/ntp4/apps_page.js b/chrome/browser/resources/ntp4/apps_page.js
index 0b5a567745592924fa5df5331b6a9a23b91966f5..a81c34399f8767ee419b1e6af00010164b45ac51 100644
--- a/chrome/browser/resources/ntp4/apps_page.js
+++ b/chrome/browser/resources/ntp4/apps_page.js
@@ -420,7 +420,7 @@ cr.define('ntp4', function() {
var tile = ntp4.getCurrentlyDraggingTile();
if (!tile.querySelector('.app')) {
e.preventDefault();
- e.dataTransfer.dropEffect = 'copy';
+ this.setDropEffect(e.dataTransfer);
} else {
TilePage.prototype.doDragOver.call(this, e);
}
@@ -517,6 +517,15 @@ cr.define('ntp4', function() {
chrome.send('reorderApps', [draggedTile.firstChild.appId, appIds]);
},
+
+ /** @inheritDoc */
+ setDropEffect: function(dataTransfer) {
+ var tile = ntp4.getCurrentlyDraggingTile();
+ if (tile && tile.querySelector('.app'))
+ dataTransfer.dropEffect = 'move';
+ else
+ dataTransfer.dropEffect = 'copy';
+ },
};
AppsPage.setPromo = function(data) {
« no previous file with comments | « chrome/browser/extensions/extension_install_ui.cc ('k') | chrome/browser/resources/ntp4/nav_dot.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698