Plugin Directory

Changeset 3192129


Ignore:
Timestamp:
11/19/2024 11:07:22 AM (4 months ago)
Author:
iqbalrony
Message:

Release version 3.14.0

Location:
happy-elementor-addons
Files:
625 added
37 edited

Legend:

Unmodified
Added
Removed
  • happy-elementor-addons/trunk/assets/admin/css/admin.css

    r3187401 r3192129  
    2828.ha-btn-primary:hover,
    2929.ha-btn-primary:focus {
    30     background: #4b2f9d;
     30    background: rgb(75.2, 47.2, 156.8);
    3131    color: #fff;
    3232}
     
    3838.ha-btn-secondary:hover,
    3939.ha-btn-secondary:focus {
    40     background: #d6226e;
     40    background: rgb(213.9146919431, 34.0853080569, 110.4834123223);
    4141    color: #fff;
    4242}
     
    10381038}
    10391039.ha-template-element-modal .modal__content.new-template #ha-new-template-form__submit:hover {
    1040     background: #4b339c;
     1040    background: rgb(74.75, 50.9285714286, 156.0714285714);
    10411041}
    10421042.ha-template-element-modal .modal__content.new-template #ha-new-template-form__submit:disabled {
     
    11241124.ha-template-element-modal .modal__btn-primary:hover,
    11251125.ha-template-element-modal .modal__btn-primary:focus {
    1126     background-color: #2d8e3a;
     1126    background-color: rgb(44.7857142857, 142.2142857143, 58.1428571429);
    11271127}
    11281128.ha-template-element-modal .modal__btn-secondary {
  • happy-elementor-addons/trunk/assets/admin/css/dashboard.css

    r3187401 r3192129  
    5353.ha-dashboard-btn--save:focus,
    5454.ha-dashboard-btn--save:active {
    55     background-color: #488a20;
     55    background-color: rgb(71.5384615385, 138.4615384615, 31.5384615385);
    5656    color: #fff;
    5757}
    5858.ha-dashboard-btn--save:disabled,
    5959.ha-dashboard-btn--save.disabled {
    60     background-color: #b3b3b3;
     60    background-color: rgb(178.5, 178.5, 178.5);
    6161    -webkit-box-shadow: none;
    6262            box-shadow: none;
     
    8686}
    8787.ha-dashboard-tabs__nav-item--pro {
    88     border-color: #d6226e;
     88    border-color: rgb(213.9146919431, 34.0853080569, 110.4834123223);
    8989    background-color: #e2498a;
    9090    color: #fff;
     
    227227    -webkit-box-shadow: none;
    228228            box-shadow: none;
    229     color: #8799a7;
     229    color: rgb(135.3018867925, 152.9622641509, 166.6981132075);
    230230}
    231231.ha-dashboard-widgets__item-badge {
     
    332332    -webkit-box-shadow: none;
    333333            box-shadow: none;
    334     color: #8799a7;
     334    color: rgb(135.3018867925, 152.9622641509, 166.6981132075);
    335335}
    336336.ha-dashboard-credentials__item-badge {
     
    840840.ha-btn-primary:hover,
    841841.ha-btn-primary:focus {
    842     background: #4b2f9d;
     842    background: rgb(75.2, 47.2, 156.8);
    843843    color: #fff;
    844844}
     
    850850.ha-btn-secondary:hover,
    851851.ha-btn-secondary:focus {
    852     background: #d6226e;
     852    background: rgb(213.9146919431, 34.0853080569, 110.4834123223);
    853853    color: #fff;
    854854}
  • happy-elementor-addons/trunk/assets/admin/css/editor.css

    r3187401 r3192129  
    440440}
    441441.ha-template-element-modal .modal__content.new-template #ha-new-template-form__submit:hover {
    442     background: #4b339c;
     442    background: rgb(74.75, 50.9285714286, 156.0714285714);
    443443}
    444444.ha-template-element-modal .modal__content.new-template #ha-new-template-form__submit:disabled {
     
    526526.ha-template-element-modal .modal__btn-primary:hover,
    527527.ha-template-element-modal .modal__btn-primary:focus {
    528     background-color: #2d8e3a;
     528    background-color: rgb(44.7857142857, 142.2142857143, 58.1428571429);
    529529}
    530530.ha-template-element-modal .modal__btn-secondary {
     
    742742    width: 70px;
    743743}
     744
     745#elementor-panel-categories:has(#elementor-panel-category-happy_addons_theme_builder) {
     746    display: -webkit-box;
     747    display: -webkit-flex;
     748    display: -ms-flexbox;
     749    display:         flex;
     750    -webkit-box-orient: vertical;
     751    -webkit-box-direction: normal;
     752    -webkit-flex-direction: column;
     753        -ms-flex-direction: column;
     754            flex-direction: column;
     755}
     756
     757#elementor-panel-categories #elementor-panel-category-happy_addons_theme_builder {
     758    -webkit-box-ordinal-group: -1;
     759    -webkit-order: -2;
     760    -ms-flex-order: -2;
     761            order: -2;
     762}
  • happy-elementor-addons/trunk/assets/admin/css/editor.min.css

    r3044937 r3192129  
    1 @charset "UTF-8";@-webkit-keyframes mmfadeIn{0%{opacity:0}to{opacity:1}}@keyframes mmfadeIn{0%{opacity:0}to{opacity:1}}@-webkit-keyframes mmfadeOut{0%{opacity:1}to{opacity:0}}@keyframes mmfadeOut{0%{opacity:1}to{opacity:0}}@-webkit-keyframes mmslideIn{0%{-webkit-transform:translateY(15%);transform:translateY(15%)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes mmslideIn{0%{-webkit-transform:translateY(15%);transform:translateY(15%)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes mmslideOut{0%{-webkit-transform:translateY(0);transform:translateY(0)}to{-webkit-transform:translateY(-10%);transform:translateY(-10%)}}@keyframes mmslideOut{0%{-webkit-transform:translateY(0);transform:translateY(0)}to{-webkit-transform:translateY(-10%);transform:translateY(-10%)}}.elementor-panel .ha-element--promotion>.elementor-element>.eicon-lock{right:auto;left:5px}.elementor-panel #elementor-panel-category-happy_addons_category .elementor-element:focus .icon,.elementor-panel #elementor-panel-category-happy_addons_category .elementor-element:focus .title,.elementor-panel #elementor-panel-category-happy_addons_category .elementor-element:hover .icon,.elementor-panel #elementor-panel-category-happy_addons_category .elementor-element:hover .title,.elementor-panel #elementor-panel-category-happy_addons_pro_category .elementor-element:focus .icon,.elementor-panel #elementor-panel-category-happy_addons_pro_category .elementor-element:focus .title,.elementor-panel #elementor-panel-category-happy_addons_pro_category .elementor-element:hover .icon,.elementor-panel #elementor-panel-category-happy_addons_pro_category .elementor-element:hover .title,.elementor-panel #elementor-panel-category-happy_addons_pro_category .is-ha-widget:focus .icon,.elementor-panel #elementor-panel-category-happy_addons_pro_category .is-ha-widget:focus .title,.elementor-panel #elementor-panel-category-happy_addons_pro_category .is-ha-widget:hover .icon,.elementor-panel #elementor-panel-category-happy_addons_pro_category .is-ha-widget:hover .title{background-image:-webkit-linear-gradient(315deg,#e2498a 25%,#562dd4 100%);background-image:linear-gradient(135deg,#e2498a 25%,#562dd4 100%);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.elementor-panel .ha-section-icon{margin-left:5px;background-image:-webkit-linear-gradient(315deg,#0c0d0e 25%,#0c0d0e 100%);background-image:linear-gradient(135deg,#0c0d0e 25%,#0c0d0e 100%);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.elementor-panel .elementor-element .icon{position:relative;-webkit-transition:all .2s;transition:all .2s}.elementor-panel .elementor-element .icon .hm:after{position:absolute;top:5px;right:5px;content:"\ead0";font-size:15px;opacity:.3}.elementor-panel .elementor-element:focus .icon .hm:after,.elementor-panel .elementor-element:hover .icon .hm:after{opacity:1;background-image:-webkit-linear-gradient(315deg,#e2498a 25%,#562dd4 100%);background-image:linear-gradient(135deg,#e2498a 25%,#562dd4 100%);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.elementor-panel .elementor-control-_section_happy_effects .elementor-panel-heading-title,.elementor-panel .elementor-control-_section_happy_effects .elementor-panel-heading-toggle{color:#e2498a}.elementor-control-ha_floating_fx_rotate_toggle+.elementor-controls-popover .elementor-control-type-slider--handles-range .elementor-slider .noUi-handle-lower:after,.elementor-control-ha_floating_fx_scale_toggle+.elementor-controls-popover .elementor-control-type-slider--handles-range .elementor-slider .noUi-handle-lower:after,.elementor-control-ha_floating_fx_translate_toggle+.elementor-controls-popover .elementor-control-type-slider--handles-range .elementor-slider .noUi-handle-lower:after{left:-5px;-webkit-box-shadow:-2px 2px 3px 0 rgba(0,0,0,.1);box-shadow:-2px 2px 3px 0 rgba(0,0,0,.1)}.elementor-control-ha_floating_fx_rotate_toggle+.elementor-controls-popover .elementor-control-type-slider--handles-range .elementor-slider .noUi-handle-upper:after,.elementor-control-ha_floating_fx_scale_toggle+.elementor-controls-popover .elementor-control-type-slider--handles-range .elementor-slider .noUi-handle-upper:after,.elementor-control-ha_floating_fx_translate_toggle+.elementor-controls-popover .elementor-control-type-slider--handles-range .elementor-slider .noUi-handle-upper:after{left:5px;-webkit-box-shadow:2px -2px 3px 0 rgba(0,0,0,.1);box-shadow:2px -2px 3px 0 rgba(0,0,0,.1)}.elementor-control-ha_floating_fx_rotate_toggle+.elementor-controls-popover .elementor-control-type-slider--handles-range .elementor-slider .noUi-handle-upper .noUi-tooltip,.elementor-control-ha_floating_fx_scale_toggle+.elementor-controls-popover .elementor-control-type-slider--handles-range .elementor-slider .noUi-handle-upper .noUi-tooltip,.elementor-control-ha_floating_fx_translate_toggle+.elementor-controls-popover .elementor-control-type-slider--handles-range .elementor-slider .noUi-handle-upper .noUi-tooltip{top:auto;bottom:calc(100% + 5px);left:100%}.elementor-button.ha-btn--promotion:not([disabled]){background-color:#e04d8b!important}.ha-template-elements::after{content:url("data:image/svg+xml,%3Csvg width='13' height='13' viewBox='0 0 13 13' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11.3776 3.06579C11.4916 3.06579 11.5893 3.0495 11.7033 3.03321C11.8988 3.01693 12.0453 2.82148 12.0128 2.62604C11.9965 2.43059 11.801 2.28401 11.6056 2.31658C10.1723 2.47945 8.82049 1.61624 8.36445 0.248119C8.29931 0.0526739 8.10386 -0.0450486 7.90841 0.0200997C7.71297 0.0852481 7.61525 0.280693 7.68039 0.476138C8.20158 2.08856 9.73257 3.13094 11.3776 3.06579Z' fill='%23A4AFB7'/%3E%3Cpath d='M11.8988 4.46657C11.7847 4.20598 11.5241 4.04311 11.2473 4.0594C10.8727 4.07568 10.4818 4.0594 10.0909 3.97796C8.47847 3.65222 7.24064 2.51212 6.68688 1.09515C6.58916 0.834552 6.32857 0.655394 6.05169 0.671681C3.03857 0.720542 0.41635 2.96816 0.0417465 6.12786C-0.300283 9.01067 1.4913 11.7958 4.24382 12.6916C7.81069 13.8479 11.4916 11.6329 12.2245 8.06602C12.5014 6.81192 12.3548 5.5741 11.8988 4.46657ZM7.1755 4.9389C7.20807 4.74346 7.40351 4.61316 7.59896 4.66202L9.12995 4.97147C9.32539 5.00405 9.45569 5.19949 9.40683 5.39494C9.35797 5.59038 9.17881 5.72068 8.98336 5.67182L7.45238 5.36236C7.27322 5.32979 7.14292 5.13435 7.1755 4.9389ZM3.80407 4.46657C3.90179 3.99425 4.35783 3.70108 4.83015 3.7988C5.30248 3.89653 5.59565 4.35256 5.49792 4.82489C5.4002 5.29722 4.94416 5.59038 4.47184 5.49266C3.99951 5.37865 3.70634 4.92261 3.80407 4.46657ZM9.71628 8.75008C8.96708 10.5579 6.9149 11.584 4.92788 10.9326C3.44575 10.4439 2.40338 9.09211 2.27308 7.57741C2.2405 7.18652 2.58253 6.86078 2.97342 6.92593L9.26025 7.91944C9.63485 7.98459 9.86287 8.39176 9.71628 8.75008Z' fill='%23A4AFB7'/%3E%3Cpath d='M6.62174 9.25501C5.85624 9.09214 5.10704 9.38531 4.69986 9.93907C4.61843 10.0531 4.66729 10.2322 4.79758 10.2974C5.04189 10.4114 5.30248 10.5091 5.57937 10.5743C6.32857 10.7371 7.07778 10.6068 7.66411 10.2811C7.79441 10.216 7.82699 10.0205 7.72926 9.9065C7.46867 9.58076 7.07778 9.35274 6.62174 9.25501Z' fill='%23A4AFB7'/%3E%3C/svg%3E%0A")}.ha-template-element-modal{font-family:"Roboto",-apple-system,BlinkMacSystemFont,avenir next,avenir,helvetica neue,helvetica,ubuntu,roboto,noto,segoe ui,arial,sans-serif}.ha-template-element-modal .modal__overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;background:rgba(0,0,0,.8)}.ha-template-element-modal .modal__container{overflow-y:auto;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:1202px;max-height:100vh;width:960%;border-radius:10px;background-color:#f7f7fa;-webkit-box-shadow:0 4px 100px rgba(0,0,0,.05);box-shadow:0 4px 100px rgba(0,0,0,.05)}.ha-template-element-modal .modal__container ::-webkit-scrollbar{width:8px}.ha-template-element-modal .modal__container ::-webkit-scrollbar-track{background:#f7f7fa}.ha-template-element-modal .modal__container ::-webkit-scrollbar-thumb{background:rgba(136,136,136,.6588235294)}.ha-template-element-modal .modal__container ::-webkit-scrollbar-thumb:hover{background:rgba(85,85,85,.5607843137)}.ha-template-element-modal .modal__footer,.ha-template-element-modal .modal__header{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;height:72px}.ha-template-element-modal .modal__header{-webkit-box-align:center;-webkit-align-items:center;align-items:center;-ms-flex-align:center;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-sizing:border-box;box-sizing:border-box;padding:26px 33px 26px 48px;border-radius:10px 10px 0 0;background:#fff;-webkit-box-shadow:0 4px 40px rgba(0,0,0,.1);box-shadow:0 4px 40px rgba(0,0,0,.1)}.ha-template-element-modal .modal__footer{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;gap:10px}.ha-template-element-modal .modal__title{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-ms-flex-align:center;margin-top:0;margin-bottom:0;color:#101028;font-weight:700;font-style:normal;font-size:16px;font-family:"Roboto";line-height:19px}.ha-template-element-modal .modal__title svg{margin-right:8px}.ha-template-element-modal .modal__header{position:relative;z-index:999}.ha-template-element-modal .modal__header .modal__close{border:0;background:0 0;color:#000;cursor:pointer}.ha-template-element-modal .modal__header .modal__close:before{padding-right:0;content:"✕";font-weight:700;font-size:18.5px}.ha-template-element-modal .modal__close{border:0;background:0 0;color:#93003c;cursor:pointer}.ha-template-element-modal .modal__close:before{padding-right:6px;content:"✕"}.ha-template-element-modal .modal__content{overflow:auto;-webkit-box-sizing:border-box;box-sizing:border-box;margin:auto;padding:30px 20px;max-height:65vh;width:100%;height:750px;line-height:1.5;scrollbar-color:red #ff0}.ha-template-element-modal .modal__content .form-data{margin:auto;max-width:781px}.ha-template-element-modal .modal__content .ha-template-notice{display:none;color:#000;text-align:center}.ha-template-element-modal .modal__content .ha-template-notice.error{display:block;color:red}.ha-template-element-modal .modal__content .ha-template-notice.success{display:block;color:green}.ha-template-element-modal .modal__content.new-template{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-ms-flex-align:center;padding:0;background:#fff}.ha-template-element-modal .modal__content.new-template>*{-webkit-box-sizing:border-box;box-sizing:border-box}.ha-template-element-modal .modal__content.new-template .modal__information{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;padding:47px 47px 47px 66px;width:43%;height:100%;background:#f7f7fa}.ha-template-element-modal .modal__content.new-template .modal__information .info-title{margin-bottom:26px;color:#101028;text-align:left;font-weight:700;font-style:normal;font-size:32px;font-family:sans-serif;line-height:39px}.ha-template-element-modal .modal__content.new-template .modal__information .info-message{color:#6d757a;text-align:left;font-weight:400;font-style:normal;font-size:16px;font-family:"Roboto";line-height:32px}.ha-template-element-modal .modal__content.new-template #ha-new-template-form{margin-right:auto;margin-left:auto;max-width:442px;width:57%}.ha-template-element-modal .modal__content.new-template #ha-new-template-form__title{margin-bottom:35px;color:#101028;font-weight:700;font-style:normal;font-size:24px;font-family:sans-serif;line-height:29px}.ha-template-element-modal .modal__content.new-template #ha-new-template-form__template-type{margin-bottom:19px;padding:12px 33px 12px 20px;max-width:unset;width:100%;height:56px;border:1px solid #e0e0e0!important;border-radius:6px;background-image:url("data:image/svg+xml;utf8,<svg fill='%23999999' height='32' viewBox='0 0 24 24' width='32' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");background-position-x:calc(100% - 13px);background-position-y:50%;background-size:24px;background-repeat:no-repeat;color:#2c3338;font-weight:400;font-style:normal;font-size:14px;font-family:"Roboto";line-height:32px;-webkit-appearance:none;-moz-appearance:none}.ha-template-element-modal .modal__content.new-template #ha-new-template-form__post-title{padding:12px 33px 12px 20px;max-width:unset;width:100%;height:56px;border:1px solid #e0e0e0!important;border-radius:6px;background:#fff}.ha-template-element-modal .modal__content.new-template #ha-new-template-form__submit{margin-top:19px;padding:20px;width:100%;border:0;border-radius:6px;background:#5e41c1;cursor:pointer}.ha-template-element-modal .modal__content.new-template #ha-new-template-form__submit:hover{background:#4b339c}.ha-template-element-modal .modal__content.new-template #ha-new-template-form__submit:disabled{background:#cacaca;opacity:1}.ha-template-element-modal .modal__content.new-template #ha-new-template-form__submit:disabled:hover{background:#cacaca;cursor:not-allowed}.ha-template-element-modal .modal__information{padding-bottom:20px;text-align:center}.ha-template-element-modal .modal__information .info-title{margin:0 0 15px;color:#101028;text-align:center;font-weight:700;font-style:normal;font-size:32px;font-family:sans-serif;line-height:39px}.ha-template-element-modal .modal__information .info-message{color:#6d757a;text-align:center;font-weight:400;font-style:normal;font-size:16px;font-family:"Roboto";line-height:32px}.ha-template-element-modal .modal__content .settings_title{margin-top:0;margin-bottom:8px;color:#495157;font-weight:500;font-size:15px;line-height:1.25}.ha-template-element-modal .modal__btn{overflow:visible;margin:0;padding:.5rem 1rem;min-width:163px;height:56px;border-width:0;border-style:none;border-radius:6px;background-color:#828282;color:#fff;text-transform:none;font-weight:700;font-style:normal;font-size:14px;font-family:sans-serif;line-height:17px;cursor:pointer;-webkit-transition:-webkit-transform .25s ease-out;transition:transform .25s ease-out;transition:transform .25s ease-out,-webkit-transform .25s ease-out;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-appearance:button;-webkit-backface-visibility:hidden;backface-visibility:hidden;-moz-osx-font-smoothing:grayscale;will-change:transform}.ha-template-element-modal .modal__btn.save{background-color:#39b54a}.ha-template-element-modal .modal__btn-primary{background-color:#27ae60;color:#fff}.ha-template-element-modal .modal__btn-primary:focus,.ha-template-element-modal .modal__btn-primary:hover{background-color:#2d8e3a}.ha-template-element-modal .modal__btn-secondary{background-color:#562dd4;color:#fff}.ha-template-element-modal .modal__btn-secondary:focus,.ha-template-element-modal .modal__btn-secondary:hover{background-color:#e2498a}.elementor-control.elementor-control-ha_scroll_to_top_button_icon.elementor-control-type-icons .elementor-control-media__tools.elementor-control-dynamic-switcher-wrapper,.elementor-control.elementor-control-ha_scroll_to_top_button_icon.elementor-control-type-icons label.elementor-choices-label.tooltip-target.elementor-control-icons--inline__none,.micromodal-slide{display:none}.micromodal-slide.is-open{display:block}.micromodal-slide[aria-hidden=false] .modal__overlay{-webkit-animation:mmfadeIn .3s cubic-bezier(0,0,.2,1);animation:mmfadeIn .3s cubic-bezier(0,0,.2,1)}.micromodal-slide[aria-hidden=false] .modal__container{-webkit-animation:mmslideIn .3s cubic-bezier(0,0,.2,1);animation:mmslideIn .3s cubic-bezier(0,0,.2,1)}.micromodal-slide[aria-hidden=true] .modal__overlay{-webkit-animation:mmfadeOut .3s cubic-bezier(0,0,.2,1);animation:mmfadeOut .3s cubic-bezier(0,0,.2,1)}.micromodal-slide[aria-hidden=true] .modal__container{-webkit-animation:mmslideOut .3s cubic-bezier(0,0,.2,1);animation:mmslideOut .3s cubic-bezier(0,0,.2,1)}.micromodal-slide .modal__container,.micromodal-slide .modal__overlay{will-change:transform}#ha-template-edit-form{position:relative;margin:40px 0 30px}#ha-template-edit-form .ha-template-condition-wrap{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;margin-bottom:20px;gap:10px}#ha-template-edit-form .ha-template-condition-wrap .ha-template-condition-item{position:relative;border-radius:10px}#ha-template-edit-form .ha-template-condition-wrap .ha-template-condition-item-row{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;gap:8px}#ha-template-edit-form .ha-template-condition-wrap .ha-template-condition-item-row .ha-tce-type{-webkit-box-flex:0;-webkit-flex-grow:0;-ms-flex-positive:0;flex-grow:0}#ha-template-edit-form .ha-template-condition-wrap .ha-template-condition-item-row .ha-tce-name,#ha-template-edit-form .ha-template-condition-wrap .ha-template-condition-item-row .ha-tce-sub_id,#ha-template-edit-form .ha-template-condition-wrap .ha-template-condition-item-row .ha-tce-sub_name{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1}#ha-template-edit-form .ha-template-condition-wrap .ha-template-condition-item-row .ha-tce-sub_name{max-width:45%}#ha-template-edit-form .ha-template-condition-wrap .ha-template-condition-item-row .ha-tce-sub_id{width:100px}#ha-template-edit-form .ha-template-condition-wrap .ha-template-condition-item-row select{padding:12px 33px 12px 20px;height:56px;border:1px solid #e3e3e5!important;border-radius:6px;background:#fff;background-image:url("data:image/svg+xml;utf8,<svg fill='%23999999' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");background-position-x:calc(100% - 13px);background-position-y:50%;background-repeat:no-repeat;-webkit-appearance:none;-moz-appearance:none}#ha-template-edit-form .ha-template-condition-wrap .ha-template-condition-item-row .select2-container.select2-container--default.select2-container--open .select2-selection--single{border-bottom:none!important;border-bottom-right-radius:0;border-bottom-left-radius:0}#ha-template-edit-form .ha-template-condition-wrap .ha-template-condition-item-row .select2-container.select2-container--default .select2-selection--single{padding:12px 20px;height:56px;border:1px solid #e3e3e5!important;border-radius:6px;background:#fff}#ha-template-edit-form .ha-template-condition-wrap .ha-template-condition-item-row .select2-container.select2-container--default .select2-selection--single .select2-selection__rendered,#ha-template-edit-form .ha-template-condition-wrap .ha-template-condition-item-row select{color:rgba(51,51,51,.5);font-weight:400;font-style:normal;font-size:14px;font-family:"Roboto";line-height:32px}#ha-template-edit-form .ha-template-condition-wrap .ha-template-condition-item-row .select2-container.select2-container--default .select2-selection--single .select2-selection__arrow{top:50%;right:13px;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}#ha-template-edit-form .ha-cond-repeater-add,#ha-template-edit-form .ha-template-condition-wrap .ha-template-condition-remove{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;cursor:pointer}#ha-template-edit-form .ha-template-condition-wrap .ha-template-condition-remove{position:absolute;top:50%;right:-29.5px;color:#eb5757;font-size:18px;-webkit-transform:translate(50%,-50%);-ms-transform:translate(50%,-50%);transform:translate(50%,-50%)}#ha-template-edit-form .ha-template-condition-wrap .ha-template-condition-remove:hover{color:red}#ha-template-edit-form .ha-cond-repeater-add{-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:56px;border:1px dashed #bdbdbd;border-radius:6px;background:0 0;color:#333;font-weight:400;font-style:normal;font-size:14px;font-family:"Roboto";line-height:32px}.select2-dropdown.ha-template-condition-dropdown{border-color:#e3e3e5!important}.elementor-control.elementor-control-ha_element_link .elementor-control-field-description,.elementor-control.elementor-control-ha_element_link .elementor-control-url__custom-attributes{display:none}.elementor-control-type-number input.elementor-control-tag-area.elementor-control-unit-2{width:70px}
     1@charset "UTF-8";@-webkit-keyframes mmfadeIn{0%{opacity:0}to{opacity:1}}@keyframes mmfadeIn{0%{opacity:0}to{opacity:1}}@-webkit-keyframes mmfadeOut{0%{opacity:1}to{opacity:0}}@keyframes mmfadeOut{0%{opacity:1}to{opacity:0}}@-webkit-keyframes mmslideIn{0%{-webkit-transform:translateY(15%);transform:translateY(15%)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes mmslideIn{0%{-webkit-transform:translateY(15%);transform:translateY(15%)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes mmslideOut{0%{-webkit-transform:translateY(0);transform:translateY(0)}to{-webkit-transform:translateY(-10%);transform:translateY(-10%)}}@keyframes mmslideOut{0%{-webkit-transform:translateY(0);transform:translateY(0)}to{-webkit-transform:translateY(-10%);transform:translateY(-10%)}}.elementor-panel .ha-element--promotion>.elementor-element>.eicon-lock{right:auto;left:5px}.elementor-panel #elementor-panel-category-happy_addons_category .elementor-element:focus .icon,.elementor-panel #elementor-panel-category-happy_addons_category .elementor-element:focus .title,.elementor-panel #elementor-panel-category-happy_addons_category .elementor-element:hover .icon,.elementor-panel #elementor-panel-category-happy_addons_category .elementor-element:hover .title,.elementor-panel #elementor-panel-category-happy_addons_pro_category .elementor-element:focus .icon,.elementor-panel #elementor-panel-category-happy_addons_pro_category .elementor-element:focus .title,.elementor-panel #elementor-panel-category-happy_addons_pro_category .elementor-element:hover .icon,.elementor-panel #elementor-panel-category-happy_addons_pro_category .elementor-element:hover .title,.elementor-panel #elementor-panel-category-happy_addons_pro_category .is-ha-widget:focus .icon,.elementor-panel #elementor-panel-category-happy_addons_pro_category .is-ha-widget:focus .title,.elementor-panel #elementor-panel-category-happy_addons_pro_category .is-ha-widget:hover .icon,.elementor-panel #elementor-panel-category-happy_addons_pro_category .is-ha-widget:hover .title{background-image:-webkit-linear-gradient(315deg,#e2498a 25%,#562dd4 100%);background-image:linear-gradient(135deg,#e2498a 25%,#562dd4 100%);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.elementor-panel .ha-section-icon{margin-left:5px;background-image:-webkit-linear-gradient(315deg,#0c0d0e 25%,#0c0d0e 100%);background-image:linear-gradient(135deg,#0c0d0e 25%,#0c0d0e 100%);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.elementor-panel .elementor-element .icon{position:relative;-webkit-transition:all .2s;transition:all .2s}.elementor-panel .elementor-element .icon .hm:after{position:absolute;top:5px;right:5px;content:"\ead0";font-size:15px;opacity:.3}.elementor-panel .elementor-element:focus .icon .hm:after,.elementor-panel .elementor-element:hover .icon .hm:after{opacity:1;background-image:-webkit-linear-gradient(315deg,#e2498a 25%,#562dd4 100%);background-image:linear-gradient(135deg,#e2498a 25%,#562dd4 100%);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.elementor-panel .elementor-control-_section_happy_effects .elementor-panel-heading-title,.elementor-panel .elementor-control-_section_happy_effects .elementor-panel-heading-toggle{color:#e2498a}.elementor-control-ha_floating_fx_rotate_toggle+.elementor-controls-popover .elementor-control-type-slider--handles-range .elementor-slider .noUi-handle-lower:after,.elementor-control-ha_floating_fx_scale_toggle+.elementor-controls-popover .elementor-control-type-slider--handles-range .elementor-slider .noUi-handle-lower:after,.elementor-control-ha_floating_fx_translate_toggle+.elementor-controls-popover .elementor-control-type-slider--handles-range .elementor-slider .noUi-handle-lower:after{left:-5px;-webkit-box-shadow:-2px 2px 3px 0 rgba(0,0,0,.1);box-shadow:-2px 2px 3px 0 rgba(0,0,0,.1)}.elementor-control-ha_floating_fx_rotate_toggle+.elementor-controls-popover .elementor-control-type-slider--handles-range .elementor-slider .noUi-handle-upper:after,.elementor-control-ha_floating_fx_scale_toggle+.elementor-controls-popover .elementor-control-type-slider--handles-range .elementor-slider .noUi-handle-upper:after,.elementor-control-ha_floating_fx_translate_toggle+.elementor-controls-popover .elementor-control-type-slider--handles-range .elementor-slider .noUi-handle-upper:after{left:5px;-webkit-box-shadow:2px -2px 3px 0 rgba(0,0,0,.1);box-shadow:2px -2px 3px 0 rgba(0,0,0,.1)}.elementor-control-ha_floating_fx_rotate_toggle+.elementor-controls-popover .elementor-control-type-slider--handles-range .elementor-slider .noUi-handle-upper .noUi-tooltip,.elementor-control-ha_floating_fx_scale_toggle+.elementor-controls-popover .elementor-control-type-slider--handles-range .elementor-slider .noUi-handle-upper .noUi-tooltip,.elementor-control-ha_floating_fx_translate_toggle+.elementor-controls-popover .elementor-control-type-slider--handles-range .elementor-slider .noUi-handle-upper .noUi-tooltip{top:auto;bottom:calc(100% + 5px);left:100%}.elementor-button.ha-btn--promotion:not([disabled]){background-color:#e04d8b!important}.ha-template-elements::after{content:url("data:image/svg+xml,%3Csvg width='13' height='13' viewBox='0 0 13 13' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11.3776 3.06579C11.4916 3.06579 11.5893 3.0495 11.7033 3.03321C11.8988 3.01693 12.0453 2.82148 12.0128 2.62604C11.9965 2.43059 11.801 2.28401 11.6056 2.31658C10.1723 2.47945 8.82049 1.61624 8.36445 0.248119C8.29931 0.0526739 8.10386 -0.0450486 7.90841 0.0200997C7.71297 0.0852481 7.61525 0.280693 7.68039 0.476138C8.20158 2.08856 9.73257 3.13094 11.3776 3.06579Z' fill='%23A4AFB7'/%3E%3Cpath d='M11.8988 4.46657C11.7847 4.20598 11.5241 4.04311 11.2473 4.0594C10.8727 4.07568 10.4818 4.0594 10.0909 3.97796C8.47847 3.65222 7.24064 2.51212 6.68688 1.09515C6.58916 0.834552 6.32857 0.655394 6.05169 0.671681C3.03857 0.720542 0.41635 2.96816 0.0417465 6.12786C-0.300283 9.01067 1.4913 11.7958 4.24382 12.6916C7.81069 13.8479 11.4916 11.6329 12.2245 8.06602C12.5014 6.81192 12.3548 5.5741 11.8988 4.46657ZM7.1755 4.9389C7.20807 4.74346 7.40351 4.61316 7.59896 4.66202L9.12995 4.97147C9.32539 5.00405 9.45569 5.19949 9.40683 5.39494C9.35797 5.59038 9.17881 5.72068 8.98336 5.67182L7.45238 5.36236C7.27322 5.32979 7.14292 5.13435 7.1755 4.9389ZM3.80407 4.46657C3.90179 3.99425 4.35783 3.70108 4.83015 3.7988C5.30248 3.89653 5.59565 4.35256 5.49792 4.82489C5.4002 5.29722 4.94416 5.59038 4.47184 5.49266C3.99951 5.37865 3.70634 4.92261 3.80407 4.46657ZM9.71628 8.75008C8.96708 10.5579 6.9149 11.584 4.92788 10.9326C3.44575 10.4439 2.40338 9.09211 2.27308 7.57741C2.2405 7.18652 2.58253 6.86078 2.97342 6.92593L9.26025 7.91944C9.63485 7.98459 9.86287 8.39176 9.71628 8.75008Z' fill='%23A4AFB7'/%3E%3Cpath d='M6.62174 9.25501C5.85624 9.09214 5.10704 9.38531 4.69986 9.93907C4.61843 10.0531 4.66729 10.2322 4.79758 10.2974C5.04189 10.4114 5.30248 10.5091 5.57937 10.5743C6.32857 10.7371 7.07778 10.6068 7.66411 10.2811C7.79441 10.216 7.82699 10.0205 7.72926 9.9065C7.46867 9.58076 7.07778 9.35274 6.62174 9.25501Z' fill='%23A4AFB7'/%3E%3C/svg%3E%0A")}.ha-template-element-modal{font-family:"Roboto",-apple-system,BlinkMacSystemFont,avenir next,avenir,helvetica neue,helvetica,ubuntu,roboto,noto,segoe ui,arial,sans-serif}.ha-template-element-modal .modal__overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;background:rgba(0,0,0,.8)}.ha-template-element-modal .modal__container{overflow-y:auto;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:1202px;max-height:100vh;width:960%;border-radius:10px;background-color:#f7f7fa;-webkit-box-shadow:0 4px 100px rgba(0,0,0,.05);box-shadow:0 4px 100px rgba(0,0,0,.05)}.ha-template-element-modal .modal__container ::-webkit-scrollbar{width:8px}.ha-template-element-modal .modal__container ::-webkit-scrollbar-track{background:#f7f7fa}.ha-template-element-modal .modal__container ::-webkit-scrollbar-thumb{background:rgba(136,136,136,.6588235294)}.ha-template-element-modal .modal__container ::-webkit-scrollbar-thumb:hover{background:rgba(85,85,85,.5607843137)}.ha-template-element-modal .modal__footer,.ha-template-element-modal .modal__header{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;height:72px}.ha-template-element-modal .modal__header{-webkit-box-align:center;-webkit-align-items:center;align-items:center;-ms-flex-align:center;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-sizing:border-box;box-sizing:border-box;padding:26px 33px 26px 48px;border-radius:10px 10px 0 0;background:#fff;-webkit-box-shadow:0 4px 40px rgba(0,0,0,.1);box-shadow:0 4px 40px rgba(0,0,0,.1)}.ha-template-element-modal .modal__footer{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;gap:10px}.ha-template-element-modal .modal__title{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-ms-flex-align:center;margin-top:0;margin-bottom:0;color:#101028;font-weight:700;font-style:normal;font-size:16px;font-family:"Roboto";line-height:19px}.ha-template-element-modal .modal__title svg{margin-right:8px}.ha-template-element-modal .modal__header{position:relative;z-index:999}.ha-template-element-modal .modal__header .modal__close{border:0;background:0 0;color:#000;cursor:pointer}.ha-template-element-modal .modal__header .modal__close:before{padding-right:0;content:"✕";font-weight:700;font-size:18.5px}.ha-template-element-modal .modal__close{border:0;background:0 0;color:#93003c;cursor:pointer}.ha-template-element-modal .modal__close:before{padding-right:6px;content:"✕"}.ha-template-element-modal .modal__content{overflow:auto;-webkit-box-sizing:border-box;box-sizing:border-box;margin:auto;padding:30px 20px;max-height:65vh;width:100%;height:750px;line-height:1.5;scrollbar-color:red #ff0}.ha-template-element-modal .modal__content .form-data{margin:auto;max-width:781px}.ha-template-element-modal .modal__content .ha-template-notice{display:none;color:#000;text-align:center}.ha-template-element-modal .modal__content .ha-template-notice.error{display:block;color:red}.ha-template-element-modal .modal__content .ha-template-notice.success{display:block;color:green}.ha-template-element-modal .modal__content.new-template{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-ms-flex-align:center;padding:0;background:#fff}.ha-template-element-modal .modal__content.new-template>*{-webkit-box-sizing:border-box;box-sizing:border-box}.ha-template-element-modal .modal__content.new-template .modal__information{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;padding:47px 47px 47px 66px;width:43%;height:100%;background:#f7f7fa}.ha-template-element-modal .modal__content.new-template .modal__information .info-title{margin-bottom:26px;color:#101028;text-align:left;font-weight:700;font-style:normal;font-size:32px;font-family:sans-serif;line-height:39px}.ha-template-element-modal .modal__content.new-template .modal__information .info-message{color:#6d757a;text-align:left;font-weight:400;font-style:normal;font-size:16px;font-family:"Roboto";line-height:32px}.ha-template-element-modal .modal__content.new-template #ha-new-template-form{margin-right:auto;margin-left:auto;max-width:442px;width:57%}.ha-template-element-modal .modal__content.new-template #ha-new-template-form__title{margin-bottom:35px;color:#101028;font-weight:700;font-style:normal;font-size:24px;font-family:sans-serif;line-height:29px}.ha-template-element-modal .modal__content.new-template #ha-new-template-form__template-type{margin-bottom:19px;padding:12px 33px 12px 20px;max-width:unset;width:100%;height:56px;border:1px solid #e0e0e0!important;border-radius:6px;background-image:url("data:image/svg+xml;utf8,<svg fill='%23999999' height='32' viewBox='0 0 24 24' width='32' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");background-position-x:calc(100% - 13px);background-position-y:50%;background-size:24px;background-repeat:no-repeat;color:#2c3338;font-weight:400;font-style:normal;font-size:14px;font-family:"Roboto";line-height:32px;-webkit-appearance:none;-moz-appearance:none}.ha-template-element-modal .modal__content.new-template #ha-new-template-form__post-title{padding:12px 33px 12px 20px;max-width:unset;width:100%;height:56px;border:1px solid #e0e0e0!important;border-radius:6px;background:#fff}.ha-template-element-modal .modal__content.new-template #ha-new-template-form__submit{margin-top:19px;padding:20px;width:100%;border:0;border-radius:6px;background:#5e41c1;cursor:pointer}.ha-template-element-modal .modal__content.new-template #ha-new-template-form__submit:hover{background:#4b339c}.ha-template-element-modal .modal__content.new-template #ha-new-template-form__submit:disabled{background:#cacaca;opacity:1}.ha-template-element-modal .modal__content.new-template #ha-new-template-form__submit:disabled:hover{background:#cacaca;cursor:not-allowed}.ha-template-element-modal .modal__information{padding-bottom:20px;text-align:center}.ha-template-element-modal .modal__information .info-title{margin:0 0 15px;color:#101028;text-align:center;font-weight:700;font-style:normal;font-size:32px;font-family:sans-serif;line-height:39px}.ha-template-element-modal .modal__information .info-message{color:#6d757a;text-align:center;font-weight:400;font-style:normal;font-size:16px;font-family:"Roboto";line-height:32px}.ha-template-element-modal .modal__content .settings_title{margin-top:0;margin-bottom:8px;color:#495157;font-weight:500;font-size:15px;line-height:1.25}.ha-template-element-modal .modal__btn{overflow:visible;margin:0;padding:.5rem 1rem;min-width:163px;height:56px;border-width:0;border-style:none;border-radius:6px;background-color:#828282;color:#fff;text-transform:none;font-weight:700;font-style:normal;font-size:14px;font-family:sans-serif;line-height:17px;cursor:pointer;-webkit-transition:-webkit-transform .25s ease-out;transition:transform .25s ease-out;transition:transform .25s ease-out,-webkit-transform .25s ease-out;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-appearance:button;-webkit-backface-visibility:hidden;backface-visibility:hidden;-moz-osx-font-smoothing:grayscale;will-change:transform}.ha-template-element-modal .modal__btn.save{background-color:#39b54a}.ha-template-element-modal .modal__btn-primary{background-color:#27ae60;color:#fff}.ha-template-element-modal .modal__btn-primary:focus,.ha-template-element-modal .modal__btn-primary:hover{background-color:#2d8e3a}.ha-template-element-modal .modal__btn-secondary{background-color:#562dd4;color:#fff}.ha-template-element-modal .modal__btn-secondary:focus,.ha-template-element-modal .modal__btn-secondary:hover{background-color:#e2498a}.elementor-control.elementor-control-ha_scroll_to_top_button_icon.elementor-control-type-icons .elementor-control-media__tools.elementor-control-dynamic-switcher-wrapper,.elementor-control.elementor-control-ha_scroll_to_top_button_icon.elementor-control-type-icons label.elementor-choices-label.tooltip-target.elementor-control-icons--inline__none,.micromodal-slide{display:none}.micromodal-slide.is-open{display:block}.micromodal-slide[aria-hidden=false] .modal__overlay{-webkit-animation:mmfadeIn .3s cubic-bezier(0,0,.2,1);animation:mmfadeIn .3s cubic-bezier(0,0,.2,1)}.micromodal-slide[aria-hidden=false] .modal__container{-webkit-animation:mmslideIn .3s cubic-bezier(0,0,.2,1);animation:mmslideIn .3s cubic-bezier(0,0,.2,1)}.micromodal-slide[aria-hidden=true] .modal__overlay{-webkit-animation:mmfadeOut .3s cubic-bezier(0,0,.2,1);animation:mmfadeOut .3s cubic-bezier(0,0,.2,1)}.micromodal-slide[aria-hidden=true] .modal__container{-webkit-animation:mmslideOut .3s cubic-bezier(0,0,.2,1);animation:mmslideOut .3s cubic-bezier(0,0,.2,1)}.micromodal-slide .modal__container,.micromodal-slide .modal__overlay{will-change:transform}#ha-template-edit-form{position:relative;margin:40px 0 30px}#ha-template-edit-form .ha-template-condition-wrap{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;margin-bottom:20px;gap:10px}#ha-template-edit-form .ha-template-condition-wrap .ha-template-condition-item{position:relative;border-radius:10px}#ha-template-edit-form .ha-template-condition-wrap .ha-template-condition-item-row{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;gap:8px}#ha-template-edit-form .ha-template-condition-wrap .ha-template-condition-item-row .ha-tce-type{-webkit-box-flex:0;-webkit-flex-grow:0;-ms-flex-positive:0;flex-grow:0}#ha-template-edit-form .ha-template-condition-wrap .ha-template-condition-item-row .ha-tce-name,#ha-template-edit-form .ha-template-condition-wrap .ha-template-condition-item-row .ha-tce-sub_id,#ha-template-edit-form .ha-template-condition-wrap .ha-template-condition-item-row .ha-tce-sub_name{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1}#ha-template-edit-form .ha-template-condition-wrap .ha-template-condition-item-row .ha-tce-sub_name{max-width:45%}#ha-template-edit-form .ha-template-condition-wrap .ha-template-condition-item-row .ha-tce-sub_id{width:100px}#ha-template-edit-form .ha-template-condition-wrap .ha-template-condition-item-row select{padding:12px 33px 12px 20px;height:56px;border:1px solid #e3e3e5!important;border-radius:6px;background:#fff;background-image:url("data:image/svg+xml;utf8,<svg fill='%23999999' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");background-position-x:calc(100% - 13px);background-position-y:50%;background-repeat:no-repeat;-webkit-appearance:none;-moz-appearance:none}#ha-template-edit-form .ha-template-condition-wrap .ha-template-condition-item-row .select2-container.select2-container--default.select2-container--open .select2-selection--single{border-bottom:none!important;border-bottom-right-radius:0;border-bottom-left-radius:0}#ha-template-edit-form .ha-template-condition-wrap .ha-template-condition-item-row .select2-container.select2-container--default .select2-selection--single{padding:12px 20px;height:56px;border:1px solid #e3e3e5!important;border-radius:6px;background:#fff}#ha-template-edit-form .ha-template-condition-wrap .ha-template-condition-item-row .select2-container.select2-container--default .select2-selection--single .select2-selection__rendered,#ha-template-edit-form .ha-template-condition-wrap .ha-template-condition-item-row select{color:rgba(51,51,51,.5);font-weight:400;font-style:normal;font-size:14px;font-family:"Roboto";line-height:32px}#ha-template-edit-form .ha-template-condition-wrap .ha-template-condition-item-row .select2-container.select2-container--default .select2-selection--single .select2-selection__arrow{top:50%;right:13px;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}#ha-template-edit-form .ha-cond-repeater-add,#ha-template-edit-form .ha-template-condition-wrap .ha-template-condition-remove{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;cursor:pointer}#ha-template-edit-form .ha-template-condition-wrap .ha-template-condition-remove{position:absolute;top:50%;right:-29.5px;color:#eb5757;font-size:18px;-webkit-transform:translate(50%,-50%);-ms-transform:translate(50%,-50%);transform:translate(50%,-50%)}#ha-template-edit-form .ha-template-condition-wrap .ha-template-condition-remove:hover{color:red}#ha-template-edit-form .ha-cond-repeater-add{-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:56px;border:1px dashed #bdbdbd;border-radius:6px;background:0 0;color:#333;font-weight:400;font-style:normal;font-size:14px;font-family:"Roboto";line-height:32px}.select2-dropdown.ha-template-condition-dropdown{border-color:#e3e3e5!important}.elementor-control.elementor-control-ha_element_link .elementor-control-field-description,.elementor-control.elementor-control-ha_element_link .elementor-control-url__custom-attributes{display:none}.elementor-control-type-number input.elementor-control-tag-area.elementor-control-unit-2{width:70px}#elementor-panel-categories:has(#elementor-panel-category-happy_addons_theme_builder){display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}#elementor-panel-categories #elementor-panel-category-happy_addons_theme_builder{-webkit-box-ordinal-group:-1;-webkit-order:-2;-ms-flex-order:-2;order:-2}
  • happy-elementor-addons/trunk/assets/admin/css/template-library.css

    r3187401 r3192129  
    271271.haTemplateLibrary__template .haTemplateLibrary__pro-button:hover,
    272272.haTemplateLibrary__template .haTemplateLibrary__pro-button:focus {
    273     color: #ed639a;
     273    color: rgb(237.2133333333, 98.7866666667, 153.6933333333);
    274274}
    275275.haTemplateLibrary__template .haTemplateLibrary__insert-button {
     
    278278.haTemplateLibrary__template .haTemplateLibrary__insert-button:hover,
    279279.haTemplateLibrary__template .haTemplateLibrary__insert-button:focus {
    280     color: #7857dd;
     280    color: rgb(120.0671936759, 87.3320158103, 220.6679841897);
    281281}
    282282.haTemplateLibrary__template .haTemplateLibrary__preview-button {
     
    285285.haTemplateLibrary__template .haTemplateLibrary__preview-button:hover,
    286286.haTemplateLibrary__template .haTemplateLibrary__preview-button:focus {
    287     color: #606b73;
     287    color: rgb(96.26875, 106.81875, 114.73125);
    288288}
    289289
     
    294294#elementor-template-library-header-preview .haTemplateLibrary__pro-button:hover,
    295295#elementor-template-library-header-preview .haTemplateLibrary__pro-button:focus {
    296     background-color: #ed639a;
     296    background-color: rgb(237.2133333333, 98.7866666667, 153.6933333333);
    297297    color: #fff;
    298298}
     
    303303#elementor-template-library-header-preview .haTemplateLibrary__insert-button:hover,
    304304#elementor-template-library-header-preview .haTemplateLibrary__insert-button:focus {
    305     background-color: #7857dd;
    306     color: #fff;
    307 }
     305    background-color: rgb(120.0671936759, 87.3320158103, 220.6679841897);
     306    color: #fff;
     307}
  • happy-elementor-addons/trunk/assets/admin/css/wizard.css

    r3187401 r3192129  
    12201220}
    12211221body.toplevel_page_happy-addons-setup-wizard .ha-setup-wizard__nav_next:hover {
    1222     background: #5129be;
     1222    background: rgb(80.7657480315, 40.8366141732, 189.6633858268);
    12231223    -webkit-box-shadow: 0 3px 6px rgba(90, 46, 210, .2);
    12241224            box-shadow: 0 3px 6px rgba(90, 46, 210, .2);
     
    12301230}
    12311231body.toplevel_page_happy-addons-setup-wizard .ha-setup-wizard__nav_done:hover {
    1232     background: #de337c;
     1232    background: rgb(222.4952606635, 51.0047393365, 123.8601895735);
    12331233    -webkit-box-shadow: 0 3px 6px rgba(226, 73, 138, .16);
    12341234            box-shadow: 0 3px 6px rgba(226, 73, 138, .16);
     
    12411241}
    12421242body.toplevel_page_happy-addons-setup-wizard .ha-setup-wizard__nav_bepro:hover {
    1243     background: #de337c;
     1243    background: rgb(222.4952606635, 51.0047393365, 123.8601895735);
    12441244    -webkit-box-shadow: 0 3px 6px rgba(226, 73, 138, .16);
    12451245            box-shadow: 0 3px 6px rgba(226, 73, 138, .16);
  • happy-elementor-addons/trunk/assets/admin/js/editor.js

    r3083138 r3192129  
    137137    $.each(changeHandler, function (index, value) {
    138138      elementor.settings.page.addChangeCallback(value, scrollToTop);
     139    });
     140
     141    // Reading Progress Bar
     142    function readingProgressBarHandaler(settingsValue) {
     143      var changeItem = Object.entries(this.model.changed)[0];
     144      var settings = this.getSettings().settings;
     145      var attributes = this.model.attributes;
     146      var rpb_data = {
     147        'check': 'rpbMessage',
     148        'changeValue': settingsValue,
     149        'changeItem': changeItem
     150      };
     151      if ('ha_rpb_enable' != changeItem[0]) {
     152        var data = {
     153          'ha_rpb_enable': attributes.ha_rpb_enable,
     154          'ha_rpb_apply_globally': attributes.ha_rpb_apply_globally,
     155          'ha_rpb_type': attributes.ha_rpb_type,
     156          'ha_rpb_horizontal_position': attributes.ha_rpb_horizontal_position,
     157          'ha_rpb_vertical_position': attributes.ha_rpb_vertical_position,
     158          'ha_rpb_single_disable': attributes.ha_rpb_single_disable,
     159          'ha_rpb_single_enable': attributes.ha_rpb_single_enable
     160        };
     161        rpb_data = Object.assign(rpb_data, data);
     162      }
     163      if ('ha_rpb_single_enable' == changeItem[0] || 'ha_rpb_single_disable' == changeItem[0]) {
     164        $e.run('document/save/update').then(_.debounce(function () {
     165          elementor.reloadPreview();
     166        }, 1500));
     167      }
     168      $("#elementor-preview-iframe")[0].contentWindow.postMessage(rpb_data);
     169    }
     170    ;
     171    var HmRPBHandler = ['ha_rpb_enable', 'ha_rpb_apply_globally', 'ha_rpb_type', 'ha_rpb_horizontal_position', 'ha_rpb_vertical_position', 'ha_rpb_single_disable', 'ha_rpb_single_enable'];
     172    // Handle reading progress bar
     173    $.each(HmRPBHandler, function (index, value) {
     174      elementor.settings.page.addChangeCallback(value, readingProgressBarHandaler);
    139175    });
    140176
  • happy-elementor-addons/trunk/assets/admin/js/editor.min.js

    r3142844 r3192129  
    1 (i=>{window.haHasIconLibrary=function(){return elementor.helpers&&elementor.helpers.renderIcon},window.haGetFeatureLabel=function(e){var t=document.createElement("DIV");return t.innerHTML=e,20<(e=t.textContent||t.innerText||e).length?e.substring(0,20)+"...":e},window.haGetTranslated=function(e,t){return elementorCommon.translate(e,null,t,HappyAddonsEditor.i18n)},window.haGetButtonWithIcon=function(e,t){var n,o,i,a,r,s=[];if(t=t||{},t=_.defaults(t,{oldIcon:"button_icon",iconPos:"button_icon_position",newIcon:"button_selected_icon",text:"button_text",link:"button_link",class:"ha-btn ha-btn--link",textClass:"ha-btn-text"}),_.isObject(e)){var l=e.model.attributes.settings.toJSON(),d=_.isUndefined(l[t.text])?"":l[t.text],c=!(_.isUndefined(l[t.oldIcon])||!l[t.oldIcon]),p=!(_.isUndefined(l[t.newIcon])||!_.isObject(l[t.newIcon])||!l[t.newIcon].value);if(d||p||c)return haHasIconLibrary()&&(n=elementor.helpers.renderIcon(e,l[t.newIcon],{"aria-hidden":!0,class:"ha-btn-icon"},"i","object"),o=elementor.helpers.isIconMigrated(l,t.newIcon)),e.addInlineEditingAttributes(t.text,"none"),e.addRenderAttribute(t.text,"class",t.textClass),e.addRenderAttribute("button","class",t.class),e.addRenderAttribute("button","href",l[t.link].url),(p||c)&&(haHasIconLibrary()&&n&&n.rendered&&(!c||o)?i="svg"===l[t.newIcon].library?'<span class="ha-btn-icon ha-btn-icon--svg">'+n.value+"</span>":n.value:c&&(i='<i class="ha-btn-icon '+t.oldIcon+'" aria-hidden="true"></i>')),!d||p||c?d||!p&&!c?d&&(p||c)&&("before"===l[t.iconPos]?(e.addRenderAttribute("button","class","ha-btn--icon-before"),a=i,r="<span "+e.getRenderAttributeString(t.text)+">"+d+"</span>"):(e.addRenderAttribute("button","class","ha-btn--icon-after"),r=i,a="<span "+e.getRenderAttributeString(t.text)+">"+d+"</span>"),s=["<a "+e.getRenderAttributeString("button")+">",a,r,"</a>"]):s=["<a "+e.getRenderAttributeString("button")+">",i,"</a>"]:s=["<a "+e.getRenderAttributeString("button")+">","<span "+e.getRenderAttributeString(t.text)+">",d,"</span>","</a>"],s.join("")}},elementor.on("panel:init",function(){function n(e){var t=Object.entries(this.model.changed)[0],n=(this.getSettings().settings,this.model.attributes),e={check:"sttMessage",changeValue:e,changeItem:t};"ha_scroll_to_top_single_disable"!=t[0]?(t={enable_global_stt:n.ha_scroll_to_top_global,media_type:n.ha_scroll_to_top_media_type,icon:n.ha_scroll_to_top_button_icon,image:n.ha_scroll_to_top_button_image,text:n.ha_scroll_to_top_button_text},e=Object.assign(e,t)):$e.run("document/save/update").then(_.debounce(function(){elementor.reloadPreview()},1500)),i("#elementor-preview-iframe")[0].contentWindow.postMessage(e)}i("#elementor-panel-elements-search-input").on("keyup",_.debounce(function(){i("#elementor-panel-elements").find(".hm").parents(".elementor-element").addClass("is-ha-widget")},100));var e,o;i.each(["ha_scroll_to_top_global","ha_scroll_to_top_media_type","ha_scroll_to_top_button_icon","ha_scroll_to_top_button_image","ha_scroll_to_top_button_text","ha_scroll_to_top_single_disable"],function(e,t){elementor.settings.page.addChangeCallback(t,n)}),"undefined"==typeof $e&&null===$e||(e={callback:function(){var e=elementor.settings.page.model.attributes.ha_grid;""===e?elementor.settings.page.model.setExternalChange("ha_grid","yes"):"yes"===e&&elementor.settings.page.model.setExternalChange("ha_grid","")}},$e.shortcuts.register("ctrl+shift+g",e),$e.shortcuts.register("cmd+shift+g",e)),(o=i("#"+(e="happy-addons-editor-dark-css"))).length||(o=i("<link>",{id:e,rel:"stylesheet",href:HappyAddonsEditor.dark_stylesheet_url})),elementor.settings.editorPreferences.model.on("change:ui_theme",function(e,t){"light"===t?o.remove():o.attr("media","auto"===t?"(prefers-color-scheme: dark)":"").appendTo(elementorCommon.elements.$body)})}),elementor.hooks.addFilter("panel/elements/regionViews",function(e){var n,t,o,i,a,r,s;return HappyAddonsEditor.hasPro||_.isEmpty(HappyAddonsEditor.placeholder_widgets)||(n="happy_addons_pro",t=e.elements.view,o=e.categories.view,i=e.elements.options.collection,r=e.categories.options.collection,a=[],_.each(HappyAddonsEditor.placeholder_widgets,function(e,t){i.add({name:"ha-"+t,title:e.title,icon:e.icon,categories:[n],editable:!1})}),i.each(function(e){e.get("categories")[0]===n&&a.push(e)}),(s=r.findIndex({name:"happy_addons_category"}))&&r.add({name:"happy_addons_pro_category",title:"Happy Addons Pro",icon:"hm hm-happyaddons",defaultActive:!1,sort:!0,hideIfEmpty:!0,items:a,promotion:!1},{at:s+1}),e.elements.view=t.extend({childView:t.prototype.childView.extend(r={className:function(){var e=this.constructor.__super__.className.call(this);return!this.isEditable()&&this.isHappyWidget()&&(e+=" ha-element--promotion"),e},isHappyWidget:function(){var e=this.model.get("name");return null!=e&&0===e.indexOf("ha-")},onMouseDown:function(){this.isHappyWidget()?elementor.promotion.showDialog({title:haGetTranslated("promotionDialogHeader",[this.model.get("title")]),content:haGetTranslated("promotionDialogMessage",[this.model.get("title")]),targetElement:this.el,position:{blockStart:"-7"},actionButton:{url:"https://happyaddons.com/pricing/?utm_source=ha-editor-pro-widgets&utm_medium=wp-elementor-editor&utm_campaign=ha-upgrade-pro",text:HappyAddonsEditor.i18n.promotionDialogBtnTxt,classes:["elementor-button","ha-btn--promotion","go-pro"]}}):this.constructor.__super__.onMouseDown.call(this)}})}),e.categories.view=o.extend({childView:o.prototype.childView.extend({childView:o.prototype.childView.prototype.childView.extend(r)})})),e});var e=elementor.modules.controls.Select2.extend({onBeforeRender:function(){var n,o;!this.container||"section"!==this.container.type&&"container"!==this.container.type||(n=elementor.widgetsCache||elementor.config.widgets,o={},"section"===this.container.type&&this.container.children.forEach(function(e){e.view.$childViewContainer.children("[data-widget_type]").each(function(e,t){t=(t=i(t).data("widget_type")).slice(0,t.lastIndexOf(".")),t=!_.isUndefined(n[t])&&n[t];t&&(o[t.widget_type]=t.title+" ("+t.widget_type+")")})}),"container"===this.container.type&&(this.container.children.some(function(e){return 0==e.view.children.length&&e.view.children.length,0==e.view.children.length}),this.container.children.forEach(function(e){("widget"==e.view.$el.data("element_type")?e.view.$el:e.view.$el.find('div[data-element_type="widget"]')).each(function(e,t){"widget"==i(t).data("element_type")&&(t=(t=i(t).data("widget_type")).slice(0,t.lastIndexOf(".")),t=!_.isUndefined(n[t])&&n[t])&&(o[t.widget_type]=t.title+" ("+t.widget_type+")")})})),this.model.set("options",o))}}),e=(elementor.addControlView("widget-list",e),elementor.modules.controls.BaseData.extend({getSelect2Placeholder:function(){return this.ui.select.children('option:first[value=""]').text()||this.model.get("placeholder")},getDependencyArgs:function(){var n=this,o=n.model.get("dynamic_params");return(o=_.isObject(o)?o:{}).control_dependency&&_.isObject(o.control_dependency)&&_.each(o.control_dependency,function(e,t){o[t]=n.container.settings.get(e)}),o},getSelect2DefaultOptions:function(){var t=this;return{allowClear:!0,placeholder:this.getSelect2Placeholder(),dir:elementorCommon.config.isRTL?"rtl":"ltr",minimumInputLength:1,ajax:{url:ajaxurl,dataType:"json",method:"POST",delay:250,data:function(e){e={nonce:HappyAddonsEditor.editor_nonce,action:"ha_process_dynamic_select",object_type:"post",query_term:e.term};return i.extend(e,t.model.get("dynamic_params"),t.getDependencyArgs())},processResults:function(e){var n;return e.success&&0!==e.data.length?(n=[],_.each(e.data,function(e,t){n.push({id:t,text:e})}),{results:n}):{results:[{id:-1,text:"No results found",disabled:!0}]}},cache:!0}}},getSelect2Options:function(){return i.extend(this.getSelect2DefaultOptions(),this.model.get("select2options"))},addLoadingSpinner:function(){this.$el.find(".elementor-control-title").after('<span class="elementor-control-spinner">&nbsp;<i class="eicon-spinner eicon-animation-spin"></i>&nbsp;</span>')},onBeforeRender:function(){var n,e;this.isRendered||(e=(n=this).getControlValue(),_.isEmpty(e))||(_.isArray(e)||(e=[e]),e={nonce:HappyAddonsEditor.editor_nonce,action:"ha_process_dynamic_select",object_type:"post",saved_values:e},i.ajax({url:ajaxurl,type:"POST",data:i.extend(e,n.model.get("dynamic_params"),n.getDependencyArgs()),beforeSend:n.addLoadingSpinner.bind(this),success:function(e){var t;e.success&&0!==e.data.length&&(t=_.keys(e.data).map(function(e){return" "+i.trim(e)}),n.container.settings.set(n.model.get("name"),t),n.model.set("options",e.data),n.render())}}))},applySavedValue:function(){elementor.modules.controls.BaseData.prototype.applySavedValue.apply(this,arguments),this.ui.select.data("select2")?this.ui.select.trigger("change"):(this.ui.select.select2(this.getSelect2Options()),this.model.get("sortable")&&this.initSortable())},initSortable:function(){var e=this.$el.find("ul.select2-selection__rendered"),t=this;e.sortable({containment:"parent",update:function(){t._orderSortedOption(e),t.container.settings.setExternalChange(t.model.get("name"),t.ui.select.val()),t.model.set("options",t.ui.select.val())}})},_orderSortedOption:function(e){var o=this;e.children("li[title]").each(function(e,t){var n=o.ui.select.children("option").filter(function(){return i(this).html()==t.title});o._moveOptionToEnd(n)})},_moveOptionToEnd:function(e){var t=e.parent();e.detach(),t.append(e)},onBeforeDestroy:function(){this.ui.select.select2("destroy"),this.$el.remove()}}));elementor.addControlView("ha_advanced_select2",e)})(jQuery);
     1(a=>{window.haHasIconLibrary=function(){return elementor.helpers&&elementor.helpers.renderIcon},window.haGetFeatureLabel=function(e){var t=document.createElement("DIV");return t.innerHTML=e,20<(e=t.textContent||t.innerText||e).length?e.substring(0,20)+"...":e},window.haGetTranslated=function(e,t){return elementorCommon.translate(e,null,t,HappyAddonsEditor.i18n)},window.haGetButtonWithIcon=function(e,t){var n,o,i,a,r,s=[];if(t=t||{},t=_.defaults(t,{oldIcon:"button_icon",iconPos:"button_icon_position",newIcon:"button_selected_icon",text:"button_text",link:"button_link",class:"ha-btn ha-btn--link",textClass:"ha-btn-text"}),_.isObject(e)){var l=e.model.attributes.settings.toJSON(),d=_.isUndefined(l[t.text])?"":l[t.text],c=!(_.isUndefined(l[t.oldIcon])||!l[t.oldIcon]),p=!(_.isUndefined(l[t.newIcon])||!_.isObject(l[t.newIcon])||!l[t.newIcon].value);if(d||p||c)return haHasIconLibrary()&&(n=elementor.helpers.renderIcon(e,l[t.newIcon],{"aria-hidden":!0,class:"ha-btn-icon"},"i","object"),o=elementor.helpers.isIconMigrated(l,t.newIcon)),e.addInlineEditingAttributes(t.text,"none"),e.addRenderAttribute(t.text,"class",t.textClass),e.addRenderAttribute("button","class",t.class),e.addRenderAttribute("button","href",l[t.link].url),(p||c)&&(haHasIconLibrary()&&n&&n.rendered&&(!c||o)?i="svg"===l[t.newIcon].library?'<span class="ha-btn-icon ha-btn-icon--svg">'+n.value+"</span>":n.value:c&&(i='<i class="ha-btn-icon '+t.oldIcon+'" aria-hidden="true"></i>')),!d||p||c?d||!p&&!c?d&&(p||c)&&("before"===l[t.iconPos]?(e.addRenderAttribute("button","class","ha-btn--icon-before"),a=i,r="<span "+e.getRenderAttributeString(t.text)+">"+d+"</span>"):(e.addRenderAttribute("button","class","ha-btn--icon-after"),r=i,a="<span "+e.getRenderAttributeString(t.text)+">"+d+"</span>"),s=["<a "+e.getRenderAttributeString("button")+">",a,r,"</a>"]):s=["<a "+e.getRenderAttributeString("button")+">",i,"</a>"]:s=["<a "+e.getRenderAttributeString("button")+">","<span "+e.getRenderAttributeString(t.text)+">",d,"</span>","</a>"],s.join("")}},elementor.on("panel:init",function(){function n(e){var t=Object.entries(this.model.changed)[0],n=(this.getSettings().settings,this.model.attributes),e={check:"sttMessage",changeValue:e,changeItem:t};"ha_scroll_to_top_single_disable"!=t[0]?(t={enable_global_stt:n.ha_scroll_to_top_global,media_type:n.ha_scroll_to_top_media_type,icon:n.ha_scroll_to_top_button_icon,image:n.ha_scroll_to_top_button_image,text:n.ha_scroll_to_top_button_text},e=Object.assign(e,t)):$e.run("document/save/update").then(_.debounce(function(){elementor.reloadPreview()},1500)),a("#elementor-preview-iframe")[0].contentWindow.postMessage(e)}a("#elementor-panel-elements-search-input").on("keyup",_.debounce(function(){a("#elementor-panel-elements").find(".hm").parents(".elementor-element").addClass("is-ha-widget")},100));function o(e){var t=Object.entries(this.model.changed)[0],n=(this.getSettings().settings,this.model.attributes),e={check:"rpbMessage",changeValue:e,changeItem:t};"ha_rpb_enable"!=t[0]&&(n={ha_rpb_enable:n.ha_rpb_enable,ha_rpb_apply_globally:n.ha_rpb_apply_globally,ha_rpb_type:n.ha_rpb_type,ha_rpb_horizontal_position:n.ha_rpb_horizontal_position,ha_rpb_vertical_position:n.ha_rpb_vertical_position,ha_rpb_single_disable:n.ha_rpb_single_disable,ha_rpb_single_enable:n.ha_rpb_single_enable},e=Object.assign(e,n)),"ha_rpb_single_enable"!=t[0]&&"ha_rpb_single_disable"!=t[0]||$e.run("document/save/update").then(_.debounce(function(){elementor.reloadPreview()},1500)),a("#elementor-preview-iframe")[0].contentWindow.postMessage(e)}a.each(["ha_scroll_to_top_global","ha_scroll_to_top_media_type","ha_scroll_to_top_button_icon","ha_scroll_to_top_button_image","ha_scroll_to_top_button_text","ha_scroll_to_top_single_disable"],function(e,t){elementor.settings.page.addChangeCallback(t,n)});var e,i;a.each(["ha_rpb_enable","ha_rpb_apply_globally","ha_rpb_type","ha_rpb_horizontal_position","ha_rpb_vertical_position","ha_rpb_single_disable","ha_rpb_single_enable"],function(e,t){elementor.settings.page.addChangeCallback(t,o)}),"undefined"==typeof $e&&null===$e||(e={callback:function(){var e=elementor.settings.page.model.attributes.ha_grid;""===e?elementor.settings.page.model.setExternalChange("ha_grid","yes"):"yes"===e&&elementor.settings.page.model.setExternalChange("ha_grid","")}},$e.shortcuts.register("ctrl+shift+g",e),$e.shortcuts.register("cmd+shift+g",e)),(i=a("#"+(e="happy-addons-editor-dark-css"))).length||(i=a("<link>",{id:e,rel:"stylesheet",href:HappyAddonsEditor.dark_stylesheet_url})),elementor.settings.editorPreferences.model.on("change:ui_theme",function(e,t){"light"===t?i.remove():i.attr("media","auto"===t?"(prefers-color-scheme: dark)":"").appendTo(elementorCommon.elements.$body)})}),elementor.hooks.addFilter("panel/elements/regionViews",function(e){var n,t,o,i,a,r,s;return HappyAddonsEditor.hasPro||_.isEmpty(HappyAddonsEditor.placeholder_widgets)||(n="happy_addons_pro",t=e.elements.view,o=e.categories.view,i=e.elements.options.collection,r=e.categories.options.collection,a=[],_.each(HappyAddonsEditor.placeholder_widgets,function(e,t){i.add({name:"ha-"+t,title:e.title,icon:e.icon,categories:[n],editable:!1})}),i.each(function(e){e.get("categories")[0]===n&&a.push(e)}),(s=r.findIndex({name:"happy_addons_category"}))&&r.add({name:"happy_addons_pro_category",title:"Happy Addons Pro",icon:"hm hm-happyaddons",defaultActive:!1,sort:!0,hideIfEmpty:!0,items:a,promotion:!1},{at:s+1}),e.elements.view=t.extend({childView:t.prototype.childView.extend(r={className:function(){var e=this.constructor.__super__.className.call(this);return!this.isEditable()&&this.isHappyWidget()&&(e+=" ha-element--promotion"),e},isHappyWidget:function(){var e=this.model.get("name");return null!=e&&0===e.indexOf("ha-")},onMouseDown:function(){this.isHappyWidget()?elementor.promotion.showDialog({title:haGetTranslated("promotionDialogHeader",[this.model.get("title")]),content:haGetTranslated("promotionDialogMessage",[this.model.get("title")]),targetElement:this.el,position:{blockStart:"-7"},actionButton:{url:"https://happyaddons.com/pricing/?utm_source=ha-editor-pro-widgets&utm_medium=wp-elementor-editor&utm_campaign=ha-upgrade-pro",text:HappyAddonsEditor.i18n.promotionDialogBtnTxt,classes:["elementor-button","ha-btn--promotion","go-pro"]}}):this.constructor.__super__.onMouseDown.call(this)}})}),e.categories.view=o.extend({childView:o.prototype.childView.extend({childView:o.prototype.childView.prototype.childView.extend(r)})})),e});var e=elementor.modules.controls.Select2.extend({onBeforeRender:function(){var n,o;!this.container||"section"!==this.container.type&&"container"!==this.container.type||(n=elementor.widgetsCache||elementor.config.widgets,o={},"section"===this.container.type&&this.container.children.forEach(function(e){e.view.$childViewContainer.children("[data-widget_type]").each(function(e,t){t=(t=a(t).data("widget_type")).slice(0,t.lastIndexOf(".")),t=!_.isUndefined(n[t])&&n[t];t&&(o[t.widget_type]=t.title+" ("+t.widget_type+")")})}),"container"===this.container.type&&(this.container.children.some(function(e){return 0==e.view.children.length&&e.view.children.length,0==e.view.children.length}),this.container.children.forEach(function(e){("widget"==e.view.$el.data("element_type")?e.view.$el:e.view.$el.find('div[data-element_type="widget"]')).each(function(e,t){"widget"==a(t).data("element_type")&&(t=(t=a(t).data("widget_type")).slice(0,t.lastIndexOf(".")),t=!_.isUndefined(n[t])&&n[t])&&(o[t.widget_type]=t.title+" ("+t.widget_type+")")})})),this.model.set("options",o))}}),e=(elementor.addControlView("widget-list",e),elementor.modules.controls.BaseData.extend({getSelect2Placeholder:function(){return this.ui.select.children('option:first[value=""]').text()||this.model.get("placeholder")},getDependencyArgs:function(){var n=this,o=n.model.get("dynamic_params");return(o=_.isObject(o)?o:{}).control_dependency&&_.isObject(o.control_dependency)&&_.each(o.control_dependency,function(e,t){o[t]=n.container.settings.get(e)}),o},getSelect2DefaultOptions:function(){var t=this;return{allowClear:!0,placeholder:this.getSelect2Placeholder(),dir:elementorCommon.config.isRTL?"rtl":"ltr",minimumInputLength:1,ajax:{url:ajaxurl,dataType:"json",method:"POST",delay:250,data:function(e){e={nonce:HappyAddonsEditor.editor_nonce,action:"ha_process_dynamic_select",object_type:"post",query_term:e.term};return a.extend(e,t.model.get("dynamic_params"),t.getDependencyArgs())},processResults:function(e){var n;return e.success&&0!==e.data.length?(n=[],_.each(e.data,function(e,t){n.push({id:t,text:e})}),{results:n}):{results:[{id:-1,text:"No results found",disabled:!0}]}},cache:!0}}},getSelect2Options:function(){return a.extend(this.getSelect2DefaultOptions(),this.model.get("select2options"))},addLoadingSpinner:function(){this.$el.find(".elementor-control-title").after('<span class="elementor-control-spinner">&nbsp;<i class="eicon-spinner eicon-animation-spin"></i>&nbsp;</span>')},onBeforeRender:function(){var n,e;this.isRendered||(e=(n=this).getControlValue(),_.isEmpty(e))||(_.isArray(e)||(e=[e]),e={nonce:HappyAddonsEditor.editor_nonce,action:"ha_process_dynamic_select",object_type:"post",saved_values:e},a.ajax({url:ajaxurl,type:"POST",data:a.extend(e,n.model.get("dynamic_params"),n.getDependencyArgs()),beforeSend:n.addLoadingSpinner.bind(this),success:function(e){var t;e.success&&0!==e.data.length&&(t=_.keys(e.data).map(function(e){return" "+a.trim(e)}),n.container.settings.set(n.model.get("name"),t),n.model.set("options",e.data),n.render())}}))},applySavedValue:function(){elementor.modules.controls.BaseData.prototype.applySavedValue.apply(this,arguments),this.ui.select.data("select2")?this.ui.select.trigger("change"):(this.ui.select.select2(this.getSelect2Options()),this.model.get("sortable")&&this.initSortable())},initSortable:function(){var e=this.$el.find("ul.select2-selection__rendered"),t=this;e.sortable({containment:"parent",update:function(){t._orderSortedOption(e),t.container.settings.setExternalChange(t.model.get("name"),t.ui.select.val()),t.model.set("options",t.ui.select.val())}})},_orderSortedOption:function(e){var o=this;e.children("li[title]").each(function(e,t){var n=o.ui.select.children("option").filter(function(){return a(this).html()==t.title});o._moveOptionToEnd(n)})},_moveOptionToEnd:function(e){var t=e.parent();e.detach(),t.append(e)},onBeforeDestroy:function(){this.ui.select.select2("destroy"),this.$el.remove()}}));elementor.addControlView("ha_advanced_select2",e)})(jQuery);
  • happy-elementor-addons/trunk/assets/admin/js/template-elements.js

    r3124446 r3192129  
    1010  var modalTemplate = document.getElementById("tmpl-modal-template-condition");
    1111  var conditionTemplate = document.getElementById("tmpl-elementor-new-template");
    12   var templateType = "";
     12
     13  // var templateType = "";
    1314  var postId = 0;
    1415  var newConditions = [];
     
    1718    elementor.on("panel:init", function ($e) {
    1819      postId = elementor.config.document.id;
    19       handleHaTemplateType(postId);
     20      // handleHaTemplateType( postId );
    2021      getHaTemplateConds(postId);
    21       elementor.getPanelView().footer.currentView.addSubMenuItem("saver-options", {
    22         before: "save-draft",
    23         name: "haconditions",
    24         icon: "ha-template-elements",
    25         title: "Template Conditions",
    26         callback: function callback() {
    27           return elementor.trigger("ha:templateCondition");
    28         }
    29       });
    30     });
    31     elementor.channels.editor.on("elementorThemeBuilder:ApplyPreview", function ($e) {
    32       handleHaTemplateType(postId);
    33     });
     22      if ('loop-template' != haTemplateInfo.templateType) {
     23        elementor.getPanelView().footer.currentView.addSubMenuItem("saver-options", {
     24          before: "save-draft",
     25          name: "haconditions",
     26          icon: "ha-template-elements",
     27          title: "Template Conditions",
     28          callback: function callback() {
     29            return elementor.trigger("ha:templateCondition");
     30          }
     31        });
     32      }
     33    });
     34    // elementor.channels.editor.on(
     35    //  "elementorThemeBuilder:ApplyPreview",
     36    //  function ( $e ) {
     37    //      handleHaTemplateType( postId );
     38    //  }
     39    // );
    3440
    3541    //elementor.getPanelView().getHeaderView().setTitle('a');
     
    195201    newConditions = conditions;
    196202  }
    197   function handleHaTemplateType(id) {
    198     jQuery.ajax({
    199       url: ajaxurl,
    200       type: "get",
    201       dataType: "json",
    202       data: {
    203         nonce: HappyAddonsEditor.editor_nonce,
    204         action: "ha_cond_template_type",
    205         // AJAX action for admin-ajax.php
    206         post_id: id
    207       },
    208       success: function success(response) {
    209         if (response && response.data) {
    210           templateType = response.data;
    211         }
    212       }
    213     });
    214   }
     203
     204  // function handleHaTemplateType ( id ) {
     205  //    jQuery.ajax( {
     206  //        url: ajaxurl,
     207  //        type: "get",
     208  //        dataType: "json",
     209  //        data: {
     210  //            nonce: HappyAddonsEditor.editor_nonce,
     211  //            action: "ha_cond_template_type", // AJAX action for admin-ajax.php
     212  //            post_id: id,
     213  //        },
     214  //        success: function ( response ) {
     215  //            if ( response && response.data ) {
     216  //                templateType = response.data;
     217  //            }
     218  //        },
     219  //    } );
     220  // }
     221
    215222  function getHaTemplateConds(id) {
    216223    jQuery.ajax({
     
    328335  }
    329336  elementor.saver.on('after:save', function (data) {
    330     if (data.status != "inherit") {
     337    if (data.status != "inherit" && 'loop-template' != haTemplateInfo.templateType) {
    331338      elementor.trigger("ha:templateCondition");
    332339    }
  • happy-elementor-addons/trunk/assets/admin/js/template-elements.min.js

    r3142844 r3192129  
    1 function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var a;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(a="Object"===(a={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:a)||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=Array(t);a<t;a++)n[a]=e[a];return n}function _iterableToArrayLimit(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,o,r,i,l=[],d=!0,c=!1;try{if(r=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;d=!1}else for(;!(d=(n=r.call(a)).done)&&(l.push(n.value),l.length!==t);d=!0);}catch(e){c=!0,o=e}finally{try{if(!d&&null!=a.return&&(i=a.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}function _arrayWithHoles(e){if(Array.isArray(e))return e}(d=>{var e=document.getElementById("tmpl-modal-template-condition"),n=document.getElementById("tmpl-elementor-new-template"),a=0,t=[],o="";function r(e){jQuery.ajax({url:ajaxurl,type:"get",dataType:"json",data:{nonce:HappyAddonsEditor.editor_nonce,action:"ha_cond_template_type",post_id:e},success:function(e){e&&e.data&&e.data}})}"undefined"!=typeof elementor&&(elementor.on("panel:init",function(e){var t;r(a=elementor.config.document.id),t=a,jQuery.ajax({url:ajaxurl,type:"get",dataType:"json",data:{nonce:HappyAddonsEditor.editor_nonce,action:"ha_cond_get_current",template_id:t},success:function(e){e&&e.data&&(o=e.data)}}),elementor.getPanelView().footer.currentView.addSubMenuItem("saver-options",{before:"save-draft",name:"haconditions",icon:"ha-template-elements",title:"Template Conditions",callback:function(){return elementor.trigger("ha:templateCondition")}})}),elementor.channels.editor.on("elementorThemeBuilder:ApplyPreview",function(e){r(a)}),elementor.on("set:page",function(e){})),d("body").append(e.innerHTML),"undefined"!=typeof elementor&&(elementor.on("ha:templateCondition",function(e){var t=d(".ha-template-condition-wrap");""==t.html()&&(t.append(o),t.find("select").trigger("change")),d(".ha-template-notice").removeClass("error").text(""),MicroModal.show("modal-new-template-condition")}),elementor.on("ha:templateConditionChange",function(e){var o;o=[],d(".ha-template-condition-wrap").find(".ha-template-condition-item").each(function(){var e=d(this).find(".ha-tce-type select").val(),t=d(this).find(".ha-tce-name select").val(),a=d(this).find(".ha-tce-sub_name select").val(),n=d(this).find(".ha-tce-sub_id select").val(),e=e+"/"+t;a&&(e+="/"+a),n&&(e+="/"+n.trim()),o.push(e)}),t=o})),d(document).on("click",".ha-cond-repeater-add",function(){var e,t=d(".ha-template-condition-wrap"),a=(e=n.innerHTML,a=Math.random().toString(36).replace("0.",""),e=e.replace(/{{([^{}]+)}}/g,a));t.append(a),elementor.trigger("ha:templateConditionChange")}),d(document).on("click",".ha-template-condition-remove",function(){d(this).parent().remove(),elementor.trigger("ha:templateConditionChange")}),d(document).on("click","#ha-template-save-data",function(){var e;(e=document.getElementById("elementor-panel-saver-button-publish")).classList.add("elementor-button-state"),a=elementor.config.document.id,jQuery.ajax({url:ajaxurl,type:"post",dataType:"json",data:{nonce:HappyAddonsEditor.editor_nonce,action:"ha_condition_update",conds:t,template_id:a},success:function(e){e&&(!e.success&&e.hasOwnProperty("data")&&e.data.hasOwnProperty("msg")?d(".ha-template-notice").addClass("error").text(e.data.msg):(MicroModal.close("modal-new-template-condition"),d(".ha-template-notice").removeClass("error").text("")))}}),setTimeout(function(){e.classList.remove("elementor-button-state")},500)}),d(document).on("change",".ha-template-condition-wrap select",function(e){var t,a,n,o,r,i,l;"select"==e.target.localName&&(n=e.target.dataset.parent,t=e.target.dataset.setting,e=e.target.value,d("[data-id='type-"+n+"']"),a=d("[data-id='name-"+n+"']"),r=d("[data-id='sub_name-"+n+"']"),n=d("[data-id='sub_id-"+n+"']"),"name"==t&&("general"==e?(r.parent().hide(),n.parent().hide()):(r.parent().show(),o=r.data("selected")?r.data("selected"):"",((t,e,a)=>{jQuery.ajax({url:ajaxurl,type:"get",dataType:"json",data:{nonce:HappyAddonsEditor.editor_nonce,action:"ha_condition_autocomplete",object_type:e},success:function(e){e&&e.data&&(e=((e,t)=>{for(var a="",n=0,o=Object.entries(e);n<o.length;n++){var r=_slicedToArray(o[n],2),i=r[0],r=r[1];if(r.hasOwnProperty("type")){a+="<optgroup label='"+r.title+"'>";for(var l=0,d=Object.entries(r.conditions);l<d.length;l++){var c=_slicedToArray(d[l],2),s=c[0],c=c[1],p=c.is_pro,u=c.title,m="";p&&(u+=" [Pro]",m=" disabled"),a+="<option value='"+(h=s)+"' "+m+(t==h?" selected":"")+">"+u+"</option>"}a+="</optgroup>"}else{var h,p=r.is_pro,u=r.title,m="";p&&(u+=" [Pro]",m=" disabled"),a+="<option value='"+(h=i)+"' "+m+(t==h?" selected":"")+">"+u+"</option>"}}return a})(e.data,a),t.html(e))}})})(r,a.val(),o))),"sub_name"==t)&&((r={post:"post",in_category:"category",in_category_children:"category",in_post_tag:"post_tag",post_by_author:"author",page:"page",page_by_author:"author",child_of:"page",any_child_of:"page",by_author:"author"}).hasOwnProperty(e)?(n.parent().show(),i=r[e],l=e,["post","page"].includes(i)&&(l=i,i="post"),["category","post_tag"].includes(i)&&(l=i,i="tax"),n.select2({ajax:{url:ajaxurl,dataType:"json",delay:250,data:function(e){return{nonce:HappyAddonsEditor.editor_nonce,action:"ha_condition_autocomplete",q:e.term,object_type:i,object_term:l}},processResults:function(e){var a;return e.success&&0!==e.data.length?(a=[],_.each(e.data,function(e,t){a.push({id:t,text:e})}),{results:a}):{results:[{id:-1,text:"No results found",disabled:!0}]}}},minimumInputLength:2,cache:!0,placeholder:"All",allowClear:!0,dropdownCssClass:"ha-template-condition-dropdown"})):n.parent().hide()),elementor.trigger("ha:templateConditionChange")}),elementor.saver.on("after:save",function(e){"inherit"!=e.status&&elementor.trigger("ha:templateCondition")})})(jQuery);
     1function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var a;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(a="Object"===(a={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:a)||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=Array(t);a<t;a++)n[a]=e[a];return n}function _iterableToArrayLimit(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,o,r,i,l=[],d=!0,c=!1;try{if(r=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;d=!1}else for(;!(d=(n=r.call(a)).done)&&(l.push(n.value),l.length!==t);d=!0);}catch(e){c=!0,o=e}finally{try{if(!d&&null!=a.return&&(i=a.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}function _arrayWithHoles(e){if(Array.isArray(e))return e}(d=>{var e=document.getElementById("tmpl-modal-template-condition"),n=document.getElementById("tmpl-elementor-new-template"),a=0,t=[],o="";"undefined"!=typeof elementor&&(elementor.on("panel:init",function(e){var t;a=elementor.config.document.id,t=a,jQuery.ajax({url:ajaxurl,type:"get",dataType:"json",data:{nonce:HappyAddonsEditor.editor_nonce,action:"ha_cond_get_current",template_id:t},success:function(e){e&&e.data&&(o=e.data)}}),"loop-template"!=haTemplateInfo.templateType&&elementor.getPanelView().footer.currentView.addSubMenuItem("saver-options",{before:"save-draft",name:"haconditions",icon:"ha-template-elements",title:"Template Conditions",callback:function(){return elementor.trigger("ha:templateCondition")}})}),elementor.on("set:page",function(e){})),d("body").append(e.innerHTML),"undefined"!=typeof elementor&&(elementor.on("ha:templateCondition",function(e){var t=d(".ha-template-condition-wrap");""==t.html()&&(t.append(o),t.find("select").trigger("change")),d(".ha-template-notice").removeClass("error").text(""),MicroModal.show("modal-new-template-condition")}),elementor.on("ha:templateConditionChange",function(e){var o;o=[],d(".ha-template-condition-wrap").find(".ha-template-condition-item").each(function(){var e=d(this).find(".ha-tce-type select").val(),t=d(this).find(".ha-tce-name select").val(),a=d(this).find(".ha-tce-sub_name select").val(),n=d(this).find(".ha-tce-sub_id select").val(),e=e+"/"+t;a&&(e+="/"+a),n&&(e+="/"+n.trim()),o.push(e)}),t=o})),d(document).on("click",".ha-cond-repeater-add",function(){var e,t=d(".ha-template-condition-wrap"),a=(e=n.innerHTML,a=Math.random().toString(36).replace("0.",""),e=e.replace(/{{([^{}]+)}}/g,a));t.append(a),elementor.trigger("ha:templateConditionChange")}),d(document).on("click",".ha-template-condition-remove",function(){d(this).parent().remove(),elementor.trigger("ha:templateConditionChange")}),d(document).on("click","#ha-template-save-data",function(){var e;(e=document.getElementById("elementor-panel-saver-button-publish")).classList.add("elementor-button-state"),a=elementor.config.document.id,jQuery.ajax({url:ajaxurl,type:"post",dataType:"json",data:{nonce:HappyAddonsEditor.editor_nonce,action:"ha_condition_update",conds:t,template_id:a},success:function(e){e&&(!e.success&&e.hasOwnProperty("data")&&e.data.hasOwnProperty("msg")?d(".ha-template-notice").addClass("error").text(e.data.msg):(MicroModal.close("modal-new-template-condition"),d(".ha-template-notice").removeClass("error").text("")))}}),setTimeout(function(){e.classList.remove("elementor-button-state")},500)}),d(document).on("change",".ha-template-condition-wrap select",function(e){var t,a,n,o,r,i,l;"select"==e.target.localName&&(n=e.target.dataset.parent,t=e.target.dataset.setting,e=e.target.value,d("[data-id='type-"+n+"']"),a=d("[data-id='name-"+n+"']"),r=d("[data-id='sub_name-"+n+"']"),n=d("[data-id='sub_id-"+n+"']"),"name"==t&&("general"==e?(r.parent().hide(),n.parent().hide()):(r.parent().show(),o=r.data("selected")?r.data("selected"):"",((t,e,a)=>{jQuery.ajax({url:ajaxurl,type:"get",dataType:"json",data:{nonce:HappyAddonsEditor.editor_nonce,action:"ha_condition_autocomplete",object_type:e},success:function(e){e&&e.data&&(e=((e,t)=>{for(var a="",n=0,o=Object.entries(e);n<o.length;n++){var r=_slicedToArray(o[n],2),i=r[0],r=r[1];if(r.hasOwnProperty("type")){a+="<optgroup label='"+r.title+"'>";for(var l=0,d=Object.entries(r.conditions);l<d.length;l++){var c=_slicedToArray(d[l],2),s=c[0],c=c[1],p=c.is_pro,u=c.title,m="";p&&(u+=" [Pro]",m=" disabled"),a+="<option value='"+(h=s)+"' "+m+(t==h?" selected":"")+">"+u+"</option>"}a+="</optgroup>"}else{var h,p=r.is_pro,u=r.title,m="";p&&(u+=" [Pro]",m=" disabled"),a+="<option value='"+(h=i)+"' "+m+(t==h?" selected":"")+">"+u+"</option>"}}return a})(e.data,a),t.html(e))}})})(r,a.val(),o))),"sub_name"==t)&&((r={post:"post",in_category:"category",in_category_children:"category",in_post_tag:"post_tag",post_by_author:"author",page:"page",page_by_author:"author",child_of:"page",any_child_of:"page",by_author:"author"}).hasOwnProperty(e)?(n.parent().show(),i=r[e],l=e,["post","page"].includes(i)&&(l=i,i="post"),["category","post_tag"].includes(i)&&(l=i,i="tax"),n.select2({ajax:{url:ajaxurl,dataType:"json",delay:250,data:function(e){return{nonce:HappyAddonsEditor.editor_nonce,action:"ha_condition_autocomplete",q:e.term,object_type:i,object_term:l}},processResults:function(e){var a;return e.success&&0!==e.data.length?(a=[],_.each(e.data,function(e,t){a.push({id:t,text:e})}),{results:a}):{results:[{id:-1,text:"No results found",disabled:!0}]}}},minimumInputLength:2,cache:!0,placeholder:"All",allowClear:!0,dropdownCssClass:"ha-template-condition-dropdown"})):n.parent().hide()),elementor.trigger("ha:templateConditionChange")}),elementor.saver.on("after:save",function(e){"inherit"!=e.status&&"loop-template"!=haTemplateInfo.templateType&&elementor.trigger("ha:templateCondition")})})(jQuery);
  • happy-elementor-addons/trunk/assets/admin/js/wizard.js

    r3187401 r3192129  
    6666    fetchWidgetData: function fetchWidgetData() {
    6767      var _this = this;
    68       return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
     68      return _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
    6969        var url;
    7070        return _regeneratorRuntime().wrap(function _callee$(_context) {
     
    9797    fetchCache: function fetchCache() {
    9898      var _this2 = this;
    99       return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
     99      return _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
    100100        var url;
    101101        return _regeneratorRuntime().wrap(function _callee2$(_context2) {
     
    150150    fetchPreset: function fetchPreset(userType) {
    151151      var _this3 = this;
    152       return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
     152      return _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
    153153        var url;
    154154        return _regeneratorRuntime().wrap(function _callee3$(_context3) {
     
    185185      var _arguments = arguments,
    186186        _this4 = this;
    187       return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
     187      return _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
    188188        var mode, url, data;
    189189        return _regeneratorRuntime().wrap(function _callee4$(_context4) {
     
    237237    },
    238238    endWizard: function endWizard() {
    239       return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
     239      return _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
    240240        var agee, url;
    241241        return _regeneratorRuntime().wrap(function _callee5$(_context5) {
  • happy-elementor-addons/trunk/changelog.txt

    r3187401 r3192129  
     1= 3.14.0 - 19 November 2024 =
     2
     3- New:  Reading Progress Bar feature.
     4- Tweak: Url support for 'post title' widget
     5- Tweak: Url support for 'page title' widget
     6- Tweak: Url support for 'post featured image' widget
     7- Tweak: Some improvement on 'post content' widget
     8- Tweak: Some improvement on 'post excerpt' widget
     9
    110= 3.13.0 - 13 November 2024 =
    211
  • happy-elementor-addons/trunk/classes/admin-bar.php

    r3011757 r3192129  
    5858        wp_enqueue_script(
    5959            'micromodal',
    60             '//unpkg.com/micromodal/dist/micromodal.min.js',
     60            HAPPY_ADDONS_ASSETS . 'vendor/micromodal/micromodal.min.js',
    6161            [],
    6262            HAPPY_ADDONS_VERSION,
  • happy-elementor-addons/trunk/classes/condition-manager.php

    r3165644 r3192129  
    6363
    6464    public function get_name($cond) {
    65         return $this->all_conds_list[$cond]['title'];
     65        return $this->all_conds_list[$cond]['title'] ?? '';
    6666    }
    6767
    6868    public function get_all_name($cond) {
    69         return $this->all_conds_list[$cond]['all_label'];
     69        return $this->all_conds_list[$cond]['all_label'] ?? '';
    7070    }
    7171
  • happy-elementor-addons/trunk/classes/conditions-cache.php

    r2846596 r3192129  
    9191        $this->clear();
    9292
    93         $document_types = array_keys(Theme_Builder::TEMPLATE_TYPE);
     93        $document_types = array_keys(Theme_Builder::get_template_types());
    9494
    9595        $post_types = [
  • happy-elementor-addons/trunk/classes/extensions-manager.php

    r3146956 r3192129  
    181181                'is_pro' => false,
    182182            ],
     183            'reading-progress-bar' => [
     184                'title' => __( 'Reading Progress Bar', 'happy-elementor-addons' ),
     185                'icon' => 'hm hm-reading-glass-alt',
     186                // 'demo' => 'https://happyaddons.com/text-reading-progress-bar/',
     187                'is_pro' => false,
     188            ],
    183189        ];
    184190    }
  • happy-elementor-addons/trunk/classes/notice.php

    r3154460 r3192129  
    88    public static function init() {
    99        if ( !( in_array( 'happy-elementor-addons-pro/happy-elementors-addons-pro.php', (array) get_option( 'active_plugins', [] ), true ) ) ) {
    10             // add_action( 'admin_init', [__CLASS__, 'ha_void_check_installation_time'] );
    11             // add_action( 'admin_init', [__CLASS__, 'ha_void_spare_me'], 5 );
     10            add_action( 'admin_init', [__CLASS__, 'ha_void_check_installation_time'] );
     11            add_action( 'admin_init', [__CLASS__, 'ha_void_spare_me'], 5 );
    1212        }
    1313    }
     
    1515    //check if the notice should be shown or not
    1616    public static function ha_void_check_installation_time() {
    17         $nobug = get_option( 'ha__user_feedback_survey', "0");
    18         if ($nobug == "not_interested" || $nobug == "participated") {
    19            return;
    20         }
     17        $feedback = get_option( 'ha__user_feedback_survey', "0");
     18        if ( 'not_interested' == $feedback || 'participated' == $feedback ) {
     19            //remove old option data
     20            delete_option( 'ha__user_feedback_survey' );
     21        }
     22
     23        $black_friday_notice = get_option( 'ha__black_friday_24_notice', "0");
     24        if ( 'not_interested' == $black_friday_notice ) {
     25            return;
     26        }
     27
     28        $start_utc = '2024-11-19 16:00:00'; // 19 November, 4 PM UTC
     29        $end_utc   = '2024-12-06 16:00:00';   // 6 December, 4 PM UTC
     30        if ( true != self::check_notice_period( $start_utc, $end_utc ) ) {
     31            return;
     32        }
    2133
    2234        add_action( 'admin_notices', [__CLASS__, 'ha_void_grid_display_admin_notice']);
    2335    }
     36
     37    public static function check_notice_period( $start_utc, $end_utc ) {
     38        // Get the current time in UTC
     39        $time_zone         = new \DateTimeZone( 'UTC' );
     40        $current_utc_time = new \DateTime( 'now', $time_zone );
     41        $current_time     = $current_utc_time->getTimestamp();
     42
     43        // Convert the start and end UTC timestamps to integers
     44        $start_time   = strtotime( $start_utc );
     45        $end_time     = strtotime( $end_utc );
     46
     47        // Check if the current time falls within the specified period
     48        if ( $current_time >= $start_time && $current_time <= $end_time ) {
     49            return true;
     50        }
     51        return false;
     52    }
    2453
    2554    /**
     
    4170                </div>
    4271                <div class="ha-review-notice__content">
    43                     <h3>Help Us Improve HappyAddons!</h3>
    44                     <p>Share your thoughts, and get exciting rewards! &#x1F389; We would love to hear your feedback on how we can improve your experience!</p>
     72                    <h3>Black Friday Cyber Monday Alert 🎉</h3>
     73                    <p>Upgrade your website design with premium widgets and features, at up to %s discount!</p>
    4574                    <div class="ha-review-notice__actions">
    46                         <a href="%s" class="ha-review-button ha-review-button--cta" target="_blank"><span>👍 Participate Here</span></a>
    47                         <a href="%s" class="ha-review-button ha-review-button--cta ha-review-button--outline"><span>🙌 Already Participated!</span></a>
     75                        <a href="%s" class="ha-review-button ha-review-button--cta" target="_blank"><span>👍 Save BIG Today</span></a>
    4876                        <a href="%s" class="ha-review-button ha-review-button--cta ha-review-button--error ha-review-button--outline"><span>💔 No Thanks</span></a>
    4977                    </div>
    5078                </div>
    51             </div>' ), esc_url( 'https://forms.gle/ZEi53PDcywKjUP2i9' ), $participated, $no_thanks );
     79            </div>' ), esc_html('50%'), esc_url( 'https://happyaddons.com/pricing/' ), $no_thanks );
    5280        }
    5381    }
     
    5684    public static function ha_void_spare_me() {
    5785        if ( isset( $_GET['ha_not_interested'] ) && ! empty( $_GET['ha_not_interested'] ) ) {
    58             $spare_me = absint($_GET['ha_not_interested']);
     86            $spare_me = absint( $_GET['ha_not_interested'] );
    5987            if ( 1 == $spare_me ) {
    60                 update_option( 'ha__user_feedback_survey', "not_interested" );
     88                update_option( 'ha__black_friday_24_notice', "not_interested" );
    6189            }
    6290        }
    6391
    64         if ( isset( $_GET['ha_participated'] ) && ! empty( $_GET['ha_participated'] ) ) {
    65             $ha_rated = absint($_GET['ha_participated']);
    66             if ( 1 == $ha_rated ) {
    67                 update_option( 'ha__user_feedback_survey', "participated" );
    68             }
    69         }
     92        // if ( isset( $_GET['ha_participated'] ) && ! empty( $_GET['ha_participated'] ) ) {
     93        //     $ha_rated = absint($_GET['ha_participated']);
     94        //     if ( 1 == $ha_rated ) {
     95        //         update_option( 'ha__user_feedback_survey', "participated" );
     96        //     }
     97        // }
    7098    }
    7199
  • happy-elementor-addons/trunk/classes/theme-builder.php

    r3133914 r3192129  
    2020
    2121    const CPT = 'ha_library';
    22     const TEMPLATE_TYPE = ['header' => 'Header', 'footer' => 'Footer', 'single' => 'Single', 'archive' => 'Archive'];
    2322    const TAB_BASE = "edit.php?post_type=ha_library";
    2423
     
    6463        add_action('happyaddons_theme_builder_render', array($this, 'single_blog_content_elementor'), 999);
    6564
     65        add_action( 'elementor/elements/categories_registered', [$this, 'add_elementor_widget_categories'] );
     66
    6667        // Register Ajax Handles
    6768        // add_action( 'wp_ajax_ha_cond_template_type', [$this, 'ha_get_template_type'] );
    6869    }
     70
     71    public function add_elementor_widget_categories( $elements_manager ) {
     72        if( self::CPT == get_post_type() ) {
     73            $elements_manager->add_category(
     74                'happy_addons_theme_builder',
     75                [
     76                    'title' => esc_html__( 'Happy Theme Builder', 'happy-elementor-addons' ),
     77                    'icon' => 'fa fa-plug',
     78                ]
     79            );
     80        }
     81    }
     82
     83    public static function get_template_types() {
     84        $template_types = [
     85            'header' => esc_html__('Header', 'happy-elementor-addons'),
     86            'footer' => esc_html__('Footer', 'happy-elementor-addons'),
     87            'single' => esc_html__('Single', 'happy-elementor-addons'),
     88            'archive' => esc_html__('Archive', 'happy-elementor-addons')
     89        ];
     90
     91        // return apply_filters('happyaddons_theme_builder_template_types', $template_types);
     92        return apply_filters('happyaddons/theme-builder/template-types', $template_types);
     93    }
    6994
    7095    public function add_query_vars_filter($vars) {
     
    129154        add_submenu_page(
    130155            Dashboard::PAGE_SLUG, // Parent slug
    131             'Theme Builder', // Page title
    132             'Theme Builder', // Menu title
     156            __('Theme Builder', 'happy-elementor-addons'), // Page title
     157            __('Theme Builder', 'happy-elementor-addons'), // Menu title
    133158            'manage_options', // Capability
    134159            'edit.php?post_type=ha_library',  // Slug
     
    195220                    </div>
    196221                    <div class="ha-admin-top-bar__main-area-buttons">
    197                         <a class="page-title-action" id="ha-template-library-add-new" href="http://ha.test/wp-admin/post-new.php?post_type=ha_library">Add New</a>
     222                        <a class="page-title-action" id="ha-template-library-add-new" href="<?php echo admin_url(); ?>post-new.php?post_type=ha_library">Add New</a>
    198223                    </div>
    199224                </div>
     
    223248            $isActive   = get_post_meta($post_id, '_ha_template_active', true);
    224249
    225             echo ucfirst($type);
     250            echo ucwords(str_replace('-', ' ', $type));
    226251
    227252            echo "<span id='htlt-", $post_id, "'>";
     
    238263        if ( 'condition' === $column_name ) {
    239264
    240             // generate display condition from document conditions
    241             $includeConditions     = [];
    242             $excludeConditions      = [];
    243 
    244             // get doc conditions
    245             $documentConditions    = $this->get_document_conditions($post_id);
    246 
    247             if( !empty( $documentConditions ) ) {
    248                 foreach( $documentConditions AS $key => $condition ) {
    249                     if( 'include' === $condition['type'] ) {
    250                         $sub_page_id            = !empty( $condition['sub_id'] ) ? '#' . get_the_title( $condition['sub_id'] ) : '';
    251                         $con_label              = !empty( $condition['sub_name'] ) && 'all' !== $condition['sub_name'] ? Condition_Manager::instance()->get_name($condition['sub_name']) . $sub_page_id : Condition_Manager::instance()->get_all_name($condition['name']);
    252                         $includeConditions[]    = $con_label;
    253                     } else if ( 'exclude' === $condition['type'] ) {
    254                         $sub_page_id        = !empty( $condition['sub_id'] ) ? '#' . get_the_title( $condition['sub_id'] ) : '';
    255                         $con_label          =  !empty( $condition['sub_name'] ) && 'all' !== $condition['sub_name'] ? Condition_Manager::instance()->get_name($condition['sub_name']) . $sub_page_id : Condition_Manager::instance()->get_all_name($condition['name']);
    256                         $excludeConditions[] = $con_label;
    257                     } else {
    258                         // not use this..
    259                     }
    260 
    261                 }
    262             }
    263 
    264             echo '<b>Include : </b> ' . implode( ', ', $includeConditions ) . '<br/>' . '<b>Exclude : </b> ' . implode( ', ', $excludeConditions );
    265 
     265            $type       = get_post_meta($post_id, '_ha_library_type', true);
     266
     267            if( 'loop-template' != $type ) {
     268                // generate display condition from document conditions
     269                $includeConditions     = [];
     270                $excludeConditions      = [];
     271   
     272                // get doc conditions
     273                $documentConditions    = $this->get_document_conditions($post_id);
     274   
     275                if( !empty( $documentConditions ) ) {
     276                    foreach( $documentConditions AS $key => $condition ) {
     277                        if( 'include' === $condition['type'] ) {
     278                            $sub_page_id            = !empty( $condition['sub_id'] ) ? '#' . get_the_title( $condition['sub_id'] ) : '';
     279                            $con_label              = !empty( $condition['sub_name'] ) && 'all' !== $condition['sub_name'] ? Condition_Manager::instance()->get_name($condition['sub_name']) . $sub_page_id : Condition_Manager::instance()->get_all_name($condition['name']);
     280                            $includeConditions[]    = $con_label;
     281                        } else if ( 'exclude' === $condition['type'] ) {
     282                            $sub_page_id        = !empty( $condition['sub_id'] ) ? '#' . get_the_title( $condition['sub_id'] ) : '';
     283                            $con_label          =  !empty( $condition['sub_name'] ) && 'all' !== $condition['sub_name'] ? Condition_Manager::instance()->get_name($condition['sub_name']) . $sub_page_id : Condition_Manager::instance()->get_all_name($condition['name']);
     284                            $excludeConditions[] = $con_label;
     285                        } else {
     286                            // not use this..
     287                        }
     288   
     289                    }
     290                }
     291   
     292                echo '<b>Include : </b> ' . implode( ', ', $includeConditions ) . '<br/>' . '<b>Exclude : </b> ' . implode( ', ', $excludeConditions );
     293            } else {
     294                echo '<b>Not Applicable</b>';   
     295            }
    266296        }
    267297    }
     
    274304            <a class="nav-tab <?= !($getActive) ? 'nav-tab-active' : ''; ?>" href="<?= admin_url(self::TAB_BASE) ?>">All</a>
    275305            <?php
    276             foreach (self::TEMPLATE_TYPE as $key => $value) {
     306            foreach (self::get_template_types() as $key => $value) {
    277307                $active = ($getActive == $key) ? 'nav-tab-active' : '';
    278308                $admin_filter_url = admin_url(self::TAB_BASE . '&ha_library_type=' . $key);
     
    908938            );
    909939
     940            wp_localize_script('happy-addons-template-elements', 'haTemplateInfo', [
     941                'postType' => self::CPT,
     942                'templateType' => get_post_meta(get_the_ID(), '_ha_library_type', true),
     943                'postId' => get_the_ID(),
     944            ]);
     945
    910946            wp_enqueue_script(
    911                 'happy-addons-micromodal',
    912                 'https://unpkg.com/[email protected]/dist/micromodal.js',
     947                'micromodal',
     948                HAPPY_ADDONS_ASSETS . 'vendor/micromodal/micromodal.min.js',
    913949                [],
    914950                HAPPY_ADDONS_VERSION,
     
    942978            switch ($tpl_type) {
    943979                case "header":
    944                     $title = "Header Settings";
     980                    $title = esc_html__('Header Settings', 'happy-elementor-addons');
    945981                    break;
    946982
    947983                case "footer":
    948                     $title = "Footer Settings";
     984                    $title = esc_html__('Footer Settings', 'happy-elementor-addons');
    949985                    break;
    950986
    951987                case "single":
    952                     $title = "Singular Settings";
     988                    $title = esc_html__('Single Settings', 'happy-elementor-addons');
    953989                    break;
    954990
    955991                case "archive":
    956                     $title = "Archive Settings";
     992                    $title = esc_html__('Archive Settings', 'happy-elementor-addons');
    957993                    break;
     994
     995                case "loop-template":
     996                    $title = esc_html__('Loop Template', 'happy-elementor-addons');
     997                    break;
    958998            }
    959999            $config['settings']['panelPage']['title'] = $title;
     
    9611001        return $config;
    9621002    }
    963 
    964     public function pr($data=[])
    965     {
    966         echo '<pre>';
    967         print_r($data);
    968         echo '</pre>';
    969     }
    9701003}
    9711004
  • happy-elementor-addons/trunk/plugin.php

    r3187401 r3192129  
    55 * Plugin URI: https://happyaddons.com/
    66 * Description: <a href="https://happyaddons.com/">Happy Addons for Elementor</a> Is the Best Elementor Addons Comes With 44+ Free Elementor Widgets Including Table Builder, Testimonial, Event Calendar,Slider,News Ticker, Image Grid, etc & Features Like Elementor Equal Height, Text Stroke, Shape Dividers, Floating Effect, Grid Layout, 500+ Elementor Icons, 450+ Template Packs & More.
    7  * Version: 3.13.0
     7 * Version: 3.14.0
    88 * Author: Leevio
    99 * Author URI: https://happyaddons.com/
     
    4343    define('HAPPY_ADDONS_VERSION', time() );
    4444} else {
    45     define('HAPPY_ADDONS_VERSION', '3.13.0');
     45    define('HAPPY_ADDONS_VERSION', '3.14.0');
    4646}
    4747define('HAPPY_ADDONS__FILE__', __FILE__);
  • happy-elementor-addons/trunk/readme.txt

    r3187401 r3192129  
    11=== Happy Addons for Elementor ===
    22Plugin Name: Happy Addons for Elementor
    3 Version: 3.13.0
     3Version: 3.14.0
    44Author: Leevio
    55Author URI: https://happyaddons.com/
     
    88Requires at least: 5.0
    99Tested up to: 6.7
    10 Stable tag: 3.13.0
     10Stable tag: 3.14.0
    1111Requires PHP: 7.4
    1212License: GPLv2
     
    270270== Changelog ==
    271271
    272 = 3.13.0- 13 November 2024 =
     272= 3.14.0 - 19 November 2024 =
     273
     274- New:  Reading Progress Bar feature.
     275
     276= 3.13.0 - 13 November 2024 =
    273277
    274278- New:  Liquid Hover Image widget.
  • happy-elementor-addons/trunk/templates/admin/edit-template-condition.php

    r2839315 r3192129  
    77}
    88
    9 $types    = Theme_Builder::TEMPLATE_TYPE;
     9$types    = Theme_Builder::get_template_types();
    1010$selected = get_query_var( 'ha_library_type' );
    1111
  • happy-elementor-addons/trunk/templates/admin/edit-template.php

    r2839315 r3192129  
    77}
    88
    9 $types = Theme_Builder::TEMPLATE_TYPE;
     9$types = Theme_Builder::get_template_types();
    1010$selected = get_query_var('ha_library_type');
    1111
  • happy-elementor-addons/trunk/templates/admin/new-template.php

    r2962491 r3192129  
    77}
    88
    9 $types    = Theme_Builder::TEMPLATE_TYPE;
     9$types    = Theme_Builder::get_template_types();
    1010$selected = get_query_var( 'ha_library_type' );
    1111
  • happy-elementor-addons/trunk/widgets/archive-posts/widget.php

    r3133914 r3192129  
    5454    public function get_keywords() {
    5555        return ['archive posts', 'posts', 'post', 'recent post'];
     56    }
     57
     58    public function get_categories() {
     59        return [ 'happy_addons_category', 'happy_addons_theme_builder' ];
    5660    }
    5761
  • happy-elementor-addons/trunk/widgets/archive-title/widget.php

    r3044937 r3192129  
    4747        return [ 'archive title', 'Title', 'text' ];
    4848    }
     49
     50    public function get_categories() {
     51        return [ 'happy_addons_category', 'happy_addons_theme_builder' ];
     52    }
    4953
    5054    /**
  • happy-elementor-addons/trunk/widgets/author-meta/widget.php

    r3044937 r3192129  
    4949        return [ 'author', 'author_meta', 'author info' ];
    5050    }
     51
     52    public function get_categories() {
     53        return [ 'happy_addons_category', 'happy_addons_theme_builder' ];
     54    }
    5155
    5256    /**
  • happy-elementor-addons/trunk/widgets/page-title/widget.php

    r3064385 r3192129  
    4848    }
    4949
     50    public function get_categories() {
     51        return [ 'happy_addons_category', 'happy_addons_theme_builder' ];
     52    }
     53
    5054    /**
    5155     * Register widget content controls
     
    146150        );
    147151
     152        $this->add_control(
     153            'enable_link', 
     154            [   
     155                'label' => esc_html__('Enable Link', 'happy-elementor-addons'),
     156                'type' => Controls_Manager::SWITCHER,   
     157                'label_on' => esc_html__('Yes', 'happy-elementor-addons'), 
     158                'label_off' => esc_html__('No', 'happy-elementor-addons'), 
     159                'return_value' => 'yes',   
     160                'default' => '',   
     161            ]   
     162        ); 
     163        $this->add_control(
     164            'link_type',   
     165            [   
     166                'label' => esc_html__('Link Type', 'happy-elementor-addons'),   
     167                'type' => Controls_Manager::SELECT,
     168                'default' => 'dynamic',
     169                'options' => [ 
     170                    'dynamic' => esc_html__('Dynamic', 'happy-elementor-addons'),   
     171                    'custom' => esc_html__('Custom', 'happy-elementor-addons') 
     172                ], 
     173                'condition' => [   
     174                    'enable_link!' => ''   
     175                ]   
     176            ]   
     177        ); 
     178        $this->add_control(
     179            'dynamic_link_options',
     180            [   
     181                'label' => esc_html__( 'Link Options', 'happy-elementor-addons' ), 
     182                'type' => Controls_Manager::POPOVER_TOGGLE,
     183                'label_off' => esc_html__( 'Default', 'happy-elementor-addons' ),   
     184                'label_on' => esc_html__( 'Custom', 'happy-elementor-addons' ),
     185                'return_value' => 'yes',   
     186                'default' => '',   
     187                'condition' => [   
     188                    'enable_link!' => '',   
     189                    'link_type' => 'dynamic'   
     190                ]   
     191            ]   
     192        ); 
     193        $this->start_popover();
     194        $this->add_control(
     195            'dynamic_link_external',   
     196            [   
     197                'label' => esc_html__('Open in new window', 'happy-elementor-addons'), 
     198                'type' => Controls_Manager::SWITCHER,   
     199                'label_on' => esc_html__('Yes', 'happy-elementor-addons'), 
     200                'label_off' => esc_html__('No', 'happy-elementor-addons'), 
     201                'return_value' => 'yes',   
     202                'default' => '',   
     203            ]   
     204        ); 
     205        $this->add_control(
     206            'dynamic_link_nofollow',   
     207            [   
     208                'label' => esc_html__('Add nofollow', 'happy-elementor-addons'),   
     209                'type' => Controls_Manager::SWITCHER,   
     210                'label_on' => esc_html__('Yes', 'happy-elementor-addons'), 
     211                'label_off' => esc_html__('No', 'happy-elementor-addons'), 
     212                'return_value' => 'yes',   
     213                'default' => '',   
     214            ]   
     215        ); 
     216        $this->end_popover();   
     217        $this->add_control(
     218            'custom_link', 
     219            [   
     220                'label' => esc_html__('Custom Link', 'happy-elementor-addons'),
     221                'type' => Controls_Manager::URL,   
     222                'placeholder' => esc_html__('https://your-link.com', 'happy-elementor-addons'),
     223                'options' => ['url', 'is_external', 'nofollow'],   
     224                'label_block' => true, 
     225                'dynamic' => [ 
     226                    'active' => true,   
     227                ], 
     228                'condition' => [   
     229                    'enable_link!' => '',   
     230                    'link_type' => 'custom'
     231                ]   
     232            ]   
     233        );
     234
    148235        $this->end_controls_section();
    149236    }
     
    206293        $this->add_render_attribute('title', 'class', 'ha-page-title');
    207294
    208         if ( ! empty( $settings['size'] ) ) {
    209             $this->add_render_attribute('title', 'class', 'elementor-size-' . $settings['size']);
    210         }
    211         printf('<%1$s %2$s>%3$s</%1$s>', ha_escape_tags($settings['page_title_tag']), $this->get_render_attribute_string('title'), get_the_title() );
     295        if (!empty($settings['size'])) {   
     296            $this->add_render_attribute('title', 'class', 'elementor-size-' . $settings['size']);   
     297        }   
     298        if (!empty($settings['enable_link'])) {
     299            $link_type = isset($settings['link_type']) ? $settings['link_type'] : 'dynamic';   
     300            if ($link_type == 'dynamic') { 
     301                $this->add_link_attributes('single_link', [
     302                    'url' => get_the_permalink(),   
     303                    'is_external' => ((!empty($settings['dynamic_link_options']))? ($settings['dynamic_link_external'] == 'yes'): false),   
     304                    'nofollow' => ((!empty($settings['dynamic_link_options']))? ($settings['dynamic_link_nofollow'] == 'yes'): false), 
     305                ]);
     306            } else if (! empty( $settings['custom_link']['url'] )){
     307                $this->add_link_attributes('single_link', $settings['custom_link']);   
     308            }   
     309            echo '<a '.$this->get_render_attribute_string( 'single_link' ).'>';
     310        }   
     311        printf('<%1$s %2$s>%3$s</%1$s>', $settings['page_title_tag'], $this->get_render_attribute_string('title'), get_the_title());   
     312        if (!empty($settings['enable_link'])) {
     313            echo '</a>';   
     314        }
    212315    }
    213316}
  • happy-elementor-addons/trunk/widgets/post-comments/widget.php

    r2962491 r3192129  
    5151        return ['comments', 'post', 'response', 'form'];
    5252    }
     53
     54    public function get_categories() {
     55        return [ 'happy_addons_category', 'happy_addons_theme_builder' ];
     56    }
    5357
    5458    /**
  • happy-elementor-addons/trunk/widgets/post-content/widget.php

    r2962491 r3192129  
    4646        return [ 'content', 'text' ];
    4747    }
     48
     49    public function get_categories() {
     50        return [ 'happy_addons_category', 'happy_addons_theme_builder' ];
     51    }
    4852
    4953    /**
     
    122126            ]
    123127        );
     128
    124129        $this->add_control(
    125130            'title_color',
     
    138143        );
    139144
     145        $this->add_control(
     146            'title_typography_type',
     147            [
     148                'label' => esc_html__( 'Individual Typography?', 'happy-elementor-addons' ),
     149                'type' => Controls_Manager::SWITCHER,
     150                'label_on' => esc_html__( 'Yes', 'happy-elementor-addons' ),
     151                'label_off' => esc_html__( 'No', 'happy-elementor-addons' ),
     152                'return_value' => 'individual',
     153                'default' => 'global',
     154            ]
     155        );
     156
    140157        $this->add_group_control(
    141158            Group_Control_Typography::get_type(),
    142159            [
    143160                'name' => 'title_typography',
    144                 'label' => __( 'Typography', 'happy-elementor-addons' ),
     161                'label' => __( 'Global Typography', 'happy-elementor-addons' ),
     162                'selector' => '{{WRAPPER}} h1, {{WRAPPER}} h2, {{WRAPPER}} h3, {{WRAPPER}} h4, {{WRAPPER}} h5, {{WRAPPER}} h6',
     163                'global' => [
     164                    'default' => Global_Typography::TYPOGRAPHY_SECONDARY,
     165                ],
     166                'condition' => [
     167                    'title_typography_type!' => 'individual'
     168                ]
     169            ]
     170        );
     171
     172        $this->add_group_control(
     173            Group_Control_Typography::get_type(),
     174            [
     175                'name' => 'title_typography_h1',
     176                'label' => __( 'HTML Tag H1', 'happy-elementor-addons' ),
     177                'selector' => '{{WRAPPER}} h1',
     178                'global' => [
     179                    'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
     180                ],
     181                'condition' => [
     182                    'title_typography_type' => 'individual'
     183                ]
     184            ]
     185        );
     186
     187        $this->add_group_control(
     188            Group_Control_Typography::get_type(),
     189            [
     190                'name' => 'title_typography_h2',
     191                'label' => __( 'HTML Tag H2', 'happy-elementor-addons' ),
    145192                'selector' => '{{WRAPPER}} h2',
    146193                'global' => [
    147194                    'default' => Global_Typography::TYPOGRAPHY_SECONDARY,
    148195                ],
     196                'condition' => [
     197                    'title_typography_type' => 'individual'
     198                ]
     199            ]
     200        );
     201
     202        $this->add_group_control(
     203            Group_Control_Typography::get_type(),
     204            [
     205                'name' => 'title_typography_h3',
     206                'label' => __( 'HTML Tag H3', 'happy-elementor-addons' ),
     207                'selector' => '{{WRAPPER}} h3',
     208                'global' => [
     209                    'default' => Global_Typography::TYPOGRAPHY_TEXT,
     210                ],
     211                'condition' => [
     212                    'title_typography_type' => 'individual'
     213                ]
     214            ]
     215        );
     216
     217        $this->add_group_control(
     218            Group_Control_Typography::get_type(),
     219            [
     220                'name' => 'title_typography_h4',
     221                'label' => __( 'HTML Tag H4', 'happy-elementor-addons' ),
     222                'selector' => '{{WRAPPER}} h4',
     223                'global' => [
     224                    'default' => Global_Typography::TYPOGRAPHY_TEXT,
     225                ],
     226                'condition' => [
     227                    'title_typography_type' => 'individual'
     228                ]
     229            ]
     230        );
     231
     232        $this->add_group_control(
     233            Group_Control_Typography::get_type(),
     234            [
     235                'name' => 'title_typography_h5',
     236                'label' => __( 'HTML Tag H5', 'happy-elementor-addons' ),
     237                'selector' => '{{WRAPPER}} h5',
     238                'global' => [
     239                    'default' => Global_Typography::TYPOGRAPHY_TEXT,
     240                ],
     241                'condition' => [
     242                    'title_typography_type' => 'individual'
     243                ]
     244            ]
     245        );
     246
     247        $this->add_group_control(
     248            Group_Control_Typography::get_type(),
     249            [
     250                'name' => 'title_typography_h6',
     251                'label' => __( 'HTML Tag H6', 'happy-elementor-addons' ),
     252                'selector' => '{{WRAPPER}} h6',
     253                'global' => [
     254                    'default' => Global_Typography::TYPOGRAPHY_TEXT,
     255                ],
     256                'condition' => [
     257                    'title_typography_type' => 'individual'
     258                ]
    149259            ]
    150260        );
     
    188298        $post = get_post();
    189299
    190         $settings = $this->get_settings_for_display();
    191 
    192300        if ( post_password_required( $post->ID ) ) {
    193301            echo get_the_password_form( $post->ID );
     
    197305        if ( isset( $have_posts[ $post->ID ] ) ) { return; }
    198306        $have_posts[ $post->ID ] = true;
    199         if (ha_elementor()->editor->is_edit_mode() || is_preview()) {
    200             echo '<h1>What is Lorem Ipsum?</h1>
    201             <p><strong>Lorem Ipsum</strong> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p><h2>Why do we use it?</h2><p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using \'Content here, content here\', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for \'lorem ipsum\' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).</p><h3>Where does it come from?</h3><p>Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32.</p><p>The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.</p><h4>Where can I get some?</h4><p>There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don\'t look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn\'t anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.</p><h5>How can I got it?</h5><p>There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don\'t look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn\'t anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.</p><h6>How can I do?</h6><p>There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don\'t look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn\'t anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.</p>';
     307        if (ha_elementor()->editor->is_edit_mode()) {
     308            printf(
     309                '<div %s>%s</div>',
     310                'style="margin: 1rem;padding: 1rem 1.25rem;border-left: 5px solid #f5c848;color: #856404;background-color: #fff3cd;"',
     311                __( 'This content is for design purpose only. It won\'t be shown in the frontend.', 'happy-elementor-addons' )
     312            );
     313            echo '<h1>What is Lorem Ipsum?</h1> <p><strong>Lorem Ipsum</strong> is simply dummy text of the printing and typesetting industry.</p> <h2>Why do we use it?</h2> <p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout</p> <h3>Where does it come from?</h3> <p>Contrary to popular belief, Lorem Ipsum is not simply random text.</p> <p>The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested.</p> <h4>Where can I get some?</h4> <p>There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don\'t look even slightly believable.</p> <h5>How can I got it?</h5> <p>There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don\'t look even slightly believable.</p> <h6>How can I do?</h6> <p>There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don\'t look even slightly believable.</p>';
    202314        }else {
    203315            echo apply_filters( 'the_content', get_the_content() );
  • happy-elementor-addons/trunk/widgets/post-excerpt/widget.php

    r3124446 r3192129  
    4747    }
    4848
     49    public function get_categories() {
     50        return [ 'happy_addons_category', 'happy_addons_theme_builder' ];
     51    }
     52
    4953    /**
    5054     * Register widget excerpt controls
     
    5559
    5660    protected function __post_excerpt_controls() {
     61
    5762        $this->start_controls_section(
    5863            '_section_post_excerpt',
     
    6065                'label' => __( 'Post Excerpt', 'happy-elementor-addons' ),
    6166                'tab' => Controls_Manager::TAB_CONTENT,
     67            ]
     68        );
     69
     70        $this->add_control(
     71            'excerpt_length',
     72            [
     73                'type'        => Controls_Manager::NUMBER,
     74                'label'       => __('Excerpt Length', 'happy-elementor-addons'),
     75                'description' => __('Leave it blank to hide it.', 'happy-elementor-addons'),
     76                'min'         => 0,
     77                'default'     => 15
     78            ]
     79        );
     80
     81        $this->add_control(
     82            'read_more',
     83            [
     84                'type' => Controls_Manager::TEXT,
     85                'label' => __('Read More', 'happy-elementor-addons'),
     86                'placeholder' => __('Read More Text', 'happy-elementor-addons'),
     87                'description' => __('Leave it blank to hide it.', 'happy-elementor-addons'),
     88                'default' => __('Continue Reading »', 'happy-elementor-addons'),
     89            ]
     90        );
     91
     92        $this->add_control(
     93            'read_more_new_tab',
     94            [
     95                'type' => Controls_Manager::SWITCHER,
     96                'label' => __('Open in new window', 'happy-elementor-addons'),
     97                'return_value' => 'yes',
     98                'default' => 'yes',
    6299            ]
    63100        );
     
    101138    protected function register_style_controls() {
    102139        $this->__excerpt_style_controls();
     140        $this->__readmore_style_controls();
    103141    }
    104142
     
    140178    }
    141179
     180    protected function __readmore_style_controls() {
     181        $this->start_controls_section(
     182            '_section_readmore_style',
     183            [
     184                'label' => __('Read More', 'happy-elementor-addons'),
     185                'tab' => Controls_Manager::TAB_STYLE,
     186            ]
     187        );
     188
     189        $this->add_responsive_control(
     190            'readmore_margin',
     191            [
     192                'label' => __('Margin', 'happy-elementor-addons'),
     193                'type' => Controls_Manager::DIMENSIONS,
     194                'size_units' => ['px', 'em', '%'],
     195                'selectors' => [
     196                    '{{WRAPPER}} .ha-pe-readmore' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
     197                ],
     198            ]
     199        );
     200
     201        $this->add_responsive_control(
     202            'readmore_padding',
     203            [
     204                'label' => __('Padding', 'happy-elementor-addons'),
     205                'type' => Controls_Manager::DIMENSIONS,
     206                'size_units' => ['px', 'em', '%'],
     207                'selectors' => [
     208                    '{{WRAPPER}} .ha-pe-readmore a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
     209                ],
     210            ]
     211        );
     212
     213        $this->add_group_control(
     214            Group_Control_Typography::get_type(),
     215            [
     216                'name' => 'readmore_typography',
     217                'label' => __('Typography', 'happy-elementor-addons'),
     218                'global' => [
     219                    'default' => Global_Typography::TYPOGRAPHY_SECONDARY,
     220                ],
     221                'selector' => '{{WRAPPER}} .ha-pe-readmore a',
     222            ]
     223        );
     224
     225        $this->start_controls_tabs('readmore_tabs');
     226        $this->start_controls_tab(
     227            'readmore_normal_tab',
     228            [
     229                'label' => __('Normal', 'happy-elementor-addons'),
     230            ]
     231        );
     232
     233        $this->add_control(
     234            'readmore_color',
     235            [
     236                'label' => __('Text Color', 'happy-elementor-addons'),
     237                'type' => Controls_Manager::COLOR,
     238                'selectors' => [
     239                    '{{WRAPPER}} .ha-pe-readmore a' => 'color: {{VALUE}}',
     240                ],
     241            ]
     242        );
     243
     244        $this->end_controls_tab();
     245
     246        $this->start_controls_tab(
     247            'readmore_hover_tab',
     248            [
     249                'label' => __('Hover', 'happy-elementor-addons'),
     250            ]
     251        );
     252
     253        $this->add_control(
     254            'readmore_hover_color',
     255            [
     256                'label' => __('Text Color', 'happy-elementor-addons'),
     257                'type' => Controls_Manager::COLOR,
     258                'selectors' => [
     259                    '{{WRAPPER}} .ha-pe-readmore a:hover' => 'color: {{VALUE}}',
     260                ],
     261            ]
     262        );
     263
     264        $this->end_controls_tab();
     265        $this->end_controls_tabs();
     266
     267        $this->end_controls_section();
     268    }
     269
    142270    protected function render() {
    143271        $post = get_post();
    144272
    145         if ( $post->ID && !empty( $post->ID ) && post_password_required( $post->ID ) ) {
     273        $settings = $this->get_settings_for_display();
     274
     275        $length = $settings['excerpt_length'];
     276        $read_more_text = $settings['read_more'];
     277        $new_tab = $settings['read_more_new_tab'];
     278
     279        if ( post_password_required( $post->ID ) ) {
    146280            echo get_the_password_form( $post->ID );
    147281            return;
    148282        }
    149         if (ha_elementor()->editor->is_edit_mode() || is_preview()) {
    150             echo "<p><strong>Lorem Ipsum</strong> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>";
     283
     284        if (ha_elementor()->editor->is_edit_mode()) {
     285            printf(
     286                '<div %s>%s</div>',
     287                'style="margin: 1rem;padding: 1rem 1.25rem;border-left: 5px solid #f5c848;color: #856404;background-color: #fff3cd;"',
     288                __( 'This content is for design purpose only. It won\'t be shown in the frontend.', 'happy-elementor-addons' )
     289                );
     290            echo '<p>'.wp_trim_words('Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', $length).'</p>';
     291            if ( $read_more_text ) {
     292                printf(
     293                    '<div class="%1$s"><a href="%2$s" target="%3$s">%4$s</a></div>',
     294                    'ha-pe-readmore',
     295                    esc_url( get_the_permalink( get_the_ID() ) ),
     296                    'yes' === $new_tab ? '_blank' : '_self',
     297                    esc_html( $read_more_text )
     298                );
     299            }
    151300        }
    152301        else {
    153             echo apply_filters( 'the_excerpt', get_the_excerpt() );
     302            echo apply_filters( 'the_excerpt', wp_trim_words(get_the_excerpt(), $length) );
     303            if ( $read_more_text ) {
     304                printf(
     305                    '<div class="%1$s"><a href="%2$s" target="%3$s">%4$s</a></div>',
     306                    'ha-pe-readmore',
     307                    esc_url( get_the_permalink( get_the_ID() ) ),
     308                    'yes' === $new_tab ? '_blank' : '_self',
     309                    esc_html( $read_more_text )
     310                );
     311            }
    154312        }
    155313    }
  • happy-elementor-addons/trunk/widgets/post-featured-image/widget.php

    r2962491 r3192129  
    5252    }
    5353
     54    public function get_categories() {
     55        return [ 'happy_addons_category', 'happy_addons_theme_builder' ];
     56    }
     57
    5458    /**
    5559     * Register widget content controls
     
    113117                'return_value' => 'yes',
    114118                'default' => 'no',
     119            ]
     120        );
     121
     122        $this->add_control(
     123            'enable_link',
     124            [
     125                'label' => esc_html__('Enable Link', 'happy-elementor-addons'),
     126                'type' => Controls_Manager::SWITCHER,
     127                'label_on' => esc_html__('Yes', 'happy-elementor-addons'),
     128                'label_off' => esc_html__('No', 'happy-elementor-addons'),
     129                'return_value' => 'yes',
     130                'default' => '',
     131            ]
     132        );
     133
     134        $this->add_control(
     135            'link_type',
     136            [
     137                'label' => esc_html__('Link Type', 'happy-elementor-addons'),
     138                'type' => Controls_Manager::SELECT,
     139                'default' => 'dynamic',
     140                'options' => [
     141                    'dynamic' => esc_html__('Dynamic', 'happy-elementor-addons'),
     142                    'custom' => esc_html__('Custom', 'happy-elementor-addons')
     143                ],
     144                'condition' => [
     145                    'enable_link!' => ''
     146                ]
     147            ]
     148        );
     149
     150        $this->add_control(
     151            'dynamic_link_options',
     152            [
     153                'label' => esc_html__( 'Link Options', 'happy-elementor-addons' ),
     154                'type' => Controls_Manager::POPOVER_TOGGLE,
     155                'label_off' => esc_html__( 'Default', 'happy-elementor-addons' ),
     156                'label_on' => esc_html__( 'Custom', 'happy-elementor-addons' ),
     157                'return_value' => 'yes',
     158                'default' => '',
     159                'condition' => [
     160                    'enable_link!' => '',
     161                    'link_type' => 'dynamic'
     162                ]
     163            ]
     164        );
     165
     166        $this->start_popover();
     167
     168        $this->add_control(
     169            'dynamic_link_external',
     170            [
     171                'label' => esc_html__('Open in new window', 'happy-elementor-addons'),
     172                'type' => Controls_Manager::SWITCHER,
     173                'label_on' => esc_html__('Yes', 'happy-elementor-addons'),
     174                'label_off' => esc_html__('No', 'happy-elementor-addons'),
     175                'return_value' => 'yes',
     176                'default' => '',
     177            ]
     178        );
     179
     180        $this->add_control(
     181            'dynamic_link_nofollow',
     182            [
     183                'label' => esc_html__('Add nofollow', 'happy-elementor-addons'),
     184                'type' => Controls_Manager::SWITCHER,
     185                'label_on' => esc_html__('Yes', 'happy-elementor-addons'),
     186                'label_off' => esc_html__('No', 'happy-elementor-addons'),
     187                'return_value' => 'yes',
     188                'default' => '',
     189            ]
     190        );
     191
     192        $this->end_popover();
     193
     194        $this->add_control(
     195            'custom_link',
     196            [
     197                'label' => esc_html__('Custom Link', 'happy-elementor-addons'),
     198                'type' => Controls_Manager::URL,
     199                'placeholder' => esc_html__('https://your-link.com', 'happy-elementor-addons'),
     200                'options' => ['url', 'is_external', 'nofollow'],
     201                'label_block' => true,
     202                'dynamic' => [
     203                    'active' => true,
     204                ],
     205                'condition' => [
     206                    'enable_link!' => '',
     207                    'link_type' => 'custom'
     208                ]
    115209            ]
    116210        );
     
    276370        $settings = $this->get_settings_for_display();
    277371
    278         if (ha_elementor()->editor->is_edit_mode() || is_preview()) {
     372        if (ha_elementor()->editor->is_edit_mode()) {
     373            if (!empty($settings['enable_link'])) {
     374                $link_type = isset($settings['link_type']) ? $settings['link_type'] : 'dynamic';
     375                if ($link_type == 'dynamic') {
     376                    $this->add_link_attributes('single_link', [
     377                        'url' => get_the_permalink(),
     378                        'is_external' => ((!empty($settings['dynamic_link_options']))? ($settings['dynamic_link_external'] == 'yes'): false),
     379                        'nofollow' => ((!empty($settings['dynamic_link_options']))? ($settings['dynamic_link_nofollow'] == 'yes'): false),
     380                    ]);
     381                } else if (! empty( $settings['custom_link']['url'] )){
     382                    $this->add_link_attributes('single_link', $settings['custom_link']);
     383                }
     384                echo '<a '.$this->get_render_attribute_string( 'single_link' ).'>';
     385            }
    279386            echo '<img src="' . Utils::get_placeholder_image_src() . '" alt="place holder image">';
     387            if (!empty($settings['enable_link'])) {
     388                echo '</a>';
     389            }
    280390        } else {
    281391            if (has_post_thumbnail()) {
     392
     393                if (!empty($settings['enable_link'])) {
     394                    $link_type = isset($settings['link_type']) ? $settings['link_type'] : 'dynamic';
     395                    if ($link_type == 'dynamic') {
     396                        $this->add_link_attributes('single_link', [
     397                            'url' => get_the_permalink(),
     398                            'is_external' => ((!empty($settings['dynamic_link_options']))? ($settings['dynamic_link_external'] == 'yes'): false),
     399                            'nofollow' => ((!empty($settings['dynamic_link_options']))? ($settings['dynamic_link_nofollow'] == 'yes'): false),
     400                        ]);
     401                    } else if (! empty( $settings['custom_link']['url'] )){
     402                        $this->add_link_attributes('single_link', $settings['custom_link']);
     403                    }
     404                    echo '<a '.$this->get_render_attribute_string( 'single_link' ).'>';
     405                }
    282406
    283407                if ($settings['post_feature_image_size'] == 'custom') {
     
    289413                if ('yes' == $settings['image_caption']) { ?>
    290414                    <figcaption class="ha-image-caption"><?php echo wp_kses_post(get_the_post_thumbnail_caption()); ?></figcaption>
    291 <?php }
     415                <?php }
     416
     417                if (!empty($settings['enable_link'])) {
     418                    echo '</a>';
     419                }
    292420            }
    293421        }
  • happy-elementor-addons/trunk/widgets/post-info/widget.php

    r2962491 r3192129  
    4747        return [ 'post', 'info', 'date', 'time', 'author', 'taxonomy', 'comments', 'terms', 'avatar' ];
    4848    }
     49
     50    public function get_categories() {
     51        return [ 'happy_addons_category', 'happy_addons_theme_builder' ];
     52    }
    4953
    5054    /**
  • happy-elementor-addons/trunk/widgets/post-navigation/widget.php

    r3095128 r3192129  
    4646    public function get_keywords() {
    4747        return ['navigation', 'post', 'page', 'next', 'prev', 'previous'];
     48    }
     49
     50    public function get_categories() {
     51        return [ 'happy_addons_category', 'happy_addons_theme_builder' ];
    4852    }
    4953
  • happy-elementor-addons/trunk/widgets/post-title/widget.php

    r3064385 r3192129  
    11<?php
     2
    23/**
    34 * Post Title widget class
     
    56 * @package Happy_Addons
    67 */
     8
    79namespace Happy_Addons\Elementor\Widget;
    810
     
    1214use Elementor\Group_Control_Text_Shadow;
    1315
    14 defined( 'ABSPATH' ) || die();
     16defined('ABSPATH') || die();
    1517
    1618class Post_Title extends Base {
     
    2527     */
    2628    public function get_title() {
    27         return __( 'Post Title', 'happy-elementor-addons' );
     29        return __('Post Title', 'happy-elementor-addons');
    2830    }
    2931
     
    4547
    4648    public function get_keywords() {
    47         return [ 'post title', 'Title', 'text' ];
    48     }
     49        return ['post title', 'Title', 'text'];
     50    }
     51
     52    public function get_categories() {
     53        return [ 'happy_addons_category', 'happy_addons_theme_builder' ];
     54    }
    4955
    5056    /**
    51     * Register widget content controls
    52     */
     57    * Register widget content controls
     58    */
    5359    protected function register_content_controls() {
    5460        $this->__post_title_content_control();
     
    5965            '_section_post_title',
    6066            [
    61                 'label' => __( 'Post Title', 'happy-elementor-addons' ),
     67                'label' => __('Post Title', 'happy-elementor-addons'),
    6268                'tab' => Controls_Manager::TAB_CONTENT,
    6369            ]
     
    6773            'post_title_tag',
    6874            [
    69                 'label' => __( 'Title HTML Tag', 'happy-elementor-addons' ),
     75                'label' => __('Title HTML Tag', 'happy-elementor-addons'),
    7076                'type' => Controls_Manager::CHOOSE,
    7177                'options' => [
    7278                    'h1'  => [
    73                         'title' => __( 'H1', 'happy-elementor-addons' ),
     79                        'title' => __('H1', 'happy-elementor-addons'),
    7480                        'icon' => 'eicon-editor-h1'
    7581                    ],
    7682                    'h2'  => [
    77                         'title' => __( 'H2', 'happy-elementor-addons' ),
     83                        'title' => __('H2', 'happy-elementor-addons'),
    7884                        'icon' => 'eicon-editor-h2'
    7985                    ],
    8086                    'h3'  => [
    81                         'title' => __( 'H3', 'happy-elementor-addons' ),
     87                        'title' => __('H3', 'happy-elementor-addons'),
    8288                        'icon' => 'eicon-editor-h3'
    8389                    ],
    8490                    'h4'  => [
    85                         'title' => __( 'H4', 'happy-elementor-addons' ),
     91                        'title' => __('H4', 'happy-elementor-addons'),
    8692                        'icon' => 'eicon-editor-h4'
    8793                    ],
    8894                    'h5'  => [
    89                         'title' => __( 'H5', 'happy-elementor-addons' ),
     95                        'title' => __('H5', 'happy-elementor-addons'),
    9096                        'icon' => 'eicon-editor-h5'
    9197                    ],
    9298                    'h6'  => [
    93                         'title' => __( 'H6', 'happy-elementor-addons' ),
     99                        'title' => __('H6', 'happy-elementor-addons'),
    94100                        'icon' => 'eicon-editor-h6'
    95101                    ]
     
    99105            ]
    100106        );
    101         $this->add_control(
     107        $this->add_control(
    102108            'size',
    103109            [
    104                 'label' => esc_html__( 'Size', 'happy-elementor-addons' ),
     110                'label' => esc_html__('Size', 'happy-elementor-addons'),
    105111                'type' => Controls_Manager::SELECT,
    106112                'default' => 'default',
    107113                'options' => [
    108                     'default' => esc_html__( 'Default', 'happy-elementor-addons' ),
    109                     'small' => esc_html__( 'Small', 'happy-elementor-addons' ),
    110                     'medium' => esc_html__( 'Medium', 'happy-elementor-addons' ),
    111                     'large' => esc_html__( 'Large', 'happy-elementor-addons' ),
    112                     'xl' => esc_html__( 'XL', 'happy-elementor-addons' ),
    113                     'xxl' => esc_html__( 'XXL', 'happy-elementor-addons' ),
    114                 ],
    115             ]
    116         );
    117 
    118         $this->add_responsive_control(
     114                    'default' => esc_html__('Default', 'happy-elementor-addons'),
     115                    'small' => esc_html__('Small', 'happy-elementor-addons'),
     116                    'medium' => esc_html__('Medium', 'happy-elementor-addons'),
     117                    'large' => esc_html__('Large', 'happy-elementor-addons'),
     118                    'xl' => esc_html__('XL', 'happy-elementor-addons'),
     119                    'xxl' => esc_html__('XXL', 'happy-elementor-addons'),
     120                ],
     121            ]
     122        );
     123
     124        $this->add_responsive_control(
    119125            'align',
    120126            [
    121                 'label' => __( 'Alignment', 'happy-elementor-addons' ),
     127                'label' => __('Alignment', 'happy-elementor-addons'),
    122128                'type' => Controls_Manager::CHOOSE,
    123129                'options' => [
    124130                    'left' => [
    125                         'title' => __( 'Left', 'happy-elementor-addons' ),
     131                        'title' => __('Left', 'happy-elementor-addons'),
    126132                        'icon' => 'eicon-text-align-left',
    127133                    ],
    128134                    'center' => [
    129                         'title' => __( 'Center', 'happy-elementor-addons' ),
     135                        'title' => __('Center', 'happy-elementor-addons'),
    130136                        'icon' => 'eicon-text-align-center',
    131137                    ],
    132138                    'right' => [
    133                         'title' => __( 'Right', 'happy-elementor-addons' ),
     139                        'title' => __('Right', 'happy-elementor-addons'),
    134140                        'icon' => 'eicon-text-align-right',
    135141                    ],
    136142                    'justify' => [
    137                         'title' => __( 'Justify', 'happy-elementor-addons' ),
     143                        'title' => __('Justify', 'happy-elementor-addons'),
    138144                        'icon' => 'eicon-text-align-justify',
    139145                    ],
     
    146152        );
    147153
    148         $this->end_controls_section();
     154        $this->add_control(
     155            'enable_link',
     156            [
     157                'label' => esc_html__('Enable Link', 'happy-elementor-addons'),
     158                'type' => Controls_Manager::SWITCHER,
     159                'label_on' => esc_html__('Yes', 'happy-elementor-addons'),
     160                'label_off' => esc_html__('No', 'happy-elementor-addons'),
     161                'return_value' => 'yes',
     162                'default' => '',
     163            ]
     164        );
     165
     166        $this->add_control(
     167            'link_type',
     168            [
     169                'label' => esc_html__('Link Type', 'happy-elementor-addons'),
     170                'type' => Controls_Manager::SELECT,
     171                'default' => 'dynamic',
     172                'options' => [
     173                    'dynamic' => esc_html__('Dynamic', 'happy-elementor-addons'),
     174                    'custom' => esc_html__('Custom', 'happy-elementor-addons')
     175                ],
     176                'condition' => [
     177                    'enable_link!' => ''
     178                ]
     179            ]
     180        );
     181
     182        $this->add_control(
     183            'dynamic_link_options',
     184            [
     185                'label' => esc_html__( 'Link Options', 'happy-elementor-addons' ),
     186                'type' => Controls_Manager::POPOVER_TOGGLE,
     187                'label_off' => esc_html__( 'Default', 'happy-elementor-addons' ),
     188                'label_on' => esc_html__( 'Custom', 'happy-elementor-addons' ),
     189                'return_value' => 'yes',
     190                'default' => '',
     191                'condition' => [
     192                    'enable_link!' => '',
     193                    'link_type' => 'dynamic'
     194                ]
     195            ]
     196        );
     197
     198        $this->start_popover();
     199
     200        $this->add_control(
     201            'dynamic_link_external',
     202            [
     203                'label' => esc_html__('Open in new window', 'happy-elementor-addons'),
     204                'type' => Controls_Manager::SWITCHER,
     205                'label_on' => esc_html__('Yes', 'happy-elementor-addons'),
     206                'label_off' => esc_html__('No', 'happy-elementor-addons'),
     207                'return_value' => 'yes',
     208                'default' => '',
     209            ]
     210        );
     211
     212        $this->add_control(
     213            'dynamic_link_nofollow',
     214            [
     215                'label' => esc_html__('Add nofollow', 'happy-elementor-addons'),
     216                'type' => Controls_Manager::SWITCHER,
     217                'label_on' => esc_html__('Yes', 'happy-elementor-addons'),
     218                'label_off' => esc_html__('No', 'happy-elementor-addons'),
     219                'return_value' => 'yes',
     220                'default' => '',
     221            ]
     222        );
     223
     224        $this->end_popover();
     225
     226        $this->add_control(
     227            'custom_link',
     228            [
     229                'label' => esc_html__('Custom Link', 'happy-elementor-addons'),
     230                'type' => Controls_Manager::URL,
     231                'placeholder' => esc_html__('https://your-link.com', 'happy-elementor-addons'),
     232                'options' => ['url', 'is_external', 'nofollow'],
     233                'label_block' => true,
     234                'dynamic' => [
     235                    'active' => true,
     236                ],
     237                'condition' => [
     238                    'enable_link!' => '',
     239                    'link_type' => 'custom'
     240                ]
     241            ]
     242        );
     243
     244        $this->end_controls_section();
    149245    }
    150246
     
    159255    protected function __post_title_style_controls() {
    160256
    161         $this->start_controls_section(
    162             '_section_style_post',
    163             [
    164                 'label' => __( 'Title', 'happy-elementor-addons' ),
    165                 'tab' => Controls_Manager::TAB_STYLE,
    166             ]
    167         );
    168 
    169         $this->add_control(
     257        $this->start_controls_section(
     258            '_section_style_post',
     259            [
     260                'label' => __('Title', 'happy-elementor-addons'),
     261                'tab' => Controls_Manager::TAB_STYLE,
     262            ]
     263        );
     264
     265        $this->add_control(
    170266            'post_title_color',
    171267            [
    172                 'label' => esc_html__( 'Color', 'happy-elementor-addons' ),
     268                'label' => esc_html__('Color', 'happy-elementor-addons'),
    173269                'type' => Controls_Manager::COLOR,
    174270                'selectors' => [
     
    182278            [
    183279                'name' => 'post_title_typography',
    184                 'label' => __( 'Typography', 'happy-elementor-addons' ),
     280                'label' => __('Typography', 'happy-elementor-addons'),
    185281                'selector' => '{{WRAPPER}} .ha-post-title',
    186282                'global' => [
     
    199295
    200296
    201         $this->end_controls_section();
     297        $this->end_controls_section();
    202298    }
    203299
     
    206302        $this->add_render_attribute('title', 'class', 'ha-post-title');
    207303
    208         if ( ! empty( $settings['size'] ) ) {
    209             $this->add_render_attribute('title', 'class', 'elementor-size-' . $settings['size']);
    210         }
    211 
    212         printf('<%1$s %2$s>%3$s</%1$s>', ha_escape_tags($settings['post_title_tag']), $this->get_render_attribute_string('title'), get_the_title() );
     304        if (!empty($settings['size'])) {
     305            $this->add_render_attribute('title', 'class', 'elementor-size-' . $settings['size']);
     306        }
     307
     308        if (!empty($settings['enable_link'])) {
     309            $link_type = isset($settings['link_type']) ? $settings['link_type'] : 'dynamic';
     310            if ($link_type == 'dynamic') {
     311                $this->add_link_attributes('single_link', [
     312                    'url' => get_the_permalink(),
     313                    'is_external' => ((!empty($settings['dynamic_link_options']))? ($settings['dynamic_link_external'] == 'yes'): false),
     314                    'nofollow' => ((!empty($settings['dynamic_link_options']))? ($settings['dynamic_link_nofollow'] == 'yes'): false),
     315                ]);
     316            } else if (! empty( $settings['custom_link']['url'] )){
     317                $this->add_link_attributes('single_link', $settings['custom_link']);
     318            }
     319            echo '<a '.$this->get_render_attribute_string( 'single_link' ).'>';
     320        }
     321
     322        printf('<%1$s %2$s>%3$s</%1$s>', $settings['post_title_tag'], $this->get_render_attribute_string('title'), get_the_title());
     323
     324        if (!empty($settings['enable_link'])) {
     325            echo '</a>';
     326        }
    213327    }
    214328}
  • happy-elementor-addons/trunk/widgets/site-logo/widget.php

    r2839315 r3192129  
    4949        return ['logo', ' image'];
    5050    }
     51
     52    public function get_categories() {
     53        return [ 'happy_addons_category', 'happy_addons_theme_builder' ];
     54    }
    5155
    5256    /**
  • happy-elementor-addons/trunk/widgets/site-tagline/widget.php

    r3011757 r3192129  
    5050        return ['site', 'tagline'];
    5151    }
     52
     53    public function get_categories() {
     54        return [ 'happy_addons_category', 'happy_addons_theme_builder' ];
     55    }
    5256
    5357    /**
  • happy-elementor-addons/trunk/widgets/site-title/widget.php

    r3072960 r3192129  
    4747        return [ 'site title', 'Title', 'text' ];
    4848    }
     49
     50    public function get_categories() {
     51        return [ 'happy_addons_category', 'happy_addons_theme_builder' ];
     52    }
    4953
    5054    /**
Note: See TracChangeset for help on using the changeset viewer.