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

Unified Diff: chrome/browser/resources/new_new_tab.html

Issue 337011: NTP: Allow hiding tips and bookmark sync.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « chrome/browser/resources/new_new_tab.css ('k') | chrome/browser/resources/new_new_tab.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/new_new_tab.html
===================================================================
--- chrome/browser/resources/new_new_tab.html (revision 30053)
+++ chrome/browser/resources/new_new_tab.html (working copy)
@@ -66,7 +66,9 @@
var Section = {
THUMB: 1,
LIST: 2,
- RECENT: 4
+ RECENT: 4,
+ TIPS: 8,
+ SYNC: 16
};
var shownSections = templateData['shown_sections'];
@@ -160,6 +162,10 @@
}
}
+function updateSimpleSection(id, section) {
+ $(id).style.display = shownSections & section ? '' : 'none';
+}
+
</script>
</head>
<body class="loading"
@@ -178,6 +184,9 @@
<div id="option-menu" class="window-menu">
<div command="hide" section="THUMB" i18n-content="mostvisited"></div>
<div command="hide" section="RECENT" i18n-content="recentlyclosed"></div>
+ <div command="hide" section="TIPS" i18n-content="tips"></div>
+ <div command="hide" section="SYNC" i18n-content="sync"
+ id="sync-menu-item"></div>
<hr>
<div command="clear-all-blacklisted"
i18n-content="restorethumbnails"></div>
@@ -186,6 +195,8 @@
<script>
$('thumb-checkbox').checked = shownSections & Section.THUMB;
$('list-checkbox').checked = shownSections & Section.LIST;
+ $('sync-menu-item').style.display =
+ templateData['syncispresent'] == 'true' ? '' : 'none';
</script>
<div id="notification">
@@ -235,16 +246,13 @@
i18n-content="viewfullhistory"></a>
</span>
</div>
- <script>
- if (!(shownSections & Section.RECENT)) {
- $('recently-closed').className = 'collapsed';
- }
- </script>
+ <script>updateSimpleSection('recently-closed', Section.RECENT);</script>
<div id="sync-status">
<h2></h2>
<span></span>
</div>
+ <script>updateSimpleSection('sync-status', Section.SYNC);</script>
<div id="set-as-homepage">
<button class="link">
@@ -253,6 +261,7 @@
</div>
<div id="tip-line"></div>
+ <script>updateSimpleSection('tip-line', Section.TIPS);</script>
<div id="attribution" class="attribution">
<div i18n-content="attributionintro"></div>
« no previous file with comments | « chrome/browser/resources/new_new_tab.css ('k') | chrome/browser/resources/new_new_tab.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698