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 15:04:41 +0100
commit10e45481bec2d9003f6c6ad89591b2d968a05882 (patch)
tree0643a977f5fbca312eda8ce862ec65364134487f /core
parentbfb8436ca223d0401f2b7ff001cb9152387ca82d (diff)
downloadnextcloud-server-10e45481bec2d9003f6c6ad89591b2d968a05882.tar.gz
nextcloud-server-10e45481bec2d9003f6c6ad89591b2d968a05882.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 2f9f10026de..5f5bfb0f44c 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -475,15 +475,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() {