diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/js/filelist.js | 11 | ||||
-rw-r--r-- | apps/files_sharing/js/sharebreadcrumbview.js | 12 |
2 files changed, 19 insertions, 4 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 8d0e492643f..5bdb1a8999d 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -518,13 +518,16 @@ OC.Apps.showAppSidebar(this._detailsView.$el); } - var $tr = this.findFileEl(fileName); - var model = this.getModelForFile($tr); + if (_.isObject(fileName)) { + var model = new OCA.Files.FileInfoModel(fileName); + } else { + var $tr = this.findFileEl(fileName); + var model = this.getModelForFile($tr); + $tr.addClass('highlighted'); + } this._currentFileModel = model; - $tr.addClass('highlighted'); - this._detailsView.setFileInfo(model); this._detailsView.$el.scrollTop(0); }, diff --git a/apps/files_sharing/js/sharebreadcrumbview.js b/apps/files_sharing/js/sharebreadcrumbview.js index c469fd252aa..7e659768304 100644 --- a/apps/files_sharing/js/sharebreadcrumbview.js +++ b/apps/files_sharing/js/sharebreadcrumbview.js @@ -33,6 +33,10 @@ var BreadCrumbView = OC.Backbone.View.extend({ tagName: 'span', + events: { + click: '_onClick' + }, + _dirInfo: undefined, _template: undefined, template: function(data) { if (!this._template) { @@ -41,13 +45,21 @@ return this._template(data); }, render: function(data) { + this._dirInfo = data.dirInfo; + var isShared = data.dirInfo && data.dirInfo.shareTypes && data.dirInfo.shareTypes.length > 0; this.$el.html(this.template({ isShared: isShared })); + this.delegateEvents(); return this; + }, + _onClick: function(e) { + e.preventDefault(); + + OCA.Files.App.fileList.showDetailsView(this._dirInfo, 'shareTabView'); } }); |