Added handler that submits the search form upon view changes

If the user select a different view (e.g. "grid" or "list") then the form
gets submitted to that the new view is rendered automatically.
This commit is contained in:
Christoph Haas 2013-08-24 23:15:26 +02:00
parent 33efb2c931
commit 5f238d2ec1

View file

@ -3,6 +3,7 @@
# You can use CoffeeScript in this file: http://coffeescript.org/
jQuery ->
# Enable fancybox zoom for thumbnail images
$("a.fancybox").fancybox({
openEffect : 'elastic',
closeEffect : 'elastic',
@ -12,4 +13,8 @@ jQuery ->
type : 'inside'
}
}
})
})
# Submit the form if the user changes the view (grid or list)
$("input[name='display']").change ->
$(this).parents('form').submit()