summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources/ntp/apps.js
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-01 05:59:47 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-01 05:59:47 +0000
commit1a13224309d6d1d94a2cd1b1d492cd2f78f20e94 (patch)
tree8408ce72902d64bfc6281224d3dbe6e750daad7a /chrome/browser/resources/ntp/apps.js
parent0ff62860f0db277412f8c56b43cc65356af6d820 (diff)
downloadchromium_src-1a13224309d6d1d94a2cd1b1d492cd2f78f20e94.zip
chromium_src-1a13224309d6d1d94a2cd1b1d492cd2f78f20e94.tar.gz
chromium_src-1a13224309d6d1d94a2cd1b1d492cd2f78f20e94.tar.bz2
De-suck the NTP a bit more:
* When there are no apps, don't show the apps section. * Expand the MV section by default, like it was in M6. * Fix bug where recently closed is incorrectly toggleable. * Stop showing miniview items for MV section when there is no more room. * Don't show filler MV items in miniview. * MV section is 5px too high because we were only apply extra padding to the first section, even if that section was disabled. TEST=Visual inspection. Review URL: http://codereview.chromium.org/3292003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58139 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources/ntp/apps.js')
-rw-r--r--chrome/browser/resources/ntp/apps.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/resources/ntp/apps.js b/chrome/browser/resources/ntp/apps.js
index 5735b61..5bf1d1a 100644
--- a/chrome/browser/resources/ntp/apps.js
+++ b/chrome/browser/resources/ntp/apps.js
@@ -10,6 +10,11 @@ function getAppsCallback(data) {
appsSectionContent.textContent = '';
appsMiniview.textContent = '';
+ if (data.apps.length == 0) {
+ appsSection.classList.add('disabled');
+ return;
+ }
+
data.apps.forEach(function(app) {
appsSectionContent.appendChild(apps.createElement(app));
});
@@ -20,6 +25,7 @@ function getAppsCallback(data) {
appsMiniview.appendChild(apps.createMiniviewElement(app));
});
+ appsSection.classList.remove('disabled');
layoutSections();
}