summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2012-08-29 14:06:33 -0400
committerMichael Gapczynski <mtgap@owncloud.com>2012-08-29 14:06:55 -0400
commit76bc4753e9bd2698415b067108806d82ac56b663 (patch)
tree5f636e6be1c65e0efd64bd3cb01e919126edbf6a /core
parent0788c6e968f98647fe8bb8961cc2d250531ce283 (diff)
downloadnextcloud-server-76bc4753e9bd2698415b067108806d82ac56b663.tar.gz
nextcloud-server-76bc4753e9bd2698415b067108806d82ac56b663.zip
Fix displaying if a link is password protected
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 7d2daffb29d..fa412c7acc5 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -282,6 +282,10 @@ OC.Share={
$('#linkText').val(link);
$('#linkText').show('blind');
$('#showPassword').show();
+ if (password.length > 0) {
+ $('#linkPass').show('blind');
+ $('#linkPassText').attr('placeholder', 'Password protected');
+ }
},
hideLink:function() {
$('#linkText').hide('blind');
@@ -419,7 +423,10 @@ $(document).ready(function() {
if (event.keyCode == 13) {
var itemType = $('#dropdown').data('item-type');
var itemSource = $('#dropdown').data('item-source');
- OC.Share.share(itemType, itemSource, OC.Share.SHARE_TYPE_LINK, $(this).val(), OC.Share.PERMISSION_READ);
+ OC.Share.share(itemType, itemSource, OC.Share.SHARE_TYPE_LINK, $(this).val(), OC.Share.PERMISSION_READ, function() {
+ $('#linkPassText').val('');
+ $('#linkPassText').attr('placeholder', 'Password protected');
+ });
}
});