diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-26 05:29:54 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-26 05:29:54 +0000 |
commit | a616d400611c859af00c4f2986f326959ef4b6e4 (patch) | |
tree | db7d11eed8295d6e680e83eb1b18ab37f0280edf /chrome/browser/resources/new_new_tab.js | |
parent | 1b8740fcc945425012ecc755987286dd22a098f6 (diff) | |
download | chromium_src-a616d400611c859af00c4f2986f326959ef4b6e4.zip chromium_src-a616d400611c859af00c4f2986f326959ef4b6e4.tar.gz chromium_src-a616d400611c859af00c4f2986f326959ef4b6e4.tar.bz2 |
First set of changes for M7 NTP.
This doesn't do any behavior changes -- it just implements
the styling. So we still have multi expand, and the recently
closed section is still toggleable.
I also didn't make the changes to the placement or text of
the web store icon. I will make those separately.
Screen caps:
http://aaronboodman.com/z_dropbox/cr3156049/
BUG=53248
Review URL: http://codereview.chromium.org/3156049
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57473 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources/new_new_tab.js')
-rw-r--r-- | chrome/browser/resources/new_new_tab.js | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/chrome/browser/resources/new_new_tab.js b/chrome/browser/resources/new_new_tab.js index b9404a6..c0f32bf 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); |