File: assets/js/custom.min.js

Recommend this page to a friend!
  Classes of Kishor Mali  >  PHP User Feedback System  >  assets/js/custom.min.js  >  Download  
File: assets/js/custom.min.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHP User Feedback System
Application to record feedback from customers
Author: By
Last change:
Date: 4 months ago
Size: 10,000 bytes
 

Contents

Class file image Download
$(document).ready(function(){$("#addUser").validate({rules:{fname:{required:!0},email:{required:!0,email:!0},password:{required:!0},cpassword:{required:!0,equalTo:"#password"},mobile:{required:!0,digits:!0},role:{required:!0,selected:!0}},messages:{fname:{required:"This field is required"},email:{required:"This field is required",email:"Please enter valid email address"},password:{required:"This field is required"},cpassword:{required:"This field is required",equalTo:"Please enter same password"},mobile:{required:"This field is required",digits:"Please enter numbers only"},role:{required:"This field is required",selected:"Please select atleast one option"}}})});
$(document).ready(function(){$("#checkAll").change(function(){$("input:checkbox").prop("checked",$(this).prop("checked"))});$("#assignCustomers").validate({rules:{"isChecked[]":{required:!0},executive:{required:!0}},messages:{"isChecked[]":{required:"Select atleast one record"}}})});
jQuery(document).ready(function(){tinymce.init({selector:"#emailTemplate",toolbar_items_size:"small",theme:"modern",menubar:!0,statusbar:!0,height:500,plugins:["advlist autolink lists link image charmap print preview hr anchor pagebreak","searchreplace wordcount visualblocks visualchars code fullscreen","insertdatetime media nonbreaking save table contextmenu directionality","emoticons template paste textcolor colorpicker textpattern imagetools"],toolbar1:"insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",toolbar2:"print preview media | forecolor backcolor emoticons",onchange_callback:function(e){tinyMCE.triggerSave(),$("#"+e.id).valid()}});$("#editAttachment").validate({rules:{attFile:{extension:"pdf"}},messages:{attFile:{extension:"Select files with extension PDF only"}}}),$("#addAttachment").validate({rules:{attFile:{required:!0,extension:"pdf"}},messages:{attFile:{required:"You must select a file to upload",extension:"Select files with extension PDF only"}}});tinymce.init({selector:"#emailHTML",toolbar_items_size:"small",theme:"modern",menubar:!1,statusbar:!0,height:150,toolbar:"styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent",onchange_callback:function(e){tinyMCE.triggerSave(),$("#"+e.id).valid()}}),$("#companyList").on("change",function(){jQuery.ajax({type:"POST",url:baseURL+"getTemplateByCompId",data:{companyId:$(this).val()},dataType:"json",async:!0}).done(function(e){1==e.status?($("#emailHTML").html(e.data[0].temp_html),tinyMCE.get("emailHTML").setContent(e.data[0].temp_html)):($("#emailHTML").html(""),tinyMCE.get("emailHTML").setContent(""))})});var e=$("#emailPortfolioForm");e.submit(function(){$("#emailHTML").addClass("textnothide"),tinyMCE.triggerSave()}).validate({ignore:"",rules:{companyList:{required:!0},typeList:{required:!0},email:{required:!0,email:!0},subject:{required:!0},emailHTML:{required:!0},extraAttFile:{extension:"pdf"}},messages:{extraAttFile:{extension:"Select files with extension PDF only"}}});$("#emailSendSubmit").click(function(){if(e.valid()&&confirm("Do you want to send email?")){$(this).html("<i class='fa fa-spinner' aria-hidden='true'></i> Sending Email"),$(this).prop("disabled",!0),e.submit()}})});
jQuery(document).ready(function(){var e=window.location.href;pageURL=e.substring(0,e.lastIndexOf("/"));var a=$('a[href="'+pageURL+'"]');a.addClass("active"),a.parent().addClass("active");var t=$('a[href="'+e+'"]');t.addClass("active"),t.parent().addClass("active"),jQuery(document).on("click",".deleteUser",function(){var e=$(this).data("userid"),a=baseURL+"deleteUser",t=$(this);confirm("Are you sure to delete this user ?")&&jQuery.ajax({type:"POST",dataType:"json",url:a,data:{userId:e}}).done(function(e){console.log(e),t.parents("tr").remove(),(e.status=!0)?alert("User successfully deleted"):(e.status=!1)?alert("User deletion failed"):alert("Access denied..!")})}),$.fn.editable.defaults.mode="inline",$("#rAltEmail").editable({type:"text",pk:$("#customerId").val(),url:baseURL+"updateAlternateEmail",title:"Enter email",emptytext:"Ask alternate email",toggle:"dblclick"}),$("#rAltPhone").editable({type:"text",pk:$("#customerId").val(),url:baseURL+"updateAlternatePhone",title:"Enter phone",emptytext:"Ask alternate phone",toggle:"dblclick"}),$(".statusAnchor").click(function(e){e.preventDefault(),$(this).closest("form").submit()});(new Date).getTimezoneOffset();$("#refresh").click(function(e){var a=$(this).data("domainname"),t=$(this).data("custid");$("#refreshSpinner").addClass("fa-spin"),$.ajax({url:baseURL+"refreshDomainData",type:"POST",dataType:"json",data:{custId:t,domainName:a}}).done(function(e){$("#refreshSpinner").removeClass("fa-spin");var a=baseURL+"uploads/captures/browser/"+e.image,t=baseURL+"uploads/captures/mobile/"+e.image;$("#browserImgHref").attr("href",a),$("#mobileImgHref").attr("href",t),$("#browserImg").attr("src",a),$("#mobileImg").attr("src",t)})}),$(".refreshIt").click(function(e){e.preventDefault();var a=$(this).data("domainname"),t=$(this).data("custid");$("#refreshSpinner_"+t).addClass("fa-spin"),$.ajax({url:baseURL+"refreshDomainData",type:"POST",dataType:"json",data:{custId:t,domainName:a}}).done(function(e){$("#refreshSpinner_"+t).removeClass("fa-spin");var a=baseURL+"uploads/captures/browser/"+e.image,r=baseURL+"uploads/captures/mobile/"+e.image;$("#browserImgHref_"+t).attr("href",a),$("#mobileImgHref_"+t).attr("href",r),$("#browserImg_"+t).attr("src",a),$("#mobileImg_"+t).attr("src",r)})}),$(".delCache").click(function(e){e.preventDefault();var a=$(this).data("path"),t=$(this).data("spinner");$("#refreshSpinner_"+t).addClass("fa-spin"),$.ajax({url:baseURL+"deleteCache",type:"POST",dataType:"json",data:{path:a}}).done(function(e){$("#refreshSpinner_"+t).removeClass("fa-spin")})}),$("#deleteAllCache").click(function(e){e.preventDefault(),$(".deleteAllCache").addClass("fa-spin"),$.ajax({url:baseURL+"deleteAllCache",type:"POST",dataType:"json"}).done(function(e){$(".deleteAllCache").removeClass("fa-spin")})})});
$(document).ready(function(){$("#editUser").validate({rules:{fname:{required:!0},email:{required:!0,email:!0},cpassword:{equalTo:"#password"},mobile:{required:!0,digits:!0},role:{required:!0,selected:!0}},messages:{fname:{required:"This field is required"},email:{required:"This field is required",email:"Please enter valid email address"},cpassword:{equalTo:"Please enter same password"},mobile:{required:"This field is required",digits:"Please enter numbers only"},role:{required:"This field is required",selected:"Please select atleast one option"}}})});
$(document).ready(function(){$("#followUp").submit(function(){$("#callSummary").addClass("textnothide"),tinyMCE.triggerSave()}).validate({ignore:"",rules:{callSummary:{required:!0},fbType:{required:!0}},errorPlacement:function(e,t){t.is("textarea"),e.insertAfter(t)}});tinymce.init({selector:"#callSummary",toolbar_items_size:"small",theme:"modern",menubar:!1,statusbar:!1,height:"150",toolbar:"styleselect | bold italic | bullist numlist outdent indent",onchange_callback:function(e){tinyMCE.triggerSave(),$("#"+e.id).valid()}}),tinymce.init({selector:"#reqSummary",toolbar_items_size:"small",theme:"modern",menubar:!1,statusbar:!0,height:"250"});var e=new Date,t=new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0);$("#nextCallDate").datepicker({autoclose:!0,todayHighlight:!0,format:"dd/mm/yyyy",startDate:t}),$("#nextCallTime").timepicker(),$("#nextCallDate").attr("value",null),$("#nextCallTime").val(null),$("#toDate").datepicker({autoclose:!0,todayHighlight:!0,format:"dd/mm/yyyy",startDate:t});$("#recRem").submit(function(){$("#reqSummary").addClass("textnothide"),tinyMCE.triggerSave()}).validate({ignore:"",rules:{reqSummary:{required:!0},estimatedCost:{maxlength:20},custCost:{maxlength:20}},errorPlacement:function(e,t){t.is("textarea"),e.insertAfter(t)}});$("#exportPDF").click(function(e){e.preventDefault(),$.ajax({url:baseURL+"reqExportAsPDF",data:{custId:$("#customerId").val()},type:"POST",dataType:"json"}).done(function(e){console.log("success")})}),$("#conversionDate").datepicker({autoclose:!0,todayHighlight:!0,format:"dd/mm/yyyy",startDate:t}),$(".forceOpenPicker").click(function(e){$(this).next().datepicker("show")}),$("#conversionTime").timepicker({showMeridian:!1}),$(".forceOpenTimePicker").click(function(e){$(this).next().trigger("focus")});var a=function(){var e=$("#conversionDate").val().split("/"),t=$("#conversionTime").val().split(":"),a=new Date(parseInt(e[2]),parseInt(e[1])-1,parseInt(e[0]),parseInt(t[0]),parseInt(t[1])),n=new Date(a.getTime()+1e3*offset+parseInt(dstOffset)).toUTCString().replace(/ GMT$/,"").split(" "),i=n[1]+" "+n[2]+" "+n[3],r=n[4];$("#convertedDate").html(i),$("#convertedTime").html(r)};$("#conversionDate").on("change",a),$("#conversionTime").on("change",a),$("#btnTimeConversion").click(function(e){e.preventDefault(),$("#btnTimeConversionDiv").addClass("displayNone"),$(".timeConversionDiv").removeClass("displayNone")}),$("#btnTimeConversionComplete").click(function(e){e.preventDefault(),$(".timeConversionDiv").addClass("displayNone"),$("#btnTimeConversionDiv").removeClass("displayNone")})});
$(document).ready(function(){$("#importExcel").validate({rules:{impfile:{required:!0,extension:"xls|xlsx"}},messages:{impfile:{required:"You must select a file to upload",extension:"Select files with extension xls and xlsx only"}}});$("#noOfRecords").keydown(function(e){-1!==$.inArray(e.keyCode,[46,8,9,27,13,110,190])||65==e.keyCode&&(!0===e.ctrlKey||!0===e.metaKey)||e.keyCode>=35&&e.keyCode<=40||(e.shiftKey||e.keyCode<48||e.keyCode>57)&&(e.keyCode<96||e.keyCode>105)&&e.preventDefault()})});
$(document).ready(function(){var e=new Date,t=new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0);$("#reportDate").datepicker({autoclose:!0,todayHighlight:!0,format:"dd/mm/yyyy",endDate:t}),$("#reportDate").attr("value",null);$("#employeeReportForm").validate({rules:{employees:{required:!0}}})});

For more information send a message to info at phpclasses dot org.