summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/js/sharetabview.js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-09-14 17:20:51 +0200
committerVincent Petry <pvince81@owncloud.com>2015-09-16 07:23:28 +0200
commite90065881d47a64b6c376208ece208932711c765 (patch)
tree7bbd578263150f5d64f11fdc74da6bb838763c0c /apps/files_sharing/js/sharetabview.js
parent8194d092e71b1c44a441dddc64b7e7533adbbfb9 (diff)
downloadnextcloud-server-e90065881d47a64b6c376208ece208932711c765.tar.gz
nextcloud-server-e90065881d47a64b6c376208ece208932711c765.zip
Bring back the share icon and update its status
Display share icon in file list row. Update share icon status when the sharing state changed.
Diffstat (limited to 'apps/files_sharing/js/sharetabview.js')
-rw-r--r--apps/files_sharing/js/sharetabview.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/files_sharing/js/sharetabview.js b/apps/files_sharing/js/sharetabview.js
index 9f6c71d1924..1ad17365957 100644
--- a/apps/files_sharing/js/sharetabview.js
+++ b/apps/files_sharing/js/sharetabview.js
@@ -38,8 +38,10 @@
* Renders this details view
*/
render: function() {
+ var self = this;
if (this._dialog) {
// remove/destroy older instance
+ this._dialog.model.off();
this._dialog.remove();
this._dialog = null;
}
@@ -69,7 +71,10 @@
});
this.$el.find('.dialogContainer').append(this._dialog.$el);
this._dialog.render();
- shareModel.fetch();
+ this._dialog.model.fetch();
+ this._dialog.model.on('change', function() {
+ self.trigger('sharesChanged', shareModel);
+ });
} else {
this.$el.empty();
// TODO: render placeholder text?