From ff614a7dbde66a9cd795a674d0e0635b6f32e3a5 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Wed, 15 Jul 2015 17:05:25 +0200 Subject: More fixes to the right sidebar Sidebar now works in all file list views. Moved owner to share tab. --- apps/files/js/detailsview.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'apps/files/js/detailsview.js') diff --git a/apps/files/js/detailsview.js b/apps/files/js/detailsview.js index 719299485a6..d69d8c09c16 100644 --- a/apps/files/js/detailsview.js +++ b/apps/files/js/detailsview.js @@ -18,6 +18,7 @@ ' ' + ' ' + + ' ' + ''; var TEMPLATE_TAB_HEADER = @@ -72,10 +73,16 @@ * Initialize the details view */ initialize: function() { + var self = this; this.$el = $('
'); this.fileInfo = null; this._tabViews = []; this._detailFileInfoViews = []; + + this.$el.on('click', 'a.close', function(event) { + self.$el.addClass('disappear'); + event.preventDefault(); + }); }, /** @@ -102,7 +109,9 @@ this._templateTabHeader = Handlebars.compile(TEMPLATE_TAB_HEADER); } - var $el = $(this._template()); + var $el = $(this._template({ + closeLabel: t('files', 'Close') + })); var $tabsContainer = $el.find('.tabsContainer'); var $tabHeadsContainer = $el.find('.tabHeadsContainer'); var $detailsContainer = $el.find('.detailFileInfoContainer'); @@ -144,6 +153,8 @@ setFileInfo: function(fileInfo) { this._fileInfo = fileInfo; + this.render(); + // notify all panels _.each(this._tabViews, function(tabView) { tabView.setFileInfo(fileInfo); -- cgit v1.2.3