debshots/app/assets/javascripts/packages.js.coffee
Christoph Haas 5f238d2ec1 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.
2013-08-24 23:15:26 +02:00

20 lines
574 B
CoffeeScript

# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
jQuery ->
# Enable fancybox zoom for thumbnail images
$("a.fancybox").fancybox({
openEffect : 'elastic',
closeEffect : 'elastic',
helpers : {
title : {
type : 'inside'
}
}
})
# Submit the form if the user changes the view (grid or list)
$("input[name='display']").change ->
$(this).parents('form').submit()