diff options
Diffstat (limited to 'ui/file_manager')
-rw-r--r-- | ui/file_manager/gallery/js/gallery.js | 34 |
1 files changed, 1 insertions, 33 deletions
diff --git a/ui/file_manager/gallery/js/gallery.js b/ui/file_manager/gallery/js/gallery.js index 2a65793..6e210f7 100644 --- a/ui/file_manager/gallery/js/gallery.js +++ b/ui/file_manager/gallery/js/gallery.js @@ -28,7 +28,6 @@ ContentProvider.WORKER_SCRIPT = '/js/metadata_worker.js'; function Gallery(volumeManager) { this.context_ = { appWindow: chrome.app.window.current(), - onBack: function() {}, onClose: function() { close(); }, onMaximize: function() { var appWindow = chrome.app.window.current(); @@ -130,7 +129,7 @@ Gallery.prototype.onExternallyUnmounted_ = function(event) { if (this.volumeManager_.getVolumeInfo(this.selectedEntry_) === event.volumeInfo) { - this.onBack_(); + close(); } }; @@ -161,11 +160,6 @@ Gallery.prototype.initDom_ = function() { this.header_ = util.createChild(this.container_, 'header tool dimmable'); this.toolbar_ = util.createChild(this.container_, 'toolbar tool dimmable'); - var backButton = util.createChild(this.container_, - 'back-button tool dimmable'); - util.createChild(backButton); - backButton.addEventListener('click', this.onBack_.bind(this)); - var preventDefault = function(event) { event.preventDefault(); }; var minimizeButton = util.createChild(this.header_, @@ -336,26 +330,6 @@ Gallery.prototype.load = function(entries, selectedEntries) { }; /** - * Closes the Gallery and go to Files.app. - * @private - */ -Gallery.prototype.back_ = function() { - if (util.isFullScreen(this.context_.appWindow)) { - util.toggleFullScreen(this.context_.appWindow, - false); // Leave the full screen mode. - } - this.context_.onBack(this.getSelectedEntries()); -}; - -/** - * Handles user's 'Back' action (Escape or a click on the X icon). - * @private - */ -Gallery.prototype.onBack_ = function() { - this.executeWhenReady(this.back_.bind(this)); -}; - -/** * Handles user's 'Close' action. * @private */ @@ -612,12 +586,6 @@ Gallery.prototype.onKeyDown_ = function(event) { event.preventDefault(); break; - case 'U+001B': // Escape - // Swallow Esc if it closed the Share menu, otherwise close the Gallery. - if (!wasSharing) - this.onBack_(); - break; - case 'U+004D': // 'm' switches between Slide and Mosaic mode. this.toggleMode_(null, event); break; |