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 var MAX_APPS_PER_ROW = []; | 5 var MAX_APPS_PER_ROW = []; |
6 MAX_APPS_PER_ROW[LayoutMode.SMALL] = 4; | 6 MAX_APPS_PER_ROW[LayoutMode.SMALL] = 4; |
7 MAX_APPS_PER_ROW[LayoutMode.NORMAL] = 6; | 7 MAX_APPS_PER_ROW[LayoutMode.NORMAL] = 6; |
8 | 8 |
9 function getAppsCallback(data) { | 9 function getAppsCallback(data) { |
10 logEvent('received apps'); | 10 logEvent('received apps'); |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 }, 500); | 245 }, 500); |
246 div.addEventListener('webkitAnimationEnd', function(e) { | 246 div.addEventListener('webkitAnimationEnd', function(e) { |
247 div.removeAttribute('new'); | 247 div.removeAttribute('new'); |
248 | 248 |
249 // If we get new data (eg because something installs in another tab, | 249 // If we get new data (eg because something installs in another tab, |
250 // or because we uninstall something here), don't run the install | 250 // or because we uninstall something here), don't run the install |
251 // animation again. | 251 // animation again. |
252 document.documentElement.setAttribute("install-animation-enabled", | 252 document.documentElement.setAttribute("install-animation-enabled", |
253 "false"); | 253 "false"); |
254 }); | 254 }); |
255 | |
256 // Make sure apps is de-minimized... | |
257 setSectionVisible('apps', Section.APPS, true, MINIMIZED_APPS); | |
258 | |
259 // ...and expanded. | |
260 if ($('apps').classList.contains('hidden')) | |
261 toggleSectionVisibilityAndAnimate('APPS'); | |
262 } | 255 } |
263 | 256 |
264 var settingsButton = div.appendChild(new cr.ui.ContextMenuButton); | 257 var settingsButton = div.appendChild(new cr.ui.ContextMenuButton); |
265 settingsButton.className = 'app-settings'; | 258 settingsButton.className = 'app-settings'; |
266 settingsButton.title = localStrings.getString('appsettings'); | 259 settingsButton.title = localStrings.getString('appsettings'); |
267 | 260 |
268 addContextMenu(div, app); | 261 addContextMenu(div, app); |
269 | 262 |
270 return div; | 263 return div; |
271 }, | 264 }, |
(...skipping 30 matching lines...) Expand all Loading... |
302 var elm = createElement({ | 295 var elm = createElement({ |
303 'id': 'web-store-entry', | 296 'id': 'web-store-entry', |
304 'name': localStrings.getString('web_store_title'), | 297 'name': localStrings.getString('web_store_title'), |
305 'launch_url': localStrings.getString('web_store_url') | 298 'launch_url': localStrings.getString('web_store_url') |
306 }); | 299 }); |
307 elm.setAttribute('app-id', 'web-store-entry'); | 300 elm.setAttribute('app-id', 'web-store-entry'); |
308 return elm; | 301 return elm; |
309 } | 302 } |
310 }; | 303 }; |
311 })(); | 304 })(); |
OLD | NEW |