some more usability improvements:
merged pull request https://github.com/owncloud/core/pull/121 into this patch with fixes for all issues mentioned in 121
This commit is contained in:
parent
1dd79cc8e1
commit
c457e15b20
|
@ -161,9 +161,9 @@ OC.Share={
|
||||||
if (link) {
|
if (link) {
|
||||||
html += '<div id="link">';
|
html += '<div id="link">';
|
||||||
html += '<input type="checkbox" name="linkCheckbox" id="linkCheckbox" value="1" /><label for="linkCheckbox">'+t('core', 'Share with link')+'</label>';
|
html += '<input type="checkbox" name="linkCheckbox" id="linkCheckbox" value="1" /><label for="linkCheckbox">'+t('core', 'Share with link')+'</label>';
|
||||||
html += '<a href="#" id="showPassword" style="display:none;"><img class="svg" alt="'+t('core', 'Password protect')+'" src="'+OC.imagePath('core', 'actions/lock')+'"/></a>';
|
|
||||||
html += '<br />';
|
html += '<br />';
|
||||||
html += '<input id="linkText" type="text" readonly="readonly" />';
|
html += '<input id="linkText" type="text" readonly="readonly" />';
|
||||||
|
html += '<input type="checkbox" name="showPassword" id="showPassword" value="1" style="display:none;" /><label for="showPassword" style="display:none;">'+t('core', 'Password protect')+'</label>';
|
||||||
html += '<div id="linkPass">';
|
html += '<div id="linkPass">';
|
||||||
html += '<input id="linkPassText" type="password" placeholder="'+t('core', 'Password')+'" />';
|
html += '<input id="linkPassText" type="password" placeholder="'+t('core', 'Password')+'" />';
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
@ -347,9 +347,12 @@ OC.Share={
|
||||||
}
|
}
|
||||||
$('#linkText').val(link);
|
$('#linkText').val(link);
|
||||||
$('#linkText').show('blind');
|
$('#linkText').show('blind');
|
||||||
|
$('#linkText').css('display','block');
|
||||||
$('#showPassword').show();
|
$('#showPassword').show();
|
||||||
|
$('#showPassword+label').show();
|
||||||
if (password != null) {
|
if (password != null) {
|
||||||
$('#linkPass').show('blind');
|
$('#linkPass').show('blind');
|
||||||
|
$('#showPassword').attr('checked', true);
|
||||||
$('#linkPassText').attr('placeholder', t('core', 'Password protected'));
|
$('#linkPassText').attr('placeholder', t('core', 'Password protected'));
|
||||||
}
|
}
|
||||||
$('#expiration').show();
|
$('#expiration').show();
|
||||||
|
@ -359,6 +362,7 @@ OC.Share={
|
||||||
hideLink:function() {
|
hideLink:function() {
|
||||||
$('#linkText').hide('blind');
|
$('#linkText').hide('blind');
|
||||||
$('#showPassword').hide();
|
$('#showPassword').hide();
|
||||||
|
$('#showPassword+label').hide();
|
||||||
$('#linkPass').hide();
|
$('#linkPass').hide();
|
||||||
$('#emailPrivateLink #email').hide();
|
$('#emailPrivateLink #email').hide();
|
||||||
$('#emailPrivateLink #emailButton').hide();
|
$('#emailPrivateLink #emailButton').hide();
|
||||||
|
@ -518,6 +522,11 @@ $(document).ready(function() {
|
||||||
|
|
||||||
$('#showPassword').live('click', function() {
|
$('#showPassword').live('click', function() {
|
||||||
$('#linkPass').toggle('blind');
|
$('#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) {
|
$('#linkPassText').live('focusout keyup', function(event) {
|
||||||
|
|
Loading…
Reference in New Issue