| Index: chrome/browser/resources/apps_debugger/js/items.js
|
| diff --git a/chrome/browser/resources/apps_debugger/js/items.js b/chrome/browser/resources/apps_debugger/js/items.js
|
| index f1cb27e8a1ff93f1b0e158706a5c8e21b0d3487e..2465d0a219a666ba84ecccb741d6e9b7c03a59d5 100644
|
| --- a/chrome/browser/resources/apps_debugger/js/items.js
|
| +++ b/chrome/browser/resources/apps_debugger/js/items.js
|
| @@ -117,14 +117,18 @@ AppsDevTool.prototype = {
|
| // Set up the three buttons (load unpacked, pack and update).
|
| $('load-unpacked').addEventListener('click',
|
| this.handleLoadUnpackedItem_.bind(this));
|
| + $('pack-item').addEventListener('click',
|
| + this.handlePackItem_.bind(this));
|
| $('update-items-now').addEventListener('click',
|
| this.handleUpdateItemNow_.bind(this));
|
|
|
| + var packItemOverlay = appsDevtool.PackItemOverlay.getInstance();
|
| + packItemOverlay.initializePage();
|
| +
|
| },
|
|
|
| - /**
|
| - * Handles the Load Unpacked Extension button.
|
| - * @param {!Event} e Change event.
|
| + /** Handles the Load Unpacked Extension button.
|
| + * @param {Event} e Change event.
|
| * @private
|
| */
|
| handleLoadUnpackedItem_: function(e) {
|
| @@ -133,6 +137,14 @@ AppsDevTool.prototype = {
|
| });
|
| },
|
|
|
| + /** Handles the Pack Extension button.
|
| + * @param {Event} e Change event.
|
| + * @private
|
| + */
|
| + handlePackItem_: function(e) {
|
| + AppsDevTool.showOverlay($('packItemOverlay'));
|
| + },
|
| +
|
| /**
|
| * Handles the Update Extension Now Button.
|
| * @param {Event} e Change event.
|
| @@ -148,13 +160,14 @@ AppsDevTool.prototype = {
|
| * @return {Element} The overlay element.
|
| */
|
| AppsDevTool.getCurrentOverlay = function() {
|
| - return this.ownerDocument.querySelector('#overlay .page.showing');
|
| + return document.querySelector('#overlay .page.showing');
|
| };
|
|
|
| /**
|
| - * Shows |node|. If there's another overlay showing, hide it.
|
| + * Sets the given overlay to show. This hides whatever overlay is currently
|
| + * showing, if any.
|
| * @param {HTMLElement} node The overlay page to show. If falsey, all overlays
|
| - * are hidden.
|
| + * are hidden.
|
| */
|
| AppsDevTool.showOverlay = function(node) {
|
| var currentlyShowingOverlay = AppsDevTool.getCurrentOverlay();
|
|
|