This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[id].map(function (id) { | |
SignaturePad["SignaturePad" + id] = new SignaturePad | |
(document.getElementById('signature-pad-'+id)) | |
resizeCanvas(document.getElementById('signaturePad-'+id)) | |
var cancelButton = document.getElementById('clear-' + id); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createSignaturePads() { | |
var elems=document.querySelectorAll("*[id^='signaturePad-']"); | |
[].forEach.call(elems,function(elem){ | |
console.log(elem) | |
var oldId=elem.getAttribute("id"); | |
console.log(oldId) | |
var oldId=new SignaturePad | |
(document.getElementById(oldId)) | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
['Student'].map(function (id) { | |
SignaturePad["SignaturePad" + id] = new SignaturePad | |
(document.getElementById('signature-pad-'+id)) | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var signaturePads = []; | |
var signaturePadContainer = document.getElementsByClassName('signature-container'); | |
var signaturePadParentClass = document.getElementsByClassName('signature-pad'); | |
console.log(signaturePadContainer) | |
console.log(signaturePadParentClass) | |
var signaturePadParentIndex = signaturePadContainer.signaturePadParentClass; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var signaturePadParentClass = (document.getElementById('signature-pad')); | |
var signaturePadParentData = signaturePadParentClass.dataset.parent; | |
var signaturePadChildData = signaturePadParentClass.dataset.child; | |
var signaturePadConstructor = []; | |
signaturePadConstructor.push(signaturePadParentData , signaturePadChildData) | |
var signaturePadConstructor = new (signaturePadConstructor, { | |
backgroundColor: 'rgba(255, 255, 255, 0)', | |
penColor: 'rgb(0, 0, 0)' | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
slideDown=function(id){ | |
$(id).slideDown('slow') | |
} | |
showItem=function (id) { | |
$(id).show() | |
} | |
hideItem=function (id) { | |
$(id).hide() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function checkField(element, parent) | |
{ | |
if ($(element).attr("type") == "radio") { | |
if ($("input[name=" + $(element).attr("name") + "]:checked").length > 0) { | |
if (!$(element).parent().hasClass("filled")) { | |
if ($(parent).data("required").filled < ($(parent).data("required").total)) { | |
$(parent).data("required").filled++; | |
$(element).parent().addClass("filled"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(candidatePersonalDetails).find('.required').on('keyup click', function() { string gettype ( mixed $(this) checkField($(this), (candidatePersonalDetails)); }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function checkField(element, parent) | |
{ | |
if ($(element).attr("type") == "radio") { | |
if ($("input[name=" + $(element).attr("name") + "]:checked").length > 0) { | |
if (!$(element).parent().hasClass("filled")) { | |
if ($(parent).data("required").filled < ($(parent).data("required").total)) { | |
$(parent).data("required").filled++; | |
$(element).parent().addClass("filled"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var candidatePersonalDetails = $('#candidate-personal-details-section'); | |
var candidateContactDetails = $('#candidate-contact-section'); | |
var candidateAddressDetails = $('#candidate-address-section'); | |
var requiredItems = $('.required'); | |
$(candidatePersonalDetails).data('required', {total: $(candidatePersonalDetails).find(requiredItems).length, filled: 0}); | |
$(candidatePersonalDetails).find(requiredItems).on('keyup click', function() { checkField($(this), $(candidatePersonalDetails)); }); | |
$(candidatePersonalDetails).on('keyup click', function() { checkSection($(candidatePersonalDetails), $(candidatePersonalDetails)); }); |