summaryrefslogtreecommitdiffstats
path: root/apps/files/js/detailsview.js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-07-15 17:05:25 +0200
committerArthur Schiwon <blizzz@owncloud.com>2015-08-07 01:22:43 +0200
commitff614a7dbde66a9cd795a674d0e0635b6f32e3a5 (patch)
treeeacc5ea87cc99668d07c390228347c79ad523be6 /apps/files/js/detailsview.js
parent12e5f310ddb784c0ed1248020b770d93040918da (diff)
downloadnextcloud-server-ff614a7dbde66a9cd795a674d0e0635b6f32e3a5.tar.gz
nextcloud-server-ff614a7dbde66a9cd795a674d0e0635b6f32e3a5.zip
More fixes to the right sidebar
Sidebar now works in all file list views. Moved owner to share tab.
Diffstat (limited to 'apps/files/js/detailsview.js')
-rw-r--r--apps/files/js/detailsview.js13
1 files changed, 12 insertions, 1 deletions
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 @@
' <ul class="tabHeadsContainer">' +
' </ul>' +
' </div>' +
+ ' <a class="close icon-close" href="#" alt="{{closeLabel}}"></a>' +
'</div>';
var TEMPLATE_TAB_HEADER =
@@ -72,10 +73,16 @@
* Initialize the details view
*/
initialize: function() {
+ var self = this;
this.$el = $('<div class="detailsView"></div>');
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);