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

Unified Diff: chrome/browser/resources/new_new_tab.js

Issue 6297013: [NTP] Allow reordering of apps via drag and drop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 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
Index: chrome/browser/resources/new_new_tab.js
diff --git a/chrome/browser/resources/new_new_tab.js b/chrome/browser/resources/new_new_tab.js
index f72fadd5eb21daff71ded6f9db16b04ae5c83fbd..1288096367df78fb6bcab1d6bf1d2f955290c05f 100644
--- a/chrome/browser/resources/new_new_tab.js
+++ b/chrome/browser/resources/new_new_tab.js
@@ -195,7 +195,7 @@ function createForeignSession(client, name) {
// Sort tabs by MRU order
win.tabs.sort(function(a, b) {
return a.timestamp < b.timestamp;
- })
+ });
// Create individual tab information.
win.tabs.forEach(function(data) {
@@ -213,7 +213,7 @@ function createForeignSession(client, name) {
handleIfEnterKey(maybeOpenForeignTab));
winSpan.appendChild(tabEl);
- })
+ });
// Append the window.
stack.appendChild(winSpan);
@@ -317,6 +317,8 @@ function handleWindowResize() {
if (layoutMode != oldLayoutMode){
mostVisited.useSmallGrid = b;
mostVisited.layout();
+ apps.invalidate();
+ apps.layout();
renderRecentlyClosed();
renderForeignSessions();
updateAllMiniviewClippings();
@@ -614,6 +616,9 @@ function showSection(section) {
mostVisited.visible = true;
mostVisited.layout();
break;
+ case Section.APPS:
+ apps.visible = true;
Aaron Boodman 2011/01/22 23:42:57 The visible flag here (and in mostVisited ftm) see
jstritar 2011/01/24 01:00:42 I think we could use the classes to determine visi
+ apps.layout(true);
}
}
}
@@ -638,6 +643,10 @@ function hideSection(section) {
mostVisited.visible = false;
mostVisited.layout();
break;
+ case Section.APPS:
+ apps.visible = false;
+ apps.layout();
+ break;
}
var el = getSectionElement(section);

Powered by Google App Engine
This is Rietveld 408576698