mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
32 lines
812 B
CoffeeScript
32 lines
812 B
CoffeeScript
#= require nprogress
|
|
#= require nprogress-turbolinks
|
|
|
|
NProgress.configure
|
|
showSpinner: false
|
|
|
|
@flash_notice = (msg) ->
|
|
$('#flash').find('div').removeClass('bg-danger')
|
|
$('#flash').find('div').addClass('bg-success')
|
|
$('#flash').find('div').html(msg)
|
|
$('#flash').show()
|
|
|
|
@flash_alert = (msg) ->
|
|
$('#flash').find('div').removeClass('bg-success')
|
|
$('#flash').find('div').addClass('bg-danger')
|
|
$('#flash').find('div').html(msg)
|
|
$('#flash').show()
|
|
|
|
$(document).on 'page:change', ->
|
|
today = new Date()
|
|
tomorrow = new Date(today)
|
|
tomorrow.setDate(today.getDate() + 1)
|
|
|
|
$('.datepicker').datepicker(
|
|
dateFormat: "yy-mm-dd"
|
|
)
|
|
|
|
if $('.js-combobox').length
|
|
$('.js-combobox').select2
|
|
width: "100%"
|
|
selectOnBlur: true
|
|
dropdownAutoWidth: if self==top then true else false
|