Plugin Directory

Changeset 3183666


Ignore:
Timestamp:
11/07/2024 09:37:21 AM (17 months ago)
Author:
maxpressy
Message:

Pushing a new version

Location:
maxboxy/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • maxboxy/trunk/admin/opt/config/metabox.php

    r2952906 r3183666  
    107107    CSF::createMetabox(
    108108        '_mb_floatany', array(
    109             'title'       => esc_html__('Type & style', 'maxboxy'),
     109            'title'       => esc_html__('Type and style', 'maxboxy'),
    110110            'post_type'   => 'float_any',
    111111            'context'     => 'side',
     
    138138    CSF::createMetabox(
    139139        '_mb_injectany', array(
    140             'title'       => esc_html__('Type & style', 'maxboxy'),
     140            'title'       => esc_html__('Type and style', 'maxboxy'),
    141141            'post_type'   => array_merge(array('inject_any'), $add_reusable_blocks),
    142142            'context'     => 'side',
  • maxboxy/trunk/library/js/min/main.js

    r3018932 r3183666  
    1 jQuery(document).ready(function(a){"use strict";function t(){var t=a(".floatany:not(.role-hidden):not(.is-split)");t.length&&t.maxboxyOn()}function e(){var a={root:null,threshold:.1},t=new IntersectionObserver(o,a),e=document.querySelectorAll(".injectany:not(.role-hidden):not(.is-split)");for(var s in e)e.hasOwnProperty(s)&&t.observe(e[s])}function o(t){t.forEach(function(t){var e=t.target.getAttribute("id"),o=a("#"+e);t.isIntersecting?a(o).prop("class").match(/intersected/)||(a(o).addClass("intersected").maxboxyOn(),a(o).prop("class").match(/style-alignwide/)?a(o).addClass("alignwide"):a(o).prop("class").match(/style-alignfull/)&&a(o).addClass("alignfull")):a(o).prop("class").match(/intersected/)&&(a(o).panelOverlayOff(),a(o).prop("class").match(/ia-overlayed/)&&a(o).removeClass("ia-overlayed"))})}function s(){a(".mboxy-wrap").panelNospace()}function r(){var t=a(".nospace");t.length&&t.panelNospaceDestroy()}function n(){a(".mboxy-wrap").panelSize()}function i(){var a="undefined"!=typeof new_large_screen_break_point&&992!==new_large_screen_break_point?new_large_screen_break_point:992;return a}function l(){a(window).disableForScreens()}function c(){var t=a(".mboxy .alignfull");t.length&&a.each(t,function(){var t=a(this).closest(".mboxy-content"),e=t.css("padding-left"),o=t.css("padding-right");a(this).css({"margin-left":"-"+e,"margin-right":"-"+o,width:"auto"})});var e=a(".mboxy .alignwide");e.length&&a.each(e,function(){var t=a(this).closest(".mboxy-content"),e=parseInt(t.css("padding-left"),10)/2,o=parseInt(t.css("padding-right"),10)/2;a(this).css({"margin-left":"-"+e+"px","margin-right":"-"+o+"px",width:"auto"})})}a.fn.maxboxyOn=function(){return this.each(function(){a(this).doTimeout("load_panel",20,function(){if(!a(this).prop("class").match(/is-banished/)){var t=!!a(this).prop("class").match(/on-appear-condition/),e=!!a(this).prop("class").match(/appear-elm-present/),o=!!a(this).prop("class").match(/appear-after-time/),s=!!a(this).prop("class").match(/appear-after-scroll/),r=!!a(this).prop("class").match(/appear-after-elm-inview/),n=!!a(this).prop("class").match(/appear-after-elm-outview/),i=!!a(this).prop("class").match(/appear-until-pageviews/),l=!!a(this).prop("class").match(/appear-after-pageviews/),c=!!a(this).prop("class").match(/role-igniter/),p="undefined"!=typeof a(this).data("appear-elm-present")?a(this).data("appear-elm-present"):"",d="undefined"!=typeof a(this).data("appear-after-time")?1e3*a(this).data("appear-after-time"):"",h="undefined"!=typeof a(this).data("appear-after-scroll")?a(this).data("appear-after-scroll"):"",m="undefined"!=typeof a(this).data("appear-after-elm-inview")?a(this).data("appear-after-elm-inview"):"",f="undefined"!=typeof a(this).data("appear-after-elm-outview")?a(this).data("appear-after-elm-outview"):"",u="undefined"!=typeof a(this).data("appear-until-pageviews")?a(this).data("appear-until-pageviews"):"",v="undefined"!=typeof a(this).data("appear-after-pageviews")?a(this).data("appear-after-pageviews"):"",y=a(this),g=function(){c===!0?(y.find(".trig-default").addClass("igniteon"),y.panelSize()):(y.addClass("on").panelOverlayOn().panelSize().panelRotator(),a("body").prop("class").match(/maxboxy-tracking-on/)&&y.countViews())},b=function(){c===!0?y.find(".trig-default").removeClass("igniteon"):y.removeClass("on").panelOverlayOff()};if(t===!0){if(e===!0&&!a(p).length||i===!0&&localStorage.maxboxy_pagecount>u||l===!0&&localStorage.maxboxy_pagecount<v)return;(e===!0&&a(p).length||i===!0&&localStorage.maxboxy_pagecount<=u||l===!0&&localStorage.maxboxy_pagecount>=v)&&o===!1&&s===!1&&r===!1&&n===!1&&g(),o===!0?a(this).doTimeout(d,g):s===!0?a(window).scroll(function(){a(this).scrollTop()>h?g():b()}):a(m).length?a(this).doTimeout("visibility",200,function(){a(window).on("scroll",function(){var t=a(window).height(),e=a(window).scrollTop(),o=e+t,s=a(m).outerHeight(),r=a(m).offset().top,n=r+s,i=n>=e&&r<=o;i===!0?g():y.prop("class").match(/appear-after-elm-view-repeat/)&&b()})}):a(f).length&&a(this).doTimeout("visibility",200,function(){a(window).on("scroll",function(){var t=a(window).scrollTop(),e=a(f).outerHeight(),o=a(f).offset().top,s=o+e;s<t?g():y.prop("class").match(/appear-after-elm-view-repeat/)&&b()})})}else g()}})}),this},t(),window.IntersectionObserver&&e(),a.fn.panelOverlayOn=function(){return this.each(function(){a(this).find(">.mboxy-overlay").length&&(a(this).find(">.mboxy-overlay").addClass("on"),a(this).prop("class").match(/floatany/)&&a("body").addClass("maxboxy-overlay-on"),a(this).prop("class").match(/injectany/)&&a(this).addClass("ia-overlayed"))}),this},a.fn.panelOverlayOff=function(){return this.each(function(){a(this).find(">.mboxy-overlay").length&&(a(this).find(">.mboxy-overlay").removeClass("on"),a(this).prop("class").match(/floatany/)&&a("body").removeClass("maxboxy-overlay-on"))}),this},a.fn.panelRotator=function(){return this.each(function(){var t=a(this),e=!!t.prop("class").match(/rotator-repeat/),o="undefined"!=typeof t.data("rotator-on")?1e3*t.data("rotator-on"):5e3,s="undefined"!=typeof t.data("rotator-off")?1e3*t.data("rotator-off"):1e4;if(t.prop("class").match(/role-rotator/)){t.addClass("rotator-started"),t.find("> .mboxy > .mboxy-content").prepend(t.find("> .mboxy > .mboxy-content").children("style, script, link"));var r=t.find("> .mboxy > .mboxy-content").children().not("style, script");r.first().addClass("rotator-first rotator-active"),r.last().addClass("rotator-last");var n=t.find(".mboxy-content > .mboxy-rotator-parentor");n.length&&a.each(n,function(){var t=a(this).find(">ul>li");t.addClass("rotator-child").first().addClass("rotator-first rotator-active").last().addClass("rotator-last")});var i=function(){t.doTimeout("closePanel",o,function(){t.removeClass("on").panelOverlayOff()})},l=function(){t.addClass("on").panelOverlayOn(),i()},c=function(){a.fn.moveToNext=function(){return this.each(function(){a(this).removeClass("rotator-active").next().addClass("rotator-active")}),this},a.fn.moveToFirst=function(){return this.each(function(){a(this).removeClass("rotator-active").siblings(".rotator-first").addClass("rotator-active")}),this};var s=t.find("> .mboxy > .mboxy-content > .rotator-active"),r=!(!s.length||!s.prop("class").match(/rotator-last/)),n=!(!s.length||!s.prop("class").match(/mboxy-rotator-parentor/)),i=!(!s.length||!s.prop("class").match(/rotator-children-end/)),l=r===!0&&(n===!1||n===!0&&i===!0),c=o+850;s.doTimeout("setRotatorDance",c,function(){if(e===!0&&l===!0)s.moveToFirst();else if(e===!1&&l===!0)s.removeClass("rotator-active"),t.addClass("rotator-end");else if(s.prop("class").match(/mboxy-rotator-parentor/)){var a=s.find(".rotator-child.rotator-active");a.not(".rotator-last").length?a.moveToNext():a.prop("class").match(/rotator-last/)&&(a.moveToFirst(),s.prop("class").match(/rotator-last/)?e===!1&&s.prop("class").match(/rotator-last/)?(s.removeClass("rotator-active").addClass("rotator-children-end"),t.addClass("rotator-end")):e===!0&&s.prop("class").match(/rotator-last/)&&!s.prop("class").match(/rotator-first/)&&s.moveToFirst():s.moveToNext())}else s.moveToNext()})};l(),c();var p=o+s,d=function(){t.prop("class").match(/rotator-end/)?clearInterval(d):t.prop("class").match(/rotator-pause/)||(l(),c())};setInterval(d,p)}}),this},a.fn.exiterPanel=function(){return this.each(function(){var t=a(this);a(document).on("mouseout",function(e){!t.prop("class").match(/is-banished/)&&e.clientY<0&&(t.addClass("on").panelOverlayOn(),a("body").prop("class").match(/maxboxy-tracking-on/)&&t.countViews(),t.prop("class").match(/role-rotator/)&&(t.prop("class").match(/rotator-end/)?t.removeClass("rotator-end").panelRotator():t.prop("class").match(/rotator-started/)||t.panelRotator()))})}),this},a(".mboxy-wrap.role-exit").exiterPanel(),a.fn.panelRemoveBanished=function(){return this.each(function(){var t=a(this),e="maxboxy-banish-"+t.attr("id");"true"===localStorage.getItem(e)&&a(this).addClass("is-banished").remove()}),this},a(".role-banish, .goal-after-banish").panelRemoveBanished(),a.fn.panelMarkBanished=function(){return this.each(function(){if("undefined"!=typeof Storage){var t=a(this).closest(".mboxy-wrap"),e="maxboxy-banish-"+t.attr("id");localStorage.setItem(e,"true"),t.addClass("is-banished")}}),this},a.fn.trigAnim=function(){return this.each(function(){function t(){var a=!!e.prop("class").match(/anim-rotate/);a===!0&&e.doTimeout(100,"addClass","anim-do-rotate").doTimeout(1500,"removeClass","anim-do-rotate");var t=!!e.prop("class").match(/anim-shadow/);t===!0&&e.doTimeout(100,"addClass","anim-do-shadow").doTimeout(1500,"removeClass","anim-do-shadow");var o=!!e.prop("class").match(/anim-pulse/);o===!0&&e.doTimeout(100,"addClass","anim-do-heartBeat").doTimeout(1500,"removeClass","anim-do-heartBeat");var s=!!e.prop("class").match(/anim-shake-h/);s===!0&&e.doTimeout(100,"addClass","anim-do-shakeX").doTimeout(1500,"removeClass","anim-do-shakeX");var r=!!e.prop("class").match(/anim-shake-v/);r===!0&&e.doTimeout(100,"addClass","anim-do-shakeY").doTimeout(1500,"removeClass","anim-do-shakeY")}var e=a(this),o=!!a(this).prop("class").match(/anim-echo/),s=!!a(this).prop("class").match(/anim-onload/),r=!!a(this).prop("class").match(/anim-doclick/),n="undefined"!=typeof e.data("anim-echo")?1e3*e.data("anim-echo"):15e3,i=function(){e.prop("class").match(/anim-over/)?clearInterval(i):t()};s===!0&&t(),r===!0&&t(),o===!0&&setInterval(i,n)}),this},a.fn.panelCloser=function(){return this.on("click",function(){var t=a(this).closest(".mboxy-wrap");if(t.prop("class").match(/ia-overlayed/))t.panelOverlayOff().removeClass("ia-overlayed");else{var e=a(".floatany > .mboxy-overlay.on").length;e<=1&&t.find(">.mboxy-overlay.on").length&&a("body").removeClass("maxboxy-overlay-on"),t.prop("class").match(/nospace/)&&t.panelNospaceDestroy(),t.removeClass("on").find(">.mboxy-overlay").removeClass("on");var o="undefined"!=typeof t.data("rotator-close-pause")&&1e3*t.data("rotator-close-pause"),s=!!t.prop("class").match(/role-rotator/);s===!0&&o!==!1&&t.addClass("rotator-pause").doTimeout(o,"removeClass","rotator-pause"),t.prop("class").match(/inline-set/)&&(t.children().css({left:"",right:"",top:""}),t.find(".mboxy-content").css("overflow",""),t.doTimeout(20,"removeClass","inline-set"));var r=!!a(this).closest(".mboxy-wrap.role-banish").length;r===!0&&a(this).panelMarkBanished()}}),this},a(".type-closer .mboxy-overlay, .mboxy-closer").panelCloser().trigAnim(),a.fn.panelToggler=function(){return this.on("click",function(t){t.preventDefault();var e=a(this).closest(".mboxy-wrap");if(e.prop("class").match(/ia-overlayed/))e.panelOverlayOff().removeClass("ia-overlayed");else{e.toggleClass("on"),e.prop("class").match(/floatany/)&&e.find(">.mboxy-overlay").length&&(e.find(">.mboxy-overlay").toggleClass("on"),a("body").toggleClass("maxboxy-overlay-on")),e.find(".mboxy-toggler.trig-default").toggleClass("igniteon");var o=e.find(".trig-icon"),s="undefined"!=typeof o.data("button-open")?o.data("button-open"):"",r="undefined"!=typeof o.data("button-close")?o.data("button-close"):"";(s.length||r.length)&&o.toggleClass(s+" "+r);var n=e.find(">.mboxy >.trigger"),i=maxboxy_localize.toggler_title_open,l=maxboxy_localize.toggler_title_close;n.length&&n.prop("class").match(/igniteon/)?n.attr("title",i):(n.attr("title",l),e.panelNospace(),a("body").prop("class").match(/maxboxy-tracking-on/)&&e.countViews()),e.prop("class").match(/role-rotator/)&&(e.prop("class").match(/role-igniter/)&&!e.prop("class").match(/rotator-started/)?e.panelRotator():e.prop("class").match(/rotator-end/)?e.removeClass("on"):e.toggleClass("rotator-pause")),e.find(">.mboxy >.trigger").prop("class").match(/anim-click/)&&e.find(">.mboxy >.trigger").addClass("anim-doclick").trigAnim(),e.find(">.mboxy >.trigger").prop("class").match(/anim-echo/)&&e.find(">.mboxy >.trigger").addClass("anim-over")}}),this};var p=a(".mboxy-toggler, .type-toggler .mboxy-overlay");p.panelToggler().trigAnim(),a.fn.panelHoverShut=function(){return this.on({mouseleave:function(){a(this).removeClass("on");var t=!!a(this).prop("class").match(/inline-set/);if(t===!0){a(this).children().css({display:"",left:"",right:"",top:""});var e=a(this).attr("id"),o=a(".mboxy-mark-close");a.each(o,function(){var t=a(this).children().attr("href")==="#"+e;t===!0&&a(this).removeClass("mboxy-mark-active")}),a(this).doTimeout(20,"removeClass","inline-set")}a(this).prop("class").match(/role-banish/)&&a(this).panelMarkBanished()}}),this},a(".type-closer.role-hoverer").panelHoverShut(),a(".additional-message-killer").on("click",function(t){t.stopPropagation(),a(this).parent().hide()}),a.fn.panelNospace=function(){return this.each(function(){var t=!!a(this).prop("class").match(/on/),e=!!a(this).prop("class").match(/injectany/);if(t===!0&&e===!1){var o=a(this).find(">.mboxy").outerHeight(),s=a(window).outerHeight();o>s&&(a(this).find("> .mboxy").css({height:s}),a(this).addClass("nospace"))}}),this},a(this).doTimeout(1350,s),a.fn.panelNospaceDestroy=function(){return this.each(function(){a(this).find("> .mboxy").css("height",""),a(this).removeClass("nospace")}),this},a.fn.panelSize=function(){return this.each(function(){var t=a(this).find(".with-size"),e="undefined"!=typeof t.data("panel-width")?t.data("panel-width"):"",o="undefined"!=typeof t.data("panel-height")?t.data("panel-height"):"",s=!!a(this).prop("class").match(/nospace/),r=a(window).width();if(t.length&&s===!1&&(t.css({width:e,height:o,display:"flex"}),r>=i())){var n=t.data("panel-large-width"),l=t.data("panel-large-height"),c="undefined"!=typeof n?n:e,p="undefined"!=typeof l?l:o;t.css({width:c,height:p})}}),this},a.fn.disableForScreens=function(){function t(){a(window).width()<i()?(a(".dis-screen-small").addClass("is-screen-disabled"),a(".dis-screen-large").removeClass("is-screen-disabled")):(a(".dis-screen-small").removeClass("is-screen-disabled"),a(".dis-screen-large").addClass("is-screen-disabled"))}return t()},a(this).doTimeout(400,c),a(window).on("resize",function(){r(),l(),n(),a(this).doTimeout(400,c),a(this).doTimeout(500,s)})});
     1jQuery(document).ready(function(a){"use strict";function t(){var t=a(".floatany:not(.is-split)");t.length&&t.maxboxyOn()}function e(){var a={root:null,threshold:.1},t=new IntersectionObserver(o,a),e=document.querySelectorAll(".injectany:not(.role-hidden):not(.is-split)");for(var s in e)e.hasOwnProperty(s)&&t.observe(e[s])}function o(t){t.forEach(function(t){var e=t.target.getAttribute("id"),o=a("#"+e);t.isIntersecting?a(o).prop("class").match(/intersected/)||(a(o).addClass("intersected").maxboxyOn(),a(o).prop("class").match(/style-alignwide/)?a(o).addClass("alignwide"):a(o).prop("class").match(/style-alignfull/)&&a(o).addClass("alignfull")):a(o).prop("class").match(/intersected/)&&(a(o).panelOverlayOff(),a(o).prop("class").match(/ia-overlayed/)&&a(o).removeClass("ia-overlayed"))})}function s(){a(".mboxy-wrap").panelNospace()}function r(){var t=a(".nospace");t.length&&t.panelNospaceDestroy()}function n(){a(".mboxy-wrap").panelSize()}function i(){var a="undefined"!=typeof new_large_screen_break_point&&992!==new_large_screen_break_point?new_large_screen_break_point:992;return a}function l(){a(window).disableForScreens()}function c(){var t=a(".mboxy .alignfull");t.length&&a.each(t,function(){var t=a(this).closest(".mboxy-content"),e=t.css("padding-left"),o=t.css("padding-right");a(this).css({"margin-left":"-"+e,"margin-right":"-"+o,width:"auto"})});var e=a(".mboxy .alignwide");e.length&&a.each(e,function(){var t=a(this).closest(".mboxy-content"),e=parseInt(t.css("padding-left"),10)/2,o=parseInt(t.css("padding-right"),10)/2;a(this).css({"margin-left":"-"+e+"px","margin-right":"-"+o+"px",width:"auto"})})}a.fn.maxboxyOn=function(){return this.each(function(){a(this).doTimeout("load_panel",20,function(){if(!a(this).prop("class").match(/is-banished/)){var t=!!a(this).prop("class").match(/on-appear-condition/),e=!!a(this).prop("class").match(/appear-elm-present/),o=!!a(this).prop("class").match(/appear-after-time/),s=!!a(this).prop("class").match(/appear-after-scroll/),r=!!a(this).prop("class").match(/appear-after-elm-inview/),n=!!a(this).prop("class").match(/appear-after-elm-outview/),i=!!a(this).prop("class").match(/appear-until-pageviews/),l=!!a(this).prop("class").match(/appear-after-pageviews/),c=!!a(this).prop("class").match(/role-igniter/),p=!!a(this).prop("class").match(/role-hidden/),d="undefined"!=typeof a(this).data("appear-elm-present")?a(this).data("appear-elm-present"):"",h="undefined"!=typeof a(this).data("appear-after-time")?1e3*a(this).data("appear-after-time"):"",m="undefined"!=typeof a(this).data("appear-after-scroll")?a(this).data("appear-after-scroll"):"",f="undefined"!=typeof a(this).data("appear-after-elm-inview")?a(this).data("appear-after-elm-inview"):"",u="undefined"!=typeof a(this).data("appear-after-elm-outview")?a(this).data("appear-after-elm-outview"):"",v="undefined"!=typeof a(this).data("appear-until-pageviews")?a(this).data("appear-until-pageviews"):"",y="undefined"!=typeof a(this).data("appear-after-pageviews")?a(this).data("appear-after-pageviews"):"",g=a(this),b=function(){c===!0?(g.find(".trig-default").addClass("igniteon"),g.panelSize()):p===!0?g.panelSize():(g.panelSize().addClass("on").panelOverlayOn().panelRotator(),a("body").prop("class").match(/maxboxy-tracking-on/)&&g.countViews())},x=function(){c===!0?g.find(".trig-default").removeClass("igniteon"):g.removeClass("on").panelOverlayOff()};if(t===!0){if(e===!0&&!a(d).length||i===!0&&localStorage.maxboxy_pagecount>v||l===!0&&localStorage.maxboxy_pagecount<y)return;(e===!0&&a(d).length||i===!0&&localStorage.maxboxy_pagecount<=v||l===!0&&localStorage.maxboxy_pagecount>=y)&&o===!1&&s===!1&&r===!1&&n===!1&&b(),o===!0?a(this).doTimeout(h,b):s===!0?a(window).scroll(function(){a(this).scrollTop()>m?b():x()}):a(f).length?a(this).doTimeout("visibility",200,function(){a(window).on("scroll",function(){var t=a(window).height(),e=a(window).scrollTop(),o=e+t,s=a(f).outerHeight(),r=a(f).offset().top,n=r+s,i=n>=e&&r<=o;i===!0?b():g.prop("class").match(/appear-after-elm-view-repeat/)&&x()})}):a(u).length&&a(this).doTimeout("visibility",200,function(){a(window).on("scroll",function(){var t=a(window).scrollTop(),e=a(u).outerHeight(),o=a(u).offset().top,s=o+e;s<t?b():g.prop("class").match(/appear-after-elm-view-repeat/)&&x()})})}else b()}})}),this},t(),window.IntersectionObserver&&e(),a.fn.panelOverlayOn=function(){return this.each(function(){a(this).find(">.mboxy-overlay").length&&(a(this).find(">.mboxy-overlay").addClass("on"),a(this).prop("class").match(/floatany/)&&a("body").addClass("maxboxy-overlay-on"),a(this).prop("class").match(/injectany/)&&a(this).addClass("ia-overlayed"))}),this},a.fn.panelOverlayOff=function(){return this.each(function(){a(this).find(">.mboxy-overlay").length&&(a(this).find(">.mboxy-overlay").removeClass("on"),a(this).prop("class").match(/floatany/)&&a("body").removeClass("maxboxy-overlay-on"))}),this},a.fn.panelRotator=function(){return this.each(function(){var t=a(this),e=!!t.prop("class").match(/rotator-repeat/),o="undefined"!=typeof t.data("rotator-on")?1e3*t.data("rotator-on"):5e3,s="undefined"!=typeof t.data("rotator-off")?1e3*t.data("rotator-off"):1e4;if(t.prop("class").match(/role-rotator/)){t.addClass("rotator-started"),t.find("> .mboxy > .mboxy-content").prepend(t.find("> .mboxy > .mboxy-content").children("style, script, link"));var r=t.find("> .mboxy > .mboxy-content").children().not("style, script");r.first().addClass("rotator-first rotator-active"),r.last().addClass("rotator-last");var n=t.find(".mboxy-content > .mboxy-rotator-parentor");n.length&&a.each(n,function(){var t=a(this).find(">ul>li");t.addClass("rotator-child").first().addClass("rotator-first rotator-active").last().addClass("rotator-last")});var i=function(){t.doTimeout("closePanel",o,function(){t.removeClass("on").panelOverlayOff()})},l=function(){t.addClass("on").panelOverlayOn(),i()},c=function(){a.fn.moveToNext=function(){return this.each(function(){a(this).removeClass("rotator-active").next().addClass("rotator-active")}),this},a.fn.moveToFirst=function(){return this.each(function(){a(this).removeClass("rotator-active").siblings(".rotator-first").addClass("rotator-active")}),this};var s=t.find("> .mboxy > .mboxy-content > .rotator-active"),r=!(!s.length||!s.prop("class").match(/rotator-last/)),n=!(!s.length||!s.prop("class").match(/mboxy-rotator-parentor/)),i=!(!s.length||!s.prop("class").match(/rotator-children-end/)),l=r===!0&&(n===!1||n===!0&&i===!0),c=o+850;s.doTimeout("setRotatorDance",c,function(){if(e===!0&&l===!0)s.moveToFirst();else if(e===!1&&l===!0)s.removeClass("rotator-active"),t.addClass("rotator-end");else if(s.prop("class").match(/mboxy-rotator-parentor/)){var a=s.find(".rotator-child.rotator-active");a.not(".rotator-last").length?a.moveToNext():a.prop("class").match(/rotator-last/)&&(a.moveToFirst(),s.prop("class").match(/rotator-last/)?e===!1&&s.prop("class").match(/rotator-last/)?(s.removeClass("rotator-active").addClass("rotator-children-end"),t.addClass("rotator-end")):e===!0&&s.prop("class").match(/rotator-last/)&&!s.prop("class").match(/rotator-first/)&&s.moveToFirst():s.moveToNext())}else s.moveToNext()})};l(),c();var p=o+s,d=function(){t.prop("class").match(/rotator-end/)?clearInterval(d):t.prop("class").match(/rotator-pause/)||(l(),c())};setInterval(d,p)}}),this},a.fn.exiterPanel=function(){return this.each(function(){var t=a(this);a(document).on("mouseout",function(e){!t.prop("class").match(/is-banished/)&&e.clientY<0&&(t.addClass("on").panelOverlayOn(),a("body").prop("class").match(/maxboxy-tracking-on/)&&t.countViews(),t.prop("class").match(/role-rotator/)&&(t.prop("class").match(/rotator-end/)?t.removeClass("rotator-end").panelRotator():t.prop("class").match(/rotator-started/)||t.panelRotator()))})}),this},a(".mboxy-wrap.role-exit").exiterPanel(),a.fn.panelRemoveBanished=function(){return this.each(function(){var t=a(this),e="maxboxy-banish-"+t.attr("id");"true"===localStorage.getItem(e)&&a(this).addClass("is-banished").remove()}),this},a(".role-banish, .goal-after-banish").panelRemoveBanished(),a.fn.panelMarkBanished=function(){return this.each(function(){if("undefined"!=typeof Storage){var t=a(this).closest(".mboxy-wrap"),e="maxboxy-banish-"+t.attr("id");localStorage.setItem(e,"true"),t.addClass("is-banished")}}),this},a.fn.trigAnim=function(){return this.each(function(){function t(){var a=!!e.prop("class").match(/anim-rotate/);a===!0&&e.doTimeout(100,"addClass","anim-do-rotate").doTimeout(1500,"removeClass","anim-do-rotate");var t=!!e.prop("class").match(/anim-shadow/);t===!0&&e.doTimeout(100,"addClass","anim-do-shadow").doTimeout(1500,"removeClass","anim-do-shadow");var o=!!e.prop("class").match(/anim-pulse/);o===!0&&e.doTimeout(100,"addClass","anim-do-heartBeat").doTimeout(1500,"removeClass","anim-do-heartBeat");var s=!!e.prop("class").match(/anim-shake-h/);s===!0&&e.doTimeout(100,"addClass","anim-do-shakeX").doTimeout(1500,"removeClass","anim-do-shakeX");var r=!!e.prop("class").match(/anim-shake-v/);r===!0&&e.doTimeout(100,"addClass","anim-do-shakeY").doTimeout(1500,"removeClass","anim-do-shakeY")}var e=a(this),o=!!a(this).prop("class").match(/anim-echo/),s=!!a(this).prop("class").match(/anim-onload/),r=!!a(this).prop("class").match(/anim-doclick/),n="undefined"!=typeof e.data("anim-echo")?1e3*e.data("anim-echo"):15e3,i=function(){e.prop("class").match(/anim-over/)?clearInterval(i):t()};s===!0&&t(),r===!0&&t(),o===!0&&setInterval(i,n)}),this},a.fn.panelCloser=function(){return this.on("click",function(){var t=a(this).closest(".mboxy-wrap");if(t.prop("class").match(/ia-overlayed/))t.panelOverlayOff().removeClass("ia-overlayed");else{var e=a(".floatany > .mboxy-overlay.on").length;e<=1&&t.find(">.mboxy-overlay.on").length&&a("body").removeClass("maxboxy-overlay-on"),t.prop("class").match(/nospace/)&&t.panelNospaceDestroy(),t.removeClass("on").find(">.mboxy-overlay").removeClass("on");var o="undefined"!=typeof t.data("rotator-close-pause")&&1e3*t.data("rotator-close-pause"),s=!!t.prop("class").match(/role-rotator/);s===!0&&o!==!1&&t.addClass("rotator-pause").doTimeout(o,"removeClass","rotator-pause"),t.prop("class").match(/inline-set/)&&(t.children().css({left:"",right:"",top:""}),t.find(".mboxy-content").css("overflow",""),t.doTimeout(20,"removeClass","inline-set"));var r=!!a(this).closest(".mboxy-wrap.role-banish").length;r===!0&&a(this).panelMarkBanished()}}),this},a(".type-closer .mboxy-overlay, .mboxy-closer").panelCloser().trigAnim(),a.fn.panelToggler=function(){return this.on("click",function(t){t.preventDefault();var e=a(this).closest(".mboxy-wrap");if(e.prop("class").match(/ia-overlayed/))e.panelOverlayOff().removeClass("ia-overlayed");else{e.toggleClass("on"),e.prop("class").match(/floatany/)&&e.find(">.mboxy-overlay").length&&(e.find(">.mboxy-overlay").toggleClass("on"),a("body").toggleClass("maxboxy-overlay-on")),e.find(".mboxy-toggler.trig-default").toggleClass("igniteon");var o=e.find(".trig-icon"),s="undefined"!=typeof o.data("button-open")?o.data("button-open"):"",r="undefined"!=typeof o.data("button-close")?o.data("button-close"):"";(s.length||r.length)&&o.toggleClass(s+" "+r);var n=e.find(">.mboxy >.trigger"),i=maxboxy_localize.toggler_title_open,l=maxboxy_localize.toggler_title_close;n.length&&n.prop("class").match(/igniteon/)?n.attr("title",i):(n.attr("title",l),e.panelNospace(),a("body").prop("class").match(/maxboxy-tracking-on/)&&e.countViews()),e.prop("class").match(/role-rotator/)&&(e.prop("class").match(/role-igniter/)&&!e.prop("class").match(/rotator-started/)?e.panelRotator():e.prop("class").match(/rotator-end/)?e.removeClass("on"):e.toggleClass("rotator-pause")),e.find(">.mboxy >.trigger").prop("class").match(/anim-click/)&&e.find(">.mboxy >.trigger").addClass("anim-doclick").trigAnim(),e.find(">.mboxy >.trigger").prop("class").match(/anim-echo/)&&e.find(">.mboxy >.trigger").addClass("anim-over")}}),this};var p=a(".mboxy-toggler, .type-toggler .mboxy-overlay");p.panelToggler().trigAnim(),a.fn.panelHoverShut=function(){return this.on({mouseleave:function(){a(this).removeClass("on");var t=!!a(this).prop("class").match(/inline-set/);if(t===!0){a(this).children().css({display:"",left:"",right:"",top:""});var e=a(this).attr("id"),o=a(".mboxy-mark-close");a.each(o,function(){var t=a(this).children().attr("href")==="#"+e;t===!0&&a(this).removeClass("mboxy-mark-active")}),a(this).doTimeout(20,"removeClass","inline-set")}a(this).prop("class").match(/role-banish/)&&a(this).panelMarkBanished()}}),this},a(".type-closer.role-hoverer").panelHoverShut(),a(".additional-message-killer").on("click",function(t){t.stopPropagation(),a(this).parent().hide()}),a.fn.panelNospace=function(){return this.each(function(){var t=!!a(this).prop("class").match(/on/),e=!!a(this).prop("class").match(/injectany/);if(t===!0&&e===!1){var o=a(this).find(">.mboxy").outerHeight(),s=a(window).outerHeight();o>s&&(a(this).find("> .mboxy").css({height:s}),a(this).addClass("nospace"))}}),this},a(this).doTimeout(1350,s),a.fn.panelNospaceDestroy=function(){return this.each(function(){a(this).find("> .mboxy").css("height",""),a(this).removeClass("nospace")}),this},a.fn.panelSize=function(){return this.each(function(){var t=a(this).find(".with-size"),e="undefined"!=typeof t.data("panel-width")?t.data("panel-width"):"",o="undefined"!=typeof t.data("panel-height")?t.data("panel-height"):"",s=!!a(this).prop("class").match(/nospace/),r=a(window).width();if(t.length&&s===!1&&(t.css({width:e,height:o,display:"flex"}),r>=i())){var n=t.data("panel-large-width"),l=t.data("panel-large-height"),c="undefined"!=typeof n?n:e,p="undefined"!=typeof l?l:o;t.css({width:c,height:p})}}),this},a.fn.disableForScreens=function(){function t(){a(window).width()<i()?(a(".dis-screen-small").addClass("is-screen-disabled"),a(".dis-screen-large").removeClass("is-screen-disabled")):(a(".dis-screen-small").removeClass("is-screen-disabled"),a(".dis-screen-large").addClass("is-screen-disabled"))}return t()},a(this).doTimeout(400,c),a(window).on("resize",function(){r(),l(),n(),a(this).doTimeout(400,c),a(this).doTimeout(500,s)})});
  • maxboxy/trunk/library/js/src/main.js

    r3018932 r3183666  
    2929                            on_after_pageviews_class        =   $(this).prop('class').match(/appear-after-pageviews/)   ? true : false,
    3030                            is_igniter                      =   $(this).prop('class').match(/role-igniter/)     ? true : false,
     31                            is_hidden                       =   $(this).prop('class').match(/role-hidden/)      ? true : false,
    3132                            data_elm_present                =   typeof $(this).data('appear-elm-present')       !== 'undefined'     ?   $(this).data('appear-elm-present')          : '',
    3233                            data_time                       =   typeof $(this).data('appear-after-time')        !== 'undefined'     ?   $(this).data('appear-after-time') *1000     : '',
     
    4041                        var showPanel  = function() {
    4142
    42                                 // igniter is handled differently, i.e. by adding the .igniteon to the trigger instead of .on class
    43                                 if ( is_igniter === true ) {
     43                            // igniter is handled differently, i.e. by adding the .igniteon to the trigger instead of .on class
     44                            if ( is_igniter === true ) {
    4445
    4546                                panel.find('.trig-default').addClass('igniteon');
    4647                                panel.panelSize();
     48                           
     49                            } else if ( is_hidden === true ) {
     50
     51                                panel.panelSize();
    4752
    4853                            } else {
    4954
    5055                                panel
     56                                .panelSize()
    5157                                .addClass('on')
    5258                                .panelOverlayOn()
    53                                 .panelSize()
    5459                                .panelRotator();
    5560
     
    209214
    210215        // set it for the initial opened panel
    211         var is_opened_panel = $('.floatany:not(.role-hidden):not(.is-split)');
    212 
    213         if (is_opened_panel.length) {
    214 
    215             is_opened_panel.maxboxyOn();
     216        var loaded_panel = $('.floatany:not(.is-split)');
     217
     218        if (loaded_panel.length) {
     219
     220            loaded_panel.maxboxyOn();
    216221
    217222        }
     
    11141119
    11151120        this.each( function () {
    1116             var with_size               =   $(this).find('.with-size'),
    1117                 width_1st               =   typeof with_size.data('panel-width')  !== 'undefined' ? with_size.data('panel-width')  : '',
    1118                 height_1st              =   typeof with_size.data('panel-height') !== 'undefined' ? with_size.data('panel-height') : '',
     1121            var width_size              =   $(this).find('.with-size'),
     1122                width_1st               =   typeof width_size.data('panel-width')  !== 'undefined' ?    width_size.data('panel-width')  : '',
     1123                height_1st              =   typeof width_size.data('panel-height') !== 'undefined' ?    width_size.data('panel-height') : '',
    11191124                //on                            =   $(this).prop('class').match(/on/)       ?   true    :   false,
    11201125                nospace                 =   $(this).prop('class').match(/nospace/)  ?   true    :   false,
    11211126                current_screen_width    =   $(window).width();
    11221127
    1123             if (with_size.length && nospace === false) {
    1124 
    1125                 with_size.css({
     1128            if (width_size.length && nospace === false) {
     1129
     1130                width_size.css({
    11261131                    'width':  width_1st,
    11271132                    'height': height_1st,
     
    11321137                if (current_screen_width >= screenBreakPoint()) {
    11331138
    1134                     var width_large     =   with_size.data('panel-large-width'),
    1135                         height_large    =   with_size.data('panel-large-height'),
     1139                    var width_large     =   width_size.data('panel-large-width'),
     1140                        height_large    =   width_size.data('panel-large-height'),
    11361141                        width_new       =   typeof width_large  !== 'undefined'   ?   width_large     :   width_1st,
    11371142                        height_new      =   typeof height_large !== 'undefined'   ?   height_large    :   height_1st;
    11381143
    1139                         with_size.css({
     1144                        width_size.css({
    11401145                            'width':  width_new,
    11411146                            'height': height_new,
  • maxboxy/trunk/maxboxy.php

    r3174301 r3183666  
    1616 * License:             GPL v2 or later
    1717 * License URI:         https://www.gnu.org/licenses/gpl-2.0.html
    18  * Version:             1.1.7
     18 * Version:             1.1.8
    1919 * Text Domain:         maxboxy
    2020 * Domain Path:         /languages
  • maxboxy/trunk/readme.txt

    r3174301 r3183666  
    22Contributors: MaxPressy
    33Tags: popup, notifications, floating content, alerts, content box
    4 Tested up to: 6.6
    5 Stable tag: 1.1.7
     4Tested up to: 6.7
     5Stable tag: 1.1.8
    66Requires at least: 5.8
    77Requires PHP: 7.3.5
     
    9090
    9191== Changelog ==
     92= 1.1.8 - 2024-11-06 =
     93* Improve the panel size outputting when the panel is initially hidden
     94* Small code cleaning for option fields
     95
    9296= 1.1.7 - 2024-10-23 =
    9397* Raise the z-index of .floatany, , WP nav on the mob (modal) was overlapping it when triggered from it
Note: See TracChangeset for help on using the changeset viewer.