| OLD | NEW |
| 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 Loading... |
| 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.length > 0) { |
| 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' : 'textContent'] = warning.message; |
| 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 Loading... |
| 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 }); |
| OLD | NEW |