gest366/lib/init.js

38 lines
1.2 KiB
JavaScript
Raw Permalink Normal View History

2021-02-24 20:40:04 +00:00
$(document).ready(function(){
$('[data-href]').not('.ask, .bound').click(function() {
$(this).addClass('bound');
launch_modal($(this).data('title'), $(this).data('href'), 1, $(this).data('target'));
});
$('.tip').tooltipster({
animation: 'grow',
contentAsHTML: true,
hideOnClick: true,
onlyOne: true,
maxWidth: 350,
touchDevices: true,
trigger: 'hover',
position: 'top'
});
autosize($('.autosize'));
$('form').not('.no-check').parsley();
$('.datepicker').datepicker();
$('.datepicker, .ui-datepicker').click( function(){
$(".ui-icon-circle-triangle-w").text("");
$(".ui-icon-circle-triangle-e").text("");
$(".ui-icon-circle-triangle-w").removeClass("ui-icon ui-icon-circle-triangle-w").addClass("fa fa-angle-left clickable").css("left", "16px");
$(".ui-icon-circle-triangle-e").removeClass("ui-icon ui-icon-circle-triangle-e").addClass("fa fa-angle-right clickable").css("right", "8px");
});
start_datatables();
start_superselect();
start_timepicker();
start_inputmask();
window.Parsley.on('field:success', function() {
this.$element.removeClass('parsley-success');
});
});