OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html i18n-values=" | 2 <html i18n-values=" |
3 dir:textdirection; | 3 dir:textdirection; |
4 firstview:firstview; | 4 firstview:firstview; |
5 bookmarkbarattached:bookmarkbarattached; | 5 bookmarkbarattached:bookmarkbarattached; |
6 hasattribution:hasattribution; | 6 hasattribution:hasattribution; |
7 anim:anim; | 7 anim:anim; |
8 syncispresent:syncispresent; | 8 syncispresent:syncispresent; |
9 showsetashomepage:showsetashomepage"> | 9 showsetashomepage:showsetashomepage"> |
10 | 10 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 <script> | 59 <script> |
60 | 60 |
61 /** | 61 /** |
62 * Bitmask for the different UI sections. | 62 * Bitmask for the different UI sections. |
63 * This matches the Section enum in ../dom_ui/shown_sections_handler.h | 63 * This matches the Section enum in ../dom_ui/shown_sections_handler.h |
64 * @enum {number} | 64 * @enum {number} |
65 */ | 65 */ |
66 var Section = { | 66 var Section = { |
67 THUMB: 1, | 67 THUMB: 1, |
68 LIST: 2, | 68 LIST: 2, |
69 RECENT: 4 | 69 RECENT: 4, |
| 70 TIPS: 8, |
| 71 SYNC: 16 |
70 }; | 72 }; |
71 | 73 |
72 var shownSections = templateData['shown_sections']; | 74 var shownSections = templateData['shown_sections']; |
73 | 75 |
74 function $(id) { | 76 function $(id) { |
75 return document.getElementById(id); | 77 return document.getElementById(id); |
76 } | 78 } |
77 | 79 |
78 // Until themes can clear the cache, force-reload the theme stylesheet. | 80 // Until themes can clear the cache, force-reload the theme stylesheet. |
79 document.write('<link id="themecss" rel="stylesheet" ' + | 81 document.write('<link id="themecss" rel="stylesheet" ' + |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 var t = children[i]; | 155 var t = children[i]; |
154 t.style.left = rtlList ? '' : rects[i].left + 'px'; | 156 t.style.left = rtlList ? '' : rects[i].left + 'px'; |
155 t.style.top = rects[i].top + 'px'; | 157 t.style.top = rects[i].top + 'px'; |
156 t.style.right = ''; | 158 t.style.right = ''; |
157 var innerStyle = t.firstElementChild.style; | 159 var innerStyle = t.firstElementChild.style; |
158 innerStyle.left = innerStyle.top = ''; | 160 innerStyle.left = innerStyle.top = ''; |
159 } | 161 } |
160 } | 162 } |
161 } | 163 } |
162 | 164 |
| 165 function updateSimpleSection(id, section) { |
| 166 $(id).style.display = shownSections & section ? '' : 'none'; |
| 167 } |
| 168 |
163 </script> | 169 </script> |
164 </head> | 170 </head> |
165 <body class="loading" | 171 <body class="loading" |
166 i18n-values=".style.fontFamily:fontfamily;.style.fontSize:fontsize"> | 172 i18n-values=".style.fontFamily:fontfamily;.style.fontSize:fontsize"> |
167 | 173 |
168 <div id="main"> | 174 <div id="main"> |
169 | 175 |
170 <div id="view-toolbar" | 176 <div id="view-toolbar" |
171 ><input type=checkbox id="thumb-checkbox" checked | 177 ><input type=checkbox id="thumb-checkbox" checked |
172 i18n-values="title:showhidethumbnailtooltip" | 178 i18n-values="title:showhidethumbnailtooltip" |
173 ><input type=checkbox id="list-checkbox" | 179 ><input type=checkbox id="list-checkbox" |
174 i18n-values="title:showhidelisttooltip" | 180 i18n-values="title:showhidelisttooltip" |
175 ><input type="button" id="option-button" | 181 ><input type="button" id="option-button" |
176 i18n-values="title:pagedisplaytooltip"></div> | 182 i18n-values="title:pagedisplaytooltip"></div> |
177 | 183 |
178 <div id="option-menu" class="window-menu"> | 184 <div id="option-menu" class="window-menu"> |
179 <div command="hide" section="THUMB" i18n-content="mostvisited"></div> | 185 <div command="hide" section="THUMB" i18n-content="mostvisited"></div> |
180 <div command="hide" section="RECENT" i18n-content="recentlyclosed"></div> | 186 <div command="hide" section="RECENT" i18n-content="recentlyclosed"></div> |
| 187 <div command="hide" section="TIPS" i18n-content="tips"></div> |
| 188 <div command="hide" section="SYNC" i18n-content="sync" |
| 189 id="sync-menu-item"></div> |
181 <hr> | 190 <hr> |
182 <div command="clear-all-blacklisted" | 191 <div command="clear-all-blacklisted" |
183 i18n-content="restorethumbnails"></div> | 192 i18n-content="restorethumbnails"></div> |
184 </div> | 193 </div> |
185 | 194 |
186 <script> | 195 <script> |
187 $('thumb-checkbox').checked = shownSections & Section.THUMB; | 196 $('thumb-checkbox').checked = shownSections & Section.THUMB; |
188 $('list-checkbox').checked = shownSections & Section.LIST; | 197 $('list-checkbox').checked = shownSections & Section.LIST; |
| 198 $('sync-menu-item').style.display = |
| 199 templateData['syncispresent'] == 'true' ? '' : 'none'; |
189 </script> | 200 </script> |
190 | 201 |
191 <div id="notification"> | 202 <div id="notification"> |
192 <span> </span> | 203 <span> </span> |
193 <span class="link"><span class="link-color"></span></span> | 204 <span class="link"><span class="link-color"></span></span> |
194 </div> | 205 </div> |
195 | 206 |
196 <div id="most-visited"> | 207 <div id="most-visited"> |
197 <a class="thumbnail-container filler" tabindex="1" id="t0"> | 208 <a class="thumbnail-container filler" tabindex="1" id="t0"> |
198 <div class="edit-mode-border"> | 209 <div class="edit-mode-border"> |
(...skipping 29 matching lines...) Expand all Loading... |
228 })(); | 239 })(); |
229 </script> | 240 </script> |
230 | 241 |
231 <div id="recently-closed"> | 242 <div id="recently-closed"> |
232 <h2 i18n-content="recentlyclosed"></h2> | 243 <h2 i18n-content="recentlyclosed"></h2> |
233 <span class="nav"> | 244 <span class="nav"> |
234 <a href="chrome://history/" class="item" | 245 <a href="chrome://history/" class="item" |
235 i18n-content="viewfullhistory"></a> | 246 i18n-content="viewfullhistory"></a> |
236 </span> | 247 </span> |
237 </div> | 248 </div> |
238 <script> | 249 <script>updateSimpleSection('recently-closed', Section.RECENT);</script> |
239 if (!(shownSections & Section.RECENT)) { | |
240 $('recently-closed').className = 'collapsed'; | |
241 } | |
242 </script> | |
243 | 250 |
244 <div id="sync-status"> | 251 <div id="sync-status"> |
245 <h2></h2> | 252 <h2></h2> |
246 <span></span> | 253 <span></span> |
247 </div> | 254 </div> |
| 255 <script>updateSimpleSection('sync-status', Section.SYNC);</script> |
248 | 256 |
249 <div id="set-as-homepage"> | 257 <div id="set-as-homepage"> |
250 <button class="link"> | 258 <button class="link"> |
251 <span class="link-color" i18n-content="makethishomepage"></span> | 259 <span class="link-color" i18n-content="makethishomepage"></span> |
252 </button> | 260 </button> |
253 </div> | 261 </div> |
254 | 262 |
255 <div id="tip-line"></div> | 263 <div id="tip-line"></div> |
| 264 <script>updateSimpleSection('tip-line', Section.TIPS);</script> |
256 | 265 |
257 <div id="attribution" class="attribution"> | 266 <div id="attribution" class="attribution"> |
258 <div i18n-content="attributionintro"></div> | 267 <div i18n-content="attributionintro"></div> |
259 <img id="attribution-img"> | 268 <img id="attribution-img"> |
260 </div> | 269 </div> |
261 | 270 |
262 </div> <!-- main --> | 271 </div> <!-- main --> |
263 | 272 |
264 <div id="themes-promo"> | 273 <div id="themes-promo"> |
265 <a i18n-values="href:themelink"> | 274 <a i18n-values="href:themelink"> |
266 <img src="ntp_themes_promo.png"> | 275 <img src="ntp_themes_promo.png"> |
267 </a> | 276 </a> |
268 </div> | 277 </div> |
269 | 278 |
270 <div class="window-menu" id="window-tooltip"></div> | 279 <div class="window-menu" id="window-tooltip"></div> |
271 | 280 |
272 </body> | 281 </body> |
273 <script src="i18n_template.js"></script> | 282 <script src="i18n_template.js"></script> |
274 <script src="local_strings.js"></script> | 283 <script src="local_strings.js"></script> |
275 <script src="new_new_tab.js"></script> | 284 <script src="new_new_tab.js"></script> |
276 </html> | 285 </html> |
OLD | NEW |