added infield labels. readded fade in of login button. updated label on install page.
This commit is contained in:
parent
481a37fcf3
commit
6d8985ceb2
|
@ -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; }
|
||||
|
|
|
@ -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);
|
|
@ -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();
|
||||
});
|
||||
|
|
|
@ -18,14 +18,21 @@
|
|||
|
||||
<fieldset>
|
||||
<legend><?php echo $l->t( 'Create an <strong>admin account</strong>' ); ?></legend>
|
||||
<input type="text" name="adminlogin" id="adminlogin" value="<?php print OC_Helper::init_var('adminlogin'); ?>" placeholder="<?php echo $l->t( 'Username' ); ?>" autocomplete="off" autofocus required />
|
||||
<input type="password" name="adminpass" id="adminpass" value="<?php print OC_Helper::init_var('adminpass'); ?>" placeholder="<?php echo $l->t( 'Password' ); ?>" required />
|
||||
<p class="infield">
|
||||
<label for="adminlogin" class="infield"><?php echo $l->t( 'Username' ); ?></label>
|
||||
<input type="text" name="adminlogin" id="adminlogin" value="<?php print OC_Helper::init_var('adminlogin'); ?>" autocomplete="off" autofocus required />
|
||||
</p>
|
||||
<p class="infield">
|
||||
<label for="adminpass" class="infield"><?php echo $l->t( 'Password' ); ?></label>
|
||||
<input type="password" name="adminpass" id="adminpass" value="<?php print OC_Helper::init_var('adminpass'); ?>" required />
|
||||
</p>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="datadirField">
|
||||
<legend><a id="showAdvanced"><?php echo $l->t( 'Advanced' ); ?> ▾</a></legend>
|
||||
<div id="datadirContent">
|
||||
<input type="text" name="directory" id="directory" value="<?php print OC_Helper::init_var('directory', $_['directory']); ?>" placeholder="<?php echo $l->t( 'Data folder' ); ?>" />
|
||||
<label for="directory"><?php echo $l->t( 'Data folder' ); ?>:</label><br/>
|
||||
<input type="text" name="directory" id="directory" value="<?php print OC_Helper::init_var('directory', $_['directory']); ?>" />
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
|
@ -68,13 +75,24 @@
|
|||
|
||||
<?php if($hasOtherDB): ?>
|
||||
<div id="use_other_db">
|
||||
<input type="text" name="dbuser" id="dbuser" value="<?php print OC_Helper::init_var('dbuser'); ?>" placeholder="<?php echo $l->t( 'Database user' ); ?>" autocomplete="off" />
|
||||
<input type="password" name="dbpass" id="dbpass" value="<?php print OC_Helper::init_var('dbpass'); ?>" placeholder="<?php echo $l->t( 'Database password' ); ?>" />
|
||||
<input type="text" name="dbname" id="dbname" value="<?php print OC_Helper::init_var('dbname'); ?>" placeholder="<?php echo $l->t( 'Database name' ); ?>" autocomplete="off" />
|
||||
<p class="infield">
|
||||
<label for="dbuser" class="infield"><?php echo $l->t( 'Database user' ); ?></label>
|
||||
<input type="text" name="dbuser" id="dbuser" value="<?php print OC_Helper::init_var('dbuser'); ?>" autocomplete="off" />
|
||||
</p>
|
||||
<p class="infield">
|
||||
<label for="dbpass" class="infield"><?php echo $l->t( 'Database password' ); ?></label>
|
||||
<input type="password" name="dbpass" id="dbpass" value="<?php print OC_Helper::init_var('dbpass'); ?>" />
|
||||
</p>
|
||||
<p class="infield">
|
||||
<label for="dbname" class="infield"><?php echo $l->t( 'Database name' ); ?></label>
|
||||
<input type="text" name="dbname" id="dbname" value="<?php print OC_Helper::init_var('dbname'); ?>" autocomplete="off" />
|
||||
</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<input type="text" name="dbhost" id="dbhost" value="<?php print OC_Helper::init_var('dbhost', 'localhost'); ?>" placeholder="<?php echo $l->t( 'Database host' ); ?>" />
|
||||
|
||||
<p class="infield">
|
||||
<label for="dbhost" class="infield"><?php echo $l->t( 'Database host' ); ?></label>
|
||||
<input type="text" name="dbhost" id="dbhost" value="<?php print OC_Helper::init_var('dbhost', 'localhost'); ?>" />
|
||||
</p>
|
||||
</fieldset>
|
||||
|
||||
<div class="buttons"><input type="submit" value="<?php echo $l->t( 'Finish setup' ); ?>" /></div>
|
||||
|
|
|
@ -3,8 +3,14 @@
|
|||
<?php if($_['error']): ?>
|
||||
<a href="./lostpassword/"><?php echo $l->t('Lost your password?'); ?></a>
|
||||
<?php endif; ?>
|
||||
<input type="text" name="user" id="user" placeholder="<?php echo $l->t( 'Username' ); ?>" value="<?php echo !empty($_POST['user'])?$_POST['user'].'"':'" autofocus'; ?> autocomplete="off" required />
|
||||
<input type="password" name="password" id="password" placeholder="<?php echo $l->t( 'Password' ); ?>" value="" required <?php echo !empty($_POST['user'])?'autofocus':''; ?> />
|
||||
<p class="infield">
|
||||
<label for="user" class="infield"><?php echo $l->t( 'Username' ); ?></label>
|
||||
<input type="text" name="user" id="user" value="<?php echo !empty($_POST['user'])?$_POST['user'].'"':'" autofocus'; ?> autocomplete="off" required />
|
||||
</p>
|
||||
<p class="infield">
|
||||
<label for="password" class="infield"><?php echo $l->t( 'Password' ); ?></label>
|
||||
<input type="password" name="password" id="password" value="" required <?php echo !empty($_POST['user'])?'autofocus':''; ?> />
|
||||
</p>
|
||||
<input type="checkbox" name="remember_login" value="1" id="remember_login" /><label for="remember_login"><?php echo $l->t('remember'); ?></label>
|
||||
<input type="submit" id="submit" class="login" value="<?php echo $l->t( 'Log in' ); ?>" />
|
||||
</fieldset>
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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" );
|
||||
|
|
|
@ -7,7 +7,10 @@
|
|||
<?php if ($_['error']): ?>
|
||||
<?php echo $l->t('Login failed!'); ?>
|
||||
<?php endif; ?>
|
||||
<input type="text" name="user" id="user" placeholder="<?php echo $l->t('Username'); ?>" value="" autocomplete="off" required autofocus />
|
||||
<p class="infield">
|
||||
<label for="user" class="infield"><?php echo $l->t( 'Username' ); ?></label>
|
||||
<input type="text" name="user" id="user" value="" autocomplete="off" required autofocus />
|
||||
</p>
|
||||
<input type="submit" id="submit" value="<?php echo $l->t('Request reset'); ?>" />
|
||||
<?php endif; ?>
|
||||
</fieldset>
|
||||
|
|
|
@ -4,7 +4,10 @@
|
|||
<h1><?php echo $l->t('Your password was reset'); ?></h1>
|
||||
<p><a href="<?php echo OC::$WEBROOT ?>/"><?php echo $l->t('To login page'); ?></a></p>
|
||||
<?php else: ?>
|
||||
<input type="password" name="password" id="password" placeholder="<?php echo $l->t('New password'); ?>" value="" required />
|
||||
<p class="infield">
|
||||
<label for="password" class="infield"><?php echo $l->t( 'New password' ); ?></label>
|
||||
<input type="password" name="password" id="password" value="" required />
|
||||
</p>
|
||||
<input type="submit" id="submit" value="<?php echo $l->t('Reset password'); ?>" />
|
||||
<?php endif; ?>
|
||||
</fieldset>
|
||||
|
|
Loading…
Reference in New Issue