summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2012-10-28 13:47:29 +0100
committerBjörn Schießle <schiessle@owncloud.com>2012-10-28 14:31:34 +0100
commita4a1dad8312db8060009be0dd315cd7b5b1e4fc5 (patch)
tree06f4147b841507b96c403c05abc97860998267d8 /core
parentd7a6b094063a89b8ecce9392a603cb3c3a967db2 (diff)
downloadnextcloud-server-a4a1dad8312db8060009be0dd315cd7b5b1e4fc5.tar.gz
nextcloud-server-a4a1dad8312db8060009be0dd315cd7b5b1e4fc5.zip
set password if user leaves password field (issue #57)
Diffstat (limited to 'core')
-rw-r--r--core/js/share.js16
1 files changed, 7 insertions, 9 deletions
diff --git a/core/js/share.js b/core/js/share.js
index 7d8799edf51..8d359dd3fcb 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -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() {