welcome has bootstrap, and cleaner grid
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 1.99.7 (2012-04-18 21:19:43) dev
|
Version 1.99.7 (2012-04-19 10:52:35) dev
|
||||||
|
|||||||
+706
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
|||||||
/** these MUST stay **/
|
/** these MUST stay **/
|
||||||
body { margin: 0; padding:0; border: 0; }
|
body { margin: 0; padding:0; border: 0; }
|
||||||
a { text-decoration:none}
|
a { text-decoration:none: white-space: nowrap;}
|
||||||
a:hover {text-decoration: underline}
|
a:hover {text-decoration: underline}
|
||||||
a.button {text-decoration: none}
|
a.button {text-decoration: none}
|
||||||
h1,h2,h3,h4,h5,h6 {margin: 0.5em 0 0.25em 0; display: block; font-family: Helvetica}
|
h1,h2,h3,h4,h5,h6 {margin: 0.5em 0 0.25em 0; display: block; font-family: Helvetica}
|
||||||
@@ -13,9 +13,10 @@ h1,h2,h3,h4,h5,h6 {margin: 0.5em 0 0.25em 0; display: block; font-family: Helvet
|
|||||||
right { float:right; text-align: right; }
|
right { float:right; text-align: right; }
|
||||||
left { float:left; text-align: left; }
|
left { float:left; text-align: left; }
|
||||||
center { width:100; text-align: center; vertical-align:middle;}
|
center { width:100; text-align: center; vertical-align:middle;}
|
||||||
label { white-space: nowrap; }
|
th, label { font-weight: bold; white-space: nowrap; }
|
||||||
th, label { font-weight: bold; }
|
td, th { text-align: left; padding: 2px 5px 2px 5px; }
|
||||||
th, td { text-align: left; vertical-align: top; padding: 2px 5px 2px 5px;}
|
th { vertical-align: middle; }
|
||||||
|
td { vertical-align: top; }
|
||||||
form table tr td label { text-align: left; }
|
form table tr td label { text-align: left; }
|
||||||
p, table, ol, ul { padding: 0.5em 0 0.5em 0 }
|
p, table, ol, ul { padding: 0.5em 0 0.5em 0 }
|
||||||
p {text-align: justify }
|
p {text-align: justify }
|
||||||
@@ -31,6 +32,7 @@ textarea { width: 600px; }
|
|||||||
code { font-family: Courier;}
|
code { font-family: Courier;}
|
||||||
input[type=text], input[type=password], select { width: 300px; }
|
input[type=text], input[type=password], select { width: 300px; }
|
||||||
ul { list-style-type: none; margin: 0px; padding: 0px; }
|
ul { list-style-type: none; margin: 0px; padding: 0px; }
|
||||||
|
.hidden {display:none;visibility:visible}
|
||||||
/** end **/
|
/** end **/
|
||||||
|
|
||||||
/* Sticky footer begin */
|
/* Sticky footer begin */
|
||||||
@@ -67,7 +69,7 @@ body {
|
|||||||
background-color: #FFFFFF;
|
background-color: #FFFFFF;
|
||||||
}
|
}
|
||||||
.footer {
|
.footer {
|
||||||
background-color: #ECECEC;
|
border-top: 1px #DEDEDE solid;
|
||||||
}
|
}
|
||||||
.header {
|
.header {
|
||||||
// background: <fill here for header image>;
|
// background: <fill here for header image>;
|
||||||
@@ -123,9 +125,11 @@ div.error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.topbar {
|
.topbar {
|
||||||
|
padding: 10px 10px;
|
||||||
width:100%;
|
width:100%;
|
||||||
color: #959595; vertical-align:middle;
|
color: #959595;
|
||||||
padding: 0;
|
vertical-align: middle;
|
||||||
|
padding: auto;
|
||||||
background-image: -khtml-gradient(linear, left top, left bottom, from(#333333), to(#222222));
|
background-image: -khtml-gradient(linear, left top, left bottom, from(#333333), to(#222222));
|
||||||
background-image: -moz-linear-gradient(top, #333333, #222222);
|
background-image: -moz-linear-gradient(top, #333333, #222222);
|
||||||
background-image: -ms-linear-gradient(top, #333333, #222222);
|
background-image: -ms-linear-gradient(top, #333333, #222222);
|
||||||
@@ -143,9 +147,7 @@ div.error {
|
|||||||
color: #e1e1e1;
|
color: #e1e1e1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#navbar {float: right; padding: .4em 0;}
|
#navbar {float: right; padding: 5px; /* same as superfish */}
|
||||||
|
|
||||||
#menu {padding-top: .2em;}
|
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
width:100%;
|
width:100%;
|
||||||
@@ -183,6 +185,7 @@ div.error {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*Grid
|
*Grid
|
||||||
*
|
*
|
||||||
@@ -190,34 +193,20 @@ div.error {
|
|||||||
* will look better with the declarations below
|
* will look better with the declarations below
|
||||||
* if needed to remove base.css consider keeping these following lines in some css file.
|
* if needed to remove base.css consider keeping these following lines in some css file.
|
||||||
*/
|
*/
|
||||||
.web2py_table { border: 1px solid #ccc; }
|
// .web2py_table { border: 1px solid #ccc; }
|
||||||
.web2py_paginator { border-left: 1px solid #ccc; border-right: 1px solid #ccc; border-bottom: 1px solid #ccc; }
|
.web2py_paginator { }
|
||||||
.web2py_grid a { text-decoration:none;}
|
.web2py_grid {width: 100% }
|
||||||
.web2py_grid table { width: 100% }
|
.web2py_grid table { width: 100% }
|
||||||
.web2py_grid td { white-space:normal; }
|
|
||||||
.web2py_grid tbody td {
|
.web2py_grid tbody td {
|
||||||
padding: 2px 5px 2px 5px;
|
padding: 2px 5px 2px 5px;
|
||||||
line-height: 13.5px;
|
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
.web2py_grid input:focus,
|
|
||||||
.web2py_grid textarea:focus,
|
|
||||||
.web2py_grid select:focus {
|
|
||||||
border: 1px solid #ffffff;
|
|
||||||
-webkit-box-shadow: 0px 0px 6px #007eff;
|
|
||||||
-moz-box-shadow: 0px 0px 5px #007eff;
|
|
||||||
box-shadow: 0px 0px 5px #007eff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.web2py_grid thead th {
|
.web2py_grid thead th, .web2py_grid tfoot td {
|
||||||
background-color:#EAEAEA;
|
background-color:#EAEAEA;
|
||||||
padding: 10px 5px 10px 5px;
|
padding: 10px 5px 10px 5px;
|
||||||
line-height: 13.5px;
|
|
||||||
vertical-align: middle;
|
|
||||||
font-weight: bold;
|
|
||||||
border-bottom: 1px solid #DDD;
|
|
||||||
border-right: 1px solid #DDD;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.web2py_grid tr.odd {background-color: #F9F9F9;}
|
.web2py_grid tr.odd {background-color: #F9F9F9;}
|
||||||
.web2py_grid tr:hover {background-color: #F5F5F5; }
|
.web2py_grid tr:hover {background-color: #F5F5F5; }
|
||||||
|
|
||||||
@@ -230,25 +219,23 @@ div.error {
|
|||||||
text-shadow: 1px 1px 0 #FFFFFF;
|
text-shadow: 1px 1px 0 #FFFFFF;
|
||||||
white-space: nowrap; overflow: visible; cursor: pointer;
|
white-space: nowrap; overflow: visible; cursor: pointer;
|
||||||
background:#ECECEC;
|
background:#ECECEC;
|
||||||
text-decoration: none; border: 1px solid #CACACA;
|
border: 1px solid #CACACA;
|
||||||
-webkit-border-radius: 2px; -moz-border-radius: 2px;
|
-webkit-border-radius: 2px; -moz-border-radius: 2px;
|
||||||
-webkit-background-clip: padding-box; border-radius: 2px;
|
-webkit-background-clip: padding-box; border-radius: 2px;
|
||||||
outline: none; position: relative; zoom: 1; *display: inline;
|
outline: none; position: relative; zoom: 1; *display: inline;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.web2py_console {
|
.web2py_console form {
|
||||||
min-height: 60px;
|
width:100%;
|
||||||
text-align: left;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.web2py_search_actions{
|
.web2py_search_actions{
|
||||||
width:40%;
|
|
||||||
float:left;
|
float:left;
|
||||||
text-align:left;
|
text-align:left;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.web2py_grid .row_buttons {
|
.web2py_grid .row_buttons {
|
||||||
min-height:25px;
|
min-height:25px;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
@@ -257,6 +244,10 @@ div.error {
|
|||||||
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,
|
||||||
@@ -266,41 +257,6 @@ div.error {
|
|||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
margin-right: 5px; display: inline-block;
|
margin-right: 5px; display: inline-block;
|
||||||
padding: 3px 5px 3px 5px;
|
padding: 3px 5px 3px 5px;
|
||||||
font-family: 'lucida grande', tahoma, verdana, arial, sans-serif;
|
|
||||||
font-size: 1em;
|
|
||||||
color: #3C3C3D;
|
|
||||||
text-shadow: 1px 1px 0 #FFFFFF;
|
|
||||||
background:#ECECEC;
|
|
||||||
white-space: nowrap; overflow: visible;
|
|
||||||
cursor: pointer; text-decoration: none;
|
|
||||||
border: 1px solid #CACACA;
|
|
||||||
-webkit-border-radius: 2px; -moz-border-radius: 2px;
|
|
||||||
-webkit-background-clip: padding-box; border-radius: 2px;
|
|
||||||
outline: none; position: relative; zoom: 1; *display: inline;
|
|
||||||
}
|
|
||||||
|
|
||||||
.web2py_grid .row_buttons a:hover,
|
|
||||||
.web2py_search_actions a:hover,
|
|
||||||
.web2py_console input[type=submit]:hover,
|
|
||||||
.web2py_console input[type=button]:hover,
|
|
||||||
.web2py_paginator ul li a:hover {
|
|
||||||
color: #222;
|
|
||||||
background: #ddd; /* Old browsers */
|
|
||||||
background: #ddd -moz-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%); /* FF3.6+ */
|
|
||||||
background: #ddd -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,.3)), color-stop(100%,rgba(0,0,\
|
|
||||||
0,.3))); /* Chrome,Safari4+ */
|
|
||||||
background: #ddd -webkit-linear-gradient(top, rgba(255,255,255,.3) 0%,rgba(0,0,0,.3) 100%); /* Chrome10+,Safari5.1+ */
|
|
||||||
background: #ddd -o-linear-gradient(top, rgba(255,255,255,.3) 0%,rgba(0,0,0,.3) 100%); /* Opera11.10+ */
|
|
||||||
background: #ddd -ms-linear-gradient(top, rgba(255,255,255,.3) 0%,rgba(0,0,0,.3) 100%); /* IE10+ */
|
|
||||||
background: #ddd linear-gradient(top, rgba(255,255,255,.3) 0%,rgba(0,0,0,.3) 100%); /* W3C */
|
|
||||||
border: 1px solid #888;
|
|
||||||
border-top: 1px solid #aaa;
|
|
||||||
border-left: 1px solid #aaa;
|
|
||||||
/*
|
|
||||||
color: #FFFFFF; border-color: #388AD4; text-decoration: none;
|
|
||||||
text-shadow: -1px -1px 0 rgba(0,0,0,0.3);
|
|
||||||
background-position: 0 -40px; background-color: #2D7DC5;
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.web2py_counter {
|
.web2py_counter {
|
||||||
@@ -316,9 +272,8 @@ color: #222;
|
|||||||
|
|
||||||
.web2py_paginator {
|
.web2py_paginator {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
color: #333;
|
|
||||||
text-align:right;
|
text-align:right;
|
||||||
background-color: #f2f2f2; padding: 5px; border-bottom: 1px solid #DDD;
|
background-color: #f2f2f2;
|
||||||
|
|
||||||
}
|
}
|
||||||
.web2py_paginator ul {
|
.web2py_paginator ul {
|
||||||
@@ -326,26 +281,20 @@ color: #222;
|
|||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.web2py_paginator ul li {
|
.web2py_paginator ul li {
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
|
|
||||||
.web2py_paginator .current {
|
.web2py_paginator .current {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
#w2p_query_trigger {
|
#w2p_query_trigger {
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
#w2p_query_panel {
|
|
||||||
// float:left;
|
#w2p_query_panel {}
|
||||||
background:#e0e0e0;
|
|
||||||
border:1px solid #CFCFCF;
|
|
||||||
// bottom:3px;
|
|
||||||
// left:187px;
|
|
||||||
// margin-top: 30px;
|
|
||||||
min-width:550px;
|
|
||||||
min-height:16px;
|
|
||||||
padding: 3px 3px;
|
|
||||||
border-radius:2px;
|
|
||||||
}
|
|
||||||
.ie9 #query_panel {padding-bottom:2px;}
|
.ie9 #query_panel {padding-bottom:2px;}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 4.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.3 KiB |
+7
File diff suppressed because one or more lines are too long
@@ -20,7 +20,7 @@
|
|||||||
{{pass}}
|
{{pass}}
|
||||||
|
|
||||||
{{block right_sidebar}}
|
{{block right_sidebar}}
|
||||||
{{=A(T("Administrative Interface"), _href=URL('admin','default','index'), _class='button',
|
{{=A(T("Administrative Interface"), _href=URL('admin','default','index'), _class='btn',
|
||||||
_style='margin-top: 1em;')}}
|
_style='margin-top: 1em;')}}
|
||||||
<h6>{{=T("Don't know what to do?")}}</h6>
|
<h6>{{=T("Don't know what to do?")}}</h6>
|
||||||
<ul>
|
<ul>
|
||||||
|
|||||||
@@ -38,10 +38,11 @@
|
|||||||
<!-- All JavaScript at the bottom, except for Modernizr which enables
|
<!-- All JavaScript at the bottom, except for Modernizr which enables
|
||||||
HTML5 elements & feature detects -->
|
HTML5 elements & feature detects -->
|
||||||
<script src="{{=URL('static','js/modernizr.custom.js')}}"></script>
|
<script src="{{=URL('static','js/modernizr.custom.js')}}"></script>
|
||||||
|
<script src="{{=URL('static','js/bootstrap.min.js')}}"></script>
|
||||||
|
|
||||||
<!-- include stylesheets -->
|
<!-- include stylesheets -->
|
||||||
{{
|
{{
|
||||||
response.files.append(URL('static','css/skeleton.css'))
|
response.files.append(URL('static','css/bootstrap.min.css'))
|
||||||
response.files.append(URL('static','css/web2py.css'))
|
response.files.append(URL('static','css/web2py.css'))
|
||||||
if response.menu:
|
if response.menu:
|
||||||
response.files.append(URL('static','css/superfish.css'))
|
response.files.append(URL('static','css/superfish.css'))
|
||||||
@@ -61,7 +62,7 @@
|
|||||||
# using sidebars need to know what sidebar you want to use
|
# using sidebars need to know what sidebar you want to use
|
||||||
left_sidebar_enabled = globals().get('left_sidebar_enabled',False)
|
left_sidebar_enabled = globals().get('left_sidebar_enabled',False)
|
||||||
right_sidebar_enabled = globals().get('right_sidebar_enabled',False)
|
right_sidebar_enabled = globals().get('right_sidebar_enabled',False)
|
||||||
middle_columns = {0:'sixteen',1:'twelve',2:'eight'}[
|
middle_columns = {0:'span12',1:'span9',2:'span6'}[
|
||||||
(left_sidebar_enabled and 1 or 0)+(right_sidebar_enabled and 1 or 0)]
|
(left_sidebar_enabled and 1 or 0)+(right_sidebar_enabled and 1 or 0)]
|
||||||
}}
|
}}
|
||||||
|
|
||||||
@@ -71,94 +72,80 @@
|
|||||||
uncomment to load jquery-ui //-->
|
uncomment to load jquery-ui //-->
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="wrapper"><!-- for sticky footer -->
|
<div class="topbar">
|
||||||
|
<div class="container-fluid">
|
||||||
<div class="topbar">
|
<div class="span12">
|
||||||
<div class="container">
|
<div id="navbar">{{='auth' in globals() and auth.navbar(separators=(' ',' | ',''))}}</div>
|
||||||
<div class="sixteen columns">
|
{{is_mobile=request.user_agent().is_mobile}}
|
||||||
<div id="navbar">{{='auth' in globals() and auth.navbar(separators=(' ',' | ',''))}}</div>
|
{{if response.menu:}}
|
||||||
{{is_mobile=request.user_agent().is_mobile}}
|
<div id="menu">
|
||||||
{{if response.menu:}}
|
{{=MENU(response.menu, _class='mobile-menu' if is_mobile else 'sf-menu',mobile=is_mobile)}}
|
||||||
<div id="menu">
|
|
||||||
{{=MENU(response.menu, _class='mobile-menu' if is_mobile else 'sf-menu',mobile=is_mobile)}}
|
|
||||||
</div>
|
|
||||||
{{pass}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div><!-- topbar -->
|
|
||||||
|
|
||||||
<div class="flash">{{=response.flash or ''}}</div>
|
|
||||||
|
|
||||||
<div class="header">
|
|
||||||
<div class="container">
|
|
||||||
<div class="sixteen columns">
|
|
||||||
<h1 class="remove-bottom" style="margin-top: .5em;">
|
|
||||||
{{=response.title or request.application}}
|
|
||||||
</h1>
|
|
||||||
<h5>{{=response.subtitle or ''}}</h5>
|
|
||||||
</div>
|
|
||||||
<div class="sixteen columns">
|
|
||||||
<div class="statusbar clearfix">
|
|
||||||
{{block statusbar}}
|
|
||||||
<div class="breadcrumbs">{{=request.function.replace('_', ' ').title()}}</div>
|
|
||||||
{{end}}
|
|
||||||
<!-- AddToAny BEGIN -->
|
|
||||||
<div style="float:right; padding-top: .25em;" class="a2a_kit a2a_default_style">
|
|
||||||
<a class="a2a_dd" href="http://www.addtoany.com/share_save">Share</a></div>
|
|
||||||
<script type="text/javascript" src="http://static.addtoany.com/menu/page.js"></script>
|
|
||||||
<!-- AddToAny END -->
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
{{pass}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div><!-- topbar -->
|
||||||
|
|
||||||
<div class="main">
|
<div class="flash">{{=response.flash or ''}}</div>
|
||||||
<div class="container">
|
|
||||||
{{if left_sidebar_enabled:}}
|
|
||||||
<div class="four columns left-sidebar">
|
|
||||||
{{block left_sidebar}}
|
|
||||||
<h3>Left Sidebar</h3>
|
|
||||||
<p></p>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
{{pass}}
|
|
||||||
|
|
||||||
<div class="{{=middle_columns}} columns center">
|
<div class="header">
|
||||||
{{block center}}
|
<div class="container-fluid">
|
||||||
{{include}}
|
<div class="span12">
|
||||||
{{end}}
|
<!-- AddToAny BEGIN -->
|
||||||
</div>
|
<div style="float:right; padding-top: .25em;" class="a2a_kit a2a_default_style">
|
||||||
|
<a class="a2a_dd" href="http://www.addtoany.com/share_save">Share</a></div>
|
||||||
|
<script type="text/javascript" src="http://static.addtoany.com/menu/page.js"></script>
|
||||||
|
<h1>
|
||||||
|
{{=response.title or request.application}}
|
||||||
|
</h1>
|
||||||
|
<h5>{{=response.subtitle or ''}}</h5>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{{if right_sidebar_enabled:}}
|
<div class="main">
|
||||||
<div class="four columns">
|
<div class="container-fluid">
|
||||||
{{block right_sidebar}}
|
{{if left_sidebar_enabled:}}
|
||||||
<h3>Right Sidebar</h3>
|
<div class="span3 left-sidebar">
|
||||||
<p></p>
|
{{block left_sidebar}}
|
||||||
{{end}}
|
<h3>Left Sidebar</h3>
|
||||||
</div>
|
<p></p>
|
||||||
{{pass}}
|
{{end}}
|
||||||
|
</div>
|
||||||
|
{{pass}}
|
||||||
|
|
||||||
</div><!-- container -->
|
<div class="{{=middle_columns}} center">
|
||||||
</div><!-- main -->
|
{{block center}}
|
||||||
|
{{include}}
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="push"></div>
|
{{if right_sidebar_enabled:}}
|
||||||
</div><!-- wrapper -->
|
<div class="span3">
|
||||||
|
{{block right_sidebar}}
|
||||||
|
<h3>Right Sidebar</h3>
|
||||||
|
<p></p>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
{{pass}}
|
||||||
|
|
||||||
|
</div><!-- container-fluid -->
|
||||||
|
</div><!-- main -->
|
||||||
|
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<div class="container">
|
<div class="container-fluid">
|
||||||
<div class="sixteen columns">
|
<div class="span12">
|
||||||
{{block footer}} <!-- this is default footer -->
|
{{block footer}} <!-- this is default footer -->
|
||||||
<div class="footer-content clearfix">
|
<div class="footer-content">
|
||||||
<div class="copyright">{{=T('Copyright')}} © 2011</div>
|
<div class="copyright">{{=T('Copyright')}} © 2011</div>
|
||||||
<div style="float: right;">
|
<div style="float: right;">
|
||||||
<a href="http://www.web2py.com/">
|
Powered by
|
||||||
<img style="padding-bottom: 0;" src="{{=URL('static','images/poweredby.png')}}"/>
|
<a href="http://www.web2py.com/">web2py</a>
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div><!-- container -->
|
</div><!-- container-fluid -->
|
||||||
</div><!-- footer -->
|
</div><!-- footer -->
|
||||||
|
|
||||||
<!--[if lt IE 7 ]>
|
<!--[if lt IE 7 ]>
|
||||||
|
|||||||
+27
-22
@@ -1431,15 +1431,13 @@ class SQLFORM(FORM):
|
|||||||
jQuery('#w2p_query_panel').slideUp();
|
jQuery('#w2p_query_panel').slideUp();
|
||||||
}
|
}
|
||||||
""")
|
""")
|
||||||
return CAT(
|
return (INPUT(
|
||||||
INPUT(
|
|
||||||
_value=T("Query"),_type="button",_id="w2p_query_trigger",
|
_value=T("Query"),_type="button",_id="w2p_query_trigger",
|
||||||
_onclick="jQuery('#w2p_query_fields').change();jQuery('#w2p_query_panel').slideToggle();"),
|
_onclick="jQuery('#w2p_query_fields').change();jQuery('#w2p_query_panel').slideToggle();"),
|
||||||
DIV(_id="w2p_query_panel",
|
DIV(_id="w2p_query_panel",
|
||||||
_style='position:absolute;z-index:1000',
|
_class='hidden',
|
||||||
_class='hidden',
|
*criteria),
|
||||||
*criteria),
|
fadd)
|
||||||
fadd)
|
|
||||||
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@@ -1614,7 +1612,7 @@ class SQLFORM(FORM):
|
|||||||
formfooter = DIV(
|
formfooter = DIV(
|
||||||
_class='form_footer row_buttons %(header)s %(cornerbottom)s' % ui)
|
_class='form_footer row_buttons %(header)s %(cornerbottom)s' % ui)
|
||||||
|
|
||||||
create_form = update_form = view_form = None
|
create_form = update_form = view_form = search_form = None
|
||||||
sqlformargs = dict(formargs)
|
sqlformargs = dict(formargs)
|
||||||
|
|
||||||
if create and len(request.args)>1 and request.args[-2] == 'new':
|
if create and len(request.args)>1 and request.args[-2] == 'new':
|
||||||
@@ -1705,21 +1703,20 @@ class SQLFORM(FORM):
|
|||||||
user_signature=user_signature)
|
user_signature=user_signature)
|
||||||
console = DIV(_class='web2py_console %(header)s %(cornertop)s' % ui)
|
console = DIV(_class='web2py_console %(header)s %(cornertop)s' % ui)
|
||||||
error = None
|
error = None
|
||||||
search_form = None
|
|
||||||
if searchable:
|
if searchable:
|
||||||
|
sfields = reduce(lambda a,b:a+b,
|
||||||
|
[[f for f in t if f.readable] for t in tables])
|
||||||
if search_widget=='default':
|
if search_widget=='default':
|
||||||
|
mq,mf,ms = SQLFORM.search_menu(sfields)
|
||||||
search_widget = lambda sfield, url: FORM(
|
search_widget = lambda sfield, url: FORM(
|
||||||
SQLFORM.search_menu(sfields),
|
mq,
|
||||||
INPUT(_name='keywords',_value=request.vars.keywords,
|
INPUT(_name='keywords',_value=request.vars.keywords,
|
||||||
_id='web2py_keywords'),
|
_id='web2py_keywords'),
|
||||||
INPUT(_type='submit',_value=T('Search')),
|
INPUT(_type='submit',_value=T('Search')),
|
||||||
INPUT(_type='submit',_value=T('Clear'),
|
INPUT(_type='submit',_value=T('Clear'),
|
||||||
_onclick="jQuery('#web2py_keywords').val('');"),
|
_onclick="jQuery('#web2py_keywords').val('');"),
|
||||||
_method="GET",_action=url)
|
mf,ms,_method="GET",_action=url)
|
||||||
sfields = reduce(lambda a,b:a+b,
|
|
||||||
[[f for f in t if f.readable] for t in tables])
|
|
||||||
form = search_widget and search_widget(sfields,url()) or ''
|
form = search_widget and search_widget(sfields,url()) or ''
|
||||||
search_form = form
|
|
||||||
console.append(form)
|
console.append(form)
|
||||||
keywords = request.vars.get('keywords','')
|
keywords = request.vars.get('keywords','')
|
||||||
try:
|
try:
|
||||||
@@ -2048,16 +2045,24 @@ class SQLFORM(FORM):
|
|||||||
kwargs[key] = kwargs[key][table._tablename]
|
kwargs[key] = kwargs[key][table._tablename]
|
||||||
else:
|
else:
|
||||||
del kwargs[key]
|
del kwargs[key]
|
||||||
|
check = {}
|
||||||
|
id_field_name = table._id.name
|
||||||
for tablename,fieldname in table._referenced_by:
|
for tablename,fieldname in table._referenced_by:
|
||||||
|
if db[tablename][fieldname].readable:
|
||||||
|
check[tablename] = check.get(tablename,[])+[fieldname]
|
||||||
|
for tablename in sorted(check):
|
||||||
|
linked_fieldnames = check[tablename]
|
||||||
tb = db[tablename]
|
tb = db[tablename]
|
||||||
if not tb[fieldname].readable: continue
|
multiple_links = len(linked_fieldnames)>1
|
||||||
id_field_name = table._id.name
|
for fieldname in linked_fieldnames:
|
||||||
if linked_tables is None or tablename in linked_tables:
|
if linked_tables is None or tablename in linked_tables:
|
||||||
args0 = tablename+'.'+fieldname
|
t = T(tb._plural) if not multiple_links else T(tb._plural+'('+fieldname+')')
|
||||||
links.append(
|
args0 = tablename+'.'+fieldname
|
||||||
lambda row,t=T(tb._plural+' for '+fieldname),nargs=nargs,args0=args0:\
|
links.append(
|
||||||
A(SPAN(t),_class=trap_class(),_href=URL(
|
lambda row,t=t,nargs=nargs,args0=args0:\
|
||||||
args=request.args[:nargs]+[args0,row[id_field_name]])))
|
A(SPAN(t),_class=trap_class(),_href=URL(
|
||||||
|
args=request.args[:nargs]+[args0,row[id_field_name]])))
|
||||||
|
|
||||||
grid=SQLFORM.grid(query,args=request.args[:nargs],links=links,
|
grid=SQLFORM.grid(query,args=request.args[:nargs],links=links,
|
||||||
links_in_grid=links_in_grid,
|
links_in_grid=links_in_grid,
|
||||||
user_signature=user_signature,**kwargs)
|
user_signature=user_signature,**kwargs)
|
||||||
|
|||||||
Reference in New Issue
Block a user