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.css and 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 .
6. (at least for me) Remember to close jaws.