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

Side by Side Diff: chrome/browser/resources/new_new_tab.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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // To avoid creating tons of unnecessary nodes. We assume we cannot fit more 5 // To avoid creating tons of unnecessary nodes. We assume we cannot fit more
6 // than this many items in the miniview. 6 // than this many items in the miniview.
7 var MAX_MINIVIEW_ITEMS = 15; 7 var MAX_MINIVIEW_ITEMS = 15;
8 8
9 // Extra spacing at the top of the layout. 9 // Extra spacing at the top of the layout.
10 var LAYOUT_SPACING_TOP = 25; 10 var LAYOUT_SPACING_TOP = 25;
(...skipping 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after
1088 } 1088 }
1089 1089
1090 function maybeDoneLoading() { 1090 function maybeDoneLoading() {
1091 if (mostVisited.data && apps.loaded) 1091 if (mostVisited.data && apps.loaded)
1092 document.body.classList.remove('loading'); 1092 document.body.classList.remove('loading');
1093 } 1093 }
1094 1094
1095 function isDoneLoading() { 1095 function isDoneLoading() {
1096 return !document.body.classList.contains('loading'); 1096 return !document.body.classList.contains('loading');
1097 } 1097 }
1098
Bons 2010/10/06 20:04:06 remove extra line (I don't see any other instances
1099
1100 // Initialize the apps promo if necessary.
1101 document.addEventListener('DOMContentLoaded', function() {
1102 var promoText1 = $('apps-promo-text1');
1103 promoText1.innerHTML = promoText1.textContent;
arv (Not doing code reviews) 2010/10/06 20:48:36 You can do this using the template system <p id="
1104 promoText1.querySelector('a').href = localStrings.getString('web_store_url');
1105 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698