summaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2012-09-19 01:02:57 -0400
committerMichael Gapczynski <mtgap@owncloud.com>2012-09-19 01:02:57 -0400
commit1e1e8ae3b52378105aa0523466dccb1dafd9c650 (patch)
tree2e621e407bd09c2c2790e68a5a79946a6d887fac /core/js
parent39e587b52c92c8b71bb3eed4824c2cfc10b37306 (diff)
downloadnextcloud-server-1e1e8ae3b52378105aa0523466dccb1dafd9c650.tar.gz
nextcloud-server-1e1e8ae3b52378105aa0523466dccb1dafd9c650.zip
Don't show the expiration option until a share occurs, bug fix for oc-1724
Diffstat (limited to 'core/js')
-rw-r--r--core/js/share.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/js/share.js b/core/js/share.js
index 8a00587b77a..d77f3da6842 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -283,6 +283,7 @@ OC.Share={
html += '</div>';
html += '</li>';
$(html).appendTo('#shareWithList');
+ $('#expiration').show();
}
},
showLink:function(itemSource, password) {
@@ -302,6 +303,7 @@ OC.Share={
$('#linkPass').show('blind');
$('#linkPassText').attr('placeholder', 'Password protected');
}
+ $('#expiration').show();
},
hideLink:function() {
$('#linkText').hide('blind');
@@ -379,6 +381,9 @@ $(document).ready(function() {
var index = OC.Share.itemShares[shareType].indexOf(shareWith);
OC.Share.itemShares[shareType].splice(index, 1);
OC.Share.updateIcon(itemType, itemSource);
+ if (typeof OC.Share.statuses[itemSource] === 'undefined') {
+ $('#expiration').hide();
+ }
});
});
@@ -422,6 +427,9 @@ $(document).ready(function() {
// Delete private link
OC.Share.unshare(itemType, itemSource, OC.Share.SHARE_TYPE_LINK, '', function() {
OC.Share.hideLink();
+ if (typeof OC.Share.statuses[itemSource] === 'undefined') {
+ $('#expiration').hide();
+ }
});
}
});