| Server IP : 54.36.91.62 / Your IP : 216.73.217.117 Web Server : Apache System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : coopiak ( 151928) PHP Version : 8.3.23 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/coopiak/amisdesseniors-fr/vesoul/media/com_acym/js/back/automation/ |
Upload File : |
jQuery(function(a){function t(){1==a("#adminAutomation").val()&&a(document).find('[data-open*="acy_add_queuetime"]').attr("disabled","disabled"),acym_helperDatePicker.setDatePickerGlobal(),acym_helperDatePicker.setRSDateChoice(),acym_helperSelect2.setAjaxSelect2(),function(){const e=a("#acym__automation__actions__json");if(!e.length)return;const _=acym_helper.parseJson(e.val());a(".acym__automation__actions__select").off("change.loadoptions").on("change.loadoptions",function(){a(this).parent().parent().find(".acym__automation__inserted__action").remove();const e=_[a(this).val()].option.replace(/__and__/g,a(this).closest(".acym__automation__actions__one__action").attr("data-action-number"));a(this).parent().after('<div class="grid-x acym__automation__inserted__action margin-top-1 margin-left-2 margin-right-2 grid-margin-x cell acym_vcenter">'+e+"</div>"),1==a("#adminAutomation").val()&&a(this).parent().next().find('[data-open*="acy_add_queuetime"]').attr("disabled","disabled"),acym_helperSelect2.setSelect2(),acym_helperDatePicker.setDatePickerGlobal(),acym_helperTooltip.setTooltip(),a(document).foundation(),a(".reveal-overlay").appendTo("#acym_form"),t();const n=a(this).closest(".acym__automation__actions__one__action").find(".acym__automation__actions__fields__dropdown"),o=a(this).closest(".acym__automation__actions__one__action").find(".acym__automation__actions__operator__dropdown");o.on("change",function(){n.trigger("change")}),n.on("change",function(){const t=a(this).closest(".acym__automation__inserted__action"),e=t.find('[data-action-field="'+a(this).val()+'"]'),_=t.find(".acym__automation__actions__fields__select"),n=t.find(".acym__automation__action__regular-field");e.length>0&&"="===o.val()?(n.attr("name",n.attr("name").replace("acym_action","")).hide(),_.each(function(t){a(this).attr("name",a(this).attr("name").replace("acym_action","")),a(this).closest(".acym__automation__one-field").hide()}),-1===e.attr("name").indexOf("acym_action")&&e.attr("name","acym_action"+e.attr("name")),e.closest(".acym__automation__one-field").show()):(-1===n.attr("name").indexOf("acym_action")&&n.attr("name","acym_action"+n.attr("name")),_.length>0&&_.each(function(){a(this).attr("name",a(this).attr("name").replace("acym_action","")),a(this).closest(".acym__automation__one-field").hide()}),n.show())}),a(this).closest(".acym__automation__actions__one__action").find(".acym__automation__actions__fields__dropdown").trigger("change")})}(),a(".acym__automation__add-action").off("click").on("click",function(){let e=a("#acym__automation__action__number__action");e.val(parseInt(e.val())+1),a(this).before(a("#acym__automation__example").html());let _=a(this).prev();_.closest(".acym__automation__actions__one__action").attr("data-action-number",e.val()),_.find("select").select2({theme:"foundation",width:"100%"}),t()}),a(".acym__automation__delete__one__action").off("click").on("click",function(){a(this).closest(".acym__automation__actions__one__action").remove()}),acym_helper.setSubmitButtonGlobal(),a(".acym__automation__actions__mails__select").on("change",function(){a(this).closest(".acym__automation__inserted__action").find('[data-task="createMail"]').html("0"===a(this).val()?ACYM_JS_TXT.ACYM_CREATE_MAIL:ACYM_JS_TXT.ACYM_EDIT_MAIL)}),acym_helperModal.setResetMail(),acym_helperModal.setTemplateModal(!0)}t(),function(){let e=a("#actions");if(!e.length)return;let _=acym_helper.parseJson(e.val()),n=0;a.each(_,function(t,e){n>0&&a(".acym__automation__add-action").trigger("click"),a.each(e,function(t,e){let _=a(".acym__automation__actions__select").last();_.val(t),_.trigger("change");let o=Object.keys(e);a.each(o,function(_){let i=o[_],c=e[o[_]],m=a('[name^="acym_action[actions]['+n+"]["+t+"]["+i+']"]');acym_helperFilter.setFieldValue(m,c),"acy_add_queue"===t&&"mail_id"===i&&""!==c&&(m.next().html(e.mail_name+'<i class="cursor-pointer acymicon-close acym__color__red acym__automation__action__reset__mail margin-left-1"></i>'),m.prev().html(ACYM_JS_TXT.ACYM_EDIT_MAIL)),m.trigger("change")})}),n++}),t()}()});