Merge pull request #854 from niphlod/fix/bs3
first iteration on bs3 cleanup
This commit is contained in:
@@ -9,9 +9,15 @@
|
|||||||
## be redirected to HTTPS, uncomment the line below:
|
## be redirected to HTTPS, uncomment the line below:
|
||||||
# request.requires_https()
|
# request.requires_https()
|
||||||
|
|
||||||
|
## app configuration made easy. Look inside private/appconfig.ini
|
||||||
|
from gluon.contrib.appconfig import AppConfig
|
||||||
|
## once in production, remove reload=True to gain full speed
|
||||||
|
myconf = AppConfig(reload=True)
|
||||||
|
|
||||||
|
|
||||||
if not request.env.web2py_runtime_gae:
|
if not request.env.web2py_runtime_gae:
|
||||||
## if NOT running on Google App Engine use SQLite or other DB
|
## if NOT running on Google App Engine use SQLite or other DB
|
||||||
db = DAL('sqlite://storage.sqlite',pool_size=1,check_reserved=['all'])
|
db = DAL(myconf.take('db.uri'), pool_size=myconf.take('db.pool_size', cast=int), check_reserved=['all'])
|
||||||
else:
|
else:
|
||||||
## connect to Google BigTable (optional 'google:datastore://namespace')
|
## connect to Google BigTable (optional 'google:datastore://namespace')
|
||||||
db = DAL('google:datastore+ndb')
|
db = DAL('google:datastore+ndb')
|
||||||
@@ -26,7 +32,9 @@ else:
|
|||||||
## none otherwise. a pattern can be 'controller/function.extension'
|
## none otherwise. a pattern can be 'controller/function.extension'
|
||||||
response.generic_patterns = ['*'] if request.is_local else []
|
response.generic_patterns = ['*'] if request.is_local else []
|
||||||
## choose a style for forms
|
## choose a style for forms
|
||||||
response.formstyle = 'bootstrap3_inline' # or 'bootstrap3_stacked' or 'bootstrap2' or other
|
response.formstyle = myconf.take('forms.formstyle') # or 'bootstrap3_stacked' or 'bootstrap2' or other
|
||||||
|
response.form_label_separator = myconf.take('forms.separator')
|
||||||
|
|
||||||
|
|
||||||
## (optional) optimize handling of static files
|
## (optional) optimize handling of static files
|
||||||
# response.optimize_css = 'concat,minify,inline'
|
# response.optimize_css = 'concat,minify,inline'
|
||||||
@@ -54,20 +62,15 @@ auth.define_tables(username=False, signature=False)
|
|||||||
|
|
||||||
## configure email
|
## configure email
|
||||||
mail = auth.settings.mailer
|
mail = auth.settings.mailer
|
||||||
mail.settings.server = 'logging' if request.is_local else 'smtp.gmail.com:587'
|
mail.settings.server = 'logging' if request.is_local else myconf.take('smtp.sender')
|
||||||
mail.settings.sender = 'you@gmail.com'
|
mail.settings.sender = myconf.take('smtp.sender')
|
||||||
mail.settings.login = 'username:password'
|
mail.settings.login = myconf.take('smtp.login')
|
||||||
|
|
||||||
## configure auth policy
|
## configure auth policy
|
||||||
auth.settings.registration_requires_verification = False
|
auth.settings.registration_requires_verification = False
|
||||||
auth.settings.registration_requires_approval = False
|
auth.settings.registration_requires_approval = False
|
||||||
auth.settings.reset_password_requires_verification = True
|
auth.settings.reset_password_requires_verification = True
|
||||||
|
|
||||||
## if you need to use OpenID, Facebook, MySpace, Twitter, Linkedin, etc.
|
|
||||||
## register with janrain.com, write your domain:api_key in private/janrain.key
|
|
||||||
from gluon.contrib.login_methods.janrain_account import use_janrain
|
|
||||||
use_janrain(auth, filename='private/janrain.key')
|
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
## Define your tables below (or better in another model file) for example
|
## Define your tables below (or better in another model file) for example
|
||||||
##
|
##
|
||||||
|
|||||||
@@ -40,34 +40,35 @@ def _():
|
|||||||
ctr = request.controller
|
ctr = request.controller
|
||||||
# useful links to internal and external resources
|
# useful links to internal and external resources
|
||||||
response.menu += [
|
response.menu += [
|
||||||
(SPAN('web2py', _class='highlighted'), False, 'http://web2py.com', [
|
|
||||||
(T('My Sites'), False, URL('admin', 'default', 'site')),
|
(T('My Sites'), False, URL('admin', 'default', 'site')),
|
||||||
(T('This App'), False, URL('admin', 'default', 'design/%s' % app), [
|
(T('This App'), False, '#', [
|
||||||
(T('Controller'), False,
|
(T('Design'), False, URL('admin', 'default', 'design/%s' % app)),
|
||||||
URL(
|
LI(_class="divider"),
|
||||||
'admin', 'default', 'edit/%s/controllers/%s.py' % (app, ctr))),
|
(T('Controller'), False,
|
||||||
(T('View'), False,
|
URL(
|
||||||
URL(
|
'admin', 'default', 'edit/%s/controllers/%s.py' % (app, ctr))),
|
||||||
'admin', 'default', 'edit/%s/views/%s' % (app, response.view))),
|
(T('View'), False,
|
||||||
(T('Layout'), False,
|
URL(
|
||||||
URL(
|
'admin', 'default', 'edit/%s/views/%s' % (app, response.view))),
|
||||||
'admin', 'default', 'edit/%s/views/layout.html' % app)),
|
(T('Layout'), False,
|
||||||
(T('Stylesheet'), False,
|
URL(
|
||||||
URL(
|
'admin', 'default', 'edit/%s/views/layout.html' % app)),
|
||||||
'admin', 'default', 'edit/%s/static/css/web2py-bootstrap3.css' % app)),
|
(T('Stylesheet'), False,
|
||||||
(T('DB Model'), False,
|
URL(
|
||||||
URL(
|
'admin', 'default', 'edit/%s/static/css/web2py-bootstrap3.css' % app)),
|
||||||
'admin', 'default', 'edit/%s/models/db.py' % app)),
|
(T('DB Model'), False,
|
||||||
(T('Menu Model'), False,
|
URL(
|
||||||
URL(
|
'admin', 'default', 'edit/%s/models/db.py' % app)),
|
||||||
'admin', 'default', 'edit/%s/models/menu.py' % app)),
|
(T('Menu Model'), False,
|
||||||
(T('Database'), False, URL(app, 'appadmin', 'index')),
|
URL(
|
||||||
(T('Errors'), False, URL(
|
'admin', 'default', 'edit/%s/models/menu.py' % app)),
|
||||||
'admin', 'default', 'errors/' + app)),
|
(T('Database'), False, URL(app, 'appadmin', 'index')),
|
||||||
(T('About'), False, URL(
|
(T('Errors'), False, URL(
|
||||||
'admin', 'default', 'about/' + app)),
|
'admin', 'default', 'errors/' + app)),
|
||||||
]),
|
(T('About'), False, URL(
|
||||||
('web2py.com', False, 'http://www.web2py.com', [
|
'admin', 'default', 'about/' + app)),
|
||||||
|
]),
|
||||||
|
('web2py.com', False, '#', [
|
||||||
(T('Download'), False,
|
(T('Download'), False,
|
||||||
'http://www.web2py.com/examples/default/download'),
|
'http://www.web2py.com/examples/default/download'),
|
||||||
(T('Support'), False,
|
(T('Support'), False,
|
||||||
@@ -85,7 +86,9 @@ def _():
|
|||||||
(T('Recipes'), False, 'http://web2pyslices.com/'),
|
(T('Recipes'), False, 'http://web2pyslices.com/'),
|
||||||
(T('Semantic'), False, 'http://web2py.com/semantic'),
|
(T('Semantic'), False, 'http://web2py.com/semantic'),
|
||||||
]),
|
]),
|
||||||
(T('Documentation'), False, 'http://www.web2py.com/book', [
|
(T('Documentation'), False, '#', [
|
||||||
|
(T('Online book'), False, 'http://www.web2py.com/book'),
|
||||||
|
LI(_class="divider"),
|
||||||
(T('Preface'), False,
|
(T('Preface'), False,
|
||||||
'http://www.web2py.com/book/default/chapter/00'),
|
'http://www.web2py.com/book/default/chapter/00'),
|
||||||
(T('Introduction'), False,
|
(T('Introduction'), False,
|
||||||
@@ -116,18 +119,25 @@ def _():
|
|||||||
'http://www.web2py.com/book/default/chapter/13'),
|
'http://www.web2py.com/book/default/chapter/13'),
|
||||||
(T('Other Recipes'), False,
|
(T('Other Recipes'), False,
|
||||||
'http://www.web2py.com/book/default/chapter/14'),
|
'http://www.web2py.com/book/default/chapter/14'),
|
||||||
(T('Buy this book'), False,
|
(T("Buy web2py's book"), False,
|
||||||
'http://stores.lulu.com/web2py'),
|
'http://stores.lulu.com/web2py'),
|
||||||
]),
|
]),
|
||||||
(T('Community'), False, None, [
|
(T('Community'), False, None, [
|
||||||
(T('Groups'), False,
|
(T('Groups'), False,
|
||||||
'http://www.web2py.com/examples/default/usergroups'),
|
'http://www.web2py.com/examples/default/usergroups'),
|
||||||
(T('Twitter'), False, 'http://twitter.com/web2py'),
|
(T('Twitter'), False, 'http://twitter.com/web2py'),
|
||||||
(T('Live Chat'), False,
|
(T('Live Chat'), False,
|
||||||
'http://webchat.freenode.net/?channels=web2py'),
|
'http://webchat.freenode.net/?channels=web2py'),
|
||||||
]),
|
]),
|
||||||
(T('Plugins'), False, 'http://web2py.com/plugins')]
|
(T('Plugins'), False, None, [
|
||||||
)]
|
('plugin_wiki', False,
|
||||||
|
'http://web2py.com/examples/default/download'),
|
||||||
|
(T('Other Plugins'), False,
|
||||||
|
'http://web2py.com/plugins'),
|
||||||
|
(T('Layout Plugins'),
|
||||||
|
False, 'http://web2py.com/layouts'),
|
||||||
|
])
|
||||||
|
]
|
||||||
if DEVELOPMENT_MENU: _()
|
if DEVELOPMENT_MENU: _()
|
||||||
|
|
||||||
if "auth" in locals(): auth.wikimenu()
|
if "auth" in locals(): auth.wikimenu()
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
; App configuration
|
||||||
|
|
||||||
|
; db configuration
|
||||||
|
[db]
|
||||||
|
uri = sqlite://storage.sqlite
|
||||||
|
migrate = 1
|
||||||
|
pool_size = 1
|
||||||
|
|
||||||
|
; smtp address and credentials
|
||||||
|
[smtp]
|
||||||
|
server = smtp.gmail.com:587
|
||||||
|
sender = you@gmail.com
|
||||||
|
login = username:password
|
||||||
|
|
||||||
|
|
||||||
|
; form styling
|
||||||
|
[forms]
|
||||||
|
formstyle = bootstrap3_inline
|
||||||
|
separator =
|
||||||
@@ -1,544 +1,310 @@
|
|||||||
/*!
|
|
||||||
* part of the package to convert web2py elements to bootstrap3 theme
|
|
||||||
* Developed by Paolo Caruccio ( paolo.caruccio66@gmail.com )
|
|
||||||
* Released under MIT license
|
|
||||||
* version 1 rev.201402261600
|
|
||||||
*
|
|
||||||
* Supported version of bootstrap framework: 3.0.2+
|
|
||||||
|
|
||||||
* The full package includes:
|
|
||||||
* - bootstrap3.py python module
|
|
||||||
* - this css file
|
|
||||||
* - web2py-bootstrap3.js
|
|
||||||
* - example of layout.html
|
|
||||||
* - rules overriding web2py.css
|
|
||||||
*/
|
|
||||||
|
|
||||||
div.flash {
|
div.flash {
|
||||||
background-image: none;
|
background-image: none;
|
||||||
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;
|
||||||
border-width: 1px;
|
color: #333;
|
||||||
color: rgb(51, 51, 51);
|
font-weight: 400;
|
||||||
font-weight: normal;
|
min-width: 28px;
|
||||||
margin: 0 0 20px 0;
|
max-width: 300px;
|
||||||
min-width: 28px;
|
opacity: 1;
|
||||||
max-width: 300px;
|
vertical-align: baseline;
|
||||||
opacity: 1;
|
right: auto;
|
||||||
padding: 15px 35px 15px 15px;
|
border-width: 1px;
|
||||||
vertical-align: baseline;
|
margin: 0 0 20px;
|
||||||
right: auto;
|
padding: 15px 35px 15px 15px;
|
||||||
}
|
}
|
||||||
div.flash.alert:hover {
|
div.flash.alert:hover {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
.ie-lte8 div.flash {
|
.ie-lte8 div.flash {
|
||||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#222222', endColorstr='#000000', GradientType=0);
|
||||||
}
|
}
|
||||||
.ie-lte8 div.flash:hover {
|
.ie-lte8 div.flash:hover {
|
||||||
filter:alpha(opacity=100);
|
filter: alpha(opacity=25);
|
||||||
}
|
|
||||||
ul.navbar-nav li {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
ul.list-group, .bs3-form ul , ul.nav-tabs, ul.nav-pills {
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
p.lead {
|
|
||||||
text-align: inherit;
|
|
||||||
}
|
|
||||||
form label {
|
|
||||||
white-space: normal;
|
|
||||||
}
|
|
||||||
form.form-inline [type="text"], [type="password"], select {
|
|
||||||
margin-right: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
div.error {
|
div.error {
|
||||||
display: none;
|
width: auto;
|
||||||
width: auto;
|
background: transparent;
|
||||||
background: transparent;
|
|
||||||
border: none;
|
|
||||||
padding: 0;
|
|
||||||
padding-left: 5px;
|
|
||||||
background-image: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* bootstrap3 adapters
|
|
||||||
* essential rules
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* flash messages */
|
|
||||||
div.flash.alert {
|
|
||||||
display: none;
|
|
||||||
position: fixed;
|
|
||||||
top: 70px;
|
|
||||||
right: 75px;
|
|
||||||
cursor: pointer;
|
|
||||||
z-index: 1000;
|
|
||||||
background-color: #f9edbe;
|
|
||||||
border-color: #f0c36d; }
|
|
||||||
div.flash.alert.centered {
|
|
||||||
right: auto; }
|
|
||||||
div.flash.alert.leftside {
|
|
||||||
right: auto;
|
|
||||||
left: 75px; }
|
|
||||||
div.flash.alert #closeflash {
|
|
||||||
display: inline-block;
|
|
||||||
position: relative;
|
|
||||||
top: -2px;
|
|
||||||
right: -21px;
|
|
||||||
color: inherit;
|
|
||||||
cursor: pointer;
|
|
||||||
opacity: 0.5;
|
|
||||||
float: right;
|
|
||||||
font-size: 21px;
|
|
||||||
font-weight: bold;
|
|
||||||
line-height: 1;
|
|
||||||
text-shadow: 0 1px 0 #ffffff;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* buttons */
|
|
||||||
.bs3-form-btn {
|
|
||||||
margin-top: 3px;
|
|
||||||
margin-bottom: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*image preview in update forms*/
|
|
||||||
.w2p-uploaded-file .btn-group {
|
|
||||||
vertical-align: top;
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
#file-reset-btn {
|
|
||||||
vertical-align: top;
|
|
||||||
}
|
|
||||||
.w2p-uploaded-file input[type="file"] {
|
|
||||||
display:inline-block;
|
|
||||||
padding-top: 7px;
|
|
||||||
}
|
|
||||||
.w2p-file-preview img {
|
|
||||||
max-width: 150px;
|
|
||||||
}
|
|
||||||
.w2p-file-preview:hover img {
|
|
||||||
background-color: #ebebeb;
|
|
||||||
border-color: #adadad;
|
|
||||||
}
|
|
||||||
.w2p-file-preview span {
|
|
||||||
min-width: 150px;
|
|
||||||
max-width: 150px;
|
|
||||||
display: inline-block;
|
|
||||||
line-height: 40px;
|
|
||||||
min-height: 40px;
|
|
||||||
}
|
|
||||||
#no-file {
|
|
||||||
display: inline-block;
|
|
||||||
background-color: #eee;
|
|
||||||
vertical-align: middle;
|
|
||||||
text-align: center;
|
|
||||||
border-radius: 4px;
|
|
||||||
min-width: 150px;
|
|
||||||
max-width: 150px;
|
|
||||||
line-height: 43px;
|
|
||||||
min-height: 43px;
|
|
||||||
}
|
|
||||||
/* form-inline */
|
|
||||||
.form-inline .form-group {
|
|
||||||
margin-right: 4px;
|
|
||||||
}
|
|
||||||
/* list widget */
|
|
||||||
.w2p_list li {
|
|
||||||
margin-bottom: 6px;
|
|
||||||
}
|
|
||||||
.w2p_list li input {
|
|
||||||
display: inline-block;
|
|
||||||
width: 59%;
|
|
||||||
margin-right: 4px;
|
|
||||||
}
|
|
||||||
/* autocomplete widget */
|
|
||||||
div[id^=_autocomplete_] {
|
|
||||||
margin-top: -10px;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
select.autocomplete {
|
|
||||||
display: block;
|
|
||||||
padding: 6px 12px;
|
|
||||||
font-size: 14px;
|
|
||||||
line-height: 1.428571429;
|
|
||||||
color: #555;
|
|
||||||
vertical-align: middle;
|
|
||||||
background-color: #fff;
|
|
||||||
background-image: none;
|
|
||||||
border: 1px solid #ccc;
|
|
||||||
border-color: #428bca;
|
|
||||||
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
|
|
||||||
box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
|
|
||||||
-webkit-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
|
|
||||||
transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* nav-tabs */
|
|
||||||
.nav-tabs {
|
|
||||||
margin-bottom: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* dropdown multilevels in menu*/
|
|
||||||
/* fix issue when screen height is shorter than bs3 default */
|
|
||||||
.navbar-collapse.short-screen {
|
|
||||||
max-height: 200px !important;
|
|
||||||
}
|
|
||||||
.dropdown-submenu>a:after {
|
|
||||||
display: block;
|
|
||||||
content: " ";
|
|
||||||
float: right;
|
|
||||||
width: 0;
|
|
||||||
height: 0;
|
|
||||||
margin-top: 5px;
|
|
||||||
margin-right: -10px;
|
|
||||||
border-style: solid;
|
|
||||||
/* right-arrow */
|
|
||||||
border-color: transparent #cccccc;
|
|
||||||
border-width: 4px 0 4px 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: 768px) {
|
|
||||||
/* animation */
|
|
||||||
.navbar-nav .dropdown-menu {
|
|
||||||
top: -9999px;
|
|
||||||
display: block;
|
|
||||||
opacity: 0;
|
|
||||||
-webkit-transition: opacity .4s ease-in-out; }
|
|
||||||
.dropdown-submenu {
|
|
||||||
position: relative; }
|
|
||||||
.dropdown-submenu>.dropdown-menu {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 100%;
|
|
||||||
margin-top: -6px;
|
|
||||||
margin-left: -1px;
|
|
||||||
border-radius: 0 4px 4px 4px;
|
|
||||||
/* animation */
|
|
||||||
left: -9999px;
|
|
||||||
opacity: 0;
|
|
||||||
display: block;
|
|
||||||
-webkit-transition: opacity .4s ease-in-out; }
|
|
||||||
.navbar ul.nav li[data-w2pmenulevel="l0"]:hover >ul.dropdown-menu {
|
|
||||||
display: block;
|
|
||||||
/* animation */
|
|
||||||
top: 100%;
|
|
||||||
opacity: 1; }
|
|
||||||
.dropdown-submenu:hover>.dropdown-menu {
|
|
||||||
display: block;
|
|
||||||
/* animation */
|
|
||||||
left: 100%;
|
|
||||||
opacity: 1; }
|
|
||||||
.dropdown-submenu:hover>a,
|
|
||||||
.dropdown-submenu:focus>a {
|
|
||||||
color: #fff;
|
|
||||||
text-decoration: none;
|
|
||||||
background-color: #357ebd; }
|
|
||||||
.navbar-inverse .navbar-nav>li>a:hover,
|
|
||||||
.navbar-inverse .navbar-nav>li>a:focus,
|
|
||||||
.navbar-inverse .navbar-nav>li:hover>a {
|
|
||||||
color: #fff;
|
|
||||||
background-color: black; }
|
|
||||||
.dropdown-submenu>a:hover:after,
|
|
||||||
.dropdown-submenu:hover>a:after {
|
|
||||||
/* left-arrow */
|
|
||||||
border-color: transparent #fff;
|
|
||||||
border-width: 4px 4px 4px 0; }
|
|
||||||
}
|
|
||||||
@media (max-width: 767px){
|
|
||||||
.dropdown-menu {
|
|
||||||
width: 100%;
|
|
||||||
display: none; }
|
|
||||||
.dropdown-submenu>.dropdown-menu {
|
|
||||||
position: static;
|
|
||||||
float: none;
|
|
||||||
display: none;
|
|
||||||
border: none;
|
border: none;
|
||||||
margin: 0;
|
background-image: none;
|
||||||
padding: 0;
|
color: red;
|
||||||
box-shadow: none;
|
display: inline-block;
|
||||||
text-indent: 8px; }
|
padding: 5px;
|
||||||
.dropdown-submenu>.dropdown-menu.open {
|
|
||||||
display: block;
|
|
||||||
height: 100%; }
|
|
||||||
.dropdown-submenu>a:after {
|
|
||||||
/* down-arrow */
|
|
||||||
border-color: #cccccc transparent;
|
|
||||||
border-width: 4px 4px 0px 4px; }
|
|
||||||
.dropdown-submenu>a:hover:after {
|
|
||||||
border-color: #ffffff transparent; }
|
|
||||||
.dropdown-submenu>a.active {
|
|
||||||
font-weight: 700; }
|
|
||||||
.dropdown-submenu>a.active:after {
|
|
||||||
/* up-arrow */
|
|
||||||
border-color: #ffffff transparent;
|
|
||||||
border-width: 0px 4px 4px 4px; }
|
|
||||||
}
|
}
|
||||||
|
div.flash.alert {
|
||||||
/*
|
display: none;
|
||||||
* application customization
|
position: fixed;
|
||||||
* add custom rules
|
top: 70px;
|
||||||
*/
|
right: 75px;
|
||||||
/* web2py logo */
|
cursor: pointer;
|
||||||
#web2py-logo {
|
z-index: 1000;
|
||||||
color: #c6cecc;
|
background-color: #f9edbe;
|
||||||
|
border-color: #f0c36d;
|
||||||
}
|
}
|
||||||
#web2py-logo b {
|
.w2p-toolbar-hidden {
|
||||||
display: inline-block;
|
margin: 10px;
|
||||||
margin-top: -1px;
|
|
||||||
}
|
|
||||||
#web2py-logo b>span {
|
|
||||||
font-size: 22px;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
#web2py-logo:hover {
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
/*footer*/
|
|
||||||
#footer>div.row {
|
|
||||||
padding-top: 9px;
|
|
||||||
margin: 20px 0 40px 0;
|
|
||||||
border-top: 1px solid #eee;
|
|
||||||
}
|
|
||||||
#footer p {
|
|
||||||
margin-left: -15px;
|
|
||||||
margin-right: -15px;
|
|
||||||
}
|
|
||||||
.dropdown .highlighted {
|
|
||||||
color: #428bca;
|
|
||||||
}
|
|
||||||
|
|
||||||
form {
|
|
||||||
max-width: 600px;
|
|
||||||
}
|
}
|
||||||
ul.w2p_list {
|
ul.w2p_list {
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
|
}
|
||||||
|
.w2p_list li {
|
||||||
|
margin-bottom: 6px;
|
||||||
|
}
|
||||||
|
.w2p_list li input {
|
||||||
|
display: inline-block;
|
||||||
|
width: 90%;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
.w2p_list li a {
|
||||||
|
margin-bottom: 2px;
|
||||||
|
}
|
||||||
|
div[id^=_autocomplete_] {
|
||||||
|
margin-top: -10px;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
select.autocomplete {
|
||||||
|
display: block;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 1.428571429;
|
||||||
|
color: #555;
|
||||||
|
vertical-align: middle;
|
||||||
|
background-color: #fff;
|
||||||
|
background-image: none;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||||
|
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||||
|
-webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
|
||||||
|
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
|
||||||
|
border-color: #428bca;
|
||||||
|
padding: 6px 12px;
|
||||||
|
}
|
||||||
|
#web2py-logo {
|
||||||
|
color: #c6cecc;
|
||||||
|
}
|
||||||
|
#web2py-logo b {
|
||||||
|
display: inline-block;
|
||||||
|
margin-top: -1px;
|
||||||
|
}
|
||||||
|
#web2py-logo b>span {
|
||||||
|
font-size: 22px;
|
||||||
|
color: #FFF;
|
||||||
|
}
|
||||||
|
#web2py-logo:hover {
|
||||||
|
color: #FFF;
|
||||||
|
}
|
||||||
|
.footer > .container-fluid {
|
||||||
|
padding-left: 15px;
|
||||||
|
padding-right: 15px;
|
||||||
|
margin: 20px;
|
||||||
}
|
}
|
||||||
.background {
|
.background {
|
||||||
background: url(../images/background.jpg) no-repeat center center;
|
background: url(../images/background.jpg) no-repeat center center;
|
||||||
}
|
|
||||||
html {
|
|
||||||
background-color: #333;
|
|
||||||
}
|
}
|
||||||
body {
|
body {
|
||||||
padding-top: 50px
|
padding-top: 50px;
|
||||||
|
margin-bottom: 60px;
|
||||||
}
|
}
|
||||||
header {
|
header {
|
||||||
-webkit-box-shadow: 0px 0px 8px 2px #000000;
|
-webkit-box-shadow: 0 0 8px 2px #000;
|
||||||
-moz-box-shadow: 0px 0px 8px 2px #000000;
|
-moz-box-shadow: 0 0 8px 2px #000;
|
||||||
box-shadow: 0px 0px 8px 2px #000000;
|
box-shadow: 0 0 8px 2px #000;
|
||||||
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
html {
|
||||||
main {
|
position: relative;
|
||||||
padding-bottom: 50px;
|
min-height: 100%;
|
||||||
}
|
}
|
||||||
footer {
|
.footer {
|
||||||
padding:50px; background: #333; color: #aaa;
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 60px;
|
||||||
|
background: #333;
|
||||||
|
color: #aaa;
|
||||||
}
|
}
|
||||||
header h1 {
|
header h1 {
|
||||||
color: white !important; text-shadow: 0 0 7px black;
|
color: #FFF!important;
|
||||||
|
text-shadow: 0 0 7px #000;
|
||||||
}
|
}
|
||||||
header .jumbotron {
|
header .jumbotron {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
|
||||||
.nav a, .btn, .btn-default {
|
|
||||||
text-shadow: none; font-weight: bold;
|
|
||||||
}
|
}
|
||||||
.flash {
|
.flash {
|
||||||
opacity: 0.9 !important; right: 100px;
|
opacity: 0.9!important;
|
||||||
|
right: 100px;
|
||||||
}
|
}
|
||||||
.dropdown {
|
.right {
|
||||||
z-index: 2000;
|
float: right;
|
||||||
|
text-align: right;
|
||||||
}
|
}
|
||||||
.help-block {
|
.left {
|
||||||
margin-top: 0;
|
float: left;
|
||||||
margin-bottom: 0;
|
text-align: left;
|
||||||
}
|
}
|
||||||
#w2padmin-btn {
|
.center {
|
||||||
margin:30px 0 30px 0;
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
.hidden {display:none;visibility:visible}
|
td.w2p_fw {
|
||||||
.right {float:right; text-align:right}
|
padding-bottom: 1px;
|
||||||
.left {float:left; text-align:left}
|
|
||||||
.center {width:100%; text-align:center; vertical-align:middle}
|
|
||||||
|
|
||||||
/* fix ie problem with menu */
|
|
||||||
|
|
||||||
td.w2p_fw {padding-bottom:1px}
|
|
||||||
td.w2p_fl,td.w2p_fw,td.w2p_fc {vertical-align:top}
|
|
||||||
td.w2p_fl {text-align:left}
|
|
||||||
td.w2p_fl, td.w2p_fw {padding-right:7px}
|
|
||||||
td.w2p_fl,td.w2p_fc {padding-top:4px}
|
|
||||||
div.w2p_export_menu {margin:5px 0}
|
|
||||||
div.w2p_export_menu a, div.w2p_wiki_tags a, div.w2p_cloud a {margin-left:5px; padding:2px 5px; background-color:#f1f1f1; border-radius:5px; -moz-border-radius:5px; -webkit-border-radius:5px;}
|
|
||||||
|
|
||||||
/* tr#submit_record__row {border-top:1px solid #E5E5E5} */
|
|
||||||
#submit_record__row td {padding-top:.5em}
|
|
||||||
|
|
||||||
/* Fix */
|
|
||||||
#auth_user_remember__row label {display:inline}
|
|
||||||
#web2py_user_form td {vertical-align:top}
|
|
||||||
|
|
||||||
div.error_wrapper {display:block}
|
|
||||||
div.error {
|
|
||||||
color:red;
|
|
||||||
padding:5px;
|
|
||||||
display:inline-block;
|
|
||||||
}
|
}
|
||||||
|
td.w2p_fl {
|
||||||
.copyright {float:left}
|
text-align: left;
|
||||||
#poweredBy {float:right}
|
|
||||||
|
|
||||||
/* #MEDIA QUERIES SECTION */
|
|
||||||
|
|
||||||
/*
|
|
||||||
*Grid
|
|
||||||
*
|
|
||||||
* The default style for SQLFORM.grid even using jquery-iu or another ui framework
|
|
||||||
* will look better with the declarations below
|
|
||||||
* if needed to remove base.css consider keeping these following lines in some css file.
|
|
||||||
*/
|
|
||||||
/* .web2py_table {border:1px solid #ccc} */
|
|
||||||
.web2py_paginator {}
|
|
||||||
.web2py_grid {width:100%}
|
|
||||||
.web2py_grid table {width:100%}
|
|
||||||
.web2py_grid tbody td {padding:2px 5px 2px 5px; vertical-align: middle;}
|
|
||||||
.web2py_grid .web2py_form td {vertical-align: top;}
|
|
||||||
|
|
||||||
.web2py_grid thead th,.web2py_grid tfoot td {
|
|
||||||
background-color:#EAEAEA;
|
|
||||||
padding:10px 5px 10px 5px;
|
|
||||||
}
|
}
|
||||||
|
td.w2p_fl,
|
||||||
.web2py_grid tr.odd {background-color:#F9F9F9}
|
td.w2p_fw {
|
||||||
.web2py_grid tr:hover {background-color:#F5F5F5}
|
padding-right: 7px;
|
||||||
|
}
|
||||||
/*
|
td.w2p_fl,
|
||||||
.web2py_breadcrumbs a {
|
td.w2p_fc {
|
||||||
line-height:20px; margin-right:5px; display:inline-block;
|
padding-top: 4px;
|
||||||
padding:3px 5px 3px 5px;
|
}
|
||||||
font-family:'lucida grande',tahoma,verdana,arial,sans-serif;
|
div.w2p_export_menu {
|
||||||
color:#3C3C3D;
|
margin: 5px 0;
|
||||||
text-shadow:1px 1px 0 #FFFFFF;
|
}
|
||||||
white-space:nowrap; overflow:visible; cursor:pointer;
|
div.w2p_export_menu a,
|
||||||
background:#ECECEC;
|
div.w2p_wiki_tags a,
|
||||||
border:1px solid #CACACA;
|
div.w2p_cloud a {
|
||||||
-webkit-border-radius:2px; -moz-border-radius:2px;
|
margin-left: 5px;
|
||||||
-webkit-background-clip:padding-box; border-radius:2px;
|
padding: 2px 5px;
|
||||||
outline:none; position:relative; zoom:1; *display:inline;
|
}
|
||||||
|
#submit_record__row td {
|
||||||
|
padding-top: .5em;
|
||||||
|
}
|
||||||
|
div.error_wrapper {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.copyright {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
#poweredBy {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
.web2py_grid tbody td {
|
||||||
|
vertical-align: middle;
|
||||||
|
padding: 2px 5px;
|
||||||
|
}
|
||||||
|
.web2py_grid thead th,
|
||||||
|
.web2py_grid tfoot td {
|
||||||
|
background-color: #EAEAEA;
|
||||||
|
padding: 10px 5px;
|
||||||
|
}
|
||||||
|
.web2py_grid tr.odd {
|
||||||
|
background-color: #F9F9F9;
|
||||||
|
}
|
||||||
|
.web2py_grid tr:hover {
|
||||||
|
background-color: #F5F5F5;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
.web2py_console form {
|
.web2py_console form {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: inline;
|
display: inline;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
margin: 0 0 0 5px;
|
margin: 0 0 0 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.web2py_console form select {
|
.web2py_console form select {
|
||||||
margin:0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.web2py_search_actions {
|
.web2py_search_actions {
|
||||||
float:left;
|
float: left;
|
||||||
text-align:left;
|
text-align: left;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.web2py_grid .row_buttons {
|
.web2py_grid .row_buttons {
|
||||||
min-height:25px;
|
min-height: 25px;
|
||||||
vertical-align:middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
.web2py_grid .row_buttons a {
|
.web2py_grid .row_buttons a {
|
||||||
margin:3px;
|
margin: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.web2py_search_actions {
|
|
||||||
width:100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.web2py_grid .row_buttons a,
|
.web2py_grid .row_buttons a,
|
||||||
.web2py_paginator ul li a,
|
.web2py_paginator ul li a,
|
||||||
.web2py_search_actions a,
|
.web2py_search_actions a,
|
||||||
.web2py_console input[type=submit],
|
.web2py_console input[type=submit],
|
||||||
.web2py_console input[type=button],
|
.web2py_console input[type=button],
|
||||||
.web2py_console button {
|
.web2py_console button {
|
||||||
line-height:20px;
|
line-height: 20px;
|
||||||
margin-right:2px; display:inline-block;
|
margin-right: 2px;
|
||||||
padding:3px 5px 3px 5px;
|
display: inline-block;
|
||||||
|
padding: 3px 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.web2py_counter {
|
.web2py_counter {
|
||||||
margin-top:5px;
|
margin-top: 5px;
|
||||||
margin-right:2px;
|
margin-right: 2px;
|
||||||
width:35%;
|
width: 35%;
|
||||||
float:right;
|
float: right;
|
||||||
text-align:right;
|
text-align: right;
|
||||||
|
}
|
||||||
|
.web2py_table {
|
||||||
|
clear: both;
|
||||||
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*Fix firefox problem*/
|
|
||||||
.web2py_table {clear:both; display:block}
|
|
||||||
|
|
||||||
.web2py_paginator {
|
.web2py_paginator {
|
||||||
padding:5px;
|
text-align: right;
|
||||||
text-align:right;
|
background-color: #f2f2f2;
|
||||||
background-color:#f2f2f2;
|
padding: 5px;
|
||||||
|
|
||||||
}
|
}
|
||||||
.web2py_paginator ul {
|
.web2py_paginator ul {
|
||||||
list-style-type:none;
|
list-style-type: none;
|
||||||
margin:0px;
|
margin: 0;
|
||||||
padding:0px;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.web2py_paginator ul li {
|
|
||||||
display:inline;
|
|
||||||
}
|
|
||||||
|
|
||||||
.web2py_paginator .current {
|
.web2py_paginator .current {
|
||||||
font-weight:bold;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
|
|
||||||
.web2py_breadcrumbs ul {
|
.web2py_breadcrumbs ul {
|
||||||
list-style:none;
|
list-style: none;
|
||||||
margin-bottom:18px;
|
margin-bottom: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
li.w2p_grid_breadcrumb_elem {
|
li.w2p_grid_breadcrumb_elem {
|
||||||
display:inline-block;
|
display: inline-block;
|
||||||
|
}
|
||||||
|
.web2py_console input,
|
||||||
|
.web2py_console select,
|
||||||
|
.web2py_console a {
|
||||||
|
margin: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.web2py_console form { vertical-align: middle; }
|
|
||||||
.web2py_console input, .web2py_console select,
|
|
||||||
.web2py_console a { margin: 2px; }
|
|
||||||
|
|
||||||
|
|
||||||
#wiki_page_body {
|
#wiki_page_body {
|
||||||
width: 600px;
|
width: 600px;
|
||||||
height: auto;
|
height: auto;
|
||||||
min-height: 400px;
|
min-height: 400px;
|
||||||
}
|
}
|
||||||
|
.ie-lte7 .topbar .container {
|
||||||
/* fix some IE problems */
|
z-index: 2;
|
||||||
|
}
|
||||||
.ie-lte7 .topbar .container {z-index:2}
|
.ie9 #w2p_query_panel {
|
||||||
.ie-lte8 div.flash{ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#222222', endColorstr='#000000', GradientType=0 ); }
|
padding-bottom: 2px;
|
||||||
.ie-lte8 div.flash:hover {filter:alpha(opacity=25);}
|
}
|
||||||
.ie9 #w2p_query_panel {padding-bottom:2px}
|
.web2py_console .form-control {
|
||||||
|
width: 20%;
|
||||||
.web2py_console .form-control {width: 20%; display: inline;}
|
display: inline;
|
||||||
.web2py_console #w2p_keywords {width: 50%;}
|
}
|
||||||
.web2py_search_actions a, .web2py_console input[type=submit], .web2py_console input[type=button], .web2py_console button { padding: 6px 12px; }
|
.web2py_console #w2p_keywords {
|
||||||
|
width: 50%;
|
||||||
/*
|
}
|
||||||
input.date,input.time,input.datetime,input.double,input.integer {
|
.web2py_search_actions a,
|
||||||
max-width: 300px;
|
.web2py_console input[type=submit],
|
||||||
|
.web2py_console input[type=button],
|
||||||
|
.web2py_console button {
|
||||||
|
padding: 6px 12px;
|
||||||
|
}
|
||||||
|
td.w2p_fl,
|
||||||
|
td.w2p_fw,
|
||||||
|
td.w2p_fc,
|
||||||
|
#web2py_user_form td,
|
||||||
|
.web2py_grid .web2py_form td {
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
#auth_user_remember__row label,
|
||||||
|
.web2py_paginator ul li {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
.web2py_grid,
|
||||||
|
.web2py_grid table {
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|||||||
@@ -1,134 +1,82 @@
|
|||||||
/*!
|
(function($, undefined) {
|
||||||
* part of the package to convert web2py elements to bootstrap3 theme
|
$.web2py.ajax_fields = function(target) {
|
||||||
* Developed by Paolo Caruccio ( paolo.caruccio66@gmail.com )
|
/*
|
||||||
* Released under MIT license
|
*this attaches something to a newly loaded fragment/page
|
||||||
* version 1 rev.201402261600
|
* Ideally all events should be bound to the document, so we can avoid calling
|
||||||
*
|
* this over and over... all will be bound to the document
|
||||||
* Supported version of bootstrap framework: 3.0.2+
|
*/
|
||||||
|
/*adds btn class to buttons*/
|
||||||
* The full package includes:
|
$('button', target).addClass('btn btn-default');
|
||||||
* - bootstrap3.py python module
|
$("p.w2p-autocomplete-widget input").addClass('form-control');
|
||||||
* - web2py-bootstrap3.css
|
$('form input[type="submit"], form input[type="button"]', target).addClass('btn btn-default');
|
||||||
* - this js file
|
/* javascript for PasswordWidget*/
|
||||||
* - example of layout.html
|
$('input[type=password][data-w2p_entropy]', target).each(function() {
|
||||||
|
web2py.validate_entropy($(this));
|
||||||
*/
|
|
||||||
|
|
||||||
jQuery(function(){
|
|
||||||
// bootstrap3 classes for elements of horizontal form - calculations
|
|
||||||
var fh_label_class = 'col-md-4',
|
|
||||||
fh_offest_class = 'col-md-offset-4',
|
|
||||||
fh_control_class = 'col-md-8';
|
|
||||||
|
|
||||||
// functions
|
|
||||||
function menu_is_collapsed() {
|
|
||||||
return !jQuery('.navbar-toggle').is(':hidden');
|
|
||||||
};
|
|
||||||
|
|
||||||
function closeSubmenu() {
|
|
||||||
jQuery(".dropdown-submenu > a.active").each(function(){
|
|
||||||
var o = jQuery(this);
|
|
||||||
o.parent().children("ul")
|
|
||||||
.toggleClass('open').data('phase', null);
|
|
||||||
o.toggleClass('active');
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
jQuery.fn.center = function (options) {
|
|
||||||
var defaults = {'parent': false, 'mode': "both"};
|
|
||||||
var settings = jQuery.extend(defaults, options);
|
|
||||||
var parent;
|
|
||||||
if (settings.parent)
|
|
||||||
parent = this.parent();
|
|
||||||
else
|
|
||||||
parent = window;
|
|
||||||
if (settings.mode != "horizontally") {
|
|
||||||
this.css("top", Math.max
|
|
||||||
(0, ((jQuery(parent).height() - jQuery(this).outerHeight()) / 2) + jQuery(parent).scrollTop()) + "px");
|
|
||||||
}
|
|
||||||
if (settings.mode != "vertically") {
|
|
||||||
this.css("left", Math.max
|
|
||||||
(0, ((jQuery(parent).width() - jQuery(this).outerWidth()) / 2) + jQuery(parent).scrollLeft()) + "px");
|
|
||||||
}
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
|
|
||||||
// alert centering
|
|
||||||
jQuery('.flash.alert.centered').center({'mode': "horizontally"});
|
|
||||||
|
|
||||||
// navs
|
|
||||||
jQuery(".nav ul.dropdown-menu").not("#w2p-auth-bar").each(function() {
|
|
||||||
var toggle = jQuery(this).parent();
|
|
||||||
if (toggle.parent().hasClass("nav")) {
|
|
||||||
toggle.attr("data-w2pmenulevel", "l0");
|
|
||||||
toggle.children("a")
|
|
||||||
.addClass("dropdown-toggle")
|
|
||||||
.append('<span class="caret"> </span>')
|
|
||||||
.attr("data-toggle", "dropdown");
|
|
||||||
} else {
|
|
||||||
toggle.addClass("dropdown-submenu").removeClass("dropdown");
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
jQuery('.navbar-nav a.dropdown-toggle').click(function(e) {
|
|
||||||
if (menu_is_collapsed())
|
|
||||||
e.preventDefault();
|
|
||||||
else
|
|
||||||
window.location=jQuery(this).attr('href');
|
|
||||||
});
|
|
||||||
|
|
||||||
jQuery(".dropdown-submenu>a").click(function(event) {
|
|
||||||
if (menu_is_collapsed()) {
|
|
||||||
event.preventDefault();
|
|
||||||
event.stopPropagation();
|
|
||||||
var submenu = jQuery(this).parent().children("ul");
|
|
||||||
submenu.data('phase','opening');
|
|
||||||
var dropdownOfThis = jQuery(this).parent().parent();
|
|
||||||
var actives = dropdownOfThis.find('ul.dropdown-menu.open');
|
|
||||||
if (actives && actives.length) {
|
|
||||||
var hasData = actives.data('phase');
|
|
||||||
if (hasData && hasData=='opened') {
|
|
||||||
actives.removeClass('open');
|
|
||||||
actives.siblings('a.active').removeClass('active');
|
|
||||||
hasData || actives.data('phase', null);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
submenu.toggleClass('open').data('phase','opened');
|
|
||||||
jQuery(this).toggleClass('active');
|
|
||||||
}else{
|
|
||||||
window.location=jQuery(this).attr('href');
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
jQuery(".nav-tabs .web2py-menu-active").addClass('active');
|
|
||||||
jQuery(".nav-tabs a").not(".dropdown-toggle").attr("data-toggle", "tab");
|
|
||||||
// button fixes
|
|
||||||
jQuery("button:not(.btn),input[type=button]:not(.btn),.w2p_list a").addClass('btn btn-default');
|
|
||||||
// form fixes
|
|
||||||
jQuery("form.bs3-form p.w2p-autocomplete-widget input").addClass('form-control');
|
|
||||||
|
|
||||||
// on page load
|
|
||||||
function adjust_maxheight_of_collapsed_nav() {
|
|
||||||
var cn = jQuery('div.navbar-collapse');
|
|
||||||
var sh = jQuery(window).height();
|
|
||||||
if (cn.get(0)) {
|
|
||||||
if (sh<320)
|
|
||||||
cn.addClass('short-screen');
|
|
||||||
else if(cn.hasClass('short-screen'))
|
|
||||||
cn.removeClass('short-screen');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
adjust_maxheight_of_collapsed_nav();
|
|
||||||
|
|
||||||
// resize and orientation change events
|
|
||||||
jQuery(window).on('orientationchange resize', function(event) {
|
|
||||||
adjust_maxheight_of_collapsed_nav();
|
|
||||||
jQuery('.flash.alert').center({'mode':"horizontally"});
|
|
||||||
if (menu_is_collapsed() === false) {
|
|
||||||
closeSubmenu();
|
|
||||||
jQuery('.navbar-nav .dropdown.open a.dropdown-toggle').dropdown('toggle');
|
|
||||||
jQuery('#main-menu.in, #login-menu.in').collapse('hide');
|
|
||||||
};
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
/* javascript for ListWidget*/
|
||||||
|
$('ul.w2p_list', target).each(function() {
|
||||||
|
function pe(ul, e) {
|
||||||
|
var new_line = ml(ul);
|
||||||
|
rel(ul);
|
||||||
|
if ($(e.target).parent().is(':visible')) {
|
||||||
|
/* make sure we didn't delete the element before we insert after */
|
||||||
|
new_line.insertAfter($(e.target).parent());
|
||||||
|
} else {
|
||||||
|
/* the line we clicked on was deleted, just add to end of list */
|
||||||
|
new_line.appendTo(ul);
|
||||||
|
}
|
||||||
|
new_line.find(":text").focus();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function rl(ul, e) {
|
||||||
|
if ($(ul).children().length > 1) {
|
||||||
|
/* only remove if we have more than 1 item so the list is never empty */
|
||||||
|
$(e.target).parent().remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function ml(ul) {
|
||||||
|
/* clone the first field */
|
||||||
|
var line = $(ul).find("li:first").clone(true);
|
||||||
|
line.find(':text').val('');
|
||||||
|
return line;
|
||||||
|
}
|
||||||
|
|
||||||
|
function rel(ul) {
|
||||||
|
/* keep only as many as needed*/
|
||||||
|
$(ul).find("li").each(function() {
|
||||||
|
var trimmed = $.trim($(this.firstChild).val());
|
||||||
|
if (trimmed == '') $(this).remove();
|
||||||
|
else $(this.firstChild).val(trimmed);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
var ul = this;
|
||||||
|
$(ul).find(":text").after('<a class="btn btn-default" href="#">+</a> <a class="btn btn-default" href="#">-</a>').keypress(function(e) {
|
||||||
|
return (e.which == 13) ? pe(ul, e) : true;
|
||||||
|
}).next().click(function(e) {
|
||||||
|
pe(ul, e);
|
||||||
|
e.preventDefault();
|
||||||
|
}).next().click(function(e) {
|
||||||
|
rl(ul, e);
|
||||||
|
e.preventDefault();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
$(".nav ul.dropdown-menu").each(function() {
|
||||||
|
var toggle = jQuery(this).parent();
|
||||||
|
if (toggle.parent().hasClass("nav")) {
|
||||||
|
toggle.attr("data-w2pmenulevel", "l0");
|
||||||
|
toggle.children("a")
|
||||||
|
.addClass("dropdown-toggle")
|
||||||
|
.append('<span class="caret"> </span>')
|
||||||
|
.attr("data-toggle", "dropdown");
|
||||||
|
} else {
|
||||||
|
toggle.addClass("dropdown-submenu").removeClass("dropdown");
|
||||||
|
};
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
})(jQuery);
|
||||||
@@ -34,13 +34,15 @@
|
|||||||
{{pass}}
|
{{pass}}
|
||||||
|
|
||||||
{{block right_sidebar}}
|
{{block right_sidebar}}
|
||||||
<a id="w2padmin-btn" class="btn btn-primary btn-lg btn-block"
|
|
||||||
href="{{=URL('admin','default','index')}}">
|
|
||||||
<i class="glyphicon glyphicon-cog"></i>
|
|
||||||
{{=T("admin")}}
|
|
||||||
</a>
|
|
||||||
<div class="panel panel-info">
|
<div class="panel panel-info">
|
||||||
<div class="panel-heading">{{=T("Don't know what to do?")}}</div>
|
<div class="panel-heading"><h3 class="panel-title"><a class="btn-block"
|
||||||
|
href="{{=URL('admin','default','index')}}">
|
||||||
|
<i class="glyphicon glyphicon-cog"></i>
|
||||||
|
{{=T("admin")}}
|
||||||
|
</a></h3></div>
|
||||||
|
<div class="panel-body">
|
||||||
|
{{=T("Don't know what to do?")}}
|
||||||
|
</div>
|
||||||
<ul class="list-group">
|
<ul class="list-group">
|
||||||
<li class="list-group-item">{{=A(T("Online examples"), _href=URL('examples','default','index'))}}</li>
|
<li class="list-group-item">{{=A(T("Online examples"), _href=URL('examples','default','index'))}}</li>
|
||||||
<li class="list-group-item"><a href="http://web2py.com">web2py.com</a></li>
|
<li class="list-group-item"><a href="http://web2py.com">web2py.com</a></li>
|
||||||
|
|||||||
+3
-4
@@ -18,7 +18,6 @@ except:
|
|||||||
import datetime
|
import datetime
|
||||||
import thread
|
import thread
|
||||||
import logging
|
import logging
|
||||||
import copy
|
|
||||||
import sys
|
import sys
|
||||||
import glob
|
import glob
|
||||||
import os
|
import os
|
||||||
@@ -1023,7 +1022,7 @@ class Auth(object):
|
|||||||
allow_basic_login_only=False,
|
allow_basic_login_only=False,
|
||||||
on_failed_authentication=lambda x: redirect(x),
|
on_failed_authentication=lambda x: redirect(x),
|
||||||
formstyle=None,
|
formstyle=None,
|
||||||
label_separator=": ",
|
label_separator=None,
|
||||||
logging_enabled = True,
|
logging_enabled = True,
|
||||||
allow_delete_accounts=False,
|
allow_delete_accounts=False,
|
||||||
password_field='password',
|
password_field='password',
|
||||||
@@ -1328,7 +1327,7 @@ class Auth(object):
|
|||||||
login_url=url_login,
|
login_url=url_login,
|
||||||
logged_url=URL(controller, function, args='profile'),
|
logged_url=URL(controller, function, args='profile'),
|
||||||
download_url=URL(controller, 'download'),
|
download_url=URL(controller, 'download'),
|
||||||
mailer=(mailer == True) and Mail() or mailer,
|
mailer=(mailer is True) and Mail() or mailer,
|
||||||
on_failed_authorization =
|
on_failed_authorization =
|
||||||
URL(controller, function, args='not_authorized'),
|
URL(controller, function, args='not_authorized'),
|
||||||
login_next = url_index,
|
login_next = url_index,
|
||||||
@@ -1359,9 +1358,9 @@ class Auth(object):
|
|||||||
reset_password_onaccept = [],
|
reset_password_onaccept = [],
|
||||||
hmac_key = hmac_key,
|
hmac_key = hmac_key,
|
||||||
formstyle = current.response.formstyle,
|
formstyle = current.response.formstyle,
|
||||||
|
label_separator = current.response.form_label_separator
|
||||||
)
|
)
|
||||||
settings.lock_keys = True
|
settings.lock_keys = True
|
||||||
|
|
||||||
# ## these are messages that can be customized
|
# ## these are messages that can be customized
|
||||||
messages = self.messages = Messages(current.T)
|
messages = self.messages = Messages(current.T)
|
||||||
messages.update(Auth.default_messages)
|
messages.update(Auth.default_messages)
|
||||||
|
|||||||
Reference in New Issue
Block a user