app/assets/javascripts/wco/application.js in wco_models-3.1.0.79 vs app/assets/javascripts/wco/application.js in wco_models-3.1.0.80
- old
+ new
@@ -15,57 +15,51 @@
// require select2
//
//= require ./alerts-notices
//= require ./collapse-expand
//= require ./file_upload
+//= require ./office_action_templates
//= require ./shared
//
$(function() {
-
+/* DataTable */
if ('function' === typeof $('body').DataTable) {
const _props = {
dom: 'lpftrip',
lengthChange: true,
lengthMenu: [[10, 25, 100, -1], [10, 25, 100, 'All']],
pageLength: 25,
aoColumnDefs: [ {
bSortable: false,
aTargets: [ "nosort" ],
} ],
- order: [ 4, 'desc' ],
+ order: [], // [ 3, 'desc' ],
}
$('.data-table').DataTable(_props)
}
+/* datepicker */
if ('function' === typeof $('body').datepicker) {
$(".datepicker").datepicker({ dateFormat: 'yy-mm-dd' })
}
-
+/* select2 */
if (!!$('body').select2) {
$('.select2').each(function() {
$( this ).select2({
width: '100%',
})
})
}
-$('select[name="office_action_template[from_type]"]').on('change', (ev) => {
- logg(ev.target.value, 'changed')
+/* tinymce */
+if ($(".tinymce").length > 0) {
+ $(".tinymce").summernote()
+}
- // let url = window.location.href;
- // if (url.indexOf('?') > -1){
- // url += `&from_type=${ev.target.value}`
- // } else {
- // url += `?from_type=${ev.target.value}`
- // }
- // window.location.href = url;
- const parser = new URL(window.location);
- parser.searchParams.set('from_type', ev.target.value);
- window.location = parser.href;
-})
+
console.log('Loaded wco/application.js')
}); // END