File manager - Edit - /home/gzbnyc5/pty-app/realstate/public/js/pty.v2.visibility.js
Back
const PtyVisibilityService = (function () { const initVisibility = function () { $("[data-pty-affect-visibility]").each(function () { $(this).change(function () { var selector = $(this).data("pty-affect-visibility"); $('[data-pty-visible-affected-by="' + selector + '"]').each(function () { var condition = $(this).data("pty-visible-when"); if (condition.length > 0) { var conditionArr = condition.split(","); var conditionValueArr = conditionArr[2].split("|"); var conditionValue = $(conditionArr[0]).val(); var show = false; for (const conditionValueArrItem of conditionValueArr) { if (eval('"' + conditionValue + '" ' + conditionArr[1] + ' "' + conditionValueArrItem + '"')) { show = true; } } if (show) { $(this).show(); } else { $(this).hide(); $(this).find("select, input").val(""); } } }); }); $(this).trigger("change"); }); }; return { // public functions init: function () { initVisibility(); }, }; })(); // On document ready KTUtil.onDOMContentLoaded(function () { PtyVisibilityService.init(); });
| ver. 1.4 |
Github
|
.
| PHP 8.2.31 | Generation time: 0 |
proxy
|
phpinfo
|
Settings