From dfd2bcd335ad30b1d64a6f2ea04a75a3a7f9fb9b Mon Sep 17 00:00:00 2001 From: nicrausaz <n.crausaz99@gmail.com> Date: Thu, 28 Feb 2019 10:23:26 +0100 Subject: [PATCH] clear --- canapEPFL/script.js | 72 +++++---------------------------------------- 1 file changed, 8 insertions(+), 64 deletions(-) diff --git a/canapEPFL/script.js b/canapEPFL/script.js index c05d6f5..97427eb 100644 --- a/canapEPFL/script.js +++ b/canapEPFL/script.js @@ -11,7 +11,6 @@ $(document).ready(function () { } if (location.pathname.split("/").slice(-1)[0] == "viewpostulation.php") { initPostulationChange(); - initEdits(); } }); @@ -97,6 +96,14 @@ function initButtonsAction() { $('#viewPostB').click(function () { document.location.href = "viewpostulation.php"; }); + $('#delPostB').click(function () { + if (confirm("Voulez-vous vraiment supprimer cette postulation ? \rCette action est irréversible !")) { + document.location.href = "viewpostulation.php?delete"; + } + }); + $('#editPost').click(function () { + document.location.href = "form.php?edit"; + }); $('#infoFilieres').click(function () { window.open("https://www.ict-berufsbildung.ch/fr/formation-professionnelle/formation-initiale-ict/", '_blank'); }); @@ -254,69 +261,6 @@ function initPostulationChange() { }); } -function initEdits() { - // init buttons - $('#delPostB').click(function () { - if (confirm("Voulez-vous vraiment supprimer cette postulation ? \rCette action est irréversible !")) { - document.location.href = "viewpostulation.php?delete"; - } - }); - - // $.datepicker.setDefaults($.datepicker.regional["fr"]); - // $("#applicant_birthdate").datepicker({ minDate: '-60y', maxDate: '-13y', dateFormat: "dd/mm/yy" }); - - $('#editPost').click(function () { - document.location.href = "form.php?edit"; - // $('#editPost').prop('disabled', true); - // $('#confirmEditPost').show(); - // $('#cancelEditPost').show(); - - // // set inputs - // $('.postulationDataSpans').each(function () { - // $(this).hide(); - // }) - // $('.editPostInputs').each(function () { - // $(this).show(); - // }) - - // if ($("#applicant_already_applicant_year").val() == '') { - // $("#applicant_already_applicant_year").hide(); - // } - }); - // $('#confirmEditPost').click(function () { - - // }); - // $('#cancelEditPost').click(function () { - // $('#editPost').prop('disabled', false); - // $('#confirmEditPost').hide(); - // $('#cancelEditPost').hide(); - - // $('.postulationDataSpans').each(function () { - // $(this).show(); - // }) - - // $('.editPostInputs').each(function () { - // $(this).hide(); - // }) - // }); - - // // deja cand switch - // $("#applicant_already_applicant1").click(function () { - // $("#applicant_already_applicant_year").val(null); - // $("#applicant_already_applicant_year").hide(); - // }) - // $("#applicant_already_applicant2").click(function () { - // $("#applicant_already_applicant_year").show(); - // }) - - // hide default - // $('#confirmEditPost').hide(); - // $('#cancelEditPost').hide(); - // $('.editPostInputs').each(function () { - // $(this).hide(); - // }) -} - function checkRequired() { $("form").submit(function (e) { let errsNumber = 0; -- GitLab