Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(555)

Side by Side Diff: chrome/browser/resources/apps_debugger/js/items_list.js

Issue 22191003: [Apps Developer Tool] Show installation warnings as chrome://extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 cr.define('apps_dev_tool', function() { 5 cr.define('apps_dev_tool', function() {
6 'use strict'; 6 'use strict';
7 7
8 // The list of all packed/unpacked apps and extensions. 8 // The list of all packed/unpacked apps and extensions.
9 var completeList = []; 9 var completeList = [];
10 10
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 loadPath.hidden = false; 273 loadPath.hidden = false;
274 loadPath.querySelector('span:nth-of-type(2)').textContent = 274 loadPath.querySelector('span:nth-of-type(2)').textContent =
275 ' ' + item.path; 275 ' ' + item.path;
276 this.setPackButton_(item, node); 276 this.setPackButton_(item, node);
277 } 277 }
278 278
279 // Then the 'managed, cannot uninstall/disable' message. 279 // Then the 'managed, cannot uninstall/disable' message.
280 if (!item.may_disable) 280 if (!item.may_disable)
281 node.querySelector('.managed-message').hidden = false; 281 node.querySelector('.managed-message').hidden = false;
282 282
283 // The install warnings.
284 if (item.install_warnings) {
285 var panel = node.querySelector('.install-warnings');
286 panel.hidden = false;
287 var list = panel.querySelector('ul');
288 item.install_warnings.forEach(function(warning) {
289 var li = document.createElement('li');
290 li[warning.isHTML ? 'innerHTML' : 'innerText'] = warning.message;
Nikita (slow) 2013/08/05 22:26:40 nit: Please use textContent instead of innerText.
zhchbin 2013/08/06 02:05:43 Done. The C++ side struct: InstallWarning[0] supp
291 list.appendChild(li);
292 });
293 }
294
283 this.setActiveViews_(item, node); 295 this.setActiveViews_(item, node);
284 296
285 return node; 297 return node;
286 }, 298 },
287 299
288 /** 300 /**
289 * Sets the webstore link. 301 * Sets the webstore link.
290 * @param {!Object} item A dictionary of item metadata. 302 * @param {!Object} item A dictionary of item metadata.
291 * @param {!HTMLElement} el HTML element containing all items. 303 * @param {!HTMLElement} el HTML element containing all items.
292 * @private 304 * @private
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 // node. 597 // node.
586 container.scrollTop = node.offsetTop + node.offsetHeight - 598 container.scrollTop = node.offsetTop + node.offsetHeight -
587 container.offsetHeight + 20; 599 container.offsetHeight + 20;
588 } 600 }
589 }; 601 };
590 602
591 return { 603 return {
592 ItemsList: ItemsList, 604 ItemsList: ItemsList,
593 }; 605 };
594 }); 606 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698