diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2016-02-09 17:18:07 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2016-02-10 08:40:45 +0100 |
commit | 75d552b29e572e1179a7f5767bd7dd7f7614de61 (patch) | |
tree | e5a632103b300d8225ca7a0ce40ad9822d0dad06 | |
parent | 65e1e4a202598c0ac6562dd15436aaf07ab9b902 (diff) | |
download | nextcloud-server-75d552b29e572e1179a7f5767bd7dd7f7614de61.tar.gz nextcloud-server-75d552b29e572e1179a7f5767bd7dd7f7614de61.zip |
Listen to the notification event to reload the file list
-rw-r--r-- | apps/files_sharing/js/external.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/apps/files_sharing/js/external.js b/apps/files_sharing/js/external.js index 45a6ef02758..0ca8213168e 100644 --- a/apps/files_sharing/js/external.js +++ b/apps/files_sharing/js/external.js @@ -69,9 +69,21 @@ filesApp: null, attach: function(filesApp) { + var self = this; this.filesApp = filesApp; this.processIncomingShareFromUrl(); - this.processSharesToConfirm(); + + if (!$('#header').find('div.notifications').length) { + // No notification app, display the modal + this.processSharesToConfirm(); + } + + $('body').on('OCA.Notification.Action', function(e) { + if (e.notification.app === 'files_sharing' && e.notification.object_type === 'remote_share' && e.action.type === 'POST') { + // User accepted a remote share reload + self.filesApp.fileList.reload(); + } + }); }, /** |