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

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

Issue 3156049: First set of changes for M7 NTP. (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: pre-review cleanup Created 10 years, 4 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/new_new_tab.js
diff --git a/chrome/browser/resources/new_new_tab.js b/chrome/browser/resources/new_new_tab.js
index b9404a670c000f6ad4b7b8c78b3d92e0e45fe041..c0f32bfa1dc006816abbd5af64522920124809d9 100644
--- a/chrome/browser/resources/new_new_tab.js
+++ b/chrome/browser/resources/new_new_tab.js
@@ -587,6 +587,9 @@ OptionMenu.prototype = {
}
};
+// TODO(aa): The 'clear-all-blacklisted' feature needs to move into a menu in
+// the most visited section.
+/*
var optionMenu = new OptionMenu($('option-button'), $('option-menu'));
optionMenu.commands = {
'clear-all-blacklisted' : function() {
@@ -604,10 +607,16 @@ optionMenu.commands = {
saveShownSections();
}
};
+*/
$('main').addEventListener('click', function(e) {
- if (e.target.tagName == 'H2') {
- var p = e.target.parentNode;
+ var p = e.target;
+ while (p && p.tagName != 'H2') {
+ p = p.parentNode;
+ }
+
+ if (p) {
+ p = p.parentNode;
var section = p.getAttribute('section');
if (section) {
if (shownSections & Section[section])
@@ -806,7 +815,8 @@ function callGetSyncMessageIfSyncIsPresent() {
}
function hideAllMenus() {
- optionMenu.hide();
+ // TODO(aa): See comment in definition of optionMenu.
+ //optionMenu.hide();
}
window.addEventListener('blur', hideAllMenus);

Powered by Google App Engine
This is Rietveld 408576698