diff --git a/core/js/share.js b/core/js/share.js
index 984fce047b..c218c2c123 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -161,9 +161,9 @@ OC.Share={
if (link) {
html += '
';
html += '
';
- html += '
';
html += '
';
html += '
';
+ html += '
';
html += '
';
html += '';
html += '
';
@@ -347,9 +347,12 @@ OC.Share={
}
$('#linkText').val(link);
$('#linkText').show('blind');
+ $('#linkText').css('display','block');
$('#showPassword').show();
+ $('#showPassword+label').show();
if (password != null) {
$('#linkPass').show('blind');
+ $('#showPassword').attr('checked', true);
$('#linkPassText').attr('placeholder', t('core', 'Password protected'));
}
$('#expiration').show();
@@ -359,6 +362,7 @@ OC.Share={
hideLink:function() {
$('#linkText').hide('blind');
$('#showPassword').hide();
+ $('#showPassword+label').hide();
$('#linkPass').hide();
$('#emailPrivateLink #email').hide();
$('#emailPrivateLink #emailButton').hide();
@@ -518,6 +522,11 @@ $(document).ready(function() {
$('#showPassword').live('click', function() {
$('#linkPass').toggle('blind');
+ if (!$('#showPassword').is(':checked') ) {
+ var itemType = $('#dropdown').data('item-type');
+ var itemSource = $('#dropdown').data('item-source');
+ OC.Share.share(itemType, itemSource, OC.Share.SHARE_TYPE_LINK, '', OC.PERMISSION_READ);
+ }
});
$('#linkPassText').live('focusout keyup', function(event) {