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

Unified Diff: chrome/browser/resources/ntp/apps.js

Issue 3538014: Implement layout of NTP apps promo. (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: Created 10 years, 2 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/ntp/apps.js
diff --git a/chrome/browser/resources/ntp/apps.js b/chrome/browser/resources/ntp/apps.js
index 7c55c982dedc07e0e5b221f3ea1c11b876b959fd..dd44532484cb274e4ccc48cc7cb5deef19a5c377 100644
--- a/chrome/browser/resources/ntp/apps.js
+++ b/chrome/browser/resources/ntp/apps.js
@@ -7,8 +7,12 @@ function getAppsCallback(data) {
var appsSection = $('apps');
var appsSectionContent = $('apps-maxiview');
var appsMiniview = appsSection.getElementsByClassName('miniview')[0];
- appsSectionContent.textContent = '';
+ var appsPromo = $('apps-promo');
+
appsMiniview.textContent = '';
+ while (appsSectionContent.lastChild != appsPromo) {
+ appsSectionContent.removeChild(appsSectionContent.lastChild);
+ }
clearClosedMenu(apps.menu);
if (data.apps.length == 0) {
@@ -275,11 +279,13 @@ var apps = (function() {
},
createWebStoreElement: function() {
- return createElement({
+ var elm = createElement({
'id': 'web-store-entry',
'name': localStrings.getString('web_store_title'),
'launch_url': localStrings.getString('web_store_url')
});
+ elm.setAttribute('app-id', 'web-store-entry');
+ return elm;
}
};
})();

Powered by Google App Engine
This is Rietveld 408576698