diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-09-14 18:03:44 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-09-16 07:23:29 +0200 |
commit | aeee19b3f24eb60252ba55b89be745027ed39faf (patch) | |
tree | 0a6b14dec787b7cd6edf4c3a7b4001ede063e560 /core/js/sharedialogshareelistview.js | |
parent | e0a2004f4ca647f7d20ec885045ec9e2e899ea03 (diff) | |
download | nextcloud-server-aeee19b3f24eb60252ba55b89be745027ed39faf.tar.gz nextcloud-server-aeee19b3f24eb60252ba55b89be745027ed39faf.zip |
Implement "notify by email" checkbox in share dialog
Diffstat (limited to 'core/js/sharedialogshareelistview.js')
-rw-r--r-- | core/js/sharedialogshareelistview.js | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/core/js/sharedialogshareelistview.js b/core/js/sharedialogshareelistview.js index 8f68231398e..463d2468bbd 100644 --- a/core/js/sharedialogshareelistview.js +++ b/core/js/sharedialogshareelistview.js @@ -84,7 +84,8 @@ events: { 'click .unshare': 'onUnshare', 'click .permissions': 'onPermissionChange', - 'click .showCruds': 'onCrudsToggle' + 'click .showCruds': 'onCrudsToggle', + 'click .mailNotification': 'onSendMailNotification' }, initialize: function(options) { @@ -279,11 +280,19 @@ this.model.setPermissions(shareType, shareWith, permissions); }, - onCrudsToggle: function(event) { + onCrudsToggle: function() { this.$el.find('.cruds').toggleClass('hidden'); return false; - } + }, + + onSendMailNotification: function(event) { + var $target = $(event.target); + var $li = $(event.target).closest('li'); + var shareType = $li.data('share-type'); + var shareWith = $li.attr('data-share-with'); + this.model.sendNotificationForShare(shareType, shareWith, $target.is(':checked')); + } }); OC.Share.ShareDialogShareeListView = ShareDialogShareeListView; |