OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 function getAppsCallback(data) { | 5 function getAppsCallback(data) { |
6 logEvent('received apps'); | 6 logEvent('received apps'); |
7 var appsSection = $('apps'); | 7 var appsSection = $('apps'); |
8 var appsSectionContent = $('apps-maxiview'); | 8 var appsSectionContent = $('apps-maxiview'); |
9 var appsMiniview = appsSection.getElementsByClassName('miniview')[0]; | 9 var appsMiniview = appsSection.getElementsByClassName('miniview')[0]; |
10 appsSectionContent.textContent = ''; | 10 appsSectionContent.textContent = ''; |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 }, 500); | 221 }, 500); |
222 div.addEventListener('webkitAnimationEnd', function(e) { | 222 div.addEventListener('webkitAnimationEnd', function(e) { |
223 div.removeAttribute('new'); | 223 div.removeAttribute('new'); |
224 | 224 |
225 // If we get new data (eg because something installs in another tab, | 225 // If we get new data (eg because something installs in another tab, |
226 // or because we uninstall something here), don't run the install | 226 // or because we uninstall something here), don't run the install |
227 // animation again. | 227 // animation again. |
228 document.documentElement.setAttribute("install-animation-enabled", | 228 document.documentElement.setAttribute("install-animation-enabled", |
229 "false"); | 229 "false"); |
230 }); | 230 }); |
231 if ($('apps').classList.contains('hidden') && | 231 |
232 !(shownSections & MINIMIZED_APPS)) | 232 // Make sure apps is de-minimized... |
| 233 setSectionVisible('apps', Section.APPS, true, MINIMIZED_APPS); |
| 234 |
| 235 // ...and expanded. |
| 236 if ($('apps').classList.contains('hidden')) |
233 toggleSectionVisibilityAndAnimate('APPS'); | 237 toggleSectionVisibilityAndAnimate('APPS'); |
234 } | 238 } |
235 | 239 |
236 var settingsButton = div.appendChild(new cr.ui.ContextMenuButton); | 240 var settingsButton = div.appendChild(new cr.ui.ContextMenuButton); |
237 settingsButton.className = 'app-settings'; | 241 settingsButton.className = 'app-settings'; |
238 settingsButton.title = localStrings.getString('appsettings'); | 242 settingsButton.title = localStrings.getString('appsettings'); |
239 | 243 |
240 addContextMenu(div, app); | 244 addContextMenu(div, app); |
241 | 245 |
242 return div; | 246 return div; |
(...skipping 29 matching lines...) Expand all Loading... |
272 | 276 |
273 createWebStoreElement: function() { | 277 createWebStoreElement: function() { |
274 return createElement({ | 278 return createElement({ |
275 'id': 'web-store-entry', | 279 'id': 'web-store-entry', |
276 'name': localStrings.getString('web_store_title'), | 280 'name': localStrings.getString('web_store_title'), |
277 'launch_url': localStrings.getString('web_store_url') | 281 'launch_url': localStrings.getString('web_store_url') |
278 }); | 282 }); |
279 } | 283 } |
280 }; | 284 }; |
281 })(); | 285 })(); |
OLD | NEW |