/
home2
/
dakshskx
/
public_html
/
assets
/
admin
/
scripts
/
custom
/
/home2/dakshskx/public_html/assets/admin/scripts/custom
mkdir
upload
Name
Size
Mode
Actions
calendar.js
7412
0644
edit
dl
rm
charts.js
31498
0644
edit
dl
rm
coming-soon.js
661
0644
edit
dl
rm
components-dropdowns.js
10383
0644
edit
dl
rm
components-editors.js
516
0644
edit
dl
rm
components-form-tools.js
19133
0644
edit
dl
rm
components-ion-sliders.js
2318
0644
edit
dl
rm
components-jqueryui-sliders.js
3680
0644
edit
dl
rm
components-knob-dials.js
546
0644
edit
dl
rm
components-nouisliders.js
1788
0644
edit
dl
rm
components-pickers.js
7852
0644
edit
dl
rm
contact-us.js
632
0644
edit
dl
rm
custom.js
553
0644
edit
dl
rm
ecommerce-index.js
8069
0644
edit
dl
rm
ecommerce-orders-view.js
7339
0644
edit
dl
rm
ecommerce-orders.js
2772
0644
edit
dl
rm
ecommerce-products-edit.js
6521
0644
edit
dl
rm
ecommerce-products.js
1546
0644
edit
dl
rm
form-dropzone.js
1434
0644
edit
dl
rm
form-editable.js
18643
0644
edit
dl
rm
form-fileupload.js
2722
0644
edit
dl
rm
form-image-crop.js
17044
0644
edit
dl
rm
form-samples.js
1484
0644
edit
dl
rm
form-validation.js
12008
0644
edit
dl
rm
form-wizard.js
10442
0644
edit
dl
rm
inbox.js
9643
0644
edit
dl
rm
index.js
32605
0644
edit
dl
rm
lock.js
395
0644
edit
dl
rm
login-soft.js
8472
0644
edit
dl
rm
login.js
8332
0644
edit
dl
rm
maps-google.js
6153
0644
edit
dl
rm
maps-vector.js
1897
0644
edit
dl
rm
portfolio.js
192
0644
edit
dl
rm
portlet-draggable.js
655
0644
edit
dl
rm
search.js
287
0644
edit
dl
rm
table-advanced.js
4583
0644
edit
dl
rm
table-ajax.js
3364
0644
edit
dl
rm
table-editable.js
6191
0644
edit
dl
rm
table-managed.js
6084
0644
edit
dl
rm
tasks.js
383
0644
edit
dl
rm
ui-alert-dialog-api.js
3347
0644
edit
dl
rm
ui-blockui.js
3894
0644
edit
dl
rm
ui-datepaginator.js
805
0644
edit
dl
rm
ui-extended-modals.js
2564
0644
edit
dl
rm
ui-general.js
6624
0644
edit
dl
rm
ui-idletimeout.js
2330
0644
edit
dl
rm
ui-nestable.js
1591
0644
edit
dl
rm
ui-notific8.js
1472
0644
edit
dl
rm
ui-toastr.js
4990
0644
edit
dl
rm
ui-tree.js
6458
0644
edit
dl
rm
Edit:
/home2/dakshskx/public_html/assets/admin/scripts/custom/form-validation.js
(12008B)
var FormValidation = function () { var handleValidation1 = function() { // for more info visit the official plugin documentation: // http://docs.jquery.com/Plugins/Validation var form1 = $('#form_sample_1'); var error1 = $('.alert-danger', form1); var success1 = $('.alert-success', form1); form1.validate({ errorElement: 'span', //default input error message container errorClass: 'help-block', // default input error message class focusInvalid: false, // do not focus the last invalid input ignore: "", rules: { name: { minlength: 2, required: true }, email: { required: true, email: true }, url: { required: true, url: true }, number: { required: true, number: true }, digits: { required: true, digits: true }, creditcard: { required: true, creditcard: true }, occupation: { minlength: 5, }, category: { required: true } }, invalidHandler: function (event, validator) { //display error alert on form submit success1.hide(); error1.show(); App.scrollTo(error1, -200); }, highlight: function (element) { // hightlight error inputs $(element) .closest('.form-group').addClass('has-error'); // set error class to the control group }, unhighlight: function (element) { // revert the change done by hightlight $(element) .closest('.form-group').removeClass('has-error'); // set error class to the control group }, success: function (label) { label .closest('.form-group').removeClass('has-error'); // set success class to the control group }, submitHandler: function (form) { success1.show(); error1.hide(); } }); } var handleValidation2 = function() { // for more info visit the official plugin documentation: // http://docs.jquery.com/Plugins/Validation var form2 = $('#form_sample_2'); var error2 = $('.alert-danger', form2); var success2 = $('.alert-success', form2); form2.validate({ errorElement: 'span', //default input error message container errorClass: 'help-block', // default input error message class focusInvalid: false, // do not focus the last invalid input ignore: "", rules: { name: { minlength: 2, required: true }, email: { required: true, email: true }, email: { required: true, email: true }, url: { required: true, url: true }, number: { required: true, number: true }, digits: { required: true, digits: true }, creditcard: { required: true, creditcard: true }, }, invalidHandler: function (event, validator) { //display error alert on form submit success2.hide(); error2.show(); App.scrollTo(error2, -200); }, errorPlacement: function (error, element) { // render error placement for each input type var icon = $(element).parent('.input-icon').children('i'); icon.removeClass('fa-check').addClass("fa-warning"); icon.attr("data-original-title", error.text()).tooltip({'container': 'body'}); }, highlight: function (element) { // hightlight error inputs $(element) .closest('.form-group').addClass('has-error'); // set error class to the control group }, unhighlight: function (element) { // revert the change done by hightlight }, success: function (label, element) { var icon = $(element).parent('.input-icon').children('i'); $(element).closest('.form-group').removeClass('has-error').addClass('has-success'); // set success class to the control group icon.removeClass("fa-warning").addClass("fa-check"); }, submitHandler: function (form) { success2.show(); error2.hide(); } }); } var handleValidation3 = function() { // for more info visit the official plugin documentation: // http://docs.jquery.com/Plugins/Validation var form3 = $('#form_sample_3'); var error3 = $('.alert-danger', form3); var success3 = $('.alert-success', form3); //IMPORTANT: update CKEDITOR textarea with actual content before submit form3.on('submit', function() { for(var instanceName in CKEDITOR.instances) { CKEDITOR.instances[instanceName].updateElement(); } }) form3.validate({ errorElement: 'span', //default input error message container errorClass: 'help-block', // default input error message class focusInvalid: false, // do not focus the last invalid input ignore: "", rules: { name: { minlength: 2, required: true }, email: { required: true, email: true }, category: { required: true }, options1: { required: true }, options2: { required: true }, occupation: { minlength: 5, }, membership: { required: true }, service: { required: true, minlength: 2 }, markdown: { required: true }, editor1: { required: true }, editor2: { required: true } }, messages: { // custom messages for radio buttons and checkboxes membership: { required: "Please select a Membership type" }, service: { required: "Please select at least 2 types of Service", minlength: jQuery.format("Please select at least {0} types of Service") } }, errorPlacement: function (error, element) { // render error placement for each input type if (element.parent(".input-group").size() > 0) { error.insertAfter(element.parent(".input-group")); } else if (element.attr("data-error-container")) { error.appendTo(element.attr("data-error-container")); } else if (element.parents('.radio-list').size() > 0) { error.appendTo(element.parents('.radio-list').attr("data-error-container")); } else if (element.parents('.radio-inline').size() > 0) { error.appendTo(element.parents('.radio-inline').attr("data-error-container")); } else if (element.parents('.checkbox-list').size() > 0) { error.appendTo(element.parents('.checkbox-list').attr("data-error-container")); } else if (element.parents('.checkbox-inline').size() > 0) { error.appendTo(element.parents('.checkbox-inline').attr("data-error-container")); } else { error.insertAfter(element); // for other inputs, just perform default behavior } }, invalidHandler: function (event, validator) { //display error alert on form submit success3.hide(); error3.show(); App.scrollTo(error3, -200); }, highlight: function (element) { // hightlight error inputs $(element) .closest('.form-group').addClass('has-error'); // set error class to the control group }, unhighlight: function (element) { // revert the change done by hightlight $(element) .closest('.form-group').removeClass('has-error'); // set error class to the control group }, success: function (label) { label .closest('.form-group').removeClass('has-error'); // set success class to the control group }, submitHandler: function (form) { success3.show(); error3.hide(); } }); //apply validation on select2 dropdown value change, this only needed for chosen dropdown integration. $('.select2me', form3).change(function () { form3.validate().element($(this)); //revalidate the chosen dropdown value and show error or success message for the input }); } var handleWysihtml5 = function() { if (!jQuery().wysihtml5) { return; } if ($('.wysihtml5').size() > 0) { $('.wysihtml5').wysihtml5({ "stylesheets": ["assets/plugins/bootstrap-wysihtml5/wysiwyg-color.css"] }); } } return { //main function to initiate the module init: function () { handleWysihtml5(); handleValidation1(); handleValidation2(); handleValidation3(); } }; }();
Save
cmd:
run