Home | History | Annotate | Download | only in ntp

Lines Matching full:apps

10   logEvent('received apps');
15 apps.showPromo = data.showPromo;
17 var appsSection = $('apps');
18 var appsSectionContent = $('apps-content');
20 var appsPromo = $('apps-promo');
21 var appsPromoLink = $('apps-promo-link');
22 var appsPromoPing = APP_LAUNCH_URL.PING_WEBSTORE + '+' + apps.showPromo;
28 $('apps-launch-type-window-menu-item').hidden = data.disableAppWindowLaunch;
31 $('apps-create-shortcut-command-menu-item').hidden =
32 $('apps-create-shortcut-command-separator').hidden =
41 data.apps.sort(function(a,b) {
47 apps.detachWebstoreEntry =
48 !apps.showPromo && data.apps.length >= MAX_APPS_PER_ROW[layoutMode];
50 markNewApps(data.apps);
51 apps.data = data.apps;
53 clearClosedMenu(apps.menu);
57 apps.loadedImages = 0;
58 apps.imageTimer = setTimeout(apps.showImages.bind(apps), 200);
60 data.apps.forEach(function(app) {
61 appsSectionContent.appendChild(apps.createElement(app));
66 $('apps-promo-heading').textContent = data.promoHeader;
70 $('apps-promo-hide').textContent = data.promoExpire;
73 document.documentElement.classList.add('apps-promo-visible');
75 document.documentElement.classList.remove('apps-promo-visible');
78 // Only show the web store entry if there are apps installed, since the promo
80 if (data.apps.length > 0) {
81 webStoreEntry = apps.createWebStoreElement();
84 if (apps.detachWebstoreEntry) {
88 apps.data.push('web-store-entry');
92 data.apps.slice(0, MAX_MINIVIEW_ITEMS).forEach(function(app) {
93 appsMiniview.appendChild(apps.createMiniviewElement(app));
94 addClosedMenuEntryWithLink(apps.menu, apps.createClosedMenuElement(app));
96 if (data.apps.length < MAX_MINIVIEW_ITEMS) {
97 webStoreMiniEntry = apps.createWebStoreMiniElement();
100 addClosedMenuEntryWithLink(apps.menu,
101 apps.createWebStoreClosedMenuElement());
105 hideSection(Section.APPS);
109 addClosedMenuFooter(apps.menu, 'apps', MENU_APPS, Section.APPS);
111 apps.loaded = true;
118 apps.layout({disableAnimations:true});
127 var oldData = apps.data;
143 data.apps.forEach(function(app) {
156 var apps = (function() {
193 !$('apps').classList.contains('disabled');
197 return node.id == 'apps-menu';
201 // We determine if the apps section is maximized, collapsed or in menu mode
202 // based on the class of the apps section.
203 if ($('apps').classList.contains('menu'))
205 else if ($('apps').classList.contains('collapsed'))
248 $('apps-launch-command').label = app['name'];
249 $('apps-options-command').canExecuteChange();
264 var launchTypeIds = ['apps-launch-type-pinned',
265 'apps-launch-type-regular',
266 'apps-launch-type-fullscreen',
267 'apps-launch-type-window'];
286 case 'apps-options-command':
289 case 'apps-launch-command':
292 case 'apps-uninstall-command':
295 case 'apps-create-shortcut-command':
298 case 'apps-launch-type-pinned':
299 case 'apps-launch-type-regular':
300 case 'apps-launch-type-fullscreen':
301 case 'apps-launch-type-window':
311 case 'apps-options-command':
314 case 'apps-launch-command':
317 case 'apps-uninstall-command':
335 menu: $('apps-menu'),
379 dragContainer: $('apps-content'),
487 var top = $('apps').getBoundingClientRect().bottom;
562 // Otherwise, the apps will be re-rendered while still transitioning.
580 logEvent('apps.layout: ' + (Date.now() - d0));
594 var apps = this.data || [];
595 var rects = this.getLayoutRects_(apps.length);
605 for (var i = 0; i < apps.length; i++) {
606 var app = appsContent.querySelector('[app-id='+apps[i]+']').parentNode;
616 // We need to set the container's height manually because the apps use
618 var rows = Math.ceil(apps.length / MAX_APPS_PER_ROW[layoutMode]);
676 $('apps-content').classList.add('visible');
695 // This will trigger the 'bounce' animation defined in apps.css.
780 var appDragAndDrop = new DragAndDropController(apps);