]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix toggling of password protection in sharing dropdown
authorMichael Gapczynski <mtgap@owncloud.com>
Tue, 28 Aug 2012 19:10:06 +0000 (15:10 -0400)
committerMichael Gapczynski <mtgap@owncloud.com>
Wed, 29 Aug 2012 15:54:49 +0000 (11:54 -0400)
core/css/share.css
core/js/share.js

index a8ffc8df42ef4c0e53d292acb9650dd932f08fa2..abaeb07dd8a734a4d1105e0eb9bda47702904bb8 100644 (file)
@@ -15,4 +15,6 @@ a.showCruds { display:inline; opacity:.5; }
 a.showCruds:hover { opacity:1; }
 a.unshare { float:right; display:inline; padding:.3em 0 0 .3em !important; opacity:.5; }
 a.unshare:hover { opacity:1; }
-#link { border-top:1px solid #ddd; padding-top:0.5em; }
\ No newline at end of file
+#link { border-top:1px solid #ddd; padding-top:0.5em; }
+input[type="text"], input[type="password"] { width:90%; }
+#linkText, #linkPass { display:none; }
index 4c164f65b24d6891ad1d020f73552d256385082a..cc862b1c5f5227d2bd7c972ff39056fd5fbf63ad 100644 (file)
@@ -130,7 +130,7 @@ OC.Share={
                        html += '<br />';
                }
                if (possiblePermissions & OC.Share.PERMISSION_SHARE) {
-                       html += '<input id="shareWith" type="text" placeholder="Share with" style="width:90%;"/>';
+                       html += '<input id="shareWith" type="text" placeholder="Share with" />';
                        html += '<ul id="shareWithList">';
                        html += '</ul>';
                        if (link) {
@@ -139,8 +139,10 @@ OC.Share={
                                // TODO Change to lock/unlock icon?
                                html += '<a href="#" id="showPassword" style="display:none;"><img class="svg" alt="Password protect" src="'+OC.imagePath('core', 'actions/triangle-n')+'"/></a>';
                                html += '<br />';
-                               html += '<input id="linkText" style="display:none; width:90%;" readonly="readonly" />';
-                               html += '<input id="linkPassText" type="password" placeholder="Password" style="display:none; width:90%;" />';
+                               html += '<input id="linkText" type="text" readonly="readonly" />';
+                               html += '<div id="linkPass">';
+                               html += '<input id="linkPassText" type="password" placeholder="Password" />';
+                               html += '</div>'
                                html += '</div>';
                        }
                        html += '</div>';
@@ -408,8 +410,7 @@ $(document).ready(function() {
        });
 
        $('#showPassword').live('click', function() {
-               $('#linkText').after('<br />');
-               $('#linkPassText').toggle('blind');
+               $('#linkPass').toggle('blind');
        });
 
        $('#linkPassText').live('keyup', function(event) {