Contact Form 7 Style - Version 3.1.1

Version Description

  • Major Fix for custom styles
  • [Small Fix] Styling issue on buttons
  • [Small Fix] CSS generator core upgraded
Download this release

Release Info

Developer mlehelsz
Plugin Icon 128x128 Contact Form 7 Style
Version 3.1.1
Comparing to
See all releases

Code changes from version 3.1.0 to 3.1.1

Files changed (5) hide show
  1. admin/css/admin.css +1 -1
  2. admin/js/admin-min.js +1 -1
  3. admin/js/admin.js +19 -28
  4. cf7-style.php +12 -6
  5. readme.txt +11 -10
admin/css/admin.css CHANGED
@@ -1 +1 @@
1
- .clearfix:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.hidden,.panel .hidden{display:none}.menu-icon-cf7_style .dashicons-twitter{position:relative}.post-type-cf7_style .wp-list-table td{position:relative;overflow:visible}.post-type-cf7_style #preview-style{width:200px}#cf7_style_meta_box_image img{max-width:100%}.post-type-cf7_style .preview-style{text-align:center}.post-type-cf7_style .thumb-preview{width:50px;display:inline-block}.post-type-cf7_style .thumb-preview:hover .previewed-img{opacity:1;visibility:visible}.post-type-cf7_style .thumb-preview img{width:100%;border:1px solid #e1e1e1;padding:5px}.type-cf7_style .taxonomy-style_category{text-transform:capitalize}.post-type-cf7_style .previewed-img{opacity:0;visibility:hidden;position:absolute;z-index:100;top:-70px;left:0;width:202px;height:auto;border:1px solid #e1e1e1;padding:5px;background-color:#fff;-webkit-transition:all .3s ease-in-out;-moz-transition:all .3s ease-in-out;-ms-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.cf7-style-slider-wrap .overlay,.cf7slider li{-webkit-transition:.1s ease-in .1s;-moz-transition:.1s ease-in .1s;-o-transition:.1s ease-in .1s}.post-type-cf7_style .previewed-img img{padding:0;border:none}.post-type-cf7_style select[name=cf7_style_font_selector]{float:left;margin-right:10px;width:25%;margin-bottom:15px}.cf7-style.preview-zone{border:1px solid #e5e5e5;padding:8px 4px;width:70%;float:left}.cf7-style.preview-zone h4{margin:5px 0 10px}.cf7-style.preview-zone p{font-size:14px}.menu-icon-cf7_style .dashicons-twitter:after{color:#000;content:".";font-size:10px;left:20px;position:absolute;top:0}.wp-admin .widefat .different-style input{margin:0 10px 0 0;height:21px}.general-settings{float:left;width:32%;margin-right:2%;margin-bottom:10px}.general-settings.full-width{margin-right:0;width:99%;border:1px solid #ddd;padding:5px;-moz-border-size:border-box;-webkit-border-size:border-box;border-size:border-box}.general-settings:nth-of-type(2n+3){margin-right:0}.general-settings h3{text-transform:uppercase}.general-settings:after{clear:both}.general-settings label{line-height:26px}.general-settings label strong{display:block;margin-right:10px}.general-settings label input{margin-right:5px}.general-settings small{display:block;color:#999;margin-top:5px;line-height:12px}.general-settings .element{width:100%;border:1px solid #ddd;padding:10px;box-sizing:border-box;margin-bottom:10px}.general-settings .element table{width:100%}.general-settings .element td{width:50%}.CodeMirror{background:#f8f8ff}@media screen and (max-width:1332px){.general-settings{width:47%}.general-settings.full-width{width:99%;margin-right:0}}@media screen and (max-width:1100px){.general-settings{width:99%;margin-right:0}}.cf7-style-slider,.cf7-style-slider-wrap img{position:relative;margin:0 auto;display:block}.close-cf7-panel{float:right}.cf7style-welcome-panel img{max-width:160px;height:auto}.cf7-style-slider{width:202px;height:300px}.cf7-style-slider-wrap{width:202px;overflow:hidden}.cf7-style-slider-wrap img{width:198px;z-index:1}.cf7-style-slider-wrap .overlay{width:100%;height:100%;position:absolute;display:block;background:rgba(192,192,192,.4);z-index:2;text-align:center;transition:.1s ease-in .1s}.cf7-style-slider-wrap .overlay em{color:#fff;line-height:200px;font-size:20px;-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);filter:progid: DXImageTransform.Microsoft.BasicImage(rotation=2);position:relative;display:block;font-weight:700}.cf7slider li{display:block;float:left;width:202px;cursor:pointer;transition:.1s ease-in .1s}.cf7slider li:hover>span em,input.cf7style_template{display:none}.cf7-style-slider .current-saved span,.cf7-style-slider span{width:100%;height:100%;position:relative;padding-top:2px;padding-bottom:2px}.cf7slider li:hover>span .overlay{background:0 0}.cf7slider li:hover>span .overlay em{color:#000}.cf7-style-slider .current-saved span .overlay{background:rgba(255,0,0,.1)}.cf7-style-slider .current-saved span{display:block;background:rgba(255,0,0,.5)}.cf7-style-slider span{background:silver;display:block}.cf7arrows a{position:absolute;display:block;width:90px;height:90px;background-repeat:no-repeat;top:50px;color:transparent;opacity:.7;-webkit-transition:.1s ease-in .1s;-moz-transition:.1s ease-in .1s;-o-transition:.1s ease-in .1s;transition:.1s ease-in .1s;outline:0;background-size:100% auto}.generate-preview,.panel-options{display:block;position:relative}.cf7arrows a:hover{opacity:1}.cf7arrows a.left{left:-145px;background-image:url(../images/left.png)}.cf7arrows a.right{right:-145px;background-image:url(../images/right.png)}.panel-options{width:60%;min-height:685px;float:right}.panel-options .decision,.panel-options .loading{position:absolute;background-color:transparent;width:100%;height:100%;top:0;left:0;display:flex;justify-content:center;align-items:center}.panel-options .decision{background-color:#f2f2f2;top:53px;height:182px}.panel-options .decision.hidden,.panel-options .loading.hidden{display:none}.wp-admin .panel-options .cancel-btn,.wp-admin .panel-options .save-btn{background-color:#e74c3c;height:40px;padding:0 25px;font-weight:400;margin-right:10px;font-size:16px;border:none;text-shadow:none;box-shadow:none}.wp-admin .panel-options .cancel-btn{background-color:#fff;color:#222;line-height:40px}.wp-admin .panel-options .save-btn{border:1px solid #e74c3c}.wp-admin .panel-options .save-btn:hover{color:#e74c3c;background-color:#fff}.panel-header{padding-right:12px;position:relative;width:40%;float:left;-webkit-box-sizing:border-box;box-sizing:border-box;z-index:5}.generate-preview:after,.panel-header:after{display:block;content:"";clear:both}.panel li,.panel-header select,.preview-form-tag{display:inline-block;vertical-align:top}.preview-form-tag{width:100%;box-sizing:border-box;height:630px}#form-tag,.preview-form-tag{background:#f2f2f2;overflow-x:auto;padding:10px}.element-selector{background:#f2f2f2;margin-bottom:7px;margin-top:3px;padding-left:11px;padding-top:7px}#form-tag h4,.element-selector h4{margin-top:0;margin-bottom:12px}.element-selector label{display:block;margin-bottom:10px;width:50%;float:left}#form-tag a{margin-right:5px;border-radius:0;box-shadow:none;background-color:#fff;margin-bottom:5px}#form-tag a:hover{background-color:#E74C3C;color:#FFF;border:1px solid #E74C3C}#advanced-sortables .generate-preview-button,#form-tag a.button-primary,.wp-core-ui .fixed-save-style input.button{background-color:#E74C3C;-webkit-box-shadow:none;box-shadow:none;border:1px solid #E74C3C;border-radius:0;text-shadow:none}#advanced-sortables .generate-preview-button:hover,#advanced-sortables .generate-preview-button[disabled],#form-tag a.button-primary:hover,.wp-core-ui .fixed-save-style input.button:hover{background-color:#fff!important;color:#E74C3C!important;border:1px solid #E74C3C!important}.wp-core-ui .fixed-save-style input.button,.wp-core-ui .fixed-save-style input.button:hover{border-left:none;border-right:none;border-radius:0}#cf7_style_meta_box_font_selector,#cf7_style_meta_box_form_selector{display:inline-block;width:49.5%}.post-type-cf7_style #normal-sortables{display:none}.preview-form-container>h4{text-align:center;margin-top:0}.element-styling{float:left;padding:0 10px;width:100%;border-bottom:1px solid #CCC;box-sizing:border-box}.element-styling.half-size{width:50%}.element-styling label{display:inline-block;position:relative;margin-right:5px}.element-styling label select{width:123px}.element-styling label select[name*=unit]{width:46px;margin-left:3px}.element-styling input[type=number]{height:28px;position:relative;top:2px;width:60px}.wp-picker-container{position:relative;top:10px}.element-styling.background li,.element-styling.font li{width:50%}.element-styling label strong{margin-right:3px;font-weight:400;display:inline-block;min-width:153px}.choose-preview{background-color:#f2f2f2;padding:10px;margin-bottom:3px}.choose-preview h4{margin:0 0 10px}.element-styling.background label,.element-styling.font label{margin-right:0}.element-styling h3{font-size:13px;margin-bottom:10px}.element-styling h3 span{color:#E74C3C;opacity:1}.panel li{width:100%;margin-bottom:10px}.cf7style-status-form,.parser-message{margin-bottom:20px}.fixed-save-style{position:fixed;width:100%;left:0;bottom:0;z-index:9999;text-align:center;display:none}.wp-core-ui .fixed-save-style input.button{width:100%;height:40px;line-height:40px;font-size:18px}.remove_template_notice{float:right}@media all and (max-width:1600px){.element-styling.half-size,.panel-header,.panel-options{width:100%}}.element-styling .icon{display:inline-block;height:26px;border:1px solid #CCC;padding:0 7px;background-color:#f2f2f2;position:relative;top:2px;font-size:13px;line-height:26px;margin-right:-2px}.cf7style-status-table,.generate-preview-option,.multiple-form-generated-preview,.wp-core-ui .button-primary.generate-preview-button{display:none}.element-styling .icon.smaller{height:23px;line-height:23px;top:1px;font-size:13px}.description-title{padding-left:10px}.parser-message{color:red}.cf7style-welcome-panel{background-color:#fff;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);width:100%;padding:10px}.cf7style-input{width:250px}.wp-core-ui .button-primary.cf7style-status-submit,.wp-core-ui .button.cf7style-status-info,.wp-core-ui input:focus,.wp-core-ui input[disabled]{display:inline-block;margin-top:10px}.wp-core-ui .button.cf7style-status-info{margin-right:10px}span.wpcf7-not-valid-tip{color:red;font-size:1em;display:block}.wpcf7-validation-errors{background:0 0;padding:15px;margin:2em .5em 1em;color:red;border:2px solid red}.wpcf7-response-output.wpcf7-mail-sent-ok{background:0 0;color:green;border:2px solid green;padding:15px;margin:2em .5em 1em}
1
+ .clearfix:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.hidden,.panel .hidden{display:none}.menu-icon-cf7_style .dashicons-twitter{position:relative}.post-type-cf7_style .wp-list-table td{position:relative;overflow:visible}.post-type-cf7_style #preview-style{width:200px}#cf7_style_meta_box_image img{max-width:100%}.post-type-cf7_style .preview-style{text-align:center}.post-type-cf7_style .thumb-preview{width:50px;display:inline-block}.post-type-cf7_style .thumb-preview:hover .previewed-img{opacity:1;visibility:visible}.post-type-cf7_style .thumb-preview img{width:100%;border:1px solid #e1e1e1;padding:5px}.type-cf7_style .taxonomy-style_category{text-transform:capitalize}.post-type-cf7_style .previewed-img{opacity:0;visibility:hidden;position:absolute;z-index:100;top:-70px;left:0;width:202px;height:auto;border:1px solid #e1e1e1;padding:5px;background-color:#fff;-webkit-transition:all .3s ease-in-out;-moz-transition:all .3s ease-in-out;-ms-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.cf7-style-slider-wrap .overlay,.cf7slider li{-webkit-transition:.1s ease-in .1s;-moz-transition:.1s ease-in .1s;-o-transition:.1s ease-in .1s}.post-type-cf7_style .previewed-img img{padding:0;border:none}.post-type-cf7_style select[name=cf7_style_font_selector]{float:left;margin-right:10px;width:25%;margin-bottom:15px}.cf7-style.preview-zone{border:1px solid #e5e5e5;padding:8px 4px;width:70%;float:left}.cf7-style.preview-zone h4{margin:5px 0 10px}.cf7-style.preview-zone p{font-size:14px}.menu-icon-cf7_style .dashicons-twitter:after{color:#000;content:".";font-size:10px;left:20px;position:absolute;top:0}.wp-admin .widefat .different-style input{margin:0 10px 0 0;height:21px}.general-settings{float:left;width:32%;margin-right:2%;margin-bottom:10px}.general-settings.full-width{margin-right:0;width:99%;border:1px solid #ddd;padding:5px;-moz-border-size:border-box;-webkit-border-size:border-box;border-size:border-box}.general-settings:nth-of-type(2n+3){margin-right:0}.general-settings h3{text-transform:uppercase}.general-settings:after{clear:both}.general-settings label{line-height:26px}.general-settings label strong{display:block;margin-right:10px}.general-settings label input{margin-right:5px}.general-settings small{display:block;color:#999;margin-top:5px;line-height:12px}.general-settings .element{width:100%;border:1px solid #ddd;padding:10px;box-sizing:border-box;margin-bottom:10px}.general-settings .element table{width:100%}.general-settings .element td{width:50%}.CodeMirror{background:#f8f8ff}@media screen and (max-width:1332px){.general-settings{width:47%}.general-settings.full-width{width:99%;margin-right:0}}@media screen and (max-width:1100px){.general-settings{width:99%;margin-right:0}}.cf7-style-slider,.cf7-style-slider-wrap img{position:relative;margin:0 auto;display:block}.close-cf7-panel{float:right}.cf7style-welcome-panel img{max-width:160px;height:auto}.cf7-style-slider{width:202px;height:300px}.cf7-style-slider-wrap{width:202px;overflow:hidden}.cf7-style-slider-wrap img{width:198px;z-index:1}.cf7-style-slider-wrap .overlay{width:100%;height:100%;position:absolute;display:block;background:rgba(192,192,192,.4);z-index:2;text-align:center;transition:.1s ease-in .1s}.cf7-style-slider-wrap .overlay em{color:#fff;line-height:200px;font-size:20px;-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);filter:progid: DXImageTransform.Microsoft.BasicImage(rotation=2);position:relative;display:block;font-weight:700}.cf7slider li{display:block;float:left;width:202px;cursor:pointer;transition:.1s ease-in .1s}.cf7slider li:hover>span em,input.cf7style_template{display:none}.cf7-style-slider .current-saved span,.cf7-style-slider span{width:100%;height:100%;position:relative;padding-top:2px;padding-bottom:2px}.cf7slider li:hover>span .overlay{background:0 0}.cf7slider li:hover>span .overlay em{color:#000}.cf7-style-slider .current-saved span .overlay{background:rgba(255,0,0,.1)}.cf7-style-slider .current-saved span{display:block;background:rgba(255,0,0,.5)}.cf7-style-slider span{background:silver;display:block}.cf7arrows a{position:absolute;display:block;width:90px;height:90px;background-repeat:no-repeat;top:50px;color:transparent;opacity:.7;-webkit-transition:.1s ease-in .1s;-moz-transition:.1s ease-in .1s;-o-transition:.1s ease-in .1s;transition:.1s ease-in .1s;outline:0;background-size:100% auto}.generate-preview,.panel-options{display:block;position:relative}.cf7arrows a:hover{opacity:1}.cf7arrows a.left{left:-145px;background-image:url(../images/left.png)}.cf7arrows a.right{right:-145px;background-image:url(../images/right.png)}.panel-options{width:60%;min-height:685px;float:right}.panel-options .decision,.panel-options .loading{position:absolute;background-color:transparent;width:100%;height:100%;top:0;left:0;display:flex;justify-content:center;align-items:center}.panel-options .decision{background-color:#f2f2f2;top:53px;height:182px}.panel-options .decision.hidden,.panel-options .loading.hidden{display:none}.wp-admin .panel-options .cancel-btn,.wp-admin .panel-options .save-btn{background-color:#e74c3c;height:40px;padding:0 25px;font-weight:400;margin-right:10px;font-size:16px;border:none;text-shadow:none;box-shadow:none}.wp-admin .panel-options .cancel-btn{background-color:#fff;color:#222;line-height:40px}.wp-admin .panel-options .save-btn{border:1px solid #e74c3c}.wp-admin .panel-options .save-btn:hover{color:#e74c3c;background-color:#fff}.panel-header{padding-right:12px;position:relative;width:40%;float:left;-webkit-box-sizing:border-box;box-sizing:border-box;z-index:5}.generate-preview:after,.panel-header:after{display:block;content:"";clear:both}.panel li,.panel-header select,.preview-form-tag{display:inline-block;vertical-align:top}.preview-form-tag{width:100%;box-sizing:border-box;height:630px}#form-tag,.preview-form-tag{background:#f2f2f2;overflow-x:auto;padding:10px}.element-selector{background:#f2f2f2;margin-bottom:7px;margin-top:3px;padding-left:11px;padding-top:7px}#form-tag h4,.element-selector h4{margin-top:0;margin-bottom:12px}.element-selector label{display:block;margin-bottom:10px;width:50%;float:left}#form-tag a{margin-right:5px;border-radius:0;box-shadow:none;background-color:#fff;margin-bottom:5px}#form-tag a:hover{background-color:#E74C3C;color:#FFF;border:1px solid #E74C3C}#advanced-sortables .generate-preview-button,#form-tag a.button-primary,.wp-core-ui .fixed-save-style input.button{background-color:#E74C3C;-webkit-box-shadow:none;box-shadow:none;border:1px solid #E74C3C;border-radius:0;text-shadow:none}#advanced-sortables .generate-preview-button:hover,#advanced-sortables .generate-preview-button[disabled],#form-tag a.button-primary:hover,.wp-core-ui .fixed-save-style input.button:hover{background-color:#fff!important;color:#E74C3C!important;border:1px solid #E74C3C!important}.wp-core-ui .fixed-save-style input.button,.wp-core-ui .fixed-save-style input.button:hover{border-left:none;border-right:none;border-radius:0}#cf7_style_meta_box_font_selector,#cf7_style_meta_box_form_selector{display:inline-block;width:49.5%}.post-type-cf7_style #normal-sortables{display:none}.preview-form-container>h4{text-align:center;margin-top:0}.element-styling{float:left;padding:0 10px;width:100%;border-bottom:1px solid #CCC;box-sizing:border-box}.element-styling.half-size{width:50%}.element-styling label{display:inline-block;position:relative;margin-right:5px}.element-styling label select{width:123px}.element-styling label select[name*=unit]{width:46px;margin-left:3px}.element-styling input[type=number]{height:28px;position:relative;top:2px;width:60px}.wp-picker-container{position:relative;top:10px}.element-styling.background li,.element-styling.font li{width:50%}.element-styling label strong{margin-right:3px;font-weight:400;display:inline-block;min-width:153px}.choose-preview{background-color:#f2f2f2;padding:10px;margin-bottom:3px}.choose-preview h4{margin:0 0 10px}.element-styling.background label,.element-styling.font label{margin-right:0}.element-styling h3{font-size:13px;margin-bottom:10px}.element-styling h3 span{color:#E74C3C;opacity:1}.panel li{width:100%;margin-bottom:10px}.cf7style-status-form,.parser-message{margin-bottom:20px}.fixed-save-style{position:fixed;width:100%;left:0;bottom:0;z-index:9999;text-align:center;display:none}.wp-core-ui .fixed-save-style input.button{width:100%;height:40px;line-height:40px;font-size:18px}.remove_template_notice{float:right}@media all and (max-width:1600px){.element-styling.half-size,.panel-header,.panel-options{width:100%}}.element-styling .icon{display:inline-block;height:26px;border:1px solid #CCC;padding:0 7px;background-color:#f2f2f2;position:relative;top:2px;font-size:13px;line-height:26px;margin-right:-2px}.cf7style-status-table,.generate-preview-option,.multiple-form-generated-preview,.wp-core-ui .button-primary.generate-preview-button{display:none}.element-styling .icon.smaller{height:23px;line-height:23px;top:1px;font-size:13px}.description-title{padding-left:10px}.parser-message{color:red}.cf7style-welcome-panel{background-color:#fff;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);width:100%;padding:10px}.cf7style-input{width:250px}.wp-core-ui .button-primary.cf7style-status-submit,.wp-core-ui .button.cf7style-status-info,.wp-core-ui input:focus,.wp-core-ui input[disabled]{display:inline-block}.wp-core-ui .button.cf7style-status-info{margin-right:10px}span.wpcf7-not-valid-tip{color:red;font-size:1em;display:block}.wpcf7-validation-errors{background:0 0;padding:15px;margin:2em .5em 1em;color:red;border:2px solid red}.wpcf7-response-output.wpcf7-mail-sent-ok{background:0 0;color:green;border:2px solid green;padding:15px;margin:2em .5em 1em}
admin/js/admin-min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(e){function t(e){var t=/^([a-z\d!#$%&'*+\-\/=?^_`{|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+(\.[a-z\d!#$%&'*+\-\/=?^_`{|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)*|"((([ \t]*\r\n)?[ \t]+)?([\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*(([ \t]*\r\n)?[ \t]+)?")@(([a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF][a-z\d\-._~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]*[a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])\.)+([a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF][a-z\d\-._~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]*[a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])\.?$/i;return t.test(e)}function n(e,t){"valid"==t?e.css("border-color","#ddd"):e.css("border-color","red")}function a(t){e(".google-fontos").remove(),"none"!=t&&"undefined"!=typeof t&&(e("head").append('<link class="google-fontos" rel="stylesheet" href="https://fonts.googleapis.com/css?family='+t+':100,200,300,400,500,600,700,800,900&subset=latin,latin-ext,cyrillic,cyrillic-ext,greek-ext,greek,vietnamese" />'),e(".cf7-style.preview-zone p").css("font-family","'"+t+"', sans-serif"),e(".preview-form-container .wpcf7").css("font-family","'"+t+"', sans-serif"))}function i(t){e(window).scroll(function(){if(e(window).width()>1600){var n=(t.find(".panel-header").offset(),e("#cf7_style_meta_box_style_customizer").offset()),a=e(window).scrollTop()-n.top;a>0&&t.find(".panel-header").css("top",a),0>=a&&t.find(".panel-header").css("top",0)}e(window).scrollTop()>700?e(".fixed-save-style").show():e(".fixed-save-style").hide()}).trigger("scroll")}function l(){e("input[type='number']").on("change",function(){var t=e(this).val(),n=e(this).index(),a=e(this).parent().find("input[type=number]");switch(n){case 2:a.val(t);break;case 5:a.eq(3).val(t)}})}function s(t){var n=e('input[name="cf7styleallvalues"]');if(n.length>0){var a=e('input[name="cf7styleallvalues"]').val(),i=e.parseJSON(a.replace(/'/g,'"'));e.each(i,function(n,a){if(n.indexOf("unit")<0&&("hover"==t&&n.indexOf("hover")>0||"hover"!=t&&n.indexOf("hover")<0)){var l=n.split("_"),s=l[0],o=i[n+"_unit"];"submit"==l[0]&&(s="input[type='submit']"),"form"==l[0]&&(s=".wpcf7"),("wpcf7-not-valid-tip"==l[0]||"wpcf7-validation-errors"==l[0]||"wpcf7-mail-sent-ok"==l[0])&&(s="."+l[0]),o="undefined"==typeof o||""==a?"":o;var r=a+o;"background-image"==l[1]&&(r="url("+a+")"),s="radio"==s?'input[type="radio"]':"checkbox"==s?'input[type="checkbox"]':s,e(".preview-form-container "+s).css(l[1],r)}})}}function o(t){t.on("click",function(){e(".cf7style_body_select_all input").prop("checked",e(this).is(":checked")?!0:!1)})}function r(t,n,a,i){var l=t.find(".active"),s=l.index()+1,o=t.find("li"),r=t.find("ul"),c=t.find(".narrow"),d=t.find(".narrow.left"),u=t.find(".narrow.right"),f=t.find("li").length;u.addClass("visible"),r.css("width",f*n),0==i&&t.mouseenter(function(){t.find(".visible").stop().show()}).mouseleave(function(){t.find(".visible").stop().hide()}),c.on("click",function(t){t.stopPropagation(),t.preventDefault();var i=e(this).attr("data-direction");"left"==i&&1!==s&&(r.stop(!0,!0).animate({marginLeft:"+="+n+"px"},a),s--),"right"==i&&s!==f&&(r.stop(!0,!0).animate({marginLeft:-(n*s)+"px"},a),s++),1==s&&(d.hide().removeClass("visible"),u.show().addClass("visible")),s==f&&u.hide().removeClass("visible"),f>s&&u.show().addClass("visible"),s>1&&d.show().addClass("visible"),o.removeClass("active").eq(s-1).addClass("active")}),r.css({"margin-left":"-"+(s-1)*n+"px"})}function c(t){r(t,202,500,!0),t.find("li").on("click",function(){e(this).hasClass("current-saved")||(t.find("li").removeClass("current-saved"),e(this).addClass("current-saved"),t.find(".overlay em").html("Not Active"),e(this).find(".overlay em").html("Active"),e(".cf7style_template").removeAttr("checked"),e(this).find(".cf7style_template").attr("checked","checked"))})}function d(e){var t,n=Object.keys(e).sort(function(e,t){return t>e?-1:e>t?1:0}),a={};for(t=0;t<n.length;t++)a[n[t]]=e[n[t]],delete e[n[t]];for(t=0;t<n.length;t++)e[n[t]]=a[n[t]];return e}function u(t){var n="",a=e('input[name="cf7styleallvalues"]').val(),i=e.parseJSON(a.replace(/'/g,'"'));t.each(function(){var t=e(this).val(),n=e(this).attr("id");0==i.length&&(i={}),""!=t&&"Clear"!=t&&(i[n]=t),""==t&&delete i[n]}),i=d(i),n=JSON.stringify(i),e('input[name="cf7styleallvalues"]').val(n.replace(/"/g,"'")),e('input[name="cf7styleallvalues"]').attr("value",n.replace(/"/g,"'"))}function f(){s(),e("#form-tag a.button").on("click",function(t){t.preventDefault();var n=e(this),a=e("."+n.attr("data-property")+"-panel"),i=0;0==e(".modified-style-here").length?(n.hasClass("button-primary")||(e(".panel").stop(!0,!0).animate({opacity:0},300,function(){0===i&&(i++,e(".panel").addClass("hidden"),e(".panel").html(""),a.css("opacity","0"),a.removeClass("hidden"),e.ajax({url:ajaxurl,method:"POST",data:{action:"cf7_style_load_property",property:n.attr("data-property")},beforeSend:function(){n.parent().find("a").prop("disabled","true"),e(".panel-options .loading").removeClass("hidden")},success:function(t){n.parent().find("a").prop("disabled","false"),i=0,a.html(t),e(".panel-options .loading").addClass("hidden");var s=e('input[name="cf7styleallvalues"]').val(),o=e.parseJSON(s.replace(/'/g,'"'));a.find('[name^="cf7stylecustom"]').each(function(){e(this).attr("id")in o&&""!=o[e(this).attr("id")]&&e(this).val(o[e(this).attr("id")])}),a.find(".cf7-style-color-field").wpColorPicker(E),l(),m(),a.stop(!0,!0).animate({opacity:1},300)}}))}),e(".element-selector input:eq(0)").prop("checked",!0)),e("#form-tag a.button").removeClass("button-primary"),n.addClass("button-primary"),e('input[name="cf7styleactivepane"]').val(n.attr("data-property"))):e(".panel-options .decision").removeClass("hidden")}),e(".panel-options .cancel-btn").on("click",function(t){t.preventDefault(),e(".panel-options .decision").addClass("hidden")}),e(".element-selector input").on("change",function(){e(".element-selector input").prop("checked",!1),e(this).prop("checked",!0),"hover"==e(this).val()?(e(".panel:visible li").addClass("hidden"),e(".panel:visible li.hover-element").removeClass("hidden"),s("hover")):(e(".panel:visible li.hover-element").addClass("hidden"),e(".panel:visible li").not(".hover-element").removeClass("hidden"),s())}),e("#form-preview").on("change",function(){e(".preview-form-container").addClass("hidden"),e(".preview-form-container").eq(e(this).val()).removeClass("hidden")});var t=0;e(document).on("change",'[name^="cf7stylecustom"]',function(){0==t&&(t++,e(this).parents(".panel").addClass("modified-style-here")),u(e(this).parents(".panel").find('[name^="cf7stylecustom"]')),"hover"==e('input[name="element-type"]:checked').val()?s("hover"):s()}),e(document).on("keyup",'[name^="cf7stylecustom"]',function(){u(e(this).parents(".panel").find('[name^="cf7stylecustom"]')),"hover"==e('input[name="element-type"]:checked').val()?s("hover"):s()})}function p(e){e.remove()}function h(e){e.on("click",function(e){e.preventDefault()})}function v(){e('.wpcf7 input[aria-required="true"]').each(function(){e('<span role="alert" class="wpcf7-not-valid-tip">Required field message example.</span>').insertAfter(e(this))}),e(".wpcf7").each(function(){e('<div class="wpcf7-response-output wpcf7-display-none wpcf7-validation-errors" style="display: block;" role="alert">Error message example.</div>').appendTo(e(this)),e('<div class="wpcf7-response-output wpcf7-display-none wpcf7-mail-sent-ok" style="display: block;" role="alert">Thank you message example.</div>').appendTo(e(this))})}function m(){var t=e(".cf7-style-upload-field");t.addClass("hidden"),t.each(function(){var t=e(this);e('<span class="image-info-box"></span>').insertAfter(t),""!=t.val()&&t.parent().find(".image-info-box").text(t.val().filename("yes"))}),e(".upload-btn").length<=0&&(e("<a href='javascript: void(0);' class='remove-btn button'>Remove</a>").insertAfter(t),e("<a href='javascript: void(0);' class='upload-btn button'>Upload</a>").insertAfter(t)),e(".upload-btn").on("click",function(){var t=e(this),n=t.parent().find(".cf7-style-upload-field");tb_show("New Banner","media-upload.php?type=image&TB_iframe=1"),window.send_to_editor=function(a){n.val(e(a).attr("src")),n.trigger("change"),t.parent().find(".image-info-box").text(e(a).attr("src").filename("yes")),tb_remove()}}),e(".remove-btn").on("click",function(){var t=e(this),n=t.parent().find(".cf7-style-upload-field");n.val(" "),n.attr("value"," "),n.trigger("change"),t.parent().find(".image-info-box").text("")})}function F(){if(e("#cf7_style_manual_style").length>0){CodeMirror.fromTextArea(document.getElementById("cf7_style_manual_style"),{lineNumbers:!0,theme:"default",mode:"text/css"})}}var y=e(".cf7style-name"),g=e(".cf7style-email"),b=e(".cf7style-message"),w=e(".cf7style-status-submit");w.on("click",function(a){if(a.preventDefault(),e(".cf7style-input").each(function(t,a){""==e(this).val()?n(e(this),"error"):n(e(this),"valid")}),""!==y.val()&&""!==g.val())if(t(g.val())){n(g,"valid");var i=e("<div />");e(".cf7style-status-table").each(function(t,n){var a=e("<table />");a.html(e(this).html()),i.append(a)}),e.ajax({url:ajaxurl,method:"POST",data:{action:"cf7_style_send_status_report",name:y.val(),email:g.val(),message:b.val(),report:i.html()},beforeSend:function(){w.text("Sending...")},success:function(t){"success"==e.trim(t)?w.text("Report sent").removeClass("cf7style-status-submit").attr("disabled","disabled"):w.text("Something went wrong!").removeClass("cf7style-status-submit").attr("disabled","disabled")}})}else n(g,"error");else console.log("error 1")}),e(".cf7style-status-info").on("click",function(t){t.preventDefault(),e(".cf7style-status-table").toggle()}),String.prototype.filename=function(e){var t=this.replace(/\\/g,"/");return t=t.substring(t.lastIndexOf("/")+1),e?t.replace(/[?#].+$/,""):t.split(".")[0]},e(".cf7style-no-forms-added").length>0?e(".generate-preview-button, .generate-preview-option").show():e(".generate-button-hidden").show(),e(".generate-preview-button").on("click",function(t){t.preventDefault(),e(".cf7style-no-forms-added").hide();var n=e(this).attr("data-attr-id"),a=e(this).attr("data-attr-title");e(this).prop("disabled",!0),e(this).parents("tr").find("input").prop("checked",!0);var i=e("<p />");e(".preview-form-tag").prepend(i),e.ajax({url:ajaxurl,method:"POST",data:{action:"cf7_style_generate_preview_dashboard",form_id:n,form_title:a},beforeSend:function(){i.text("Loading..."),e(".multiple-form-generated-preview").hide()},success:function(t){t&&(i.remove(),e(".preview-form-tag").append(t),e(".multiple-form-generated-preview").eq(e(".multiple-form-generated-preview").length-1).show(),s(),v())}})});var x=e(".generate-preview"),_=e(".post-type-cf7_style "),C=e("#select_all"),D=e('select[name="cf7_style_font_selector"]'),k=e(".cf7-style-slider-wrap"),A=e(".preview-form-container"),E={change:function(t,n){u(e(this).parents(".panel").find('[name^="cf7stylecustom"]')),"hover"==e('input[name="element-type"]:checked').val()?s("hover"):s()}};if(e(".cf7-style-color-field").wpColorPicker(E),x.length>0&&i(x),_.length>0){F(),m(),l(),v();var A=e(".preview-form-container").not(".hidden");A.find("label").length<1&&e('.button[data-property="label"]').hide(),A.find("p").length<1&&e('.button[data-property="p"]').hide(),A.find("fieldset").length<1&&e('.button[data-property="fieldset"]').hide(),A.find("select").length<1&&e('.button[data-property="select"]').hide(),A.find('input[type="checkbox"]').length<1&&e('.button[data-property="checkbox"]').hide(),A.find('input[type="radio"]').length<1&&e('.button[data-property="radio"]').hide(),o(C),a(D.val()),D.on("change",function(){a(e(this).val())}),f(),p(A.find('input[type="hidden"]')),h(A.find('input[type="submit"]'))}k.length>0&&c(k),e(".close-cf7-panel").on("click",function(t){t.preventDefault(),e.ajax({url:ajaxurl,method:"POST",data:{action:"cf7_style_remove_welcome_box"},success:function(t){e(".welcome-container").fadeOut("slow")}})})});
1
+ jQuery(document).ready(function(e){function t(e){var t=/^([a-z\d!#$%&'*+\-\/=?^_`{|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+(\.[a-z\d!#$%&'*+\-\/=?^_`{|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)*|"((([ \t]*\r\n)?[ \t]+)?([\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*(([ \t]*\r\n)?[ \t]+)?")@(([a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF][a-z\d\-._~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]*[a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])\.)+([a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF][a-z\d\-._~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]*[a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])\.?$/i;return t.test(e)}function n(e,t){"valid"==t?e.css("border-color","#ddd"):e.css("border-color","red")}function a(t){e(".google-fontos").remove(),"none"!=t&&"undefined"!=typeof t&&(e("head").append('<link class="google-fontos" rel="stylesheet" href="https://fonts.googleapis.com/css?family='+t+':100,200,300,400,500,600,700,800,900&subset=latin,latin-ext,cyrillic,cyrillic-ext,greek-ext,greek,vietnamese" />'),e(".cf7-style.preview-zone p").css("font-family","'"+t+"', sans-serif"),e(".preview-form-container .wpcf7").css("font-family","'"+t+"', sans-serif"))}function i(t){e(window).scroll(function(){if(e(window).width()>1600){var n=(t.find(".panel-header").offset(),e("#cf7_style_meta_box_style_customizer").offset()),a=e(window).scrollTop()-n.top;a>0&&t.find(".panel-header").css("top",a),0>=a&&t.find(".panel-header").css("top",0)}e(window).scrollTop()>700?e(".fixed-save-style").show():e(".fixed-save-style").hide()}).trigger("scroll")}function s(){e("input[type='number']").on("change",function(){var t=e(this).val(),n=e(this).index(),a=e(this).parent().find("input[type=number]");switch(n){case 2:a.val(t);break;case 5:a.eq(3).val(t)}})}function l(t){var n=e('input[name="cf7styleallvalues"]');if(n.length>0){var a=e('input[name="cf7styleallvalues"]').val(),i=e.parseJSON(a.replace(/'/g,'"'));e.each(i,function(n,a){if(n.indexOf("unit")<0&&("hover"==t&&n.indexOf("hover")>0||"hover"!=t&&n.indexOf("hover")<0)){var s=n.split("_"),l=s[0],o=i[n+"_unit"];"submit"==s[0]&&(l="input[type='submit']"),"form"==s[0]&&(l=".wpcf7"),("wpcf7-not-valid-tip"==s[0]||"wpcf7-validation-errors"==s[0]||"wpcf7-mail-sent-ok"==s[0])&&(l="."+s[0]),o="undefined"==typeof o||""==a?"":o;var r=a+o;"background-image"==s[1]&&(r="url("+a+")"),l="radio"==l?'input[type="radio"]':"checkbox"==l?'input[type="checkbox"]':l,e(".preview-form-container "+l).css(s[1],r)}})}}function o(t){t.on("click",function(){e(".cf7style_body_select_all input").prop("checked",e(this).is(":checked")?!0:!1)})}function r(t,n,a,i){var s=t.find(".active"),l=s.index()+1,o=t.find("li"),r=t.find("ul"),c=t.find(".narrow"),d=t.find(".narrow.left"),u=t.find(".narrow.right"),p=t.find("li").length;u.addClass("visible"),r.css("width",p*n),0==i&&t.mouseenter(function(){t.find(".visible").stop().show()}).mouseleave(function(){t.find(".visible").stop().hide()}),c.on("click",function(t){t.stopPropagation(),t.preventDefault();var i=e(this).attr("data-direction");"left"==i&&1!==l&&(r.stop(!0,!0).animate({marginLeft:"+="+n+"px"},a),l--),"right"==i&&l!==p&&(r.stop(!0,!0).animate({marginLeft:-(n*l)+"px"},a),l++),1==l&&(d.hide().removeClass("visible"),u.show().addClass("visible")),l==p&&u.hide().removeClass("visible"),p>l&&u.show().addClass("visible"),l>1&&d.show().addClass("visible"),o.removeClass("active").eq(l-1).addClass("active")}),r.css({"margin-left":"-"+(l-1)*n+"px"})}function c(t){r(t,202,500,!0),t.find("li").on("click",function(){e(this).hasClass("current-saved")||(t.find("li").removeClass("current-saved"),e(this).addClass("current-saved"),t.find(".overlay em").html("Not Active"),e(this).find(".overlay em").html("Active"),e(".cf7style_template").removeAttr("checked"),e(this).find(".cf7style_template").attr("checked","checked"))})}function d(t){var n="",a=e.parseJSON(e('input[name="cf7styleallvalues"]').val().replace(/'/g,'"'));e.each(t.serializeObject(),function(e,t){0==a.length&&(a={}),a[e.replace(/cf7stylecustom\[/g,"").replace(/]/g,"")]=t}),n=JSON.stringify(a),n=n.replace(/cf7stylecustom\[/g,"").replace(/]/g,""),e('input[name="cf7styleallvalues"]').val(n.replace(/"/g,"'")),e('input[name="cf7styleallvalues"]').attr("value",n.replace(/"/g,"'"))}function u(){l(),e("#form-tag a.button").on("click",function(t){t.preventDefault();var n=e(this),a=e("."+n.attr("data-property")+"-panel"),i=0;0==e(".modified-style-here").length?(n.hasClass("button-primary")||(e(".panel").stop(!0,!0).animate({opacity:0},300,function(){0===i&&(i++,e(".panel").addClass("hidden"),e(".panel").html(""),a.css("opacity","0"),a.removeClass("hidden"),e.ajax({url:ajaxurl,method:"POST",data:{action:"cf7_style_load_property",property:n.attr("data-property")},beforeSend:function(){n.parent().find("a").prop("disabled","true"),e(".panel-options .loading").removeClass("hidden")},success:function(t){n.parent().find("a").prop("disabled","false"),i=0,a.html(t),e(".panel-options .loading").addClass("hidden");var l=e('input[name="cf7styleallvalues"]').val(),o=e.parseJSON(l.replace(/'/g,'"'));a.find('[name^="cf7stylecustom"]').each(function(){e(this).attr("id")in o&&""!=o[e(this).attr("id")]&&e(this).val(o[e(this).attr("id")])}),a.find(".cf7-style-color-field").wpColorPicker(A),s(),v(),a.stop(!0,!0).animate({opacity:1},300)}}))}),e(".element-selector input:eq(0)").prop("checked",!0)),e("#form-tag a.button").removeClass("button-primary"),n.addClass("button-primary"),e('input[name="cf7styleactivepane"]').val(n.attr("data-property"))):e(".panel-options .decision").removeClass("hidden")}),e(".panel-options .cancel-btn").on("click",function(t){t.preventDefault(),e(".panel-options .decision").addClass("hidden")}),e(".element-selector input").on("change",function(){e(".element-selector input").prop("checked",!1),e(this).prop("checked",!0),"hover"==e(this).val()?(e(".panel:visible li").addClass("hidden"),e(".panel:visible li.hover-element").removeClass("hidden"),l("hover")):(e(".panel:visible li.hover-element").addClass("hidden"),e(".panel:visible li").not(".hover-element").removeClass("hidden"),l())}),e("#form-preview").on("change",function(){e(".preview-form-container").addClass("hidden"),e(".preview-form-container").eq(e(this).val()).removeClass("hidden")});var t=0;e(document).on("change",'[name^="cf7stylecustom"]',function(){0==t&&(t++,e(this).parents(".panel").addClass("modified-style-here")),d(e(this).parents(".panel").find('[name^="cf7stylecustom"]')),"hover"==e('input[name="element-type"]:checked').val()?l("hover"):l()}),e(document).on("keyup",'[name^="cf7stylecustom"]',function(){d(e(this).parents(".panel").find('[name^="cf7stylecustom"]')),"hover"==e('input[name="element-type"]:checked').val()?l("hover"):l()})}function p(e){e.remove()}function f(e){e.on("click",function(e){e.preventDefault()})}function h(){e('.wpcf7 input[aria-required="true"]').each(function(){e('<span role="alert" class="wpcf7-not-valid-tip">Required field message example.</span>').insertAfter(e(this))}),e(".wpcf7").each(function(){e('<div class="wpcf7-response-output wpcf7-display-none wpcf7-validation-errors" style="display: block;" role="alert">Error message example.</div>').appendTo(e(this)),e('<div class="wpcf7-response-output wpcf7-display-none wpcf7-mail-sent-ok" style="display: block;" role="alert">Thank you message example.</div>').appendTo(e(this))})}function v(){var t=e(".cf7-style-upload-field");t.addClass("hidden"),t.each(function(){var t=e(this);e('<span class="image-info-box"></span>').insertAfter(t),""!=t.val()&&t.parent().find(".image-info-box").text(t.val().filename("yes"))}),e(".upload-btn").length<=0&&(e("<a href='javascript: void(0);' class='remove-btn button'>Remove</a>").insertAfter(t),e("<a href='javascript: void(0);' class='upload-btn button'>Upload</a>").insertAfter(t)),e(".upload-btn").on("click",function(){var t=e(this),n=t.parent().find(".cf7-style-upload-field");tb_show("New Banner","media-upload.php?type=image&TB_iframe=1"),window.send_to_editor=function(a){n.val(e(a).attr("src")),n.trigger("change"),t.parent().find(".image-info-box").text(e(a).attr("src").filename("yes")),tb_remove()}}),e(".remove-btn").on("click",function(){var t=e(this),n=t.parent().find(".cf7-style-upload-field");n.val(" "),n.attr("value"," "),n.trigger("change"),t.parent().find(".image-info-box").text("")})}function m(){if(e("#cf7_style_manual_style").length>0){CodeMirror.fromTextArea(document.getElementById("cf7_style_manual_style"),{lineNumbers:!0,theme:"default",mode:"text/css"})}}var F=e(".cf7style-name"),y=e(".cf7style-email"),g=e(".cf7style-message"),b=e(".cf7style-status-submit");b.on("click",function(a){if(a.preventDefault(),e(".cf7style-input").each(function(t,a){""==e(this).val()?n(e(this),"error"):n(e(this),"valid")}),""!==F.val()&&""!==y.val())if(t(y.val())){n(y,"valid");var i=e("<div />");e(".cf7style-status-table").each(function(t,n){var a=e("<table />");a.html(e(this).html()),i.append(a)}),e.ajax({url:ajaxurl,method:"POST",data:{action:"cf7_style_send_status_report",name:F.val(),email:y.val(),message:g.val(),report:i.html()},beforeSend:function(){b.text("Sending...")},success:function(t){"success"==e.trim(t)?b.text("Report sent").removeClass("cf7style-status-submit").attr("disabled","disabled"):b.text("Something went wrong!").removeClass("cf7style-status-submit").attr("disabled","disabled")}})}else n(y,"error");else console.log("error 1")}),e(".cf7style-status-info").on("click",function(t){t.preventDefault(),e(".cf7style-status-table").toggle()}),String.prototype.filename=function(e){var t=this.replace(/\\/g,"/");return t=t.substring(t.lastIndexOf("/")+1),e?t.replace(/[?#].+$/,""):t.split(".")[0]},e.fn.serializeObject=function(){var t={},n=this.serializeArray();return e.each(n,function(){void 0!==t[this.name]?(t[this.name].push||(t[this.name]=[t[this.name]]),t[this.name].push(this.value||"")):t[this.name]=this.value||""}),t},e(".cf7style-no-forms-added").length>0?e(".generate-preview-button, .generate-preview-option").show():e(".generate-button-hidden").show(),e(".generate-preview-button").on("click",function(t){t.preventDefault(),e(".cf7style-no-forms-added").hide();var n=e(this).attr("data-attr-id"),a=e(this).attr("data-attr-title");e(this).prop("disabled",!0),e(this).parents("tr").find("input").prop("checked",!0);var i=e("<p />");e(".preview-form-tag").prepend(i),e.ajax({url:ajaxurl,method:"POST",data:{action:"cf7_style_generate_preview_dashboard",form_id:n,form_title:a},beforeSend:function(){i.text("Loading..."),e(".multiple-form-generated-preview").hide()},success:function(t){t&&(i.remove(),e(".preview-form-tag").append(t),e(".multiple-form-generated-preview").eq(e(".multiple-form-generated-preview").length-1).show(),l(),h())}})});var w=e(".generate-preview"),x=e(".post-type-cf7_style "),_=e("#select_all"),C=e('select[name="cf7_style_font_selector"]'),D=e(".cf7-style-slider-wrap"),k=e(".preview-form-container"),A={change:function(t,n){d(e(this).parents(".panel").find('[name^="cf7stylecustom"]')),"hover"==e('input[name="element-type"]:checked').val()?l("hover"):l()}};if(e(".cf7-style-color-field").wpColorPicker(A),w.length>0&&i(w),x.length>0){m(),v(),s(),h();var k=e(".preview-form-container").not(".hidden");k.find("label").length<1&&e('.button[data-property="label"]').hide(),k.find("p").length<1&&e('.button[data-property="p"]').hide(),k.find("fieldset").length<1&&e('.button[data-property="fieldset"]').hide(),k.find("select").length<1&&e('.button[data-property="select"]').hide(),k.find('input[type="checkbox"]').length<1&&e('.button[data-property="checkbox"]').hide(),k.find('input[type="radio"]').length<1&&e('.button[data-property="radio"]').hide(),o(_),a(C.val()),C.on("change",function(){a(e(this).val())}),u(),p(k.find('input[type="hidden"]')),f(k.find('input[type="submit"]'))}D.length>0&&c(D),e(".close-cf7-panel").on("click",function(t){t.preventDefault(),e.ajax({url:ajaxurl,method:"POST",data:{action:"cf7_style_remove_welcome_box"},success:function(t){e(".welcome-container").fadeOut("slow")}})})});
admin/js/admin.js CHANGED
@@ -263,45 +263,36 @@ jQuery(document).ready(function($) {
263
  });
264
  }
265
 
266
- function orderKeys(obj) {
267
- var keys = Object.keys(obj).sort(function keyOrder(k1, k2) {
268
- if (k1 < k2) return -1;
269
- else if (k1 > k2) return +1;
270
- else return 0;
 
 
 
 
 
 
 
271
  });
272
- var i, after = {};
273
- for (i = 0; i < keys.length; i++) {
274
- after[keys[i]] = obj[keys[i]];
275
- delete obj[keys[i]];
276
- }
277
- for (i = 0; i < keys.length; i++) {
278
- obj[keys[i]] = after[keys[i]];
279
- }
280
- return obj;
281
  }
282
 
283
  function updateHiddenInput(current) {
284
  var loadedString = "",
285
- loadedData = $('input[name="cf7styleallvalues"]').val(),
286
- loadedArray = $.parseJSON(loadedData.replace(/'/g, '"'));
287
- current.each(function() {
288
- var curVal = $(this).val(),
289
- curID = $(this).attr('id');
290
  if (loadedArray.length == 0) {
291
  loadedArray = {};
292
  }
293
- if (curVal != "" && curVal != "Clear") {
294
- loadedArray[curID] = curVal;
295
- }
296
- if(curVal == ""){
297
- delete loadedArray[curID];
298
- }
299
  });
300
- loadedArray = orderKeys(loadedArray);
301
  loadedString = JSON.stringify(loadedArray);
 
302
  $('input[name="cf7styleallvalues"]').val(loadedString.replace(/"/g, "'"));
303
  $('input[name="cf7styleallvalues"]').attr('value', loadedString.replace(/"/g, "'"));
304
-
305
  }
306
 
307
  function showTheOption() {
@@ -550,7 +541,7 @@ jQuery(document).ready(function($) {
550
  addBgImage();
551
  /*Autocomplete number fields*/
552
  autoCompleteOtherValues();
553
- addDummyElements();
554
  var previewForm = $('.preview-form-container').not('.hidden');
555
  if (previewForm.find('label').length < 1) {
556
  $('.button[data-property="label"]').hide();
263
  });
264
  }
265
 
266
+ $.fn.serializeObject = function() {
267
+ var o = {};
268
+ var a = this.serializeArray();
269
+ $.each(a, function() {
270
+ if (o[this.name] !== undefined) {
271
+ if (!o[this.name].push) {
272
+ o[this.name] = [o[this.name]];
273
+ }
274
+ o[this.name].push(this.value || '');
275
+ } else {
276
+ o[this.name] = this.value || '';
277
+ }
278
  });
279
+ return o;
 
 
 
 
 
 
 
 
280
  }
281
 
282
  function updateHiddenInput(current) {
283
  var loadedString = "",
284
+ loadedArray = $.parseJSON( $('input[name="cf7styleallvalues"]').val().replace(/'/g, '"'));
285
+ $.each(current.serializeObject(), function(index, value) {
 
 
 
286
  if (loadedArray.length == 0) {
287
  loadedArray = {};
288
  }
289
+ loadedArray[ index.replace(/cf7stylecustom\[/g, '').replace(/]/g, '') ] = value;
 
 
 
 
 
290
  });
291
+
292
  loadedString = JSON.stringify(loadedArray);
293
+ loadedString = loadedString.replace(/cf7stylecustom\[/g, '').replace(/]/g, '');
294
  $('input[name="cf7styleallvalues"]').val(loadedString.replace(/"/g, "'"));
295
  $('input[name="cf7styleallvalues"]').attr('value', loadedString.replace(/"/g, "'"));
 
296
  }
297
 
298
  function showTheOption() {
541
  addBgImage();
542
  /*Autocomplete number fields*/
543
  autoCompleteOtherValues();
544
+ addDummyElements();
545
  var previewForm = $('.preview-form-container').not('.hidden');
546
  if (previewForm.find('label').length < 1) {
547
  $('.button[data-property="label"]').hide();
cf7-style.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Contact Form 7 Style
4
  Plugin URI: http://wordpress.reea.net/contact-form-7-style/
5
  Description: Simple style customization and templating for Contact Form 7 forms. Requires Contact Form 7 plugin installed.
6
- Version: 3.1.0
7
  Author: Johnny, dorumarginean, mlehelsz, MirceaR
8
  Author URI: http://cf7style.com
9
  License: GPL2
@@ -15,8 +15,8 @@ License: GPL2
15
  */
16
  define( 'WPCF7S_PLUGIN', __FILE__ );
17
  define( 'WPCF7S_PLUGIN_DIR', untrailingslashit( dirname( WPCF7S_PLUGIN ) ) );
18
- define('WPCF7S_LOCATION',plugin_dir_url( WPCF7S_PLUGIN ));
19
- define( 'WPCF7S_PLUGIN_VER', '3.1.0' );
20
 
21
 
22
  function get_predefined_cf7_style_template_data() {
@@ -129,7 +129,6 @@ function cf7_style_custom_css_generator(){
129
  /*check if custom again*/
130
  if( $check_custom_style ){
131
  $cf7s_custom_settings = maybe_unserialize( get_post_meta( $cf7s_id, 'cf7_style_custom_styler', true ));
132
-
133
  $cf7s_custom_settings = ( empty($cf7s_custom_settings) ) ? array() : $cf7s_custom_settings;
134
  $groundzero = "";
135
  $groundzero_hover = "";
@@ -158,9 +157,11 @@ function cf7_style_custom_css_generator(){
158
  }
159
  $the_hover = ( array_key_exists (3,$setting_key_part) && $setting_key_part[3] == "hover" ) ? "yes" :
160
  ( array_key_exists (2,$setting_key_part) && $setting_key_part[2] == "hover" ) ? "yes" : "no";
161
-
162
  if($the_hover == "yes"){
163
  if( $groundzero_hover != $setting_key_part[0]){
 
 
 
164
  $bleah_hover[$i_hover] = $endtag_hover.$curr_tag_gen.":hover {\n";
165
  $groundzero_hover = $setting_key_part[0];
166
  }
@@ -177,8 +178,12 @@ function cf7_style_custom_css_generator(){
177
  $tempSave = "0";
178
  }
179
  }
180
- }else {
 
181
  if( $groundzero != $setting_key_part[0]){
 
 
 
182
  $bleah[$i] = $endtag.$curr_tag_gen." {\n";
183
  $groundzero = $setting_key_part[0];
184
  }
@@ -190,6 +195,7 @@ function cf7_style_custom_css_generator(){
190
  if( $setting != "px" && $setting != "%" && $setting != "em" ){
191
  $bleah[$i] = $cur_property_gen;
192
  }
 
193
  } else {
194
  $bleah[--$i] = ( $tempSave != "0" ) ? ( "\t\t".$setting_key_part[1].": ".$tempSave.$setting. ";\n") : "";
195
  $tempSave = "0";
3
  Plugin Name: Contact Form 7 Style
4
  Plugin URI: http://wordpress.reea.net/contact-form-7-style/
5
  Description: Simple style customization and templating for Contact Form 7 forms. Requires Contact Form 7 plugin installed.
6
+ Version: 3.1.1
7
  Author: Johnny, dorumarginean, mlehelsz, MirceaR
8
  Author URI: http://cf7style.com
9
  License: GPL2
15
  */
16
  define( 'WPCF7S_PLUGIN', __FILE__ );
17
  define( 'WPCF7S_PLUGIN_DIR', untrailingslashit( dirname( WPCF7S_PLUGIN ) ) );
18
+ define( 'WPCF7S_LOCATION',plugin_dir_url( WPCF7S_PLUGIN ) );
19
+ define( 'WPCF7S_PLUGIN_VER', '3.1.1' );
20
 
21
 
22
  function get_predefined_cf7_style_template_data() {
129
  /*check if custom again*/
130
  if( $check_custom_style ){
131
  $cf7s_custom_settings = maybe_unserialize( get_post_meta( $cf7s_id, 'cf7_style_custom_styler', true ));
 
132
  $cf7s_custom_settings = ( empty($cf7s_custom_settings) ) ? array() : $cf7s_custom_settings;
133
  $groundzero = "";
134
  $groundzero_hover = "";
157
  }
158
  $the_hover = ( array_key_exists (3,$setting_key_part) && $setting_key_part[3] == "hover" ) ? "yes" :
159
  ( array_key_exists (2,$setting_key_part) && $setting_key_part[2] == "hover" ) ? "yes" : "no";
 
160
  if($the_hover == "yes"){
161
  if( $groundzero_hover != $setting_key_part[0]){
162
+ if(array_key_exists($i_hover,$bleah_hover)){
163
+ $i_hover++;
164
+ }
165
  $bleah_hover[$i_hover] = $endtag_hover.$curr_tag_gen.":hover {\n";
166
  $groundzero_hover = $setting_key_part[0];
167
  }
178
  $tempSave = "0";
179
  }
180
  }
181
+ } else {
182
+
183
  if( $groundzero != $setting_key_part[0]){
184
+ if(array_key_exists($i,$bleah)){
185
+ $i++;
186
+ }
187
  $bleah[$i] = $endtag.$curr_tag_gen." {\n";
188
  $groundzero = $setting_key_part[0];
189
  }
195
  if( $setting != "px" && $setting != "%" && $setting != "em" ){
196
  $bleah[$i] = $cur_property_gen;
197
  }
198
+
199
  } else {
200
  $bleah[--$i] = ( $tempSave != "0" ) ? ( "\t\t".$setting_key_part[1].": ".$tempSave.$setting. ";\n") : "";
201
  $tempSave = "0";
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: ionut.iclanzan, dorumarginean, mlehelsz, mircear
3
  Donate link: http://cf7style.com/back-this-project/
4
  Tags: contact form 7, contact form 7 style, contact form 7 css, contact form 7 styling, CF7, CF7 style, styling contact form, styling contact form 7, multiple form styling, custom form styling, CF7 addon, customize, templates, valentine's day templates, Christmas templates, manual styling, live preview, hover state styling, CF7 form messages styling
5
  Requires at least: 3.0.1
6
- Tested up to: 4.6.1
7
- Stable tag: 3.1.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -64,6 +64,11 @@ You will find 'Contact Style' menu in your WordPress admin panel.
64
 
65
  == Changelog ==
66
 
 
 
 
 
 
67
  = 3.1.0 =
68
  * [New Feature](https://wordpress.org/support/topic/error-confirmation-message-box-styling?replies=2) Error, confirmation, success message customization added
69
  * [New Feature](https://wordpress.org/support/topic/disabling-the-edit-custom-style-button?replies=2) Added settings field, where you can activate or deactivate the "edit custom style" button
@@ -205,12 +210,8 @@ You will find 'Contact Style' menu in your WordPress admin panel.
205
  * First plugin version.
206
 
207
  == Upgrade Notice ==
208
- = Contact Form 7 Style Version 3.1.0 =
209
 
210
- * [New Feature](https://wordpress.org/support/topic/error-confirmation-message-box-styling?replies=2) Error, confirmation, success message customization added
211
- * [New Feature](https://wordpress.org/support/topic/disabling-the-edit-custom-style-button?replies=2) Added settings field, where you can activate or deactivate the "edit custom style" button
212
- * [Major Improvement] modified settings page field generation, now it will remove every hidden field to improve page load
213
- * [New](https://wordpress.org/support/topic/could-we-have-few-more-ready-skins-pretty-please/) predefined templates available
214
- * [Improvements] for reliability and speed
215
- * User interface improvements
216
- * general bugfixing
3
  Donate link: http://cf7style.com/back-this-project/
4
  Tags: contact form 7, contact form 7 style, contact form 7 css, contact form 7 styling, CF7, CF7 style, styling contact form, styling contact form 7, multiple form styling, custom form styling, CF7 addon, customize, templates, valentine's day templates, Christmas templates, manual styling, live preview, hover state styling, CF7 form messages styling
5
  Requires at least: 3.0.1
6
+ Tested up to: 4.7
7
+ Stable tag: 3.1.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
64
 
65
  == Changelog ==
66
 
67
+ = 3.1.1 =
68
+ * [Major Fix](https://wordpress.org/support/topic/custom-styles-not-working/) for custom styles
69
+ * [Small Fix] Styling issue on buttons
70
+ * [Small Fix] CSS generator core upgraded
71
+
72
  = 3.1.0 =
73
  * [New Feature](https://wordpress.org/support/topic/error-confirmation-message-box-styling?replies=2) Error, confirmation, success message customization added
74
  * [New Feature](https://wordpress.org/support/topic/disabling-the-edit-custom-style-button?replies=2) Added settings field, where you can activate or deactivate the "edit custom style" button
210
  * First plugin version.
211
 
212
  == Upgrade Notice ==
213
+ = Contact Form 7 Style Version 3.1.1 =
214
 
215
+ * [Major Fix](https://wordpress.org/support/topic/custom-styles-not-working/) for custom styles
216
+ * [Small Fix] Styling issue on buttons
217
+ * [Small Fix] CSS generator core upgraded