Sha256: 6570ae592020139c7ad3b7fc57e325a46d5bf0f2257ae472424afa0b654bf322

Contents?: true

Size: 1.11 KB

Versions: 5

Compression:

Stored size: 1.11 KB

Contents

import jQuery from 'jquery';
window.jQuery = jQuery // <- "select2" will check this
window.$ = jQuery

// This is a hack to fix 'process is not defined'
// Ref article: https://adambien.blog/roller/abien/entry/uncaught_referenceerror_process_is_not
// Based on this filter dropdown works.
window.process = {
  env: {
      NODE_ENV: 'development'
  }
} 

import 'moment'
import 'bootstrap'
import '@popperjs/core'
import 'flatpickr'
import 'jgrowl'
jqueryJgrowl()
import Select2 from "select2"
Select2()

// import '@nathanvda/cocoon'
import 'daterangepicker'
import '@fortawesome/fontawesome-free'
import jqueryJgrowl from 'jgrowl';


flatpickr("[data-behaviour='date-only']", {
  dateFormat: "d-m-Y"
})
flatpickr("[data-behaviour='date-time']", {
  enableTime: true
})
flatpickr("[data-behaviour='filter'][data-filter-type='date']", {
  mode: 'range'
})
$('.select-2').select2();
$(document).on('turbolinks:load', function () {
  $('.select-2').select2();
  flatpickr("[data-behaviour='date-only']", {
    dateFormat: "d-m-Y"
  })
})

$(document).on('click', '.menu-item', function(e) {
  $('.profile-popup').toggleClass('hidden');
});

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cm-admin-1.0.8 app/assets/javascripts/cm_admin/scaffolds.js
cm-admin-1.0.7 app/assets/javascripts/cm_admin/scaffolds.js
cm-admin-1.0.6 app/assets/javascripts/cm_admin/scaffolds.js
cm-admin-1.0.5 app/assets/javascripts/cm_admin/scaffolds.js
cm-admin-1.0.3 app/assets/javascripts/cm_admin/scaffolds.js