diff options
Diffstat (limited to 'apps/files_sharing/src/sharebreadcrumbview.js')
-rw-r--r-- | apps/files_sharing/src/sharebreadcrumbview.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/apps/files_sharing/src/sharebreadcrumbview.js b/apps/files_sharing/src/sharebreadcrumbview.js index d3b56ff853a..dadc0a48fb8 100644 --- a/apps/files_sharing/src/sharebreadcrumbview.js +++ b/apps/files_sharing/src/sharebreadcrumbview.js @@ -23,10 +23,10 @@ (function() { 'use strict' - var BreadCrumbView = OC.Backbone.View.extend({ + const BreadCrumbView = OC.Backbone.View.extend({ tagName: 'span', events: { - click: '_onClick' + click: '_onClick', }, _dirInfo: undefined, @@ -34,7 +34,7 @@ this._dirInfo = data.dirInfo || null if (this._dirInfo !== null && (this._dirInfo.path !== '/' || this._dirInfo.name !== '')) { - var isShared = data.dirInfo && data.dirInfo.shareTypes && data.dirInfo.shareTypes.length > 0 + const isShared = data.dirInfo && data.dirInfo.shareTypes && data.dirInfo.shareTypes.length > 0 this.$el.removeClass('shared icon-public icon-shared') if (isShared) { this.$el.addClass('shared') @@ -58,18 +58,18 @@ _onClick: function(e) { e.preventDefault() - var fileInfoModel = new OCA.Files.FileInfoModel(this._dirInfo) - var self = this + const fileInfoModel = new OCA.Files.FileInfoModel(this._dirInfo) + const self = this fileInfoModel.on('change', function() { self.render({ - dirInfo: self._dirInfo + dirInfo: self._dirInfo, }) }) - var path = fileInfoModel.attributes.path + '/' + fileInfoModel.attributes.name + const path = fileInfoModel.attributes.path + '/' + fileInfoModel.attributes.name OCA.Files.Sidebar.open(path) OCA.Files.Sidebar.setActiveTab('sharing') - } + }, }) OCA.Sharing.ShareBreadCrumbView = BreadCrumbView |