diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2015-09-12 14:21:14 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-09-16 07:23:27 +0200 |
commit | f29b51682bc0be785e1a3e4e5901db3255e4a377 (patch) | |
tree | 93375423f13d63a4ca97cc800b8fb981d48432f5 /core/js/sharedialogview.js | |
parent | 4c702aa8fdfb28bea4b021e55e7df5eeeb6999d2 (diff) | |
download | nextcloud-server-f29b51682bc0be785e1a3e4e5901db3255e4a377.tar.gz nextcloud-server-f29b51682bc0be785e1a3e4e5901db3255e4a377.zip |
share and unshare via link (not yet password). also some internal changes to reduce unnecessary rendering
Diffstat (limited to 'core/js/sharedialogview.js')
-rw-r--r-- | core/js/sharedialogview.js | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/core/js/sharedialogview.js b/core/js/sharedialogview.js index 6588da7d429..7a7fe692c13 100644 --- a/core/js/sharedialogview.js +++ b/core/js/sharedialogview.js @@ -68,9 +68,6 @@ initialize: function(options) { var view = this; - this.model.on('change', function() { - view.render(); - }); this.model.on('fetchError', function() { OC.Notification.showTemporary(t('core', 'Share details could not be loaded for this item.')); @@ -82,6 +79,10 @@ throw 'missing OC.Share.ShareConfigModel'; } + this.configModel.on('change:isRemoteShareAllowed', function() { + view.render(); + }); + var subViewOptions = { model: this.model, configModel: this.configModel @@ -188,17 +189,6 @@ this.shareeListView.render(); this.$el.find('.hasTooltip').tooltip(); - if(this.configModel.areAvatarsEnabled()) { - this.$el.find('.avatar').each(function() { - var $this = $(this); - $this.avatar($this.data('username'), 32); - }); - this.$el.find('.avatar.imageplaceholderseed').each(function() { - var $this = $(this); - $this.imageplaceholder($this.data('seed')); - }); - } - this.$el.find('.datepicker').datepicker({dateFormat : 'dd-mm-yy'}); return this; }, @@ -216,7 +206,7 @@ _renderRemoteShareInfoPart: function() { var remoteShareInfo = ''; - if(this.configModel.isRemoteShareAllowed()) { + if(this.configModel.get('isRemoteShareAllowed')) { var infoTemplate = this._getRemoteShareInfoTemplate(); remoteShareInfo = infoTemplate({ docLink: this.configModel.getFederatedShareDocLink(), @@ -229,7 +219,7 @@ _renderSharePlaceholderPart: function () { var sharePlaceholder = t('core', 'Share with users or groups …'); - if (this.configModel.isRemoteShareAllowed()) { + if (this.configModel.get('isRemoteShareAllowed')) { sharePlaceholder = t('core', 'Share with users, groups or remote users …'); } return sharePlaceholder; |