$(document).ready(function(){ var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')) var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) { return new bootstrap.Tooltip(tooltipTriggerEl) }); var toastTrigger = document.getElementById('liveToastBtn') var toastLiveExample = document.getElementById('liveToast') if (toastTrigger) { toastTrigger.addEventListener('click', function () { var toast = new bootstrap.Toast(toastLiveExample) toast.show() }) } tableFixHead_height(); $(window).resize(function() { tableFixHead_height(); }) function tableFixHead_height(){ var h = $(window).height(); height = document.documentElement.clientHeight - 160; $(".tableFixHead").css({'height':height+'px'}); } $(".navpage_select").change(function() { let url = $(this).data('url'); let page = $("option:selected", this).val(); window.location.href = url+'p'+page; }); }); function ToastShow1(title,body,err,time=0,delay= 5000, autohide = true){ var toastLiveExample = document.getElementById('Toast'); toastLiveExample.setAttribute("data-bs-delay",delay); toastLiveExample.setAttribute("data-bs-autohide",autohide); var toast = new bootstrap.Toast(toastLiveExample); $("#Toast_title").html(title); let color='#007aff'; if(err=="1") color='#e91e63'; if(err=="0") color='#4caf50'; $("#Toast_img").attr("fill",color); if(time==0){ let now = new Date; $("#Toast_time").html(now.getHours()+":"+now.getMinutes()); }else { $("#Toast_time").html(time); } $("#Toast_body").html(body); toast.show(); };