%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/1857783/root/var/www/cwg/wp-content/plugins/wp-grid-builder/admin/assets/js/
Upload File :
Create Path :
Current File : //proc/1857783/root/var/www/cwg/wp-content/plugins/wp-grid-builder/admin/assets/js/preview.js

/*!
* WP Grid Builder Plugin
*
* @package   WP Grid Builder
* @author    Loïc Blascos
* @link      https://www.wpgridbuilder.com
* @copyright 2019-2021 Loïc Blascos
*
*/
!function(){function t(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var i=document.createEvent("CustomEvent");return i.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),i}"function"!=typeof window.CustomEvent&&(t.prototype=window.Event.prototype,window.CustomEvent=t)}(),function(n){"use strict";window.addEventListener("wpgb.loaded",function(){var t=WP_Grid_Builder.instance(1);wpgb_preview_settings.is_selector&&n("html").css("overflow-y","scroll");function i(t,e,i){t&&(i=new CustomEvent(e,{detail:i}),t.dispatchEvent(i))}function e(){var t=n(".wpgb-select-item"),e=n(".wpgb-select-item:checked");i(window.parent,"wpgb_preview_select_item.wpgb",{wpgb:!0,total:t.length,selected:e.length,ids:e.map(function(){return n(this).val()}).get()})}n(".wpgb-cards-overview .wpgb-card-wrapper a").attr("tabindex","-1"),window.parent.document&&window.parent.document.querySelector("#wpgb_card_form")&&(t.element.style.minHeight="auto"),i(window.parent,"wpgb_preview_loaded.wpgb",t.options),i(window.parent,"wpgb_preview_resized.wpgb",t.options),t.grid.on("layout",function(){i(window.parent,"wpgb_preview_resized.wpgb",t.options)}),n(document).on("click","a:not(.wpgb-lightbox):not(.wpgb-error-msg a):not(.wpgb-admin-card-header a):not([data-page])",function(t){t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()}),n(document).on("click",".wpgb-admin-card-header a[href]",function(t){t.preventDefault(),i(window.parent,"wpgb_preview_edit_item.wpgb",{url:n(this).attr("href"),target:n(this).attr("target")})}),n(document).on("change",".wpgb-select-item",function(t){e()}),n(document).on("click","[data-action]",function(t){"select"===n(this).data("action")?i(window.parent,"wpgb_preview_select_card.wpgb",{id:n(this).parent().data("id"),name:n(this).prev().text(),wpgb:!0}):e()}),window.parent.addEventListener("wpgb_preview_select_all.wpgb",function(t){n(".wpgb-select-item").prop("checked",!!t.detail),e()}),n(document).on("click",".wpgb-admin-card-header [data-action], .wpgb-edit-card",function(t){var e=n(this);"select"!==e.data("action")&&i(window.parent,"wpgb_preview_action.wpgb",{nonce:e.data("nonce"),action:e.data("action")||"edit",id:e.attr("data-id")||e.closest(".wpgb-admin-card-header").attr("data-id"),type:e.attr("data-type")})})})}(jQuery),function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports&&module.exports?module.exports=e():t.WPGB_Tooltip=e()}(window,function(){"use strict";function t(t){t.wpgb_tooltip||t.getAttribute("aria-label")&&(this.element=t,this.event=this.leave.bind(this),this.method=this.element.getAttribute("data-method"),this.layout=this.element.getAttribute("data-layout"),this.element.wpgb_tooltip=1,"click"===this.method?this.element.addEventListener("click",this.reveal.bind(this),!1):(this.element.addEventListener("mouseenter",this.reveal.bind(this),!1),this.element.addEventListener("mouseleave",this.leave.bind(this),!1),this.element.addEventListener("focus",this.reveal.bind(this),!1),this.element.addEventListener("blur",this.leave.bind(this),!1)))}var i=function(){var t,e=document.createElement("div"),i={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(t in i)if(i.hasOwnProperty(t)&&void 0!==e.style[t])return e=null,i[t]}(),e=t.prototype;return e.create=function(){this.tooltip=document.createElement("div"),this.tooltip.className="wpgb-tooltip",this.tooltip.className+=this.layout?" wpgb-tooltip-"+this.layout:"",this.tooltip.textContent=this.element.getAttribute("aria-label"),this.tooltip.appendChild(document.createElement("span")),document.body.appendChild(this.tooltip)},e.reveal=function(){this.tooltip||(this.create(),this.position()),"click"===this.method&&(document.addEventListener("click",this.event,!1),window.addEventListener("resize",this.event,!1)),this.tooltip.classList.add("wpgb-show")},e.leave=function(t){var e;this.tooltip&&(e=window.getComputedStyle(this.tooltip).visibility,"click"===this.method&&"visible"!==e&&t.target===this.element||("visible"===e?(this.tooltip.addEventListener(i,this.remove.bind(this),!1),this.tooltip.classList.remove("wpgb-show")):this.remove(),"click"===this.method&&(document.removeEventListener("click",this.event,!1),window.removeEventListener("resize",this.event,!1))))},e.remove=function(t){!this.tooltip||!this.tooltip.parentNode||t&&"visibility"!==t.propertyName||(this.tooltip=this.tooltip.parentNode.removeChild(this.tooltip),this.tooltip=null)},e.position=function(){var t=this.tooltip.offsetWidth,e=this.element.getBoundingClientRect(),i=e.left+(e.width-t)/2;i+t>document.body.clientWidth?i=(i=e.left-t+e.width)<0?0:i:i<0&&(i=e.left),this.tooltip.style.left=i+"px";var n=e.left+e.width/2-i,t=e.top-this.tooltip.offsetHeight-5,i=document.querySelector("#wpadminbar");t<(i?i.clientHeight:0)&&(t=e.bottom+5,this.tooltip.firstElementChild.className="top"),this.tooltip.firstElementChild.style.left=n+"px",this.tooltip.style.top=t+window.pageYOffset+"px"},t});var WPGB_Tooltip_Init=function(){for(var t=document.querySelectorAll(".wpgb-tooltip"),e=document.querySelectorAll("[data-tooltip]"),i=0,n=t.length;i<n;i++)t[i]=document.body.removeChild(t[i]),t[i]=null;for(i=0,n=e.length;i<n;i++)new WPGB_Tooltip(e[i])};WPGB_Tooltip_Init();

Zerion Mini Shell 1.0