summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2012-09-26 00:09:35 -0400
committerMichael Gapczynski <mtgap@owncloud.com>2012-09-26 00:09:35 -0400
commitb4e40b1c21fc3cd465a467278b4960565e07ca0d (patch)
tree35572553babd438bd38ee63b3fb741ccfc1fe6da /core
parent00103d730fe2ce57ee389fd7d219847d8cb015a3 (diff)
downloadnextcloud-server-b4e40b1c21fc3cd465a467278b4960565e07ca0d.tar.gz
nextcloud-server-b4e40b1c21fc3cd465a467278b4960565e07ca0d.zip
Fix unsetting share expiration date
Diffstat (limited to 'core')
-rw-r--r--core/js/share.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/js/share.js b/core/js/share.js
index e45dc7dd424..36ee39d8eab 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -482,7 +482,14 @@ $(document).ready(function() {
if (this.checked) {
OC.Share.showExpirationDate('');
} else {
- $('#expirationDate').hide();
+ var itemType = $('#dropdown').data('item-type');
+ var itemSource = $('#dropdown').data('item-source');
+ $.post(OC.filePath('core', 'ajax', 'share.php'), { action: 'setExpirationDate', itemType: itemType, itemSource: itemSource, date: '' }, function(result) {
+ if (!result || result.status !== 'success') {
+ OC.dialogs.alert(t('core', 'Error'), t('core', 'Error unsetting expiration date'));
+ }
+ $('#expirationDate').hide();
+ });
}
});