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 18 matching lines...) Expand all Loading... |
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 $('apps-create-shortcut-command-separator').style.display = |
39 (data.disableCreateAppShortcut ? 'none' : 'inline'); | 39 (data.disableCreateAppShortcut ? 'none' : ''); |
40 | 40 |
41 appsMiniview.textContent = ''; | 41 appsMiniview.textContent = ''; |
42 appsSectionContent.textContent = ''; | 42 appsSectionContent.textContent = ''; |
43 | 43 |
44 data.apps.sort(function(a,b) { | 44 data.apps.sort(function(a,b) { |
45 return a.app_launch_index - b.app_launch_index; | 45 return a.app_launch_index - b.app_launch_index; |
46 }); | 46 }); |
47 | 47 |
48 clearClosedMenu(apps.menu); | 48 clearClosedMenu(apps.menu); |
49 data.apps.forEach(function(app) { | 49 data.apps.forEach(function(app) { |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 createWebStoreClosedMenuElement: function() { | 354 createWebStoreClosedMenuElement: function() { |
355 var a = document.createElement('a'); | 355 var a = document.createElement('a'); |
356 a.textContent = localStrings.getString('web_store_title'); | 356 a.textContent = localStrings.getString('web_store_title'); |
357 a.href = localStrings.getString('web_store_url'); | 357 a.href = localStrings.getString('web_store_url'); |
358 a.style.backgroundImage = url('chrome://theme/IDR_PRODUCT_LOGO_16'); | 358 a.style.backgroundImage = url('chrome://theme/IDR_PRODUCT_LOGO_16'); |
359 a.className = 'item'; | 359 a.className = 'item'; |
360 return a; | 360 return a; |
361 } | 361 } |
362 }; | 362 }; |
363 })(); | 363 })(); |
OLD | NEW |