Added pricelist to admin #2380

This commit is contained in:
Priit Tark 2015-06-04 00:38:56 +03:00
parent a262e1e708
commit 4b5243585d
101 changed files with 3155 additions and 76 deletions

View file

@ -1,3 +1,9 @@
#= require nprogress
#= require nprogress-turbolinks
NProgress.configure
showSpinner: false
@flash_notice = (msg) ->
$('#flash').find('div').removeClass('bg-danger')
$('#flash').find('div').addClass('bg-success')
@ -10,7 +16,7 @@
$('#flash').find('div').html(msg)
$('#flash').show()
$(document).on 'ready page:load', ->
$(document).on 'page:change', ->
today = new Date()
tomorrow = new Date(today)
tomorrow.setDate(today.getDate() + 1)
@ -20,7 +26,8 @@ $(document).on 'ready page:load', ->
maxDate: tomorrow
)
$('.js-combobox').select2
width: "100%"
selectOnBlur: true
dropdownAutoWidth: if self==top then true else false
if $('.js-combobox').length
$('.js-combobox').select2
width: "100%"
selectOnBlur: true
dropdownAutoWidth: if self==top then true else false