diff --git a/js/digiquali.min.js b/js/digiquali.min.js index 5f417988..7b377633 100644 --- a/js/digiquali.min.js +++ b/js/digiquali.min.js @@ -1 +1 @@ -window.digiquali||(window.digiquali={},window.digiquali.scriptsLoaded=!1),window.digiquali.scriptsLoaded||(window.digiquali.init=function(){window.digiquali.load_list_script()},window.digiquali.load_list_script=function(){if(!window.digiquali.scriptsLoaded){var t=void 0,e=void 0;for(t in window.digiquali)for(e in window.digiquali[t].init&&window.digiquali[t].init(),window.digiquali[t])window.digiquali[t]&&window.digiquali[t][e]&&window.digiquali[t][e].init&&window.digiquali[t][e].init();window.digiquali.scriptsLoaded=!0}},window.digiquali.refresh=function(){var t=void 0,e=void 0;for(t in window.digiquali)for(e in window.digiquali[t].refresh&&window.digiquali[t].refresh(),window.digiquali[t])window.digiquali[t]&&window.digiquali[t][e]&&window.digiquali[t][e].refresh&&window.digiquali[t][e].refresh()},$(document).ready(window.digiquali.init)),window.digiquali.control={},window.digiquali.control.init=function(){window.digiquali.control.event()},window.digiquali.control.event=function(){$(document).on("click",".validateButton",window.digiquali.control.getAnswerCounter),$(document).on("change","#fk_sheet",window.digiquali.control.showSelectObjectLinked),$(document).on("click",".clipboard-copy",window.digiquali.control.copyToClipboard),$(document).on("change","#productId",window.digiquali.control.refreshLotSelector),$(document).on("click",".switch-public-control-view",window.digiquali.control.switchPublicControlView),$(document).on("click",".show-only-questions-with-no-answer",window.digiquali.control.showOnlyQuestionsWithNoAnswer),$(document).on("click",".photo-sheet-category",window.digiquali.control.getSheetCategoryID),$(document).on("click",".photo-sheet-sub-category",window.digiquali.control.getSheetSubCategoryID),$(document).on("click",".photo-sheet",window.digiquali.control.getSheetID),$(document).on("click","#actionButtonValidate",window.digiquali.control.updateModalContent)},window.digiquali.control.getAnswerCounter=function(t){let e=0;jQuery("#tablelines").children().each(function(){0<$(this).find(".answer.active").length&&(e+=1)}),document.cookie="answerCounter="+e},window.digiquali.control.showSelectObjectLinked=function(){var t=$(this).val(),e=window.saturne.toolbox.getToken(),i=window.saturne.toolbox.getQuerySeparator(document.URL),i=document.URL+i+"fk_sheet="+t+"&token="+e;window.saturne.loader.display($(".linked-objects")),$.ajax({url:i,type:"POST",processData:!1,contentType:!1,success:function(t){$(".linked-objects").replaceWith($(t).find(".linked-objects"))},error:function(){}})},window.digiquali.control.copyToClipboard=function(t){var e=$(".copy-to-clipboard").attr("value");navigator.clipboard.writeText(e).then(()=>{$(".clipboard-copy").animate({backgroundColor:"#59ed9c"},200,()=>{$(".clipboard-copy").attr("class","fas fa-check clipboard-copy"),$(this).tooltip({items:".clipboard-copy",content:$("#copyToClipboardTooltip").val()}),$(this).tooltip("open"),$(".clipboard-copy").attr("style","")})})},window.digiquali.control.refreshLotSelector=function(t){var e=document.getElementById("add_control_equipment"),e=new FormData(e),i=window.saturne.toolbox.getToken(),e=e.get("productId"),i=document.URL+"&token="+i;i+="&fk_product="+e,window.saturne.loader.display($(".product-lot")),$.ajax({url:i,type:"POST",processData:!1,contentType:!1,success:function(t){$(".product-lot").replaceWith($(t).find(".product-lot"))},error:function(){}})},window.digiquali.control.switchPublicControlView=function(t){var e=$(this).find(".public-control-view").val(),i=window.saturne.toolbox.getToken();let o=document.URL+"&token="+i;o+=0==e?"&show_control_list=1":"&show_last_control=1",window.saturne.loader.display($(".signature-container")),$.ajax({url:o,type:"POST",processData:!1,contentType:!1,success:function(t){$("#publicControlHistory").replaceWith($(t).find("#publicControlHistory"))},error:function(){}})},window.digiquali.control.showOnlyQuestionsWithNoAnswer=function(){var t=window.saturne.toolbox.getQuerySeparator(document.URL),e=window.saturne.toolbox.getToken();let i;i=$(this).hasClass("fa-toggle-off")?1:0,window.saturne.loader.display($(this)),$.ajax({url:document.URL+t+"action=show_only_questions_with_no_answer&token="+e,type:"POST",processData:!1,data:JSON.stringify({showOnlyQuestionsWithNoAnswer:i}),contentType:!1,success:function(t){$(".progress-info").replaceWith($(t).find(".progress-info")),$(".question-answer-container").replaceWith($(t).find(".question-answer-container"))},error:function(){}})},window.digiquali.control.getSheetCategoryID=function(){let e=$(this).attr("value");var t=window.saturne.toolbox.getToken(),i=window.saturne.toolbox.getQuerySeparator(document.URL);window.saturne.loader.display($(".sheet-images-container")),$.ajax({url:document.URL+i+"sheetCategoryID="+e+"&token="+t,type:"POST",processData:!1,contentType:!1,success:function(t){$(".sheet-images-container").replaceWith($(t).find(".sheet-images-container")),$(".photo-sheet-category[value="+e+"]").css("border","3px solid #0d8aff"),$(".photo-sheet-category[value="+e+"]").addClass("photo-sheet-category-active"),$(".linked-objects").replaceWith($(t).find(".linked-objects"))},error:function(){}})},window.digiquali.control.getSheetSubCategoryID=function(){let e=$(".photo-sheet-category-active").attr("value"),i=$(this).attr("value");var t=window.saturne.toolbox.getToken(),o=window.saturne.toolbox.getQuerySeparator(document.URL);window.saturne.loader.display($(".sheet-images-container")),$.ajax({url:document.URL+o+"sheetCategoryID="+e+"&sheetSubCategoryID="+i+"&token="+t,type:"POST",processData:!1,contentType:!1,success:function(t){$(".sheet-images-container").replaceWith($(t).find(".sheet-images-container")),$(".photo-sheet-category[value="+e+"]").css("border","3px solid #0d8aff"),$(".photo-sheet-category[value="+e+"]").addClass("photo-sheet-category-active"),$(".photo-sheet-sub-category[value="+i+"]").css("border","3px solid #0d8aff"),$(".photo-sheet-sub-category[value="+i+"]").addClass("photo-sheet-sub-category-active"),$(".linked-objects").replaceWith($(t).find(".linked-objects"))},error:function(){}})},window.digiquali.control.getSheetID=function(){let e=$(this).attr("data-object-id");var t=$(".photo-sheet-category-active").attr("value"),i=$(".photo-sheet-sub-category-active").attr("value"),o=window.saturne.toolbox.getToken(),n=window.saturne.toolbox.getQuerySeparator(document.URL);window.saturne.loader.display($(".sheet-elements")),window.saturne.loader.display($(".linked-objects")),$.ajax({url:document.URL+n+"fk_sheet="+e+"&sheetCategoryID="+t+"&sheetSubCategoryID="+i+"&token="+o,type:"POST",processData:!1,contentType:!1,success:function(t){$(".sheet-elements").replaceWith($(t).find(".sheet-elements")),$(".photo-sheet[data-object-id="+e+"]").css("border","3px solid #0d8aff"),$(".linked-objects").replaceWith($(t).find(".linked-objects"))},error:function(){}})},window.digiquali.control.updateModalContent=function(){var t=$("#dialog-confirm-actionButtonValidate>.confirmmessage");t.first().replaceWith(t.last())},window.digiquali.object={},window.digiquali.object.init=function(){window.digiquali.object.event()},window.digiquali.object.event=function(){$(document).on("change",".object-table.linked-objects select",window.digiquali.object.disableOtherSelectors),$(document).on("click",".answer:not(.disable)",window.digiquali.object.selectAnswer),$(document).on("input",".input-answer:not(.disable)",window.digiquali.object.selectAnswer),$(document).on("keyup",".question-comment",window.digiquali.object.showCommentUnsaved)},window.digiquali.object.disableOtherSelectors=function(){var t=document.getElementById("createObjectForm"),t=new FormData(t),e=$(this).attr("id");0<=t.get(e)?$(".object-table.linked-objects").find("select").not("#"+e).attr("disabled",1):$(".object-table.linked-objects").find("select").not("#"+e).removeAttr("disabled")},window.digiquali.object.selectAnswer=function(){var e=$(this).closest(".select-answer.answer-cell"),t=e.attr("data-questionId"),i=$(this).closest(".table-id-"+t).attr("data-publicInterface"),o=$(this).closest(".table-id-"+t).attr("data-autoSave");let n="";var a=$(this).hasClass("answer")?$(this).attr("value"):$(this).val(),s=$(this).closest(".table-id-"+t).find("#comment"+t).val();if($(this).closest(".table-cell").hasClass("select-answer")){if($(this).hasClass("multiple-answers")){$(this).closest("span").toggleClass("active");let t=[];e.find(".multiple-answers.active").each(function(){t.push($(this).attr("value"))}),n=t}else $(this).closest(".table-cell").find(".answer.active").css("background-color","#fff"),$(this).closest(".table-cell").find("span").removeClass("active"),$(this).closest("span").addClass("active"),n=a;$(this).hasClass("active")?(e=$(this).closest(".answer-cell").find(".answer-color-"+$(this).attr("value")).val(),$(this).attr("style",$(this).attr("style")+" background:"+e+";")):$(this).attr("style",$(this).attr("style")+" background:#fff;"),$(this).closest(".answer-cell").find(".question-answer").val(n)}i||1!=o||$(this).hasClass("multiple-answers")?window.digiquali.object.updateButtonsStatus():window.digiquali.object.saveAnswer(t,n,s)},window.digiquali.object.showCommentUnsaved=function(){$(this).hasClass("show-comment-unsaved-message")||($(this).after('

Commentaire non enregistré

'),$(this).addClass("show-comment-unsaved-message")),window.digiquali.object.updateButtonsStatus()},window.digiquali.object.updateButtonsStatus=function(){$("#saveButton").removeClass("butActionRefused"),$("#saveButton").addClass("butAction"),$("#saveButton").css("background","#0d8aff"),$(".fa-circle").css("display","inline"),$("#saveButton").attr("onclick",'$("#saveObject").submit()'),$(".validateButton").removeClass("butAction"),$("#dialog-confirm-actionButtonValidate").removeAttr("id"),$(".validateButton").addClass("butActionRefused")},window.digiquali.object.saveAnswer=function(t,e,i){var o=window.saturne.toolbox.getToken(),n=window.saturne.toolbox.getQuerySeparator(document.URL);window.saturne.loader.display($(".table-id-"+t)),$.ajax({url:document.URL+n+"action=save&token="+o,type:"POST",data:JSON.stringify({autoSave:!0,questionId:t,answer:e,comment:i}),processData:!1,contentType:!1,success:function(t){$(".fiche").replaceWith($(t).find(".fiche"))},error:function(){}})},window.digiquali.question={},window.digiquali.question.init=function(){window.digiquali.question.event()},window.digiquali.question.event=function(){$(document).on("click",".clicked-photo-preview",window.digiquali.question.previewPhoto),$(document).on("click",".ui-dialog-titlebar-close",window.digiquali.question.closePreviewPhoto),$(document).on("click","#show_photo",window.digiquali.question.showPhoto),$(document).on("click",".answer-picto .item, .wpeo-table .item",window.digiquali.question.selectAnswerPicto)},window.digiquali.question.previewPhoto=function(t){$(this).hasClass("photo-ok")?$("#dialogforpopup").attr("style","border: 10px solid #47e58e"):$(this).hasClass("photo-ko")&&$("#dialogforpopup").attr("style","border: 10px solid #e05353")},window.digiquali.question.closePreviewPhoto=function(t){$("#dialogforpopup").attr("style","border:")},window.digiquali.question.showPhoto=function(){var t=$(this).closest(".question-table").find(".linked-medias");t.hasClass("hidden")?(t.attr("style",""),t.removeClass("hidden")):(t.attr("style","display:none"),t.addClass("hidden"))},window.digiquali.question.selectAnswerPicto=function(t){var e=$(this).closest(".wpeo-dropdown");$(this).closest(".content").removeClass("active"),e.find(".dropdown-toggle span").hide(),e.find(".dropdown-toggle.button-picto").html($(this).closest(".wpeo-tooltip-event").html()),e.find(".input-hidden-picto").val($(this).data("label"))},window.digiquali.sheet={},window.digiquali.sheet.init=function(){window.digiquali.sheet.event()},window.digiquali.sheet.event=function(){}; \ No newline at end of file +window.digiquali||(window.digiquali={},window.digiquali.scriptsLoaded=!1),window.digiquali.scriptsLoaded||(window.digiquali.init=function(){window.digiquali.load_list_script()},window.digiquali.load_list_script=function(){if(!window.digiquali.scriptsLoaded){var t=void 0,e=void 0;for(t in window.digiquali)for(e in window.digiquali[t].init&&window.digiquali[t].init(),window.digiquali[t])window.digiquali[t]&&window.digiquali[t][e]&&window.digiquali[t][e].init&&window.digiquali[t][e].init();window.digiquali.scriptsLoaded=!0}},window.digiquali.refresh=function(){var t=void 0,e=void 0;for(t in window.digiquali)for(e in window.digiquali[t].refresh&&window.digiquali[t].refresh(),window.digiquali[t])window.digiquali[t]&&window.digiquali[t][e]&&window.digiquali[t][e].refresh&&window.digiquali[t][e].refresh()},$(document).ready(window.digiquali.init)),window.digiquali.control={},window.digiquali.control.init=function(){window.digiquali.control.event()},window.digiquali.control.event=function(){$(document).on("click",".validateButton",window.digiquali.control.getAnswerCounter),$(document).on("change","#fk_sheet",window.digiquali.control.showSelectObjectLinked),$(document).on("click",".clipboard-copy",window.digiquali.control.copyToClipboard),$(document).on("change","#productId",window.digiquali.control.refreshLotSelector),$(document).on("click",".switch-public-control-view",window.digiquali.control.switchPublicControlView),$(document).on("click",".show-only-questions-with-no-answer",window.digiquali.control.showOnlyQuestionsWithNoAnswer),$(document).on("click",".photo-sheet-category",window.digiquali.control.getSheetCategoryID),$(document).on("click",".photo-sheet-sub-category",window.digiquali.control.getSheetSubCategoryID),$(document).on("click",".photo-sheet",window.digiquali.control.getSheetID)},window.digiquali.control.getAnswerCounter=function(t){let e=0;jQuery("#tablelines").children().each(function(){0<$(this).find(".answer.active").length&&(e+=1)}),document.cookie="answerCounter="+e},window.digiquali.control.showSelectObjectLinked=function(){var t=$(this).val(),e=window.saturne.toolbox.getToken(),i=window.saturne.toolbox.getQuerySeparator(document.URL),i=document.URL+i+"fk_sheet="+t+"&token="+e;window.saturne.loader.display($(".linked-objects")),$.ajax({url:i,type:"POST",processData:!1,contentType:!1,success:function(t){$(".linked-objects").replaceWith($(t).find(".linked-objects"))},error:function(){}})},window.digiquali.control.copyToClipboard=function(t){var e=$(".copy-to-clipboard").attr("value");navigator.clipboard.writeText(e).then(()=>{$(".clipboard-copy").animate({backgroundColor:"#59ed9c"},200,()=>{$(".clipboard-copy").attr("class","fas fa-check clipboard-copy"),$(this).tooltip({items:".clipboard-copy",content:$("#copyToClipboardTooltip").val()}),$(this).tooltip("open"),$(".clipboard-copy").attr("style","")})})},window.digiquali.control.refreshLotSelector=function(t){var e=document.getElementById("add_control_equipment"),e=new FormData(e),i=window.saturne.toolbox.getToken(),e=e.get("productId"),i=document.URL+"&token="+i;i+="&fk_product="+e,window.saturne.loader.display($(".product-lot")),$.ajax({url:i,type:"POST",processData:!1,contentType:!1,success:function(t){$(".product-lot").replaceWith($(t).find(".product-lot"))},error:function(){}})},window.digiquali.control.switchPublicControlView=function(t){var e=$(this).find(".public-control-view").val(),i=window.saturne.toolbox.getToken();let o=document.URL+"&token="+i;o+=0==e?"&show_control_list=1":"&show_last_control=1",window.saturne.loader.display($(".signature-container")),$.ajax({url:o,type:"POST",processData:!1,contentType:!1,success:function(t){$("#publicControlHistory").replaceWith($(t).find("#publicControlHistory"))},error:function(){}})},window.digiquali.control.showOnlyQuestionsWithNoAnswer=function(){var t=window.saturne.toolbox.getQuerySeparator(document.URL),e=window.saturne.toolbox.getToken();let i;i=$(this).hasClass("fa-toggle-off")?1:0,window.saturne.loader.display($(this)),$.ajax({url:document.URL+t+"action=show_only_questions_with_no_answer&token="+e,type:"POST",processData:!1,data:JSON.stringify({showOnlyQuestionsWithNoAnswer:i}),contentType:!1,success:function(t){$(".progress-info").replaceWith($(t).find(".progress-info")),$(".question-answer-container").replaceWith($(t).find(".question-answer-container"))},error:function(){}})},window.digiquali.control.getSheetCategoryID=function(){let e=$(this).attr("value");var t=window.saturne.toolbox.getToken(),i=window.saturne.toolbox.getQuerySeparator(document.URL);window.saturne.loader.display($(".sheet-images-container")),$.ajax({url:document.URL+i+"sheetCategoryID="+e+"&token="+t,type:"POST",processData:!1,contentType:!1,success:function(t){$(".sheet-images-container").replaceWith($(t).find(".sheet-images-container")),$(".photo-sheet-category[value="+e+"]").css("border","3px solid #0d8aff"),$(".photo-sheet-category[value="+e+"]").addClass("photo-sheet-category-active"),$(".linked-objects").replaceWith($(t).find(".linked-objects"))},error:function(){}})},window.digiquali.control.getSheetSubCategoryID=function(){let e=$(".photo-sheet-category-active").attr("value"),i=$(this).attr("value");var t=window.saturne.toolbox.getToken(),o=window.saturne.toolbox.getQuerySeparator(document.URL);window.saturne.loader.display($(".sheet-images-container")),$.ajax({url:document.URL+o+"sheetCategoryID="+e+"&sheetSubCategoryID="+i+"&token="+t,type:"POST",processData:!1,contentType:!1,success:function(t){$(".sheet-images-container").replaceWith($(t).find(".sheet-images-container")),$(".photo-sheet-category[value="+e+"]").css("border","3px solid #0d8aff"),$(".photo-sheet-category[value="+e+"]").addClass("photo-sheet-category-active"),$(".photo-sheet-sub-category[value="+i+"]").css("border","3px solid #0d8aff"),$(".photo-sheet-sub-category[value="+i+"]").addClass("photo-sheet-sub-category-active"),$(".linked-objects").replaceWith($(t).find(".linked-objects"))},error:function(){}})},window.digiquali.control.getSheetID=function(){let e=$(this).attr("data-object-id");var t=$(".photo-sheet-category-active").attr("value"),i=$(".photo-sheet-sub-category-active").attr("value"),o=window.saturne.toolbox.getToken(),n=window.saturne.toolbox.getQuerySeparator(document.URL);window.saturne.loader.display($(".sheet-elements")),window.saturne.loader.display($(".linked-objects")),$.ajax({url:document.URL+n+"fk_sheet="+e+"&sheetCategoryID="+t+"&sheetSubCategoryID="+i+"&token="+o,type:"POST",processData:!1,contentType:!1,success:function(t){$(".sheet-elements").replaceWith($(t).find(".sheet-elements")),$(".photo-sheet[data-object-id="+e+"]").css("border","3px solid #0d8aff"),$(".linked-objects").replaceWith($(t).find(".linked-objects"))},error:function(){}})},window.digiquali.object={},window.digiquali.object.init=function(){window.digiquali.object.event()},window.digiquali.object.event=function(){$(document).on("change",".object-table.linked-objects select",window.digiquali.object.disableOtherSelectors),$(document).on("click",".answer:not(.disable)",window.digiquali.object.selectAnswer),$(document).on("input",".input-answer:not(.disable)",window.digiquali.object.selectAnswer),$(document).on("keyup",".question-comment",window.digiquali.object.showCommentUnsaved)},window.digiquali.object.disableOtherSelectors=function(){var t=document.getElementById("createObjectForm"),t=new FormData(t),e=$(this).attr("id");0<=t.get(e)?$(".object-table.linked-objects").find("select").not("#"+e).attr("disabled",1):$(".object-table.linked-objects").find("select").not("#"+e).removeAttr("disabled")},window.digiquali.object.selectAnswer=function(){var e=$(this).closest(".select-answer.answer-cell"),t=e.attr("data-questionId"),i=$(this).closest(".table-id-"+t).attr("data-publicInterface"),o=$(this).closest(".table-id-"+t).attr("data-autoSave");let n="";var a=$(this).hasClass("answer")?$(this).attr("value"):$(this).val(),s=$(this).closest(".table-id-"+t).find("#comment"+t).val();if($(this).closest(".table-cell").hasClass("select-answer")){if($(this).hasClass("multiple-answers")){$(this).closest("span").toggleClass("active");let t=[];e.find(".multiple-answers.active").each(function(){t.push($(this).attr("value"))}),n=t}else $(this).closest(".table-cell").find(".answer.active").css("background-color","#fff"),$(this).closest(".table-cell").find("span").removeClass("active"),$(this).closest("span").addClass("active"),n=a;$(this).hasClass("active")?(e=$(this).closest(".answer-cell").find(".answer-color-"+$(this).attr("value")).val(),$(this).attr("style",$(this).attr("style")+" background:"+e+";")):$(this).attr("style",$(this).attr("style")+" background:#fff;"),$(this).closest(".answer-cell").find(".question-answer").val(n)}i||1!=o||$(this).hasClass("multiple-answers")?window.digiquali.object.updateButtonsStatus():window.digiquali.object.saveAnswer(t,n,s)},window.digiquali.object.showCommentUnsaved=function(){$(this).hasClass("show-comment-unsaved-message")||($(this).after('

Commentaire non enregistré

'),$(this).addClass("show-comment-unsaved-message")),window.digiquali.object.updateButtonsStatus()},window.digiquali.object.updateButtonsStatus=function(){$("#saveButton").removeClass("butActionRefused"),$("#saveButton").addClass("butAction"),$("#saveButton").css("background","#0d8aff"),$(".fa-circle").css("display","inline"),$("#saveButton").attr("onclick",'$("#saveObject").submit()'),$(".validateButton").removeClass("butAction"),$("#dialog-confirm-actionButtonValidate").removeAttr("id"),$(".validateButton").addClass("butActionRefused")},window.digiquali.object.saveAnswer=function(t,e,i){var o=window.saturne.toolbox.getToken(),n=window.saturne.toolbox.getQuerySeparator(document.URL);window.saturne.loader.display($(".table-id-"+t)),$.ajax({url:document.URL+n+"action=save&token="+o,type:"POST",data:JSON.stringify({autoSave:!0,questionId:t,answer:e,comment:i}),processData:!1,contentType:!1,success:function(t){$(".fiche").replaceWith($(t).find(".fiche")),$("#dialog-confirm-actionButtonValidate>.confirmmessage").replaceWith($(t).find("#dialog-confirm-actionButtonValidate>.confirmmessage"))},error:function(){}})},window.digiquali.question={},window.digiquali.question.init=function(){window.digiquali.question.event()},window.digiquali.question.event=function(){$(document).on("click",".clicked-photo-preview",window.digiquali.question.previewPhoto),$(document).on("click",".ui-dialog-titlebar-close",window.digiquali.question.closePreviewPhoto),$(document).on("click","#show_photo",window.digiquali.question.showPhoto),$(document).on("click",".answer-picto .item, .wpeo-table .item",window.digiquali.question.selectAnswerPicto)},window.digiquali.question.previewPhoto=function(t){$(this).hasClass("photo-ok")?$("#dialogforpopup").attr("style","border: 10px solid #47e58e"):$(this).hasClass("photo-ko")&&$("#dialogforpopup").attr("style","border: 10px solid #e05353")},window.digiquali.question.closePreviewPhoto=function(t){$("#dialogforpopup").attr("style","border:")},window.digiquali.question.showPhoto=function(){var t=$(this).closest(".question-table").find(".linked-medias");t.hasClass("hidden")?(t.attr("style",""),t.removeClass("hidden")):(t.attr("style","display:none"),t.addClass("hidden"))},window.digiquali.question.selectAnswerPicto=function(t){var e=$(this).closest(".wpeo-dropdown");$(this).closest(".content").removeClass("active"),e.find(".dropdown-toggle span").hide(),e.find(".dropdown-toggle.button-picto").html($(this).closest(".wpeo-tooltip-event").html()),e.find(".input-hidden-picto").val($(this).data("label"))},window.digiquali.sheet={},window.digiquali.sheet.init=function(){window.digiquali.sheet.event()},window.digiquali.sheet.event=function(){}; \ No newline at end of file diff --git a/js/modules/control.js b/js/modules/control.js index e0b4a1f8..9d23e407 100644 --- a/js/modules/control.js +++ b/js/modules/control.js @@ -37,7 +37,6 @@ window.digiquali.control.event = function() { $(document).on('click', '.photo-sheet-category', window.digiquali.control.getSheetCategoryID); $(document).on('click', '.photo-sheet-sub-category', window.digiquali.control.getSheetSubCategoryID); $(document).on('click', '.photo-sheet', window.digiquali.control.getSheetID); - $(document).on('click', '#actionButtonValidate', window.digiquali.control.updateModalContent); }; /** @@ -312,17 +311,3 @@ window.digiquali.control.getSheetID = function() { error: function() {} }); }; - -/** - * Update validate control modal content - * - * @since 1.0.0 - * @version 1.0.0 - * - * @return {void} - */ -window.digiquali.control.updateModalContent = function() { - let elements = $('#dialog-confirm-actionButtonValidate>.confirmmessage') - - elements.first().replaceWith(elements.last()); -}; \ No newline at end of file diff --git a/js/modules/object.js b/js/modules/object.js index 433acd99..3d24b88a 100644 --- a/js/modules/object.js +++ b/js/modules/object.js @@ -199,6 +199,7 @@ window.digiquali.object.saveAnswer = function(questionId, answer, comment) { contentType: false, success: function(resp) { $('.fiche').replaceWith($(resp).find('.fiche')); + $('#dialog-confirm-actionButtonValidate>.confirmmessage').replaceWith($(resp).find('#dialog-confirm-actionButtonValidate>.confirmmessage')); }, error: function() {} });