WordPress Button Plugin MaxButtons - Version 6.21

Version Description

  • Feature - Add simple link title to buttons plus shortcode attribute linktitle
  • Updated Font Awesome override to work only where needed
  • Removed PHP 5.2 check - not functional
Download this release

Release Info

Developer basszje
Plugin Icon 128x128 WordPress Button Plugin MaxButtons
Version 6.21
Comparing to
See all releases

Code changes from version 6.20 to 6.21

assets/css/style.css CHANGED
@@ -1 +1 @@
1
- .mb_colorpicker{z-index:200}.ads .button-primary{display:block;margin:0 auto 20px auto;width:210px;text-align:center;overflow:visible}#maxbuttons{display:inline-block;width:100%}#maxbuttons .message,#maxbuttons .mb-message{border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;padding:10px;margin:10px 0px 20px 0px;clear:both}#maxbuttons .main{position:relative;z-index:500;margin-top:15px;width:72%;float:left}#maxbuttons .mb-message.error{font-weight:700}#maxbuttons .mb-message.shortcode,#maxbuttons .mb-message.mb-notice{border:solid 1px #e6db55;background-color:#ffffe0}#maxbuttons .button-bar,#maxbuttons .form-actions,#maxbuttons.mb_tabs_active .mb_tab>.title:nth-of-type(1){margin:15px 0;padding:10px;background:#fbfbfb none repeat scroll 0 0;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.04);box-shadow:0 1px 1px rgba(0,0,0,0.04);min-height:28px}#maxbuttons h1>span{vertical-align:top;float:left}@media (max-width: 1024px){#maxbuttons h1>span{float:none}}#maxbuttons .logo{font-weight:400;font-size:13px;overflow:hidden;text-align:center}@media (max-width: 1024px){#maxbuttons .logo{text-align:left;margin-top:15px}}#maxbuttons .logo img{vertical-align:middle;padding-left:5px;padding-right:5px}#maxbuttons .logo .fb-like{margin-top:5px;height:20px;padding:0;margin-left:180px;overflow:hidden}#maxbuttons .logo .fb-like span{vertical-align:top !important}#maxbuttons .dummy-heading{display:none}@media screen and (max-width: 960px){#maxbuttons .main{width:100%}}#maxbuttons .tablenav .input-paging{width:55px}#maxbuttons .ads ul li{margin-bottom:4px}#maxbuttons .preview-buttons{background-color:#fff;border:1px solid #dfdfdf;overflow:hidden}#maxbuttons .preview-buttons .heading{width:100%;clear:both;display:inline-block;border-bottom:1px solid #dfdfdf}#maxbuttons .preview-buttons .heading>span{display:inline-block;font-weight:700;font-size:14px;float:left}#maxbuttons .preview-buttons .button-row{width:100%;clear:both;display:inline-block;border-bottom:1px solid #dfdfdf}#maxbuttons .preview-buttons .button-row>span{display:inline-block;font-size:13px;float:left;overflow:hidden}#maxbuttons .preview-buttons .button-row .actions{margin:10px 0;padding:10px 0px 10px 8px;display:inline-block;z-index:11;width:50%;background-color:#fff;position:relative}#maxbuttons .preview-buttons .col{padding:10px 0 10px 1%}#maxbuttons .preview-buttons .col_check{width:20px}#maxbuttons .preview-buttons .col_button{width:60%;overflow:hidden}@media (max-width: 780px){#maxbuttons .preview-buttons .col_button{width:70%;margin-right:5%}}#maxbuttons .preview-buttons .col_name{width:15%}@media (max-width: 780px){#maxbuttons .preview-buttons .col_name{display:none !important}}#maxbuttons .preview-buttons .col_shortcode{width:15%;padding-right:0}#maxbuttons p.status a{text-decoration:none}#maxbuttons p.status span.count{color:#999999}#maxbuttons .button-list{margin-top:10px}#maxbuttons .button-list p{font-size:13px}#maxbuttons .button-list a{text-decoration:none}#maxbuttons .button-list a.button-name{font-weight:bold}#maxbuttons .button-list .shortcode-container{margin:10px 0px 10px 2px}#maxbuttons .button-list .collection_notice{text-align:right;margin:10px 5px 0 0;padding-top:10px;float:right}#maxbuttons .shortcode-container .mb-container{margin:0 !important;float:none !important;max-width:100% !important}#maxbuttons .shortcode-container .mb-center{text-align:left !important}#maxbuttons .pagination-links a.disabled{color:#aaa;cursor:default}#maxbuttons .pagination-links a.disabled:hover{background:#e4e4e4 none repeat scroll 0 0;cursor:default;border:1px solid #d2d2d2}#maxbuttons .pagination{width:100%;display:inline-block;margin:15px 0 5px}#maxbuttons .pagination li{float:left;margin-right:5px}#maxbuttons .pagination li a,#maxbuttons .pagination li span{background:#ccc;vertical-align:middle;padding:4px 10px 8px;height:15px;display:inline-block;border:1px solid #eee;text-decoration:none;font-size:14px;font-weight:bold}#maxbuttons.maxbuttons-controller-edit .main,#maxbuttons.maxbuttons-controller-button .main{width:auto;max-width:1200px}#maxbuttons .option-container{margin-bottom:20px;border:solid 1px #cccccc;border-radius:3px 3px 3px 3px;-webkit-border-radius:3px 3px 3px 3px;background-color:#fff}#maxbuttons .option-container .title{font-size:18px;padding:9px 8px 9px 10px;text-align:left;text-shadow:0px 1px 0px #ffffff;position:relative}#maxbuttons .option-container .section-title{padding:15px;margin-top:10px;font-weight:700;font-size:16px}#maxbuttons .option-container .section-title{background-color:#fff}#maxbuttons .option-container .option-list{display:inline-block}#maxbuttons .option-container .option-list:after{clear:both}#maxbuttons .option-container .option-list .help{float:right;margin-top:5px}#maxbuttons .option-container .help{position:relative;width:18px;height:18px;font-size:18px;margin-left:10px}#maxbuttons .option-container .help span{font-family:"Open Sans",sans-serif;font-size:12px;background-color:#fff;color:#000;position:absolute;display:none;padding:10px 5px;top:-7px;left:25px;min-width:150px;border-radius:5px;text-align:center;z-index:1000;border:1px solid #ccc;line-height:15px}#maxbuttons .option-container .help:hover span{display:block}#maxbuttons .option-container>.inside{padding:10px 15px 10px 15px;border-top:solid 1px #cccccc;background-color:#ffffff}#maxbuttons .option-container>.inside .option,#maxbuttons .option-container>.inside .option-design{margin-bottom:10px;display:block;position:relative}#maxbuttons .option-container>.inside .option .label,#maxbuttons .option-container>.inside .option>label,#maxbuttons .option-container>.inside .option-design .label,#maxbuttons .option-container>.inside .option-design>label{display:inline-block;font-weight:bold;padding-left:3px;padding-top:5px;width:145px;vertical-align:top;cursor:default;min-height:25px}#maxbuttons .option-container>.inside .option .label[for],#maxbuttons .option-container>.inside .option>label[for],#maxbuttons .option-container>.inside .option-design .label[for],#maxbuttons .option-container>.inside .option-design>label[for]{cursor:pointer}@media (max-width: 780px){#maxbuttons .option-container>.inside .option .label,#maxbuttons .option-container>.inside .option>label,#maxbuttons .option-container>.inside .option-design .label,#maxbuttons .option-container>.inside .option-design>label{font-size:14px}}#maxbuttons .option-container>.inside .option:after,#maxbuttons .option-container>.inside .option:before,#maxbuttons .option-container>.inside .option-design:after,#maxbuttons .option-container>.inside .option-design:before{clear:both}#maxbuttons .option-container>.inside .option label{margin-top:2px}#maxbuttons .option-container>.inside .option label.mbcolor{margin-top:5px}#maxbuttons .option-container>.inside .option label:nth-of-type(2){margin-left:30px;width:115px}#maxbuttons .option-container>.inside .option .control-group{display:inline-block}#maxbuttons .option-container>.inside .option .rotate-left{-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg);filter:progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=cos(-45), M12=-sin(-45), M21=sin(-45), M22=cos(-45));-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=cos(-45), M12=-sin(-45), M21=sin(-45), M22=cos(-45))";zoom:1}#maxbuttons .option-container>.inside .option .rotate-right{-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg);filter:progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=cos(45), M12=-sin(45), M21=sin(45), M22=cos(45));-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=cos(45), M12=-sin(45), M21=sin(45), M22=cos(45))";zoom:1}#maxbuttons .option-design{margin-bottom:10px}#maxbuttons .option-design .input td div.cell-label{padding:1px 10px 0px 5px;font-weight:bold;border-bottom:solid 1px #d1d1d1;width:180px;font-size:13px;height:30px}#maxbuttons .option-design .default-other{font-size:13px}#maxbuttons .option p.note,#maxbuttons .option-design p.note{font-style:italic;display:inline-block;clear:both;color:#808080;padding-left:3px;margin-top:10px;margin-bottom:5px;margin-left:0;display:block}#maxbuttons .mb-message.shortcode .expanded,#maxbuttons .mb-message.mb-notice .expanded{display:none}#maxbuttons .mb-message.shortcode .expanded .example strong,#maxbuttons .mb-message.mb-notice .expanded .example strong{width:300px;display:inline-block}#maxbuttons .mb-message.shortcode .shortcode-expand,#maxbuttons .mb-message.mb-notice .shortcode-expand{float:right;cursor:pointer}@media (max-width: 1024px){#maxbuttons .mb-message.shortcode .shortcode-expand,#maxbuttons .mb-message.mb-notice .shortcode-expand{float:none;text-align:left;margin:10px 0;display:block}}#maxbuttons .manual-box{float:right;margin:3px 15px;top:0;right:0}#maxbuttons .manual-box a{text-align:center;width:100%;background:#e0e0e0 none repeat scroll 0 0;font-size:13px;font-weight:600;margin-left:4px;margin-top:5px;padding:4px 8px;position:relative;text-decoration:none;text-shadow:none}#maxbuttons .manual-entry{display:none;position:absolute;border:1px solid #000;background:#fff;width:45%;right:25px;z-index:199;box-sizing:border-box;padding-bottom:20px}#maxbuttons .manual-entry h3{font-size:18px;width:calc(100%);box-sizing:border-box;padding:10px 0;border-bottom:1px solid #ccc;text-align:center;margin:0;padding-right:35px;position:relative}#maxbuttons .manual-entry h3 span{box-sizing:border-box;cursor:pointer;width:35px;height:100%;font-size:25px;display:inline-block;position:absolute;right:5px;top:0;padding-top:8px}#maxbuttons .manual-entry h4,#maxbuttons .manual-entry p,#maxbuttons .manual-entry ol,#maxbuttons .manual-entry ul{padding:0 15px}#maxbuttons .manual-entry h4{font-size:16px}#maxbuttons .manual-entry p{font-size:13px}#maxbuttons .output{position:fixed;top:45px;right:20px;background-color:#ffffff;border:solid 1px #414141;box-shadow:0px 0px 6px #808080;z-index:99;width:auto;min-width:300px}@media (max-width: 780px){#maxbuttons .output{-webkit-box-shadow:0 0 0 0;-moz-box-shadow:0 0 0 0;box-shadow:0 0 0 0;top:0;left:0;right:0;position:relative;margin-bottom:15px;border-color:#ccc}}#maxbuttons .output .header{color:#222222;background-color:#ffffff;border-bottom:solid 1px #cccccc;font-family:"Open Sans", sans-serif;font-size:16px;font-weight:bold;padding:8px 0px 8px 10px;cursor:move;position:relative}#maxbuttons .output .header .preview-toggle{float:right;font-size:30px;width:30px;position:absolute;top:3px;right:0}#maxbuttons .output .inner{padding:5px}#maxbuttons .output .inner p{padding:5px 0 5px 5px}#maxbuttons .output .input.mbcolor{float:left;position:relative;margin-top:5px}#maxbuttons .output .input.mbcolor .wp-picker-container.wp-picker-active{padding:15px;border:1px solid #ccc;background-color:#fff;position:absolute;bottom:-15px;left:-270px;z-index:102;-webkit-box-shadow:4px 1px 5px #ccc;-moz-box-shadow:4px 1px 5px #ccc;box-shadow:4px 1px 5px #ccc}#maxbuttons .output .note{float:left;margin:8px 0px 0px 10px}#maxbuttons .output .result{padding:20px 5px}#maxbuttons .output .result p{padding:5px 0px 5px 0px;margin:0}#maxbuttons .output .result.preview-border-box>*{box-sizing:border-box}#maxbuttons .conditional-option{display:none}#maxbuttons .media_query{width:640px;margin:0 20px 15px 0;border:1px solid #ccc;padding:10px 15px;display:inline-block;clear:both;position:relative}#maxbuttons .media_query .removebutton{position:absolute;right:10px;top:10px;cursor:pointer;z-index:100;padding:10px 5px}#maxbuttons .media_query input:after{clear:both}#maxbuttons .media_query .label{clear:both;margin-bottom:15px}#maxbuttons .media_query label.title{padding:0;font-size:20px}#maxbuttons .media_query .custom.hidden{display:none}#maxbuttons .media_query .option.custom label:nth-of-type(2){margin-left:95px}#maxbuttons .media_query .description{padding:15px 0px;text-align:left}#maxbuttons .media_query select{width:60px}#maxbuttons .media_query .input input{margin-top:0px;padding-top:2px}#maxbuttons .media_queries_options .new-query{margin-top:25px}#maxbuttons .media_queries_options .new-query select{width:auto}#maxbuttons .media_option_prot,#maxbuttons #media_desc{display:none}#maxbuttons .copy-warning{width:400px;margin:0 auto;position:relative;line-height:1.1}#maxbuttons .copy-warning:before{content:"\f534";font-size:40px;color:#ff0000;width:35px;height:35px;font-family:"Dashicons";position:absolute;left:20px;top:40%;margin-top:-14px}#maxbuttons .copy-warning .example{margin-bottom:5px}#maxbuttons .form-actions a{margin-right:10px}#maxbuttons select{width:150px}#maxbuttons select.small{width:auto}#maxbuttons .input{display:inline-block;margin-right:15px;min-height:35px}#maxbuttons .input img{vertical-align:middle}#maxbuttons .input.mbcolor{min-width:50px}#maxbuttons .input.checkbox input{margin-top:0}#maxbuttons .input.checkbox label{line-height:16px;margin-top:0 !important}#maxbuttons input[type='text']{width:450px}@media (max-width: 780px){#maxbuttons input[type='text']{width:350px}}#maxbuttons input[type='text'].tiny{width:35px;vertical-align:middle}#maxbuttons input[type='text'].small{width:50px}#maxbuttons input[type='text'].medium{width:150px}#maxbuttons input[type='text'].tiny-nopad{width:35px}#maxbuttons input[type='number']{vertical-align:middle}#maxbuttons input[type='number'].tiny,#maxbuttons input[type='number'].tiny-nopad{width:55px}@media (max-width: 780px){#maxbuttons input[type='number'].tiny,#maxbuttons input[type='number'].tiny-nopad{width:60px}}#maxbuttons input[type='number'].small{width:70px}@media (max-width: 780px){#maxbuttons input[type='number'].small{width:75px}}#maxbuttons textarea{width:450px;height:80px}#maxbuttons .option-container .inside .option label.mbcolor:nth-of-type(2){margin-left:37px}#maxbuttons .option-container .inside .option.url{margin-bottom:0}#maxbuttons .option-container .inside .option.url_options{margin:5px 0 10px}#maxbuttons .option-container .inside .option.url_options .nofollow{margin-left:35px}#maxbuttons .option-container .inside .option.url_options label,#maxbuttons .option-container .inside .option.rel_options label{font-weight:400}#maxbuttons .option-container .inside .option.font .checkbox{margin-right:2px}#maxbuttons .option-container .inside .option.font .radio{margin-right:0}#maxbuttons .option-container .inside .option.font .input.font{margin-right:2px}#maxbuttons .option-container .inside .option.font .input.font_size{margin-right:0}#maxbuttons .option-container .inside .option.font .input.font_size:after{display:block}@media (max-width: 780px){#maxbuttons .option-container .inside .option.font{display:inline-block}#maxbuttons .option-container .inside .option.font:after{clear:both}#maxbuttons .option-container .inside .option.font>*{float:left}}#maxbuttons .option-container .inside .option.font .control-group.font_weight{margin-left:28px}@media (max-width: 780px){#maxbuttons .option-container .inside .option.font .control-group.font_weight{clear:left;margin-left:148px;margin-top:10px}}#maxbuttons .option-container .inside .option.font .control-group.text_align{margin-left:48px}@media (max-width: 780px){#maxbuttons .option-container .inside .option.font .control-group.text_align{margin-left:20px;margin-top:10px}}#maxbuttons .option-container .inside .option.padding_top .input,#maxbuttons .option-container .inside .option.container_margin_top .input{margin-right:30px}#maxbuttons .option-container .inside .option.padding_top .input:last-of-type,#maxbuttons .option-container .inside .option.container_margin_top .input:last-of-type{margin-right:0}@media (max-width: 780px){#maxbuttons .option-container .inside .option.padding_top .input,#maxbuttons .option-container .inside .option.container_margin_top .input{margin-right:15px}}#maxbuttons .option-container .inside .option.text_color label{padding-top:10px}#maxbuttons .option-container .inside .option.text_color label:nth-of-type(2){margin-left:51px}#maxbuttons .option-container .inside .option.description label{padding-top:35px}#maxbuttons .option-container .inside .option .radius-wrap{position:relative;margin-left:45px;display:inline-block}#maxbuttons .option-container .inside .option.radius .label:first-child{width:100px;float:left}#maxbuttons .option-container .inside .option.radius .bottom,#maxbuttons .option-container .inside .option.radius .top{position:relative}#maxbuttons .option-container .inside .option.radius .bottom .input,#maxbuttons .option-container .inside .option.radius .top .input{margin-right:0;margin-left:0}#maxbuttons .option-container .inside .option.radius .bottom .dashicons:nth-child(3),#maxbuttons .option-container .inside .option.radius .top .dashicons:nth-child(3){margin-right:10px}#maxbuttons .option-container .inside .option.radius .top{margin-bottom:10px}#maxbuttons .option-container .inside .option.radius label{display:inline-block;font-weight:700;width:90px;margin-left:5px;cursor:default}#maxbuttons .option-container .inside .option.radius .dashicons{font-size:35px;height:35px;width:35px;color:#ccc}#maxbuttons .option-container .inside .option.radius .top .dashicons{margin-top:-5px}#maxbuttons .option-container .inside .option.radius .bottom .dashicons{margin-top:5px}#maxbuttons .option-container .inside .option.radius #radius_toggle{position:absolute;left:46%;top:25px;font-size:30px;cursor:pointer}#maxbuttons .option-container .inside .option.gradient_head .label:nth-child(even){width:120px}#maxbuttons .option-container .inside .option .gradient_end_color,#maxbuttons .option-container .inside .option .gradient_end_color_hover{margin-left:58px}#maxbuttons .default{display:inline-block;padding-left:10px;padding-top:4px;font-style:italic;color:#808080}#maxbuttons .default .other{padding-left:40px;padding-top:8px}#maxbuttons .mb-button{width:38px;height:38px;background-color:#eceded;display:inline-block;margin-right:6px;cursor:pointer;display:none}#maxbuttons .mb-button span{text-align:center;padding:9px 0;width:100%;line-height:20px}#maxbuttons .check_button{display:none}#maxbuttons .check_button+label{background-position:center center;background-repeat:no-repeat;background-color:#fff;display:inline-block;border:1px solid #ddd;font_weight:normal;padding:4px}@media (max-width: 780px){#maxbuttons .check_button+label{padding:10px}}#maxbuttons .check_button.text+label{padding:5px}#maxbuttons .check_button.icon+label i{width:20px;height:20px;color:#545454}#maxbuttons .check_button.icon+label i:focus{outline:none}#maxbuttons .check_button:checked+label{background:#ebebeb none repeat scroll 0 0;border-color:#999999;box-shadow:0 2px 5px -3px rgba(0,0,0,0.3) inset}#maxbuttons .option .switch_label{padding-top:2px !important;margin:0 !important}#maxbuttons .switch_button{margin-left:-5px}#maxbuttons .switch_button label{padding:8px 5px}#maxbuttons .switch_button label:focus{outline:none}#maxbuttons .switch_button input{display:none}#maxbuttons .switch_button input:checked ~ .the_switch{background:#6fbeb5}#maxbuttons .switch_button input:checked ~ .the_switch:after{left:26px;background:#179588}#maxbuttons .switch_button input::disabled ~ .the_switch{background:#d5d5d5;pointer-events:none}#maxbuttons .switch_button input:disabled ~ .the_switch:after{background:#bcbdbc}#maxbuttons .switch_button .the_switch{position:relative;display:inline-block;height:15px;width:50px;background:#898989;border-radius:100px;cursor:pointer;transition:all 0.3s ease}#maxbuttons .switch_button .the_switch:after{position:absolute;left:-2px;top:-3px;display:block;width:24px;height:24px;border-radius:100px;background:#aaa;box-shadow:0px 3px 3px rgba(0,0,0,0.05);content:'';transition:all 0.2s ease}#maxbuttons .switch_button .the_switch:active:after{transform:scale(0.9, 0.85)}#maxbuttons .switch_button .the_switch:focus{outline:none}#maxbuttons .input.mbcolor{margin-top:5px;position:relative}#maxbuttons .input.mbcolor .wp-picker-clear{display:none}#maxbuttons .input.mbcolor input[type="text"]{width:75px;line-height:22px}#maxbuttons .input.mbcolor .wp-color-picker{width:inherit}#maxbuttons .input.mbcolor .wp-color-result{-webkit-box-shadow:-1px 1px 2px #999;-moz-box-shadow:-1px 1px 2px #999;box-shadow:-1px 1px 2px #999;height:30px;border:0;font-size:900px}#maxbuttons .input.mbcolor .wp-color-result:after{font-size:12px;line-height:30px;display:none}#maxbuttons .input.mbcolor .wp-color-result:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 5px rgba(30,140,190,0.8);-moz-box-shadow:0 0 5px rgba(30,140,190,0.8);box-shadow:0 0 5px rgba(30,140,190,0.8)}#maxbuttons .input.mbcolor .wp-picker-active+.arrows{display:inline-block}#maxbuttons .input.mbcolor .arrows{position:absolute;display:none;top:0;margin-top:40%}#maxbuttons .input.mbcolor .arrows.right{right:-45px}#maxbuttons .input.mbcolor .arrows.left{left:-35px}#maxbuttons .input.mbcolor .arrows .arrow-left,#maxbuttons .input.mbcolor .arrows .arrow-right{width:0;height:0;font-size:0;line-height:0;vertical-align:bottom;cursor:pointer}#maxbuttons .input.mbcolor .arrows .arrow-left{border-top:30px solid transparent;border-bottom:30px solid transparent;border-right:20px solid #ccc}#maxbuttons .input.mbcolor .arrows .arrow-right{border-top:30px solid transparent;border-bottom:30px solid transparent;border-left:20px solid #ccc;margin-top:35px}#maxbuttons .input.mbcolor .arrows .left,#maxbuttons .input.mbcolor .arrows .right{display:inline-block;float:left;clear:both;width:35px;height:45px}#maxbuttons .input.mbcolor .arrows .left{margin-top:15px}#maxbuttons .rss-feed{overflow:hidden;clear:both;margin-bottom:20px}#maxbuttons .rss-feed li{width:32%;margin-right:2%;float:left;margin-bottom:2%}#maxbuttons .rss-feed li:nth-child(3n){margin-right:0}#maxbuttons .rss-feed li a{min-height:110px;max-height:110px;overflow:hidden;background:#fff;width:100%;display:block;padding:10px;box-sizing:border-box;border:1px solid #bbb;text-decoration:none;transition:all 200ms;border-radius:2px}#maxbuttons .rss-feed li a:hover{background:#f9f9f9}#maxbuttons .rss-feed li a:hover span{color:#0074a2}#maxbuttons .rss-feed li a span{color:#2ea2cc;font-weight:bold;font-size:1.2em;line-height:1.5em}#maxbuttons .system_info{width:90%;background-color:#fff;border:1px solid #000;padding:15px}#maxbuttons .system_info .info{margin:5px 0}#maxbuttons .system_info .info label{width:250px;display:inline-block;clear:both}#maxbuttons.maxbuttons-settings .option-container .inside .option-design{margin:20px 0}#maxbuttons.maxbuttons-settings .option-container .inside .option-design label{line-height:14px;height:40px;vertical-align:top;width:200px}#maxbuttons h2.tabs{margin:1em 0;min-height:35px}#maxbuttons h2.sub-tabs,#maxbuttons h2.submit-tab{list-style:none;clear:both;margin-bottom:0}#maxbuttons h2.sub-tabs a,#maxbuttons h2.submit-tab a{font-weight:400;font-size:14px;cursor:pointer}#maxbuttons h2.sub-tabs a .dashicons,#maxbuttons h2.submit-tab a .dashicons{margin-right:10px;line-height:24px}#maxbuttons h2.sub-tabs .save-indicator,#maxbuttons h2.submit-tab .save-indicator{float:right;font-size:25px;display:none;margin-right:10px}#maxbuttons h2.sub-tabs .save-indicator.dashicons-warning,#maxbuttons h2.submit-tab .save-indicator.dashicons-warning{color:#ff0000}#maxbuttons h2.sub-tabs .save-indicator.dashicons-yes,#maxbuttons h2.submit-tab .save-indicator.dashicons-yes{color:#00ff00}#maxbuttons.mb_tabs_active .mb_tab{border:0px;background:none;border-radius:0 0 0 0;-webkit-border-radius:0 0 0 0}#maxbuttons.mb_tabs_active .mb_tab>.title:nth-of-type(1) button{top:0}#maxbuttons.mb_tabs_active .mb_tab>.title:nth-of-type(1) .right{float:right}#maxbuttons.mb_tabs_active .mb_tab>.inside{border:1px solid #e5e5e5}#maxbuttons.maxbuttons-collections-edit .main{width:100%;max-width:none}#maxbuttons .collection-addnew{display:inline-block}@media (max-width: 780px){#maxbuttons .collection-addnew{margin-left:5px}}#maxbuttons .collection_list .collection{position:relative;background-color:#fff;padding:15px;border-radius:15px;margin:15px 0}#maxbuttons .collection_list .collection h3{display:inline-block;width:90%;margin-top:0;font-size:18px;line-height:20px}#maxbuttons .collection_list .collection h3 a{color:#000;font-size:25px;text-decoration:none}#maxbuttons .collection_list .collection h3 a:hover{text-decoration:underline}#maxbuttons .collection_list .collection h3 .dashicons{color:#ccc;margin-left:15px}#maxbuttons .collection_list .collection h3 .button-count{font-weight:400;font-size:15px;margin-left:15px;vertical-align:top}#maxbuttons .collection_list .collection .collection_remove{top:10px;right:15px;font-size:25px;font-weight:400;position:absolute;cursor:pointer}#maxbuttons .collection_list .collection.welcome p{font-size:14px;line-height:22px}#maxbuttons .collection_list .collection-container{position:relative;width:100%;display:inline-block;clear:both}#maxbuttons .collection_list .collection-container .maxcollection{position:static !important}#maxbuttons .inside .preview_collection.option label{display:inline-block;float:none;font-size:25px;width:100%}#maxbuttons .mb_collection_selection{display:inline-block;min-height:300px;margin:25px 0}#maxbuttons .mb_collection_selection .sortable .item{margin-bottom:25px;position:relative;padding-left:30px;min-height:45px;clear:both}#maxbuttons .mb_collection_selection .sortable .item .button-remove{margin-top:5px;position:absolute;left:20px;top:-15px;border:1px solid #000;border-radius:11px;width:20px;height:20px;background-color:rgba(0,0,0,0.5)}#maxbuttons .mb_collection_selection .sortable .item .button-remove:hover{cursor:pointer}#maxbuttons .mb_collection_selection .sortable .item .button-remove span{color:#fff;font-size:16px;padding-top:2px;overflow:hidden}#maxbuttons .mb_collection_selection .sortable-placeholder{border:3px dashed #aaa;height:45px;width:344px;background:#ccc}#maxbuttons .mb_collection_selection .button_data{display:none}#maxbuttons .mb-social-options{float:right;width:45%;border:1px solid #000;height:100%}#maxbuttons .mb-buttons-selection{float:left;width:45%;overflow:hidden;border:1px solid #000}#maxbuttons .mb-preview-window{position:fixed;top:40%;right:20px;width:30%;max-width:45%;max-height:90vh;background-color:rgba(255,255,255,0.7);border:1px solid #000;z-index:500 !important;overflow:hidden;display:none}@media (max-width: 780px){#maxbuttons .mb-preview-window{position:relative;left:0;top:0;bottom:0;right:0;width:100%;height:auto;display:inline-block;border-color:#ccc}}#maxbuttons .mb-preview-window .mb-preview-wrapper{position:relative;display:inline-block;width:100%}#maxbuttons .sub-tabs .preview-on{background-color:#00b9eb;color:#fff}#maxbuttons .sub-tabs .preview-on::before{line-height:24px}#maxbuttons #picker-back{top:0;left:0;right:0;bottom:0;background-color:#000;z-index:110000;position:fixed;opacity:0.7;display:none}#maxbuttons #picker-modal,#maxbuttons .max-modal.picker-modal{display:none;width:calc(100% - 60px);min-height:300px;top:30px;bottom:30px;left:30px;right:30px;z-index:160000}#maxbuttons #picker-modal .modal_header,#maxbuttons .max-modal.picker-modal .modal_header{height:15px;display:block;overflow:hidden;top:0;left:0;bottom:0;right:0;border:0}#maxbuttons #picker-modal .picker-packages,#maxbuttons .max-modal.picker-modal .picker-packages{top:31px;left:0;width:205px;bottom:0;background-color:#f3f3f3;position:absolute;border-right:1px solid #ccc;overflow-x:hidden;overflow-y:auto}#maxbuttons #picker-modal .picker-packages ul,#maxbuttons .max-modal.picker-modal .picker-packages ul{margin-top:4px}#maxbuttons #picker-modal .picker-packages li a,#maxbuttons .max-modal.picker-modal .picker-packages li a{padding:6px 20px;display:block;color:#0073aa;text-decoration:none;font-size:13px;line-height:16px}#maxbuttons #picker-modal .picker-packages li a:hover,#maxbuttons .max-modal.picker-modal .picker-packages li a:hover{background:rgba(0,0,0,0.04) none repeat scroll 0 0;color:#21759b}#maxbuttons #picker-modal .picker-packages li a.pack-active,#maxbuttons .max-modal.picker-modal .picker-packages li a.pack-active{font-weight:700;color:#000}#maxbuttons #picker-modal .picker-main,#maxbuttons .max-modal.picker-modal .picker-main{left:206px;top:31px;right:0;bottom:60px;position:absolute;border-bottom:1px solid #dddddd;overflow-y:scroll;background-color:#fff}#maxbuttons #picker-modal .picker-main .screen,#maxbuttons .max-modal.picker-modal .picker-main .screen{margin:5px 5px}#maxbuttons #picker-modal .picker-main .screen .tablenav-pages,#maxbuttons .max-modal.picker-modal .picker-main .screen .tablenav-pages{float:none;margin-left:1%}#maxbuttons #picker-modal .picker-main .item,#maxbuttons .max-modal.picker-modal .picker-main .item{padding:5px;margin:5px 0 5px 1%;border:1px solid #000;width:16%;height:auto;float:left;text-align:center;position:relative;background-color:#eee;border:1px solid #b4b9be;display:inline-block}#maxbuttons #picker-modal .picker-main .item .button_data,#maxbuttons .max-modal.picker-modal .picker-main .item .button_data{display:none}#maxbuttons #picker-modal .picker-main .item .button_name,#maxbuttons .max-modal.picker-modal .picker-main .item .button_name{clear:left;display:block;margin-top:15px;font-size:9px}#maxbuttons #picker-modal .picker-main .item .button-selected,#maxbuttons .max-modal.picker-modal .picker-main .item .button-selected{position:absolute;font-size:20px;top:-10px;right:-10px;width:24px;height:24px;color:#fff;background-color:#1e8cbe;z-index:100;border-radius:12px}#maxbuttons #picker-modal .picker-main .item .button-selected span,#maxbuttons .max-modal.picker-modal .picker-main .item .button-selected span{padding-top:2px}#maxbuttons #picker-modal .picker-inselection,#maxbuttons .max-modal.picker-modal .picker-inselection{height:60px;display:block;position:absolute;bottom:0;right:0;left:206px;overflow:hidden}#maxbuttons #picker-modal .picker-inselection .info,#maxbuttons .max-modal.picker-modal .picker-inselection .info{height:60px;float:left;display:inline-block;padding:10px 15px;display:none}#maxbuttons #picker-modal .picker-inselection .info .clear-selection,#maxbuttons .max-modal.picker-modal .picker-inselection .info .clear-selection{color:#ff0000;display:block;padding:0}#maxbuttons #picker-modal .picker-inselection .info .clear-selection:hover,#maxbuttons .max-modal.picker-modal .picker-inselection .info .clear-selection:hover{background-color:#ff0000;color:#fff}#maxbuttons #picker-modal .picker-inselection .items,#maxbuttons .max-modal.picker-modal .picker-inselection .items{display:inline-block;position:absolute;overflow:hidden;padding-top:5px;height:100%;left:130px;right:180px}@media (max-width: 780px){#maxbuttons #picker-modal .picker-inselection .items,#maxbuttons .max-modal.picker-modal .picker-inselection .items{display:none}}#maxbuttons #picker-modal .picker-inselection .items .item,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item{height:40px;width:40px;overflow:hidden;float:left;margin:3px;position:relative}#maxbuttons #picker-modal .picker-inselection .items .item .button_name,#maxbuttons #picker-modal .picker-inselection .items .item .button_data,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item .button_name,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item .button_data{display:none}#maxbuttons #picker-modal .picker-inselection .items .item .button-remove,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item .button-remove{display:none;position:absolute;width:30px;height:30px;left:2px;border-radius:15px;top:2px;background-color:rgba(0,0,0,0.5)}#maxbuttons #picker-modal .picker-inselection .items .item .button-remove span,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item .button-remove span{font-size:20px;color:#fff;padding-left:5px;padding-top:5px}#maxbuttons #picker-modal .picker-inselection .items .item:hover .button-remove,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item:hover .button-remove{display:block}#maxbuttons #picker-modal .picker-inselection .add,#maxbuttons .max-modal.picker-modal .picker-inselection .add{float:right;margin-top:15px;margin-right:15px;height:100%}#maxbuttons .social_block .social-option{clear:both;margin-top:25px}#maxbuttons .social_block .social-option .shortcode-container{display:inline-block}#maxbuttons .social_block .social-option .button_name{display:inline-block;margin-left:10px;vertical-align:middle;font-weight:700}#maxbuttons #mbfeedback .link{height:25px;width:100px;position:fixed;top:40%;right:0;z-index:1000;transform:rotate(90deg);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-o-transform:rotate(90deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1)}#maxbuttons #mbfeedback .link a{background:#ccc;height:25px;width:70px;padding:8px 16px;color:#fff;font-family:Arial, sans-serif;font-size:15px;font-weight:bold;text-decoration:none;line-height:15px;border-bottom:solid 1px #333;border-left:solid 1px #333;border-right:solid 1px #fff}#maxbuttons #mbfeedback .link a::hover{background:#06c}#maxbuttons .ad-wrap{width:27%;float:left;max-width:300px;margin-left:1%;min-width:200px;margin-top:41px}#maxbuttons .ad-wrap .ads{background:#fff;margin-bottom:20px;text-align:center}#maxbuttons .ad-wrap .ads.image-ad{background:none;margin-top:20px}#maxbuttons .ad-wrap .ads.image-ad img{max-width:100%}#maxbuttons .ad-wrap .ads>a{text-decoration:none}#maxbuttons .ad-wrap .ads .header{background-color:#88c5c2;color:#fff;font-size:18px;text-transform:uppercase;padding:12px}#maxbuttons .ad-wrap .ads h3{text-align:center;padding-bottom:14px}#maxbuttons .ad-wrap .ads ul{list-style:none}#maxbuttons .ad-wrap .ads ul li{font-weight:bold;text-decoration:none;color:#000000}#maxbuttons .ad-wrap .ads ul li.plus{font-size:38px;font-weight:700;color:#88c5c2}#maxbuttons .ad-wrap .ads span.img{text-align:center;display:block}#maxbuttons .ad-wrap .ads .ads_button_wrap{margin:20px 0 30px;display:inline-block}#maxbuttons .ad-wrap .ads .ads_button_wrap .button{color:#fff;background-color:#88c5c2;font-size:16px;font-weight:bold;border:0;padding:0 40px}@media screen and (max-width: 960px){#maxbuttons .ad-wrap{display:none}}#maxbuttons.maxbuttons-pro-gopro .main{width:95%;max-width:860px}#maxbuttons.maxbuttons-pro-gopro h1.title{margin:0;font-size:24px;display:inline-block}#maxbuttons.maxbuttons-pro-gopro h1.title .big-maxg-btn{display:inline-block;background-color:#86c5c2;border-color:#73a3a8;margin:0 10px;vertical-align:super;line-height:23px;border-top:0;border-left:0;border-right:0;top:5px}#maxbuttons.maxbuttons-pro-gopro h1.title img{vertical-align:middle}#maxbuttons.maxbuttons-pro-gopro .logo{margin:0;display:inline-block;margin-top:14px}#maxbuttons.maxbuttons-pro-gopro .logo .simple-btn{color:#62c0e6;text-decoration:underline}#maxbuttons.maxbuttons-pro-gopro .default-section{text-align:center;padding:0px 10px}#maxbuttons.maxbuttons-pro-gopro .default-section p{position:relative;font-family:Arial, 'Helvetica Neue', Helvetica, sans-serif;font-size:16px;margin:17px 0;color:#5b5b5b}#maxbuttons.maxbuttons-pro-gopro .default-section:nth-child(even){background-color:#fff}#maxbuttons.maxbuttons-pro-gopro .default-section:nth-child(odd){background-color:#faf5f1}#maxbuttons.maxbuttons-pro-gopro .default-section .big-maxg-btn{background-color:#fd8d61;border-color:#f0702b;font-size:36px;margin:10px}#maxbuttons.maxbuttons-pro-gopro .default-section h2{font-family:'Quicksand', sans-serif;font-weight:bold;color:#88c5c2;font-size:36px;line-height:38px;max-width:80%;margin:14px auto}#maxbuttons.maxbuttons-pro-gopro .default-section .rating{width:380px;margin:0 auto}#maxbuttons.maxbuttons-pro-gopro .default-section .rating p{margin:10px 0 0;font-size:22px;color:#000}#maxbuttons.maxbuttons-pro-gopro .default-section .icon-row p{font-weight:bold}#maxbuttons.maxbuttons-pro-gopro .default-section .icon-row img{width:106px;height:106px}#maxbuttons.maxbuttons-pro-gopro .social-row div{margin-bottom:5px}#maxbuttons.maxbuttons-pro-gopro .social-row p{background:#fff;padding:15px 5px 0 5px;margin:15px 0 0 15px;font-weight:700}#maxbuttons.maxbuttons-pro-gopro .social-row img{margin-top:15px}#maxbuttons.maxbuttons-pro-gopro .social-row p{min-height:162px}#maxbuttons.maxbuttons-pro-gopro .container{width:inherit;margin:0 auto;padding:30px 0}#maxbuttons.maxbuttons-pro-gopro img{max-width:100%}#maxbuttons.maxbuttons-pro-gopro .icon-row,#maxbuttons.maxbuttons-pro-gopro .image-row{position:relative}#maxbuttons.maxbuttons-pro-gopro .width-100{width:100%;margin-bottom:15px}#maxbuttons.maxbuttons-pro-gopro .width-33{width:33.33333333%;float:left;padding:0 15px;margin:0 -15px 40px}#maxbuttons.maxbuttons-pro-gopro .width-50{width:50%;float:left;padding:0 15px;margin:0 -15px 40px}#maxbuttons.maxbuttons-pro-gopro .clearfix{clear:both}#maxbuttons.maxbuttons-pro-gopro .bordered{border-radius:30px;padding:16px;background-color:#fff;box-sizing:border-box}@media (max-width: 780px){#maxbuttons.maxbuttons-pro-gopro .bordered{border:0;padding:8}}#maxbuttons.maxbuttons-pro-gopro .bordered p{margin:0 0 10px}#maxbuttons.maxbuttons-pro-gopro .inline-block{display:inline-block !important;vertical-align:middle}#maxbuttons.maxbuttons-pro-gopro .big-maxg-btn{font-family:'Quicksand', sans-serif;font-size:20px;color:#fff;font-weight:bold;padding:10px 15px;transition:all linear .2s;display:block;text-align:center;border-bottom:4px solid;text-transform:uppercase;border-radius:10px;text-decoration:none;line-height:42px}#maxbuttons.maxbuttons-pro-gopro .big-maxg-btn:hover,#maxbuttons.maxbuttons-pro-gopro .big-maxg-btn:focus{color:#fff;text-decoration:none;outline:none}#maxbuttons.maxbuttons-pro-gopro .big-maxg-btn:hover{box-shadow:0 8px 6px -6px rgba(0,0,0,0.5)}.maxmodal-data{display:none}.max-modal{display:none;width:60%;max-width:70%;height:auto;max-height:90vh;overflow:hidden;position:fixed;left:50%;top:50%;z-index:100101;display:none;background:#ffffff;border-radius:4px 4px 4px 4px;-webkit-border-radius:4px 4px 4px 4px;-webkit-box-shadow:-3px -3px 10px rgba(0,0,0,0.5);-moz-box-shadow:-3px -3px 10px rgba(0,0,0,0.5);box-shadow:-3px -3px 10px rgba(0,0,0,0.5)}@media (max-width: 960px){.max-modal{max-width:90%}}@media (max-width: 780px){.max-modal{max-width:100%}}.max-modal.success{border:4px solid green}.max-modal.error{border:4px solid red}.max-modal.error h3{background-color:#ff0000}.max-modal .content-area{background-color:#fff}.max-modal .modal_header{text-align:center;font-size:16px;font-weight:700;background-color:#f3f3f3;border-bottom:1px solid #ccc;padding:8px 5px;cursor:move}.max-modal .modal_header h3{margin:0;color:#444;font-weight:400;padding:0;text-align:center;text-shadow:none;font-size:16px}.max-modal .modal_header .modal_close{position:absolute;right:5px;top:8px;width:20px;height:20px;cursor:pointer;color:#444}.max-modal .modal_header .modal_close:hover{cursor:pointer;color:#111}.max-modal .content,.max-modal .modal_content{text-align:center;padding:5px 15px 10px;height:auto;overflow-y:auto}.max-modal textarea{overflow-x:auto}.max-modal .controls{padding:10px;text-align:center;clear:both}.max-modal .controls .button,.max-modal .controls .button-primary{margin-right:8px}.max-modal .tablenav .tablenav-pages a,.max-modal .tablenav-pages-navspan{background:#e5e5e5 none repeat scroll 0 0;border:1px solid #cccccc;display:inline-block;font-size:16px;font-weight:normal;line-height:1;min-width:17px;padding:3px 5px 7px;text-align:center}.max-modal textarea#maxbutton-css{width:100%;height:250px;font-family:Consolas, 'Courier New', 'Courier';font-size:13px;white-space:normal;word-wrap:break-word;overflow:none}.maxmodal_overlay{background:#000;left:0;right:0;bottom:0;top:0;height:100%;position:fixed;opacity:0.7;z-index:100100;display:none}.media-buttons #maxbuttons{margin:0;overflow-y:auto}.media-buttons #maxbuttons .preview-buttons{border:0;clear:both}.media-buttons #maxbuttons .preview-buttons .hint{font-size:12px;float:left;display:inline-block;line-height:30px;margin-top:3px}.media-buttons #maxbuttons .button-select{cursor:pointer;border:1px solid #fff}.media-buttons #maxbuttons .button-select.selected{border-top:1px solid #0085ba;border-bottom:1px solid #0085ba;background:#f7f7f7}.media-buttons #maxbuttons .button-select.selected .col_insert .small{font-weight:700}.media-buttons #maxbuttons .col_insert{width:150px;padding-top:15px}.media-buttons #maxbuttons .col_insert .small{font-size:10px}.media-buttons .pagination{width:100%;margin:10px 0;min-height:20px}.media-buttons .pagination span{font-size:15px;font-weight:700;float:left;cursor:pointer}.media-buttons .pagination .next{float:right}.media-buttons .shortcode_options{width:400px;margin:0 auto;display:inline-block}.media-buttons .shortcode_options .button_example{margin:15px}.media-buttons .shortcode_options input{margin-bottom:10px;display:inline-block;float:left}.media-buttons .shortcode_options label{margin-right:25px;display:inline-block;float:left;clear:left;width:100px;line-height:20px;font-weight:700}.media-buttons .shortcode_options p{clear:both}.media-buttons .shortcode_options input[type='button']{clear:both;float:none}.media-buttons .loading{background:transparent url("../../images/spinner.gif") no-repeat scroll 0 0/20px 20px;display:inline-block;float:right;margin:5px 5px 0 0;height:40px;opacity:0.7;vertical-align:middle;visibility:hidden;width:40px}.media-buttons .controls{position:absolute;width:100%;padding:10px 0;background:#f3f3f3;text-align:right;bottom:0;left:0;border-top:1px solid #ccc}
1
+ .mb_colorpicker{z-index:200}.ads .button-primary{display:block;margin:0 auto 20px auto;width:210px;text-align:center;overflow:visible}#maxbuttons{display:inline-block;width:100%}#maxbuttons .message,#maxbuttons .mb-message{border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;padding:10px;margin:10px 0px 20px 0px;clear:both}#maxbuttons .main{position:relative;z-index:500;margin-top:15px;width:72%;float:left}#maxbuttons .mb-message.error{font-weight:700}#maxbuttons .mb-message.shortcode,#maxbuttons .mb-message.mb-notice{border:solid 1px #e6db55;background-color:#ffffe0}#maxbuttons .button-bar,#maxbuttons .form-actions,#maxbuttons.mb_tabs_active .mb_tab>.title:nth-of-type(1){margin:15px 0;padding:10px;background:#fbfbfb none repeat scroll 0 0;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.04);box-shadow:0 1px 1px rgba(0,0,0,0.04);min-height:28px}#maxbuttons h1>span{vertical-align:top;float:left}@media (max-width: 1024px){#maxbuttons h1>span{float:none}}#maxbuttons .logo{font-weight:400;font-size:13px;overflow:hidden;text-align:center}@media (max-width: 1024px){#maxbuttons .logo{text-align:left;margin-top:15px}}#maxbuttons .logo img{vertical-align:middle;padding-left:5px;padding-right:5px}#maxbuttons .logo .fb-like{margin-top:5px;height:20px;padding:0;margin-left:180px;overflow:hidden}#maxbuttons .logo .fb-like span{vertical-align:top !important}#maxbuttons .dummy-heading{display:none}@media screen and (max-width: 960px){#maxbuttons .main{width:100%}}#maxbuttons .tablenav .input-paging{width:55px}#maxbuttons .ads ul li{margin-bottom:4px}#maxbuttons .preview-buttons{background-color:#fff;border:1px solid #dfdfdf;overflow:hidden}#maxbuttons .preview-buttons .heading{width:100%;clear:both;display:inline-block;border-bottom:1px solid #dfdfdf}#maxbuttons .preview-buttons .heading>span{display:inline-block;font-weight:700;font-size:14px;float:left}#maxbuttons .preview-buttons .button-row{width:100%;clear:both;display:inline-block;border-bottom:1px solid #dfdfdf}#maxbuttons .preview-buttons .button-row>span{display:inline-block;font-size:13px;float:left;overflow:hidden}#maxbuttons .preview-buttons .button-row .actions{margin:10px 0;padding:10px 0px 10px 8px;display:inline-block;z-index:11;width:50%;background-color:#fff;position:relative}#maxbuttons .preview-buttons .col{padding:10px 0 10px 1%}#maxbuttons .preview-buttons .col_check{width:20px}#maxbuttons .preview-buttons .col_button{width:60%;overflow:hidden}@media (max-width: 780px){#maxbuttons .preview-buttons .col_button{width:70%;margin-right:5%}}#maxbuttons .preview-buttons .col_name{width:15%}@media (max-width: 780px){#maxbuttons .preview-buttons .col_name{display:none !important}}#maxbuttons .preview-buttons .col_shortcode{width:15%;padding-right:0}#maxbuttons p.status a{text-decoration:none}#maxbuttons p.status span.count{color:#999999}#maxbuttons .button-list{margin-top:10px}#maxbuttons .button-list p{font-size:13px}#maxbuttons .button-list a{text-decoration:none}#maxbuttons .button-list a.button-name{font-weight:bold}#maxbuttons .button-list .shortcode-container{margin:10px 0px 10px 2px}#maxbuttons .button-list .collection_notice{text-align:right;margin:10px 5px 0 0;padding-top:10px;float:right}#maxbuttons .shortcode-container .mb-container{margin:0 !important;float:none !important;max-width:100% !important}#maxbuttons .shortcode-container .mb-center{text-align:left !important}#maxbuttons .pagination-links a.disabled{color:#aaa;cursor:default}#maxbuttons .pagination-links a.disabled:hover{background:#e4e4e4 none repeat scroll 0 0;cursor:default;border:1px solid #d2d2d2}#maxbuttons .pagination{width:100%;display:inline-block;margin:15px 0 5px}#maxbuttons .pagination li{float:left;margin-right:5px}#maxbuttons .pagination li a,#maxbuttons .pagination li span{background:#ccc;vertical-align:middle;padding:4px 10px 8px;height:15px;display:inline-block;border:1px solid #eee;text-decoration:none;font-size:14px;font-weight:bold}#maxbuttons.maxbuttons-controller-edit .main,#maxbuttons.maxbuttons-controller-button .main{width:auto;max-width:1200px}#maxbuttons .option-container{margin-bottom:20px;border:solid 1px #cccccc;border-radius:3px 3px 3px 3px;-webkit-border-radius:3px 3px 3px 3px;background-color:#fff}#maxbuttons .option-container .title{font-size:18px;padding:9px 8px 9px 10px;text-align:left;text-shadow:0px 1px 0px #ffffff;position:relative}#maxbuttons .option-container .section-title{padding:15px;margin-top:10px;font-weight:700;font-size:16px}#maxbuttons .option-container .section-title{background-color:#fff}#maxbuttons .option-container .option-list{display:inline-block}#maxbuttons .option-container .option-list:after{clear:both}#maxbuttons .option-container .option-list .help{float:right;margin-top:5px}#maxbuttons .option-container .help{position:relative;width:18px;height:18px;font-size:18px;margin-left:10px}#maxbuttons .option-container .help span{font-family:"Open Sans",sans-serif;font-size:12px;background-color:#fff;color:#000;position:absolute;display:none;padding:10px 5px;top:-7px;left:25px;min-width:150px;border-radius:5px;text-align:center;z-index:1000;border:1px solid #ccc;line-height:15px}#maxbuttons .option-container .help:hover span{display:block}#maxbuttons .option-container>.inside{padding:10px 15px 10px 15px;border-top:solid 1px #cccccc;background-color:#ffffff}#maxbuttons .option-container>.inside .option,#maxbuttons .option-container>.inside .option-design{margin-bottom:10px;display:block;position:relative}#maxbuttons .option-container>.inside .option .label,#maxbuttons .option-container>.inside .option>label,#maxbuttons .option-container>.inside .option-design .label,#maxbuttons .option-container>.inside .option-design>label{display:inline-block;font-weight:bold;padding-left:3px;padding-top:5px;width:145px;vertical-align:top;cursor:default;min-height:25px}#maxbuttons .option-container>.inside .option .label[for],#maxbuttons .option-container>.inside .option>label[for],#maxbuttons .option-container>.inside .option-design .label[for],#maxbuttons .option-container>.inside .option-design>label[for]{cursor:pointer}@media (max-width: 780px){#maxbuttons .option-container>.inside .option .label,#maxbuttons .option-container>.inside .option>label,#maxbuttons .option-container>.inside .option-design .label,#maxbuttons .option-container>.inside .option-design>label{font-size:14px}}#maxbuttons .option-container>.inside .option:after,#maxbuttons .option-container>.inside .option:before,#maxbuttons .option-container>.inside .option-design:after,#maxbuttons .option-container>.inside .option-design:before{clear:both}#maxbuttons .option-container>.inside .option label{margin-top:2px}#maxbuttons .option-container>.inside .option label.mbcolor{margin-top:5px}#maxbuttons .option-container>.inside .option label:nth-of-type(2){margin-left:30px;width:115px}#maxbuttons .option-container>.inside .option .control-group{display:inline-block}#maxbuttons .option-container>.inside .option .rotate-left{-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg);filter:progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=cos(-45), M12=-sin(-45), M21=sin(-45), M22=cos(-45));-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=cos(-45), M12=-sin(-45), M21=sin(-45), M22=cos(-45))";zoom:1}#maxbuttons .option-container>.inside .option .rotate-right{-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg);filter:progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=cos(45), M12=-sin(45), M21=sin(45), M22=cos(45));-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=cos(45), M12=-sin(45), M21=sin(45), M22=cos(45))";zoom:1}#maxbuttons .option-design{margin-bottom:10px}#maxbuttons .option-design .input td div.cell-label{padding:1px 10px 0px 5px;font-weight:bold;border-bottom:solid 1px #d1d1d1;width:180px;font-size:13px;height:30px}#maxbuttons .option-design .default-other{font-size:13px}#maxbuttons .option p.note,#maxbuttons .option-design p.note{font-style:italic;display:inline-block;clear:both;color:#808080;padding-left:3px;margin-top:10px;margin-bottom:5px;margin-left:0;display:block}#maxbuttons .mb-message.shortcode .expanded,#maxbuttons .mb-message.mb-notice .expanded{display:none}#maxbuttons .mb-message.shortcode .expanded .example strong,#maxbuttons .mb-message.mb-notice .expanded .example strong{width:300px;display:inline-block}#maxbuttons .mb-message.shortcode .shortcode-expand,#maxbuttons .mb-message.mb-notice .shortcode-expand{float:right;cursor:pointer}@media (max-width: 1024px){#maxbuttons .mb-message.shortcode .shortcode-expand,#maxbuttons .mb-message.mb-notice .shortcode-expand{float:none;text-align:left;margin:10px 0;display:block}}#maxbuttons .manual-box{float:right;margin:3px 15px;top:0;right:0}#maxbuttons .manual-box a{text-align:center;width:100%;background:#e0e0e0 none repeat scroll 0 0;font-size:13px;font-weight:600;margin-left:4px;margin-top:5px;padding:4px 8px;position:relative;text-decoration:none;text-shadow:none}#maxbuttons .manual-entry{display:none;position:absolute;border:1px solid #000;background:#fff;width:45%;right:25px;z-index:199;box-sizing:border-box;padding-bottom:20px}#maxbuttons .manual-entry h3{font-size:18px;width:calc(100%);box-sizing:border-box;padding:10px 0;border-bottom:1px solid #ccc;text-align:center;margin:0;padding-right:35px;position:relative}#maxbuttons .manual-entry h3 span{box-sizing:border-box;cursor:pointer;width:35px;height:100%;font-size:25px;display:inline-block;position:absolute;right:5px;top:0;padding-top:8px}#maxbuttons .manual-entry h4,#maxbuttons .manual-entry p,#maxbuttons .manual-entry ol,#maxbuttons .manual-entry ul{padding:0 15px}#maxbuttons .manual-entry h4{font-size:16px}#maxbuttons .manual-entry p{font-size:13px}#maxbuttons .output{position:fixed;top:45px;right:20px;background-color:#ffffff;border:solid 1px #414141;box-shadow:0px 0px 6px #808080;z-index:99;width:auto;min-width:300px}@media (max-width: 780px){#maxbuttons .output{-webkit-box-shadow:0 0 0 0;-moz-box-shadow:0 0 0 0;box-shadow:0 0 0 0;top:0;left:0;right:0;position:relative;margin-bottom:15px;border-color:#ccc}}#maxbuttons .output .header{color:#222222;background-color:#ffffff;border-bottom:solid 1px #cccccc;font-family:"Open Sans", sans-serif;font-size:16px;font-weight:bold;padding:8px 0px 8px 10px;cursor:move;position:relative}#maxbuttons .output .header .preview-toggle{float:right;font-size:30px;width:30px;position:absolute;top:3px;right:0}#maxbuttons .output .inner{padding:5px}#maxbuttons .output .inner p{padding:5px 0 5px 5px}#maxbuttons .output .input.mbcolor{float:left;position:relative;margin-top:5px}#maxbuttons .output .input.mbcolor .wp-picker-container.wp-picker-active{padding:15px;border:1px solid #ccc;background-color:#fff;position:absolute;bottom:-15px;left:-270px;z-index:102;-webkit-box-shadow:4px 1px 5px #ccc;-moz-box-shadow:4px 1px 5px #ccc;box-shadow:4px 1px 5px #ccc}#maxbuttons .output .note{float:left;margin:8px 0px 0px 10px}#maxbuttons .output .result{padding:20px 5px}#maxbuttons .output .result p{padding:5px 0px 5px 0px;margin:0}#maxbuttons .output .result.preview-border-box>*{box-sizing:border-box}#maxbuttons .conditional-option{display:none}#maxbuttons .media_query{width:640px;margin:0 20px 15px 0;border:1px solid #ccc;padding:10px 15px;display:inline-block;clear:both;position:relative}#maxbuttons .media_query .removebutton{position:absolute;right:10px;top:10px;cursor:pointer;z-index:100;padding:10px 5px}#maxbuttons .media_query input:after{clear:both}#maxbuttons .media_query .label{clear:both;margin-bottom:15px}#maxbuttons .media_query label.title{padding:0;font-size:20px}#maxbuttons .media_query .custom.hidden{display:none}#maxbuttons .media_query .option.custom label:nth-of-type(2){margin-left:95px}#maxbuttons .media_query .description{padding:15px 0px;text-align:left}#maxbuttons .media_query select{width:60px}#maxbuttons .media_query .input input{margin-top:0px;padding-top:2px}#maxbuttons .media_queries_options .new-query{margin-top:25px}#maxbuttons .media_queries_options .new-query select{width:auto}#maxbuttons .media_option_prot,#maxbuttons #media_desc{display:none}#maxbuttons .copy-warning{width:400px;margin:0 auto;position:relative;line-height:1.1}#maxbuttons .copy-warning:before{content:"\f534";font-size:40px;color:#ff0000;width:35px;height:35px;font-family:"Dashicons";position:absolute;left:20px;top:40%;margin-top:-14px}#maxbuttons .copy-warning .example{margin-bottom:5px}#maxbuttons .form-actions a{margin-right:10px}#maxbuttons select{width:150px}#maxbuttons select.small{width:auto}#maxbuttons .input{display:inline-block;margin-right:15px;min-height:35px}#maxbuttons .input img{vertical-align:middle}#maxbuttons .input.mbcolor{min-width:50px}#maxbuttons .input.checkbox input{margin-top:0}#maxbuttons .input.checkbox label{line-height:16px;margin-top:0 !important}#maxbuttons input[type='text']{width:450px}@media (max-width: 780px){#maxbuttons input[type='text']{width:350px}}#maxbuttons input[type='text'].tiny{width:35px;vertical-align:middle}#maxbuttons input[type='text'].small{width:50px}#maxbuttons input[type='text'].medium{width:150px}#maxbuttons input[type='text'].tiny-nopad{width:35px}#maxbuttons input[type='number']{vertical-align:middle}#maxbuttons input[type='number'].tiny,#maxbuttons input[type='number'].tiny-nopad{width:55px}@media (max-width: 780px){#maxbuttons input[type='number'].tiny,#maxbuttons input[type='number'].tiny-nopad{width:60px}}#maxbuttons input[type='number'].small{width:70px}@media (max-width: 780px){#maxbuttons input[type='number'].small{width:75px}}#maxbuttons textarea{width:450px;height:80px}#maxbuttons .option-container .inside .option label.mbcolor:nth-of-type(2){margin-left:37px}#maxbuttons .option-container .inside .option.url{margin-bottom:0}#maxbuttons .option-container .inside .option.url_options{margin:5px 0 10px}#maxbuttons .option-container .inside .option.url_options .nofollow{margin-left:35px}#maxbuttons .option-container .inside .option.url_options label,#maxbuttons .option-container .inside .option.rel_options label{font-weight:400}#maxbuttons .option-container .inside .option.font .checkbox{margin-right:2px}#maxbuttons .option-container .inside .option.font .radio{margin-right:0}#maxbuttons .option-container .inside .option.font .input.font{margin-right:2px}#maxbuttons .option-container .inside .option.font .input.font_size{margin-right:0}#maxbuttons .option-container .inside .option.font .input.font_size:after{display:block}@media (max-width: 780px){#maxbuttons .option-container .inside .option.font{display:inline-block}#maxbuttons .option-container .inside .option.font:after{clear:both}#maxbuttons .option-container .inside .option.font>*{float:left}}#maxbuttons .option-container .inside .option.font .control-group.font_weight{margin-left:28px}@media (max-width: 780px){#maxbuttons .option-container .inside .option.font .control-group.font_weight{clear:left;margin-left:148px;margin-top:10px}}#maxbuttons .option-container .inside .option.font .control-group.text_align{margin-left:48px}@media (max-width: 780px){#maxbuttons .option-container .inside .option.font .control-group.text_align{margin-left:20px;margin-top:10px}}#maxbuttons .option-container .inside .option.padding_top .input,#maxbuttons .option-container .inside .option.container_margin_top .input{margin-right:30px}#maxbuttons .option-container .inside .option.padding_top .input:last-of-type,#maxbuttons .option-container .inside .option.container_margin_top .input:last-of-type{margin-right:0}@media (max-width: 780px){#maxbuttons .option-container .inside .option.padding_top .input,#maxbuttons .option-container .inside .option.container_margin_top .input{margin-right:15px}}#maxbuttons .option-container .inside .option.text_color label{padding-top:10px}#maxbuttons .option-container .inside .option.text_color label:nth-of-type(2){margin-left:51px}#maxbuttons .option-container .inside .option.description label{padding-top:35px}#maxbuttons .option-container .inside .option .radius-wrap{position:relative;margin-left:45px;display:inline-block}#maxbuttons .option-container .inside .option.radius .label:first-child{width:100px;float:left}#maxbuttons .option-container .inside .option.radius .bottom,#maxbuttons .option-container .inside .option.radius .top{position:relative}#maxbuttons .option-container .inside .option.radius .bottom .input,#maxbuttons .option-container .inside .option.radius .top .input{margin-right:0;margin-left:0}#maxbuttons .option-container .inside .option.radius .bottom .dashicons:nth-child(3),#maxbuttons .option-container .inside .option.radius .top .dashicons:nth-child(3){margin-right:10px}#maxbuttons .option-container .inside .option.radius .top{margin-bottom:10px}#maxbuttons .option-container .inside .option.radius label{display:inline-block;font-weight:700;width:90px;margin-left:5px;cursor:default}#maxbuttons .option-container .inside .option.radius .dashicons{font-size:35px;height:35px;width:35px;color:#ccc}#maxbuttons .option-container .inside .option.radius .top .dashicons{margin-top:-5px}#maxbuttons .option-container .inside .option.radius .bottom .dashicons{margin-top:5px}#maxbuttons .option-container .inside .option.radius #radius_toggle{position:absolute;left:46%;top:25px;font-size:30px;cursor:pointer}#maxbuttons .option-container .inside .option.gradient_head .label:nth-child(even){width:120px}#maxbuttons .option-container .inside .option .gradient_end_color,#maxbuttons .option-container .inside .option .gradient_end_color_hover{margin-left:58px}#maxbuttons .default{display:inline-block;padding-left:10px;padding-top:4px;font-style:italic;color:#808080}#maxbuttons .default .other{padding-left:40px;padding-top:8px}#maxbuttons .mb-button{width:38px;height:38px;background-color:#eceded;display:inline-block;margin-right:6px;cursor:pointer;display:none}#maxbuttons .mb-button span{text-align:center;padding:9px 0;width:100%;line-height:20px}#maxbuttons .check_button{display:none}#maxbuttons .check_button+label{background-position:center center;background-repeat:no-repeat;background-color:#fff;display:inline-block;border:1px solid #ddd;font_weight:normal;padding:4px}@media (max-width: 780px){#maxbuttons .check_button+label{padding:10px}}#maxbuttons .check_button.text+label{padding:5px}#maxbuttons .check_button.icon+label i{width:20px;height:20px;color:#545454}#maxbuttons .check_button.icon+label i:focus{outline:none}#maxbuttons .check_button:checked+label{background:#ebebeb none repeat scroll 0 0;border-color:#999999;box-shadow:0 2px 5px -3px rgba(0,0,0,0.3) inset}#maxbuttons .option .input_label{display:inline-block;vertical-align:top}#maxbuttons .option .input_label.left{margin-right:10px}#maxbuttons .option .input_label.right{margin-left:10px}#maxbuttons .option .range_value{margin-top:5px}#maxbuttons .option .range_value output{clear:both;font-size:18px;text-align:center;width:100%;display:inline-block}#maxbuttons .option .switch_label{padding-top:2px !important;margin:0 !important}#maxbuttons .switch_button{margin-left:-5px}#maxbuttons .switch_button label{padding:8px 5px}#maxbuttons .switch_button label:focus{outline:none}#maxbuttons .switch_button input{display:none}#maxbuttons .switch_button input:checked ~ .the_switch{background:#6fbeb5}#maxbuttons .switch_button input:checked ~ .the_switch:after{left:26px;background:#179588}#maxbuttons .switch_button input::disabled ~ .the_switch{background:#d5d5d5;pointer-events:none}#maxbuttons .switch_button input:disabled ~ .the_switch:after{background:#bcbdbc}#maxbuttons .switch_button .the_switch{position:relative;display:inline-block;height:15px;width:50px;background:#898989;border-radius:100px;cursor:pointer;transition:all 0.3s ease}#maxbuttons .switch_button .the_switch:after{position:absolute;left:-2px;top:-3px;display:block;width:24px;height:24px;border-radius:100px;background:#aaa;box-shadow:0px 3px 3px rgba(0,0,0,0.05);content:'';transition:all 0.2s ease}#maxbuttons .switch_button .the_switch:active:after{transform:scale(0.9, 0.85)}#maxbuttons .switch_button .the_switch:focus{outline:none}#maxbuttons .input.mbcolor{margin-top:5px;position:relative}#maxbuttons .input.mbcolor .wp-picker-clear{display:none}#maxbuttons .input.mbcolor input[type="text"]{width:75px;line-height:22px}#maxbuttons .input.mbcolor .wp-color-picker{width:inherit}#maxbuttons .input.mbcolor .wp-color-result{-webkit-box-shadow:-1px 1px 2px #999;-moz-box-shadow:-1px 1px 2px #999;box-shadow:-1px 1px 2px #999;height:30px;border:0;font-size:900px}#maxbuttons .input.mbcolor .wp-color-result:after{font-size:12px;line-height:30px;display:none}#maxbuttons .input.mbcolor .wp-color-result:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 5px rgba(30,140,190,0.8);-moz-box-shadow:0 0 5px rgba(30,140,190,0.8);box-shadow:0 0 5px rgba(30,140,190,0.8)}#maxbuttons .input.mbcolor .wp-picker-active+.arrows{display:inline-block}#maxbuttons .input.mbcolor .arrows{position:absolute;display:none;top:0;margin-top:40%}#maxbuttons .input.mbcolor .arrows.right{right:-45px}#maxbuttons .input.mbcolor .arrows.left{left:-35px}#maxbuttons .input.mbcolor .arrows .arrow-left,#maxbuttons .input.mbcolor .arrows .arrow-right{width:0;height:0;font-size:0;line-height:0;vertical-align:bottom;cursor:pointer}#maxbuttons .input.mbcolor .arrows .arrow-left{border-top:30px solid transparent;border-bottom:30px solid transparent;border-right:20px solid #ccc}#maxbuttons .input.mbcolor .arrows .arrow-right{border-top:30px solid transparent;border-bottom:30px solid transparent;border-left:20px solid #ccc;margin-top:35px}#maxbuttons .input.mbcolor .arrows .left,#maxbuttons .input.mbcolor .arrows .right{display:inline-block;float:left;clear:both;width:35px;height:45px}#maxbuttons .input.mbcolor .arrows .left{margin-top:15px}#maxbuttons [type='range']{-webkit-appearance:none;width:250px}#maxbuttons [type='range']:focus{outline:0}#maxbuttons [type='range']:focus::-webkit-slider-runnable-track{background:#fff}#maxbuttons [type='range']:focus::-ms-fill-lower{background:#fff}#maxbuttons [type='range']:focus::-ms-fill-upper{background:#fff}#maxbuttons [type='range']::-webkit-slider-runnable-track{cursor:pointer;height:14px;transition:all .2s ease;width:250px;background:#fff;border:1px solid #cfd8dc;border-radius:10px}#maxbuttons [type='range']::-webkit-slider-thumb{background:#179588;border:0px solid #eceff1;border-radius:12px;cursor:pointer;height:24px;width:24px;-webkit-appearance:none;margin-top:-6px}#maxbuttons [type='range']::-moz-range-track{cursor:pointer;height:14px;transition:all .2s ease;width:250px;background:#fff;border:1px solid #cfd8dc;border-radius:10px}#maxbuttons [type='range']::-moz-range-thumb{background:#179588;border:0px solid #eceff1;border-radius:12px;cursor:pointer;height:24px;width:24px}#maxbuttons [type='range']::-ms-track{cursor:pointer;height:14px;transition:all .2s ease;width:250px;background:transparent;border-color:transparent;border-width:12px 0;color:transparent}#maxbuttons [type='range']::-ms-fill-lower{background:#f2f2f2;border:1px solid #cfd8dc;border-radius:20px}#maxbuttons [type='range']::-ms-fill-upper{background:#fff;border:1px solid #cfd8dc;border-radius:20px}#maxbuttons [type='range']::-ms-thumb{background:#179588;border:0px solid #eceff1;border-radius:12px;cursor:pointer;height:24px;width:24px;margin-top:0}#maxbuttons .rss-feed{overflow:hidden;clear:both;margin-bottom:20px}#maxbuttons .rss-feed li{width:32%;margin-right:2%;float:left;margin-bottom:2%}#maxbuttons .rss-feed li:nth-child(3n){margin-right:0}#maxbuttons .rss-feed li a{min-height:110px;max-height:110px;overflow:hidden;background:#fff;width:100%;display:block;padding:10px;box-sizing:border-box;border:1px solid #bbb;text-decoration:none;transition:all 200ms;border-radius:2px}#maxbuttons .rss-feed li a:hover{background:#f9f9f9}#maxbuttons .rss-feed li a:hover span{color:#0074a2}#maxbuttons .rss-feed li a span{color:#2ea2cc;font-weight:bold;font-size:1.2em;line-height:1.5em}#maxbuttons .system_info{width:90%;background-color:#fff;border:1px solid #000;padding:15px}#maxbuttons .system_info .info{margin:5px 0}#maxbuttons .system_info .info label{width:250px;display:inline-block;clear:both}#maxbuttons.maxbuttons-settings .option-container .inside .option-design{margin:20px 0}#maxbuttons.maxbuttons-settings .option-container .inside .option-design label{line-height:14px;height:40px;vertical-align:top;width:200px}#maxbuttons h2.tabs{margin:1em 0;min-height:35px}#maxbuttons h2.sub-tabs,#maxbuttons h2.submit-tab{list-style:none;clear:both;margin-bottom:0}#maxbuttons h2.sub-tabs a,#maxbuttons h2.submit-tab a{font-weight:400;font-size:14px;cursor:pointer}#maxbuttons h2.sub-tabs a .dashicons,#maxbuttons h2.submit-tab a .dashicons{margin-right:10px;line-height:24px}#maxbuttons h2.sub-tabs .save-indicator,#maxbuttons h2.submit-tab .save-indicator{float:right;font-size:25px;display:none;margin-right:10px}#maxbuttons h2.sub-tabs .save-indicator.dashicons-warning,#maxbuttons h2.submit-tab .save-indicator.dashicons-warning{color:#ff0000}#maxbuttons h2.sub-tabs .save-indicator.dashicons-yes,#maxbuttons h2.submit-tab .save-indicator.dashicons-yes{color:#00ff00}#maxbuttons.mb_tabs_active .mb_tab{border:0px;background:none;border-radius:0 0 0 0;-webkit-border-radius:0 0 0 0}#maxbuttons.mb_tabs_active .mb_tab>.title:nth-of-type(1) button{top:0}#maxbuttons.mb_tabs_active .mb_tab>.title:nth-of-type(1) .right{float:right}#maxbuttons.mb_tabs_active .mb_tab>.inside{border:1px solid #e5e5e5}#maxbuttons.maxbuttons-collections-edit .main{width:100%;max-width:none}#maxbuttons .collection-addnew{display:inline-block}@media (max-width: 780px){#maxbuttons .collection-addnew{margin-left:5px}}#maxbuttons .collection_list .collection{position:relative;background-color:#fff;padding:15px;border-radius:15px;margin:15px 0}#maxbuttons .collection_list .collection h3{display:inline-block;width:90%;margin-top:0;font-size:18px;line-height:20px}#maxbuttons .collection_list .collection h3 a{color:#000;font-size:25px;text-decoration:none}#maxbuttons .collection_list .collection h3 a:hover{text-decoration:underline}#maxbuttons .collection_list .collection h3 .dashicons{color:#ccc;margin-left:15px}#maxbuttons .collection_list .collection h3 .button-count{font-weight:400;font-size:15px;margin-left:15px;vertical-align:top}#maxbuttons .collection_list .collection .collection_remove{top:10px;right:15px;font-size:25px;font-weight:400;position:absolute;cursor:pointer}#maxbuttons .collection_list .collection.welcome p{font-size:14px;line-height:22px}#maxbuttons .collection_list .collection-container{position:relative;width:100%;display:inline-block;clear:both}#maxbuttons .collection_list .collection-container .maxcollection{position:static !important}#maxbuttons .inside .preview_collection.option label{display:inline-block;float:none;font-size:25px;width:100%}#maxbuttons .mb_collection_selection{display:inline-block;min-height:300px;margin:25px 0}#maxbuttons .mb_collection_selection .sortable .item{margin-bottom:25px;position:relative;padding-left:30px;min-height:45px;clear:both}#maxbuttons .mb_collection_selection .sortable .item .button-remove{margin-top:5px;position:absolute;left:20px;top:-15px;border:1px solid #000;border-radius:11px;width:20px;height:20px;background-color:rgba(0,0,0,0.5)}#maxbuttons .mb_collection_selection .sortable .item .button-remove:hover{cursor:pointer}#maxbuttons .mb_collection_selection .sortable .item .button-remove span{color:#fff;font-size:16px;padding-top:2px;overflow:hidden}#maxbuttons .mb_collection_selection .sortable-placeholder{border:3px dashed #aaa;height:45px;width:344px;background:#ccc}#maxbuttons .mb_collection_selection .button_data{display:none}#maxbuttons .mb-social-options{float:right;width:45%;border:1px solid #000;height:100%}#maxbuttons .mb-buttons-selection{float:left;width:45%;overflow:hidden;border:1px solid #000}#maxbuttons .mb-preview-window{position:fixed;top:40%;right:20px;width:30%;max-width:45%;max-height:90vh;background-color:rgba(255,255,255,0.7);border:1px solid #000;z-index:500 !important;overflow:hidden;display:none}@media (max-width: 780px){#maxbuttons .mb-preview-window{position:relative;left:0;top:0;bottom:0;right:0;width:100%;height:auto;display:inline-block;border-color:#ccc}}#maxbuttons .mb-preview-window .mb-preview-wrapper{position:relative;display:inline-block;width:100%}#maxbuttons .sub-tabs .preview-on{background-color:#00b9eb;color:#fff}#maxbuttons .sub-tabs .preview-on::before{line-height:24px}#maxbuttons #picker-back{top:0;left:0;right:0;bottom:0;background-color:#000;z-index:110000;position:fixed;opacity:0.7;display:none}#maxbuttons #picker-modal,#maxbuttons .max-modal.picker-modal{display:none;width:calc(100% - 60px);min-height:300px;top:30px;bottom:30px;left:30px;right:30px;z-index:160000}#maxbuttons #picker-modal .modal_header,#maxbuttons .max-modal.picker-modal .modal_header{height:15px;display:block;overflow:hidden;top:0;left:0;bottom:0;right:0;border:0}#maxbuttons #picker-modal .picker-packages,#maxbuttons .max-modal.picker-modal .picker-packages{top:31px;left:0;width:205px;bottom:0;background-color:#f3f3f3;position:absolute;border-right:1px solid #ccc;overflow-x:hidden;overflow-y:auto}#maxbuttons #picker-modal .picker-packages ul,#maxbuttons .max-modal.picker-modal .picker-packages ul{margin-top:4px}#maxbuttons #picker-modal .picker-packages li a,#maxbuttons .max-modal.picker-modal .picker-packages li a{padding:6px 20px;display:block;color:#0073aa;text-decoration:none;font-size:13px;line-height:16px}#maxbuttons #picker-modal .picker-packages li a:hover,#maxbuttons .max-modal.picker-modal .picker-packages li a:hover{background:rgba(0,0,0,0.04) none repeat scroll 0 0;color:#21759b}#maxbuttons #picker-modal .picker-packages li a.pack-active,#maxbuttons .max-modal.picker-modal .picker-packages li a.pack-active{font-weight:700;color:#000}#maxbuttons #picker-modal .picker-main,#maxbuttons .max-modal.picker-modal .picker-main{left:206px;top:31px;right:0;bottom:60px;position:absolute;border-bottom:1px solid #dddddd;overflow-y:scroll;background-color:#fff}#maxbuttons #picker-modal .picker-main .screen,#maxbuttons .max-modal.picker-modal .picker-main .screen{margin:5px 5px}#maxbuttons #picker-modal .picker-main .screen .tablenav-pages,#maxbuttons .max-modal.picker-modal .picker-main .screen .tablenav-pages{float:none;margin-left:1%}#maxbuttons #picker-modal .picker-main .item,#maxbuttons .max-modal.picker-modal .picker-main .item{padding:5px;margin:5px 0 5px 1%;border:1px solid #000;width:16%;height:auto;float:left;text-align:center;position:relative;background-color:#eee;border:1px solid #b4b9be;display:inline-block}#maxbuttons #picker-modal .picker-main .item .button_data,#maxbuttons .max-modal.picker-modal .picker-main .item .button_data{display:none}#maxbuttons #picker-modal .picker-main .item .button_name,#maxbuttons .max-modal.picker-modal .picker-main .item .button_name{clear:left;display:block;margin-top:15px;font-size:9px}#maxbuttons #picker-modal .picker-main .item .button-selected,#maxbuttons .max-modal.picker-modal .picker-main .item .button-selected{position:absolute;font-size:20px;top:-10px;right:-10px;width:24px;height:24px;color:#fff;background-color:#1e8cbe;z-index:100;border-radius:12px}#maxbuttons #picker-modal .picker-main .item .button-selected span,#maxbuttons .max-modal.picker-modal .picker-main .item .button-selected span{padding-top:2px}#maxbuttons #picker-modal .picker-inselection,#maxbuttons .max-modal.picker-modal .picker-inselection{height:60px;display:block;position:absolute;bottom:0;right:0;left:206px;overflow:hidden}#maxbuttons #picker-modal .picker-inselection .info,#maxbuttons .max-modal.picker-modal .picker-inselection .info{height:60px;float:left;display:inline-block;padding:10px 15px;display:none}#maxbuttons #picker-modal .picker-inselection .info .clear-selection,#maxbuttons .max-modal.picker-modal .picker-inselection .info .clear-selection{color:#ff0000;display:block;padding:0}#maxbuttons #picker-modal .picker-inselection .info .clear-selection:hover,#maxbuttons .max-modal.picker-modal .picker-inselection .info .clear-selection:hover{background-color:#ff0000;color:#fff}#maxbuttons #picker-modal .picker-inselection .items,#maxbuttons .max-modal.picker-modal .picker-inselection .items{display:inline-block;position:absolute;overflow:hidden;padding-top:5px;height:100%;left:130px;right:180px}@media (max-width: 780px){#maxbuttons #picker-modal .picker-inselection .items,#maxbuttons .max-modal.picker-modal .picker-inselection .items{display:none}}#maxbuttons #picker-modal .picker-inselection .items .item,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item{height:40px;width:40px;overflow:hidden;float:left;margin:3px;position:relative}#maxbuttons #picker-modal .picker-inselection .items .item .button_name,#maxbuttons #picker-modal .picker-inselection .items .item .button_data,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item .button_name,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item .button_data{display:none}#maxbuttons #picker-modal .picker-inselection .items .item .button-remove,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item .button-remove{display:none;position:absolute;width:30px;height:30px;left:2px;border-radius:15px;top:2px;background-color:rgba(0,0,0,0.5)}#maxbuttons #picker-modal .picker-inselection .items .item .button-remove span,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item .button-remove span{font-size:20px;color:#fff;padding-left:5px;padding-top:5px}#maxbuttons #picker-modal .picker-inselection .items .item:hover .button-remove,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item:hover .button-remove{display:block}#maxbuttons #picker-modal .picker-inselection .add,#maxbuttons .max-modal.picker-modal .picker-inselection .add{float:right;margin-top:15px;margin-right:15px;height:100%}#maxbuttons .social_block .social-option{clear:both;margin-top:25px}#maxbuttons .social_block .social-option .shortcode-container{display:inline-block}#maxbuttons .social_block .social-option .button_name{display:inline-block;margin-left:10px;vertical-align:middle;font-weight:700}#maxbuttons #mbfeedback .link{height:25px;width:100px;position:fixed;top:40%;right:0;z-index:1000;transform:rotate(90deg);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-o-transform:rotate(90deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1)}#maxbuttons #mbfeedback .link a{background:#ccc;height:25px;width:70px;padding:8px 16px;color:#fff;font-family:Arial, sans-serif;font-size:15px;font-weight:bold;text-decoration:none;line-height:15px;border-bottom:solid 1px #333;border-left:solid 1px #333;border-right:solid 1px #fff}#maxbuttons #mbfeedback .link a::hover{background:#06c}#maxbuttons .ad-wrap{width:27%;float:left;max-width:300px;margin-left:1%;min-width:200px;margin-top:41px}#maxbuttons .ad-wrap .ads{background:#fff;margin-bottom:20px;text-align:center}#maxbuttons .ad-wrap .ads.image-ad{background:none;margin-top:20px}#maxbuttons .ad-wrap .ads.image-ad img{max-width:100%}#maxbuttons .ad-wrap .ads>a{text-decoration:none}#maxbuttons .ad-wrap .ads .header{background-color:#88c5c2;color:#fff;font-size:18px;text-transform:uppercase;padding:12px}#maxbuttons .ad-wrap .ads h3{text-align:center;padding-bottom:14px}#maxbuttons .ad-wrap .ads ul{list-style:none}#maxbuttons .ad-wrap .ads ul li{font-weight:bold;text-decoration:none;color:#000000}#maxbuttons .ad-wrap .ads ul li.plus{font-size:38px;font-weight:700;color:#88c5c2}#maxbuttons .ad-wrap .ads span.img{text-align:center;display:block}#maxbuttons .ad-wrap .ads .ads_button_wrap{margin:20px 0 30px;display:inline-block}#maxbuttons .ad-wrap .ads .ads_button_wrap .button{color:#fff;background-color:#88c5c2;font-size:16px;font-weight:bold;border:0;padding:0 40px}@media screen and (max-width: 960px){#maxbuttons .ad-wrap{display:none}}#maxbuttons.maxbuttons-pro-gopro .main{width:95%;max-width:860px}#maxbuttons.maxbuttons-pro-gopro h1.title{margin:0;font-size:24px;display:inline-block}#maxbuttons.maxbuttons-pro-gopro h1.title .big-maxg-btn{display:inline-block;background-color:#86c5c2;border-color:#73a3a8;margin:0 10px;vertical-align:super;line-height:23px;border-top:0;border-left:0;border-right:0;top:5px}#maxbuttons.maxbuttons-pro-gopro h1.title img{vertical-align:middle}#maxbuttons.maxbuttons-pro-gopro .logo{margin:0;display:inline-block;margin-top:14px}#maxbuttons.maxbuttons-pro-gopro .logo .simple-btn{color:#62c0e6;text-decoration:underline}#maxbuttons.maxbuttons-pro-gopro .default-section{text-align:center;padding:0px 10px}#maxbuttons.maxbuttons-pro-gopro .default-section p{position:relative;font-family:Arial, 'Helvetica Neue', Helvetica, sans-serif;font-size:16px;margin:17px 0;color:#5b5b5b}#maxbuttons.maxbuttons-pro-gopro .default-section:nth-child(even){background-color:#fff}#maxbuttons.maxbuttons-pro-gopro .default-section:nth-child(odd){background-color:#faf5f1}#maxbuttons.maxbuttons-pro-gopro .default-section .big-maxg-btn{background-color:#fd8d61;border-color:#f0702b;font-size:36px;margin:10px}#maxbuttons.maxbuttons-pro-gopro .default-section h2{font-family:'Quicksand', sans-serif;font-weight:bold;color:#88c5c2;font-size:36px;line-height:38px;max-width:80%;margin:14px auto}#maxbuttons.maxbuttons-pro-gopro .default-section .rating{width:380px;margin:0 auto}#maxbuttons.maxbuttons-pro-gopro .default-section .rating p{margin:10px 0 0;font-size:22px;color:#000}#maxbuttons.maxbuttons-pro-gopro .default-section .icon-row p{font-weight:bold}#maxbuttons.maxbuttons-pro-gopro .default-section .icon-row img{width:106px;height:106px}#maxbuttons.maxbuttons-pro-gopro .social-row div{margin-bottom:5px}#maxbuttons.maxbuttons-pro-gopro .social-row p{background:#fff;padding:15px 5px 0 5px;margin:15px 0 0 15px;font-weight:700}#maxbuttons.maxbuttons-pro-gopro .social-row img{margin-top:15px}#maxbuttons.maxbuttons-pro-gopro .social-row p{min-height:162px}#maxbuttons.maxbuttons-pro-gopro .container{width:inherit;margin:0 auto;padding:30px 0}#maxbuttons.maxbuttons-pro-gopro img{max-width:100%}#maxbuttons.maxbuttons-pro-gopro .icon-row,#maxbuttons.maxbuttons-pro-gopro .image-row{position:relative}#maxbuttons.maxbuttons-pro-gopro .width-100{width:100%;margin-bottom:15px}#maxbuttons.maxbuttons-pro-gopro .width-33{width:33.33333333%;float:left;padding:0 15px;margin:0 -15px 40px}#maxbuttons.maxbuttons-pro-gopro .width-50{width:50%;float:left;padding:0 15px;margin:0 -15px 40px}#maxbuttons.maxbuttons-pro-gopro .clearfix{clear:both}#maxbuttons.maxbuttons-pro-gopro .bordered{border-radius:30px;padding:16px;background-color:#fff;box-sizing:border-box}@media (max-width: 780px){#maxbuttons.maxbuttons-pro-gopro .bordered{border:0;padding:8}}#maxbuttons.maxbuttons-pro-gopro .bordered p{margin:0 0 10px}#maxbuttons.maxbuttons-pro-gopro .inline-block{display:inline-block !important;vertical-align:middle}#maxbuttons.maxbuttons-pro-gopro .big-maxg-btn{font-family:'Quicksand', sans-serif;font-size:20px;color:#fff;font-weight:bold;padding:10px 15px;transition:all linear .2s;display:block;text-align:center;border-bottom:4px solid;text-transform:uppercase;border-radius:10px;text-decoration:none;line-height:42px}#maxbuttons.maxbuttons-pro-gopro .big-maxg-btn:hover,#maxbuttons.maxbuttons-pro-gopro .big-maxg-btn:focus{color:#fff;text-decoration:none;outline:none}#maxbuttons.maxbuttons-pro-gopro .big-maxg-btn:hover{box-shadow:0 8px 6px -6px rgba(0,0,0,0.5)}.maxmodal-data{display:none}.max-modal{display:none;width:60%;max-width:70%;height:auto;max-height:90vh;overflow:hidden;position:fixed;left:50%;top:50%;z-index:100101;display:none;background:#ffffff;border-radius:4px 4px 4px 4px;-webkit-border-radius:4px 4px 4px 4px;-webkit-box-shadow:-3px -3px 10px rgba(0,0,0,0.5);-moz-box-shadow:-3px -3px 10px rgba(0,0,0,0.5);box-shadow:-3px -3px 10px rgba(0,0,0,0.5)}@media (max-width: 960px){.max-modal{max-width:90%}}@media (max-width: 780px){.max-modal{max-width:100%}}.max-modal.success{border:4px solid green}.max-modal.error{border:4px solid red}.max-modal.error h3{background-color:#ff0000}.max-modal .content-area{background-color:#fff}.max-modal .modal_header{text-align:center;font-size:16px;font-weight:700;background-color:#f3f3f3;border-bottom:1px solid #ccc;padding:8px 5px;cursor:move}.max-modal .modal_header h3{margin:0;color:#444;font-weight:400;padding:0;text-align:center;text-shadow:none;font-size:16px}.max-modal .modal_header .modal_close{position:absolute;right:5px;top:8px;width:20px;height:20px;cursor:pointer;color:#444}.max-modal .modal_header .modal_close:hover{cursor:pointer;color:#111}.max-modal .content,.max-modal .modal_content{text-align:center;padding:5px 15px 10px;height:auto;overflow-y:auto}.max-modal textarea{overflow-x:auto}.max-modal .controls{padding:10px;text-align:center;clear:both}.max-modal .controls .button,.max-modal .controls .button-primary{margin-right:8px}.max-modal .tablenav .tablenav-pages a,.max-modal .tablenav-pages-navspan{background:#e5e5e5 none repeat scroll 0 0;border:1px solid #cccccc;display:inline-block;font-size:16px;font-weight:normal;line-height:1;min-width:17px;padding:3px 5px 7px;text-align:center}.max-modal textarea#maxbutton-css{width:100%;height:250px;font-family:Consolas, 'Courier New', 'Courier';font-size:13px;white-space:normal;word-wrap:break-word;overflow:none}.maxmodal_overlay{background:#000;left:0;right:0;bottom:0;top:0;height:100%;position:fixed;opacity:0.7;z-index:100100;display:none}.media-buttons #maxbuttons{margin:0;overflow-y:auto}.media-buttons #maxbuttons .preview-buttons{border:0;clear:both}.media-buttons #maxbuttons .preview-buttons .hint{font-size:12px;float:left;display:inline-block;line-height:30px;margin-top:3px}.media-buttons #maxbuttons .button-select{cursor:pointer;border:1px solid #fff}.media-buttons #maxbuttons .button-select.selected{border-top:1px solid #0085ba;border-bottom:1px solid #0085ba;background:#f7f7f7}.media-buttons #maxbuttons .button-select.selected .col_insert .small{font-weight:700}.media-buttons #maxbuttons .col_insert{width:150px;padding-top:15px}.media-buttons #maxbuttons .col_insert .small{font-size:10px}.media-buttons .pagination{width:100%;margin:10px 0;min-height:20px}.media-buttons .pagination span{font-size:15px;font-weight:700;float:left;cursor:pointer}.media-buttons .pagination .next{float:right}.media-buttons .shortcode_options{width:400px;margin:0 auto;display:inline-block}.media-buttons .shortcode_options .button_example{margin:15px}.media-buttons .shortcode_options input{margin-bottom:10px;display:inline-block;float:left}.media-buttons .shortcode_options label{margin-right:25px;display:inline-block;float:left;clear:left;width:100px;line-height:20px;font-weight:700}.media-buttons .shortcode_options p{clear:both}.media-buttons .shortcode_options input[type='button']{clear:both;float:none}.media-buttons .loading{background:transparent url("../../images/spinner.gif") no-repeat scroll 0 0/20px 20px;display:inline-block;float:right;margin:5px 5px 0 0;height:40px;opacity:0.7;vertical-align:middle;visibility:hidden;width:40px}.media-buttons .controls{position:absolute;width:100%;padding:10px 0;background:#f3f3f3;text-align:right;bottom:0;left:0;border-top:1px solid #ccc}
assets/integrations/shortcake/class-field-maxbutton.php CHANGED
@@ -67,8 +67,8 @@ class Shortcake_Field_MaxButton
67
  */
68
  private function maxbutton_attribute_present() {
69
 
70
- foreach ( Shortcode_UI::get_instance()->get_shortcodes() as $shortcode ) {
71
- //exit('to find your');
72
  if ( empty( $shortcode['attrs'] ) ) {
73
  continue;
74
  }
67
  */
68
  private function maxbutton_attribute_present() {
69
 
70
+ foreach ( \Shortcode_UI::get_instance()->get_shortcodes() as $shortcode ) {
71
+
72
  if ( empty( $shortcode['attrs'] ) ) {
73
  continue;
74
  }
assets/integrations/shortcake/edit-attribute-field-maxbutton.js CHANGED
@@ -48,7 +48,7 @@
48
 
49
  });
50
 
51
- $(document).on('mb_media_buttons_close', function ()
52
  {
53
  $('.media-modal, .media-modal-backdrop').show();
54
  });
48
 
49
  });
50
 
51
+ $(document).on('modal_close', function ()
52
  {
53
  $('.media-modal, .media-modal-backdrop').show();
54
  });
assets/integrations/shortcake/shortcake.php CHANGED
@@ -27,11 +27,10 @@ class mbCake
27
 
28
  public static function shortcode($shortcode)
29
  {
30
-
31
-
32
  if (strpos ($shortcode, 'maxbutton') === false)
33
  return; // not our shorts
34
-
35
  // style controls the output - if set to something else assume css is there.
36
  if (strpos ( $shortcode, 'style') === false)
37
  {
@@ -43,6 +42,7 @@ class mbCake
43
 
44
  $button = new maxButton();
45
  $button->set($button_id);
 
46
  $button->parse_button();
47
  $button->parse_css('preview');
48
  $button->display_css();
27
 
28
  public static function shortcode($shortcode)
29
  {
30
+
 
31
  if (strpos ($shortcode, 'maxbutton') === false)
32
  return; // not our shorts
33
+
34
  // style controls the output - if set to something else assume css is there.
35
  if (strpos ( $shortcode, 'style') === false)
36
  {
42
 
43
  $button = new maxButton();
44
  $button->set($button_id);
45
+
46
  $button->parse_button();
47
  $button->parse_css('preview');
48
  $button->display_css();
assets/integrations/siteorigins_builder/fields/maxbutton.class.php CHANGED
@@ -1,11 +1,12 @@
1
  <?php
 
2
 
3
  /**
4
  * Use of this field requires at least WordPress 3.5.
5
  *
6
  * Class SiteOrigin_Widget_Field_Media
7
  */
8
- class MaxButton_Widget_Field_MaxButton extends SiteOrigin_Widget_Field_Base {
9
  /**
10
  * A label for the title of the media selector dialog.
11
  *
1
  <?php
2
+ namespace MaxButtons;
3
 
4
  /**
5
  * Use of this field requires at least WordPress 3.5.
6
  *
7
  * Class SiteOrigin_Widget_Field_Media
8
  */
9
+ class MaxButton_Widget_Field_MaxButton extends \SiteOrigin_Widget_Field_Base {
10
  /**
11
  * A label for the title of the media selector dialog.
12
  *
assets/integrations/siteorigins_builder/sitebuilder.php CHANGED
@@ -13,14 +13,15 @@ function maxButtons_add_widget_tabs($tabs) {
13
 
14
  return $tabs;
15
  }
16
- add_filter('siteorigin_panels_widget_dialog_tabs', 'maxbuttons_add_widget_tabs', 20);
17
 
18
  function maxbuttons_add_widgets($folders)
19
  {
20
  $folders[] = plugin_dir_path(__FILE__). 'widgets/';
 
21
  return $folders;
22
  }
23
- add_filter('siteorigin_widgets_widget_folders', 'maxbuttons_add_widgets', 20);
24
 
25
 
26
 
@@ -29,13 +30,13 @@ function maxbuttons_fields_class_paths( $class_paths ) {
29
  $class_paths[] = plugin_dir_path( __FILE__ ) . "fields/";
30
  return $class_paths;
31
  }
32
- add_filter( 'siteorigin_widgets_field_class_paths', 'maxbuttons_fields_class_paths', 20 );
33
 
34
  function maxbuttons_class_prefixes( $class_prefixes ) {
35
- $class_prefixes[] = 'MaxButton_Widget_Field_';
36
  return $class_prefixes;
37
  }
38
- add_filter( 'siteorigin_widgets_field_class_prefixes', 'maxbuttons_class_prefixes', 20 );
39
 
40
 
41
 
13
 
14
  return $tabs;
15
  }
16
+ add_filter('siteorigin_panels_widget_dialog_tabs', maxUtils::namespaceit('maxbuttons_add_widget_tabs'), 20);
17
 
18
  function maxbuttons_add_widgets($folders)
19
  {
20
  $folders[] = plugin_dir_path(__FILE__). 'widgets/';
21
+
22
  return $folders;
23
  }
24
+ add_filter('siteorigin_widgets_widget_folders', maxUtils::namespaceit('maxbuttons_add_widgets'), 20);
25
 
26
 
27
 
30
  $class_paths[] = plugin_dir_path( __FILE__ ) . "fields/";
31
  return $class_paths;
32
  }
33
+ add_filter( 'siteorigin_widgets_field_class_paths', maxUtils::namespaceit('maxbuttons_fields_class_paths'), 20 );
34
 
35
  function maxbuttons_class_prefixes( $class_prefixes ) {
36
+ $class_prefixes[] = maxUtils::namespaceit('MaxButton_Widget_Field_');
37
  return $class_prefixes;
38
  }
39
+ add_filter( 'siteorigin_widgets_field_class_prefixes', maxUtils::namespaceit('maxbuttons_class_prefixes'), 20 );
40
 
41
 
42
 
assets/integrations/siteorigins_builder/widgets/maxbuttons-widget/maxbuttons-widget.php CHANGED
@@ -8,9 +8,12 @@ Author: Max Foundry
8
  Author URI: https://maxbuttons.com
9
  */
10
 
11
- class Widget_MaxButtons_Widget extends SiteOrigin_Widget {
 
 
12
  function __construct() {
13
 
 
14
  parent::__construct(
15
  'sow-maxbutton',
16
  __('MaxButtons', 'maxbuttons'),
@@ -47,12 +50,18 @@ class Widget_MaxButtons_Widget extends SiteOrigin_Widget {
47
  plugin_dir_path(__FILE__)
48
  );
49
 
 
 
50
  }
51
 
52
  function get_template_name($instance) {
53
  return 'base';
54
  }
 
 
 
 
55
 
56
  }
57
 
58
- siteorigin_widget_register('sow-maxbutton', __FILE__, 'Widget_MaxButtons_Widget');
8
  Author URI: https://maxbuttons.com
9
  */
10
 
11
+ //use \SiteOrigin_Widget as SiteOrigin_Widget;
12
+
13
+ class Widget_MaxButtons_Widget extends \SiteOrigin_Widget {
14
  function __construct() {
15
 
16
+
17
  parent::__construct(
18
  'sow-maxbutton',
19
  __('MaxButtons', 'maxbuttons'),
50
  plugin_dir_path(__FILE__)
51
  );
52
 
53
+
54
+
55
  }
56
 
57
  function get_template_name($instance) {
58
  return 'base';
59
  }
60
+
61
+ function get_style_name($instance) {
62
+ return '';
63
+ }
64
 
65
  }
66
 
67
+ siteorigin_widget_register('sow-maxbutton', __FILE__, maxUtils::namespaceit('Widget_MaxButtons_Widget') );
assets/integrations/siteorigins_builder/widgets/maxbuttons-widget/tpl/base.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
 
3
  $button_class = MB()->getClass('button');
4
 
1
  <?php
2
+ namespace MaxButtons;
3
 
4
  $button_class = MB()->getClass('button');
5
 
assets/scss/_elements.scss CHANGED
@@ -1,6 +1,7 @@
1
 
2
  /* Here be elements for the editors.Standardized somehow */
3
 
 
4
  select {
5
  width: 150px;
6
  &.small { width: auto; } // small as can be.
@@ -266,6 +267,27 @@ textarea {
266
 
267
  }
268
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
269
 
270
  .option .switch_label {
271
  //vertical-align: top;
1
 
2
  /* Here be elements for the editors.Standardized somehow */
3
 
4
+
5
  select {
6
  width: 150px;
7
  &.small { width: auto; } // small as can be.
267
 
268
  }
269
 
270
+ /** Slider / Range input **/
271
+ .option .input_label {
272
+ display: inline-block;
273
+ vertical-align: top;
274
+ &.left { margin-right: 10px; }
275
+ &.right { margin-left: 10px; }
276
+ }
277
+
278
+ .option .range_value
279
+ {
280
+ margin-top: 5px;
281
+
282
+ output {
283
+ clear: both;
284
+ font-size: 18px;
285
+ text-align: center;
286
+ width: 100%;
287
+ display: inline-block;
288
+ }
289
+ }
290
+
291
 
292
  .option .switch_label {
293
  //vertical-align: top;
assets/scss/_input_range.scss ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Styling Cross-Browser Compatible Range Inputs with Sass
2
+ // Github: https://github.com/darlanrod/input-range-sass
3
+ // Author: Darlan Rod https://github.com/darlanrod
4
+ // Version 1.4.1
5
+ // MIT License
6
+
7
+ $track-color: #fff !default;
8
+ $thumb-color: #179588 !default;
9
+
10
+ $thumb-radius: 12px !default;
11
+ $thumb-height: 24px !default;
12
+ $thumb-width: 24px !default;
13
+ $thumb-shadow-size: 0px !default;
14
+ $thumb-shadow-blur: 0px !default;
15
+ $thumb-shadow-color: rgba(0, 0, 0, .2) !default;
16
+ $thumb-border-width: 0px !default;
17
+ $thumb-border-color: #eceff1 !default;
18
+
19
+ $track-width: 250px !default;
20
+ $track-height: 12px !default;
21
+ $track-shadow-size: 0px !default;
22
+ $track-shadow-blur: 0px !default;
23
+ $track-shadow-color: rgba(0, 0, 0, .2) !default;
24
+ $track-border-width: 1px !default;
25
+ $track-border-color: #cfd8dc !default;
26
+
27
+ $track-radius: 10px !default;
28
+ $contrast: 5% !default;
29
+
30
+ @mixin shadow($shadow-size, $shadow-blur, $shadow-color) {
31
+ //box-shadow: $shadow-size $shadow-size $shadow-blur $shadow-color, 0 0 $shadow-size lighten($shadow-color, 5%);
32
+ }
33
+
34
+ @mixin track {
35
+ cursor: pointer;
36
+ height: $track-height;
37
+ transition: all .2s ease;
38
+ width: $track-width;
39
+ }
40
+
41
+ @mixin thumb {
42
+ @include shadow($thumb-shadow-size, $thumb-shadow-blur, $thumb-shadow-color);
43
+ background: $thumb-color;
44
+ border: $thumb-border-width solid $thumb-border-color;
45
+ border-radius: $thumb-radius;
46
+ cursor: pointer;
47
+ height: $thumb-height;
48
+ width: $thumb-width;
49
+
50
+ }
51
+
52
+ [type='range'] {
53
+ -webkit-appearance: none;
54
+ //margin: $thumb-height / 2 0;
55
+ width: $track-width;
56
+
57
+ &:focus {
58
+ outline: 0;
59
+
60
+ &::-webkit-slider-runnable-track {
61
+ background: lighten($track-color, $contrast);
62
+ }
63
+
64
+ &::-ms-fill-lower {
65
+ background: $track-color;
66
+ }
67
+
68
+ &::-ms-fill-upper {
69
+ background: lighten($track-color, $contrast);
70
+ }
71
+ }
72
+
73
+ &::-webkit-slider-runnable-track {
74
+ @include track;
75
+ @include shadow($track-shadow-size, $track-shadow-blur, $track-shadow-color);
76
+ background: $track-color;
77
+ border: $track-border-width solid $track-border-color;
78
+ border-radius: $track-radius;
79
+ }
80
+
81
+ &::-webkit-slider-thumb {
82
+ @include thumb;
83
+ -webkit-appearance: none;
84
+ margin-top: ((-$track-border-width * 2 + $track-height) / 2) - ($thumb-height / 2);
85
+ }
86
+
87
+ &::-moz-range-track {
88
+ @include track;
89
+ @include shadow($track-shadow-size, $track-shadow-blur, $track-shadow-color);
90
+ background: $track-color;
91
+ border: $track-border-width solid $track-border-color;
92
+ border-radius: $track-radius;
93
+ }
94
+
95
+ &::-moz-range-thumb {
96
+ @include thumb;
97
+ }
98
+
99
+ &::-ms-track {
100
+ @include track;
101
+ background: transparent;
102
+ border-color: transparent;
103
+ border-width: ($thumb-height / 2) 0;
104
+ color: transparent;
105
+ }
106
+
107
+ &::-ms-fill-lower {
108
+ @include shadow($track-shadow-size, $track-shadow-blur, $track-shadow-color);
109
+ background: darken($track-color, $contrast);
110
+ border: $track-border-width solid $track-border-color;
111
+ border-radius: $track-radius * 2;
112
+ }
113
+
114
+ &::-ms-fill-upper {
115
+ @include shadow($track-shadow-size, $track-shadow-blur, $track-shadow-color);
116
+ background: $track-color;
117
+ border: $track-border-width solid $track-border-color;
118
+ border-radius: $track-radius * 2;
119
+ }
120
+
121
+ &::-ms-thumb {
122
+ @include thumb;
123
+ margin-top: 0;
124
+ }
125
+ }
126
+
assets/scss/style.scss CHANGED
@@ -16,7 +16,8 @@ $c-border-dark : #000;
16
  @import "general";
17
  @import "overview";
18
  @import "editor";
19
- @import "elements";
 
20
  @import "support";
21
  @import "settings";
22
 
16
  @import "general";
17
  @import "overview";
18
  @import "editor";
19
+ @import "elements";
20
+ @import 'input_range';
21
  @import "support";
22
  @import "settings";
23
 
blocks/basic.php CHANGED
@@ -13,6 +13,7 @@ class basicBlock extends maxBlock
13
  "status" => array("default" => "publish"),
14
  "description" => array("default" => ''),
15
  "url" => array("default" => ''),
 
16
  // "text" => array("default" => ''),
17
  "new_window" => array("default" => 0),
18
  "nofollow" => array("default" => 0)
@@ -145,12 +146,14 @@ class basicBlock extends maxBlock
145
 
146
  $anchor = $domObj->find("a",0);
147
 
148
-
149
  if (isset($data["nofollow"]) && $data["nofollow"] == 1)
150
  $anchor->rel = "nofollow";
151
  // $buttonAttrs[] = "rel=nofollow";
152
  if (isset($data["new_window"]) && $data["new_window"] == 1)
153
  $anchor->target = "_blank";
 
 
 
154
 
155
  if (isset($data["url"]) && $data["url"] != '')
156
  {
@@ -183,6 +186,8 @@ class basicBlock extends maxBlock
183
  {
184
 
185
  $map["url"]["attr"] = "href";
 
 
186
  // $map["text"]["func"] = "updateAnchorText";
187
 
188
  return $map;
@@ -261,6 +266,16 @@ class basicBlock extends maxBlock
261
 
262
  $ffollow->output('','end');
263
 
 
 
 
 
 
 
 
 
 
 
264
  // TEXT
265
  $field_text = new maxField();
266
  $field_text->label = __('Text','maxbuttons');
13
  "status" => array("default" => "publish"),
14
  "description" => array("default" => ''),
15
  "url" => array("default" => ''),
16
+ 'link_title' => array('default' => ''),
17
  // "text" => array("default" => ''),
18
  "new_window" => array("default" => 0),
19
  "nofollow" => array("default" => 0)
146
 
147
  $anchor = $domObj->find("a",0);
148
 
 
149
  if (isset($data["nofollow"]) && $data["nofollow"] == 1)
150
  $anchor->rel = "nofollow";
151
  // $buttonAttrs[] = "rel=nofollow";
152
  if (isset($data["new_window"]) && $data["new_window"] == 1)
153
  $anchor->target = "_blank";
154
+ if (isset($data['link_title']) && strlen($data['link_title']) > 0)
155
+ $anchor->title = $data['link_title'];
156
+
157
 
158
  if (isset($data["url"]) && $data["url"] != '')
159
  {
186
  {
187
 
188
  $map["url"]["attr"] = "href";
189
+ $map["link_title"]["attr"] = "title";
190
+
191
  // $map["text"]["func"] = "updateAnchorText";
192
 
193
  return $map;
266
 
267
  $ffollow->output('','end');
268
 
269
+ // TITLE
270
+
271
+ $field_title = new maxField();
272
+ $field_title->label = __('Button Title', 'maxbuttons');
273
+ $field_title->name = 'link_title'; // title is too generic
274
+ $field_title->id = $field_title->name;
275
+ $field_title->value = maxBlocks::getValue('link_title');
276
+
277
+ $field_title->output('start','end');
278
+
279
  // TEXT
280
  $field_text = new maxField();
281
  $field_text->label = __('Text','maxbuttons');
blocks/tpl/slider.tpl ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ {if:label} <label for='%%id%%' class='range_label %%name%%'>%%label%%</label> {/if:label}
2
+ <div class='input slider %%name%%'>
3
+
4
+
5
+ {if:min_label}<span class='input_label left'>%%min_label%%</span>{/if:min_label} <input type='range' min='%%min%%' max='%%max%%' name='%%name%%' value='%%value%%' step='1' >
6
+ {if:max_label}<span class='input_label right'>%%max_label%%</span>{/if:max_label}
7
+
8
+ <p class='range_value'><output for='%%id%%'>-</output></p>
9
+
10
+ </div>
classes/blocks.php CHANGED
@@ -105,11 +105,16 @@ class maxBlocks
105
  public static function setData($data)
106
  {
107
  $new_data = array(); //egalite
 
 
 
108
  foreach($data as $block => $fields)
109
  {
110
  if (is_array($fields))
111
  $new_data = array_merge($new_data, $fields);
112
  }
 
 
113
  self::$data = $new_data;
114
  }
115
 
105
  public static function setData($data)
106
  {
107
  $new_data = array(); //egalite
108
+ if (! is_array($data) || count($data) == 0) // no data
109
+ return false;
110
+
111
  foreach($data as $block => $fields)
112
  {
113
  if (is_array($fields))
114
  $new_data = array_merge($new_data, $fields);
115
  }
116
+
117
+
118
  self::$data = $new_data;
119
  }
120
 
classes/button.php CHANGED
@@ -316,6 +316,7 @@ class maxButton
316
 
317
  $this->button_css = $css;
318
 
 
319
  $css = $this->getCSSParser()->parse($this->button_css);
320
  $css = apply_filters('mb/button/compiledcss', $css, $mode); // the final result.
321
 
@@ -784,6 +785,7 @@ class maxButton
784
  'name' => '',
785
  'text' => '',
786
  'url' => '',
 
787
  'window' => '',
788
  'nofollow' => '',
789
  'nocache' => false,
@@ -857,6 +859,12 @@ class maxButton
857
  $this->data["basic"]["nofollow"] = 1;
858
  $overrides = true;
859
  }
 
 
 
 
 
 
860
 
861
  switch($style)
862
  {
316
 
317
  $this->button_css = $css;
318
 
319
+
320
  $css = $this->getCSSParser()->parse($this->button_css);
321
  $css = apply_filters('mb/button/compiledcss', $css, $mode); // the final result.
322
 
785
  'name' => '',
786
  'text' => '',
787
  'url' => '',
788
+ 'linktitle' => '',
789
  'window' => '',
790
  'nofollow' => '',
791
  'nocache' => false,
859
  $this->data["basic"]["nofollow"] = 1;
860
  $overrides = true;
861
  }
862
+
863
+ if ($linktitle != '')
864
+ {
865
+ $this->data['basic']['link_title'] = $linktitle;
866
+ $overrides = true;
867
+ }
868
 
869
  switch($style)
870
  {
classes/max-utils.php CHANGED
@@ -301,6 +301,22 @@ class maxUtils
301
 
302
  global $wp_styles;
303
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
304
  // Loop through all registered styles and remove any that appear to be Font Awesome.
305
  foreach ( $wp_styles->registered as $script => $details ) {
306
  $src = isset($details->src) ? $details->src : false;
301
 
302
  global $wp_styles;
303
 
304
+ $our_fa_there = false;
305
+
306
+ foreach($wp_styles->registered as $script => $details)
307
+ {
308
+ if ($script == 'mbpro-font-awesome')
309
+ {
310
+ $our_fa_there = true;
311
+ break;
312
+ }
313
+ }
314
+
315
+ // fix nothing on pages where we are not loading.
316
+ if (! $our_fa_there)
317
+ return;
318
+
319
+
320
  // Loop through all registered styles and remove any that appear to be Font Awesome.
321
  foreach ( $wp_styles->registered as $script => $details ) {
322
  $src = isset($details->src) ? $details->src : false;
classes/maxCSSParser.php CHANGED
@@ -103,9 +103,11 @@ class maxCSSParser
103
  unset($this->data["settings"]);
104
  }
105
 
106
-
107
  $elements = array_shift($struct); // first element is a 'stub' root.
108
 
 
 
 
109
  foreach($elements as $el => $el_data)
110
  {
111
 
103
  unset($this->data["settings"]);
104
  }
105
 
 
106
  $elements = array_shift($struct); // first element is a 'stub' root.
107
 
108
+ if ( is_null($elements) )
109
+ return;
110
+
111
  foreach($elements as $el => $el_data)
112
  {
113
 
js/maxajax.js CHANGED
@@ -41,7 +41,7 @@ maxAjax.prototype.ajaxForm = function (e)
41
  this.showSpinner(target);
42
 
43
  this.ajaxPost(data);
44
-
45
 
46
  }
47
 
41
  this.showSpinner(target);
42
 
43
  this.ajaxPost(data);
44
+
45
 
46
  }
47
 
js/maxbuttons-admin.js CHANGED
@@ -43,6 +43,10 @@ maxAdmin.prototype.init = function () {
43
  // conditionals
44
  $(document).on('reInitConditionals', $.proxy(this.initConditionials, this));
45
  this.initConditionials(); // conditional options
 
 
 
 
46
 
47
  /*
48
  ****
@@ -662,6 +666,25 @@ maxAdmin.prototype.updateConditional = function (event)
662
 
663
  }
664
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
665
  maxAdmin.prototype.saveIndicator = function(toggle)
666
  {
667
  if (toggle)
43
  // conditionals
44
  $(document).on('reInitConditionals', $.proxy(this.initConditionials, this));
45
  this.initConditionials(); // conditional options
46
+
47
+ // range inputs
48
+ $(document).on('change, input', 'input[type="range"]', $.proxy(this.updateRange, this ));
49
+ this.updateRange(null);
50
 
51
  /*
52
  ****
666
 
667
  }
668
 
669
+ maxAdmin.prototype.updateRange = function (event)
670
+ {
671
+ if (typeof event == 'undefined' || event === null )
672
+ {
673
+ var targets = $('input[type="range"]');
674
+ }
675
+ else
676
+ {
677
+ var targets = [event.target];
678
+ }
679
+
680
+ $(targets).each(function () {
681
+ var value = $(this).val();
682
+ $(this).parents('.input').find('.range_value output').val(value + '%');
683
+
684
+ });
685
+
686
+ }
687
+
688
  maxAdmin.prototype.saveIndicator = function(toggle)
689
  {
690
  if (toggle)
js/maxbuttons_media_button.js CHANGED
@@ -235,6 +235,7 @@ maxMedia.prototype.putResults = function(res)
235
  this.maxm.setContent(res);
236
  this.maxm.setControls();
237
  this.maxm.checkResize();
 
238
  this.resize();
239
 
240
  // this feature resizes
@@ -250,6 +251,10 @@ maxMedia.prototype.putResults = function(res)
250
  maxMedia.prototype.resize = function(e)
251
  {
252
  //contentHeight = this.maxm.currentModal.find('.modal_content').height();
 
 
 
 
253
  topHeight = this.maxm.currentModal.find('.modal_header').height() + 17; // padding
254
  controlsHeight = this.maxm.currentModal.find('.controls').height() + 21;
255
  modalHeight = this.maxm.currentModal.height();
@@ -258,7 +263,7 @@ maxMedia.prototype.resize = function(e)
258
  this.maxm.currentModal.find('.controls .insert').addClass('disabled');
259
 
260
  }
261
-
262
  maxMedia.prototype.insertAction = function(e)
263
  {
264
  e.preventDefault();
@@ -270,7 +275,10 @@ maxMedia.prototype.insertAction = function(e)
270
  this.callback(button_id, $(e.target) );
271
 
272
  if (this.closeOnCallback)
 
273
  this.maxm.close();
 
 
274
  }
275
 
276
  maxMedia.prototype.buttonToEditor = function(button_id, url, text)
235
  this.maxm.setContent(res);
236
  this.maxm.setControls();
237
  this.maxm.checkResize();
238
+
239
  this.resize();
240
 
241
  // this feature resizes
251
  maxMedia.prototype.resize = function(e)
252
  {
253
  //contentHeight = this.maxm.currentModal.find('.modal_content').height();
254
+
255
+ if (this.maxm.currentModal === null)
256
+ return; // nothing to resize
257
+
258
  topHeight = this.maxm.currentModal.find('.modal_header').height() + 17; // padding
259
  controlsHeight = this.maxm.currentModal.find('.controls').height() + 21;
260
  modalHeight = this.maxm.currentModal.height();
263
  this.maxm.currentModal.find('.controls .insert').addClass('disabled');
264
 
265
  }
266
+
267
  maxMedia.prototype.insertAction = function(e)
268
  {
269
  e.preventDefault();
275
  this.callback(button_id, $(e.target) );
276
 
277
  if (this.closeOnCallback)
278
+ {
279
  this.maxm.close();
280
+ $(document).trigger('mb_media_buttons_close');
281
+ }
282
  }
283
 
284
  maxMedia.prototype.buttonToEditor = function(button_id, url, text)
js/maxmodal.js CHANGED
@@ -113,6 +113,8 @@ jQuery(document).ready(function($) {
113
  this.currentModal.remove();
114
  this.currentModal = null;
115
  $('.maxmodal_overlay').remove();
 
 
116
  }
117
 
118
  maxModal.prototype.fadeOut = function (timeOut)
@@ -234,7 +236,7 @@ jQuery(document).ready(function($) {
234
  // default call
235
  var funcName = data.data('load') + '(modal)';
236
  var callFunc = new Function ('modal', funcName);
237
-
238
 
239
  /* Args coming!
240
  if (typeof(data.data('load-args') !== 'undefined')
@@ -254,7 +256,9 @@ jQuery(document).ready(function($) {
254
  }
255
  catch(err)
256
  {
 
257
  console.log('MB Modal Callback Error: ' + err.message);
 
258
  }
259
  }
260
 
113
  this.currentModal.remove();
114
  this.currentModal = null;
115
  $('.maxmodal_overlay').remove();
116
+ $(document).off('keydown', $.proxy(this.keyPressHandler, this));
117
+
118
  }
119
 
120
  maxModal.prototype.fadeOut = function (timeOut)
236
  // default call
237
  var funcName = data.data('load') + '(modal)';
238
  var callFunc = new Function ('modal', funcName);
239
+
240
 
241
  /* Args coming!
242
  if (typeof(data.data('load-args') !== 'undefined')
256
  }
257
  catch(err)
258
  {
259
+
260
  console.log('MB Modal Callback Error: ' + err.message);
261
+ console.log('MB Mobdal tried calling: ' + funcName);
262
  }
263
  }
264
 
js/min/maxajax.js ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ /** New AJAX Call methods
3
+ /* Get the standard AJAX vars for this plugin */
4
+
5
+ var maxAjax = function(jquery) {
6
+ $ = jquery;
7
+
8
+ }
9
+
10
+ maxAjax.prototype.init = function()
11
+ {
12
+
13
+ // default actions that trigger ajax action.
14
+ $(document).on('click', '.mb-ajax-form .mb-ajax-submit', $.proxy(this.ajaxForm, this ));
15
+ $(document).on('click', '.mb-ajax-action', $.proxy(this.ajaxCall, this ));
16
+ $(document).on('change', '.mb-ajax-action-change', $.proxy(this.ajaxCall, this));
17
+ $(document).trigger('maxajax_init'); // for hanging in other actions.
18
+ }
19
+
20
+ maxAjax.prototype.ajaxInit = function()
21
+ {
22
+ data = {
23
+ action: maxajax.ajax_action,
24
+ nonce: maxajax.nonce,
25
+ }
26
+
27
+ return data;
28
+ }
29
+
30
+ maxAjax.prototype.ajaxForm = function (e)
31
+ {
32
+ var target = $(e.target);
33
+ var form = $(target).parents('form');
34
+ var action = $(target).data('action');
35
+
36
+ var data = this.ajaxInit();
37
+ data['form'] = form.serialize();
38
+ data['plugin_action'] = action;
39
+ // data['action'] = 'mb_button_action';
40
+
41
+ this.showSpinner(target);
42
+
43
+ this.ajaxPost(data);
44
+
45
+
46
+ }
47
+
48
+ /* Ajax call functionality */
49
+ maxAjax.prototype.ajaxCall = function (e)
50
+ {
51
+
52
+ e.preventDefault();
53
+ var target = e.target;
54
+
55
+ var param = false;
56
+ var plugin_action = $(target).data('action');
57
+ var check_param = $(target).data('param');
58
+ var param_input = $(target).data('param-input');
59
+
60
+ if (typeof check_param !== 'undefined')
61
+ param = check_param;
62
+ if (typeof param_input !== 'undefined')
63
+ param = $(param_input).val();
64
+
65
+ data = this.ajaxInit();
66
+
67
+ data['plugin_action'] = plugin_action;
68
+ data['param'] = param;
69
+ data['post'] = $('form').serialize(); // send it all
70
+
71
+ this.showSpinner(target);
72
+
73
+ this.ajaxPost(data);
74
+ }
75
+
76
+ maxAjax.prototype.showSpinner = function(target)
77
+ {
78
+ var spinner = '<div class="ajax-load-spinner"></div>';
79
+ $('.ajax-load-spinner').remove();
80
+ $(target).after(spinner);
81
+ //return spinner;
82
+ }
83
+
84
+ maxAjax.prototype.ajaxPost = function(data, successHandler, errorHandler)
85
+ {
86
+ var self = this;
87
+
88
+ if (typeof successHandler == 'undefined')
89
+ {
90
+ var action = data['plugin_action'];
91
+ var successHandler = function (r,s,o,) { self.defaultSuccessHandler(r,s,o,action) } ;
92
+
93
+ }
94
+
95
+ if (typeof errorHandler == 'undefined')
96
+ {
97
+ var action = data['plugin_action'];
98
+ var errorHandler = function (r,s,o,) { self.defaultErrorHandler(r,s,o,action) } ;
99
+ }
100
+
101
+
102
+ $.ajax({
103
+ type: "POST",
104
+ url: maxajax.ajax_url,
105
+ data: data,
106
+ success: successHandler,
107
+ error: errorHandler,
108
+ });
109
+ }
110
+
111
+ maxAjax.prototype.defaultSuccessHandler = function (result, status, object, action)
112
+ {
113
+ $(document).trigger('maxajax_success_' + action, [result, status, object]);
114
+
115
+ }
116
+
117
+ maxAjax.prototype.defaultErrorHandler = function(jq,status,error, action)
118
+ {
119
+ $(document).trigger('maxajax_error_' + action, jq, status, error);
120
+ console.log(jq);
121
+ console.log(status);
122
+ console.log(error);
123
+ }
124
+
125
+
126
+ jQuery(document).ready(function($) {
127
+
128
+ if (typeof window.maxFoundry === 'undefined')
129
+ window.maxFoundry = {} ;
130
+
131
+ window.maxFoundry.maxAjax = new maxAjax($);
132
+
133
+ window.maxFoundry.maxAjax.init();
134
+
135
+ }); /* END OF JQUERY */
136
+
js/min/maxbuttons-admin.js CHANGED
@@ -1 +1 @@
1
- var maxAdmin;jQuery(document).ready(function($){maxAdmin=function(){return this},maxAdmin.prototype={colorUpdateTime:!0,fields:null,button_id:null,form_updated:!1,tabs:null},maxAdmin.prototype.init=function(){this.button_id=$('input[name="button_id"]').val(),$(document).on("click",".maxbutton-preview",function(t){t.preventDefault()}),$(document).on("click",".output .preview-toggle",$.proxy(this.toggle_preview,this)),$("#maxbuttons .input-paging").on("change",$.proxy(this.do_paging,this)),$(".manual-toggle").on("click",$.proxy(this.toggleManual,this)),$(".manual-entry").draggable({cancel:"p, li"}),$(document).on("submit","form.mb_ajax_save",$.proxy(this.formAjaxSave,this)),$(document).on("click","[data-buttonaction]",$.proxy(this.button_action,this)),$(document).on("reInitConditionals",$.proxy(this.initConditionials,this)),this.initConditionials(),0!=$("#new-button-form").length&&(this.button_id>0&&$("#maxbuttons .mb-message").show(),this.initResponsive(),$("#maxbuttons .output").draggable({cancel:".nodrag"}),$("#maxbuttons .color-field").wpColorPicker({width:300,change:$.proxy(_.throttle(function(t,e){t.preventDefault();var a=e.color.toString();this.update_color(t,e,a)},200),this)}),$(".input.color .arrows").on("click",$.proxy(this.copyColor,this)),$("#radius_toggle").on("click",$.proxy(this.toggleRadiusLock,this)),"undefined"!=typeof buttonFieldMap&&(this.fields=$.parseJSON(buttonFieldMap)),$("input").not(".color-field").on("keyup change",$.proxy(this.update_preview,this)),$("input.color-field").on("focus",$.proxy(this.select_field,this)),$("select").on("change",$.proxy(this.update_preview,this)),$(window).on("beforeunload",$.proxy(function(){return this.form_updated?maxcol_wp.leave_page:void 0},this)),$(document).on("keyup","input",function(t){return t.keyCode&&13==t.keyCode?($(":input")[$(":input").index(document.activeElement)+1].focus(),!1):void 0}),$(".button-save").click($.proxy(function(){return this.saveIndicator(!1),$("#new-button-form").submit(),!1},this)),$(".shortcode-expand").on("click",this.toggleShortcode))},maxAdmin.prototype.repaint_preview=function(){$('.mb_tab input[type="text"]').trigger("change"),$('.mb_tab input[type="number"]').trigger("change"),$(".mb_tab select").trigger("change"),$('.mb_tab input[type="hidden"]').trigger("change"),$('.mb_tab input[type="radio"]:checked').trigger("change"),$('.mb_tab input[type="checkbox"]:checked').trigger("change")},maxAdmin.prototype.update_preview=function(e){e.preventDefault(),this.saveIndicator(!0);var target=$(e.target),field=$(target).data("field");if("undefined"==typeof field)var id=$(target).attr("id");else var id=field;var data=this.fields[id];"undefined"!=typeof data&&("undefined"!=typeof data.css&&(value=target.val(),"undefined"!=typeof data.css_unit&&-1==value.indexOf(data.css_unit)&&(value+=data.css_unit),target.is(":checkbox")&&!target.is(":checked")&&(value=""),this.putCSS(data,value)),"undefined"!=typeof data.attr&&$(".output .result").find("a").attr(data.attr,target.val()),"undefined"!=typeof data.func&&eval("this."+data.func+"(target)"))},maxAdmin.prototype.select_field=function(t){$(t.target).select()},maxAdmin.prototype.button_action=function(t){t.preventDefault();var e=$(t.target).data("buttonaction");this.form_updated=!1;var a=$(t.target).data("buttonid"),o=$('input[name="'+e+'_nonce"]').val(),n=mb_ajax.ajaxurl,i={action:"mb_button_action",button_action:e,button_id:a,nonce:o};$.post({url:n,data:i,success:function(t){response=JSON.parse(t),"undefined"!=typeof response.redirection&&(window.location=response.redirection)},error:function(){console.log("error in button action"+e)}})},maxAdmin.prototype.checkCopyModal=function(t){this.form_updated?t.currentModal.find(".mb-message").show():$(t.currentModal).find(".mb-message").hide()},maxAdmin.prototype.toggle_preview=function(){$(".output .inner").is(":hidden")?($(".output .inner").show(),$(".output").css("height","auto"),$(".preview .preview-toggle").removeClass("dashicons-arrow-down").addClass("dashicons-arrow-up")):($(".output .inner").hide(),$(".output").css("height","auto"),$(".preview .preview-toggle").removeClass("dashicons-arrow-up").addClass("dashicons-arrow-down"))},maxAdmin.prototype.putCSS=function(t,e,a){a=a||"both";var o=".maxbutton";if("hover"==a?o="a.hover ":"normal"==a&&(o="a.normal "),"undefined"!=typeof t.csspart){var n=t.csspart.split(",");for(i=0;i<n.length;i++){var r=n[i],d=o+" ."+r;$(".output .result").find(d).css(t.css,e)}}else $(".output .result").find(o).css(t.css,e)},maxAdmin.prototype.update_color=function(t,e,a){t.preventDefault(),this.saveIndicator(!0);var o=$(t.target);-1===a.indexOf("#")&&(a="#"+a);var n=o.attr("id");if($("#"+n).val(a),-1!==n.indexOf("box_shadow"))this.updateBoxShadow(o);else if(-1!==n.indexOf("text_shadow"))this.updateTextShadow(o);else if(-1!==n.indexOf("gradient"))-1==n.indexOf("hover")?this.updateGradient():this.updateGradient(!0);else{if("button_preview"!=n){state=-1==n.indexOf("hover")?"normal":"hover";var i=this.fields[n];return void this.putCSS(i,a,state)}$(".output .result").css("backgroundColor",a)}},maxAdmin.prototype.copyColor=function(t){t.preventDefault(),t.stopPropagation();var e=$(t.target),a=$(t.target).parents("[data-bind]"),o="#"+a.data("id"),n="#"+a.data("bind");if(e.hasClass("arrow-right"))var i="right";else var i="left";if(a.hasClass("right"))var r="left";else var r="right";"left"==r?copy="right"==i?!0:!1:"right"==r&&(copy="right"==i?!1:!0),copy?($(n).val($(o).val()),$(n).trigger("change"),$(n).wpColorPicker("color",$(o).val())):($(o).val($(n).val()),$(o).trigger("change"),$(o).wpColorPicker("color",$(n).val()))},maxAdmin.prototype.updateGradient=function(t){t=t||!1;var e="";t&&(e="_hover");var a=parseInt($("#gradient_stop").val());isNaN(a)&&(a=45);var o=$("#use_gradient").prop("checked"),n=this.hexToRgb($("#gradient_start_color"+e).val()),i=this.hexToRgb($("#gradient_end_color"+e).val()),r=parseInt($("#gradient_start_opacity"+e).val()),d=parseInt($("#gradient_end_opacity"+e).val());if(o||(i=n,d=r),isNaN(r)&&(r=100),isNaN(d)&&(d=100),t)var s=$(".output .result").find("a.hover");else var s=$(".output .result").find("a.normal");s.css("background","linear-gradient( rgba("+n+","+r/100+") "+a+"%, rgba("+i+","+d/100+") )"),s.css("background","-moz-linear-gradient( rgba("+n+","+r/100+") "+a+"%, rgba("+i+","+d/100+") )"),s.css("background","-o-linear-gradient( rgba("+n+","+r/100+") "+a+"%, rgba("+i+","+d/100+") )"),s.css("background","-webkit-gradient(linear, left top, left bottom, color-stop("+a+"%, rgba("+n+","+r/100+")), color-stop(1, rgba("+i+","+d/100+") ));")},maxAdmin.prototype.hexToRgb=function(t){t=t.replace("#","");var e=parseInt(t,16),a=e>>16&255,o=e>>8&255,n=255&e;return a+","+o+","+n},maxAdmin.prototype.updateBoxShadow=function(t){t=t||null;var e=$("#box_shadow_offset_left").val(),a=$("#box_shadow_offset_top").val(),o=$("#box_shadow_width").val(),n=$("#box_shadow_spread").val(),i=$("#box_shadow_color").val(),r=$("#box_shadow_color_hover").val();$(".output .result").find("a.normal").css("boxShadow",e+"px "+a+"px "+o+"px "+n+"px "+i),$(".output .result").find("a.hover").css("boxShadow",e+"px "+a+"px "+o+"px "+n+"px "+r)},maxAdmin.prototype.updateTextShadow=function(t,e){e=e||!1;var a=$("#text_shadow_offset_left").val(),o=$("#text_shadow_offset_top").val(),n=$("#text_shadow_width").val(),i=$("#text_shadow_color").val(),r=$("#text_shadow_color_hover").val(),d=$(t).attr("id"),s=this.fields[d];s.css="textShadow";var p=a+"px "+o+"px "+n+"px "+i;this.putCSS(s,p,"normal"),p=a+"px "+o+"px "+n+"px "+r,this.putCSS(s,p,"hover")},maxAdmin.prototype.updateAnchorText=function(t){var e=$(".output .result").find("a .mb-text");0===e.length&&($(".output .result").find("a").append('<span class="mb-text"></span>'),$(".output .result").find("a .mb-text").css({display:"block","line-height":"1em","box-sizing":"border-box"}),this.repaint_preview()),$(".output .result").find("a .mb-text").text(t.val())},maxAdmin.prototype.updateGradientOpacity=function(){this.updateGradient(!0),this.updateGradient(!1)},maxAdmin.prototype.updateDimension=function(t){var e=$(t).val(),a=$(t).attr("id"),o=this.fields[a];e>0?this.putCSS(o,e):this.putCSS(o,"auto")},maxAdmin.prototype.updateRadius=function(t){var e=t.val(),a=["radius_bottom_left","radius_bottom_right","radius_top_left","radius_top_right"];if("lock"==$("#radius_toggle").data("lock"))for(i=0;i<a.length;i++){var o=a[i];$("#"+o).val(e);var n=this.fields[o];this.putCSS(n,e+"px")}},maxAdmin.prototype.toggleRadiusLock=function(t){var e=$(t.target),a=$(e).data("lock");"lock"==a?($(e).removeClass("dashicons-lock").addClass("dashicons-unlock"),$(e).data("lock","unlock")):"unlock"==a&&($(e).removeClass("dashicons-unlock").addClass("dashicons-lock"),$(e).data("lock","lock"))},maxAdmin.prototype.initResponsive=function(){window.maxFoundry.maxadmin.responsive=new mbResponsive($),window.maxFoundry.maxadmin.responsive.init(this)},maxAdmin.prototype.do_paging=function(t){var e=parseInt($(t.target).val());if(e<=parseInt($(t.target).attr("max"))){var a=$(t.target).data("url");window.location=a+"&paged="+e}},maxAdmin.prototype.toggleShortcode=function(){$(".shortcode-expand").hasClass("closed")?($(" .mb-message.shortcode .expanded").css("display","inline-block"),$(".shortcode-expand span").removeClass("dashicons-arrow-down").addClass("dashicons-arrow-up"),$(".shortcode-expand").removeClass("closed").addClass("open")):($(" .mb-message.shortcode .expanded").css("display","none"),$(".shortcode-expand span").addClass("dashicons-arrow-down").removeClass("dashicons-arrow-up"),$(".shortcode-expand").addClass("closed").removeClass("open"))},maxAdmin.prototype.toggleManual=function(t){t.preventDefault();var e=$(t.target),a=e.data("target"),o=$('.manual-entry[data-manual="'+a+'"]');if(o.is(":visible"))return o.hide(),!0;var n=$('[data-options="'+a+'"]').position(),i=n.top+e.height();o.css("top",i),o.css("right",15),o.css("left","auto"),o.show()},maxAdmin.prototype.initConditionials=function(){var t=this;$("[data-show]").each(function(){var e=$(this).data("show"),a=e.target,o=e.values;$(document).on("change",'[name="'+a+'"]',{child:this,values:o},$.proxy(t.updateConditional,t)),$('[name="'+a+'"]').trigger("change")})},maxAdmin.prototype.updateConditional=function(t){var e=t.data,a=e.values,o=e.child,n=$(t.currentTarget),i=$(n).val();if("checkbox"===n.attr("type")){var r=$(n).prop("checked");i="checked"==a&&r?"checked":"unchecked"!=a||r?0:"unchecked"}a.indexOf(i)>=0?($(o).fadeIn("fast"),$(o).find("input, select").trigger("change")):($(o).fadeOut("fast"),$(o).find("input, select").trigger("change"))},maxAdmin.prototype.saveIndicator=function(t){this.form_updated=t?!0:!1},maxAdmin.prototype.formAjaxSave=function(t){t.preventDefault();var e=mb_ajax.ajaxurl,a=$(t.target),o=a.serialize();$.ajax({type:"POST",url:e,data:o}).done($.proxy(this.saveDone,this))},maxAdmin.prototype.saveDone=function(t){$("[data-form]").prop("disabled",!1);var e=$.parseJSON(t),a=e.result,o=e.title,n=e.data.id;if("undefined"!=typeof e.data.new_nonce){{e.data.new_nonce}$('input[name="nonce"]').val(e.data.new_nonce)}if(a){$('input[name="collection_id"]').val(n);var i=window.location.href;-1===i.indexOf("collection_id")&&window.history.replaceState({},"",i+"&collection_id="+n),$(document).trigger("mbFormSaved");var r=$('input[name="sorted"]').val();$('input[name="previous_selection"]').val(r),e.data.reload&&document.location.reload(!0)}a||($modal=window.maxFoundry.maxmodal,$modal.newModal("collection_error"),$modal.setTitle(o),$modal.setContent(e.body),$modal.setControls('<button class="modal_close button-primary">'+e.close_text+"</button>"),$modal.show())}});
1
+ var maxAdmin;jQuery(document).ready(function($){maxAdmin=function(){return this},maxAdmin.prototype={colorUpdateTime:!0,fields:null,button_id:null,form_updated:!1,tabs:null},maxAdmin.prototype.init=function(){this.button_id=$('input[name="button_id"]').val(),$(document).on("click",".maxbutton-preview",function(t){t.preventDefault()}),$(document).on("click",".output .preview-toggle",$.proxy(this.toggle_preview,this)),$("#maxbuttons .input-paging").on("change",$.proxy(this.do_paging,this)),$(".manual-toggle").on("click",$.proxy(this.toggleManual,this)),$(".manual-entry").draggable({cancel:"p, li"}),$(document).on("submit","form.mb_ajax_save",$.proxy(this.formAjaxSave,this)),$(document).on("click","[data-buttonaction]",$.proxy(this.button_action,this)),$(document).on("reInitConditionals",$.proxy(this.initConditionials,this)),this.initConditionials(),$(document).on("change, input",'input[type="range"]',$.proxy(this.updateRange,this)),this.updateRange(null),0!=$("#new-button-form").length&&(this.button_id>0&&$("#maxbuttons .mb-message").show(),this.initResponsive(),$("#maxbuttons .output").draggable({cancel:".nodrag"}),$("#maxbuttons .color-field").wpColorPicker({width:300,change:$.proxy(_.throttle(function(t,a){t.preventDefault();var e=a.color.toString();this.update_color(t,a,e)},200),this)}),$(".input.color .arrows").on("click",$.proxy(this.copyColor,this)),$("#radius_toggle").on("click",$.proxy(this.toggleRadiusLock,this)),"undefined"!=typeof buttonFieldMap&&(this.fields=$.parseJSON(buttonFieldMap)),$("input").not(".color-field").on("keyup change",$.proxy(this.update_preview,this)),$("input.color-field").on("focus",$.proxy(this.select_field,this)),$("select").on("change",$.proxy(this.update_preview,this)),$(window).on("beforeunload",$.proxy(function(){if(this.form_updated)return maxcol_wp.leave_page},this)),$(document).on("keyup","input",function(t){if(t.keyCode&&13==t.keyCode)return $(":input")[$(":input").index(document.activeElement)+1].focus(),!1}),$(".button-save").click($.proxy(function(){return this.saveIndicator(!1),$("#new-button-form").submit(),!1},this)),$(".shortcode-expand").on("click",this.toggleShortcode))},maxAdmin.prototype.repaint_preview=function(){$('.mb_tab input[type="text"]').trigger("change"),$('.mb_tab input[type="number"]').trigger("change"),$(".mb_tab select").trigger("change"),$('.mb_tab input[type="hidden"]').trigger("change"),$('.mb_tab input[type="radio"]:checked').trigger("change"),$('.mb_tab input[type="checkbox"]:checked').trigger("change")},maxAdmin.prototype.update_preview=function(e){e.preventDefault(),this.saveIndicator(!0);var target=$(e.target),field=$(target).data("field");if(void 0===field)var id=$(target).attr("id");else var id=field;var data=this.fields[id];void 0!==data&&(void 0!==data.css&&(value=target.val(),void 0!==data.css_unit&&-1==value.indexOf(data.css_unit)&&(value+=data.css_unit),target.is(":checkbox")&&!target.is(":checked")&&(value=""),this.putCSS(data,value)),void 0!==data.attr&&$(".output .result").find("a").attr(data.attr,target.val()),void 0!==data.func&&eval("this."+data.func+"(target)"))},maxAdmin.prototype.select_field=function(t){$(t.target).select()},maxAdmin.prototype.button_action=function(t){t.preventDefault();var a=$(t.target).data("buttonaction");this.form_updated=!1;var e=$(t.target).data("buttonid"),o=$('input[name="'+a+'_nonce"]').val(),i=mb_ajax.ajaxurl,n={action:"mb_button_action",button_action:a,button_id:e,nonce:o};$.post({url:i,data:n,success:function(t){response=JSON.parse(t),void 0!==response.redirection&&(window.location=response.redirection)},error:function(){console.log("error in button action"+a)}})},maxAdmin.prototype.checkCopyModal=function(t){this.form_updated?t.currentModal.find(".mb-message").show():$(t.currentModal).find(".mb-message").hide()},maxAdmin.prototype.toggle_preview=function(t){$(".output .inner").is(":hidden")?($(".output .inner").show(),$(".output").css("height","auto"),$(".preview .preview-toggle").removeClass("dashicons-arrow-down").addClass("dashicons-arrow-up")):($(".output .inner").hide(),$(".output").css("height","auto"),$(".preview .preview-toggle").removeClass("dashicons-arrow-up").addClass("dashicons-arrow-down"))},maxAdmin.prototype.putCSS=function(t,a,e){var o=".maxbutton";if("hover"==(e=e||"both")?o="a.hover ":"normal"==e&&(o="a.normal "),void 0!==t.csspart){var n=t.csspart.split(",");for(i=0;i<n.length;i++){var r=o+" ."+n[i];$(".output .result").find(r).css(t.css,a)}}else $(".output .result").find(o).css(t.css,a)},maxAdmin.prototype.update_color=function(t,a,e){t.preventDefault(),this.saveIndicator(!0);var o=$(t.target);-1===e.indexOf("#")&&(e="#"+e);var i=o.attr("id");if($("#"+i).val(e),-1!==i.indexOf("box_shadow"))this.updateBoxShadow(o);else if(-1!==i.indexOf("text_shadow"))this.updateTextShadow(o);else if(-1!==i.indexOf("gradient"))-1==i.indexOf("hover")?this.updateGradient():this.updateGradient(!0);else{if("button_preview"!=i){-1==i.indexOf("hover")?state="normal":state="hover";var n=this.fields[i];return void this.putCSS(n,e,state)}$(".output .result").css("backgroundColor",e)}},maxAdmin.prototype.copyColor=function(t){t.preventDefault(),t.stopPropagation();var a=$(t.target),e=$(t.target).parents("[data-bind]"),o="#"+e.data("id"),i="#"+e.data("bind");if(a.hasClass("arrow-right"))n="right";else var n="left";if(e.hasClass("right"))r="left";else var r="right";"left"==r?copy="right"==n:"right"==r&&(copy="right"!=n),copy?($(i).val($(o).val()),$(i).trigger("change"),$(i).wpColorPicker("color",$(o).val())):($(o).val($(i).val()),$(o).trigger("change"),$(o).wpColorPicker("color",$(i).val()))},maxAdmin.prototype.updateGradient=function(t){var a="";(t=t||!1)&&(a="_hover");var e=parseInt($("#gradient_stop").val());isNaN(e)&&(e=45);var o=$("#use_gradient").prop("checked"),i=this.hexToRgb($("#gradient_start_color"+a).val()),n=this.hexToRgb($("#gradient_end_color"+a).val()),r=parseInt($("#gradient_start_opacity"+a).val()),s=parseInt($("#gradient_end_opacity"+a).val());if(o||(n=i,s=r),isNaN(r)&&(r=100),isNaN(s)&&(s=100),t)d=$(".output .result").find("a.hover");else var d=$(".output .result").find("a.normal");d.css("background","linear-gradient( rgba("+i+","+r/100+") "+e+"%, rgba("+n+","+s/100+") )"),d.css("background","-moz-linear-gradient( rgba("+i+","+r/100+") "+e+"%, rgba("+n+","+s/100+") )"),d.css("background","-o-linear-gradient( rgba("+i+","+r/100+") "+e+"%, rgba("+n+","+s/100+") )"),d.css("background","-webkit-gradient(linear, left top, left bottom, color-stop("+e+"%, rgba("+i+","+r/100+")), color-stop(1, rgba("+n+","+s/100+") ));")},maxAdmin.prototype.hexToRgb=function(t){t=t.replace("#","");var a=parseInt(t,16);return(a>>16&255)+","+(a>>8&255)+","+(255&a)},maxAdmin.prototype.updateBoxShadow=function(t){t=t||null;var a=$("#box_shadow_offset_left").val(),e=$("#box_shadow_offset_top").val(),o=$("#box_shadow_width").val(),i=$("#box_shadow_spread").val(),n=$("#box_shadow_color").val(),r=$("#box_shadow_color_hover").val();$(".output .result").find("a.normal").css("boxShadow",a+"px "+e+"px "+o+"px "+i+"px "+n),$(".output .result").find("a.hover").css("boxShadow",a+"px "+e+"px "+o+"px "+i+"px "+r)},maxAdmin.prototype.updateTextShadow=function(t,a){a=a||!1;var e=$("#text_shadow_offset_left").val(),o=$("#text_shadow_offset_top").val(),i=$("#text_shadow_width").val(),n=$("#text_shadow_color").val(),r=$("#text_shadow_color_hover").val(),s=$(t).attr("id"),d=this.fields[s];d.css="textShadow";var p=e+"px "+o+"px "+i+"px "+n;this.putCSS(d,p,"normal"),p=e+"px "+o+"px "+i+"px "+r,this.putCSS(d,p,"hover")},maxAdmin.prototype.updateAnchorText=function(t){0===$(".output .result").find("a .mb-text").length&&($(".output .result").find("a").append('<span class="mb-text"></span>'),$(".output .result").find("a .mb-text").css({display:"block","line-height":"1em","box-sizing":"border-box"}),this.repaint_preview()),$(".output .result").find("a .mb-text").text(t.val())},maxAdmin.prototype.updateGradientOpacity=function(t){this.updateGradient(!0),this.updateGradient(!1)},maxAdmin.prototype.updateDimension=function(t){var a=$(t).val(),e=$(t).attr("id"),o=this.fields[e];a>0?this.putCSS(o,a):this.putCSS(o,"auto")},maxAdmin.prototype.updateRadius=function(t){var a=t.val(),e=["radius_bottom_left","radius_bottom_right","radius_top_left","radius_top_right"];if("lock"==$("#radius_toggle").data("lock"))for(i=0;i<e.length;i++){var o=e[i];$("#"+o).val(a);var n=this.fields[o];this.putCSS(n,a+"px")}},maxAdmin.prototype.toggleRadiusLock=function(t){var a=$(t.target),e=$(a).data("lock");"lock"==e?($(a).removeClass("dashicons-lock").addClass("dashicons-unlock"),$(a).data("lock","unlock")):"unlock"==e&&($(a).removeClass("dashicons-unlock").addClass("dashicons-lock"),$(a).data("lock","lock"))},maxAdmin.prototype.initResponsive=function(){window.maxFoundry.maxadmin.responsive=new mbResponsive($),window.maxFoundry.maxadmin.responsive.init(this)},maxAdmin.prototype.do_paging=function(t){var a=parseInt($(t.target).val());if(a<=parseInt($(t.target).attr("max"))){var e=$(t.target).data("url");window.location=e+"&paged="+a}},maxAdmin.prototype.toggleShortcode=function(t){$(".shortcode-expand").hasClass("closed")?($(" .mb-message.shortcode .expanded").css("display","inline-block"),$(".shortcode-expand span").removeClass("dashicons-arrow-down").addClass("dashicons-arrow-up"),$(".shortcode-expand").removeClass("closed").addClass("open")):($(" .mb-message.shortcode .expanded").css("display","none"),$(".shortcode-expand span").addClass("dashicons-arrow-down").removeClass("dashicons-arrow-up"),$(".shortcode-expand").addClass("closed").removeClass("open"))},maxAdmin.prototype.toggleManual=function(t){t.preventDefault();var a=$(t.target),e=a.data("target"),o=$('.manual-entry[data-manual="'+e+'"]');if(o.is(":visible"))return o.hide(),!0;var i=$('[data-options="'+e+'"]').position().top+a.height();o.css("top",i),o.css("right",15),o.css("left","auto"),o.show()},maxAdmin.prototype.initConditionials=function(){var t=this;$("[data-show]").each(function(){var a=$(this).data("show"),e=a.target,o=a.values;$(document).on("change",'[name="'+e+'"]',{child:this,values:o},$.proxy(t.updateConditional,t)),$('[name="'+e+'"]').trigger("change")})},maxAdmin.prototype.updateConditional=function(t){var a=t.data,e=a.values,o=a.child,i=$(t.currentTarget),n=$(i).val();if("checkbox"===i.attr("type")){var r=$(i).prop("checked");n="checked"==e&&r?"checked":"unchecked"!=e||r?0:"unchecked"}e.indexOf(n)>=0?($(o).fadeIn("fast"),$(o).find("input, select").trigger("change")):($(o).fadeOut("fast"),$(o).find("input, select").trigger("change"))},maxAdmin.prototype.updateRange=function(t){if(void 0===t||null===t)a=$('input[type="range"]');else var a=[t.target];$(a).each(function(){var t=$(this).val();$(this).parents(".input").find(".range_value output").val(t+"%")})},maxAdmin.prototype.saveIndicator=function(t){this.form_updated=!!t},maxAdmin.prototype.formAjaxSave=function(t){t.preventDefault();var a=mb_ajax.ajaxurl,e=$(t.target).serialize();$.ajax({type:"POST",url:a,data:e}).done($.proxy(this.saveDone,this))},maxAdmin.prototype.saveDone=function(t){$("[data-form]").prop("disabled",!1);var a=$.parseJSON(t),e=a.result,o=a.title,i=a.data.id;if(void 0!==a.data.new_nonce){a.data.new_nonce;$('input[name="nonce"]').val(a.data.new_nonce)}if(e){$('input[name="collection_id"]').val(i);var n=window.location.href;-1===n.indexOf("collection_id")&&window.history.replaceState({},"",n+"&collection_id="+i),$(document).trigger("mbFormSaved");var r=$('input[name="sorted"]').val();$('input[name="previous_selection"]').val(r),a.data.reload&&document.location.reload(!0)}e||($modal=window.maxFoundry.maxmodal,$modal.newModal("collection_error"),$modal.setTitle(o),$modal.setContent(a.body),$modal.setControls('<button class="modal_close button-primary">'+a.close_text+"</button>"),$modal.show())}});
js/min/maxbuttons_media_button.js CHANGED
@@ -1 +1 @@
1
- var maxMedia;jQuery(document).ready(function($){var maxMedia=function(){this.callback=null,this.parent="#poststuff",this.window_loaded=null,this.maxm=null,this.closeOnCallback=!0};maxMedia.prototype.init=function(){this.maxm=new maxModal,this.maxm.init(),$(document).on("click",".maxbutton_media_button",$.proxy(this.clickAddButton,this)),this.callback="this.buttonToEditor"},maxMedia.prototype.setCallback=function(callback){if("function"!=typeof callback)if("function"==typeof window[callback])callback=window[callback];else{if("function"!=typeof eval(callback))return!1;callback=eval(callback)}this.callback=callback},maxMedia.prototype.showShortcodeOptions=function(t){this.closeOnCallback=!1,$currentModal=this.maxm.currentModal;var e=$('[data-button="'+t+'"]').find(".shortcode-container");options=$('<div class="shortcode_options">'),$("<input>",{type:"hidden",id:"mb_shortcode_id",name:"button_id"}).val(t).appendTo(options),$("<h3>").text("Shortcode Options").appendTo(options),$('<div class="button_example">').append(e).appendTo(options),$("<label>",{"for":"mb_shortcode_url"}).text(mbtrans.short_url_label).appendTo(options),$("<input>",{type:"text",id:"mb_shortcode_url",name:"shortcode_url",placeholder:"http://"}).on("change, keyup",function(t){var e=$(t.target).val();$(".button_example").find(".maxbutton").prop("href",e)}).appendTo(options),$("<label>",{"for":"mb_shortcode_text"}).text(mbtrans.short_text_label).appendTo(options),$("<input>",{type:"text",name:"shortcode_text",id:"mb_shortcode_text"}).on("change, keyup",function(t){var e=$(t.target).val();$(".button_example").find(".mb-text").text(e)}).appendTo(options),$("<p>").text(mbtrans.short_options_explain).appendTo(options),$("<input>",{type:"button",name:"add_shortcode","class":"button-primary",value:mbtrans.short_add_button}).on("click",$.proxy(this.addShortcodeOptions,this)).appendTo(options),this.maxm.setContent(options),this.maxm.checkResize()},maxMedia.prototype.addShortcodeOptions=function(t){t.preventDefault();var e=$("#mb_shortcode_url").val(),a=$("#mb_shortcode_text").val(),o=$("#mb_shortcode_id").val();this.buttonToEditor(o,e,a)},maxMedia.prototype.clickAddButton=function(t){t.preventDefault(),t.stopPropagation(),$(document).off("click",".pagination span");var e=this;"undefined"!=typeof $(t.target).data("callback")&&this.setCallback($(t.target).data("callback")),"undefined"!=typeof $(t.target).data("parent")&&(this.parent=$(t.target).data("parent")),$(document).on("click",".button-row",$.proxy(function(t){var e=$(t.target);"undefined"==typeof $(e).data("button")&&(e=$(e).parents(".button-row"));var a=$(e).data("button");$(".button-row").removeClass("selected"),$(e).addClass("selected"),$(".controls .insert").data("button",a),this.maxm.currentModal.find(".controls .insert").removeClass("disabled")},this)),$(document).on("click",".pagination span, .pagination-links a",function(t){if(t.preventDefault(),$(t.target).hasClass("disabled"))return!1;var a=$(t.target).data("page");1>=a&&(a=1),e.loadPostEditScreen(a)}),$(document).on("change",".input-paging",function(t){t.preventDefault();var a=parseInt($(t.target).val());e.loadPostEditScreen(a)}),this.loadPostEditScreen(0)},maxMedia.prototype.loadPostEditScreen=function(t){"undefined"==typeof t&&(t=0);var e={action:"getAjaxButtons",paged:t},a=mbtrans.ajax_url,o=this;return $(".media-buttons .loading").css("visibility","visible"),$.ajax({url:a,data:e,success:function(t){o.putResults(t)}}),!1},maxMedia.prototype.showPostEditScreen=function(){this.maxm.parent=this.parent,this.maxm.newModal("media-buttons"),this.maxm.setTitle(mbtrans.windowtitle),$(document).trigger("mb_media_buttons_open",this.maxm),this.maxm.show(),this.window_loaded=!0},maxMedia.prototype.putResults=function(t){this.showPostEditScreen(),$(".media-buttons .loading").css("visibility","hidden"),this.maxm.addControl("insert","",$.proxy(this.insertAction,this)),this.maxm.setContent(t),this.maxm.setControls(),this.maxm.checkResize(),this.resize(),$(window).on("resize",$.proxy(this.resize,this)),$(document).on("click",".maxbutton-preview",function(t){t.preventDefault()}),$(document).trigger("mb_media_put_results",[t,this.maxm])},maxMedia.prototype.resize=function(){topHeight=this.maxm.currentModal.find(".modal_header").height()+17,controlsHeight=this.maxm.currentModal.find(".controls").height()+21,modalHeight=this.maxm.currentModal.height(),this.maxm.currentModal.find(".modal_content").css("height",modalHeight-topHeight-controlsHeight),this.maxm.currentModal.find(".controls .insert").addClass("disabled")},maxMedia.prototype.insertAction=function(t){t.preventDefault();var e=$(t.target).data("button");"undefined"==typeof e||parseInt(e)<=0||("function"==typeof this.callback&&this.callback(e,$(t.target)),this.closeOnCallback&&this.maxm.close())},maxMedia.prototype.buttonToEditor=function(t,e,a){var o='[maxbutton id="'+t+'"';"undefined"!=typeof e&&e.length>1&&(o+=' url="'+e+'"'),"undefined"!=typeof a&&a.length>1&&(o+=' text="'+a+'"'),o+=" ] ",window.send_to_editor(o),this.maxm.close()},maxMedia.prototype.getEditor=function(){var t='line-height: 32px; padding-left: 40px; background: url("'+mbtrans.icon+'") no-repeat',e=$("<div>",{id:"maxbutton-add-button","class":"content"});return e.append($("<h2>",{style:t}).text(mbtrans.insert)).append($("<p>").text(mbtrans.select)).append($("<div>",{id:"mb_media_buttons"}).append('<div class="loading"></div>')),e},maxMedia=new maxMedia,maxMedia.init(),window.maxMedia=maxMedia});
1
+ var maxMedia;jQuery(document).ready(function($){var maxMedia=function(){this.callback=null,this.parent="#poststuff",this.window_loaded=null,this.maxm=null,this.closeOnCallback=!0};maxMedia.prototype.init=function(){this.maxm=new maxModal,this.maxm.init(),$(document).on("click",".maxbutton_media_button",$.proxy(this.clickAddButton,this)),this.callback="this.buttonToEditor"},maxMedia.prototype.setCallback=function(callback){if("function"!=typeof callback)if("function"==typeof window[callback])callback=window[callback];else{if("function"!=typeof eval(callback))return!1;callback=eval(callback)}this.callback=callback},maxMedia.prototype.showShortcodeOptions=function(t,a){this.closeOnCallback=!1,$currentModal=this.maxm.currentModal;var o=$('[data-button="'+t+'"]').find(".shortcode-container");options=$('<div class="shortcode_options">'),$("<input>",{type:"hidden",id:"mb_shortcode_id",name:"button_id"}).val(t).appendTo(options),$("<h3>").text("Shortcode Options").appendTo(options),$('<div class="button_example">').append(o).appendTo(options),$("<label>",{for:"mb_shortcode_url"}).text(mbtrans.short_url_label).appendTo(options),$("<input>",{type:"text",id:"mb_shortcode_url",name:"shortcode_url",placeholder:"http://"}).on("change, keyup",function(t){var a=$(t.target).val();$(".button_example").find(".maxbutton").prop("href",a)}).appendTo(options),$("<label>",{for:"mb_shortcode_text"}).text(mbtrans.short_text_label).appendTo(options),$("<input>",{type:"text",name:"shortcode_text",id:"mb_shortcode_text"}).on("change, keyup",function(t){var a=$(t.target).val();$(".button_example").find(".mb-text").text(a)}).appendTo(options),$("<p>").text(mbtrans.short_options_explain).appendTo(options),$("<input>",{type:"button",name:"add_shortcode",class:"button-primary",value:mbtrans.short_add_button}).on("click",$.proxy(this.addShortcodeOptions,this)).appendTo(options),this.maxm.setContent(options),this.maxm.checkResize()},maxMedia.prototype.addShortcodeOptions=function(t){t.preventDefault();var a=$("#mb_shortcode_url").val(),o=$("#mb_shortcode_text").val(),e=$("#mb_shortcode_id").val();this.buttonToEditor(e,a,o)},maxMedia.prototype.clickAddButton=function(t){t.preventDefault(),t.stopPropagation(),$(document).off("click",".pagination span");var a=this;void 0!==$(t.target).data("callback")&&this.setCallback($(t.target).data("callback")),void 0!==$(t.target).data("parent")&&(this.parent=$(t.target).data("parent")),$(document).on("click",".button-row",$.proxy(function(t){var a=$(t.target);void 0===$(a).data("button")&&(a=$(a).parents(".button-row"));var o=$(a).data("button");$(".button-row").removeClass("selected"),$(a).addClass("selected"),$(".controls .insert").data("button",o),this.maxm.currentModal.find(".controls .insert").removeClass("disabled")},this)),$(document).on("click",".pagination span, .pagination-links a",function(t){if(t.preventDefault(),$(t.target).hasClass("disabled"))return!1;var o=$(t.target).data("page");o<=1&&(o=1),a.loadPostEditScreen(o)}),$(document).on("change",".input-paging",function(t){t.preventDefault();var o=parseInt($(t.target).val());a.loadPostEditScreen(o)}),this.loadPostEditScreen(0)},maxMedia.prototype.loadPostEditScreen=function(t){void 0===t&&(t=0);var a={action:"getAjaxButtons",paged:t},o=mbtrans.ajax_url,e=this;return $(".media-buttons .loading").css("visibility","visible"),$.ajax({url:o,data:a,success:function(t){e.putResults(t)}}),!1},maxMedia.prototype.showPostEditScreen=function(){this.maxm.parent=this.parent,this.maxm.newModal("media-buttons"),this.maxm.setTitle(mbtrans.windowtitle),$(document).trigger("mb_media_buttons_open",this.maxm),this.maxm.show(),this.window_loaded=!0},maxMedia.prototype.putResults=function(t){this.showPostEditScreen(),$(".media-buttons .loading").css("visibility","hidden"),this.maxm.addControl("insert","",$.proxy(this.insertAction,this)),this.maxm.setContent(t),this.maxm.setControls(),this.maxm.checkResize(),this.resize(),$(window).on("resize",$.proxy(this.resize,this)),$(document).on("click",".maxbutton-preview",function(t){t.preventDefault()}),$(document).trigger("mb_media_put_results",[t,this.maxm])},maxMedia.prototype.resize=function(t){null!==this.maxm.currentModal&&(topHeight=this.maxm.currentModal.find(".modal_header").height()+17,controlsHeight=this.maxm.currentModal.find(".controls").height()+21,modalHeight=this.maxm.currentModal.height(),this.maxm.currentModal.find(".modal_content").css("height",modalHeight-topHeight-controlsHeight),this.maxm.currentModal.find(".controls .insert").addClass("disabled"))},maxMedia.prototype.insertAction=function(t){t.preventDefault();var a=$(t.target).data("button");void 0===a||parseInt(a)<=0||("function"==typeof this.callback&&this.callback(a,$(t.target)),this.closeOnCallback&&(this.maxm.close(),$(document).trigger("mb_media_buttons_close")))},maxMedia.prototype.buttonToEditor=function(t,a,o){var e='[maxbutton id="'+t+'"';void 0!==a&&a.length>1&&(e+=' url="'+a+'"'),void 0!==o&&o.length>1&&(e+=' text="'+o+'"'),e+=" ] ",window.send_to_editor(e),this.maxm.close()},maxMedia.prototype.getEditor=function(){var t='line-height: 32px; padding-left: 40px; background: url("'+mbtrans.icon+'") no-repeat',a=$("<div>",{id:"maxbutton-add-button",class:"content"});return a.append($("<h2>",{style:t}).text(mbtrans.insert)).append($("<p>").text(mbtrans.select)).append($("<div>",{id:"mb_media_buttons"}).append('<div class="loading"></div>')),a},(maxMedia=new maxMedia).init(),window.maxMedia=maxMedia});
js/min/maxcollections.js CHANGED
@@ -1 +1 @@
1
- var maxCollection;jQuery(document).ready(function($){maxCollection=function(){},maxCollection.prototype={fields:"",form_updated:!1,modalCurrentPage:0,item_maxwidth:0},maxCollection.prototype.init=function(){$(".collection_remove").on("click",$.proxy(this.confirmRemoveCollection,this)),0!=$("#collection_edit").length&&($(".mb-preview-window").draggable(),$(".button-picker .picker-wrapper").on("click",$.proxy(this.addButtontoCollection,this)),$(document).on("click",".sortable.buttons .button-remove",$.proxy(this.removeButton,this)),"undefined"!=typeof collectionFieldMap&&(this.fields=$.parseJSON(collectionFieldMap)),$(document).on("keyup",'.mb_ajax_save input[type="text"]',$.proxy(this.update_preview,this)),$(document).on("keyup change",".mb_ajax_save input",$.proxy(this.update_preview,this)),$(document).on("change",".mb_ajax_save select",$.proxy(this.update_preview,this)),this.initSortable(),$(document).on("click",'button[name="picker_popup"]',$.proxy(this.togglePickerPopup,this)),$(document).on("updatePreviewWindow",$.proxy(this.updatePlacement,this)),$(document).on("mbFormSaved",$.proxy(function(){this.form_updated=!1,this.toggleSaveIndicator(!1)},this)),$(window).on("beforeunload",$.proxy(function(){return this.form_updated?maxcol_wp.leave_page:void 0},this)),$(document).on("click","#exportCollection",$.proxy(this.exportCollection,this)),this.updatePlacement(),this.updatePlacement(),""==$('input[name="sorted"]').val()&&this.togglePickerPopup())},maxCollection.prototype.addButtontoCollection=function(t){var e=$(t).clone(),o=e.data("id");e.find(".button_name").remove();var a=e,i=a.find(".button_data").text();a.find(".button_data").remove(),a.append('<input type="hidden" name="button-data-'+o+'" value="'+i+'">'),this.addButtontoPreview(e.clone()),$(a).appendTo(".mb_collection_selection .sortable "),$(".mb_collection_selection .sortable").sortable("refresh");var n=$(".mb_collection_selection .sortable").sortable("toArray",{attribute:"data-id"}),c=n.length;n=n.toString(),$('input[name="sorted"]').val(n),$.proxy(this.updateColPreview({action:"new_button",data:i,button_id:o,button_count:c}),this)},maxCollection.prototype.updateColPreview=function(t){if("undefined"!=typeof t.action)var e=t.action;else e="";var o=$('input[name="block_nonce"]').val(),a=$('input[name="collection_id"]').val(),i=$('input[name="collection_type"]').val(),n=t.button_count,c=n-1;if("new_button"==e){var l={block_name:"social",block_action:"ajax_new_button",action:"mbpro_collection_block",nonce:o,collection_id:a,collection_type:i,block_data:{data:t.data,button_id:t.button_id,index:c}};$.proxy(this.ajaxNewButton(l),this)}},maxCollection.prototype.addButtontoPreview=function(t){t.find("input").remove(),t.find(".dashicons").remove();var e=t.data("id"),o=$("<span class='mb-collection-item' data-id='"+e+"'></span>").append(t.children());o.appendTo(".mb-preview-window .maxcollection"),this.updatePlacement()},maxCollection.prototype.ajaxNewButton=function(t){var e=mb_ajax.ajaxurl;$.ajax({type:"POST",url:e,data:t}).done($.proxy(this.ajaxNewButtonDone,this))},maxCollection.prototype.ajaxNewButtonDone=function(t){var e=$.parseJSON(t);$('.mb_tab[data-tab="social-options"]').children(".inside").append(e.body),$(".no-buttons").hide(),$(document).trigger("reInitConditionals")},maxCollection.prototype.update_preview=function(e){e.preventDefault(),this.toggleSaveIndicator(!0);var target=$(e.target),id=$(target).attr("id");"undefined"!=typeof $(target).data("target")&&(id=$(target).data("target"));var data=this.fields[id];"undefined"!=typeof data&&("undefined"!=typeof data.css&&(value=target.val(),"undefined"!=typeof data.css_unit&&-1==value.indexOf(data.css_unit)&&(value+=data.css_unit),this.putCSS(data,value)),"undefined"!=typeof data.attr&&$(".output .result").find("a").attr(data.attr,target.val()),"undefined"!=typeof data.func&&eval("this."+data.func+"(target)"),this.updatePlacement())},maxCollection.prototype.putCSS=function(t,e,o){o=o||"both";var a=".maxcollection";if("undefined"!=typeof t.csspart){var n=t.csspart.split(",");for(i=0;i<n.length;i++){var c=n[i];if(a!=="."+c)var l=a+" ."+c;else var l=a;$(".mb-preview-wrapper").find(l).css(t.css,e)}}else $(".output .result").find(a).css(t.css,e)},maxCollection.prototype.updatePlacement=function(){var t=$("#orientation").val();if("undefined"!=typeof t&&"auto"!==t)this.pushPreview(t);else if("auto"==t){var e=$("#placement").val();t="static-left"==e||"static-right"==e?"vertical":"horizontal",this.pushPreview(t)}},maxCollection.prototype.updateCollectionName=function(){var t=$("#collection_name").val();t=t.MBescapeHTML();var e=$(".mb-message.shortcode").html();e&&(e=e.replace(/\[maxcollection name="(.*)"]/gi,'[maxcollection name="'+t+'"]'),$(".mb-message.shortcode").html(e))};var __entityMap={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};String.prototype.MBescapeHTML=function(){return String(this).replace(/[&<>"'\/]/g,function(t){return __entityMap[t]})},maxCollection.prototype.parseTags=function(t){var e=$(t).parents(".social-option"),o=$(".social-option").index(e),a=$(".mb-preview-window .mb-collection-item").eq(o),i=$(e).find(".maxbutton"),n=$(e).find('[data-target="network"] :selected').text(),c=0,l={network_name:n,count:c},r=$(a).find(".mb-text"),d=$(a).find(".mb-text2"),s=$(i).find(".mb-text").text(),p=$(i).find(".mb-text2").text();$(r).text(s),$(d).text(p),this.replaceTags(r,l),this.replaceTags(d,l)},maxCollection.prototype.replaceTags=function(t,e){var o=$(t).text();"undefined"==typeof $(t).data("original")?$(t).data("original",o):o=$(t).data("original"),$.each(e,function(e,a){o=o.replace("{"+e+"}",a),$(t).text(o)})},maxCollection.prototype.pushPreview=function(t){var e=$(".mb-preview-window.output"),o=$(".mb-preview-window .mb-collection-item"),a=$(".mb-preview-window .maxcollection").height()+75;o.css("float","left"),"relative"!=e.css("position")&&("horizontal"==t&&(e.css("width",$("#maxbuttons").css("width")),e.css("top","auto"),e.css("bottom","10px"),e.css("height",a+"px"),e.css("right","10px"),e.css("left","auto"),o.css("clear","none")),"vertical"==t&&(e.css("width","30%"),e.css("right","20px"),e.css("top","25%"),e.css("height",a+"px"),e.css("left","auto"),e.css("bottom","auto"),o.css("clear","both")))},maxCollection.prototype.exportCollection=function(){var t=$('input[name="block_nonce"]').val(),e=$('input[name="collection_id"]').val(),o=$('input[name="collection_type"]').val(),a={block_name:"export",block_action:"export",action:"mbpro_collection_block",nonce:t,collection_id:e,collection_type:o,block_data:{}},i=mb_ajax.ajaxurl;$.ajax({type:"POST",url:i,data:a}).done(function(t){var e=$.parseJSON(t),o=e.data.location;window.location.href=o})},maxCollection.prototype.checkPicker=function(){$(".mb_collection_picker").is(":visible")&&this.initButtonPicker()},maxCollection.prototype.initSortable=function(){var t=this;$(".mb_collection_selection .sortable").sortable({placeholder:"sortable-placeholder",connectWith:".maxcollection",start:function(t,e){iBefore=e.item.index()},create:function(){var t=$(this).sortable("toArray",{attribute:"data-id"}).toString();$('input[name="sorted"]').val(t),$('input[name="previous_selection"]').val(t)},update:function(e,o){iAfter=o.item.index();var a=$(this).sortable("toArray",{attribute:"data-id"}).toString();$('input[name="sorted"]').val(a),t.updateListOrder(".maxcollection .mb-collection-item",iBefore,iAfter),t.updateListOrder(".social_block .social-option",iBefore,iAfter)}})},maxCollection.prototype.removeButton=function(t){t.preventDefault();var e=($('input[name="sorted"]').val(),$(t.currentTarget).parents(".item")),o=$(".mb_collection_selection .sortable .item"),a=o.index(e);$(t.currentTarget).parents(".item").remove(),$(".maxcollection .mb-collection-item:eq("+a+")").remove(),$(".social_block .social-option:eq("+a+")").remove(),$(".mb_collection_selection .sortable").sortable("refresh");var i=$(".mb_collection_selection .sortable").sortable("toArray",{attribute:"data-id"}).toString();$('input[name="sorted"]').val(i),this.toggleSaveIndicator(!0)},maxCollection.prototype.updateListOrder=function(t,e,o){if(this.toggleSaveIndicator(!0),evictee=$(t+":eq("+o+")"),evictor=$(t+":eq("+e+")"),evictee.replaceWith(evictor),iBefore>iAfter?evictor.after(evictee):evictor.before(evictee),".social_block .social-option"==t){$(t).each(function(t){var e=$(this).data("id"),o=$(this).html(),a=new RegExp("-"+e+"-\\d","gi");o=o.replace(a,"-"+e+"-"+t),$(this).html(o)})}},maxCollection.prototype.confirmRemoveCollection=function(t){var e=$(t.target).parents(".collection").data("id"),o=$(t.target).parents(".collection").data("blocknonce"),a=$(t.target).parents(".collection").data("type"),i=$(".remove_action_title").text(),n="<p>"+$(".remove_action_text").text()+"</p>",c=window.maxFoundry.maxmodal;c.newModal("collection_remove"),c.setTitle(i),c.setContent(n),c.addControl("yes",{collection_id:e,nonce:o,collection_type:a},$.proxy(this.removeCollection,this)),c.addControl("no","",$.proxy(c.close,c)),c.setControls(),c.show()},maxCollection.prototype.removeCollection=function(t){var e=t.data.collection_id,o=t.data.nonce,a=t.data.collection_type,i={block_name:"collection",block_action:"delete",action:"mbpro_collection_block",nonce:o,collection_id:e,collection_type:a,block_data:{}},n=mb_ajax.ajaxurl;$.ajax({type:"POST",url:n,data:i}).done(function(t){var e=$.parseJSON(t),o=window.maxFoundry.maxmodal,a=e.data.title,i=e.data.body,n=e.data.collection_id;o.newModal("collection_removed"),o.setTitle(a),o.setContent(i),o.addControl("ok","",$.proxy(o.close,o)),o.setControls(),o.show(),$(".collection-"+n).hide()})},maxCollection.prototype.togglePickerPopup=function(){var t=window.maxFoundry.maxmodal,e=$("#picker-modal").html();t.newModal("picker-modal"),t.setTitle(maxcol_wp.picker_title),t.setContent(e),t.show(),modal=t.get(),$(modal).off("click change keyup"),$(modal).on("click",".picker-packages a",$.proxy(this.getModalButtons,this)),$(modal).on("click",".picker-main .screen .item",$.proxy(this.toggleInSelection,this)),$(modal).on("click",".modal_close",$.proxy(t.close,t)),$(modal).on("click",".clear-selection",$.proxy(this.modalClearSelection,this)),$(modal).on("click",'button[name="add-buttons"]',$.proxy(this.modalAddButtons,this)),$(modal).on("click",".button-remove",$.proxy(this.modalDeleteButton,this)),$(modal).on("click",".pagination-links a",$.proxy(this.modalLoadPage,this)),$(modal).on("change keyup",".pagination-links input",$.proxy(this.modalLoadPage,this)),0==$(modal).find(".picker-main .current-screen").length&&$(modal).find(".picker-packages ul li a:first").trigger("click")},maxCollection.prototype.getModalButtons=function(t){t.preventDefault();var e=window.maxFoundry.maxmodal.get(),o=$(t.target),a=$(t.target).data("pack"),i=$(t.target).data("pack-loaded");if("undefined"!=typeof i&&i)return $(e).find(".picker-main .screen").hide().removeClass("current-screen"),$(e).find(".picker-main .screen-"+a).show().addClass("current-screen"),this.modalEqualHeight(),$(e).find(".picker-packages ul li a").removeClass("pack-active"),void $(t.target).addClass("pack-active");var n=$('input[name="collection_id"]').val(),c=$('input[name="collection_type"]').val(),l=$('input[name="block_nonce"]').val(),r={block_name:"collection",block_action:"ajax_getButtons",action:"mbpro_collection_block",nonce:l,collection_id:n,collection_type:c,block_data:{pack:a}},d=mb_ajax.ajaxurl,s=this;$.ajax({type:"POST",url:d,data:r}).done(function(t){s.modalLoadButtons(t,a,o)})},maxCollection.prototype.modalLoadButtons=function(t,e,o){var a=this,i=window.maxFoundry.maxmodal.get();$(i).find(".picker-main .screen").hide().removeClass("current-screen");var n=$.parseJSON(t);if(0==$(i).find(".picker-main .screen-"+e).length){var c=$('<div class="screen screen-'+e+'">');$(i).find(".picker-main").append(c)}else var c=$(i).find(" .picker-main .screen-"+e);c.html(n.body),$(i).find(".picker-main .screen-"+e).show().addClass("current-screen"),setTimeout($.proxy(function(){$(i).find(".picker-main .current-screen .item").each(function(){a.modalScaleButton(this)})},this),400),this.modalEqualHeight(),$(o).data("pack-loaded",!0),$(i).find(".picker-packages ul li a").removeClass("pack-active"),$(o).addClass("pack-active"),$(document).trigger("mb-modalLoadButtons")},maxCollection.prototype.modalLoadPage=function(t){t.preventDefault();var e=$(t.target).data("page");if("undefined"==typeof e){if("number"!=t.target.type)return;var e=$(t.target).val()}var o=$('input[name="collection_id"]').val(),a=$('input[name="collection_type"]').val(),i=$('input[name="block_nonce"]').val(),n=$(".picker-packages a.pack-active").data("pack"),c=$(".picker-packages a.pack-active"),l={block_name:"collection",block_action:"ajax_getButtons",action:"mbpro_collection_block",nonce:i,collection_id:o,collection_type:a,block_data:{pack:n,paged:e}},r=mb_ajax.ajaxurl,d=this;$.ajax({type:"POST",url:r,data:l}).done(function(t){d.modalLoadButtons(t,n,c)})},maxCollection.prototype.toggleInSelection=function(t){var e=$(t.target),o=window.maxFoundry.maxmodal.get();if(!e.hasClass("item"))var e=$(t.target).parents(".item");var a=$(e).data("id"),i=$(o).find(".picker-inselection .items").children('[data-id="'+a+'"]');if(i.length>0)return $(e).find(".button-selected").remove(),$(o).find(".picker-inselection .items").children('[data-id="'+a+'"]').remove(),void this.modalUpdateCount();var n=$(e).clone();$(n).find(".dashicons").remove(),$(n).css("height","100%"),$(n).css("width","40px"),$(n).find("a").css("verticalAlign","middle"),0==$(e).children(".button-selected").length&&$(e).append('<div class="button-selected"><span class="dashicons dashicons-yes">'),n.append('<div class="button-remove"><span class="dashicons dashicons-no">'),$(o).find(".picker-inselection .items").append(n),this.modalScaleButton(n),this.modalUpdateCount()},maxCollection.prototype.modalEqualHeight=function(){var t=0;$(modal).find(".picker-main .current-screen .item").each(function(){$(this).height()>t&&(t=$(this).height())}),t>0&&$(modal).find(".picker-main .current-screen .item").height(t)},maxCollection.prototype.modalScaleButton=function(t){var e=$(t).width();$(t).css("width","100%");var o=$(t).find("a"),a=$(o).width(),n=$(o).height();if($(t).css("width",e),!(e>=a)){var c=e/a;c=c.toFixed(2);var l=$(t).find("a"),r="width: calc("+a+"px * "+c+")!important; height: calc("+n+"px * "+c+") !important;";l.css("cssText",r),l.children(".mb-text").each(function(){var t=($(this).css("fontSize"),["font-size","padding-left","padding-right","padding-top","padding-bottom"]),e="";for(i=0;i<t.length;i++)if(parseInt($(this).css(t[i]))>0){var o=$(this).css(t[i]);e+=t[i]+": calc("+o+" * "+c+") !important; "}$(this).css("cssText",e)}),$icon=l.children(".mb-icon");var d=$icon.width(),s=$icon.height(),p="width: calc("+d+"px * "+c+") !important; height: calc("+s+"px * "+c+") !important;";$icon.css("cssText",p);var m=$icon.children("img");if(m.length>0){var d=m.width(),s=m.height(),p="width: calc("+d+"px * "+c+") !important; height: calc("+s+"px * "+c+") !important;";m.css("cssText",p)}}},maxCollection.prototype.unScaleButton=function(t){t.find("a, .mb-text, .mb-icon, img").css("cssText",""),t.css("cssText","")},maxCollection.prototype.modalClearSelection=function(){var t=window.maxFoundry.maxmodal.get();$(t).find(".picker-inselection .items").html(""),$(t).find(".screen .item .button-selected").remove(),this.modalUpdateCount()},maxCollection.prototype.modalAddButtons=function(t){t.preventDefault;var e=this,o=window.maxFoundry.maxmodal,a=window.maxFoundry.maxmodal.get();$(a).find(".picker-inselection .items .item").each(function(){var t=$(this).clone().wrap("<div>").parent().html(),o=$(t);e.unScaleButton(o),e.addButtontoCollection(o)}),o.close(),this.modalClearSelection()},maxCollection.prototype.modalUpdateCount=function(){var t=window.maxFoundry.maxmodal.get(),e=$(t).find(".picker-inselection .items .item").length;$(t).find(".picker-inselection .info .count").text(e),0==e?$(t).find(".picker-inselection .info").hide():$(t).find(".picker-inselection .info").show()},maxCollection.prototype.modalDeleteButton=function(t){var e=$(t.target).parents(".item"),o=e.data("id");$(".picker-main").find('[data-id="'+o+'"]').children(".button-selected").remove(),e.remove(),this.modalUpdateCount()},maxCollection.prototype.toggleSaveIndicator=function(t){t?(this.form_updated=!0,$(".save-indicator").css("display","block").addClass("dashicons-warning").removeClass("dashicons-yes")):$(".save-indicator").removeClass("dashicons-warning").addClass("dashicons-yes")}});
1
+ var maxCollection;jQuery(document).ready(function($){maxCollection=function(){},maxCollection.prototype={fields:"",form_updated:!1,modalCurrentPage:0,item_maxwidth:0},maxCollection.prototype.init=function(){$(".collection_remove").on("click",$.proxy(this.confirmRemoveCollection,this)),0!=$("#collection_edit").length&&($(".mb-preview-window").draggable(),$(".button-picker .picker-wrapper").on("click",$.proxy(this.addButtontoCollection,this)),$(document).on("click",".sortable.buttons .button-remove",$.proxy(this.removeButton,this)),"undefined"!=typeof collectionFieldMap&&(this.fields=$.parseJSON(collectionFieldMap)),$(document).on("keyup",'.mb_ajax_save input[type="text"]',$.proxy(this.update_preview,this)),$(document).on("keyup change",".mb_ajax_save input",$.proxy(this.update_preview,this)),$(document).on("change",".mb_ajax_save select",$.proxy(this.update_preview,this)),this.initSortable(),$(document).on("click",'button[name="picker_popup"]',$.proxy(this.togglePickerPopup,this)),$(document).on("updatePreviewWindow",$.proxy(this.updatePlacement,this)),$(document).on("mbFormSaved",$.proxy(function(){this.form_updated=!1,this.toggleSaveIndicator(!1)},this)),$(window).on("beforeunload",$.proxy(function(){if(this.form_updated)return maxcol_wp.leave_page},this)),$(document).on("click","#exportCollection",$.proxy(this.exportCollection,this)),this.updatePlacement(),this.updatePlacement(),""==$('input[name="sorted"]').val()&&this.togglePickerPopup())},maxCollection.prototype.addButtontoCollection=function(t){var e=$(t).clone(),o=e.data("id");e.find(".button_name").remove();var a=e,i=a.find(".button_data").text();a.find(".button_data").remove(),a.append('<input type="hidden" name="button-data-'+o+'" value="'+i+'">'),this.addButtontoPreview(e.clone()),$(a).appendTo(".mb_collection_selection .sortable "),$(".mb_collection_selection .sortable").sortable("refresh");var n=$(".mb_collection_selection .sortable").sortable("toArray",{attribute:"data-id"}),c=n.length;n=n.toString(),$('input[name="sorted"]').val(n),$.proxy(this.updateColPreview({action:"new_button",data:i,button_id:o,button_count:c}),this)},maxCollection.prototype.updateColPreview=function(t){if(void 0!==t.action)var e=t.action;else e="";var o=$('input[name="block_nonce"]').val(),a=$('input[name="collection_id"]').val(),i=$('input[name="collection_type"]').val(),n=t.button_count-1;if("new_button"==e){var c={block_name:"social",block_action:"ajax_new_button",action:"mbpro_collection_block",nonce:o,collection_id:a,collection_type:i,block_data:{data:t.data,button_id:t.button_id,index:n}};$.proxy(this.ajaxNewButton(c),this)}},maxCollection.prototype.addButtontoPreview=function(t){t.find("input").remove(),t.find(".dashicons").remove();var e=t.data("id");$("<span class='mb-collection-item' data-id='"+e+"'></span>").append(t.children()).appendTo(".mb-preview-window .maxcollection"),this.updatePlacement()},maxCollection.prototype.ajaxNewButton=function(t){var e=mb_ajax.ajaxurl;$.ajax({type:"POST",url:e,data:t}).done($.proxy(this.ajaxNewButtonDone,this))},maxCollection.prototype.ajaxNewButtonDone=function(t){var e=$.parseJSON(t);$('.mb_tab[data-tab="social-options"]').children(".inside").append(e.body),$(".no-buttons").hide(),$(document).trigger("reInitConditionals")},maxCollection.prototype.update_preview=function(e){e.preventDefault(),this.toggleSaveIndicator(!0);var target=$(e.target),id=$(target).attr("id");void 0!==$(target).data("target")&&(id=$(target).data("target"));var data=this.fields[id];void 0!==data&&(void 0!==data.css&&(value=target.val(),void 0!==data.css_unit&&-1==value.indexOf(data.css_unit)&&(value+=data.css_unit),this.putCSS(data,value)),void 0!==data.attr&&$(".output .result").find("a").attr(data.attr,target.val()),void 0!==data.func&&eval("this."+data.func+"(target)"),this.updatePlacement())},maxCollection.prototype.putCSS=function(t,e,o){o=o||"both";var a=".maxcollection";if(void 0!==t.csspart){var n=t.csspart.split(",");for(i=0;i<n.length;i++){var c=n[i];if(a!=="."+c)l=a+" ."+c;else var l=a;$(".mb-preview-wrapper").find(l).css(t.css,e)}}else $(".output .result").find(a).css(t.css,e)},maxCollection.prototype.updatePlacement=function(){var t=$("#orientation").val();if(void 0!==t&&"auto"!==t)this.pushPreview(t);else if("auto"==t){var e=$("#placement").val();t="static-left"==e||"static-right"==e?"vertical":"horizontal",this.pushPreview(t)}},maxCollection.prototype.updateCollectionName=function(){var t=$("#collection_name").val();t=t.MBescapeHTML();var e=$(".mb-message.shortcode").html();e&&(e=e.replace(/\[maxcollection name="(.*)"]/gi,'[maxcollection name="'+t+'"]'),$(".mb-message.shortcode").html(e))};var __entityMap={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};String.prototype.MBescapeHTML=function(){return String(this).replace(/[&<>"'\/]/g,function(t){return __entityMap[t]})},maxCollection.prototype.parseTags=function(t){var e=$(t).parents(".social-option"),o=$(".social-option").index(e),a=$(".mb-preview-window .mb-collection-item").eq(o),i=$(e).find(".maxbutton"),n={network_name:$(e).find('[data-target="network"] :selected').text(),count:0},c=$(a).find(".mb-text"),l=$(a).find(".mb-text2"),r=$(i).find(".mb-text").text(),d=$(i).find(".mb-text2").text();$(c).text(r),$(l).text(d),this.replaceTags(c,n),this.replaceTags(l,n)},maxCollection.prototype.replaceTags=function(t,e){var o=$(t).text();void 0===$(t).data("original")?$(t).data("original",o):o=$(t).data("original"),$.each(e,function(e,a){o=o.replace("{"+e+"}",a),$(t).text(o)})},maxCollection.prototype.pushPreview=function(t){var e=$(".mb-preview-window.output"),o=$(".mb-preview-window .mb-collection-item"),a=$(".mb-preview-window .maxcollection").height()+75;o.css("float","left"),"relative"!=e.css("position")&&("horizontal"==t&&(e.css("width",$("#maxbuttons").css("width")),e.css("top","auto"),e.css("bottom","10px"),e.css("height",a+"px"),e.css("right","10px"),e.css("left","auto"),o.css("clear","none")),"vertical"==t&&(e.css("width","30%"),e.css("right","20px"),e.css("top","25%"),e.css("height",a+"px"),e.css("left","auto"),e.css("bottom","auto"),o.css("clear","both")))},maxCollection.prototype.exportCollection=function(){var t={block_name:"export",block_action:"export",action:"mbpro_collection_block",nonce:$('input[name="block_nonce"]').val(),collection_id:$('input[name="collection_id"]').val(),collection_type:$('input[name="collection_type"]').val(),block_data:{}},e=mb_ajax.ajaxurl;$.ajax({type:"POST",url:e,data:t}).done(function(t){var e=$.parseJSON(t).data.location;window.location.href=e})},maxCollection.prototype.checkPicker=function(){$(".mb_collection_picker").is(":visible")&&this.initButtonPicker()},maxCollection.prototype.initSortable=function(){var t=this;$(".mb_collection_selection .sortable").sortable({placeholder:"sortable-placeholder",connectWith:".maxcollection",start:function(t,e){iBefore=e.item.index()},create:function(t,e){var o=$(this).sortable("toArray",{attribute:"data-id"}).toString();$('input[name="sorted"]').val(o),$('input[name="previous_selection"]').val(o)},update:function(e,o){iAfter=o.item.index();var a=$(this).sortable("toArray",{attribute:"data-id"}).toString();$('input[name="sorted"]').val(a),t.updateListOrder(".maxcollection .mb-collection-item",iBefore,iAfter),t.updateListOrder(".social_block .social-option",iBefore,iAfter)}})},maxCollection.prototype.removeButton=function(t){t.preventDefault();$('input[name="sorted"]').val();var e=$(t.currentTarget).parents(".item"),o=$(".mb_collection_selection .sortable .item").index(e);$(t.currentTarget).parents(".item").remove(),$(".maxcollection .mb-collection-item:eq("+o+")").remove(),$(".social_block .social-option:eq("+o+")").remove(),$(".mb_collection_selection .sortable").sortable("refresh");var a=$(".mb_collection_selection .sortable").sortable("toArray",{attribute:"data-id"}).toString();$('input[name="sorted"]').val(a),this.toggleSaveIndicator(!0)},maxCollection.prototype.updateListOrder=function(t,e,o){if(this.toggleSaveIndicator(!0),evictee=$(t+":eq("+o+")"),evictor=$(t+":eq("+e+")"),evictee.replaceWith(evictor),iBefore>iAfter?evictor.after(evictee):evictor.before(evictee),".social_block .social-option"==t)$(t).each(function(t){var e=$(this).data("id"),o=$(this).html(),a=new RegExp("-"+e+"-\\d","gi");o=o.replace(a,"-"+e+"-"+t),$(this).html(o)})},maxCollection.prototype.confirmRemoveCollection=function(t){var e=$(t.target).parents(".collection").data("id"),o=$(t.target).parents(".collection").data("blocknonce"),a=$(t.target).parents(".collection").data("type"),i=$(".remove_action_title").text(),n="<p>"+$(".remove_action_text").text()+"</p>",c=window.maxFoundry.maxmodal;c.newModal("collection_remove"),c.setTitle(i),c.setContent(n),c.addControl("yes",{collection_id:e,nonce:o,collection_type:a},$.proxy(this.removeCollection,this)),c.addControl("no","",$.proxy(c.close,c)),c.setControls(),c.show()},maxCollection.prototype.removeCollection=function(t){var e=t.data.collection_id,o={block_name:"collection",block_action:"delete",action:"mbpro_collection_block",nonce:t.data.nonce,collection_id:e,collection_type:t.data.collection_type,block_data:{}},a=mb_ajax.ajaxurl;$.ajax({type:"POST",url:a,data:o}).done(function(t){var e=$.parseJSON(t),o=window.maxFoundry.maxmodal,a=e.data.title,i=e.data.body,n=e.data.collection_id;o.newModal("collection_removed"),o.setTitle(a),o.setContent(i),o.addControl("ok","",$.proxy(o.close,o)),o.setControls(),o.show(),$(".collection-"+n).hide()})},maxCollection.prototype.togglePickerPopup=function(t){var e=window.maxFoundry.maxmodal,o=$("#picker-modal").html();e.newModal("picker-modal"),e.setTitle(maxcol_wp.picker_title),e.setContent(o),e.show(),modal=e.get(),$(modal).off("click change keyup"),$(modal).on("click",".picker-packages a",$.proxy(this.getModalButtons,this)),$(modal).on("click",".picker-main .screen .item",$.proxy(this.toggleInSelection,this)),$(modal).on("click",".modal_close",$.proxy(e.close,e)),$(modal).on("click",".clear-selection",$.proxy(this.modalClearSelection,this)),$(modal).on("click",'button[name="add-buttons"]',$.proxy(this.modalAddButtons,this)),$(modal).on("click",".button-remove",$.proxy(this.modalDeleteButton,this)),$(modal).on("click",".pagination-links a",$.proxy(this.modalLoadPage,this)),$(modal).on("change keyup",".pagination-links input",$.proxy(this.modalLoadPage,this)),0==$(modal).find(".picker-main .current-screen").length&&$(modal).find(".picker-packages ul li a:first").trigger("click")},maxCollection.prototype.getModalButtons=function(t){t.preventDefault();var e=window.maxFoundry.maxmodal.get(),o=$(t.target),a=$(t.target).data("pack"),i=$(t.target).data("pack-loaded");if(void 0!==i&&i)return $(e).find(".picker-main .screen").hide().removeClass("current-screen"),$(e).find(".picker-main .screen-"+a).show().addClass("current-screen"),this.modalEqualHeight(),$(e).find(".picker-packages ul li a").removeClass("pack-active"),void $(t.target).addClass("pack-active");var n=$('input[name="collection_id"]').val(),c=$('input[name="collection_type"]').val(),l={block_name:"collection",block_action:"ajax_getButtons",action:"mbpro_collection_block",nonce:$('input[name="block_nonce"]').val(),collection_id:n,collection_type:c,block_data:{pack:a}},r=mb_ajax.ajaxurl,d=this;$.ajax({type:"POST",url:r,data:l}).done(function(t){d.modalLoadButtons(t,a,o)})},maxCollection.prototype.modalLoadButtons=function(t,e,o){var a=this,i=window.maxFoundry.maxmodal.get();$(i).find(".picker-main .screen").hide().removeClass("current-screen");var n=$.parseJSON(t);if(0==$(i).find(".picker-main .screen-"+e).length){c=$('<div class="screen screen-'+e+'">');$(i).find(".picker-main").append(c)}else var c=$(i).find(" .picker-main .screen-"+e);c.html(n.body),$(i).find(".picker-main .screen-"+e).show().addClass("current-screen"),setTimeout($.proxy(function(){$(i).find(".picker-main .current-screen .item").each(function(){a.modalScaleButton(this)})},this),400),this.modalEqualHeight(),$(o).data("pack-loaded",!0),$(i).find(".picker-packages ul li a").removeClass("pack-active"),$(o).addClass("pack-active"),$(document).trigger("mb-modalLoadButtons")},maxCollection.prototype.modalLoadPage=function(t){if(t.preventDefault(),void 0===(e=$(t.target).data("page"))){if("number"!=t.target.type)return;var e=$(t.target).val()}var o=$('input[name="collection_id"]').val(),a=$('input[name="collection_type"]').val(),i=$('input[name="block_nonce"]').val(),n=$(".picker-packages a.pack-active").data("pack"),c=$(".picker-packages a.pack-active"),l={block_name:"collection",block_action:"ajax_getButtons",action:"mbpro_collection_block",nonce:i,collection_id:o,collection_type:a,block_data:{pack:n,paged:e}},r=mb_ajax.ajaxurl,d=this;$.ajax({type:"POST",url:r,data:l}).done(function(t){d.modalLoadButtons(t,n,c)})},maxCollection.prototype.toggleInSelection=function(t){var e=$(t.target),o=window.maxFoundry.maxmodal.get();if(!e.hasClass("item"))e=$(t.target).parents(".item");var a=$(e).data("id");if($(o).find(".picker-inselection .items").children('[data-id="'+a+'"]').length>0)return $(e).find(".button-selected").remove(),$(o).find(".picker-inselection .items").children('[data-id="'+a+'"]').remove(),void this.modalUpdateCount();var i=$(e).clone();$(i).find(".dashicons").remove(),$(i).css("height","100%"),$(i).css("width","40px"),$(i).find("a").css("verticalAlign","middle"),0==$(e).children(".button-selected").length&&$(e).append('<div class="button-selected"><span class="dashicons dashicons-yes">'),i.append('<div class="button-remove"><span class="dashicons dashicons-no">'),$(o).find(".picker-inselection .items").append(i),this.modalScaleButton(i),this.modalUpdateCount()},maxCollection.prototype.modalEqualHeight=function(t){var e=0;$(modal).find(".picker-main .current-screen .item").each(function(){$(this).height()>e&&(e=$(this).height())}),e>0&&$(modal).find(".picker-main .current-screen .item").height(e)},maxCollection.prototype.modalScaleButton=function(t){var e=$(t).width();$(t).css("width","100%");var o=$(t).find("a"),a=$(o).width(),n=$(o).height();if($(t).css("width",e),!(e>=a)){var c=e/a;c=c.toFixed(2);var l=$(t).find("a"),r="width: calc("+a+"px * "+c+")!important; height: calc("+n+"px * "+c+") !important;";l.css("cssText",r),l.children(".mb-text").each(function(){$(this).css("fontSize");var t=["font-size","padding-left","padding-right","padding-top","padding-bottom"],e="";for(i=0;i<t.length;i++)if(parseInt($(this).css(t[i]))>0){var o=$(this).css(t[i]);e+=t[i]+": calc("+o+" * "+c+") !important; "}$(this).css("cssText",e)}),$icon=l.children(".mb-icon");var d=$icon.width(),s=$icon.height(),p="width: calc("+d+"px * "+c+") !important; height: calc("+s+"px * "+c+") !important;";$icon.css("cssText",p);var m=$icon.children("img");if(m.length>0){var d=m.width(),s=m.height(),p="width: calc("+d+"px * "+c+") !important; height: calc("+s+"px * "+c+") !important;";m.css("cssText",p)}}},maxCollection.prototype.unScaleButton=function(t){t.find("a, .mb-text, .mb-icon, img").css("cssText",""),t.css("cssText","")},maxCollection.prototype.modalClearSelection=function(t){var e=window.maxFoundry.maxmodal.get();$(e).find(".picker-inselection .items").html(""),$(e).find(".screen .item .button-selected").remove(),this.modalUpdateCount()},maxCollection.prototype.modalAddButtons=function(t){t.preventDefault;var e=this,o=window.maxFoundry.maxmodal,a=window.maxFoundry.maxmodal.get();$(a).find(".picker-inselection .items .item").each(function(){var t=$(this).clone().wrap("<div>").parent().html(),o=$(t);e.unScaleButton(o),e.addButtontoCollection(o)}),o.close(),this.modalClearSelection()},maxCollection.prototype.modalUpdateCount=function(t){var e=window.maxFoundry.maxmodal.get(),o=$(e).find(".picker-inselection .items .item").length;$(e).find(".picker-inselection .info .count").text(o),0==o?$(e).find(".picker-inselection .info").hide():$(e).find(".picker-inselection .info").show()},maxCollection.prototype.modalDeleteButton=function(t){var e=$(t.target).parents(".item"),o=e.data("id");$(".picker-main").find('[data-id="'+o+'"]').children(".button-selected").remove(),e.remove(),this.modalUpdateCount()},maxCollection.prototype.toggleSaveIndicator=function(t){t?(this.form_updated=!0,$(".save-indicator").css("display","block").addClass("dashicons-warning").removeClass("dashicons-yes")):$(".save-indicator").removeClass("dashicons-warning").addClass("dashicons-yes")}});
js/min/maxmodal.js CHANGED
@@ -1 +1 @@
1
- var maxModal;jQuery(document).ready(function(t){(maxModal=function(){}).prototype={currentModal:null,modals:[],controls:[],parent:"#maxbuttons",multiple:!1,windowHeight:!1,windowWidth:!1,setWidth:!1,setHeight:!1,target:!1},maxModal.prototype.init=function(){this.windowHeight=t(window).height(),this.windowWidth=t(window).width(),t(document).on("click",".maxmodal",t.proxy(this.buildModal,this)),t(window).on("resize",t.proxy(this.checkResize,this))},maxModal.prototype.focus=function(){this.currentModal.show()},maxModal.prototype.get=function(){return this.currentModal},maxModal.prototype.show=function(){t(".maxmodal_overlay").remove(),this.writeOverlay(),this.setWidth&&this.currentModal.width(this.setWidth),this.setHeight&&this.currentModal.height(this.setHeight);var o=this.currentModal.height(),e=this.currentModal.width(),i=(this.windowHeight-o)/2,a=(this.windowWidth-e)/2;i<30&&(i=30),o>this.windowHeight&&this.currentModal.height(this.windowHeight-i-5+"px"),this.currentModal.css("left",a+"px"),this.currentModal.css("top",i+"px"),this.currentModal.css("height",o),this.currentModal.show(),t(".maxmodal_overlay").show(),t(document).off("keydown",t.proxy(this.keyPressHandler,this)),t(document).on("keydown",t.proxy(this.keyPressHandler,this))},maxModal.prototype.keyPressHandler=function(t){27===t.keyCode&&this.close()},maxModal.prototype.checkResize=function(){this.windowHeight=t(window).height(),this.windowWidth=t(window).width(),null!==this.currentModal&&(this.currentModal.removeAttr("style"),this.currentModal.find(".modal_content").removeAttr("style"),this.show())},maxModal.prototype.close=function(){this.currentModal.trigger("modal_close",[this]),this.currentModal.remove(),this.currentModal=null,t(".maxmodal_overlay").remove()},maxModal.prototype.fadeOut=function(t){void 0==typeof t&&(t=600);var o=this;this.currentModal.fadeOut(t,function(){o.close()})},maxModal.prototype.setTitle=function(t){this.currentModal.find(".modal_title").text(t)},maxModal.prototype.setControls=function(o){var e=this.currentModal.find(".modal_content"),a=t('<div class="controls">');for(i=0;i<this.controls.length;i++)a.append(this.controls[i]);void 0!==o&&a.append(o),e.append(a),t(this.currentModal).find(".modal_close").off("click"),t(this.currentModal).find(".modal_close").on("click",t.proxy(this.close,this))},maxModal.prototype.addControl=function(o,e,i){var a="";switch(o){case"yes":a=modaltext.yes;break;case"ok":a=modaltext.ok;break;case"no":a=modaltext.no;break;case"cancel":a=modaltext.cancel;break;case"insert":a=mbtrans.insert}var d=t('<a class="button-primary '+o+'">'+a+"</a>");d.on("click",e,i),this.controls.push(d)},maxModal.prototype.setContent=function(t){this.currentModal.find(".modal_content").html(t)},maxModal.prototype.buildModal=function(o){o.preventDefault();var e=t(o.target);void 0===e.data("modal")&&(e=e.parents(".maxmodal")),this.target=e;var i=e.data("modal"),a=t("#"+i);void 0!==a.data("width")?this.setWidth=a.data("width"):this.setWidth=!1,void 0!==a.data("height")?this.setHeight=a.data("height"):this.setHeight=!1;var d=t(a).find(".title").text(),s=t(a).find(".controls").html(),n=t(a).find(".content").html();if(this.newModal(i),this.setTitle(d),this.setContent(n),this.setControls(s),void 0!==t(a).data("load")){var l=a.data("load")+"(modal)",r=new Function("modal",l);try{r(this)}catch(t){console.log("MB Modal Callback Error: "+t.message)}}this.show()},maxModal.prototype.newModal=function(o){null!==this.currentModal&&this.close();var e=t('<div class="max-modal '+o+'" > \t\t\t\t\t\t <div class="modal_header"> \t\t\t\t\t\t\t <div class="modal_close dashicons dashicons-no"></div><h3 class="modal_title"></h3> \t\t\t\t\t\t </div> \t\t\t\t\t\t <div class="inner modal_content"></div>\t\t\t\t\t </div>');return t(this.parent).length>0?t(this.parent).append(e):t("body").append(e),t(e).draggable({handle:".modal_header"}),this.modals.push(e),this.currentModal=e,this.controls=[],this},maxModal.prototype.writeOverlay=function(){t(this.parent).append('<div class="maxmodal_overlay"></div>'),t(".maxmodal_overlay").on("click",t.proxy(this.close,this))}});
1
+ var maxModal;jQuery(document).ready(function(t){(maxModal=function(){}).prototype={currentModal:null,modals:[],controls:[],parent:"#maxbuttons",multiple:!1,windowHeight:!1,windowWidth:!1,setWidth:!1,setHeight:!1,target:!1},maxModal.prototype.init=function(){this.windowHeight=t(window).height(),this.windowWidth=t(window).width(),t(document).on("click",".maxmodal",t.proxy(this.buildModal,this)),t(window).on("resize",t.proxy(this.checkResize,this))},maxModal.prototype.focus=function(){this.currentModal.show()},maxModal.prototype.get=function(){return this.currentModal},maxModal.prototype.show=function(){t(".maxmodal_overlay").remove(),this.writeOverlay(),this.setWidth&&this.currentModal.width(this.setWidth),this.setHeight&&this.currentModal.height(this.setHeight);var o=this.currentModal.height(),e=this.currentModal.width(),i=(this.windowHeight-o)/2,a=(this.windowWidth-e)/2;i<30&&(i=30),o>this.windowHeight&&this.currentModal.height(this.windowHeight-i-5+"px"),this.currentModal.css("left",a+"px"),this.currentModal.css("top",i+"px"),this.currentModal.css("height",o),this.currentModal.show(),t(".maxmodal_overlay").show(),t(document).off("keydown",t.proxy(this.keyPressHandler,this)),t(document).on("keydown",t.proxy(this.keyPressHandler,this))},maxModal.prototype.keyPressHandler=function(t){27===t.keyCode&&this.close()},maxModal.prototype.checkResize=function(){this.windowHeight=t(window).height(),this.windowWidth=t(window).width(),null!==this.currentModal&&(this.currentModal.removeAttr("style"),this.currentModal.find(".modal_content").removeAttr("style"),this.show())},maxModal.prototype.close=function(){this.currentModal.trigger("modal_close",[this]),this.currentModal.remove(),this.currentModal=null,t(".maxmodal_overlay").remove(),t(document).off("keydown",t.proxy(this.keyPressHandler,this))},maxModal.prototype.fadeOut=function(t){void 0==typeof t&&(t=600);var o=this;this.currentModal.fadeOut(t,function(){o.close()})},maxModal.prototype.setTitle=function(t){this.currentModal.find(".modal_title").text(t)},maxModal.prototype.setControls=function(o){var e=this.currentModal.find(".modal_content"),a=t('<div class="controls">');for(i=0;i<this.controls.length;i++)a.append(this.controls[i]);void 0!==o&&a.append(o),e.append(a),t(this.currentModal).find(".modal_close").off("click"),t(this.currentModal).find(".modal_close").on("click",t.proxy(this.close,this))},maxModal.prototype.addControl=function(o,e,i){var a="";switch(o){case"yes":a=modaltext.yes;break;case"ok":a=modaltext.ok;break;case"no":a=modaltext.no;break;case"cancel":a=modaltext.cancel;break;case"insert":a=mbtrans.insert}var d=t('<a class="button-primary '+o+'">'+a+"</a>");d.on("click",e,i),this.controls.push(d)},maxModal.prototype.setContent=function(t){this.currentModal.find(".modal_content").html(t)},maxModal.prototype.buildModal=function(o){o.preventDefault();var e=t(o.target);void 0===e.data("modal")&&(e=e.parents(".maxmodal")),this.target=e;var i=e.data("modal"),a=t("#"+i);void 0!==a.data("width")?this.setWidth=a.data("width"):this.setWidth=!1,void 0!==a.data("height")?this.setHeight=a.data("height"):this.setHeight=!1;var d=t(a).find(".title").text(),s=t(a).find(".controls").html(),n=t(a).find(".content").html();if(this.newModal(i),this.setTitle(d),this.setContent(n),this.setControls(s),void 0!==t(a).data("load")){var l=a.data("load")+"(modal)",r=new Function("modal",l);try{r(this)}catch(t){console.log("MB Modal Callback Error: "+t.message),console.log("MB Mobdal tried calling: "+l)}}this.show()},maxModal.prototype.newModal=function(o){null!==this.currentModal&&this.close();var e=t('<div class="max-modal '+o+'" > \t\t\t\t\t\t <div class="modal_header"> \t\t\t\t\t\t\t <div class="modal_close dashicons dashicons-no"></div><h3 class="modal_title"></h3> \t\t\t\t\t\t </div> \t\t\t\t\t\t <div class="inner modal_content"></div>\t\t\t\t\t </div>');return t(this.parent).length>0?t(this.parent).append(e):t("body").append(e),t(e).draggable({handle:".modal_header"}),this.modals.push(e),this.currentModal=e,this.controls=[],this},maxModal.prototype.writeOverlay=function(){t(this.parent).append('<div class="maxmodal_overlay"></div>'),t(".maxmodal_overlay").on("click",t.proxy(this.close,this))}});
js/min/maxtabs.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(a){var e=function(){};e.prototype.init=function(){this.tabs(),this.previewTab()},e.prototype.tabs=function(){var e=".sub-tabs",t=".mb_tab",i="#maxbuttons";if(0!==a(t).length){var o=a(i).data("view");if("undefined"==typeof o&&(o="list"),"list"!=o){a(i).addClass("mb_tabs_active"),0===a(e).length?($tabslocation=a('<h2 class="nav-tab-wrapper sub-tabs"></h2>'),$tabslocation.insertBefore(a(t).first()),$tabslocation=a(e)):$tabslocation=a(e),a(t).hide(),a.each(a(t),function(){var t=a(this).children("div.title").first(),i=t.clone(),o=i.children("span:first").clone().wrap("<p>").parent().html(),s=i.children("span.title").text();a(i).children("span").remove(),a(i).children("input,button").remove(),t.children("span:first").remove(),t.children(".title").remove(),tab_title="undefined"!=typeof o?o+s:s;var n=a('<a class="nav-tab" href="javascript:void(0);">'+tab_title+"</a>");s=s.trim(),s=s.replace(/ /g,"-"),a(n).attr("data-tab",s.toLowerCase()),a(e).append(n),a(this).attr("data-tab",s.toLowerCase())});var s=a('input[name="tab"]').val();"undefined"==typeof s&&(s=""),""==s?($tabslocation.children(".nav-tab").first().addClass("nav-tab-active"),a(t).first().show()):($tabslocation.children('[data-tab="'+s+'"]').addClass("nav-tab-active"),a(t+'[data-tab="'+s+'"]').show()),$tabslocation.children("a").on("click",this.toggleTabs),this.addSaveTab($tabslocation)}}},e.prototype.addSaveTab=function(a){var e='<div class="save-indicator dashicons dashicons-warning"></div>';a.append(e)},e.prototype.toggleTabs=function(e){e.preventDefault();var t=".sub-tabs",i=".mb_tab";a(t).children("a").removeClass("nav-tab-active"),a(this).addClass("nav-tab-active"),a(i).hide();var o=a(this).data("tab");a(i+'[data-tab="'+o+'"]').show(),a('input[name="tab"]').val(o),a(document).trigger("maxTabChange",[o])},e.prototype.previewTab=function(){var e=(a(".mb-preview-window").is(":visible"),".sub-tabs"),t=e+' a[data-tab="preview"]';this.togglePreview(),a(t).off("click"),a(document).on("click",t,a.proxy(function(e){e.preventDefault(),e.stopPropagation();var t=a(".mb-preview-window").is(":visible");return this.togglePreview(t?!1:!0),a(document).trigger("updatePreviewWindow"),!1},this)),a(".mb-preview-window .close").on("click",{tab:t},function(e){a(e.data.tab).trigger("click")})},e.prototype.togglePreview=function(e){var t=".sub-tabs",i=t+' a[data-tab="preview"]';if("undefined"==typeof e)if(localStorage.getItem("mb-col-preview")){var o=localStorage.getItem("mb-col-preview");"string"==typeof o&&(o="true"==o?!0:!1),"boolean"==typeof o&&this.togglePreview(o)}else this.togglePreview(!0);else e?(a(".mb-preview-window").show(),a(i).addClass(" preview-on"),a(i+" .dashicons").addClass("dashicons-yes").removeClass("dashicons-no"),a(i).removeClass("preview-off"),localStorage.setItem("mb-col-preview",!0)):(a(".mb-preview-window").hide(),a(i).removeClass("preview-on"),a(i+" .dashicons").removeClass("dashicons-yes").addClass("dashicons-no"),a(i).addClass("preview-off"),localStorage.setItem("mb-col-preview",!1))};var t=new e;t.init()});
1
+ jQuery(document).ready(function(t){var a=function(){};a.prototype.init=function(){this.tabs(),this.previewTab()},a.prototype.tabs=function(){var a=".mb_tab";if(0!==t(a).length){var e=t("#maxbuttons").data("view");if(void 0===e&&(e="list"),"list"!=e){t("#maxbuttons").addClass("mb_tabs_active"),0===t(".sub-tabs").length?($tabslocation=t('<h2 class="nav-tab-wrapper sub-tabs"></h2>'),$tabslocation.insertBefore(t(a).first()),$tabslocation=t(".sub-tabs")):$tabslocation=t(".sub-tabs"),t(a).hide(),t.each(t(a),function(){var a=t(this).children("div.title").first(),e=a.clone(),i=e.children("span:first").clone().wrap("<p>").parent().html(),s=e.children("span.title").text();t(e).children("span").remove(),t(e).children("input,button").remove(),a.children("span:first").remove(),a.children(".title").remove(),tab_title=void 0!==i?i+s:s;var o=t('<a class="nav-tab" href="javascript:void(0);">'+tab_title+"</a>");s=(s=s.trim()).replace(/ /g,"-"),t(o).attr("data-tab",s.toLowerCase()),t(".sub-tabs").append(o),t(this).attr("data-tab",s.toLowerCase())});var i=t('input[name="tab"]').val();void 0===i&&(i=""),""==i?($tabslocation.children(".nav-tab").first().addClass("nav-tab-active"),t(a).first().show()):($tabslocation.children('[data-tab="'+i+'"]').addClass("nav-tab-active"),t(a+'[data-tab="'+i+'"]').show()),$tabslocation.children("a").on("click",this.toggleTabs),this.addSaveTab($tabslocation)}}},a.prototype.addSaveTab=function(t){t.append('<div class="save-indicator dashicons dashicons-warning"></div>')},a.prototype.toggleTabs=function(a){a.preventDefault();t(".sub-tabs").children("a").removeClass("nav-tab-active"),t(this).addClass("nav-tab-active"),t(".mb_tab").hide();var e=t(this).data("tab");t('.mb_tab[data-tab="'+e+'"]').show(),t('input[name="tab"]').val(e),t(document).trigger("maxTabChange",[e])},a.prototype.previewTab=function(){t(".mb-preview-window").is(":visible");var a='.sub-tabs a[data-tab="preview"]';this.togglePreview(),t(a).off("click"),t(document).on("click",a,t.proxy(function(a){return a.preventDefault(),a.stopPropagation(),t(".mb-preview-window").is(":visible")?this.togglePreview(!1):this.togglePreview(!0),t(document).trigger("updatePreviewWindow"),!1},this)),t(".mb-preview-window .close").on("click",{tab:a},function(a){t(a.data.tab).trigger("click")})},a.prototype.togglePreview=function(a){var e='.sub-tabs a[data-tab="preview"]';if(void 0===a)if(localStorage.getItem("mb-col-preview")){var i=localStorage.getItem("mb-col-preview");"string"==typeof i&&(i="true"==i),"boolean"==typeof i&&this.togglePreview(i)}else this.togglePreview(!0);else a?(t(".mb-preview-window").show(),t(e).addClass(" preview-on"),t(e+" .dashicons").addClass("dashicons-yes").removeClass("dashicons-no"),t(e).removeClass("preview-off"),localStorage.setItem("mb-col-preview",!0)):(t(".mb-preview-window").hide(),t(e).removeClass("preview-on"),t(e+" .dashicons").removeClass("dashicons-yes").addClass("dashicons-no"),t(e).addClass("preview-off"),localStorage.setItem("mb-col-preview",!1))},(new a).init()});
js/min/responsive.js CHANGED
@@ -1 +1 @@
1
- var mbResponsive=function(e){this.jquery=e};mbResponsive.prototype={jquery:null,mbAdmin:null,responsiveMap:null},mbResponsive.prototype.init=function(e){$=this.jquery,this.mbAdmin=e,0!=$("#new-button-form").length&&(this.checkAutoQuery(),$('input[name="auto_responsive"]').on("click",$.proxy(this.checkAutoQuery,this)),$(".add_media_query").on("click",$.proxy(this.addMediaQuery,this)),this.responsiveMap=JSON.parse(responsiveMap),$(document).on("click",".removebutton",$.proxy(this.removeMediaQuery,this)))},mbResponsive.prototype.checkAutoQuery=function(){$=this.jquery,$('input[name="auto_responsive"]').is(":checked")?($(".media_queries_options").hide(),$(".option-design.new-query").hide()):($(".media_queries_options").show(),$(".option-design.new-query").show())},mbResponsive.prototype.addMediaQuery=function(){$=this.jquery,this.mbAdmin.saveIndicator(!0);var e=$(".media_option_prot").children().clone(),t=$("#new_query").val(),i=$("#new_query :selected").text(),n=$("#media_desc").children("#"+t).text();$(e).data("query",t),$(e).children('input[name="media_query[]"]').val(t),$(e).children(".title").text(i),$(e).children(".description").text(n),"custom"==t&&$(e).find(".custom").removeClass("hidden");var r=$('input[name="next_media_index"]').val();$(e).find("label, select, input").each(function(){var e=$(this).attr("name"),t=$(this).attr("id"),i=$(this).data("field"),n=$(this).prop("tagName").toLowerCase();if("undefined"!=typeof t&&$(this).attr("id",t.replace("[]","["+r+"]")),"undefined"!=typeof e&&$(this).attr("name",e.replace("[]","["+r+"]")),"undefined"!=typeof i&&$(this).data("field",i.replace("[]","["+r+"]")),"label"==n){var o=$(this).attr("for");"undefined"!=typeof o&&$(this).attr("for",o.replace("[]","["+r+"]"))}}),$(document).trigger("reinitConditionals"),r=parseInt(r),$('input[name="next_media_index"]').val(r+1),"custom"!==t&&($("#new_query :selected").prop("disabled",!0),$("#new_query :selected").prop("selected",!1)),$(".new_query_space").append(e);var o=$(".new_query_space").offset().top;$(window).scrollTop(o-100)},mbResponsive.prototype.removeMediaQuery=function(e){$=this.jquery;var t=e.target,i=$(t).parents(".media_query").data("query");$(t).parents(".media_query").fadeOut(function(){$(this).remove()}),$('#new_query option[value="'+i+'"]').prop("disabled",!1)},mbResponsive.prototype.toggleResponsivePreview=function(e){var t=$(e.target),i=t.attr("id");i=i.replace("mq_preview[",""),i=i.replace("]",""),this.renderPreview(i)},mbResponsive.prototype.renderPreview=function(e){var t=["mq_container_width","mq_container_float","mq_custom_minwidth","mq_custom_minheight","mq_hide"],i=this.responsiveMap,n=this;$.each(i,function(r){var o=this.css,s='[id^="'+r+'["]',a='[id^="'+r+'_unit["]',d=$(s).eq(e),p=d.attr("id");if(p=p.replace(/\[[0-9]\]/gi,""),$.inArray(p,t)>=0)return!0;if(p.indexOf("_unit")>=0)return!0;var u=d.val(),c="";if("undefined"!=typeof i[r+"_unit"])var c=$(a).eq(e).val();var m={css:o};"font-size"==o&&(m.csspart="mb-text,mb-text2"),n.mbAdmin.putCSS(m,u+c)})};
1
+ var mbResponsive=function(e){this.jquery=e};mbResponsive.prototype={jquery:null,mbAdmin:null,responsiveMap:null},mbResponsive.prototype.init=function(e){$=this.jquery,this.mbAdmin=e,0!=$("#new-button-form").length&&(this.checkAutoQuery(),$('input[name="auto_responsive"]').on("click",$.proxy(this.checkAutoQuery,this)),$(".add_media_query").on("click",$.proxy(this.addMediaQuery,this)),this.responsiveMap=JSON.parse(responsiveMap),$(document).on("click",".removebutton",$.proxy(this.removeMediaQuery,this)))},mbResponsive.prototype.checkAutoQuery=function(){$=this.jquery,$('input[name="auto_responsive"]').is(":checked")?($(".media_queries_options").hide(),$(".option-design.new-query").hide()):($(".media_queries_options").show(),$(".option-design.new-query").show())},mbResponsive.prototype.addMediaQuery=function(){$=this.jquery,this.mbAdmin.saveIndicator(!0);var e=$(".media_option_prot").children().clone(),t=$("#new_query").val(),i=$("#new_query :selected").text(),n=$("#media_desc").children("#"+t).text();$(e).data("query",t),$(e).children('input[name="media_query[]"]').val(t),$(e).children(".title").text(i),$(e).children(".description").text(n),"custom"==t&&$(e).find(".custom").removeClass("hidden");var r=$('input[name="next_media_index"]').val();$(e).find("label, select, input").each(function(){var e=$(this).attr("name"),t=$(this).attr("id"),i=$(this).data("field"),n=$(this).prop("tagName").toLowerCase();if(void 0!==t&&$(this).attr("id",t.replace("[]","["+r+"]")),void 0!==e&&$(this).attr("name",e.replace("[]","["+r+"]")),void 0!==i&&$(this).data("field",i.replace("[]","["+r+"]")),"label"==n){var o=$(this).attr("for");void 0!==o&&$(this).attr("for",o.replace("[]","["+r+"]"))}}),$(document).trigger("reinitConditionals"),r=parseInt(r),$('input[name="next_media_index"]').val(r+1),"custom"!==t&&($("#new_query :selected").prop("disabled",!0),$("#new_query :selected").prop("selected",!1)),$(".new_query_space").append(e);var o=$(".new_query_space").offset().top;$(window).scrollTop(o-100)},mbResponsive.prototype.removeMediaQuery=function(e){$=this.jquery;var t=e.target,i=$(t).parents(".media_query").data("query");$(t).parents(".media_query").fadeOut(function(){$(this).remove()}),$('#new_query option[value="'+i+'"]').prop("disabled",!1)},mbResponsive.prototype.toggleResponsivePreview=function(e){var t=$(e.target).attr("id");t=(t=t.replace("mq_preview[","")).replace("]",""),this.renderPreview(t)},mbResponsive.prototype.renderPreview=function(e){var t=["mq_container_width","mq_container_float","mq_custom_minwidth","mq_custom_minheight","mq_hide"],i=this.responsiveMap,n=this;$.each(i,function(r){var o=this.css,s='[id^="'+r+'["]',a='[id^="'+r+'_unit["]',d=$(s).eq(e),p=d.attr("id");if(p=p.replace(/\[[0-9]\]/gi,""),$.inArray(p,t)>=0)return!0;if(p.indexOf("_unit")>=0)return!0;var u=d.val(),c="";if(void 0!==i[r+"_unit"])c=$(a).eq(e).val();var m={css:o};"font-size"==o&&(m.csspart="mb-text,mb-text2"),n.mbAdmin.putCSS(m,u+c)})};
js/min/review-notice.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(t){function a(a){a.preventDefault;var n=t(a.target).data("action");e(n)}function e(a){var e=mb_ajax_review.ajaxurl,o={action:"set_review_notice_status",status:a};t.ajax({method:"POST",url:e,data:o,success:function(){n()}})}function n(){t(".maxbuttons-notice, .maxbuttons-reviewoffer").fadeOut()}t(".maxbuttons-notice [data-action], .maxbuttons-reviewoffer [data-action]").on("click",a)});
1
+ jQuery(document).ready(function(t){function a(a){a.preventDefault,e(t(a.target).data("action"))}function e(a){var e=mb_ajax_review.ajaxurl,o={action:"set_review_notice_status",status:a};t.ajax({method:"POST",url:e,data:o,success:function(t){n()}})}function n(){t(".maxbuttons-notice, .maxbuttons-reviewoffer").fadeOut()}t(".maxbuttons-notice [data-action], .maxbuttons-reviewoffer [data-action]").on("click",a)});
maxbuttons.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: MaxButtons
4
  Plugin URI: http://maxbuttons.com
5
  Description: The best WordPress button generator. This is the free version; the Pro version <a href="http://maxbuttons.com/?ref=mbfree">can be found here</a>.
6
- Version: 6.20
7
  Author: Max Foundry
8
  Author URI: http://maxfoundry.com
9
  Text Domain: maxbuttons
@@ -16,26 +16,11 @@ namespace MaxButtons;
16
  if (! defined('MAXBUTTONS_ROOT_FILE'))
17
  define("MAXBUTTONS_ROOT_FILE", __FILE__);
18
  if (! defined('MAXBUTTONS_VERSION_NUM'))
19
- define('MAXBUTTONS_VERSION_NUM', '6.20');
20
 
21
- define('MAXBUTTONS_RELEASE',"07 Jun 2017");
22
 
23
 
24
- if (! function_exists('MaxButtons\maxbuttons_php52_nono'))
25
- {
26
- function maxbuttons_php52_nono()
27
- {
28
- $message = sprintf( __("From version 3 MaxButtons requires at least PHP 5.3 . You are running version: %s ","maxbuttons"), PHP_VERSION);
29
- echo"<div class='error'> <h4>$message</h4></div>";
30
- return;
31
- }
32
- }
33
- if ( version_compare(PHP_VERSION, '5.3', '<' ) ) {
34
-
35
- add_action( 'admin_notices', 'MaxButtons\maxbuttons_php52_nono' );
36
- return;
37
- }
38
-
39
  if (! function_exists('MaxButtons\maxbutton_double_load'))
40
  {
41
  function maxbutton_double_load()
3
  Plugin Name: MaxButtons
4
  Plugin URI: http://maxbuttons.com
5
  Description: The best WordPress button generator. This is the free version; the Pro version <a href="http://maxbuttons.com/?ref=mbfree">can be found here</a>.
6
+ Version: 6.21
7
  Author: Max Foundry
8
  Author URI: http://maxfoundry.com
9
  Text Domain: maxbuttons
16
  if (! defined('MAXBUTTONS_ROOT_FILE'))
17
  define("MAXBUTTONS_ROOT_FILE", __FILE__);
18
  if (! defined('MAXBUTTONS_VERSION_NUM'))
19
+ define('MAXBUTTONS_VERSION_NUM', '6.21');
20
 
21
+ define('MAXBUTTONS_RELEASE',"28 Jul 2017");
22
 
23
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  if (! function_exists('MaxButtons\maxbutton_double_load'))
25
  {
26
  function maxbutton_double_load()
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: maxfoundry, basszje, arcware, johnbhartley
3
  Tags: wordpress buttons, wordpress button plugin, social icons, css3 button generator, responsive buttons, css wordpress button
4
  Requires at least: 4.0
5
  Tested up to: 4.8
6
- Stable tag: 6.20
7
 
8
  WordPress button plugin so powerful and easy to use anyone can create beautiful buttons and social share icons.
9
 
@@ -245,6 +245,17 @@ This depends on the slider plugin you are using. Most of the well-known ones are
245
 
246
  == Changelog ==
247
 
 
 
 
 
 
 
 
 
 
 
 
248
  = 6.20.1 =
249
 
250
  * Fix - warnings when using Origins Sitebuilder
3
  Tags: wordpress buttons, wordpress button plugin, social icons, css3 button generator, responsive buttons, css wordpress button
4
  Requires at least: 4.0
5
  Tested up to: 4.8
6
+ Stable tag: 6.21
7
 
8
  WordPress button plugin so powerful and easy to use anyone can create beautiful buttons and social share icons.
9
 
245
 
246
  == Changelog ==
247
 
248
+ = 6.21 =
249
+
250
+ * Feature - Add simple link title to buttons plus shortcode attribute linktitle
251
+ * Updated Font Awesome override to work only where needed
252
+ * Removed PHP 5.2 check - not functional
253
+
254
+ = 6.20.2 =
255
+
256
+ * Fixed issue with window resizes in post / page editor
257
+ * Fixed issue with Shortcake integration
258
+
259
  = 6.20.1 =
260
 
261
  * Fix - warnings when using Origins Sitebuilder