Add weekday selection and client side date formatting

This commit is contained in:
2013-02-19 09:32:24 +01:00
parent 43073e10f8
commit c5f6813765
17 changed files with 89 additions and 12 deletions
@@ -1,5 +1,16 @@
$( ->
$('.week-day-select').each( (i)->
select = $(this)
container = select.siblings('.btn-group')
toggle = $('<button type="button" class="btn"></button>')
toggle.attr('data-t', 'product_category.week_days.abbreviation.'+select.data('day'))
toggle.addClass('active') if select.val() == '1'
container.append(toggle)
toggle.click( -> select.val(Math.abs(select.val() - 1)))
)
# GOOGLE LOCATION PICKER
$("input.location_picker").each( (i)->
return if typeof(google) == 'undefined'
location_input = $(this)
map_div = $('<div>').addClass("location_picker_map")