diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-07-15 17:05:25 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2015-08-07 01:22:43 +0200 |
commit | ff614a7dbde66a9cd795a674d0e0635b6f32e3a5 (patch) | |
tree | eacc5ea87cc99668d07c390228347c79ad523be6 /apps/files_sharing | |
parent | 12e5f310ddb784c0ed1248020b770d93040918da (diff) | |
download | nextcloud-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_sharing')
-rw-r--r-- | apps/files_sharing/js/share.js | 3 | ||||
-rw-r--r-- | apps/files_sharing/js/sharedetailview.js | 63 | ||||
-rw-r--r-- | apps/files_sharing/js/sharetabview.js | 6 |
3 files changed, 4 insertions, 68 deletions
diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js index 227eec79578..12bec0e8c9a 100644 --- a/apps/files_sharing/js/share.js +++ b/apps/files_sharing/js/share.js @@ -144,9 +144,6 @@ OC.addScript('files_sharing', 'sharetabview').done(function() { fileList.registerTabView(new OCA.Sharing.ShareTabView('shareTabView')); }); - OC.addScript('files_sharing', 'sharedetailview').done(function() { - fileList.registerDetailView(new OCA.Sharing.ShareDetailView()); - }); }, /** diff --git a/apps/files_sharing/js/sharedetailview.js b/apps/files_sharing/js/sharedetailview.js deleted file mode 100644 index a18a6d19d15..00000000000 --- a/apps/files_sharing/js/sharedetailview.js +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2015 - * - * This file is licensed under the Affero General Public License version 3 - * or later. - * - * See the COPYING-README file. - * - */ - -(function() { - var TEMPLATE = - '<ul class="shareDetailList">' + - ' <li>Owner: {{owner}}</li>' + - '</ul>'; - - /** - * @class OCA.Files.MainFileInfoDetailView - * @classdesc - * - * Displays main details about a file - * - */ - var ShareDetailView = function() { - this.initialize(); - }; - /** - * @memberof OCA.Sharing - */ - ShareDetailView.prototype = _.extend({}, OCA.Files.DetailFileInfoView.prototype, - /** @lends OCA.Sharing.ShareDetailView.prototype */ { - _template: null, - - /** - * Initialize the details view - */ - initialize: function() { - this.$el = $('<div class="shareDetailView"></div>'); - }, - - /** - * Renders this details view - */ - render: function() { - this.$el.empty(); - - if (!this._template) { - this._template = Handlebars.compile(TEMPLATE); - } - - if (this._fileInfo) { - this.$el.append(this._template({ - owner: this._fileInfo.shareOwner || OC.currentUser - })); - } else { - // TODO: render placeholder text? - } - } - }); - - OCA.Sharing.ShareDetailView = ShareDetailView; -})(); - diff --git a/apps/files_sharing/js/sharetabview.js b/apps/files_sharing/js/sharetabview.js index 48dfcae16d8..42bddc20b3c 100644 --- a/apps/files_sharing/js/sharetabview.js +++ b/apps/files_sharing/js/sharetabview.js @@ -10,7 +10,7 @@ (function() { var TEMPLATE = - '<div>TODO: here comes the share dialog</div>'; + '<div>Owner: {{owner}}'; /** * @class OCA.Sharing.ShareTabView @@ -52,7 +52,9 @@ } if (this._fileInfo) { - this.$el.append(this._template()); + this.$el.append(this._template({ + owner: this._fileInfo.shareOwner || OC.currentUser + })); } else { // TODO: render placeholder text? } |