| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1089 actionLink.blur(); | 1089 actionLink.blur(); |
| 1090 } | 1090 } |
| 1091 if (closeButton) { | 1091 if (closeButton) { |
| 1092 closeButton.tabIndex = -1; | 1092 closeButton.tabIndex = -1; |
| 1093 closeButton.blur(); | 1093 closeButton.blur(); |
| 1094 } | 1094 } |
| 1095 } | 1095 } |
| 1096 | 1096 |
| 1097 function showPromoNotification() { | 1097 function showPromoNotification() { |
| 1098 showNotification(parseHtmlSubset(localStrings.getString('serverpromo')), | 1098 showNotification(parseHtmlSubset(localStrings.getString('serverpromo')), |
| 1099 localStrings.getString('syncpromotext'), | 1099 undefined, |
| 1100 function () { chrome.send('SyncLinkClicked'); }, | 1100 function () {}, |
| 1101 60000); | 1101 60000); |
| 1102 var notificationElement = $('notification'); | 1102 var notificationElement = $('notification'); |
| 1103 notification.classList.add('promo'); | 1103 notification.classList.add('promo'); |
| 1104 } | 1104 } |
| 1105 | 1105 |
| 1106 $('main').addEventListener('click', function(e) { | 1106 $('main').addEventListener('click', function(e) { |
| 1107 var p = e.target; | 1107 var p = e.target; |
| 1108 while (p && p.tagName != 'H2') { | 1108 while (p && p.tagName != 'H2') { |
| 1109 // In case the user clicks on a button we do not want to expand/collapse a | 1109 // In case the user clicks on a button we do not want to expand/collapse a |
| 1110 // section. | 1110 // section. |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1479 | 1479 |
| 1480 // Initialize the listener for the "hide this" link on the apps promo. We do | 1480 // Initialize the listener for the "hide this" link on the apps promo. We do |
| 1481 // this outside of getAppsCallback because it only needs to be done once per | 1481 // this outside of getAppsCallback because it only needs to be done once per |
| 1482 // NTP load. | 1482 // NTP load. |
| 1483 $('apps-promo-hide').addEventListener('click', function() { | 1483 $('apps-promo-hide').addEventListener('click', function() { |
| 1484 chrome.send('hideAppsPromo', []); | 1484 chrome.send('hideAppsPromo', []); |
| 1485 document.documentElement.classList.remove('apps-promo-visible'); | 1485 document.documentElement.classList.remove('apps-promo-visible'); |
| 1486 layoutSections(); | 1486 layoutSections(); |
| 1487 }); | 1487 }); |
| 1488 }); | 1488 }); |
| OLD | NEW |