set password if user leaves password field (issue #57)

This commit is contained in:
Björn Schießle 2012-10-28 13:47:29 +01:00
parent d7a6b09406
commit a4a1dad831
1 changed files with 7 additions and 9 deletions

View File

@ -483,15 +483,13 @@ $(document).ready(function() {
$('#linkPass').toggle('blind');
});
$('#linkPassText').live('keyup', function(event) {
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.PERMISSION_READ, function() {
$('#linkPassText').val('');
$('#linkPassText').attr('placeholder', t('core', 'Password protected'));
});
}
$('#linkPassText').live('focusout', function(event) {
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.PERMISSION_READ, function() {
$('#linkPassText').val('');
$('#linkPassText').attr('placeholder', t('core', 'Password protected'));
});
});
$('#expirationCheckbox').live('click', function() {