fixws and 'new' button in grid query

This commit is contained in:
Massimo Di Pierro
2011-12-05 11:39:42 -06:00
parent 01f6f82cdf
commit d281acb421
305 changed files with 8352 additions and 8032 deletions
@@ -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&amp;color=00adef&amp;background=000000&amp;fullscreen=1&amp;slideshow=0&amp;stream=channel&amp;id=139244&amp;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&amp;color=00adef&amp;background=000000&amp;fullscreen=1&amp;slideshow=0&amp;stream=channel&amp;id=139244&amp;server=vimeo.com" />
</object>
</object>
</div>
</div>
</div>
@@ -26,3 +26,4 @@
jQuery(function(){showimages();});
</script>
{{end}}
+7 -6
View File
@@ -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 @@
+1 -1
View File
@@ -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}}&nbsp;</p>
<p>{{for i in range(1000):}}bla {{pass}}&nbsp;</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}}