From 97b5fe0b1e7ece1c402f9226f13a6e9d711055cf Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Tue, 11 Aug 2015 22:36:28 +0200 Subject: switch to async item loading, take care stuff is updated subsequently --- core/js/sharedialogview.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'core/js/sharedialogview.js') diff --git a/core/js/sharedialogview.js b/core/js/sharedialogview.js index 38b98a218aa..3c12bedca86 100644 --- a/core/js/sharedialogview.js +++ b/core/js/sharedialogview.js @@ -76,10 +76,22 @@ /** @type {string} **/ tagName: 'div', + initialize: function() { + 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.')); + }); + }, + render: function() { var baseTemplate = this._getTemplate('base', TEMPLATE_BASE); this.$el.html(baseTemplate({ + shareLabel: t('core', 'Share'), resharerInfo: this._renderResharerInfo(), sharePlaceholder: this._renderSharePlaceholderPart(), -- cgit v1.2.3