if you dig into web2py.js you can find the way to do it, but it's not 
implemented by default.
this is because you could potentially replace a very large fragment of the 
page with a very little "loading..." content, and this can be bad from a ui 
interaction perspective.

try to elaborate on this, though....

What the new hookable events enabled ...... 

create a new app
1. fetch https://raw.github.com/HubSpot/pace/master/pace.js and put under 
static/js/pace.js
2. fetch 
https://raw.github.com/HubSpot/pace/master/themes/pace-theme-corner-indicator.cssand
 put under static/css/pace.css
3. alter layout.html 

.....
<script src="{{=URL('static','js/modernizr.custom.js')}}"></script>
<script src="{{=URL('static','js/pace.js')}}"></script>
<link href="{{=URL('static','css/pace.css')}}" rel="stylesheet" />
.....

4. put in controllers/default.py

def test():
    script = """$(function() {
    $(document).on('ajax:beforeSend', function() {
        Pace.restart();
    })
    })"""
    return dict(a=LOAD('default', 'thegrid.load', ajax=True), script=SCRIPT(
script))

def thegrid():
    import time
    time.sleep(5)
    grid = SQLFORM.grid(db.auth_user, user_signature=False)
    return dict(grid=grid)

5. enjoy clicking around /appname/default/test . 


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to