Product category improvements
This commit is contained in:
@@ -1,13 +1,30 @@
|
||||
$( ->
|
||||
week_days_container = $('#week_days-group')
|
||||
$('.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)
|
||||
week_days_container.append(toggle)
|
||||
toggle.click( -> select.val(Math.abs(select.val() - 1)))
|
||||
)
|
||||
|
||||
$('#full_day-controller').each ->
|
||||
control = $('#product_category_full_day')
|
||||
unless control.is(':checked')
|
||||
$(@).addClass('icon-white')
|
||||
$('#sub-day-container').removeClass('hide')
|
||||
$(@).click ->
|
||||
if control.is(':checked')
|
||||
control.prop 'checked', false
|
||||
$(@).addClass 'icon-white'
|
||||
$('#sub-day-container').removeClass('hide')
|
||||
else
|
||||
control.prop 'checked', true
|
||||
$(@).removeClass 'icon-white'
|
||||
$('#sub-day-container').addClass('hide')
|
||||
|
||||
|
||||
# GOOGLE LOCATION PICKER
|
||||
$("input.location_picker").each( (i)->
|
||||
return if typeof(google) == 'undefined'
|
||||
|
||||
Reference in New Issue
Block a user