File Editor
Directories:
.. (Back)
ext
stores
utils
Files:
bfb_admin_script.js
block-layout-frontend-preview.js
builder.js
cache_notice.js
cpt-modules-wrapper.js
failure_notice.js
library_category.js
library_scripts.js
page-settings-metabox.js
reset_memory_limit_increase_setting.js
roles_admin.js
Create New File
Create
Edit File: roles_admin.js
!function(t){var e={};function o(n){if(e[n])return e[n].exports;var a=e[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,o),a.l=!0,a.exports}o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)o.d(n,a,function(e){return t[e]}.bind(null,a));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=159)}({0:function(t,e){t.exports=jQuery},159:function(t,e,o){"use strict";(function(t){var e=a(o(19)),n=a(o(23));function a(t){return t&&t.__esModule?t:{default:t}}t((function(){var o=t(".et_pb_roles_options_container"),a=o.find(".et_pb_yes_no_button_wrapper"),_=o.find(".et_pb_yes_no_button"),s=o.find("select"),i=t("body");function r(e,o){var n,a=t(".et_pb_roles_container_all").find("form"),_={};a.each((function(){var e=t(this),o=e.data("role_id"),n=e.serialize();_[o]=n})),n=JSON.stringify(_),t.ajax({type:"POST",url:et_pb_roles_options.ajaxurl,dataType:"json",data:{action:"et_pb_save_role_settings",et_pb_options_all:n,et_pb_save_roles_nonce:et_pb_roles_options.et_roles_nonce},beforeSend:function(e){o&&(t("#et_pb_loading_animation").removeClass("et_pb_hide_loading"),t("#et_pb_success_animation").removeClass("et_pb_active_success"),t("#et_pb_loading_animation").show())},success:function(n){o&&(t("#et_pb_loading_animation").addClass("et_pb_hide_loading"),t("#et_pb_success_animation").addClass("et_pb_active_success").show(),setTimeout((function(){t("#et_pb_success_animation").fadeToggle(),t("#et_pb_loading_animation").fadeToggle()}),1e3)),"function"==typeof e&&e()}})}function c(t){var e=t.closest(".et_pb_modal_overlay");e.addClass("et_pb_modal_closing"),setTimeout((function(){e.remove()}),600)}a.each((function(){var e=t(this),o=e.find(".et_pb_yes_no_button");"on"===e.find("select").val()?(o.removeClass("et_pb_off_state"),o.addClass("et_pb_on_state")):(o.removeClass("et_pb_on_state"),o.addClass("et_pb_off_state"))})),_.on("click",(function(){var e=t(this),o=e.closest(".et_pb_yes_no_button_wrapper").find("select");e.hasClass("et_pb_off_state")?(e.removeClass("et_pb_off_state"),e.addClass("et_pb_on_state"),o.val("on")):(e.removeClass("et_pb_on_state"),e.addClass("et_pb_off_state"),o.val("off")),o.trigger("change")})),s.on("change",(function(){var e=t(this),o=e.closest(".et_pb_yes_no_button_wrapper").find(".et_pb_yes_no_button");"on"===e.val()?(o.removeClass("et_pb_off_state"),o.addClass("et_pb_on_state")):(o.removeClass("et_pb_on_state"),o.addClass("et_pb_off_state"))})),t(".et-pb-layout-buttons:not(.et-pb-layout-buttons-reset):not(.et-pb-portability-button)").on("click",(function(){var e=t(this),o=e.data("open_tab");t(".et_pb_roles_options_container.active-container").css({display:"block",opacity:1}).stop(!0,!0).animate({opacity:0},300,(function(){var e=t(this);e.css("display","none"),e.removeClass("active-container"),t(".".concat(o)).addClass("active-container").css({display:"block",opacity:0}).stop(!0,!0).animate({opacity:1},300)})),t(".et-pb-layout-buttons").removeClass("et_pb_roles_active_menu"),e.addClass("et_pb_roles_active_menu")})),t("#et_pb_save_roles").on("click",(function(){return r(!1,!0),!1})),t(".et_pb_toggle_all").on("click",(function(){var e=t(this).closest(".et_pb_roles_section_container").find(".et-pb-main-setting"),o=0,n=0;e.each((function(){"on"===t(this).val()?o++:n++})),o>=n?e.val("off"):e.val("on"),e.trigger("change")})),t(".et-pb-layout-buttons-reset").on("click",(function(){var e="<div class='et_pb_modal_overlay' data-action='reset_roles'>\t\t\t\t<div class='et_pb_prompt_modal'>\t\t\t\t<h3>".concat(et_pb_roles_options.modal_title,"</h3>\t\t\t\t<p>").concat(et_pb_roles_options.modal_message,"</p>\t\t\t\t\t<a href='#' class='et_pb_prompt_dont_proceed et-pb-modal-close'>\t\t\t\t\t\t<span>").concat(et_pb_roles_options.modal_no,"<span>\t\t\t\t\t</span></span></a>\t\t\t\t\t<div class='et_pb_prompt_buttons'>\t\t\t\t\t\t<a href='#' class='et_pb_prompt_proceed'>").concat(et_pb_roles_options.modal_yes,"</a>\t\t\t\t\t</div>\t\t\t\t</div>\t\t\t</div>");return t("body").append(e),(0,n.default)(t(".et_pb_prompt_modal")),!1})),t("body").on("click",".et-pb-modal-close",(function(){c(t(this))})),t("body").on("click",".et_pb_prompt_proceed",(function(){var e=t(".et-pb-main-setting");e.val("on"),e.trigger("change"),c(t(this))})),i.append('<div id="et_pb_loading_animation"></div>'),i.append('<div id="et_pb_success_animation"></div>'),t("#et_pb_loading_animation").hide(),t("#et_pb_success_animation").hide(),t(".et-pb-layout-buttons").first().addClass("et_pb_roles_active_menu"),t(".et_pb_roles_container_all .et_pb_roles_options_container").first().addClass("active-container"),(0,e.default)(etCore)||(etCore.portability.save=function(t){r(t,!1)})}))}).call(this,o(0))},19:function(t,e){t.exports=function(t){return void 0===t}},23:function(t,e,o){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(e,o){var n=t(window),a=t("#wpadminbar"),_=n.height(),s=e.outerHeight(),i=a.outerHeight(),r=0-s/2+i/2;s>_-i?e.css({top:"".concat(i+15,"px"),bottom:15,marginTop:0,minHeight:0}):e.css({top:"50%",marginTop:"".concat(r,"px")}),e.addClass("et_pb_auto_centerize_modal")};e.default=o}).call(this,o(0))}});
Save Changes
Rename File
Rename