projects
/
MojoFacets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
736f398
)
auto submit form on limit change
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Wed, 26 May 2010 16:12:17 +0000
(18:12 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Wed, 26 May 2010 16:12:17 +0000
(18:12 +0200)
this saves one click on refresh
templates/data/items.html.ep
patch
|
blob
|
history
diff --git
a/templates/data/items.html.ep
b/templates/data/items.html.ep
index
8183908
..
0a25c75
100644
(file)
--- a/
templates/data/items.html.ep
+++ b/
templates/data/items.html.ep
@@
-69,3
+69,12
@@
items
<li>numeric: <%= dumper $numeric %>
<li>order: <%= session('order') %> sort: <%= session('sort') %>
</ul>
+
+<script type="text/javascript">
+$(document).ready( function(){
+ $('select[name=limit]').change( function(){
+ console.debug( 'limit changed', this );
+ $(this).closest('form').submit();
+ });
+});
+</script>