From ccfa2dd24ce8313b9dede2d1c18761aa9e294e5c Mon Sep 17 00:00:00 2001 From: Marvin Thomas Rabe Date: Fri, 30 Sep 2011 18:22:12 +0200 Subject: Error when only oc_remember_login cookie set fixed. Filled username field when oc_username is set repaired. Problems with "advanced settings" button in installation wizard fixed. CSS improved - login and installation now looks more clean. Request password link removed (email feature not implemented yet). Database radio button bugs removed. It is possible to have an empty database password, now ownCloud will support this "security issue". Ignore Mac OS X ".DSstore" files. Fade in/out of login button and remember checkbox removed due to some display errors. --- core/js/js.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core/js/js.js') diff --git a/core/js/js.js b/core/js/js.js index a75e1d41f60..f5abd9df6b3 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -290,6 +290,7 @@ $(document).ready(function(){ // 'show password' checkbox $('#pass2').showPassword(); + /* @TODO: Currently not working perfect. Remember-Checkbox is flashing. // hide log in button etc. when form fields not filled $('#submit').hide(); $('#remember_login').hide(); @@ -312,6 +313,7 @@ $(document).ready(function(){ $('#remember_login+label').fadeIn(); } }); + */ if($('body').attr("id")=="body-user") { $('#settings #expanddiv').hide(); } $('#settings #expand').click(function(event) { -- cgit v1.2.3 From 6d8985ceb25c6423535cab986fefe77c27758970 Mon Sep 17 00:00:00 2001 From: Marvin Thomas Rabe Date: Mon, 3 Oct 2011 14:41:55 +0200 Subject: added infield labels. readded fade in of login button. updated label on install page. --- core/css/styles.css | 7 +++++-- core/js/jquery.infieldlabel.min.js | 12 +++++++++++ core/js/js.js | 14 ++++++------- core/templates/installation.php | 34 ++++++++++++++++++++++++-------- core/templates/login.php | 10 ++++++++-- index.php | 2 +- lib/base.php | 1 + lostpassword/templates/lostpassword.php | 5 ++++- lostpassword/templates/resetpassword.php | 5 ++++- 9 files changed, 68 insertions(+), 22 deletions(-) create mode 100755 core/js/jquery.infieldlabel.min.js (limited to 'core/js/js.js') diff --git a/core/css/styles.css b/core/css/styles.css index 4d9cb203774..8f309333318 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -49,7 +49,6 @@ form.searchbox input[type="search"] { position:fixed; font-size:1.2em; top:.4em; input[type="submit"].enabled { background:#66f866; border:1px solid #5e5; -moz-box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #cfc inset; -webkit-box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #cfc inset; box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #cfc inset; } input[type="submit"].highlight{ background:#ffc100; border:1px solid #db0; text-shadow:#ffeedd 0 1px 0; -moz-box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #ffeedd inset; -webkit-box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #ffeedd inset; box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #ffeedd inset; } - /* CONTENT ------------------------------------------------------------------ */ #controls { width:100%; top:3.5em; height:2.8em; margin:0; background:#f7f7f7; border-bottom:1px solid #eee; position:fixed; z-index:50; -moz-box-shadow:0 -3px 7px #000; -webkit-box-shadow:0 -3px 7px #000; box-shadow:0 -3px 7px #000; } #controls .button { display:inline-block; } @@ -70,7 +69,11 @@ input[type="submit"].highlight{ background:#ffc100; border:1px solid #db0; text- #login form { width:22em; margin:2em auto 2em; padding:0; } #login form fieldset { background:0; border:0; margin-bottom:2em; padding:0; } #login form fieldset legend { font-weight:bold; } -#login form label { position:absolute; margin:.8em .8em; font-size:1.5em; color:#666; } +#login form label { margin:.8em .8em; color:#666; } +/* NEEDED FOR INFIELD LABELS */ +p.infield { position: relative; } +label.infield { cursor: text !important; } +#login form label.infield { position:absolute; font-size:1.5em; color:#AAA; } #login #dbhostlabel, #login #directorylabel { display:block; margin:.95em 0 .8em -8em; } #login form input[type="checkbox"]+label { position:relative; margin:0; font-size:1em; text-shadow:#fff 0 1px 0; } #login form ul.errors { background:#fed7d7; border:1px solid #f00; list-style-indent:inside; margin:0 0 2em; padding:1em; } diff --git a/core/js/jquery.infieldlabel.min.js b/core/js/jquery.infieldlabel.min.js new file mode 100755 index 00000000000..8f0ab9f7c5e --- /dev/null +++ b/core/js/jquery.infieldlabel.min.js @@ -0,0 +1,12 @@ +/* + * In-Field Label jQuery Plugin + * http://fuelyourcoding.com/scripts/infield.html + * + * Copyright (c) 2009 Doug Neiner + * Dual licensed under the MIT and GPL licenses. + * Uses the same license as jQuery, see: + * http://docs.jquery.com/License + * + * @version 0.1 + */ +(function($){$.InFieldLabels=function(b,c,d){var f=this;f.$label=$(b);f.label=b;f.$field=$(c);f.field=c;f.$label.data("InFieldLabels",f);f.showing=true;f.init=function(){f.options=$.extend({},$.InFieldLabels.defaultOptions,d);if(f.$field.val()!=""){f.$label.hide();f.showing=false};f.$field.focus(function(){f.fadeOnFocus()}).blur(function(){f.checkForEmpty(true)}).bind('keydown.infieldlabel',function(e){f.hideOnChange(e)}).change(function(e){f.checkForEmpty()}).bind('onPropertyChange',function(){f.checkForEmpty()})};f.fadeOnFocus=function(){if(f.showing){f.setOpacity(f.options.fadeOpacity)}};f.setOpacity=function(a){f.$label.stop().animate({opacity:a},f.options.fadeDuration);f.showing=(a>0.0)};f.checkForEmpty=function(a){if(f.$field.val()==""){f.prepForShow();f.setOpacity(a?1.0:f.options.fadeOpacity)}else{f.setOpacity(0.0)}};f.prepForShow=function(e){if(!f.showing){f.$label.css({opacity:0.0}).show();f.$field.bind('keydown.infieldlabel',function(e){f.hideOnChange(e)})}};f.hideOnChange=function(e){if((e.keyCode==16)||(e.keyCode==9))return;if(f.showing){f.$label.hide();f.showing=false};f.$field.unbind('keydown.infieldlabel')};f.init()};$.InFieldLabels.defaultOptions={fadeOpacity:0.5,fadeDuration:300};$.fn.inFieldLabels=function(c){return this.each(function(){var a=$(this).attr('for');if(!a)return;var b=$("input#"+a+"[type='text'],"+"input#"+a+"[type='password'],"+"textarea#"+a);if(b.length==0)return;(new $.InFieldLabels(this,b[0],c))})}})(jQuery); \ No newline at end of file diff --git a/core/js/js.js b/core/js/js.js index f5abd9df6b3..61a60c52485 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -252,7 +252,7 @@ $(document).ready(function(){ } $('form.searchbox').submit(function(event){ event.preventDefault(); - }) + }); $('#searchbox').keyup(function(event){ if(event.keyCode==13){//enter if(OC.search.currentResult>-1){ @@ -290,7 +290,9 @@ $(document).ready(function(){ // 'show password' checkbox $('#pass2').showPassword(); - /* @TODO: Currently not working perfect. Remember-Checkbox is flashing. + //use infield labels + $("label.infield").inFieldLabels(); + // hide log in button etc. when form fields not filled $('#submit').hide(); $('#remember_login').hide(); @@ -302,18 +304,16 @@ $(document).ready(function(){ empty = true; } }); - if(empty) { $('#submit').fadeOut(); - $('#remember_login').fadeOut(); + $('#remember_login').hide(); $('#remember_login+label').fadeOut(); } else { $('#submit').fadeIn(); - $('#remember_login').fadeIn(); + $('#remember_login').show(); $('#remember_login+label').fadeIn(); } }); - */ if($('body').attr("id")=="body-user") { $('#settings #expanddiv').hide(); } $('#settings #expand').click(function(event) { @@ -322,7 +322,7 @@ $(document).ready(function(){ }); $('#settings #expanddiv').click(function(event){ event.stopPropagation(); - }) + }); $('#settings #expand').hover(function(){ $('#settings #expand+span').fadeToggle(); }); diff --git a/core/templates/installation.php b/core/templates/installation.php index c1bfbdf1763..70a545d66cf 100644 --- a/core/templates/installation.php +++ b/core/templates/installation.php @@ -18,14 +18,21 @@
t( 'Create an admin account' ); ?> - - +

+ + +

+

+ + +

t( 'Advanced' ); ?> ▾
- +
+
@@ -68,13 +75,24 @@
- - - +

+ + +

+

+ + +

+

+ + +

- - +

+ + +

diff --git a/core/templates/login.php b/core/templates/login.php index f4ee44be4ed..46b44c24d78 100644 --- a/core/templates/login.php +++ b/core/templates/login.php @@ -3,8 +3,14 @@ t('Lost your password?'); ?> - autocomplete="off" required /> - /> +

+ + autocomplete="off" required /> +

+

+ + /> +

diff --git a/index.php b/index.php index 072f526d8f9..fb8d1922dd4 100644 --- a/index.php +++ b/index.php @@ -28,7 +28,7 @@ require_once('lib/base.php'); // Setup required : $not_installed = !OC_Config::getValue('installed', false); $install_called = (isset($_POST['install']) AND $_POST['install']=='true'); -if($not_installed OR true) { +if($not_installed) { OC_Util::addScript('setup'); require_once('setup.php'); exit(); diff --git a/lib/base.php b/lib/base.php index de2e7a36eee..0156febe231 100644 --- a/lib/base.php +++ b/lib/base.php @@ -115,6 +115,7 @@ class OC{ OC_Util::addScript( "jquery-1.6.4.min" ); OC_Util::addScript( "jquery-ui-1.8.14.custom.min" ); OC_Util::addScript( "jquery-showpassword" ); + OC_Util::addScript( "jquery.infieldlabel.min" ); OC_Util::addScript( "jquery-tipsy" ); OC_Util::addScript( "js" ); //OC_Util::addScript( "multiselect" ); diff --git a/lostpassword/templates/lostpassword.php b/lostpassword/templates/lostpassword.php index 2c38a1562fe..4b871963b80 100644 --- a/lostpassword/templates/lostpassword.php +++ b/lostpassword/templates/lostpassword.php @@ -7,7 +7,10 @@ t('Login failed!'); ?> - +

+ + +

diff --git a/lostpassword/templates/resetpassword.php b/lostpassword/templates/resetpassword.php index 3ab9dd6543c..56257de7f13 100644 --- a/lostpassword/templates/resetpassword.php +++ b/lostpassword/templates/resetpassword.php @@ -4,7 +4,10 @@

t('Your password was reset'); ?>

t('To login page'); ?>

- +

+ + +

-- cgit v1.2.3