diff --git a/.gitignore b/.gitignore index e9dbc1e3f6..ea8e5bd42f 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,5 @@ RCS/* # netbeans nbproject + +.DS_Store \ No newline at end of file diff --git a/core/css/styles.css b/core/css/styles.css index e6728dffbd..44331d1998 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -16,7 +16,7 @@ body { background:#fefefe; font:normal .8em/1.6em "Lucida Grande", Arial, Verdan /* HEADERS */ #body-user #header, #body-settings #header { position:fixed; top:0; z-index:100; width:100%; height:2.5em; padding:.5em; background:#1d2d44; -moz-box-shadow:0 0 10px #000, inset 0 -2px 10px #222; -webkit-box-shadow:0 0 10px #000, inset 0 -2px 10px #222; box-shadow:0 0 10px #000, inset 0 -2px 10px #222; } -#body-login #header { margin:-2em auto 0; text-align:center; height:10em; +#body-login #header { margin: -2em auto 0; text-align:center; height:10em; -moz-box-shadow:0 0 1em #000; -webkit-box-shadow:0 0 1em #000; box-shadow:0 0 1em #000; background: #1d2d44; /* Old browsers */ background: -moz-linear-gradient(top, #35537a 0%, #1d2d42 100%); /* FF3.6+ */ @@ -42,7 +42,8 @@ input[type="checkbox"] { width:auto; } #quota { cursor:default; } #body-login input { font-size:1.5em; } -#body-login input[type="submit"] { float:right; margin-right:.8em; } +#body-login input[type="text"], #body-login input[type="password"] { width: 13em; } +#body-login input.login { width: auto; float: right; } #remember_login { margin:.8em .2em 0 1em; } form.searchbox input[type="search"] { position:fixed; font-size:1.2em; top:.4em; right:3em; padding:.2em .5em .2em 1.5em; background-image:url('../img/actions/search.svg'); background-repeat:no-repeat; background-position:.5em center; border:0; -moz-border-radius:1em; -webkit-border-radius:1em; border-radius:1em; } 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; } @@ -61,17 +62,19 @@ input[type="submit"].highlight{ background:#ffc100; border:1px solid #db0; text- /* LOG IN & INSTALLATION ------------------------------------------------------------ */ #body-login { background:#ddd; } -#body-login p.info { width:21em; margin:2em auto; color:#777; text-shadow:#fff 0 1px 0; } +#body-login div.buttons { text-align: center; } +#body-login p.info { width:22em; text-align: center; margin:2em auto; color:#777; text-shadow:#fff 0 1px 0; } #body-login p.info a { font-weight:bold; color:#777; } #login { min-height:30em; margin:2em auto 0; border-bottom:1px solid #f8f8f8; background:#eee; } -#login form { width:18em; margin:2em auto 5em; padding:0; } +#login a#showAdvanced { color: #555; } +#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 #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 4em 0; padding:1em 1em 1em 5em; } +#login form ul.errors { background:#fed7d7; border:1px solid #f00; list-style-indent:inside; margin:0 0 2em; padding:1em; } #login form #selectDbType { text-align:center; } #login form #selectDbType label { position:static; font-size:1em; margin:0 -.3em 1em; cursor:pointer; padding:.4em; border:1px solid #ddd; font-weight:bold; background:#f8f8f8; color:#555; text-shadow:#eee 0 1px 0; -moz-box-shadow:0 1px 1px #fff, 0 1px 1px #fff inset; -webkit-box-shadow:0 1px 1px #fff, 0 1px 1px #fff inset; } diff --git a/core/js/js.js b/core/js/js.js index a75e1d41f6..f5abd9df6b 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) { diff --git a/core/js/setup.js b/core/js/setup.js index 0ed0ea6912..e16f9b6e32 100644 --- a/core/js/setup.js +++ b/core/js/setup.js @@ -1,8 +1,7 @@ $(document).ready(function() { $('#selectDbType').buttonset(); - $('#datadirField').hide(250); + $('#datadirContent').hide(250); if($('#hasSQLite').val()=='true'){ - $('#databaseField').hide(); $('#use_other_db').hide(); $('#dbhost').hide(); $('#dbhostlabel').hide(); @@ -26,11 +25,10 @@ $(document).ready(function() { $('#dbhostlabel').show(250); }); + $('input[checked]').trigger('click'); + $('#showAdvanced').click(function() { - $('#datadirField').slideToggle(250); - if($('#hasSQLite').val()=='true'){ - $('#databaseField').slideToggle(250); - } + $('#datadirContent').slideToggle(250); }); $("form").submit(function(){ // Save form parameters diff --git a/core/templates/installation.php b/core/templates/installation.php index 09f9ad8c35..e15e81191a 100644 --- a/core/templates/installation.php +++ b/core/templates/installation.php @@ -27,12 +27,12 @@ t( 'Configure the database' ); ?>
- +

SQLite t( 'will be used' ); ?>.

- /> + /> @@ -43,7 +43,7 @@

MySQL t( 'will be used' ); ?>.

- /> + /> @@ -54,7 +54,7 @@ - /> + />
@@ -68,13 +68,14 @@ - - t( 'Advanced' ); ?> ▾ -
- - +
+ t( 'Advanced' ); ?> ▾ +
+ + +
- +
diff --git a/core/templates/login.php b/core/templates/login.php index 717f6bcabd..56ecf6da9c 100644 --- a/core/templates/login.php +++ b/core/templates/login.php @@ -1,17 +1,17 @@
- + t('Lost your password?'); ?> - - + + - + - + - +
diff --git a/index.php b/index.php index 2ac3f6df7b..68754fcc56 100644 --- a/index.php +++ b/index.php @@ -53,7 +53,7 @@ elseif(OC_User::isLoggedIn()) { } // remember was checked after last login -elseif(isset($_COOKIE["oc_remember_login"]) && $_COOKIE["oc_remember_login"]) { +elseif(isset($_COOKIE["oc_remember_login"]) && isset($_COOKIE["oc_token"]) && isset($_COOKIE["oc_username"]) && $_COOKIE["oc_remember_login"]) { OC_App::loadApps(); if(defined("DEBUG") && DEBUG) {error_log("Trying to login from cookie");} // confirm credentials in cookie @@ -63,7 +63,7 @@ elseif(isset($_COOKIE["oc_remember_login"]) && $_COOKIE["oc_remember_login"]) { OC_Util::redirectToDefaultPage(); } else { - OC_Template::printGuestPage("", "login", array("error" => true)); + OC_Template::printGuestPage("", "login", array("error" => true, 'username' => isset($_COOKIE['oc_username'])?$_COOKIE['oc_username']:'' )); } } @@ -81,13 +81,8 @@ elseif(isset($_POST["user"]) && isset($_POST['password'])) { OC_User::unsetMagicInCookie(); } OC_Util::redirectToDefaultPage(); - } - else { - if(isset($_COOKIE["oc_username"])){ - OC_Template::printGuestPage("", "login", array("error" => true, "username" => $_COOKIE["oc_username"])); - }else{ - OC_Template::printGuestPage("", "login", array("error" => true)); - } + } else { + OC_Template::printGuestPage('', 'login', array('error' => true, 'username' => isset($_COOKIE['oc_username'])?$_COOKIE['oc_username']:'' )); } } @@ -126,11 +121,7 @@ elseif(isset($_GET['resetpassword']) && isset($_GET['token']) && isset($_GET['us // For all others cases, we display the guest page : else { OC_App::loadApps(); - if(isset($_COOKIE["username"])){ - OC_Template::printGuestPage("", "login", array("error" => false, "username" => $_COOKIE["username"])); - }else{ - OC_Template::printGuestPage("", "login", array("error" => false)); - } + OC_Template::printGuestPage('', 'login', array('error' => false, 'username' => isset($_COOKIE['oc_username'])?$_COOKIE['oc_username']:'' )); } -?> +?> \ No newline at end of file diff --git a/lib/helper.php b/lib/helper.php index 1661f38e8a..b6332b54ae 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -266,8 +266,14 @@ class OC_Helper { return $r; } + /** + * returns "checked"-attribut if request contains selected radio element OR if radio element is the default one -- maybe? + * @param string $s Name of radio-button element name + * @param string $v Value of current radio-button element + * @param string $d Value of default radio-button element + */ public static function init_radio($s, $v, $d) { - if((isset($_REQUEST[$s]) && $_REQUEST[$s]==$v) || $v == $d) + if((isset($_REQUEST[$s]) && $_REQUEST[$s]==$v) || (!isset($_REQUEST[$s]) && $v == $d)) print "checked=\"checked\" "; } diff --git a/lib/setup.php b/lib/setup.php index 8d3079720c..355d979dc6 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -55,9 +55,6 @@ class OC_Setup { if(empty($options['dbuser'])) { $error[] = "$dbprettyname enter the database username."; } - if(empty($options['dbpass'])) { - $error[] = "$dbprettyname enter the database password."; - } if(empty($options['dbname'])) { $error[] = "$dbprettyname enter the database name."; }