Chromium Code Reviews| 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 28565609590af3e6b4d2e2d6dc93971bc757c2af..d8fb42c2bde358c55adb67ddfd4411878aea2912 100644 |
| --- a/chrome/browser/resources/apps_debugger/js/items.js |
| +++ b/chrome/browser/resources/apps_debugger/js/items.js |
| @@ -117,14 +117,17 @@ 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 = apps_dev_tool.PackItemOverlay.getInstance(); |
| + packItemOverlay.initializePage(); |
|
Dan Beam
2013/02/14 21:10:40
nit:
apps_dev_tool.PackItemOverlay.getInstance()
Gaurav
2013/02/15 17:54:24
Done.
|
| }, |
| - /** |
| - * 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 +136,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,7 +159,7 @@ AppsDevTool.prototype = { |
| * @return {Element} The overlay element. |
| */ |
| AppsDevTool.getCurrentOverlay = function() { |
| - return this.ownerDocument.querySelector('#overlay .page.showing'); |
| + return document.querySelector('#overlay .page.showing'); |
| }; |
| /** |