fixws and 'new' button in grid query
This commit is contained in:
@@ -20,3 +20,4 @@ def fade():
|
||||
return dict()
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -349,7 +349,7 @@ def ccache():
|
||||
seconds = math.floor(seconds)
|
||||
|
||||
return (hours, minutes, seconds)
|
||||
|
||||
|
||||
for key, value in cache.ram.storage.items():
|
||||
if isinstance(value, dict):
|
||||
ram['hits'] = value['hit_total'] - value['misses']
|
||||
@@ -388,7 +388,7 @@ def ccache():
|
||||
if value[0] < disk['oldest']:
|
||||
disk['oldest'] = value[0]
|
||||
disk['keys'].append((key, GetInHMS(time.time() - value[0])))
|
||||
|
||||
|
||||
finally:
|
||||
portalocker.unlock(locker)
|
||||
locker.close()
|
||||
@@ -417,14 +417,16 @@ def ccache():
|
||||
def key_table(keys):
|
||||
return TABLE(
|
||||
TR(TD(B('Key')), TD(B('Time in Cache (h:m:s)'))),
|
||||
*[TR(TD(k[0]), TD('%02d:%02d:%02d' % k[1])) for k in keys],
|
||||
*[TR(TD(k[0]), TD('%02d:%02d:%02d' % k[1])) for k in keys],
|
||||
**dict(_class='cache-keys',
|
||||
_style="border-collapse: separate; border-spacing: .5em;"))
|
||||
|
||||
|
||||
ram['keys'] = key_table(ram['keys'])
|
||||
disk['keys'] = key_table(disk['keys'])
|
||||
total['keys'] = key_table(total['keys'])
|
||||
|
||||
|
||||
return dict(form=form, total=total,
|
||||
ram=ram, disk=disk, object_stats=hp != False)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -59,3 +59,4 @@ def cache_db_select():
|
||||
return dict(records=records)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from gluon.fileutils import read_file
|
||||
|
||||
response.menu = [['Register Person', False, URL('register_person')],
|
||||
['Register Dog', False, URL('register_dog')],
|
||||
response.menu = [['Register Person', False, URL('register_person')],
|
||||
['Register Dog', False, URL('register_dog')],
|
||||
['Register Product', False, URL('register_product')],
|
||||
['Buy product', False, URL('buy')]]
|
||||
|
||||
@@ -62,7 +62,7 @@ def buy():
|
||||
(db.purchase.product_id==form.vars.product_id)).select().first()
|
||||
|
||||
if purchase:
|
||||
# if list contains a record, update that record
|
||||
# if list contains a record, update that record
|
||||
purchase.update_record(
|
||||
quantity = purchase.quantity+form.vars.quantity)
|
||||
else:
|
||||
@@ -87,3 +87,4 @@ def delete_purchased():
|
||||
def download():
|
||||
""" used to download uploaded files """
|
||||
return response.download(request,db)
|
||||
|
||||
|
||||
@@ -72,3 +72,4 @@ def changelog():
|
||||
import os
|
||||
filename = os.path.join(request.env.gluon_parent, 'CHANGELOG')
|
||||
return response.render(dict(changelog=MARKMIN(read_file(filename))))
|
||||
|
||||
|
||||
@@ -25,3 +25,4 @@ def form():
|
||||
return dict(form=form, vars=form.vars)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -79,3 +79,4 @@ def vars():
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -22,3 +22,4 @@ def basic():
|
||||
return dict(message='you clicked on basic')
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -10,3 +10,4 @@ def counter():
|
||||
return dict(counter=session.counter)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -138,3 +138,4 @@ Quoted text
|
||||
|
||||
def ajaxwiki_onclick():
|
||||
return MARKMIN(request.vars.text).xml()
|
||||
|
||||
|
||||
@@ -7,3 +7,4 @@ def index():
|
||||
sheet = cache.ram('sheet1',lambda:Sheet(10,10,URL('callback')),0)
|
||||
#sheet.cell('r0c3',value='=r0c0+r0c1+r0c2',readonly=True)
|
||||
return dict(sheet=sheet)
|
||||
|
||||
|
||||
@@ -33,3 +33,4 @@ def beautify():
|
||||
return dict(message=BEAUTIFY(request))
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -46,3 +46,4 @@ def code_feed_reader(project,mode='div'):
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -37,3 +37,4 @@ def get_content(b=None,\
|
||||
openedfile.close()
|
||||
|
||||
return html
|
||||
|
||||
|
||||
@@ -42,3 +42,4 @@ def toggle_menuclass(cssclass='pressed',menuid='headermenu'):
|
||||
return XML(jscript)
|
||||
else:
|
||||
return ''
|
||||
|
||||
|
||||
@@ -4,4 +4,4 @@ border-radius: 10px;
|
||||
-webkit-border-radius: 10px;
|
||||
}.calendar table{margin:0px;font-size:11px;color:#000;cursor:default;font-family:tahoma,verdana,sans-serif;}.calendar .button{text-align:center;padding:1px;color:#fff;background:#000;}.calendar .nav{background:#000;color:#fff}.calendar thead .title{font-weight:bold;padding:1px;background:#000;color:#fff;text-align:center;}.calendar thead .name{padding:2px;text-align:center;background:#bbb;}.calendar thead .weekend{color:#f00;}.calendar thead .hilite {background-color:#666;}.calendar thead .active{padding:2px 0 0 2px;background-color:#c4c0b8;}.calendar tbody .day{width:2em;text-align:right;padding:2px 4px 2px 2px;}.calendar tbody .day.othermonth{color:#aaa;}.calendar tbody .day.othermonth.oweekend{color:#faa;}.calendar table .wn{padding:2px 3px 2px 2px;background:#bbb;}.calendar tbody .rowhilite td{background:#ddd;}.calendar tbody td.hilite{background:#bbb;}.calendar tbody td.active{background:#bbb;}.calendar tbody td.selected{font-weight:bold;background:#ddd;}.calendar tbody td.weekend{color:#f00;}.calendar tbody td.today{font-weight:bold;color:#00f;}.calendar tbody .disabled{color:#999;}.calendar tbody .emptycell{visibility:hidden;}.calendar tbody .emptyrow{display:none;}.calendar tfoot .ttip{background:#bbb;padding:1px;background:#000;color:#fff;text-align:center;}.calendar tfoot .hilite{background:#ddd;}.calendar tfoot .active{}.calendar .combo{position:absolute;display:none;width:4em;top:0;left:0;cursor:default;background:#e4e0d8;padding:1px;z-index:100;}.calendar .combo .label,.calendar .combo .label-IEfix{text-align:center;padding:1px;}.calendar .combo .label-IEfix{width:4em;}.calendar .combo .active{background:#c4c0b8;}.calendar .combo .hilite{background:#048;color:#fea;}.calendar td.time{padding:1px 0;text-align:center;background-color:#bbb;}.calendar td.time .hour,.calendar td.time .minute,.calendar td.time .ampm{padding:0 3px 0 4px;font-weight:bold;}.calendar td.time .ampm{text-align:center;}.calendar td.time .colon{padding:0 2px 0 3px;font-weight:bold;}.calendar td.time span.hilite{}.calendar td.time span.active{border-color:#f00;background-color:#000;color:#0f0;}.hour,.minute{font-size:2em;}
|
||||
|
||||
#CP_hourcont{z-index:99;padding:0;position:absolute;border:1px dashed #666;background-color:#eee;display:none;}#CP_minutecont{z-index:99;background-color:#ddd;padding:1px;position:absolute;width:45px;display:none;}.floatleft{float:left;}.CP_hour{z-index:99;padding:1px;font-family:Arial,Helvetica,sans-serif;font-size:9px;white-space:nowrap;cursor:pointer;width:35px;}.CP_minute{z-index:99;padding:1px;font-family:Arial,Helvetica,sans-serif;font-size:9px;white-space:nowrap;cursor:pointer;width:auto;}.CP_over{background-color:#fff;z-index:99}
|
||||
#CP_hourcont{z-index:99;padding:0;position:absolute;border:1px dashed #666;background-color:#eee;display:none;}#CP_minutecont{z-index:99;background-color:#ddd;padding:1px;position:absolute;width:45px;display:none;}.floatleft{float:left;}.CP_hour{z-index:99;padding:1px;font-family:Arial,Helvetica,sans-serif;font-size:9px;white-space:nowrap;cursor:pointer;width:35px;}.CP_minute{z-index:99;padding:1px;font-family:Arial,Helvetica,sans-serif;font-size:9px;white-space:nowrap;cursor:pointer;width:auto;}.CP_over{background-color:#fff;z-index:99}
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
.statusbar {padding-top: 2px; padding-bottom: 2px; border: 0; margin-bottom: 60px;
|
||||
background: url('../images/menu.png') repeat-x; }
|
||||
.statusbar a, .statusbar a:visited {color: #406361}
|
||||
a, a:visited, a:hover, h1,h2,h3,h4,h5 {color: #658883}
|
||||
.wrapper { background: url('../images/back-02.png') repeat-x; padding-top:10px;}
|
||||
h1 { font-size: 32px }
|
||||
h2 { font-size: 24px }
|
||||
h3 { font-size: 20px }
|
||||
h4 { font-size: 14px }
|
||||
sup { font-size: 0.5em; line-height: 2em; vertical-align: top;}
|
||||
.frame { border: 3px solid #959595; margin-bottom: 5px; }
|
||||
ul { list-style: circle outside;}
|
||||
.announce { position:absolute;align:center;color:white;top:120px;font-weight:bold;text-align:center;
|
||||
}
|
||||
.announce a { color: white !important;}
|
||||
|
||||
input:focus,textarea:focus {background:#f0f0f0!important}
|
||||
table.downloads { width:100%; }
|
||||
table.downloads th, table.downloads td {text-align:center;}
|
||||
table.downloads a.button { width: 150px; }
|
||||
th,td {padding-right: 10px;}
|
||||
.statusbar {padding-top: 2px; padding-bottom: 2px; border: 0; margin-bottom: 60px;
|
||||
background: url('../images/menu.png') repeat-x; }
|
||||
.statusbar a, .statusbar a:visited {color: #406361}
|
||||
a, a:visited, a:hover, h1,h2,h3,h4,h5 {color: #658883}
|
||||
.wrapper { background: url('../images/back-02.png') repeat-x; padding-top:10px;}
|
||||
h1 { font-size: 32px }
|
||||
h2 { font-size: 24px }
|
||||
h3 { font-size: 20px }
|
||||
h4 { font-size: 14px }
|
||||
sup { font-size: 0.5em; line-height: 2em; vertical-align: top;}
|
||||
.frame { border: 3px solid #959595; margin-bottom: 5px; }
|
||||
ul { list-style: circle outside;}
|
||||
.announce { position:absolute;align:center;color:white;top:120px;font-weight:bold;text-align:center;
|
||||
}
|
||||
.announce a { color: white !important;}
|
||||
|
||||
input:focus,textarea:focus {background:#f0f0f0!important}
|
||||
table.downloads { width:100%; }
|
||||
table.downloads th, table.downloads td {text-align:center;}
|
||||
table.downloads a.button { width: 150px; }
|
||||
th,td {padding-right: 10px;}
|
||||
|
||||
@@ -626,3 +626,4 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ ul.sf-menu li li li.sfHover ul {
|
||||
padding-bottom: 0.25em;
|
||||
color: #959595;
|
||||
}
|
||||
.sf-menu li:hover, .sf-menu a:focus, .sf-menu a:active, .sf-menu li.sfHover, .sf-menu a:hover {
|
||||
.sf-menu li:hover, .sf-menu a:focus, .sf-menu a:active, .sf-menu li.sfHover, .sf-menu a:hover {
|
||||
color: #FFFFFF;
|
||||
background-color: #303030;
|
||||
outline: 0;
|
||||
@@ -109,7 +109,7 @@ ul.sf-menu li li li.sfHover ul {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
text-indent: -999em;
|
||||
overflow: hidden;
|
||||
overflow: hidden;
|
||||
background: url('../images/arrows-ffffff.png') no-repeat -10px -100px; /* 8-bit indexed alpha png. IE6 gets solid image only */
|
||||
}
|
||||
a > .sf-sub-indicator { /* give all except IE6 the correct values */
|
||||
@@ -149,3 +149,4 @@ li.sfHover > a > .sf-sub-indicator {
|
||||
.sf-shadow ul.sf-shadow-off {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
|
||||
@@ -50,22 +50,22 @@ html, body {
|
||||
.footer, .push {
|
||||
height: 6em;
|
||||
padding: 1em 0;
|
||||
clear: both;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.footer-content {position: relative; bottom: -4em; width: 100%;}
|
||||
|
||||
.auth_navbar {
|
||||
white-space: nowrap;
|
||||
.auth_navbar {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* Sticky footer end */
|
||||
|
||||
body {
|
||||
background-color: #FFFFFF;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
.footer {
|
||||
background-color: #ECECEC;
|
||||
background-color: #ECECEC;
|
||||
}
|
||||
|
||||
.header {
|
||||
@@ -94,7 +94,7 @@ td.w2p_fl, td.w2p_fc { padding-top: 4px; }
|
||||
|
||||
a, a:visited, a:hover { color:#0069D6}
|
||||
|
||||
/*********** web2py specific ***********/
|
||||
/*********** web2py specific ***********/
|
||||
div.flash {
|
||||
font-weight: bold;
|
||||
display: none;
|
||||
@@ -169,7 +169,7 @@ div.error {
|
||||
.copyright {float: left;}
|
||||
|
||||
/* #MEDIA QUERIES SECTION */
|
||||
|
||||
|
||||
/* All Mobile Sizes (devices and browser) */
|
||||
@media only screen and (max-width: 767px) {
|
||||
|
||||
@@ -210,7 +210,7 @@ div.error {
|
||||
}
|
||||
|
||||
.web2py_grid thead th {
|
||||
background-color:#EAEAEA;
|
||||
background-color:#EAEAEA;
|
||||
padding: 10px 5px 10px 5px;
|
||||
line-height: 13.5px;
|
||||
vertical-align: middle;
|
||||
@@ -263,7 +263,7 @@ div.error {
|
||||
.web2py_console input[type=submit],
|
||||
.web2py_console input[type=button],
|
||||
.web2py_console button {
|
||||
line-height: 20px;
|
||||
line-height: 20px;
|
||||
margin-right: 5px; display: inline-block;
|
||||
padding: 3px 5px 3px 5px;
|
||||
font-family: 'lucida grande', tahoma, verdana, arial, sans-serif;
|
||||
@@ -348,3 +348,4 @@ color: #222;
|
||||
border-radius:2px;
|
||||
}
|
||||
.ie9 #query_panel {padding-bottom:2px;}
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,116 +1,116 @@
|
||||
$(function(){
|
||||
// hide/show header
|
||||
$('#close-open-top a').bind('click', function() {
|
||||
if($('header:visible').length) {
|
||||
$('img', this).attr('src', 'images/open.png');
|
||||
} else {
|
||||
$('img', this).attr('src', 'images/close.png');
|
||||
}
|
||||
$('header').slideToggle('slow');
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
// tabs
|
||||
$('.tab_content').hide();
|
||||
$('ul.tabs li:first').addClass('active').show();
|
||||
$('.tab_content:first').show();
|
||||
|
||||
$('ul.tabs li').click(function() {
|
||||
$('ul.tabs li').removeClass('active');
|
||||
$(this).addClass('active');
|
||||
$('.tab_content').hide();
|
||||
var activeTab = $(this).find('a').attr('href');
|
||||
$(activeTab).fadeIn();
|
||||
return false;
|
||||
});
|
||||
|
||||
// hide/show default text when user focuses on newsletter subscribe field
|
||||
var defaultEmailTxt = $('#email-address').val();
|
||||
$('#email-address').focus(function() {
|
||||
if ($('#email-address').val() == defaultEmailTxt) {
|
||||
$('#email-address').val('');
|
||||
}
|
||||
});
|
||||
$('#email-address').blur(function() {
|
||||
if ($('#email-address').val() == '') {
|
||||
$('#email-address').val(defaultEmailTxt);
|
||||
}
|
||||
});
|
||||
|
||||
// Lightbox
|
||||
$(".gallery a[rel^='prettyPhoto']").prettyPhoto({animationSpeed:'slow',theme:'dark_rounded',slideshow:4000, autoplay_slideshow: false});
|
||||
|
||||
// Tipsy
|
||||
$('#social li a img').tipsy({delayIn: 1200, delayOut: 1200, gravity: 's'});
|
||||
|
||||
// init newsletter subscription AJAX handling
|
||||
$('#newslettersubmit').click(function() { $('#newsletterform').submit(); return false; });
|
||||
$('#newsletterform').ajaxForm({dataType: 'json',
|
||||
timeout: 2000,
|
||||
success: newsletterResponse});
|
||||
|
||||
// Twitter script config
|
||||
if ($('#tweet').length) {
|
||||
getTwitters('tweet', {
|
||||
id: 'envatowebdesign',
|
||||
count: 3,
|
||||
enableLinks: true,
|
||||
ignoreReplies: true,
|
||||
template: '"%text%" <a class="meta" href="http://twitter.com/%user_screen_name%/status/%id%">%time%</a>'});
|
||||
}
|
||||
|
||||
|
||||
// init contact form validation and AJAX handling
|
||||
if ($("#contactform").length > 0) {
|
||||
$("#contactform").validate({ rules: { name: "required",
|
||||
email: { required: true, email: true },
|
||||
message: "required"},
|
||||
messages: { name: "This field is required.",
|
||||
email: { required: "This field is required.",
|
||||
email: "Please enter a valied email address."},
|
||||
message: "This field is required."},
|
||||
submitHandler: function(form) { $(form).ajaxSubmit({dataType: 'json', success: contactFormResponse}); }
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// handle newsletter subscribe AJAX response
|
||||
function newsletterResponse(response) {
|
||||
if (response.responseStatus == 'err') {
|
||||
if (response.responseMsg == 'ajax') {
|
||||
alert('Error - this script can only be invoked via an AJAX call.');
|
||||
} else if (response.responseMsg == 'fileopen') {
|
||||
alert('Error opening $emailsFile. Please refer to documentation for help.');
|
||||
} else if (response.responseMsg == 'email') {
|
||||
alert('Please enter a valid email address.');
|
||||
} else if (response.responseMsg == 'duplicate') {
|
||||
alert('You are already subscribed to our newsletter.');
|
||||
} else if (response.responseMsg == 'filewrite') {
|
||||
alert('Error writing to $emailsFile. Please refer to documentation for help.');
|
||||
} else {
|
||||
alert('Undocumented error. Please refresh the page and try again.');
|
||||
}
|
||||
} else if (response.responseStatus == 'ok') {
|
||||
alert('Thank you for subscribing to our newsletter! We will not abuse your address.');
|
||||
} else {
|
||||
alert('Undocumented error. Please refresh the page and try again.');
|
||||
}
|
||||
} // newsletterResponse
|
||||
|
||||
// handle contact form AJAX response
|
||||
function contactFormResponse(response) {
|
||||
if (response.responseStatus == 'err') {
|
||||
if (response.responseMsg == 'ajax') {
|
||||
alert('Error - this script can only be invoked via an AJAX call.');
|
||||
} else if (response.responseMsg == 'notsent') {
|
||||
alert('We are having some mail server issues. Please refresh the page or try again later.');
|
||||
} else {
|
||||
alert('Undocumented error. Please refresh the page and try again.');
|
||||
}
|
||||
} else if (response.responseStatus == 'ok') {
|
||||
alert('Thank you for contacting us! We\'ll get back to you ASAP.');
|
||||
} else {
|
||||
alert('Undocumented error. Please refresh the page and try again.');
|
||||
}
|
||||
} // contactFormResponse
|
||||
$(function(){
|
||||
// hide/show header
|
||||
$('#close-open-top a').bind('click', function() {
|
||||
if($('header:visible').length) {
|
||||
$('img', this).attr('src', 'images/open.png');
|
||||
} else {
|
||||
$('img', this).attr('src', 'images/close.png');
|
||||
}
|
||||
$('header').slideToggle('slow');
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
// tabs
|
||||
$('.tab_content').hide();
|
||||
$('ul.tabs li:first').addClass('active').show();
|
||||
$('.tab_content:first').show();
|
||||
|
||||
$('ul.tabs li').click(function() {
|
||||
$('ul.tabs li').removeClass('active');
|
||||
$(this).addClass('active');
|
||||
$('.tab_content').hide();
|
||||
var activeTab = $(this).find('a').attr('href');
|
||||
$(activeTab).fadeIn();
|
||||
return false;
|
||||
});
|
||||
|
||||
// hide/show default text when user focuses on newsletter subscribe field
|
||||
var defaultEmailTxt = $('#email-address').val();
|
||||
$('#email-address').focus(function() {
|
||||
if ($('#email-address').val() == defaultEmailTxt) {
|
||||
$('#email-address').val('');
|
||||
}
|
||||
});
|
||||
$('#email-address').blur(function() {
|
||||
if ($('#email-address').val() == '') {
|
||||
$('#email-address').val(defaultEmailTxt);
|
||||
}
|
||||
});
|
||||
|
||||
// Lightbox
|
||||
$(".gallery a[rel^='prettyPhoto']").prettyPhoto({animationSpeed:'slow',theme:'dark_rounded',slideshow:4000, autoplay_slideshow: false});
|
||||
|
||||
// Tipsy
|
||||
$('#social li a img').tipsy({delayIn: 1200, delayOut: 1200, gravity: 's'});
|
||||
|
||||
// init newsletter subscription AJAX handling
|
||||
$('#newslettersubmit').click(function() { $('#newsletterform').submit(); return false; });
|
||||
$('#newsletterform').ajaxForm({dataType: 'json',
|
||||
timeout: 2000,
|
||||
success: newsletterResponse});
|
||||
|
||||
// Twitter script config
|
||||
if ($('#tweet').length) {
|
||||
getTwitters('tweet', {
|
||||
id: 'envatowebdesign',
|
||||
count: 3,
|
||||
enableLinks: true,
|
||||
ignoreReplies: true,
|
||||
template: '"%text%" <a class="meta" href="http://twitter.com/%user_screen_name%/status/%id%">%time%</a>'});
|
||||
}
|
||||
|
||||
|
||||
// init contact form validation and AJAX handling
|
||||
if ($("#contactform").length > 0) {
|
||||
$("#contactform").validate({ rules: { name: "required",
|
||||
email: { required: true, email: true },
|
||||
message: "required"},
|
||||
messages: { name: "This field is required.",
|
||||
email: { required: "This field is required.",
|
||||
email: "Please enter a valied email address."},
|
||||
message: "This field is required."},
|
||||
submitHandler: function(form) { $(form).ajaxSubmit({dataType: 'json', success: contactFormResponse}); }
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// handle newsletter subscribe AJAX response
|
||||
function newsletterResponse(response) {
|
||||
if (response.responseStatus == 'err') {
|
||||
if (response.responseMsg == 'ajax') {
|
||||
alert('Error - this script can only be invoked via an AJAX call.');
|
||||
} else if (response.responseMsg == 'fileopen') {
|
||||
alert('Error opening $emailsFile. Please refer to documentation for help.');
|
||||
} else if (response.responseMsg == 'email') {
|
||||
alert('Please enter a valid email address.');
|
||||
} else if (response.responseMsg == 'duplicate') {
|
||||
alert('You are already subscribed to our newsletter.');
|
||||
} else if (response.responseMsg == 'filewrite') {
|
||||
alert('Error writing to $emailsFile. Please refer to documentation for help.');
|
||||
} else {
|
||||
alert('Undocumented error. Please refresh the page and try again.');
|
||||
}
|
||||
} else if (response.responseStatus == 'ok') {
|
||||
alert('Thank you for subscribing to our newsletter! We will not abuse your address.');
|
||||
} else {
|
||||
alert('Undocumented error. Please refresh the page and try again.');
|
||||
}
|
||||
} // newsletterResponse
|
||||
|
||||
// handle contact form AJAX response
|
||||
function contactFormResponse(response) {
|
||||
if (response.responseStatus == 'err') {
|
||||
if (response.responseMsg == 'ajax') {
|
||||
alert('Error - this script can only be invoked via an AJAX call.');
|
||||
} else if (response.responseMsg == 'notsent') {
|
||||
alert('We are having some mail server issues. Please refresh the page or try again later.');
|
||||
} else {
|
||||
alert('Undocumented error. Please refresh the page and try again.');
|
||||
}
|
||||
} else if (response.responseStatus == 'ok') {
|
||||
alert('Thank you for contacting us! We\'ll get back to you ASAP.');
|
||||
} else {
|
||||
alert('Undocumented error. Please refresh the page and try again.');
|
||||
}
|
||||
} // contactFormResponse
|
||||
|
||||
File diff suppressed because one or more lines are too long
+16
-16
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
@@ -66,4 +66,4 @@ function _getFileType(itemSrc){if(itemSrc.match(/youtube\.com\/watch/i)){return'
|
||||
function _buildOverlay(caller){$('body').append(settings.markup);$pp_pic_holder=$('.pp_pic_holder'),$ppt=$('.ppt'),$pp_overlay=$('div.pp_overlay');if(isSet&&settings.overlay_gallery){currentGalleryPage=0;toInject="";for(var i=0;i<pp_images.length;i++){if(!pp_images[i].match(/\b(jpg|jpeg|png|gif)\b/gi)){classname='default';}else{classname='';}
|
||||
toInject+="<li class='"+classname+"'><a href='#'><img src='"+pp_images[i]+"' width='50' alt='' /></a></li>";};toInject=settings.gallery_markup.replace(/{gallery}/g,toInject);$pp_pic_holder.find('#pp_full_res').after(toInject);$pp_pic_holder.find('.pp_gallery .pp_arrow_next').click(function(){$.prettyPhoto.changeGalleryPage('next');$.prettyPhoto.stopSlideshow();return false;});$pp_pic_holder.find('.pp_gallery .pp_arrow_previous').click(function(){$.prettyPhoto.changeGalleryPage('previous');$.prettyPhoto.stopSlideshow();return false;});$pp_pic_holder.find('.pp_content').hover(function(){$pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeIn();},function(){$pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeOut();});itemWidth=52+5;$pp_pic_holder.find('.pp_gallery ul li').each(function(i){$(this).css({'position':'absolute','left':i*itemWidth});$(this).find('a').unbind('click').click(function(){$.prettyPhoto.changePage(i);$.prettyPhoto.stopSlideshow();return false;});});};if(settings.slideshow){$pp_pic_holder.find('.pp_nav').prepend('<a href="#" class="pp_play">Play</a>')
|
||||
$pp_pic_holder.find('.pp_nav .pp_play').click(function(){$.prettyPhoto.startSlideshow();return false;});}
|
||||
$pp_pic_holder.attr('class','pp_pic_holder '+settings.theme);$pp_overlay.css({'opacity':0,'height':$(document).height(),'width':$(window).width()}).bind('click',function(){if(!settings.modal)$.prettyPhoto.close();});$('a.pp_close').bind('click',function(){$.prettyPhoto.close();return false;});$('a.pp_expand').bind('click',function(e){if($(this).hasClass('pp_expand')){$(this).removeClass('pp_expand').addClass('pp_contract');doresize=false;}else{$(this).removeClass('pp_contract').addClass('pp_expand');doresize=true;};_hideContent(function(){$.prettyPhoto.open();});return false;});$pp_pic_holder.find('.pp_previous, .pp_nav .pp_arrow_previous').bind('click',function(){$.prettyPhoto.changePage('previous');$.prettyPhoto.stopSlideshow();return false;});$pp_pic_holder.find('.pp_next, .pp_nav .pp_arrow_next').bind('click',function(){$.prettyPhoto.changePage('next');$.prettyPhoto.stopSlideshow();return false;});_center_overlay();};return this.unbind('click.prettyphoto').bind('click.prettyphoto',$.prettyPhoto.initialize);};function grab_param(name,url){name=name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");var regexS="[\\?&]"+name+"=([^&#]*)";var regex=new RegExp(regexS);var results=regex.exec(url);return(results==null)?"":results[1];}})(jQuery);
|
||||
$pp_pic_holder.attr('class','pp_pic_holder '+settings.theme);$pp_overlay.css({'opacity':0,'height':$(document).height(),'width':$(window).width()}).bind('click',function(){if(!settings.modal)$.prettyPhoto.close();});$('a.pp_close').bind('click',function(){$.prettyPhoto.close();return false;});$('a.pp_expand').bind('click',function(e){if($(this).hasClass('pp_expand')){$(this).removeClass('pp_expand').addClass('pp_contract');doresize=false;}else{$(this).removeClass('pp_contract').addClass('pp_expand');doresize=true;};_hideContent(function(){$.prettyPhoto.open();});return false;});$pp_pic_holder.find('.pp_previous, .pp_nav .pp_arrow_previous').bind('click',function(){$.prettyPhoto.changePage('previous');$.prettyPhoto.stopSlideshow();return false;});$pp_pic_holder.find('.pp_next, .pp_nav .pp_arrow_next').bind('click',function(){$.prettyPhoto.changePage('next');$.prettyPhoto.stopSlideshow();return false;});_center_overlay();};return this.unbind('click.prettyphoto').bind('click.prettyphoto',$.prettyPhoto.initialize);};function grab_param(name,url){name=name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");var regexS="[\\?&]"+name+"=([^&#]*)";var regex=new RegExp(regexS);var results=regex.exec(url);return(results==null)?"":results[1];}})(jQuery);
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -28,7 +28,7 @@
|
||||
o.retainPath=($.inArray($$[0],o.$path)>-1);
|
||||
$$.hideSuperfishUl();
|
||||
if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}
|
||||
},o.delay);
|
||||
},o.delay);
|
||||
},
|
||||
getMenu = function($menu){
|
||||
var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0];
|
||||
@@ -36,7 +36,7 @@
|
||||
return menu;
|
||||
},
|
||||
addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); };
|
||||
|
||||
|
||||
return this.each(function() {
|
||||
var s = this.serial = sf.o.length;
|
||||
var o = $.extend({},sf.defaults,op);
|
||||
@@ -45,20 +45,20 @@
|
||||
.filter('li:has(ul)').removeClass(o.pathClass);
|
||||
});
|
||||
sf.o[s] = sf.op = o;
|
||||
|
||||
|
||||
$('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() {
|
||||
if (o.autoArrows) addArrow( $('>a:first-child',this) );
|
||||
})
|
||||
.not('.'+c.bcClass)
|
||||
.hideSuperfishUl();
|
||||
|
||||
|
||||
var $a = $('a',this);
|
||||
$a.each(function(i){
|
||||
var $li = $a.eq(i).parents('li');
|
||||
$a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});
|
||||
});
|
||||
o.onInit.call(this);
|
||||
|
||||
|
||||
}).each(function() {
|
||||
var menuClasses = [c.menuClass];
|
||||
if (sf.op.dropShadows && !($.browser.msie && $.browser.version < 7)) menuClasses.push(c.shadowClass);
|
||||
@@ -159,7 +159,7 @@
|
||||
// cache all ul elements
|
||||
$ULs = $$.find('ul');
|
||||
// loop through each ul in menu
|
||||
$ULs.each(function(i) {
|
||||
$ULs.each(function(i) {
|
||||
// cache this ul
|
||||
var $ul = $ULs.eq(i);
|
||||
// get all (li) children of this ul
|
||||
@@ -199,7 +199,7 @@
|
||||
$childUl.css(offsetDirection,$ul.width());
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
};
|
||||
// expose defaults
|
||||
@@ -208,15 +208,16 @@
|
||||
maxWidth : 25, // requires em unit.
|
||||
extraWidth : 0 // extra width can ensure lines don't sometimes turn over due to slight browser differences in how they round-off values
|
||||
};
|
||||
|
||||
|
||||
})(jQuery); // plugin code ends
|
||||
|
||||
/**
|
||||
* hoverIntent r6 // 2011.02.26 // jQuery 1.5.1+
|
||||
* <http://cherne.net/brian/resources/jquery.hoverIntent.html>
|
||||
*
|
||||
*
|
||||
* @param f onMouseOver function || An object with configuration options
|
||||
* @param g onMouseOut function || Nothing (use configuration options object)
|
||||
* @author Brian Cherne brian(at)cherne(dot)net
|
||||
*/
|
||||
(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev])}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev])};var handleHover=function(e){var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t)}if(e.type=="mouseenter"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob)},cfg.timeout)}}};return this.bind('mouseenter',handleHover).bind('mouseleave',handleHover)}})(jQuery);
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ function ajax(u,s,t) {
|
||||
}
|
||||
if (pcs.length>0){query = pcs.join("&");}
|
||||
}
|
||||
jQuery.ajax({type: "POST", url: u, data: query, success: function(msg) { if(t) { if(t==':eval') eval(msg); else jQuery("#" + t).html(msg); } } });
|
||||
jQuery.ajax({type: "POST", url: u, data: query, success: function(msg) { if(t) { if(t==':eval') eval(msg); else jQuery("#" + t).html(msg); } } });
|
||||
}
|
||||
|
||||
String.prototype.reverse = function () { return this.split('').reverse().join('');};
|
||||
@@ -30,9 +30,9 @@ function web2py_ajax_fields(target) {
|
||||
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";
|
||||
jQuery("input.date",target).each(function() {Calendar.setup({inputField:this, ifFormat:date_format, showsTime:false });});
|
||||
jQuery("input.datetime",target).each(function() {Calendar.setup({inputField:this, ifFormat:datetime_format, showsTime: true, timeFormat: "24" });});
|
||||
jQuery("input.datetime",target).each(function() {Calendar.setup({inputField:this, ifFormat:datetime_format, showsTime: true, timeFormat: "24" });});
|
||||
jQuery("input.time",target).each(function(){jQuery(this).timeEntry();});
|
||||
|
||||
|
||||
};
|
||||
|
||||
function web2py_ajax_init(target) {
|
||||
@@ -43,7 +43,7 @@ function web2py_ajax_init(target) {
|
||||
web2py_ajax_fields(target);
|
||||
};
|
||||
|
||||
jQuery(function() {
|
||||
jQuery(function() {
|
||||
var flash = jQuery('.flash');
|
||||
flash.hide();
|
||||
if(flash.html()) flash.slideDown();
|
||||
@@ -68,7 +68,7 @@ function web2py_trap_link(target) {
|
||||
web2py_ajax_page('get',link.attr('href'),[],target);
|
||||
e.preventDefault();
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
function web2py_ajax_page(method,action,data,target) {
|
||||
jQuery.ajax({'type':method,'url':action,'data':data,
|
||||
@@ -77,16 +77,16 @@ function web2py_ajax_page(method,action,data,target) {
|
||||
xhr.setRequestHeader('web2py-component-element',target);},
|
||||
'complete':function(xhr,text){
|
||||
var html=xhr.responseText;
|
||||
var content=xhr.getResponseHeader('web2py-component-content');
|
||||
var content=xhr.getResponseHeader('web2py-component-content');
|
||||
var command=xhr.getResponseHeader('web2py-component-command');
|
||||
var flash=xhr.getResponseHeader('web2py-component-flash');
|
||||
var t = jQuery('#'+target);
|
||||
if(content=='prepend') t.prepend(html);
|
||||
if(content=='prepend') t.prepend(html);
|
||||
else if(content=='append') t.append(html);
|
||||
else if(content!='hide') t.html(html);
|
||||
else if(content!='hide') t.html(html);
|
||||
web2py_trap_form(action,target);
|
||||
web2py_trap_link(target);
|
||||
web2py_ajax_init('#'+target);
|
||||
web2py_ajax_init('#'+target);
|
||||
if(command) eval(command);
|
||||
if(flash) jQuery('.flash').html(flash).slideDown();
|
||||
}
|
||||
@@ -104,3 +104,4 @@ function web2py_comet(url,onmessage,onopen,onclose) {
|
||||
return true; // supported
|
||||
} else return false; // not supported
|
||||
}
|
||||
|
||||
|
||||
@@ -5,4 +5,4 @@
|
||||
<input type="button" onclick="fade('test',+0.2);" value="fade up"/>
|
||||
</form>
|
||||
|
||||
<div id="test">{{='Hello World '*100}}</div>
|
||||
<div id="test">{{='Hello World '*100}}</div>
|
||||
|
||||
@@ -5,8 +5,9 @@
|
||||
|
||||
<form>
|
||||
<INPUT type="text" id="q" name = "q" value="web2py"/>
|
||||
<INPUT type="button" value="submit"
|
||||
<INPUT type="button" value="submit"
|
||||
onclick="ajax('{{=URL('data')}}',['q'],'target');"/>
|
||||
</form>
|
||||
<br/>
|
||||
<div id="target"></div>
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{{extend 'layout.html'}}
|
||||
<h1>Purchase form</h1>
|
||||
{{=form}}
|
||||
[ {{=A('delete purchases',_href=URL('delete_purchased'))}} ]
|
||||
[ {{=A('delete purchases',_href=URL('delete_purchased'))}} ]
|
||||
<h2>Current purchases (SQL JOIN!)</h2>
|
||||
<p>{{=records}}</p>
|
||||
|
||||
|
||||
@@ -4,3 +4,4 @@
|
||||
{{=form}}
|
||||
<h2>Current dogs</h2>
|
||||
{{=records}}
|
||||
|
||||
|
||||
@@ -4,3 +4,4 @@
|
||||
{{=form}}
|
||||
<h2>Current users</h2>
|
||||
{{=records}}
|
||||
|
||||
|
||||
@@ -4,3 +4,4 @@
|
||||
{{=form}}
|
||||
<h2>Current products</h2>
|
||||
{{=records}}
|
||||
|
||||
|
||||
@@ -3,3 +3,4 @@
|
||||
<div class="contentleft">
|
||||
{{=changelog}}
|
||||
</div>
|
||||
|
||||
|
||||
@@ -9,4 +9,5 @@
|
||||
{{=get_content('more')}}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -40,9 +40,9 @@
|
||||
</table>
|
||||
</center>
|
||||
<p style="text-align:left;">
|
||||
The source code version works on all supported platforms, including Linux, but it requires Python 2.5, 2.6, or 2.7.
|
||||
The source code version works on all supported platforms, including Linux, but it requires Python 2.5, 2.6, or 2.7.
|
||||
It runs on Windows and most Unix systems, including <b>Linux</b> and <b>BSD</b>.
|
||||
</p>
|
||||
</p>
|
||||
|
||||
<h3>Instructions</h3>
|
||||
<p>After download, unzip it and click on web2py.exe (windows) or web2py.app (osx).
|
||||
@@ -72,18 +72,18 @@
|
||||
<a href="{{=URL('static', 'images/logo_bw.png')}}"><img src="{{=URL('static', '\
|
||||
images/logo_bw.png')}}" width="200px"/></a>
|
||||
</center>
|
||||
<h3>Stickers</h3>
|
||||
<h3>Stickers</h3>
|
||||
<center>
|
||||
<a href="{{=URL('static', 'images/Stickers1.png')}}"><img src="{{=URL('static', 'images/Stickers1.png')}}" /></a>
|
||||
<a href="{{=URL('static', 'images/Stickers2.png')}}"><img src="{{=URL('static', 'images/Stickers2.png')}}" /></a>
|
||||
<a href="{{=URL('static', 'images/Stickers3.png')}}"><img src="{{=URL('static', 'images/Stickers3.png')}}" /></a>
|
||||
<a href="{{=URL('static', 'images/Stickers4.png')}}"><img src="{{=URL('static', 'images/Stickers4.png')}}" /></a>
|
||||
<a href="{{=URL('static', 'images/Stickers5.png')}}"><img src="{{=URL('static', 'images/Stickers5.png')}}" /></a>
|
||||
<a href="{{=URL('static', 'images/Stickers2.png')}}"><img src="{{=URL('static', 'images/Stickers2.png')}}" /></a>
|
||||
<a href="{{=URL('static', 'images/Stickers3.png')}}"><img src="{{=URL('static', 'images/Stickers3.png')}}" /></a>
|
||||
<a href="{{=URL('static', 'images/Stickers4.png')}}"><img src="{{=URL('static', 'images/Stickers4.png')}}" /></a>
|
||||
<a href="{{=URL('static', 'images/Stickers5.png')}}"><img src="{{=URL('static', 'images/Stickers5.png')}}" /></a>
|
||||
<a href="{{=URL('static', 'images/Stickers6.png')}}"><img src="{{=URL('static', 'images/Stickers6.png')}}" /></a>
|
||||
<a href="{{=URL('static', 'images/Stickers7.png')}}"><img src="{{=URL('static', 'images/Stickers7.png')}}" /></a>
|
||||
<a href="{{=URL('static', 'images/Stickers8.png')}}"><img src="{{=URL('static', 'images/Stickers8.png')}}" /></a>
|
||||
</center>
|
||||
|
||||
|
||||
<p>
|
||||
<a href="{{=URL('static', 'artwork.tar.gz')}}" >Download WEB2PY artwork pack in editable .png format</a>
|
||||
</p>
|
||||
@@ -99,3 +99,4 @@
|
||||
|
||||
{{block sidebar}}{{end}}
|
||||
{{block leftbadges}}{{end}}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{extend 'layout.html'}}
|
||||
{{extend 'layout.html'}}
|
||||
{{import os}}
|
||||
|
||||
<div class="onecolcontent">
|
||||
@@ -20,9 +20,9 @@
|
||||
<a href="http://www.web2py.com/book/default/chapter/08">auth</a>
|
||||
</div>
|
||||
<div id="scrollhere">
|
||||
|
||||
|
||||
<h2 id="simple_examples">Simple Examples</h2>
|
||||
|
||||
|
||||
<p><i>Here are some working and complete examples that explain the basic syntax of the framework.<br/>
|
||||
You can click on the web2py keywords (in the highlighted code!) to get documentation.</i></p>
|
||||
|
||||
@@ -162,7 +162,7 @@ def rss_aggregator():
|
||||
import gluon.contrib.rss2 as rss2
|
||||
import gluon.contrib.feedparser as feedparser
|
||||
d = feedparser.parse("http://rss.slashdot.org/Slashdot/slashdot/to")
|
||||
|
||||
|
||||
rss = rss2.RSS2(title=d.channel.title,
|
||||
link = d.channel.link,
|
||||
description = d.channel.description,
|
||||
@@ -202,7 +202,7 @@ def ajaxwiki_onclick():
|
||||
|
||||
<h3>Example {{=c}}{{c+=1}}</h3><b>In controller: session_examples.py </b>
|
||||
{{=CODE("""
|
||||
def counter():
|
||||
def counter():
|
||||
session.counter = (sesstion.counter or 0) + 1
|
||||
return dict(counter=session.counter)
|
||||
""".strip(),language='web2py',link=URL('global','vars'),_class='boxCode')}}<b>and view: session_examples/counter.html</b>
|
||||
@@ -480,11 +480,11 @@ def buy():
|
||||
(db.purchase.product_id==form.vars.product_id)).select().first()
|
||||
|
||||
if purchase:
|
||||
# if list contains a record, update that record
|
||||
# if list contains a record, update that record
|
||||
purchase.update_record(
|
||||
quantity = purchase.quantity+form.vars.quantity)
|
||||
else:
|
||||
# self insert a new record in table
|
||||
# self insert a new record in table
|
||||
db.purchase.insert(buyer_id=form.vars.buyer_id,
|
||||
product_id=form.vars.product_id,
|
||||
quantity=form.vars.quantity)
|
||||
@@ -492,7 +492,7 @@ def buy():
|
||||
elif form.errors:
|
||||
response.flash = 'invalid values in form!'
|
||||
|
||||
# now get a list of all purchases
|
||||
# now get a list of all purchases
|
||||
records = SQLTABLE(db(purchased).select(),headers='fieldname:capitalize')
|
||||
return dict(form=form, records=records)
|
||||
""".strip(),language='web2py',link=URL('global','vars'),_class='boxCode')}}<b>and view: database_examples/buy.html</b>
|
||||
@@ -505,7 +505,7 @@ def buy():
|
||||
def delete_purchased():
|
||||
db(db.purchase.id > 0).delete()
|
||||
redirect(URL('buy'))
|
||||
""".strip(),language='web2py',link=URL('global','vars'),_class='boxCode')}}Try it here: <a href="/{{=request.application}}/database_examples/delete_purchased">delete_purchased</a>
|
||||
""".strip(),language='web2py',link=URL('global','vars'),_class='boxCode')}}Try it here: <a href="/{{=request.application}}/database_examples/delete_purchased">delete_purchased</a>
|
||||
|
||||
<h3>Example {{=c}}{{c+=1}}</h3><b>In controller: database_examples.py</b>
|
||||
{{=CODE("""
|
||||
@@ -524,7 +524,7 @@ def cache_in_ram():
|
||||
t=cache.ram('time',lambda:time.ctime(),time_expire=5)
|
||||
return dict(time=t,link=A('click to reload',_href=URL(r=request)))
|
||||
""".strip(),language='web2py',link=URL('global','vars'),_class='boxCode')}}
|
||||
<p>The output of <tt>lambda:time.ctime()</tt> is cached in ram for 5 seconds. The string 'time' is used as cache key.
|
||||
<p>The output of <tt>lambda:time.ctime()</tt> is cached in ram for 5 seconds. The string 'time' is used as cache key.
|
||||
<br/>Try it here: <a href="/{{=request.application}}/cache_examples/cache_in_ram">cache_in_ram</a></p>
|
||||
|
||||
|
||||
@@ -692,3 +692,4 @@ def tester():
|
||||
</div>
|
||||
</div>
|
||||
{{block sidebar}}{{end}}
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@ Current version: {{="%s.%s.%s (%s) %s" % request.env.web2py_version}}</p>
|
||||
<br/>
|
||||
<a class="button" href="{{=URL('download')}}" style="width:90%">DOWNLOAD NOW</a><br/>
|
||||
<a class="button" href="http://web2py.com/demo_admin" style="width:90%">ONLINE DEMO</a><br/>
|
||||
<a class="button" href="http://web2py.com/poweredby" style="width:90%">SITES POWERED</a>
|
||||
<a class="button" href="http://web2py.com/poweredby" style="width:90%">SITES POWERED</a>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
|
||||
@@ -5,3 +5,4 @@
|
||||
{{=license}}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{{extend 'layout.html'}}
|
||||
<div class="contentleft">
|
||||
<h2>Support for web2py<sup style="font-size:0.5em;">TM</sup></h2>
|
||||
|
||||
|
||||
<p>You can get a lot of free support by joining our <a href="{{=URL('default', 'usergroups')}}">mailing list</a>.</p>
|
||||
|
||||
<h3>Affiliated Companies</h3>
|
||||
<h3>Affiliated Companies</h3>
|
||||
|
||||
<p>For long term professional support, code review, and contract work, you can contact our core developers:</p>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</ul>
|
||||
|
||||
<p>For professional support, you can also contact one of the companies below:</p>
|
||||
|
||||
|
||||
<ul>
|
||||
<li><a target="_blank" href="http://www.metacryption.com">MetaCryption, LLC</a> (USA)</li>
|
||||
<li><a target="_blank" href="http://www.blouweb.com">Blouweb Consultoria Digital</a> (Brasil)</li>
|
||||
@@ -29,7 +29,8 @@
|
||||
<li><a target="_blank" href="http://www.appliedobjects.com">Applied Objects</a> (New Zealand)</li>
|
||||
<li><a target="_blank" href="http://www.sistemasagiles.com.ar/">Sistemas Ágiles</a> ("Agile Systems") (Argentina)</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
{{block leftbadges}}{{end}}
|
||||
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
<div class="contentleft">
|
||||
<div>
|
||||
{{=get_content('grouplist')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{{extend 'layout.html'}}
|
||||
<br /><br />
|
||||
<div class="contentleft" style="z-index:0;text-align:center;">
|
||||
<h2>{{=T('web2py videos')}}</h2>
|
||||
<h2>{{=T('web2py videos')}}</h2>
|
||||
<div id="vimeo" >
|
||||
<object style="z-index:0" type="application/x-shockwave-flash" width="500" height="400" data="http://vimeo.com/hubnut/?user_id=user1959410&color=00adef&background=000000&fullscreen=1&slideshow=0&stream=channel&id=139244&server=vimeo.com">
|
||||
<param name="quality" value="best" />
|
||||
@@ -9,8 +9,9 @@
|
||||
<param name="allowscriptaccess" value="always" />
|
||||
<param name="scale" value="showAll" />
|
||||
<param name="movie" value="http://vimeo.com/hubnut/?user_id=user1959410&color=00adef&background=000000&fullscreen=1&slideshow=0&stream=channel&id=139244&server=vimeo.com" />
|
||||
</object>
|
||||
</object>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -26,3 +26,4 @@
|
||||
jQuery(function(){showimages();});
|
||||
</script>
|
||||
{{end}}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<h3>
|
||||
Main Contributors
|
||||
</h3>
|
||||
<ul>
|
||||
<ul>
|
||||
<li>Alexey Nezhdanov (GAE and database performance)
|
||||
</li><li>Alvaro Justen (dynamical translations)
|
||||
</li><li>Andrew Willimott (documentation)
|
||||
@@ -32,7 +32,7 @@
|
||||
</li><li>Arun K. Rajeevan (plugin_wiki)
|
||||
</li><li>Attila Csipa (cron job)
|
||||
</li><li>Bill Ferrett (modular DAL design)
|
||||
</li><li>Boris Manojlovic (ajax edit)
|
||||
</li><li>Boris Manojlovic (ajax edit)
|
||||
</li><li>Branko Vukelic (new admin app)
|
||||
</li><li>Brian Meredyk (SQLite, executesql and scheduler)
|
||||
</li><li><a href="http://www.blouweb.com">Bruno Rocha</a> (book, new website, better forms, grid layout)
|
||||
@@ -46,7 +46,7 @@
|
||||
</li><li>Craig Younkins (Security)
|
||||
</li><li>Daniel Lin (Taiwanese internationalization)
|
||||
</li><li>Dave Stoll (DowCommerce payment API)
|
||||
</li><li>David Wagner (security and cryptography expert)
|
||||
</li><li>David Wagner (security and cryptography expert)
|
||||
</li><li>Denes Lengyel (validators, DB2 support, DAL, custom forms, legacy table support)
|
||||
</li><li>Douglas Soares de Andrade (2.4 and 2.6 compliance, docstrings)
|
||||
</li><li>Eric Vicenti (email with ssl)
|
||||
@@ -121,7 +121,7 @@
|
||||
</li><li>Yarko Tymciurak (design, Sphinx documentation)
|
||||
</li><li>Younghyun Jo (internationalization)
|
||||
</li><li>Vidul Nikolaev Petrov (captcha)
|
||||
</li><li>Vinicius Assef
|
||||
</li><li>Vinicius Assef
|
||||
</li><li>Zahariash (memory management)
|
||||
</li>
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
<li><a href="http://code.google.com/p/python-markdown2/">markdown2</a> developed by Trent Mick</li>
|
||||
<li><a href="http://svn.saddi.com/py-lib/trunk/fcgi.py">fcgi.py</a> devloped by Allan Saddi (for production Lighttpd servers)</li>
|
||||
<li><a href="http://www.danga.com/memcached/">memcache</a> developed by Evan Martin</li>
|
||||
<li><a href="http://jquery.com/">jQuery</a> developed by John Resig</li>
|
||||
<li><a href="http://jquery.com/">jQuery</a> developed by John Resig</li>
|
||||
<li>A syntax highlighter inspired by the code of <a href="http://www.petersblog.org/node/763">Peter Wilkinson</a></li>
|
||||
|
||||
</ul>
|
||||
@@ -155,4 +155,5 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -44,4 +44,4 @@
|
||||
{{pass}}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
<h1>Upload page</h1>
|
||||
{{=form}}
|
||||
|
||||
{{block sidebar end}}
|
||||
{{block sidebar end}}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{{extend 'layout.html'}}
|
||||
<h2>{{=message}}</h2>
|
||||
{{for i in range(1000):}}bla {{pass}}
|
||||
{{extend 'layout.html'}}
|
||||
<h2>{{=message}}</h2>
|
||||
{{for i in range(1000):}}bla {{pass}}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{{extend 'layout_examples/layout_civilized.html'}}
|
||||
<h2>{{=message}}</h2>
|
||||
<p>{{for i in range(1000):}}bla {{pass}} </p>
|
||||
<p>{{for i in range(1000):}}bla {{pass}} </p>
|
||||
|
||||
@@ -288,3 +288,4 @@ body
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -250,3 +250,4 @@ a:hover {
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{{extend 'layout_examples/layout_sleek.html'}}
|
||||
<h2>{{=message}}</h2>
|
||||
{{for i in range(1000):}}bla {{pass}}
|
||||
{{extend 'layout_examples/layout_sleek.html'}}
|
||||
<h2>{{=message}}</h2>
|
||||
{{for i in range(1000):}}bla {{pass}}
|
||||
|
||||
@@ -5,4 +5,4 @@
|
||||
|
||||
<a href="{{=URL(r=request)}}">{{=T('click me to count')}}</a>
|
||||
|
||||
{{block sidebar}} {{end}}
|
||||
{{block sidebar}} {{end}}
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
{{extend 'layout.html'}}
|
||||
<h1>{{=message}}</h1>
|
||||
|
||||
|
||||
@@ -5,3 +5,4 @@
|
||||
Try insert "=r0c1+1" in cell r0c0 and "2" in r0c1. Formulas start with "=" as in Excel. You can use a subset of python commands and math function, and reference cells by r[row]c[col]. All computations are performed serverside via Ajax (input is validated for security). Cell values and formulas can be set and locked serverside. The shape of the spreadsheet can be modifed serverside and does not need to be tabular (think of it as a graph of css-friendly widgets you can place where you want). Cells can be given arbistrary names. This example is distributed with web2py so look at the source code of the example to learn more.
|
||||
|
||||
{{=sheet}}
|
||||
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
<h1>BEAUTIFY</h1>
|
||||
|
||||
<h2>Message is</h2>
|
||||
{{=message}}
|
||||
{{=message}}
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
<h1>Strings are automatically escaped</h1>
|
||||
|
||||
<h2>Message is</h2>
|
||||
{{=message}}
|
||||
{{=message}}
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
{{itemlink('http://www.google.com')}}
|
||||
{{itemlink('http://www.yahoo.com')}}
|
||||
{{itemlink('http://www.nyt.com')}}
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
@@ -4,3 +4,4 @@
|
||||
{{for number in ['one','two','three']:}}
|
||||
<h2>{{=number.capitalize()}}</h2>
|
||||
{{pass}}
|
||||
|
||||
|
||||
@@ -8,3 +8,4 @@
|
||||
{{else:}}
|
||||
<h2>{{=a}} is odd</h2>
|
||||
{{pass}}
|
||||
|
||||
|
||||
@@ -5,4 +5,4 @@
|
||||
<h2>a={{=1/0}}</h2>
|
||||
{{except:}}
|
||||
infinity</h2>
|
||||
{{pass}}
|
||||
{{pass}}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{extend 'layout.html'}}
|
||||
<h1>Your variables</h1>
|
||||
<h2>a={{=a}}</h2>
|
||||
<h2>a={{=b}}</h2>
|
||||
<h2>a={{=b}}</h2>
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
<h1>XML</h1>
|
||||
|
||||
<h2>Message is</h2>
|
||||
{{=message}}
|
||||
{{=message}}
|
||||
|
||||
Reference in New Issue
Block a user