threw in also a better list:string widget repr for bs3

Updated also the bootswatch theme because something was wrong
This commit is contained in:
niphlod
2015-09-21 21:38:28 +02:00
parent 0fa0dbaeea
commit 46f081c45c
8 changed files with 35 additions and 29 deletions
+4
View File
@@ -1,3 +1,7 @@
## master
- Change .flash and .hidden to .w2p_flash and .w2p_hidden
- copy the static folder from the new welcome app when you update web2py
## 2.12.1 ## 2.12.1
- security fix: Validate for open redirect everywhere, not just in login() - security fix: Validate for open redirect everywhere, not just in login()
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
div.flash { div.w2p_flash {
background-image: none; background-image: none;
border-radius: 4px; border-radius: 4px;
-o-border-radius: 4px; -o-border-radius: 4px;
@@ -15,13 +15,13 @@ div.flash {
margin: 0 0 20px; margin: 0 0 20px;
padding: 15px 35px 15px 15px; padding: 15px 35px 15px 15px;
} }
div.flash.alert:hover { div.w2p_flash.alert:hover {
opacity: 1; opacity: 1;
} }
.ie-lte8 div.flash { .ie-lte8 div.w2p_flash {
filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#222222', endColorstr='#000000', GradientType=0); filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#222222', endColorstr='#000000', GradientType=0);
} }
.ie-lte8 div.flash:hover { .ie-lte8 div.w2p_flash:hover {
filter: alpha(opacity=25); filter: alpha(opacity=25);
} }
.main-container { .main-container {
@@ -37,7 +37,7 @@ div.error {
display: inline-block; display: inline-block;
padding: 5px; padding: 5px;
} }
div.flash.alert { div.w2p_flash.alert {
display: none; display: none;
position: fixed; position: fixed;
top: 70px; top: 70px;
@@ -136,7 +136,7 @@ header h1 {
header .jumbotron { header .jumbotron {
background-color: transparent; background-color: transparent;
} }
.flash { .w2p_flash {
opacity: 0.9!important; opacity: 0.9!important;
right: 100px; right: 100px;
} }
+6 -6
View File
@@ -33,7 +33,7 @@ audio {width:200px}
[type="text"], [type="password"], select { [type="text"], [type="password"], select {
margin-right: 5px; width: 300px; margin-right: 5px; width: 300px;
} }
.hidden {display:none;visibility:visible} .w2p_hidden {display:none;visibility:visible}
.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}
@@ -88,7 +88,7 @@ div.w2p_export_menu a, div.w2p_wiki_tags a, div.w2p_cloud a {margin-left:5px; pa
#web2py_user_form td {vertical-align:top} #web2py_user_form td {vertical-align:top}
/*********** web2py specific ***********/ /*********** web2py specific ***********/
div.flash { div.w2p_flash {
font-weight:bold; font-weight:bold;
display:none; display:none;
position:fixed; position:fixed;
@@ -117,11 +117,11 @@ div.flash {
z-index:2000; z-index:2000;
} }
div.flash #closeflash{color:inherit; float:right; margin-left:15px;} div.w2p_flash #closeflash{color:inherit; float:right; margin-left:15px;}
.ie-lte7 div.flash #closeflash .ie-lte7 div.flash #closeflash
{color:expression(this.parentNode.currentStyle['color']);float:none;position:absolute;right:4px;} {color:expression(this.parentNode.currentStyle['color']);float:none;position:absolute;right:4px;}
div.flash:hover { opacity:0.25; } div.w2p_flash:hover { opacity:0.25; }
div.error_wrapper {display:block} div.error_wrapper {display:block}
div.error { div.error {
@@ -304,8 +304,8 @@ li.w2p_grid_breadcrumb_elem {
/* fix some IE problems */ /* fix some IE problems */
.ie-lte7 .topbar .container {z-index:2} .ie-lte7 .topbar .container {z-index:2}
.ie-lte8 div.flash{ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#222222', endColorstr='#000000', GradientType=0 ); } .ie-lte8 div.w2p_flash{ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#222222', endColorstr='#000000', GradientType=0 ); }
.ie-lte8 div.flash:hover {filter:alpha(opacity=25);} .ie-lte8 div.w2p_flash:hover {filter:alpha(opacity=25);}
.ie9 #w2p_query_panel {padding-bottom:2px} .ie9 #w2p_query_panel {padding-bottom:2px}
.web2py_console .form-control {width: 20%; display: inline;} .web2py_console .form-control {width: 20%; display: inline;}
@@ -52,7 +52,7 @@
}); });
} }
var ul = this; var ul = this;
$(ul).find(":text").after('<a class="btn btn-default" href="#">+</a>&nbsp;<a class="btn btn-default" href="#">-</a>').keypress(function(e) { $(ul).find(":text").addClass('form-control').wrap("<div class='input-group'></div>").after('<div class="input-group-addon"><i class="glyphicon glyphicon-plus"></i></div><div class="input-group-addon"><i class="glyphicon glyphicon-minus"></i></div>').keypress(function(e) {
return (e.which == 13) ? pe(ul, e) : true; return (e.which == 13) ? pe(ul, e) : true;
}).next().click(function(e) { }).next().click(function(e) {
pe(ul, e); pe(ul, e);
+6 -6
View File
@@ -133,7 +133,7 @@
}, },
ajax_init: function(target) { ajax_init: function(target) {
/*called whenever a fragment gets loaded */ /*called whenever a fragment gets loaded */
$('.hidden', target).hide(); $('.w2p_hidden', target).hide();
web2py.manage_errors(target); web2py.manage_errors(target);
web2py.ajax_fields(target); web2py.ajax_fields(target);
web2py.show_if_handler(target); web2py.show_if_handler(target);
@@ -161,7 +161,7 @@
* and require no dom manipulations * and require no dom manipulations
*/ */
var doc = $(document); var doc = $(document);
doc.on('click', '.flash', function(e) { doc.on('click', '.w2p_flash', function(e) {
var t = $(this); var t = $(this);
if(t.css('top') == '0px') t.slideUp('slow'); if(t.css('top') == '0px') t.slideUp('slow');
else t.fadeOut(); else t.fadeOut();
@@ -241,7 +241,7 @@
/*personally I don't like it. /*personally I don't like it.
*if there's an error it it flashed and can be removed *if there's an error it it flashed and can be removed
*as any other message *as any other message
*doc.off('click', '.flash') *doc.off('click', '.w2p_flash')
*/ */
switch(xhr.status) { switch(xhr.status) {
case 500: case 500:
@@ -530,13 +530,13 @@
}, },
/*helper for flash messages*/ /*helper for flash messages*/
flash: function(message, status) { flash: function(message, status) {
var flash = $('.flash'); var flash = $('.w2p_flash');
web2py.hide_flash(); web2py.hide_flash();
flash.html(message).addClass(status); flash.html(message).addClass(status);
if(flash.html()) flash.append('<span id="closeflash"> &times; </span>').slideDown(); if(flash.html()) flash.append('<span id="closeflash"> &times; </span>').slideDown();
}, },
hide_flash: function() { hide_flash: function() {
$('.flash').fadeOut(0).html(''); $('.w2p_flash').fadeOut(0).html('');
}, },
show_if_handler: function(target) { show_if_handler: function(target) {
var triggers = {}; var triggers = {};
@@ -692,7 +692,7 @@
$.web2py.component_handler(target); $.web2py.component_handler(target);
}, },
main_hook: function() { main_hook: function() {
var flash = $('.flash'); var flash = $('.w2p_flash');
flash.hide(); flash.hide();
if(flash.html()) web2py.flash(flash.html()); if(flash.html()) web2py.flash(flash.html());
web2py.ajax_init(document); web2py.ajax_init(document);
+8 -8
View File
@@ -155,8 +155,8 @@
{{=T.M("Cache contains items up to **%(hours)02d** %%{hour(hours)} **%(min)02d** %%{minute(min)} **%(sec)02d** %%{second(sec)} old.", {{=T.M("Cache contains items up to **%(hours)02d** %%{hour(hours)} **%(min)02d** %%{minute(min)} **%(sec)02d** %%{second(sec)} old.",
dict(hours=total['oldest'][0], min=total['oldest'][1], sec=total['oldest'][2]))}} dict(hours=total['oldest'][0], min=total['oldest'][1], sec=total['oldest'][2]))}}
</p> </p>
{{=BUTTON(T('Cache Keys'), _onclick='jQuery("#all_keys").toggle().toggleClass( "hidden" );')}} {{=BUTTON(T('Cache Keys'), _onclick='jQuery("#all_keys").toggle().toggleClass( "w2p_hidden" );')}}
<div class="hidden" id="all_keys"> <div class="w2p_hidden" id="all_keys">
{{=total['keys']}} {{=total['keys']}}
</div> </div>
<br /> <br />
@@ -183,8 +183,8 @@
{{=T.M("RAM contains items up to **%(hours)02d** %%{hour(hours)} **%(min)02d** %%{minute(min)} **%(sec)02d** %%{second(sec)} old.", {{=T.M("RAM contains items up to **%(hours)02d** %%{hour(hours)} **%(min)02d** %%{minute(min)} **%(sec)02d** %%{second(sec)} old.",
dict(hours=ram['oldest'][0], min=ram['oldest'][1], sec=ram['oldest'][2]))}} dict(hours=ram['oldest'][0], min=ram['oldest'][1], sec=ram['oldest'][2]))}}
</p> </p>
{{=BUTTON(T('RAM Cache Keys'), _onclick='jQuery("#ram_keys").toggle().toggleClass( "hidden" );')}} {{=BUTTON(T('RAM Cache Keys'), _onclick='jQuery("#ram_keys").toggle().toggleClass( "w2p_hidden" );')}}
<div class="hidden" id="ram_keys"> <div class="w2p_hidden" id="ram_keys">
{{=ram['keys']}} {{=ram['keys']}}
</div> </div>
<br /> <br />
@@ -212,8 +212,8 @@
{{=T.M("DISK contains items up to **%(hours)02d** %%{hour(hours)} **%(min)02d** %%{minute(min)} **%(sec)02d** %%{second(sec)} old.", {{=T.M("DISK contains items up to **%(hours)02d** %%{hour(hours)} **%(min)02d** %%{minute(min)} **%(sec)02d** %%{second(sec)} old.",
dict(hours=disk['oldest'][0], min=disk['oldest'][1], sec=disk['oldest'][2]))}} dict(hours=disk['oldest'][0], min=disk['oldest'][1], sec=disk['oldest'][2]))}}
</p> </p>
{{=BUTTON(T('Disk Cache Keys'), _onclick='jQuery("#disk_keys").toggle().toggleClass( "hidden" );')}} {{=BUTTON(T('Disk Cache Keys'), _onclick='jQuery("#disk_keys").toggle().toggleClass( "w2p_hidden" );')}}
<div class="hidden" id="disk_keys"> <div class="w2p_hidden" id="disk_keys">
{{=disk['keys']}} {{=disk['keys']}}
</div> </div>
<br /> <br />
@@ -249,8 +249,8 @@
<li><a href="{{=URL('appadmin', 'bg_graph_model', args=['png'])}}">png</a></li> <li><a href="{{=URL('appadmin', 'bg_graph_model', args=['png'])}}">png</a></li>
<li><a href="{{=URL('appadmin', 'bg_graph_model', args=['svg'])}}">svg</a></li> <li><a href="{{=URL('appadmin', 'bg_graph_model', args=['svg'])}}">svg</a></li>
<li><a href="{{=URL('appadmin', 'bg_graph_model', args=['pdf'])}}">pdf</a></li> <li><a href="{{=URL('appadmin', 'bg_graph_model', args=['pdf'])}}">pdf</a></li>
<li><a href="{{=URL('appadmin', 'bg_graph_model', args=['ps'])}}">ps</a></li> <li><a href="{{=URL('appadmin', 'bg_graph_model', args=['ps'])}}">ps</a></li>
<li><a href="{{=URL('appadmin', 'bg_graph_model', args=['dot'])}}">dot</a></li> <li><a href="{{=URL('appadmin', 'bg_graph_model', args=['dot'])}}">dot</a></li>
</ul> </ul>
</div> </div>
<br /> <br />
+1 -1
View File
@@ -46,7 +46,7 @@
</head> </head>
<body> <body>
<!--[if lt IE 8]><p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p><![endif]--> <!--[if lt IE 8]><p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p><![endif]-->
<div class="flash alert alert-dismissable">{{=response.flash or ''}}</div> <div class="w2p_flash alert alert-dismissable">{{=response.flash or ''}}</div>
<!-- Navbar ======================================= --> <!-- Navbar ======================================= -->
<nav class="navbar navbar-default navbar-fixed-top" role="navigation"> <nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container-fluid"> <div class="container-fluid">