diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-30 23:37:47 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-30 23:37:47 +0000 |
commit | 181b7765139f0a43afbfd19bb9f25b6bac3e92d6 (patch) | |
tree | 69102351d6261a0427ae34600ceda6383f528b73 /chrome/browser/resources/ntp/apps.js | |
parent | 8b78210f6a76367500196e78ab8d30cc475f4e81 (diff) | |
download | chromium_src-181b7765139f0a43afbfd19bb9f25b6bac3e92d6.zip chromium_src-181b7765139f0a43afbfd19bb9f25b6bac3e92d6.tar.gz chromium_src-181b7765139f0a43afbfd19bb9f25b6bac3e92d6.tar.bz2 |
Revert r61095 and r61128. I found several issues when testing
this and I don't feel comfortable leaving it on trunk while
they are ironed out.
The terminology in the code is a bit schizophrenic at the
moment, so for clarity:
open = big icons showing
closed = small icons showing
hidden = no icons showing (button in bottom of tab)
1. If the apps section is hidden and an app is installed, the
apps section comes back weirdly. The content is visible, but
the header is not and the menu along the bottom of the tab
is still there.
2. Sections' open state not persisted. If you click on a
header to make a section open, then refresh, that section is
closed again.
3. If you open the most visited section, then refresh, the
most visited section will look closed. But if you hover in
the empty area in the bottom of the tab, you will get
cursor changes and status bubbles. This is probably related
to 2, above.
These aren't that hard to fix probably, but there are a few
other high priority minor fixes I need to get in for m7,
and I'm afraid of this change conflicting with them for
merges. So I'm pulling this out until one of us has time to
get back to it.
TBR=thakis@chromium.org
BUG=55148
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61130 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources/ntp/apps.js')
-rw-r--r-- | chrome/browser/resources/ntp/apps.js | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/chrome/browser/resources/ntp/apps.js b/chrome/browser/resources/ntp/apps.js index 2117afe..68a1be6 100644 --- a/chrome/browser/resources/ntp/apps.js +++ b/chrome/browser/resources/ntp/apps.js @@ -10,7 +10,6 @@ function getAppsCallback(data) { appsSectionContent.textContent = ''; appsMiniview.textContent = ''; - clearClosedMenu(apps.menu); if (data.apps.length == 0) { appsSection.classList.add('disabled'); layoutSections(); @@ -23,14 +22,10 @@ function getAppsCallback(data) { data.apps.slice(0, MAX_MINIVIEW_ITEMS).forEach(function(app) { appsMiniview.appendChild(apps.createMiniviewElement(app)); - addClosedMenuEntryWithLink(apps.menu, apps.createClosedMenuElement(app)); }); - if (!(shownSections & MINIMIZED_APPS)) { - appsSection.classList.remove('disabled'); - } + appsSection.classList.remove('disabled'); } - addClosedMenuFooter(apps.menu, 'apps', MINIMIZED_APPS, Section.APPS); apps.loaded = true; maybeDoneLoading(); @@ -204,8 +199,6 @@ var apps = (function() { return { loaded: false, - menu: $('apps-menu'), - createElement: function(app) { var div = createElement(app); var a = div.firstChild; @@ -258,17 +251,6 @@ var apps = (function() { return span; }, - createClosedMenuElement: function(app) { - var a = document.createElement('a'); - a.setAttribute('app-id', app['id']); - a.textContent = app['name']; - a.href = app['launch_url']; - a.onclick = handleClick; - a.style.backgroundImage = url(app['icon_small']); - a.className = 'item'; - return a; - }, - createWebStoreElement: function() { return createElement({ 'id': 'web-store-entry', |