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-08-26 06:05:31 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-26 06:05:31 +0000
commitb924ae04055aa82cd19ef522b690e3cd66352c11 (patch)
tree57965f3e4c027e3ee9139a3088b9950e928af59e /chrome/browser/resources/ntp/apps.js
parent9c62e1c9607ca2912899660c517af6aa4b4ab477 (diff)
downloadchromium_src-b924ae04055aa82cd19ef522b690e3cd66352c11.zip
chromium_src-b924ae04055aa82cd19ef522b690e3cd66352c11.tar.gz
chromium_src-b924ae04055aa82cd19ef522b690e3cd66352c11.tar.bz2
Revert 57473 and 57476. Best. Programmer. Ever.
TBR=eroman@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57478 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources/ntp/apps.js')
-rw-r--r--chrome/browser/resources/ntp/apps.js20
1 files changed, 16 insertions, 4 deletions
diff --git a/chrome/browser/resources/ntp/apps.js b/chrome/browser/resources/ntp/apps.js
index 64b490f..41c2e6e 100644
--- a/chrome/browser/resources/ntp/apps.js
+++ b/chrome/browser/resources/ntp/apps.js
@@ -5,14 +5,26 @@
function getAppsCallback(data) {
logEvent('recieved apps');
var appsSection = $('apps-section');
- var appsSectionContent = $('apps-section-content');
- appsSectionContent.textContent = '';
+ var debugSection = $('debug');
+ appsSection.textContent = '';
data.apps.forEach(function(app) {
- appsSectionContent.appendChild(apps.createElement(app));
+ appsSection.appendChild(apps.createElement(app));
});
- appsSectionContent.appendChild(apps.createWebStoreElement());
+ // TODO(aa): Figure out what to do with the debug mode when we turn apps on
+ // for everyone.
+ if (appsSection.hasChildNodes()) {
+ appsSection.classList.remove('disabled');
+ if (data.showDebugLink) {
+ debugSection.classList.remove('disabled');
+ }
+
+ appsSection.appendChild(apps.createWebStoreElement());
+ } else {
+ appsSection.classList.add('disabled');
+ debugSection.classList.add('disabled');
+ }
}
var apps = {