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 // The URL prefix used in the app link 'ping' attributes. | 9 // The URL prefix used in the app link 'ping' attributes. |
10 var PING_APP_LAUNCH_PREFIX = 'record-app-launch'; | 10 var PING_APP_LAUNCH_PREFIX = 'record-app-launch'; |
(...skipping 17 matching lines...) Expand all Loading... | |
28 var webStoreEntry, webStoreMiniEntry; | 28 var webStoreEntry, webStoreMiniEntry; |
29 | 29 |
30 // Hide menu options that are not supported on the OS or windowing system. | 30 // Hide menu options that are not supported on the OS or windowing system. |
31 | 31 |
32 // The "Launch as Window" menu option. | 32 // The "Launch as Window" menu option. |
33 $('apps-launch-type-window-menu-item').style.display = | 33 $('apps-launch-type-window-menu-item').style.display = |
34 (data.disableAppWindowLaunch ? 'none' : 'inline'); | 34 (data.disableAppWindowLaunch ? 'none' : 'inline'); |
35 | 35 |
36 // The "Create App Shortcut" menu option. | 36 // The "Create App Shortcut" menu option. |
37 $('apps-create-shortcut-command-menu-item').style.display = | 37 $('apps-create-shortcut-command-menu-item').style.display = |
38 $('apps-create-shortcut-command-separator').style.display = | |
38 (data.disableCreateAppShortcut ? 'none' : 'inline'); | 39 (data.disableCreateAppShortcut ? 'none' : 'inline'); |
arv (Not doing code reviews)
2010/12/20 19:01:08
This looks wrong. The display of these should neve
kochi
2010/12/21 06:09:33
Good catch!
I created a follow-up CL at
http://cod
| |
39 | 40 |
40 appsMiniview.textContent = ''; | 41 appsMiniview.textContent = ''; |
41 appsSectionContent.textContent = ''; | 42 appsSectionContent.textContent = ''; |
42 | 43 |
43 data.apps.sort(function(a,b) { | 44 data.apps.sort(function(a,b) { |
44 return a.app_launch_index - b.app_launch_index; | 45 return a.app_launch_index - b.app_launch_index; |
45 }); | 46 }); |
46 | 47 |
47 clearClosedMenu(apps.menu); | 48 clearClosedMenu(apps.menu); |
48 data.apps.forEach(function(app) { | 49 data.apps.forEach(function(app) { |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
351 createWebStoreClosedMenuElement: function() { | 352 createWebStoreClosedMenuElement: function() { |
352 var a = document.createElement('a'); | 353 var a = document.createElement('a'); |
353 a.textContent = localStrings.getString('web_store_title'); | 354 a.textContent = localStrings.getString('web_store_title'); |
354 a.href = localStrings.getString('web_store_url'); | 355 a.href = localStrings.getString('web_store_url'); |
355 a.style.backgroundImage = url('chrome://theme/IDR_PRODUCT_LOGO_16'); | 356 a.style.backgroundImage = url('chrome://theme/IDR_PRODUCT_LOGO_16'); |
356 a.className = 'item'; | 357 a.className = 'item'; |
357 return a; | 358 return a; |
358 } | 359 } |
359 }; | 360 }; |
360 })(); | 361 })(); |
OLD | NEW |