[Pkg-owncloud-commits] [owncloud] 182/394: some more usability improvements:

David Prévot taffit at alioth.debian.org
Fri Nov 8 23:11:59 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v4.5.10
in repository owncloud.

commit 3401cb5358ccef587c899003e96a4059551b4c8f
Author: Björn Schießle <schiessle at owncloud.com>
Date:   Wed Dec 5 14:17:21 2012 +0100

    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
---
 core/js/share.js |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/core/js/share.js b/core/js/share.js
index 8f3f8fa..086883f 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -140,9 +140,9 @@ OC.Share={
 			if (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 += '<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 += '<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 += '<input id="linkPassText" type="password" placeholder="'+t('core', 'Password')+'" />';
 				html += '</div>';
@@ -322,9 +322,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();
@@ -332,6 +335,7 @@ OC.Share={
 	hideLink:function() {
 		$('#linkText').hide('blind');
 		$('#showPassword').hide();
+		$('#showPassword+label').hide();
 		$('#linkPass').hide();
 	},
 	dirname:function(path) {
@@ -479,6 +483,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) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list