Merge branch 'master' of ssh://github.com/web2py/web2py

This commit is contained in:
Michele Comitini
2013-07-21 16:37:55 +02:00
14 changed files with 843 additions and 783 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.6.0-development+timestamp.2013.07.17.17.18.40 Version 2.6.0-development+timestamp.2013.07.20.12.59.52
+11 -2
View File
@@ -42,7 +42,7 @@ input[type="file"] { margin-bottom:9px; }
.form-inline input[type="file"] { margin-bottom:0px; } .form-inline input[type="file"] { margin-bottom:0px; }
input + .help-block { margin-top:-5px; margin-bottom:4px; } input + .help-block { margin-top:-10px; margin-bottom:4px; }
#confirm_form input.btn, .generatedbyw2p input { margin-right:4px; } #confirm_form input.btn, .generatedbyw2p input { margin-right:4px; }
@@ -467,6 +467,9 @@ EDIT PAGE SLIDING FILES MENU
} }
/*-----------------------------------
miscellaneous
-------------------------------------*/
h4.editableapp, h4.currentapp { padding: 5px 0 5px 54px; display: inline; } h4.editableapp, h4.currentapp { padding: 5px 0 5px 54px; display: inline; }
h4.editableapp { background: #fff url(../images/folder.png) no-repeat; } h4.editableapp { background: #fff url(../images/folder.png) no-repeat; }
@@ -474,7 +477,13 @@ h4.editableapp { background: #fff url(../images/folder.png) no-repeat; }
h4.currentapp { background: #fff url(../images/folder_locked.png) no-repeat; } h4.currentapp { background: #fff url(../images/folder_locked.png) no-repeat; }
.flash { position:fixed; width:50%; top:49px; left:25%; right:25%; cursor:default; text-align:center; z-index:5620; } .flash { position:fixed; width:50%; top:49px; left:25%; right:25%; cursor:default; text-align:center; z-index:5620; }
span#closeflash {position:absolute; top:1px; right:-1px; font-size:150%; border:1px solid black; border-color: transparent transparent #fbeed5 #fbeed5; border-radius: 0 0 0 4px; width:22px; }
span#closeflash:hover {font-weight:bold; cursor:pointer; }
table.twitter{ background-color: transparent; } table.twitter{ background-color: transparent; }
table.twitter tr td {vertical-align: top; padding: 5px; } table.twitter tr td {vertical-align: top; padding: 5px; }
table.twitter tr { border-bottom: 1px solid #a0a0a0; } table.twitter tr { border-bottom: 1px solid #a0a0a0; }
div.error_wrapper {margin-top:-10px; margin-bottom:8px; padding-left:2px; color:#d62e2b; }
.twitter-timeline >iframe{padding: 1em 0;}
+264 -252
View File
@@ -1,252 +1,264 @@
/*============================================================= /*=============================================================
CUSTOM RULES CUSTOM RULES
==============================================================*/ ==============================================================*/
body{height:auto;} /* to avoid vertical scroll bar */ body{height:auto;} /* to avoid vertical scroll bar */
a{} a{}
a:visited{} a:visited{}
a:hover{} a:hover{}
a:focus{} a:focus{}
a:active{} a:active{}
h1{} h1{}
h2{} h2{}
h3{} h3{}
h4{} h4{}
h5{} h5{}
h6{} h6{}
div.flash.flash-center{left:25%;right:25%;} div.flash.flash-center{left:25%;right:25%;}
div.flash.flash-top,div.flash.flash-top:hover{ div.flash.flash-top,div.flash.flash-top:hover{
position:relative; position:relative;
display:block; display:block;
margin:0; margin:0;
padding:1em; padding:1em;
top:0; top:0;
left:0; left:0;
width:100%; width:100%;
text-align:center; text-align:center;
text-shadow:0 1px 0 rgba(255, 255, 255, 0.5); text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);
color:#865100; color:#865100;
background:#feea9a; background:#feea9a;
border:1px solid; border:1px solid;
border-top:0px; border-top:0px;
border-left:0px; border-left:0px;
border-right:0px; border-right:0px;
border-radius:0; border-radius:0;
opacity:1; opacity:1;
} }
#header{margin-top:60px;} #header{margin-top:60px;}
.mastheader h1 { .mastheader h1 {
margin-bottom:9px; margin-bottom:9px;
font-size:81px; font-size:81px;
font-weight:bold; font-weight:bold;
letter-spacing:-1px; letter-spacing:-1px;
line-height:1; line-height:1;
font-size:54px; font-size:54px;
} }
.mastheader small { .mastheader small {
font-size:20px; font-size:20px;
font-weight:300; font-weight:300;
} }
/* auth navbar - primitive style */ /* auth navbar - primitive style */
.auth_navbar,.auth_navbar a{color:inherit;} .auth_navbar,.auth_navbar a{color:inherit;}
.navbar-inner {-webkit-border-radius:0;-moz-border-radius:0;border-radius:0} .navbar-inner {-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}
.ie-lte7 .auth_navbar,.auth_navbar a{color:expression(this.parentNode.currentStyle['color']); /* ie7 doesn't support inherit */} .ie-lte7 .auth_navbar,.auth_navbar a{color:expression(this.parentNode.currentStyle['color']); /* ie7 doesn't support inherit */}
.auth_navbar a{white-space:nowrap;} /* to avoid the nav split on more lines */ .auth_navbar a{white-space:nowrap;} /* to avoid the nav split on more lines */
.auth_navbar a:hover{color:white;text-decoration:none;} .auth_navbar a:hover{color:white;text-decoration:none;}
ul#navbar>.auth_navbar{ ul#navbar>.auth_navbar{
display:inline-block; display:inline-block;
padding:5px; padding:5px;
} }
/* form errors message box customization */ /* form errors message box customization */
div.error_wrapper{margin-bottom:9px;} div.error_wrapper{margin-bottom:9px;}
div.error_wrapper .error{ div.error_wrapper .error{
border-radius: 4px; border-radius: 4px;
-o-border-radius: 4px; -o-border-radius: 4px;
-moz-border-radius: 4px; -moz-border-radius: 4px;
-webkit-border-radius: 4px; -webkit-border-radius: 4px;
} }
/* below rules are only for formstyle = bootstrap /* below rules are only for formstyle = bootstrap
trying to make errors look like bootstrap ones */ trying to make errors look like bootstrap ones */
div.controls .error_wrapper{ div.controls .error_wrapper{
display:inline-block; display:inline-block;
margin-bottom:0; margin-bottom:0;
vertical-align:middle; vertical-align:middle;
} }
div.controls .error{ div.controls .error{
min-width:5px; min-width:5px;
background:inherit; background:inherit;
color:#B94A48; color:#B94A48;
border:none; border:none;
padding:0; padding:0;
margin:0; margin:0;
/*display:inline;*/ /* uncommenting this, the animation effect is lost */ /*display:inline;*/ /* uncommenting this, the animation effect is lost */
} }
div.controls .help-inline{color:#3A87AD;} div.controls .help-inline{color:#3A87AD;}
div.controls .error_wrapper +.help-inline {margin-left:-99999px;} div.controls .error_wrapper +.help-inline {margin-left:-99999px;}
div.controls select +.error_wrapper {margin-left:5px;} div.controls select +.error_wrapper {margin-left:5px;}
.ie-lte7 div.error{color:#fff;} .ie-lte7 div.error{color:#fff;}
/* beautify brand */ /* beautify brand */
.navbar {margin-bottom:0} .navbar {margin-bottom:0}
.navbar-inverse .brand{color:#c6cecc;} .navbar-inverse .brand{color:#c6cecc;}
.navbar-inverse .brand b{display:inline-block;margin-top:-1px;} .navbar-inverse .brand b{display:inline-block;margin-top:-1px;}
.navbar-inverse .brand b>span{font-size:22px;color:white} .navbar-inverse .brand b>span{font-size:22px;color:white}
.navbar-inverse .brand:hover b>span{color:white} .navbar-inverse .brand:hover b>span{color:white}
/* beautify web2py link in navbar */ /* beautify web2py link in navbar */
span.highlighted{color:#d8d800;} span.highlighted{color:#d8d800;}
.open span.highlighted{color:#ffff00;} .open span.highlighted{color:#ffff00;}
/*============================================================= /*=============================================================
OVERRIDING WEB2PY.CSS RULES OVERRIDING WEB2PY.CSS RULES
==============================================================*/ ==============================================================*/
/* reset to default */ /* reset to default */
a{white-space:normal;} a{white-space:normal;}
li{margin-bottom:0;} li{margin-bottom:0;}
textarea,button{display:block;} textarea,button{display:block;}
/*reset ul padding */ /*reset ul padding */
ul#navbar{padding:0;} ul#navbar{padding:0;}
/* label aligned to related input */ /* label aligned to related input */
td.w2p_fl,td.w2p_fc {padding:0;} td.w2p_fl,td.w2p_fc {padding:0;}
#web2py_user_form td{vertical-align:middle;} #web2py_user_form td{vertical-align:middle;}
/*============================================================= /*=============================================================
OVERRIDING BOOTSTRAP.CSS RULES OVERRIDING BOOTSTRAP.CSS RULES
==============================================================*/ ==============================================================*/
/* because web2py handles this via js */ /* because web2py handles this via js */
textarea { width:90%} textarea { width:90%}
.hidden{visibility:visible;} .hidden{visibility:visible;}
/* right folder for bootstrap black images/icons */ /* right folder for bootstrap black images/icons */
[class^="icon-"],[class*=" icon-"]{ [class^="icon-"],[class*=" icon-"]{
background-image:url("../images/glyphicons-halflings.png") background-image:url("../images/glyphicons-halflings.png")
} }
/* right folder for bootstrap white images/icons */ /* right folder for bootstrap white images/icons */
.icon-white, .icon-white,
.nav-tabs > .active > a > [class^="icon-"], .nav-tabs > .active > a > [class^="icon-"],
.nav-tabs > .active > a > [class*=" icon-"], .nav-tabs > .active > a > [class*=" icon-"],
.nav-pills > .active > a > [class^="icon-"], .nav-pills > .active > a > [class^="icon-"],
.nav-pills > .active > a > [class*=" icon-"], .nav-pills > .active > a > [class*=" icon-"],
.nav-list > .active > a > [class^="icon-"], .nav-list > .active > a > [class^="icon-"],
.nav-list > .active > a > [class*=" icon-"], .nav-list > .active > a > [class*=" icon-"],
.navbar-inverse .nav > .active > a > [class^="icon-"], .navbar-inverse .nav > .active > a > [class^="icon-"],
.navbar-inverse .nav > .active > a > [class*=" icon-"], .navbar-inverse .nav > .active > a > [class*=" icon-"],
.dropdown-menu > li > a:hover > [class^="icon-"], .dropdown-menu > li > a:hover > [class^="icon-"],
.dropdown-menu > li > a:hover > [class*=" icon-"], .dropdown-menu > li > a:hover > [class*=" icon-"],
.dropdown-menu > .active > a > [class^="icon-"], .dropdown-menu > .active > a > [class^="icon-"],
.dropdown-menu > .active > a > [class*=" icon-"] { .dropdown-menu > .active > a > [class*=" icon-"] {
background-image:url("../images/glyphicons-halflings-white.png"); background-image:url("../images/glyphicons-halflings-white.png");
} }
/* bootstrap has a label as input's wrapper while web2py has a div */ /* bootstrap has a label as input's wrapper while web2py has a div */
div>input[type="radio"],div>input[type="checkbox"]{margin:0;} div>input[type="radio"],div>input[type="checkbox"]{margin:0;}
/* bootstrap has button instead of input */ /* bootstrap has button instead of input */
input[type="button"], input[type="submit"]{margin-right:8px;} input[type="button"], input[type="submit"]{margin-right:8px;}
/*============================================================= /* web2py radio widget adjustment */
RULES FOR SOLVING CONFLICTS BETWEEN WEB2PY.CSS AND BOOTSTRAP.CSS .generic-widget input[type='radio'] {margin:-1px 0 0 0; vertical-align: middle;}
==============================================================*/ .generic-widget input[type='radio'] + label {display:inline-block; margin:0 0 0 6px; vertical-align: middle;}
/*when formstyle=table3cols*/ /*=============================================================
tr#auth_user_remember__row>td.w2p_fw>div{padding-bottom:8px;} RULES FOR SOLVING CONFLICTS BETWEEN WEB2PY.CSS AND BOOTSTRAP.CSS
td.w2p_fw div>label{vertical-align:middle;} ==============================================================*/
td.w2p_fc {padding-bottom:5px;}
/*when formstyle=divs*/ /*when formstyle=table3cols*/
div#auth_user_remember__row{margin-top:4px;} tr#auth_user_remember__row>td.w2p_fw>div{padding-bottom:8px;}
div#auth_user_remember__row>.w2p_fl{display:none;} td.w2p_fw div>label{vertical-align:middle;}
div#auth_user_remember__row>.w2p_fw{min-height:39px;} td.w2p_fc {padding-bottom:5px;}
div.w2p_fw,div.w2p_fc{ /*when formstyle=divs*/
display:inline-block; div#auth_user_remember__row{margin-top:4px;}
vertical-align:middle; div#auth_user_remember__row>.w2p_fl{display:none;}
margin-bottom:0; div#auth_user_remember__row>.w2p_fw{min-height:39px;}
} div.w2p_fw,div.w2p_fc{
div.w2p_fc{ display:inline-block;
padding-left:5px; vertical-align:middle;
margin-top:-8px; margin-bottom:0;
} }
/*when formstyle=ul*/ div.w2p_fc{
form>ul{ padding-left:5px;
list-style:none; margin-top:-8px;
margin:0; }
} /*when formstyle=ul*/
li#auth_user_remember__row{margin-top:4px;} form>ul{
li#auth_user_remember__row>.w2p_fl{display:none;} list-style:none;
li#auth_user_remember__row>.w2p_fw{min-height:39px;} margin:0;
/*when formstyle=bootstrap*/ }
#auth_user_remember__row label.checkbox{display:block;} li#auth_user_remember__row{margin-top:4px;}
span.inline-help{display:inline-block;} li#auth_user_remember__row>.w2p_fl{display:none;}
input[type="text"].input-xlarge,input[type="password"].input-xlarge{width:270px;} li#auth_user_remember__row>.w2p_fw{min-height:39px;}
/*when recaptcha is used*/ /*when formstyle=bootstrap*/
#recaptcha{min-height:30px;display:inline-block;margin-bottom:0;line-height:30px;vertical-align:middle;} #auth_user_remember__row label.checkbox{display:block;}
td>#recaptcha{margin-bottom:6px;} span.inline-help{display:inline-block;}
div>#recaptcha{margin-bottom:9px;} input[type="text"].input-xlarge,input[type="password"].input-xlarge{width:270px;}
div.control-group.error{ /*when recaptcha is used*/
width:auto; #recaptcha{min-height:30px;display:inline-block;margin-bottom:0;line-height:30px;vertical-align:middle;}
background:transparent; td>#recaptcha{margin-bottom:6px;}
border:0; div>#recaptcha{margin-bottom:9px;}
color:inherit; div.control-group.error{
padding:0; width:auto;
background-repeat:repeat; background:transparent;
} border:0;
color:inherit;
/*============================================================= padding:0;
OTHER RULES background-repeat:repeat;
==============================================================*/ }
/* Massimo Di Pierro fixed alignment in forms with list:string */ /*=============================================================
form table tr{margin-bottom:9px;} OTHER RULES
td.w2p_fw ul{margin-left:0px;} ==============================================================*/
/* web2py_console in grid and smartgrid */ /* Massimo Di Pierro fixed alignment in forms with list:string */
.hidden{visibility:visible;} form table tr{margin-bottom:9px;}
.web2py_console input{ td.w2p_fw ul{margin-left:0px;}
display: inline-block;
margin-bottom: 0; /* web2py_console in grid and smartgrid */
vertical-align: middle; .hidden{visibility:visible;}
} .web2py_console input{
.web2py_console input[type="submit"], display: inline-block;
.web2py_console input[type="button"], margin-bottom: 0;
.web2py_console button{ vertical-align: middle;
padding-top:4px; }
padding-bottom:4px; .web2py_console input[type="submit"],
margin:3px 0 0 2px; .web2py_console input[type="button"],
} .web2py_console button{
.web2py_console a, padding-top:4px;
.web2py_console select, padding-bottom:4px;
.web2py_console input margin:3px 0 0 2px;
{ }
margin:3px 0 0 2px; .web2py_console a,
} .web2py_console select,
.web2py_grid form table{width:auto;} .web2py_console input
/* auth_user_remember checkbox extrapadding in IE fix */ {
.ie-lte9 input#auth_user_remember.checkbox {padding-left:0;} margin:3px 0 0 2px;
}
div.controls .error { .web2py_grid form table{width:auto;}
width: auto; /* auth_user_remember checkbox extrapadding in IE fix */
} .ie-lte9 input#auth_user_remember.checkbox {padding-left:0;}
/*============================================================= div.controls .error {
MEDIA QUERIES width: auto;
==============================================================*/ }
@media only screen and (max-width:979px){ /*=============================================================
body{padding-top:0px;} MEDIA QUERIES
#navbar{top:5px;} ==============================================================*/
div.flash{right:5px;}
.dropdown-menu ul{visibility:visible;} @media only screen and (max-width:979px){
} body{padding-top:0px;}
@media only screen and (max-width:479px){ #navbar{/*top:5px;*/}
body{ div.flash{right:5px;}
padding-left:10px; .dropdown-menu ul{visibility:visible;}
padding-right:10px; }
}
.navbar-fixed-top,.navbar-fixed-bottom { @media only screen and (max-width:479px){
margin-left:-10px; body{
margin-right:-10px; padding-left:10px;
} padding-right:10px;
input[type="text"],input[type="password"],select{ }
width:95%; .navbar-fixed-top,.navbar-fixed-bottom {
} margin-left:-10px;
} margin-right:-10px;
}
input[type="text"],input[type="password"],select{
width:95%;
}
}
@media (max-width: 767px) {
.navbar {
margin-right: -20px;
margin-left: -20px;
}
}
+3 -1
View File
@@ -72,6 +72,7 @@
var date_format = (typeof w2p_ajax_date_format != 'undefined') ? w2p_ajax_date_format : "%Y-%m-%d"; var date_format = (typeof w2p_ajax_date_format != 'undefined') ? w2p_ajax_date_format : "%Y-%m-%d";
var datetime_format = (typeof w2p_ajax_datetime_format != 'undefined') ? w2p_ajax_datetime_format : "%Y-%m-%d %H:%M:%S"; var datetime_format = (typeof w2p_ajax_datetime_format != 'undefined') ? w2p_ajax_datetime_format : "%Y-%m-%d %H:%M:%S";
$("input.date", target).each(function () { $("input.date", target).each(function () {
$(this).attr('autocomplete','off');
Calendar.setup({ Calendar.setup({
inputField: this, inputField: this,
ifFormat: date_format, ifFormat: date_format,
@@ -79,6 +80,7 @@
}); });
}); });
$("input.datetime", target).each(function () { $("input.datetime", target).each(function () {
$(this).attr('autocomplete','off');
Calendar.setup({ Calendar.setup({
inputField: this, inputField: this,
ifFormat: datetime_format, ifFormat: datetime_format,
@@ -87,7 +89,7 @@
}); });
}); });
$("input.time", target).each(function () { $("input.time", target).each(function () {
$(this).timeEntry(); $(this).timeEntry().attr('autocomplete','off');
}); });
/*adds btn class to buttons*/ /*adds btn class to buttons*/
$('button', target).addClass('btn'); $('button', target).addClass('btn');
+7 -2
View File
@@ -65,10 +65,15 @@ jQuery(document).on('click', '#filesTab button[class="close"]', function (e) {
} }
if (close) { if (close) {
if (tab_header.hasClass('active') === true) { //Set active an other tab if (tab_header.hasClass('active') === true) { //Set active an other tab
jQuery(tab_header).prev().children('a[data-toggle="tab"]').tab('show'); // Select first tab var $prev = jQuery(tab_header).prev();
if ($prev.length) {
$prev.children('a[data-toggle="tab"]').tab('show'); // select previous tab
} else {
jQuery(tab_header).next().children('a[data-toggle="tab"]').tab('show'); // select next tab
}
} }
tab_header.remove(); //remove li of tab tab_header.remove(); //remove li of tab
tab_body.remove(); //remove li of tab tab_body.remove(); //remove tab content (div)
} }
}); });
+5 -2
View File
@@ -145,8 +145,11 @@
<p>{{=button(URL('wizard','index'), T('Start wizard'))}}<br/> <p>{{=button(URL('wizard','index'), T('Start wizard'))}}<br/>
{{=T("(requires internet access, experimental)")}}</p> {{=T("(requires internet access, experimental)")}}</p>
</div> <!-- /APP WIZARD --> </div> <!-- /APP WIZARD -->
<a class="twitter-timeline" href="https://twitter.com/web2py" data-widget-id="340456915207327745">Tweets by @web2py</a> <!-- TWITTER TIMELINE -->
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> <div class="box twitter-timeline">
<a class="twitter-timeline" href="https://twitter.com/web2py" data-widget-id="340456915207327745">Tweets by @web2py</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</div><!-- /TWITTER TIMELINE -->
</div> </div>
</div> <!-- /sidebar --> </div> <!-- /sidebar -->
</div> <!-- /row-fluid </div> <!-- /row-fluid
@@ -1,252 +1,264 @@
/*============================================================= /*=============================================================
CUSTOM RULES CUSTOM RULES
==============================================================*/ ==============================================================*/
body{height:auto;} /* to avoid vertical scroll bar */ body{height:auto;} /* to avoid vertical scroll bar */
a{} a{}
a:visited{} a:visited{}
a:hover{} a:hover{}
a:focus{} a:focus{}
a:active{} a:active{}
h1{} h1{}
h2{} h2{}
h3{} h3{}
h4{} h4{}
h5{} h5{}
h6{} h6{}
div.flash.flash-center{left:25%;right:25%;} div.flash.flash-center{left:25%;right:25%;}
div.flash.flash-top,div.flash.flash-top:hover{ div.flash.flash-top,div.flash.flash-top:hover{
position:relative; position:relative;
display:block; display:block;
margin:0; margin:0;
padding:1em; padding:1em;
top:0; top:0;
left:0; left:0;
width:100%; width:100%;
text-align:center; text-align:center;
text-shadow:0 1px 0 rgba(255, 255, 255, 0.5); text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);
color:#865100; color:#865100;
background:#feea9a; background:#feea9a;
border:1px solid; border:1px solid;
border-top:0px; border-top:0px;
border-left:0px; border-left:0px;
border-right:0px; border-right:0px;
border-radius:0; border-radius:0;
opacity:1; opacity:1;
} }
#header{margin-top:60px;} #header{margin-top:60px;}
.mastheader h1 { .mastheader h1 {
margin-bottom:9px; margin-bottom:9px;
font-size:81px; font-size:81px;
font-weight:bold; font-weight:bold;
letter-spacing:-1px; letter-spacing:-1px;
line-height:1; line-height:1;
font-size:54px; font-size:54px;
} }
.mastheader small { .mastheader small {
font-size:20px; font-size:20px;
font-weight:300; font-weight:300;
} }
/* auth navbar - primitive style */ /* auth navbar - primitive style */
.auth_navbar,.auth_navbar a{color:inherit;} .auth_navbar,.auth_navbar a{color:inherit;}
.navbar-inner {-webkit-border-radius:0;-moz-border-radius:0;border-radius:0} .navbar-inner {-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}
.ie-lte7 .auth_navbar,.auth_navbar a{color:expression(this.parentNode.currentStyle['color']); /* ie7 doesn't support inherit */} .ie-lte7 .auth_navbar,.auth_navbar a{color:expression(this.parentNode.currentStyle['color']); /* ie7 doesn't support inherit */}
.auth_navbar a{white-space:nowrap;} /* to avoid the nav split on more lines */ .auth_navbar a{white-space:nowrap;} /* to avoid the nav split on more lines */
.auth_navbar a:hover{color:white;text-decoration:none;} .auth_navbar a:hover{color:white;text-decoration:none;}
ul#navbar>.auth_navbar{ ul#navbar>.auth_navbar{
display:inline-block; display:inline-block;
padding:5px; padding:5px;
} }
/* form errors message box customization */ /* form errors message box customization */
div.error_wrapper{margin-bottom:9px;} div.error_wrapper{margin-bottom:9px;}
div.error_wrapper .error{ div.error_wrapper .error{
border-radius: 4px; border-radius: 4px;
-o-border-radius: 4px; -o-border-radius: 4px;
-moz-border-radius: 4px; -moz-border-radius: 4px;
-webkit-border-radius: 4px; -webkit-border-radius: 4px;
} }
/* below rules are only for formstyle = bootstrap /* below rules are only for formstyle = bootstrap
trying to make errors look like bootstrap ones */ trying to make errors look like bootstrap ones */
div.controls .error_wrapper{ div.controls .error_wrapper{
display:inline-block; display:inline-block;
margin-bottom:0; margin-bottom:0;
vertical-align:middle; vertical-align:middle;
} }
div.controls .error{ div.controls .error{
min-width:5px; min-width:5px;
background:inherit; background:inherit;
color:#B94A48; color:#B94A48;
border:none; border:none;
padding:0; padding:0;
margin:0; margin:0;
/*display:inline;*/ /* uncommenting this, the animation effect is lost */ /*display:inline;*/ /* uncommenting this, the animation effect is lost */
} }
div.controls .help-inline{color:#3A87AD;} div.controls .help-inline{color:#3A87AD;}
div.controls .error_wrapper +.help-inline {margin-left:-99999px;} div.controls .error_wrapper +.help-inline {margin-left:-99999px;}
div.controls select +.error_wrapper {margin-left:5px;} div.controls select +.error_wrapper {margin-left:5px;}
.ie-lte7 div.error{color:#fff;} .ie-lte7 div.error{color:#fff;}
/* beautify brand */ /* beautify brand */
.navbar {margin-bottom:0} .navbar {margin-bottom:0}
.navbar-inverse .brand{color:#c6cecc;} .navbar-inverse .brand{color:#c6cecc;}
.navbar-inverse .brand b{display:inline-block;margin-top:-1px;} .navbar-inverse .brand b{display:inline-block;margin-top:-1px;}
.navbar-inverse .brand b>span{font-size:22px;color:white} .navbar-inverse .brand b>span{font-size:22px;color:white}
.navbar-inverse .brand:hover b>span{color:white} .navbar-inverse .brand:hover b>span{color:white}
/* beautify web2py link in navbar */ /* beautify web2py link in navbar */
span.highlighted{color:#d8d800;} span.highlighted{color:#d8d800;}
.open span.highlighted{color:#ffff00;} .open span.highlighted{color:#ffff00;}
/*============================================================= /*=============================================================
OVERRIDING WEB2PY.CSS RULES OVERRIDING WEB2PY.CSS RULES
==============================================================*/ ==============================================================*/
/* reset to default */ /* reset to default */
a{white-space:normal;} a{white-space:normal;}
li{margin-bottom:0;} li{margin-bottom:0;}
textarea,button{display:block;} textarea,button{display:block;}
/*reset ul padding */ /*reset ul padding */
ul#navbar{padding:0;} ul#navbar{padding:0;}
/* label aligned to related input */ /* label aligned to related input */
td.w2p_fl,td.w2p_fc {padding:0;} td.w2p_fl,td.w2p_fc {padding:0;}
#web2py_user_form td{vertical-align:middle;} #web2py_user_form td{vertical-align:middle;}
/*============================================================= /*=============================================================
OVERRIDING BOOTSTRAP.CSS RULES OVERRIDING BOOTSTRAP.CSS RULES
==============================================================*/ ==============================================================*/
/* because web2py handles this via js */ /* because web2py handles this via js */
textarea { width:90%} textarea { width:90%}
.hidden{visibility:visible;} .hidden{visibility:visible;}
/* right folder for bootstrap black images/icons */ /* right folder for bootstrap black images/icons */
[class^="icon-"],[class*=" icon-"]{ [class^="icon-"],[class*=" icon-"]{
background-image:url("../images/glyphicons-halflings.png") background-image:url("../images/glyphicons-halflings.png")
} }
/* right folder for bootstrap white images/icons */ /* right folder for bootstrap white images/icons */
.icon-white, .icon-white,
.nav-tabs > .active > a > [class^="icon-"], .nav-tabs > .active > a > [class^="icon-"],
.nav-tabs > .active > a > [class*=" icon-"], .nav-tabs > .active > a > [class*=" icon-"],
.nav-pills > .active > a > [class^="icon-"], .nav-pills > .active > a > [class^="icon-"],
.nav-pills > .active > a > [class*=" icon-"], .nav-pills > .active > a > [class*=" icon-"],
.nav-list > .active > a > [class^="icon-"], .nav-list > .active > a > [class^="icon-"],
.nav-list > .active > a > [class*=" icon-"], .nav-list > .active > a > [class*=" icon-"],
.navbar-inverse .nav > .active > a > [class^="icon-"], .navbar-inverse .nav > .active > a > [class^="icon-"],
.navbar-inverse .nav > .active > a > [class*=" icon-"], .navbar-inverse .nav > .active > a > [class*=" icon-"],
.dropdown-menu > li > a:hover > [class^="icon-"], .dropdown-menu > li > a:hover > [class^="icon-"],
.dropdown-menu > li > a:hover > [class*=" icon-"], .dropdown-menu > li > a:hover > [class*=" icon-"],
.dropdown-menu > .active > a > [class^="icon-"], .dropdown-menu > .active > a > [class^="icon-"],
.dropdown-menu > .active > a > [class*=" icon-"] { .dropdown-menu > .active > a > [class*=" icon-"] {
background-image:url("../images/glyphicons-halflings-white.png"); background-image:url("../images/glyphicons-halflings-white.png");
} }
/* bootstrap has a label as input's wrapper while web2py has a div */ /* bootstrap has a label as input's wrapper while web2py has a div */
div>input[type="radio"],div>input[type="checkbox"]{margin:0;} div>input[type="radio"],div>input[type="checkbox"]{margin:0;}
/* bootstrap has button instead of input */ /* bootstrap has button instead of input */
input[type="button"], input[type="submit"]{margin-right:8px;} input[type="button"], input[type="submit"]{margin-right:8px;}
/*============================================================= /* web2py radio widget adjustment */
RULES FOR SOLVING CONFLICTS BETWEEN WEB2PY.CSS AND BOOTSTRAP.CSS .generic-widget input[type='radio'] {margin:-1px 0 0 0; vertical-align: middle;}
==============================================================*/ .generic-widget input[type='radio'] + label {display:inline-block; margin:0 0 0 6px; vertical-align: middle;}
/*when formstyle=table3cols*/ /*=============================================================
tr#auth_user_remember__row>td.w2p_fw>div{padding-bottom:8px;} RULES FOR SOLVING CONFLICTS BETWEEN WEB2PY.CSS AND BOOTSTRAP.CSS
td.w2p_fw div>label{vertical-align:middle;} ==============================================================*/
td.w2p_fc {padding-bottom:5px;}
/*when formstyle=divs*/ /*when formstyle=table3cols*/
div#auth_user_remember__row{margin-top:4px;} tr#auth_user_remember__row>td.w2p_fw>div{padding-bottom:8px;}
div#auth_user_remember__row>.w2p_fl{display:none;} td.w2p_fw div>label{vertical-align:middle;}
div#auth_user_remember__row>.w2p_fw{min-height:39px;} td.w2p_fc {padding-bottom:5px;}
div.w2p_fw,div.w2p_fc{ /*when formstyle=divs*/
display:inline-block; div#auth_user_remember__row{margin-top:4px;}
vertical-align:middle; div#auth_user_remember__row>.w2p_fl{display:none;}
margin-bottom:0; div#auth_user_remember__row>.w2p_fw{min-height:39px;}
} div.w2p_fw,div.w2p_fc{
div.w2p_fc{ display:inline-block;
padding-left:5px; vertical-align:middle;
margin-top:-8px; margin-bottom:0;
} }
/*when formstyle=ul*/ div.w2p_fc{
form>ul{ padding-left:5px;
list-style:none; margin-top:-8px;
margin:0; }
} /*when formstyle=ul*/
li#auth_user_remember__row{margin-top:4px;} form>ul{
li#auth_user_remember__row>.w2p_fl{display:none;} list-style:none;
li#auth_user_remember__row>.w2p_fw{min-height:39px;} margin:0;
/*when formstyle=bootstrap*/ }
#auth_user_remember__row label.checkbox{display:block;} li#auth_user_remember__row{margin-top:4px;}
span.inline-help{display:inline-block;} li#auth_user_remember__row>.w2p_fl{display:none;}
input[type="text"].input-xlarge,input[type="password"].input-xlarge{width:270px;} li#auth_user_remember__row>.w2p_fw{min-height:39px;}
/*when recaptcha is used*/ /*when formstyle=bootstrap*/
#recaptcha{min-height:30px;display:inline-block;margin-bottom:0;line-height:30px;vertical-align:middle;} #auth_user_remember__row label.checkbox{display:block;}
td>#recaptcha{margin-bottom:6px;} span.inline-help{display:inline-block;}
div>#recaptcha{margin-bottom:9px;} input[type="text"].input-xlarge,input[type="password"].input-xlarge{width:270px;}
div.control-group.error{ /*when recaptcha is used*/
width:auto; #recaptcha{min-height:30px;display:inline-block;margin-bottom:0;line-height:30px;vertical-align:middle;}
background:transparent; td>#recaptcha{margin-bottom:6px;}
border:0; div>#recaptcha{margin-bottom:9px;}
color:inherit; div.control-group.error{
padding:0; width:auto;
background-repeat:repeat; background:transparent;
} border:0;
color:inherit;
/*============================================================= padding:0;
OTHER RULES background-repeat:repeat;
==============================================================*/ }
/* Massimo Di Pierro fixed alignment in forms with list:string */ /*=============================================================
form table tr{margin-bottom:9px;} OTHER RULES
td.w2p_fw ul{margin-left:0px;} ==============================================================*/
/* web2py_console in grid and smartgrid */ /* Massimo Di Pierro fixed alignment in forms with list:string */
.hidden{visibility:visible;} form table tr{margin-bottom:9px;}
.web2py_console input{ td.w2p_fw ul{margin-left:0px;}
display: inline-block;
margin-bottom: 0; /* web2py_console in grid and smartgrid */
vertical-align: middle; .hidden{visibility:visible;}
} .web2py_console input{
.web2py_console input[type="submit"], display: inline-block;
.web2py_console input[type="button"], margin-bottom: 0;
.web2py_console button{ vertical-align: middle;
padding-top:4px; }
padding-bottom:4px; .web2py_console input[type="submit"],
margin:3px 0 0 2px; .web2py_console input[type="button"],
} .web2py_console button{
.web2py_console a, padding-top:4px;
.web2py_console select, padding-bottom:4px;
.web2py_console input margin:3px 0 0 2px;
{ }
margin:3px 0 0 2px; .web2py_console a,
} .web2py_console select,
.web2py_grid form table{width:auto;} .web2py_console input
/* auth_user_remember checkbox extrapadding in IE fix */ {
.ie-lte9 input#auth_user_remember.checkbox {padding-left:0;} margin:3px 0 0 2px;
}
div.controls .error { .web2py_grid form table{width:auto;}
width: auto; /* auth_user_remember checkbox extrapadding in IE fix */
} .ie-lte9 input#auth_user_remember.checkbox {padding-left:0;}
/*============================================================= div.controls .error {
MEDIA QUERIES width: auto;
==============================================================*/ }
@media only screen and (max-width:979px){ /*=============================================================
body{padding-top:0px;} MEDIA QUERIES
#navbar{top:5px;} ==============================================================*/
div.flash{right:5px;}
.dropdown-menu ul{visibility:visible;} @media only screen and (max-width:979px){
} body{padding-top:0px;}
@media only screen and (max-width:479px){ #navbar{/*top:5px;*/}
body{ div.flash{right:5px;}
padding-left:10px; .dropdown-menu ul{visibility:visible;}
padding-right:10px; }
}
.navbar-fixed-top,.navbar-fixed-bottom { @media only screen and (max-width:479px){
margin-left:-10px; body{
margin-right:-10px; padding-left:10px;
} padding-right:10px;
input[type="text"],input[type="password"],select{ }
width:95%; .navbar-fixed-top,.navbar-fixed-bottom {
} margin-left:-10px;
} margin-right:-10px;
}
input[type="text"],input[type="password"],select{
width:95%;
}
}
@media (max-width: 767px) {
.navbar {
margin-right: -20px;
margin-left: -20px;
}
}
+3 -1
View File
@@ -72,6 +72,7 @@
var date_format = (typeof w2p_ajax_date_format != 'undefined') ? w2p_ajax_date_format : "%Y-%m-%d"; var date_format = (typeof w2p_ajax_date_format != 'undefined') ? w2p_ajax_date_format : "%Y-%m-%d";
var datetime_format = (typeof w2p_ajax_datetime_format != 'undefined') ? w2p_ajax_datetime_format : "%Y-%m-%d %H:%M:%S"; var datetime_format = (typeof w2p_ajax_datetime_format != 'undefined') ? w2p_ajax_datetime_format : "%Y-%m-%d %H:%M:%S";
$("input.date", target).each(function () { $("input.date", target).each(function () {
$(this).attr('autocomplete','off');
Calendar.setup({ Calendar.setup({
inputField: this, inputField: this,
ifFormat: date_format, ifFormat: date_format,
@@ -79,6 +80,7 @@
}); });
}); });
$("input.datetime", target).each(function () { $("input.datetime", target).each(function () {
$(this).attr('autocomplete','off');
Calendar.setup({ Calendar.setup({
inputField: this, inputField: this,
ifFormat: datetime_format, ifFormat: datetime_format,
@@ -87,7 +89,7 @@
}); });
}); });
$("input.time", target).each(function () { $("input.time", target).each(function () {
$(this).timeEntry(); $(this).timeEntry().attr('autocomplete','off');
}); });
/*adds btn class to buttons*/ /*adds btn class to buttons*/
$('button', target).addClass('btn'); $('button', target).addClass('btn');
@@ -1,260 +1,264 @@
/*============================================================= /*=============================================================
CUSTOM RULES CUSTOM RULES
==============================================================*/ ==============================================================*/
body{height:auto;} /* to avoid vertical scroll bar */ body{height:auto;} /* to avoid vertical scroll bar */
a{} a{}
a:visited{} a:visited{}
a:hover{} a:hover{}
a:focus{} a:focus{}
a:active{} a:active{}
h1{} h1{}
h2{} h2{}
h3{} h3{}
h4{} h4{}
h5{} h5{}
h6{} h6{}
div.flash.flash-center{left:25%;right:25%;} div.flash.flash-center{left:25%;right:25%;}
div.flash.flash-top,div.flash.flash-top:hover{ div.flash.flash-top,div.flash.flash-top:hover{
position:relative; position:relative;
display:block; display:block;
margin:0; margin:0;
padding:1em; padding:1em;
top:0; top:0;
left:0; left:0;
width:100%; width:100%;
text-align:center; text-align:center;
text-shadow:0 1px 0 rgba(255, 255, 255, 0.5); text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);
color:#865100; color:#865100;
background:#feea9a; background:#feea9a;
border:1px solid; border:1px solid;
border-top:0px; border-top:0px;
border-left:0px; border-left:0px;
border-right:0px; border-right:0px;
border-radius:0; border-radius:0;
opacity:1; opacity:1;
} }
#header{margin-top:60px;} #header{margin-top:60px;}
.mastheader h1 { .mastheader h1 {
margin-bottom:9px; margin-bottom:9px;
font-size:81px; font-size:81px;
font-weight:bold; font-weight:bold;
letter-spacing:-1px; letter-spacing:-1px;
line-height:1; line-height:1;
font-size:54px; font-size:54px;
} }
.mastheader small { .mastheader small {
font-size:20px; font-size:20px;
font-weight:300; font-weight:300;
} }
/* auth navbar - primitive style */ /* auth navbar - primitive style */
.auth_navbar,.auth_navbar a{color:inherit;} .auth_navbar,.auth_navbar a{color:inherit;}
.navbar-inner {-webkit-border-radius:0;-moz-border-radius:0;border-radius:0} .navbar-inner {-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}
.ie-lte7 .auth_navbar,.auth_navbar a{color:expression(this.parentNode.currentStyle['color']); /* ie7 doesn't support inherit */} .ie-lte7 .auth_navbar,.auth_navbar a{color:expression(this.parentNode.currentStyle['color']); /* ie7 doesn't support inherit */}
.auth_navbar a{white-space:nowrap;} /* to avoid the nav split on more lines */ .auth_navbar a{white-space:nowrap;} /* to avoid the nav split on more lines */
.auth_navbar a:hover{color:white;text-decoration:none;} .auth_navbar a:hover{color:white;text-decoration:none;}
ul#navbar>.auth_navbar{ ul#navbar>.auth_navbar{
display:inline-block; display:inline-block;
padding:5px; padding:5px;
} }
/* form errors message box customization */ /* form errors message box customization */
div.error_wrapper{margin-bottom:9px;} div.error_wrapper{margin-bottom:9px;}
div.error_wrapper .error{ div.error_wrapper .error{
border-radius: 4px; border-radius: 4px;
-o-border-radius: 4px; -o-border-radius: 4px;
-moz-border-radius: 4px; -moz-border-radius: 4px;
-webkit-border-radius: 4px; -webkit-border-radius: 4px;
} }
/* below rules are only for formstyle = bootstrap /* below rules are only for formstyle = bootstrap
trying to make errors look like bootstrap ones */ trying to make errors look like bootstrap ones */
div.controls .error_wrapper{ div.controls .error_wrapper{
display:inline-block; display:inline-block;
margin-bottom:0; margin-bottom:0;
vertical-align:middle; vertical-align:middle;
} }
div.controls .error{ div.controls .error{
min-width:5px; min-width:5px;
background:inherit; background:inherit;
color:#B94A48; color:#B94A48;
border:none; border:none;
padding:0; padding:0;
margin:0; margin:0;
/*display:inline;*/ /* uncommenting this, the animation effect is lost */ /*display:inline;*/ /* uncommenting this, the animation effect is lost */
} }
div.controls .help-inline{color:#3A87AD;} div.controls .help-inline{color:#3A87AD;}
div.controls .error_wrapper +.help-inline {margin-left:-99999px;} div.controls .error_wrapper +.help-inline {margin-left:-99999px;}
div.controls select +.error_wrapper {margin-left:5px;} div.controls select +.error_wrapper {margin-left:5px;}
.ie-lte7 div.error{color:#fff;} .ie-lte7 div.error{color:#fff;}
/* beautify brand */ /* beautify brand */
.navbar {margin-bottom:0} .navbar {margin-bottom:0}
.navbar-inverse .brand{color:#c6cecc;} .navbar-inverse .brand{color:#c6cecc;}
.navbar-inverse .brand b{display:inline-block;margin-top:-1px;} .navbar-inverse .brand b{display:inline-block;margin-top:-1px;}
.navbar-inverse .brand b>span{font-size:22px;color:white} .navbar-inverse .brand b>span{font-size:22px;color:white}
.navbar-inverse .brand:hover b>span{color:white} .navbar-inverse .brand:hover b>span{color:white}
/* beautify web2py link in navbar */ /* beautify web2py link in navbar */
span.highlighted{color:#d8d800;} span.highlighted{color:#d8d800;}
.open span.highlighted{color:#ffff00;} .open span.highlighted{color:#ffff00;}
/*============================================================= /*=============================================================
OVERRIDING WEB2PY.CSS RULES OVERRIDING WEB2PY.CSS RULES
==============================================================*/ ==============================================================*/
/* reset to default */ /* reset to default */
a{white-space:normal;} a{white-space:normal;}
li{margin-bottom:0;} li{margin-bottom:0;}
textarea,button{display:block;} textarea,button{display:block;}
/*reset ul padding */ /*reset ul padding */
ul#navbar{padding:0;} ul#navbar{padding:0;}
/* label aligned to related input */ /* label aligned to related input */
td.w2p_fl,td.w2p_fc {padding:0;} td.w2p_fl,td.w2p_fc {padding:0;}
#web2py_user_form td{vertical-align:middle;} #web2py_user_form td{vertical-align:middle;}
/*============================================================= /*=============================================================
OVERRIDING BOOTSTRAP.CSS RULES OVERRIDING BOOTSTRAP.CSS RULES
==============================================================*/ ==============================================================*/
/* because web2py handles this via js */ /* because web2py handles this via js */
textarea { width:90%} textarea { width:90%}
.hidden{visibility:visible;} .hidden{visibility:visible;}
/* right folder for bootstrap black images/icons */ /* right folder for bootstrap black images/icons */
[class^="icon-"],[class*=" icon-"]{ [class^="icon-"],[class*=" icon-"]{
background-image:url("../images/glyphicons-halflings.png") background-image:url("../images/glyphicons-halflings.png")
} }
/* right folder for bootstrap white images/icons */ /* right folder for bootstrap white images/icons */
.icon-white, .icon-white,
.nav-tabs > .active > a > [class^="icon-"], .nav-tabs > .active > a > [class^="icon-"],
.nav-tabs > .active > a > [class*=" icon-"], .nav-tabs > .active > a > [class*=" icon-"],
.nav-pills > .active > a > [class^="icon-"], .nav-pills > .active > a > [class^="icon-"],
.nav-pills > .active > a > [class*=" icon-"], .nav-pills > .active > a > [class*=" icon-"],
.nav-list > .active > a > [class^="icon-"], .nav-list > .active > a > [class^="icon-"],
.nav-list > .active > a > [class*=" icon-"], .nav-list > .active > a > [class*=" icon-"],
.navbar-inverse .nav > .active > a > [class^="icon-"], .navbar-inverse .nav > .active > a > [class^="icon-"],
.navbar-inverse .nav > .active > a > [class*=" icon-"], .navbar-inverse .nav > .active > a > [class*=" icon-"],
.dropdown-menu > li > a:hover > [class^="icon-"], .dropdown-menu > li > a:hover > [class^="icon-"],
.dropdown-menu > li > a:hover > [class*=" icon-"], .dropdown-menu > li > a:hover > [class*=" icon-"],
.dropdown-menu > .active > a > [class^="icon-"], .dropdown-menu > .active > a > [class^="icon-"],
.dropdown-menu > .active > a > [class*=" icon-"] { .dropdown-menu > .active > a > [class*=" icon-"] {
background-image:url("../images/glyphicons-halflings-white.png"); background-image:url("../images/glyphicons-halflings-white.png");
} }
/* bootstrap has a label as input's wrapper while web2py has a div */ /* bootstrap has a label as input's wrapper while web2py has a div */
div>input[type="radio"],div>input[type="checkbox"]{margin:0;} div>input[type="radio"],div>input[type="checkbox"]{margin:0;}
/* bootstrap has button instead of input */ /* bootstrap has button instead of input */
input[type="button"], input[type="submit"]{margin-right:8px;} input[type="button"], input[type="submit"]{margin-right:8px;}
/*============================================================= /* web2py radio widget adjustment */
RULES FOR SOLVING CONFLICTS BETWEEN WEB2PY.CSS AND BOOTSTRAP.CSS .generic-widget input[type='radio'] {margin:-1px 0 0 0; vertical-align: middle;}
==============================================================*/ .generic-widget input[type='radio'] + label {display:inline-block; margin:0 0 0 6px; vertical-align: middle;}
/*when formstyle=table3cols*/ /*=============================================================
tr#auth_user_remember__row>td.w2p_fw>div{padding-bottom:8px;} RULES FOR SOLVING CONFLICTS BETWEEN WEB2PY.CSS AND BOOTSTRAP.CSS
td.w2p_fw div>label{vertical-align:middle;} ==============================================================*/
td.w2p_fc {padding-bottom:5px;}
/*when formstyle=divs*/ /*when formstyle=table3cols*/
div#auth_user_remember__row{margin-top:4px;} tr#auth_user_remember__row>td.w2p_fw>div{padding-bottom:8px;}
div#auth_user_remember__row>.w2p_fl{display:none;} td.w2p_fw div>label{vertical-align:middle;}
div#auth_user_remember__row>.w2p_fw{min-height:39px;} td.w2p_fc {padding-bottom:5px;}
div.w2p_fw,div.w2p_fc{ /*when formstyle=divs*/
display:inline-block; div#auth_user_remember__row{margin-top:4px;}
vertical-align:middle; div#auth_user_remember__row>.w2p_fl{display:none;}
margin-bottom:0; div#auth_user_remember__row>.w2p_fw{min-height:39px;}
} div.w2p_fw,div.w2p_fc{
div.w2p_fc{ display:inline-block;
padding-left:5px; vertical-align:middle;
margin-top:-8px; margin-bottom:0;
} }
/*when formstyle=ul*/ div.w2p_fc{
form>ul{ padding-left:5px;
list-style:none; margin-top:-8px;
margin:0; }
} /*when formstyle=ul*/
li#auth_user_remember__row{margin-top:4px;} form>ul{
li#auth_user_remember__row>.w2p_fl{display:none;} list-style:none;
li#auth_user_remember__row>.w2p_fw{min-height:39px;} margin:0;
/*when formstyle=bootstrap*/ }
#auth_user_remember__row label.checkbox{display:block;} li#auth_user_remember__row{margin-top:4px;}
span.inline-help{display:inline-block;} li#auth_user_remember__row>.w2p_fl{display:none;}
input[type="text"].input-xlarge,input[type="password"].input-xlarge{width:270px;} li#auth_user_remember__row>.w2p_fw{min-height:39px;}
/*when recaptcha is used*/ /*when formstyle=bootstrap*/
#recaptcha{min-height:30px;display:inline-block;margin-bottom:0;line-height:30px;vertical-align:middle;} #auth_user_remember__row label.checkbox{display:block;}
td>#recaptcha{margin-bottom:6px;} span.inline-help{display:inline-block;}
div>#recaptcha{margin-bottom:9px;} input[type="text"].input-xlarge,input[type="password"].input-xlarge{width:270px;}
div.control-group.error{ /*when recaptcha is used*/
width:auto; #recaptcha{min-height:30px;display:inline-block;margin-bottom:0;line-height:30px;vertical-align:middle;}
background:transparent; td>#recaptcha{margin-bottom:6px;}
border:0; div>#recaptcha{margin-bottom:9px;}
color:inherit; div.control-group.error{
padding:0; width:auto;
background-repeat:repeat; background:transparent;
} border:0;
color:inherit;
/*============================================================= padding:0;
OTHER RULES background-repeat:repeat;
==============================================================*/ }
/* Massimo Di Pierro fixed alignment in forms with list:string */ /*=============================================================
form table tr{margin-bottom:9px;} OTHER RULES
td.w2p_fw ul{margin-left:0px;} ==============================================================*/
/* web2py_console in grid and smartgrid */ /* Massimo Di Pierro fixed alignment in forms with list:string */
.hidden{visibility:visible;} form table tr{margin-bottom:9px;}
.web2py_console input{ td.w2p_fw ul{margin-left:0px;}
display: inline-block;
margin-bottom: 0; /* web2py_console in grid and smartgrid */
vertical-align: middle; .hidden{visibility:visible;}
} .web2py_console input{
.web2py_console input[type="submit"], display: inline-block;
.web2py_console input[type="button"], margin-bottom: 0;
.web2py_console button{ vertical-align: middle;
padding-top:4px; }
padding-bottom:4px; .web2py_console input[type="submit"],
margin:3px 0 0 2px; .web2py_console input[type="button"],
} .web2py_console button{
.web2py_console a, padding-top:4px;
.web2py_console select, padding-bottom:4px;
.web2py_console input margin:3px 0 0 2px;
{ }
margin:3px 0 0 2px; .web2py_console a,
} .web2py_console select,
.web2py_grid form table{width:auto;} .web2py_console input
/* auth_user_remember checkbox extrapadding in IE fix */ {
.ie-lte9 input#auth_user_remember.checkbox {padding-left:0;} margin:3px 0 0 2px;
}
div.controls .error { .web2py_grid form table{width:auto;}
width: auto; /* auth_user_remember checkbox extrapadding in IE fix */
} .ie-lte9 input#auth_user_remember.checkbox {padding-left:0;}
/*============================================================= div.controls .error {
MEDIA QUERIES width: auto;
==============================================================*/ }
@media only screen and (max-width:979px){ /*=============================================================
body{padding-top:0px;} MEDIA QUERIES
#navbar{/*top:5px;*/} ==============================================================*/
div.flash{right:5px;}
.dropdown-menu ul{visibility:visible;} @media only screen and (max-width:979px){
} body{padding-top:0px;}
#navbar{/*top:5px;*/}
@media only screen and (max-width:479px){ div.flash{right:5px;}
body{ .dropdown-menu ul{visibility:visible;}
padding-left:10px; }
padding-right:10px;
} @media only screen and (max-width:479px){
.navbar-fixed-top,.navbar-fixed-bottom { body{
margin-left:-10px; padding-left:10px;
margin-right:-10px; padding-right:10px;
} }
input[type="text"],input[type="password"],select{ .navbar-fixed-top,.navbar-fixed-bottom {
width:95%; margin-left:-10px;
} margin-right:-10px;
} }
input[type="text"],input[type="password"],select{
@media (max-width: 767px) { width:95%;
.navbar { }
margin-right: -20px; }
margin-left: -20px;
} @media (max-width: 767px) {
} .navbar {
margin-right: -20px;
margin-left: -20px;
}
}
+3 -1
View File
@@ -72,6 +72,7 @@
var date_format = (typeof w2p_ajax_date_format != 'undefined') ? w2p_ajax_date_format : "%Y-%m-%d"; var date_format = (typeof w2p_ajax_date_format != 'undefined') ? w2p_ajax_date_format : "%Y-%m-%d";
var datetime_format = (typeof w2p_ajax_datetime_format != 'undefined') ? w2p_ajax_datetime_format : "%Y-%m-%d %H:%M:%S"; var datetime_format = (typeof w2p_ajax_datetime_format != 'undefined') ? w2p_ajax_datetime_format : "%Y-%m-%d %H:%M:%S";
$("input.date", target).each(function () { $("input.date", target).each(function () {
$(this).attr('autocomplete','off');
Calendar.setup({ Calendar.setup({
inputField: this, inputField: this,
ifFormat: date_format, ifFormat: date_format,
@@ -79,6 +80,7 @@
}); });
}); });
$("input.datetime", target).each(function () { $("input.datetime", target).each(function () {
$(this).attr('autocomplete','off');
Calendar.setup({ Calendar.setup({
inputField: this, inputField: this,
ifFormat: datetime_format, ifFormat: datetime_format,
@@ -87,7 +89,7 @@
}); });
}); });
$("input.time", target).each(function () { $("input.time", target).each(function () {
$(this).timeEntry(); $(this).timeEntry().attr('autocomplete','off');
}); });
/*adds btn class to buttons*/ /*adds btn class to buttons*/
$('button', target).addClass('btn'); $('button', target).addClass('btn');
+9 -5
View File
@@ -710,6 +710,7 @@ class BaseAdapter(ConnectionPool):
os.unlink(filename) os.unlink(filename)
def find_driver(self,adapter_args,uri=None): def find_driver(self,adapter_args,uri=None):
self.adapter_args = adapter_args
if getattr(self,'driver',None) != None: if getattr(self,'driver',None) != None:
return return
drivers_available = [driver for driver in self.drivers drivers_available = [driver for driver in self.drivers
@@ -950,7 +951,8 @@ class BaseAdapter(ConnectionPool):
dbpath, '%s_%s.table' % (table._db._uri_hash, tablename)) dbpath, '%s_%s.table' % (table._db._uri_hash, tablename))
if table._dbt: if table._dbt:
table._loggername = pjoin(dbpath, 'sql.log') logfilename = self.adapter_args.get('logfile','sql.log')
table._loggername = pjoin(dbpath, logfilename)
logfile = self.file_open(table._loggername, 'a') logfile = self.file_open(table._loggername, 'a')
else: else:
logfile = None logfile = None
@@ -2108,8 +2110,8 @@ class BaseAdapter(ConnectionPool):
new_rows.append(new_row) new_rows.append(new_row)
rowsobj = Rows(db, new_rows, colnames, rawrows=rows) rowsobj = Rows(db, new_rows, colnames, rawrows=rows)
for tablename in virtualtables: for tablename in virtualtables:
### new style virtual fields
table = db[tablename] table = db[tablename]
fields_virtual = [(f,v) for (f,v) in table.iteritems() fields_virtual = [(f,v) for (f,v) in table.iteritems()
if isinstance(v,FieldVirtual)] if isinstance(v,FieldVirtual)]
@@ -2569,6 +2571,8 @@ class PostgreSQLAdapter(BaseAdapter):
} }
QUOTE_TEMPLATE = '%s'
def varquote(self,name): def varquote(self,name):
return varquote_aux(name,'"%s"') return varquote_aux(name,'"%s"')
@@ -4242,15 +4246,15 @@ class DatabaseStoredFile:
return self.db._adapter.escape(obj) return self.db._adapter.escape(obj)
def __init__(self,db,filename,mode): def __init__(self,db,filename,mode):
if not db._adapter.dbengine in ('mysql', 'postgres'): if not db._adapter.dbengine in ('mysql', 'postgres', 'sqlite'):
raise RuntimeError("only MySQL/Postgres can store metadata .table files in database for now") raise RuntimeError("only MySQL/Postgres/SQLite can store metadata .table files in database for now")
self.db = db self.db = db
self.filename = filename self.filename = filename
self.mode = mode self.mode = mode
if not self.web2py_filesystem: if not self.web2py_filesystem:
if db._adapter.dbengine == 'mysql': if db._adapter.dbengine == 'mysql':
sql = "CREATE TABLE IF NOT EXISTS web2py_filesystem (path VARCHAR(255), content LONGTEXT, PRIMARY KEY(path) ) ENGINE=InnoDB;" sql = "CREATE TABLE IF NOT EXISTS web2py_filesystem (path VARCHAR(255), content LONGTEXT, PRIMARY KEY(path) ) ENGINE=InnoDB;"
elif db._adapter.dbengine == 'postgres': elif db._adapter.dbengine in ('postgres', 'sqlite'):
sql = "CREATE TABLE IF NOT EXISTS web2py_filesystem (path VARCHAR(255), content TEXT, PRIMARY KEY(path));" sql = "CREATE TABLE IF NOT EXISTS web2py_filesystem (path VARCHAR(255), content TEXT, PRIMARY KEY(path));"
self.db.executesql(sql) self.db.executesql(sql)
DatabaseStoredFile.web2py_filesystem = True DatabaseStoredFile.web2py_filesystem = True
+3 -1
View File
@@ -1928,6 +1928,7 @@ class SQLFORM(FORM):
if isinstance(f,Field.Virtual) and f.readable: if isinstance(f,Field.Virtual) and f.readable:
f.tablename = table._tablename f.tablename = table._tablename
columns.append(f) columns.append(f)
fields.append(f)
if not field_id: if not field_id:
field_id = tables[0]._id field_id = tables[0]._id
if not any(str(f)==str(field_id) for f in fields): if not any(str(f)==str(field_id) for f in fields):
@@ -2239,7 +2240,7 @@ class SQLFORM(FORM):
limitby = None limitby = None
try: try:
table_fields = [f for f in fields if f.tablename in tablenames] table_fields = filter(lambda f: f.tablename in tablenames, fields)
if dbset._db._adapter.dbengine=='google:datastore': if dbset._db._adapter.dbengine=='google:datastore':
rows = dbset.select(left=left,orderby=orderby, rows = dbset.select(left=left,orderby=orderby,
groupby=groupby,limitby=limitby, groupby=groupby,limitby=limitby,
@@ -2247,6 +2248,7 @@ class SQLFORM(FORM):
cacheable=True,*table_fields) cacheable=True,*table_fields)
next_cursor = dbset._db.get('_lastcursor', None) next_cursor = dbset._db.get('_lastcursor', None)
else: else:
# print('table_fields: %s' %([f_.name for f_ in table_fields],))
rows = dbset.select(left=left,orderby=orderby, rows = dbset.select(left=left,orderby=orderby,
groupby=groupby,limitby=limitby, groupby=groupby,limitby=limitby,
cacheable=True,*table_fields) cacheable=True,*table_fields)
+3 -1
View File
@@ -1500,7 +1500,7 @@ class Auth(object):
label=T('Modified By'), ondelete=ondelete)) label=T('Modified By'), ondelete=ondelete))
def define_tables(self, username=None, signature=None, def define_tables(self, username=None, signature=None,
migrate=True, fake_migrate=False): migrate=None, fake_migrate=None):
""" """
to be called unless tables are defined manually to be called unless tables are defined manually
@@ -1516,6 +1516,8 @@ class Auth(object):
""" """
db = self.db db = self.db
if migrate is None: migrate = db._migrate
if fake_migrate is None: fake_migrate = db._fake_migrate
settings = self.settings settings = self.settings
if username is None: if username is None:
username = settings.use_username username = settings.use_username
+3 -2
View File
@@ -79,8 +79,9 @@ def mysql(database_name, username, password):
if 'CREATE' in sql_create_stmnt: # check if the table exists if 'CREATE' in sql_create_stmnt: # check if the table exists
#remove garbage lines from sql statement #remove garbage lines from sql statement
sql_lines = sql_create_stmnt.split('\n') sql_lines = sql_create_stmnt.split('\n')
sql_lines = [x for x in sql_lines if not( sql_lines = filter(
x.startswith('--') or x.startswith('/*') or x == '')] lambda x: not(x in ('','\r') or x[:2] in ('--','/*')),
sql_lines)
#generate the web2py code from the create statement #generate the web2py code from the create statement
web2py_table_code = '' web2py_table_code = ''
table_name = re.search( table_name = re.search(