Version Description
Shortcode problems solved. New anti-spam mechanism for forms.
Download this release
Release Info
Developer | Icegram |
Plugin | Popups, Welcome Bar, Optins and Lead Generation Plugin – Icegram |
Version | 1.9.2 |
Comparing to | |
See all releases |
Code changes from version 1.9.1 to 1.9.2
- assets/css/admin.css +1 -1
- assets/images/style_0.png +0 -0
- assets/images/style_1.png +0 -0
- assets/images/style_2.png +0 -0
- assets/images/style_3.png +0 -0
- assets/images/style_4.png +0 -0
- assets/js/admin.js +1 -1
- assets/js/icegram.js +1 -1
- classes/class-icegram-campaign-admin.php +1 -1
- classes/class-icegram-message-admin.php +20 -16
- icegram.php +9 -6
- readme.txt +10 -1
assets/css/admin.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.campaign_target_rules_panel .options_group{border-bottom:1px dashed #D3D3D3}.campaign_target_rules_panel .options_group:last-child{border-bottom-style:none}.campaign_target_rules_panel .options_group .form-field .options_header{display:inline-block;width:30%;vertical-align:top}.campaign_target_rules_panel .options_group p label input[type=checkbox],.campaign_target_rules_panel .options_group p label input[type=radio]{width:0}.campaign_target_rules_panel .options_group p label input[type=date]{width:auto;margin-left:10px}.user_roles p label input[type=checkbox],.user_roles p label input[type=radio]{margin-left:3px}.campaign_target_rules_panel .options_group .form-field #icegram_messages{width:300px;text-align:center}.empty_campaign{margin:1em;font-style:italic}.hndle em{font-weight:normal;font-size:85%;margin-left:1em;color:#777}h3 .chosen-container{font-weight:500}.thickbox_edit_message{padding:0 1em;border-bottom:1px solid #D3D3D3}.messages-list-sortable{margin-top:30px}.messages_list_table{font-size:1em;width:100%;border-collapse:separate;border-spacing:3px}th.message_header{text-align:center!important}.message_title{text-align:left}.message_headline{text-align:left;padding-left:1.2em}.message_seconds,.action_links{width:75px!important;text-align:center}.message_seconds input{text-align:right}.message-row .seconds-text{width:40px!important;text-align:center}.message-sort-placeholder{background-color:#D3D3D3}.device{width:auto;line-height:5em;vertical-align:baseline}.device:after{font-family:dashicons;font-size:3em}.device input{position:relative;left:2.5em;top:1.5em}.admin_field_icon{display:inline-block;-webkit-font-smoothing:antialiased;width:18px;height:18px;font:400 18px/1 dashicons;color:#888;vertical-align:text-top;margin:0 2px}.campaign_preview{float:right;margin-right:1em!important}.shortcode_description:before{content:"\f348"}.shortcode_description.light{content:"\f348";color:#777}.campaign_shortcode{display:block;width:45%;color:#777}.campaign_shortcode.light{margin-left:50%;border:1px dashed #ccc;padding-left:0.6%;padding-right:0.2%;position:absolute;margin-top:-1.5em}.campaign_shortcode.light code{color:#777}label[for=device_mobile]{margin-left:-2em}label[for=device_mobile]:after{content:"\f470"}label[for=device_tablet]:after{content:"\f471"}label[for=device_laptop]:after{content:"\f472"}.date_picker:after{font-family:dashicons;content:"\f145";position:relative;top:5px;font:normal 20px/1 dashicons;vertical-align:top}.date_picker{margin-left:1em}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.date-picker{max-width:15%}.campaign_target_rules_panel .options_group .messages-list .form-field .message_header{width:75px!important;text-align:right}.disable{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";filter:alpha(opacity=30);opacity:0.3}.enable{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";filter:alpha(opacity=100);opacity:1}.message_edit:after{content:"\f464"}.message_delete:after{content:"\f158"}.actions:after{font-family:dashicons;font-size:1.4em}.actions{text-decoration:none;color:#444;padding-right:3px;cursor:pointer}.actions:hover{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";filter:alpha(opacity=70);opacity:0.7}.action_links{vertical-align:middle}.message_header_label{color:#fff;text-align:center;font-size:0.7em!important;margin:0!important;padding:3px 5px;cursor:auto;text-transform:uppercase}.message_label{float:left;width:25%;padding:0}.message_field{width:65%;display:inline-block}.message_image_button .image-buttons-icon{margin:0 2px}.message_image_button .image-buttons-icon:before{content:"\f128"}.message_headline_button,.message_image_button{vertical-align:top!important}.message_headline_button .headline-buttons-icon{margin:2px}.message_headline_button .headline-buttons-icon:before{content:"\f130"}.help_tip:after{content:"\f223"}.help_tip{float:right;margin:4px 0;cursor:help;text-decoration:none}.chosen-container{width:65%!important}.message_row.position{height:110px}.location-selector input[type=radio]:checked + label span{background-color:#2ea2cc}.location-selector{width:128px;height:115px;position:absolute;display:block;margin-left:24.3%;background-image:url(../images/desktop.png);background-position:0 -19px}.location-selector .location{background-color:#ddd;cursor:pointer;position:absolute}.location-selector .location:hover{background-color:#ccc}.location-selector .location.top,.location-selector .location.bottom,.location-selector .location.middle{height:14%;width:14%;right:42%}.location-selector .location.top{top:13px}.location-selector .location.middle{top:30%}.location-selector .location.bottom{bottom:43px}.location-selector .location.right,.location-selector .location.left{height:14%;width:14%;margin-left:0;margin-right:0}.location-selector .location.right{right:15px}.location-selector .location.left{left:15px}.wp-editor-container{margin-left:25%}.message-setting-fields #upload_image,.message-setting-fields #message_title{width:58%}.wp-editor-container span .mceLayout{width:50%}#ui-datepicker-div,#wp-admin-bar-view,#edit-slug-box,.empty_campaign,.location-selector input[type=radio]{display:none}#the-list .message_thumbnail img{max-width:200px;max-height:100px}#icegram_messages + .chosen-container-single .chosen-search input[type=text]{width:100%!important}.message_theme + .chosen-container.chosen-container .chosen-results{max-height:30em!important}.message_theme + .chosen-container-single .chosen-single span{background-repeat:no-repeat!important;background-position:100% 50%!important}.message_theme + .chosen-container .chosen-results li{margin:0% 0% 2% 2%;background-position:0.5em 2em!important;-webkit-background-size:95%!important;background-size:95%!important;border:2px solid #EEE!important;font-weight:700!important;display:inline-block!important;text-align:center!important;background-repeat:no-repeat!important}.message_theme + .chosen-container .chosen-results li.highlighted{color:#000!important;border:2px solid #2ea2cc!important;background-color:#EAEFFF!important}#tiptip_holder{display:none;position:absolute;top:0;left:0;z-index:99999}#tiptip_holder.tip_top{padding-bottom:5px}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#464646}#tiptip_holder.tip_bottom{padding-top:5px}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#464646}#tiptip_holder.tip_right{padding-left:5px}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#464646}#tiptip_holder.tip_left{padding-right:5px}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#464646}#tiptip_content,.chart-tooltip{font-size:11px;color:#fff;padding:.5em;background:#464646;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:1px 1px 3px rgba(0,0,0,.1);-moz-box-shadow:1px 1px 3px rgba(0,0,0,.1);box-shadow:1px 1px 3px rgba(0,0,0,.1);text-align:center;max-width:150px}#tiptip_content code,.chart-tooltip code{background:#888;padding:1px}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}table#icegram_post_query_table{padding:5px}table#icegram_post_query_table tr td{padding:5px}input.sm_text_field{padding:5px}#icegram_post_query_table label{font-weight:bold}.icegram-dashicons:before{font-family:dashicons;position:relative;font-family:dashicons;font-style:normal;vertical-align:middle;font-size:2em}.about-wrap.icegram h2{color:#3754a8}.about-wrap.icegram h2{padding-top:19px;font-weight:600}.icegram-dashicons-testimonial h4{font-size:1.5em}.icegram-badge{background:#3754a8 url(../images/icegram-logo-branding-64-white.png) no-repeat;background-position:center 24px;color:#FFF;font-size:12px;text-align:center;font-weight:600;margin:5px 0 0;padding-top:120px;height:24px;display:inline-block;width:150px;text-rendering:optimizeLegibility;-moz-box-shadow:0 1px 3px rgba(0,0,0,0.2);-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.2);box-shadow:0 1px 3px rgba(0,0,0,0.2)}.about-wrap .icegram-badge{position:absolute;top:0;right:0}.icegram-support{font-size:14px;color:black;margin:15px 0 0;height:10px;width:180px;text-align:center;text-rendering:optimizeLegibility;position:absolute;top:0;right:0;margin-top:178px;text-align:right}.icegram-contact-us{font-size:20px;line-height:1.5em;font-weight:800;margin-right:18px}.icegram-contact-us a{color:#3754a8}.ig_addons_wrap .addons{overflow:hidden}.ig_addons_wrap .addons li{float:left;margin:0 1em 1em 0!important;padding:0;vertical-align:top;width:300px}.ig_addons_wrap .addons li a{text-decoration:none;color:inherit;border:1px solid #ddd;display:block;min-height:220px;overflow:hidden;background:#f5f5f5;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),inset 0 -1px 0 rgba(0,0,0,.1)}.ig_addons_wrap .addons li a img{max-width:100px;max-height:100px;margin-right:-15px;padding:0 0 5px 5px;float:right}.ig_addons_wrap .addons li a h3{margin:0!important;padding:20px!important;background:#fff}.ig_addons_wrap .addons li a p{padding:20px!important;margin:0!important;border-top:1px solid #f1f1f1}.ig_addons_wrap .addons li a:focus,.ig_addons_wrap .addons li a:hover{background-color:#fff}.ig_addons_wrap .addons li .ig_addon_category{margin-top:-3.5em;float:right;text-transform:capitalize;font-style:normal;margin-right:1em;font-size:80%}.ig_addons_wrap .addons li .ig_addon_category span{margin-left:1.2em;padding:2px 3px;background-color:#DEDEDE;-webkit-border-radius:.3em;-moz-border-radius:.3em;border-radius:.3em}.ig_addons_wrap .addons li .ig_addon_category span.free{background-color:#C3D3FF;color:#3754a8}.ig_addons_special_message{font-size:60%;line-height:60%;margin-left:3em;padding:3px 10px;background-color:#FCF0AD;border:1px solid #CCC}#popup_container{width:550px;background-color:#FFF;margin:0 auto;padding:.5em 1em 1em 1em}#popup_container input[value="ig_vertical"]{margin-left:3%}#popup_container select{width:30%}#popup_container #embed_howto_link{float:right;font-size:.8em;font-weight:normal}.campaign_target_rules_panel .messages_list_table p.inline{display:block;margin:1em 0}.campaign_target_rules_panel .form-field .delete-url:before{font-family:dashicons;content:"\f182";cursor:pointer}.campaign_target_rules_panel .form-field .url_input_field{width:65%!important}.campaign_target_rules_panel #valid-field{margin-left:92%}.campaign_target_rules_panel #valid-field.error{font-family:dashicons;font-size:1.5em;color:#f00;vertical-align:middle;display:inline-block;-webkit-font-smoothing:antialiased;cursor:help}.campaign_target_rules_panel #valid-field.error:after{content:"\f223"}.campaign_target_rules_panel #add-url-icon:after{font-family:dashicons;content:"\f132";vertical-align:middle}.message_colors_options_container p{margin-top:.3em!important;margin-bottom:.3em!important}.message_colors_options_container p span.message_label{font-size:12px;margin-top:2px}.message-setting-fields .chosen-container-single .chosen-single{z-index:initial!important}.message-setting-fields .chosen-container-single.chosen-single div b{background:url(../images/chosen-sprite.png)no-repeat 0 2px!important}.message_form_options{width:75%;margin-left:25%}.message_form_options label.message_label{display:none}.message_form_options textarea{resize:none}.message_form_options p > input,.message_form_options p > textarea,.message_form_options p > div{}.message_form_options p > div.form_radio_group{width:60%}.message_form_options span.message_label{width:100%}.message_form_options .form_inline_shortcode{margin-left:0;margin-top:1em;position:relative;width:inherit}.message_form_html_original{font-family:Consolas,Monaco,monospace;font-size:.8em}.form_radio_group .location{display:inline-block;width:97px;height:94px;padding:3px;padding-bottom:0;margin-right:1em;border:1px solid transparent}.form_radio_group .location label{background:url(../images/from_layouts.png) no-repeat;display:block;width:95px;height:100px;border:1px solid transparent}.form_radio_group .location:hover{border:1px solid #2EA2CC}#message_form_style + .chosen-container-single .chosen-single{height:6em!important}#message_form_style + .chosen-container-single .chosen-single span{background-size:9em!important;line-height:6em!important;background-repeat:no-repeat;background-position:100% 50%!important}#message_form_style + .chosen-container .chosen-results li{width:92%!important;height:80px!important;margin:0% 0% 2% 2%;-webkit-background-size:95%!important;background-size:100%!important;border:2px solid #EEE!important;font-weight:700!important;display:inline-block!important;text-align:center!important;background-repeat:no-repeat!important;background-position:0% 100%!important;color:transparent}.message_form_options .chosen-container{width:86%!important}#message_form_style + .chosen-container .chosen-results li:first-child{color:inherit;height:1.5em!important}
|
1 |
+
.campaign_target_rules_panel .options_group{border-bottom:1px dashed #D3D3D3}.campaign_target_rules_panel .options_group:last-child{border-bottom-style:none}.campaign_target_rules_panel .options_group .form-field .options_header{display:inline-block;width:30%;vertical-align:top}.campaign_target_rules_panel .options_group p label input[type=checkbox],.campaign_target_rules_panel .options_group p label input[type=radio]{width:0}.campaign_target_rules_panel .options_group p label input[type=date]{width:auto;margin-left:10px}.user_roles p label input[type=checkbox],.user_roles p label input[type=radio]{margin-left:3px}.campaign_target_rules_panel .options_group .form-field #icegram_messages{width:300px;text-align:center}.empty_campaign{margin:1em;font-style:italic}.hndle em{font-weight:normal;font-size:85%;margin-left:1em;color:#777}h3 .chosen-container{font-weight:500}.thickbox_edit_message{padding:0 1em;border-bottom:1px solid #D3D3D3}.messages-list-sortable{margin-top:30px}.messages_list_table{font-size:1em;width:100%;border-collapse:separate;border-spacing:3px}th.message_header{text-align:center!important}.message_title{text-align:left}.message_headline{text-align:left;padding-left:1.2em}.message_seconds,.action_links{width:75px!important;text-align:center}.message_seconds input{text-align:right}.message-row .seconds-text{width:40px!important;text-align:center}.message-sort-placeholder{background-color:#D3D3D3}.device{width:auto;line-height:5em;vertical-align:baseline}.device:after{font-family:dashicons;font-size:3em}.device input{position:relative;left:2.5em;top:1.5em}.admin_field_icon{display:inline-block;-webkit-font-smoothing:antialiased;width:18px;height:18px;font:400 18px/1 dashicons;color:#888;vertical-align:text-top;margin:0 2px}.campaign_preview{float:right;margin-right:1em!important}.shortcode_description:before{content:"\f348"}.shortcode_description.light{content:"\f348";color:#777}.campaign_shortcode{display:block;width:45%;color:#777}.campaign_shortcode.light{margin-left:50%;border:1px dashed #ccc;padding-left:0.6%;padding-right:0.2%;position:absolute;margin-top:-1.5em}.campaign_shortcode.light code{color:#777}label[for=device_mobile]{margin-left:-2em}label[for=device_mobile]:after{content:"\f470"}label[for=device_tablet]:after{content:"\f471"}label[for=device_laptop]:after{content:"\f472"}.date_picker:after{font-family:dashicons;content:"\f145";position:relative;top:5px;font:normal 20px/1 dashicons;vertical-align:top}.date_picker{margin-left:1em}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.date-picker{max-width:15%}.campaign_target_rules_panel .options_group .messages-list .form-field .message_header{width:75px!important;text-align:right}.disable{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";filter:alpha(opacity=30);opacity:0.3}.enable{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";filter:alpha(opacity=100);opacity:1}.message_edit:after{content:"\f464"}.message_delete:after{content:"\f158"}.actions:after{font-family:dashicons;font-size:1.4em}.actions{text-decoration:none;color:#444;padding-right:3px;cursor:pointer}.actions:hover{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";filter:alpha(opacity=70);opacity:0.7}.action_links{vertical-align:middle}.message_header_label{color:#fff;text-align:center;font-size:0.7em!important;margin:0!important;padding:3px 5px;cursor:auto;text-transform:uppercase}.message_label{float:left;width:25%;padding:0}.message_field{width:65%;display:inline-block}.message_image_button .image-buttons-icon{margin:0 2px}.message_image_button .image-buttons-icon:before{content:"\f128"}.message_headline_button,.message_image_button{vertical-align:top!important}.message_headline_button .headline-buttons-icon{margin:2px}.message_headline_button .headline-buttons-icon:before{content:"\f130"}.help_tip:after{content:"\f223"}.help_tip{float:right;margin:4px 0;cursor:help;text-decoration:none}.chosen-container{width:65%!important}.message_row.position{height:110px}.location-selector input[type=radio]:checked + label span{background-color:#2ea2cc}.location-selector{width:128px;height:115px;position:absolute;display:block;margin-left:24.3%;background-image:url(../images/desktop.png);background-position:0 -19px}.location-selector .location{background-color:#ddd;cursor:pointer;position:absolute}.location-selector .location:hover{background-color:#ccc}.location-selector .location.top,.location-selector .location.bottom,.location-selector .location.middle{height:14%;width:14%;right:42%}.location-selector .location.top{top:13px}.location-selector .location.middle{top:30%}.location-selector .location.bottom{bottom:43px}.location-selector .location.right,.location-selector .location.left{height:14%;width:14%;margin-left:0;margin-right:0}.location-selector .location.right{right:15px}.location-selector .location.left{left:15px}.wp-editor-container{margin-left:25%}.message-setting-fields #upload_image,.message-setting-fields #message_title{width:58%}.wp-editor-container span .mceLayout{width:50%}#ui-datepicker-div,#wp-admin-bar-view,#edit-slug-box,.empty_campaign,.location-selector input[type=radio]{display:none}#the-list .message_thumbnail img{max-width:200px;max-height:100px}#icegram_messages + .chosen-container-single .chosen-search input[type=text]{width:100%!important}.message_theme + .chosen-container.chosen-container .chosen-results{max-height:30em!important}.message_theme + .chosen-container-single .chosen-single span{background-repeat:no-repeat!important;background-position:100% 50%!important}.message_theme + .chosen-container .chosen-results li{margin:0% 0% 2% 2%;background-position:0.5em 2em!important;-webkit-background-size:95%!important;background-size:95%!important;border:2px solid #EEE!important;font-weight:700!important;display:inline-block!important;text-align:center!important;background-repeat:no-repeat!important}.message_theme + .chosen-container .chosen-results li.highlighted{color:#000!important;border:2px solid #2ea2cc!important;background-color:#EAEFFF!important}#tiptip_holder{display:none;position:absolute;top:0;left:0;z-index:99999}#tiptip_holder.tip_top{padding-bottom:5px}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#464646}#tiptip_holder.tip_bottom{padding-top:5px}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#464646}#tiptip_holder.tip_right{padding-left:5px}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#464646}#tiptip_holder.tip_left{padding-right:5px}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#464646}#tiptip_content,.chart-tooltip{font-size:11px;color:#fff;padding:.5em;background:#464646;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:1px 1px 3px rgba(0,0,0,.1);-moz-box-shadow:1px 1px 3px rgba(0,0,0,.1);box-shadow:1px 1px 3px rgba(0,0,0,.1);text-align:center;max-width:150px}#tiptip_content code,.chart-tooltip code{background:#888;padding:1px}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}table#icegram_post_query_table{padding:5px}table#icegram_post_query_table tr td{padding:5px}input.sm_text_field{padding:5px}#icegram_post_query_table label{font-weight:bold}.icegram-dashicons:before{font-family:dashicons;position:relative;font-family:dashicons;font-style:normal;vertical-align:middle;font-size:2em}.about-wrap.icegram h2{color:#3754a8}.about-wrap.icegram h2{padding-top:19px;font-weight:600}.icegram-dashicons-testimonial h4{font-size:1.5em}.icegram-badge{background:#3754a8 url(../images/icegram-logo-branding-64-white.png) no-repeat;background-position:center 24px;color:#FFF;font-size:12px;text-align:center;font-weight:600;margin:5px 0 0;padding-top:120px;height:24px;display:inline-block;width:150px;text-rendering:optimizeLegibility;-moz-box-shadow:0 1px 3px rgba(0,0,0,0.2);-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.2);box-shadow:0 1px 3px rgba(0,0,0,0.2)}.about-wrap .icegram-badge{position:absolute;top:0;right:0}.icegram-support{font-size:14px;color:black;margin:15px 0 0;height:10px;width:180px;text-align:center;text-rendering:optimizeLegibility;position:absolute;top:0;right:0;margin-top:178px;text-align:right}.icegram-contact-us{font-size:20px;line-height:1.5em;font-weight:800;margin-right:18px}.icegram-contact-us a{color:#3754a8}.ig_addons_wrap .addons{overflow:hidden}.ig_addons_wrap .addons li{float:left;margin:0 1em 1em 0!important;padding:0;vertical-align:top;width:300px}.ig_addons_wrap .addons li a{text-decoration:none;color:inherit;border:1px solid #ddd;display:block;min-height:220px;overflow:hidden;background:#f5f5f5;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),inset 0 -1px 0 rgba(0,0,0,.1)}.ig_addons_wrap .addons li a img{max-width:100px;max-height:100px;margin-right:-15px;padding:0 0 5px 5px;float:right}.ig_addons_wrap .addons li a h3{margin:0!important;padding:20px!important;background:#fff}.ig_addons_wrap .addons li a p{padding:20px!important;margin:0!important;border-top:1px solid #f1f1f1}.ig_addons_wrap .addons li a:focus,.ig_addons_wrap .addons li a:hover{background-color:#fff}.ig_addons_wrap .addons li .ig_addon_category{margin-top:-3.5em;float:right;text-transform:capitalize;font-style:normal;margin-right:1em;font-size:80%}.ig_addons_wrap .addons li .ig_addon_category span{margin-left:1.2em;padding:2px 3px;background-color:#DEDEDE;-webkit-border-radius:.3em;-moz-border-radius:.3em;border-radius:.3em}.ig_addons_wrap .addons li .ig_addon_category span.free{background-color:#C3D3FF;color:#3754a8}.ig_addons_special_message{font-size:60%;line-height:60%;margin-left:3em;padding:3px 10px;background-color:#FCF0AD;border:1px solid #CCC}#popup_container{width:550px;background-color:#FFF;margin:0 auto;padding:.5em 1em 1em 1em}#popup_container input[value="ig_vertical"]{margin-left:3%}#popup_container select{width:30%}#popup_container #embed_howto_link{float:right;font-size:.8em;font-weight:normal}.campaign_target_rules_panel .messages_list_table p.inline{display:block;margin:1em 0}.campaign_target_rules_panel .form-field .delete-url:before{font-family:dashicons;content:"\f182";cursor:pointer}.campaign_target_rules_panel .form-field .url_input_field{width:65%!important}.campaign_target_rules_panel #valid-field{margin-left:92%}.campaign_target_rules_panel #valid-field.error{font-family:dashicons;font-size:1.5em;color:#f00;vertical-align:middle;display:inline-block;-webkit-font-smoothing:antialiased;cursor:help}.campaign_target_rules_panel #valid-field.error:after{content:"\f223"}.campaign_target_rules_panel #add-url-icon:after{font-family:dashicons;content:"\f132";vertical-align:middle}.message_colors_options_container p{margin-top:.3em!important;margin-bottom:.3em!important}.message_colors_options_container p span.message_label{font-size:12px;margin-top:2px}.message-setting-fields .chosen-container-single .chosen-single{z-index:initial!important}.message-setting-fields .chosen-container-single.chosen-single div b{background:url(../images/chosen-sprite.png)no-repeat 0 2px!important}.message_form_options{width:75%;margin-left:25%}.message_form_options label.message_label{display:none}.message_form_options textarea{resize:none;width:86%}.message_form_options p > input,.message_form_options p > textarea,.message_form_options p > div{}.message_form_options p > div.form_radio_group{width:86%}.message_form_options span.message_label{width:100%}.message_form_options .form_inline_shortcode{margin-left:0;margin-top:1em;position:relative;width:inherit}.message_form_html_original{font-family:Consolas,Monaco,monospace;font-size:.8em}.form_radio_group .location{display:inline-block;width:97px;height:94px;padding:3px;padding-bottom:0;margin-right:1em;border:1px solid transparent}.form_radio_group .location label{background:url(../images/from_layouts.png) no-repeat;display:block;width:95px;height:100px;border:1px solid transparent}.form_radio_group .location:hover{border:1px solid #2EA2CC}#message_form_style + .chosen-container-single .chosen-single{height:6em!important}#message_form_style + .chosen-container-single .chosen-single span{background-size:9em!important;line-height:6em!important;background-repeat:no-repeat;background-position:100% 50%!important}#message_form_style + .chosen-container .chosen-results li{width:43%!important;height:10em!important;margin:0% 0% 2% 2%;-webkit-background-size:95%!important;background-size:100%!important;border:2px solid #EEE!important;font-weight:700!important;display:inline-block!important;text-align:center!important;background-repeat:no-repeat!important;background-position:0% 100%!important;color:transparent}#message_form_style + .chosen-container .chosen-results li.highlighted{color:transparent!important;border:2px solid #2ea2cc!important;background-color:#EAEFFF!important}.message_form_options .chosen-container{width:86%!important}#message_form_style + .chosen-container .chosen-results li:first-child{}
|
assets/images/style_0.png
ADDED
Binary file
|
assets/images/style_1.png
CHANGED
Binary file
|
assets/images/style_2.png
CHANGED
Binary file
|
assets/images/style_3.png
CHANGED
Binary file
|
assets/images/style_4.png
CHANGED
Binary file
|
assets/js/admin.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(function(){function e(e){var t=jQuery(e).find(".message_type option:selected").val(),i=jQuery(e).find(".message_row.ig_"+t).find(".message_theme").val(),a=jQuery(e).find(".message_row.ig_"+t).find("#message_form_style").val(),r=jQuery(e).find("#message_theme_ig_"+t).find("."+i).attr("style"),n=jQuery(e).find("#message_form_style").find("."+a).attr("style");jQuery(e).find(".message_row, .location").hide(),jQuery(e).find(".ig_"+t).show(),jQuery(e).find(".message_row.ig_"+t).find(".message_theme").next().find(".chosen-single span").attr("style",r),jQuery(e).find(".message_row.ig_"+t).find(".message_form_style").next().find(".chosen-single span").attr("style",n),"block"!==jQuery(e).find(".message_body").parent().css("display")?jQuery(e).find(".message_body").parent().next(".wp-editor-wrap").hide():jQuery(e).find(".message_body").parent().next(".wp-editor-wrap").show(),jQuery(e).find(".message_form_layout:checked").is(":visible")||jQuery(e).find(".message_form_layout:visible").first().prop("checked",!0),jQuery(".message_form_layout").change()}function t(e,i,a){var r=Math.floor(Math.random()*(a-i+1))+i;return r==e?t(r,i,a):r}function i(){var e='<span><label class="options_header"><span id="valid-field"> </span></label> <input type="text" class="url_input_field" data-option="local_url" name="campaign_target_rules[local_urls][]" value="'+r+'*"/><span class="delete-url"></span></span>';return e}function a(){0==jQuery(".message-row").length?jQuery(".empty_campaign").show():jQuery(".empty_campaign").hide()}var r=icegram_writepanel_params.home_url;jQuery("#campaign_data").find("h3.hndle").hide(),jQuery(".target_rules_desc").appendTo("#campaign_target_rules h3.hndle span"),jQuery(document).ready(function(){var i=window.send_to_editor;jQuery("#postdivrich").hide(),jQuery(".color-field").wpColorPicker().each(function(e){var t=jQuery(this).data("color-label")||"";""!==t&&jQuery(this).closest(".wp-picker-container").find("a.wp-color-result").attr("title",t)}),jQuery("#campaign_data").on("change",".show_color_options",function(){jQuery(this).closest("p").next(".message_colors_options_container").toggle(!this.checked)}).change(),a(),jQuery(".message_edit:first").trigger("click"),this_data=jQuery(".message_type option:selected").closest(".message-setting-fields");for(var r=0;r<this_data.length;r++)e(this_data[r]);jQuery(".inside").on("change",".message_type",function(t){var i=jQuery(t.target).parents(".message-setting-fields");e(i)}),jQuery("#campaign_data, #message-settings").on("change",".message_theme",function(e){var t=jQuery(e.target).parents(".message-setting-fields"),i=jQuery(t).find(".message_type").val(),a=jQuery(t).find(".message_row.ig_"+i).find(".message_theme").val(),r=jQuery(t).find("#message_theme_ig_"+i).find("."+a).attr("style");jQuery(t).find(".message_row.ig_"+i).find(".message_theme").next().find(".chosen-single span").attr("style",r)}),jQuery("#campaign_data").on("click",".message_image_button",function(e){var t=this;return window.send_to_editor=function(e){imgurl=jQuery("img",e).attr("src"),jQuery(t).parent().find("#upload_image").val(imgurl),tb_remove(),window.send_to_editor=i},!1}),jQuery("#campaign_data ,#message-settings").on("click",".message_headline_button",function(){var e=jQuery(this).prev().attr("data-headline"),i=icegram_writepanel_params.available_headlines.length,a=t(e,0,i),r=icegram_writepanel_params.available_headlines[a];jQuery(this).prev().val(r)}),jQuery(".tips, .help_tip").tipTip({attribute:"data-tip"}),jQuery("span.test_class").hover(function(){jQuery(this).next().show()},function(){jQuery(this).next().hide()}),jQuery("#campaign_data .hndle, #campaign_data .handlediv").unbind("click"),jQuery("#campaign_data .handlediv").hide()}),jQuery("#campaign_data").on("click",".message_delete",function(){jQuery(this).parent().parent().next().remove(),jQuery(this).parent().parent().remove(),a()}),jQuery("#campaign_data").on("click",".message_edit",function(){jQuery(this).parent().parent().next().toggle(),jQuery(this).parent().parent().find(".message-title-text, .message-title-input").toggle()}),jQuery("#campaign_data").on("change",".message-title-input",function(){jQuery(this).prev().text(jQuery(this).val())}),jQuery("select.ajax_chosen_select_messages").ajaxChosen({type:"GET",url:icegram_writepanel_params.ajax_url,dataType:"json",afterTypeDelay:100,data:{action:"icegram_json_search_messages",security:icegram_writepanel_params.search_message_nonce}},function(e){var t={};return jQuery.each(e,function(e,i){t[e]=i}),t}),jQuery("#campaign_data").on("change",".show_form_options",function(e){var t=jQuery(this).closest("p");if(jQuery(t).siblings(".message_form_options").slideToggle(this.checked),this.checked)jQuery(t).siblings(".message_form_options").find(".message_form_layout").change();else{jQuery(t).siblings("p.cta-actions").find("select option").removeAttr("disabled");var i=jQuery(t).siblings(".message_form_options").siblings(".wp-editor-wrap").find(".wp-editor-area"),a=jQuery(i).val().trim().replace("[ig_form]","");jQuery(i).val(a)}}).change(),jQuery("#campaign_data, #message-settings").on("change",".message_form_style",function(e){var t=jQuery(e.target).parents(".message-setting-fields"),i=jQuery(t).find("#message_form_style").val(),a=jQuery(t).find("#message_form_style").find("."+i).attr("style");jQuery(t).find(".message_form_style").next().find(".chosen-single span").attr("style",a)}),jQuery("#campaign_data").on("change",".message_form_layout ",function(){if(jQuery(this).is(":visible")){jQuery(e).closest(".form_radio_group").siblings(".form_inline_shortcode").hide();var e=this;jQuery(e).closest(".form_radio_group").siblings(".message_form_color").show().end().siblings(".form_inline_shortcode").hide();var t=jQuery(e).closest(".message_form_options").siblings(".wp-editor-wrap").find(".wp-editor-area"),i=jQuery(t).val().trim();jQuery(e).is(":checked")&&jQuery(e).closest(".message_form_options").prev("p.message_form_options_check").find(".show_form_options").is(":checked")&&("inline"==jQuery(e).val()?(-1==i.indexOf("[ig_form]")&&(i+="[ig_form]"),jQuery(e).closest(".form_radio_group").siblings(".message_form_color, .form_inline_shortcode").toggle()):"inline"!=jQuery(e).val()&&(i=i.replace("[ig_form]",""))),jQuery(t).val(i)}}),jQuery("#campaign_data").on("blur",".message_form_html_original",function(e){var t=this,i=jQuery("<div/>").html(jQuery(t).val()).find("input[type=submit], button, input[type=button]");if(jQuery(a).parent().find("p.cta-actions select option").removeAttr("disabled"),i.length>0){var a=jQuery(t).closest(".message_form_options"),r=jQuery(i[i.length-1]),n=r.is("button")?r.not("br, span, div").text():r.val();jQuery(a).siblings("p").find("#message_label").val(n.trim()),jQuery(a).parent().find("p.cta-actions select").find('option[value="url"], option[value="hide"], option[value="cta_another_message"]').attr("disabled",!0).attr("selected",!1).end().find('option[value="form"]').attr("selected",!0).trigger("change")}}),jQuery(".ajax_chosen_select_messages").chosen(),jQuery("#campaign_data").on("change",".ajax_chosen_select_messages",function(){var t=jQuery("#ig-tabs li.current").attr("variation_id"),i=jQuery.extend({},tinyMCEPreInit.mceInit.content),r=jQuery.extend({},tinyMCEPreInit.qtInit.content),n=jQuery(this).parent().siblings(".campaign_target_rules_panel"),s=jQuery(n).find(".message-row").length,o=jQuery(this).val();return""==o?void jQuery(".ajax_chosen_select_messages").val("").trigger("chosen:updated"):(jQuery(".message-edit-row").hide(),jQuery(".message-title-text").show(),jQuery(".message-title-input").hide(),void jQuery.ajax({type:"POST",url:icegram_writepanel_params.ajax_url,dataType:"json",data:{action:"get_message_action_row",message_id:o,row:s},success:function(o){if(s++,jQuery(n).find(".messages-list .messages_list_table tbody").append(o.main),jQuery(".color-field").wpColorPicker().each(function(e){var t=jQuery(this).data("color-label")||"";""!==t&&jQuery(this).closest(".wp-picker-container").find("a.wp-color-result").attr("title",t)}),jQuery("#campaign_data").on("change",".show_color_options",function(){jQuery(this).closest("p").next(".message_colors_options_container").toggle(!this.checked)}).change(),e(jQuery("#"+o.id)),jQuery(".ajax_chosen_select_messages").val("").trigger("chosen:updated"),jQuery("select.icegram_chosen_page").chosen({disable_search_threshold:10}),a(),jQuery(".message-setting-fields").trigger("change"),jQuery(".tips, .help_tip").tipTip({attribute:"data-tip"}),"undefined"==typeof tinyMCEPreInit.mceInit["edit"+o.id]){for(_prop in i)"string"==typeof i[_prop]&&"content_css"!==_prop&&(i[_prop]=i[_prop].replace(new RegExp("content","g"),"edit"+o.id));tinyMCEPreInit.mceInit["edit"+o.id]=i}if("undefined"==typeof tinyMCEPreInit.qtInit["edit"+o.id]){for(_prop in r)"string"==typeof r[_prop]&&"content_css"!==_prop&&(r[_prop]=r[_prop].replace(new RegExp("content","g"),"edit"+o.id));tinyMCEPreInit.qtInit["edit"+o.id]=r}tinyMCE.init({id:tinyMCEPreInit.mceInit["edit"+o.id]}),quicktags({id:"edit"+o.id}),QTags._buttonsInit(),jQuery("#wp-edit"+o.id+"-wrap").hasClass("tmce-active")?jQuery("#edit"+o.id+"-tmce").click():jQuery("#edit"+o.id+"-html").click(),"undefined"!=typeof t&&jQuery(window).trigger("icegram_tab_selected",[t])}}))}),jQuery("#campaign_target_rules").on("click","#add_local_url_row",function(e){e.preventDefault();var t=i();jQuery(".local_url").find(".url_input_field").length?jQuery(t).insertAfter(jQuery(".local_url").find(".url_input_field").last().parent("span")):jQuery(t).insertBefore(jQuery(".local_url").find("#add_local_url_row_label"))}),jQuery("#campaign_target_rules").on("click",".delete-url",function(e){jQuery(this).parent().remove()}),jQuery("select.ajax_chosen_select_messages").next("div").on("click","div.chosen-drop",function(){jQuery(this).closest("h3.hndle").trigger("click")}),jQuery("#campaign_data").on("click",".campaign_preview",function(e){jQuery(this).closest("h3.hndle").trigger("click"),0!=jQuery(".message-row").length&&(tinyMCE.triggerSave(),params=jQuery("#post").serializeArray(),params.push({name:"action",value:"save_campaign_preview"}),jQuery.ajax({type:"POST",async:!1,url:icegram_writepanel_params.ajax_url,data:params,success:function(e){""!=e&&window.open(e,"preview_window")}}))}),jQuery("select.icegram_chosen_page").chosen({disable_search_threshold:10}),jQuery("input#users_logged_in, input#users_all ,input#users_not_logged_in").on("change",function(){"logged_in"==jQuery(this).val()?(jQuery("select#users_roles").parent("p").show(),jQuery("#users_roles_chosen").find("input").trigger("click")):jQuery("select#users_roles").parent("p").hide()}),jQuery(".schedule_rule").on("change",function(){"when_schedule"==jQuery(this).attr("id")?jQuery("#date_picker").show():jQuery("#date_picker").hide()}),jQuery("input#where_other_page").on("change",function(){jQuery("select#where_page_id").parent("p").slideToggle(),jQuery(this).is(":checked")&&jQuery("#where_page_id_chosen").find("input").trigger("click")}),jQuery("input#where_sitewide").on("change",function(){jQuery("select#exclude_page_id").parent("p").slideToggle(),jQuery(this).is(":checked")&&jQuery("#exclude_page_id_chosen").find("input").trigger("click")}),jQuery("input#where_local_url").on("change",function(){jQuery(".local_url").slideToggle()}),jQuery(".date-picker").datepicker({dateFormat:"yy-mm-dd",defaultDate:0,showOtherMonths:!0,selectOtherMonths:!0,changeMonth:!0,changeYear:!0,showButtonPanel:!0}),jQuery("#campaign_target_rules").on("focusout","input.url_input_field",function(){var e=this;if(jQuery(e).parent().find("span#valid-field").removeClass("error"),"undefine"!==jQuery(e).data("option")&&"local_url"==jQuery(e).data("option")&&"*"!=jQuery(e).val()){var t=e.value;if(t.indexOf(r)<0)return void jQuery(e).val(r+t)}})});
|
1 |
+
jQuery(function(){function e(e){var t=jQuery(e).find(".message_type option:selected").val(),i=jQuery(e).find(".message_row.ig_"+t).find(".message_theme").val(),a=jQuery(e).find(".message_row.ig_"+t).find("#message_form_style").val(),r=jQuery(e).find("#message_theme_ig_"+t).find("."+i).attr("style"),s=jQuery(e).find("#message_form_style").find("."+a).attr("style");jQuery(e).find(".message_row, .location").hide(),jQuery(e).find(".ig_"+t).show(),jQuery(e).find(".message_row.ig_"+t).find(".message_theme").next().find(".chosen-single span").attr("style",r),jQuery(e).find(".message_row.ig_"+t).find(".message_form_style").next().find(".chosen-single span").attr("style",s).text(function(){return jQuery(this).text().substr(0,jQuery(this).text().indexOf(" "))||jQuery(this).text()}),"block"!==jQuery(e).find(".message_body").parent().css("display")?jQuery(e).find(".message_body").parent().next(".wp-editor-wrap").hide():jQuery(e).find(".message_body").parent().next(".wp-editor-wrap").show(),jQuery(e).find(".message_form_layout:checked").is(":visible")||jQuery(e).find(".message_form_layout:visible").first().prop("checked",!0),jQuery(".message_form_layout").change()}function t(e,i,a){var r=Math.floor(Math.random()*(a-i+1))+i;return r==e?t(r,i,a):r}function i(){var e='<span><label class="options_header"><span id="valid-field"> </span></label> <input type="text" class="url_input_field" data-option="local_url" name="campaign_target_rules[local_urls][]" value="'+r+'*"/><span class="delete-url"></span></span>';return e}function a(){0==jQuery(".message-row").length?jQuery(".empty_campaign").show():jQuery(".empty_campaign").hide()}var r=icegram_writepanel_params.home_url;jQuery("#campaign_data").find("h3.hndle").hide(),jQuery(".target_rules_desc").appendTo("#campaign_target_rules h3.hndle span"),jQuery(document).ready(function(){var i=window.send_to_editor;jQuery("#postdivrich").hide(),jQuery(".color-field").wpColorPicker().each(function(e){var t=jQuery(this).data("color-label")||"";""!==t&&jQuery(this).closest(".wp-picker-container").find("a.wp-color-result").attr("title",t)}),jQuery("#campaign_data").on("change",".show_color_options",function(){jQuery(this).closest("p").next(".message_colors_options_container").toggle(!this.checked)}).change(),a(),jQuery(".message_edit:first").trigger("click"),this_data=jQuery(".message_type option:selected").closest(".message-setting-fields");for(var r=0;r<this_data.length;r++)e(this_data[r]);jQuery(".inside").on("change",".message_type",function(t){var i=jQuery(t.target).parents(".message-setting-fields");e(i)}),jQuery("#campaign_data, #message-settings").on("change",".message_theme",function(e){var t=jQuery(e.target).parents(".message-setting-fields"),i=jQuery(t).find(".message_type").val(),a=jQuery(t).find(".message_row.ig_"+i).find(".message_theme").val(),r=jQuery(t).find("#message_theme_ig_"+i).find("."+a).attr("style");jQuery(t).find(".message_row.ig_"+i).find(".message_theme").next().find(".chosen-single span").attr("style",r)}),jQuery("#campaign_data").on("click",".message_image_button",function(e){var t=this;return window.send_to_editor=function(e){imgurl=jQuery("img",e).attr("src"),jQuery(t).parent().find("#upload_image").val(imgurl),tb_remove(),window.send_to_editor=i},!1}),jQuery("#campaign_data ,#message-settings").on("click",".message_headline_button",function(){var e=jQuery(this).prev().attr("data-headline"),i=icegram_writepanel_params.available_headlines.length,a=t(e,0,i),r=icegram_writepanel_params.available_headlines[a];jQuery(this).prev().val(r)}),jQuery(".tips, .help_tip").tipTip({attribute:"data-tip"}),jQuery("span.test_class").hover(function(){jQuery(this).next().show()},function(){jQuery(this).next().hide()}),jQuery("#campaign_data .hndle, #campaign_data .handlediv").unbind("click"),jQuery("#campaign_data .handlediv").hide()}),jQuery("#campaign_data").on("click",".message_delete",function(){jQuery(this).parent().parent().next().remove(),jQuery(this).parent().parent().remove(),a()}),jQuery("#campaign_data").on("click",".message_edit",function(){jQuery(this).parent().parent().next().toggle(),jQuery(this).parent().parent().find(".message-title-text, .message-title-input").toggle()}),jQuery("#campaign_data").on("change",".message-title-input",function(){jQuery(this).prev().text(jQuery(this).val())}),jQuery("select.ajax_chosen_select_messages").ajaxChosen({type:"GET",url:icegram_writepanel_params.ajax_url,dataType:"json",afterTypeDelay:100,data:{action:"icegram_json_search_messages",security:icegram_writepanel_params.search_message_nonce}},function(e){var t={};return jQuery.each(e,function(e,i){t[e]=i}),t}),jQuery("#campaign_data").on("change",".show_form_options",function(e){var t=jQuery(this).closest("p");if(jQuery(t).siblings(".message_form_options").slideToggle(this.checked),this.checked)jQuery(t).siblings(".message_form_options").find(".message_form_layout").change();else{jQuery(t).siblings("p.cta-actions").find("select option").removeAttr("disabled");var i=jQuery(t).siblings(".message_form_options").siblings(".wp-editor-wrap").find(".wp-editor-area"),a=jQuery(i).val().trim().replace("[ig_form]","");jQuery(i).val(a)}}).change(),jQuery("#campaign_data, #message-settings").on("change",".message_form_style",function(e){var t=jQuery(e.target).parents(".message-setting-fields"),i=jQuery(t).find("#message_form_style").val(),a=jQuery(t).find("#message_form_style").find("."+i).attr("style");jQuery(t).find(".message_form_style").next().find(".chosen-single span").attr("style",a).text(function(){return jQuery(this).text().substr(0,jQuery(this).text().indexOf(" "))||jQuery(this).text()})}),jQuery("#campaign_data").on("change",".message_form_layout ",function(){var e=jQuery(this).closest(".message_form_options").siblings(".wp-editor-wrap").find(".wp-editor-area"),t=jQuery(e).val().trim();if(jQuery(this).is(":visible")){var i=this;jQuery(i).closest(".form_radio_group").siblings(".form_inline_shortcode").hide(),jQuery(i).closest(".form_radio_group").siblings(".message_form_color").show().end().siblings(".form_inline_shortcode").hide(),jQuery(i).is(":checked")&&jQuery(i).closest(".message_form_options").prev("p.message_form_options_check").find(".show_form_options").is(":checked")&&("inline"==jQuery(i).val()?(-1==t.indexOf("[ig_form]")&&(t+="[ig_form]"),jQuery(i).closest(".form_radio_group").siblings(".message_form_color, .form_inline_shortcode").toggle()):"inline"!=jQuery(i).val()&&(t=t.replace("[ig_form]","")))}else t=t.replace("[ig_form]","");jQuery(e).val(t)}),jQuery("#campaign_data").on("blur",".message_form_html_original",function(e){var t=this,i=jQuery("<div/>").html(jQuery(t).val()).find("input[type=submit], button, input[type=button]");if(jQuery(a).parent().find("p.cta-actions select option").removeAttr("disabled"),i.length>0){var a=jQuery(t).closest(".message_form_options"),r=jQuery(i[i.length-1]),s=r.is("button")?r.not("br, span, div").text():r.val();jQuery(a).siblings("p").find("#message_label").val(s.trim()),jQuery(a).parent().find("p.cta-actions select").find('option[value="url"], option[value="hide"], option[value="cta_another_message"]').attr("disabled",!0).attr("selected",!1).end().find('option[value="form"]').attr("selected",!0).trigger("change")}}),jQuery(".ajax_chosen_select_messages").chosen(),jQuery("#campaign_data").on("change",".ajax_chosen_select_messages",function(){var t=jQuery("#ig-tabs li.current").attr("variation_id"),i=jQuery.extend({},tinyMCEPreInit.mceInit.content),r=jQuery.extend({},tinyMCEPreInit.qtInit.content),s=jQuery(this).parent().siblings(".campaign_target_rules_panel"),n=jQuery(s).find(".message-row").length,o=jQuery(this).val();return""==o?void jQuery(".ajax_chosen_select_messages").val("").trigger("chosen:updated"):(jQuery(".message-edit-row").hide(),jQuery(".message-title-text").show(),jQuery(".message-title-input").hide(),void jQuery.ajax({type:"POST",url:icegram_writepanel_params.ajax_url,dataType:"json",data:{action:"get_message_action_row",message_id:o,row:n},success:function(o){if(n++,jQuery(s).find(".messages-list .messages_list_table tbody").append(o.main),jQuery(".color-field").wpColorPicker().each(function(e){var t=jQuery(this).data("color-label")||"";""!==t&&jQuery(this).closest(".wp-picker-container").find("a.wp-color-result").attr("title",t)}),jQuery("#campaign_data").on("change",".show_color_options",function(){jQuery(this).closest("p").next(".message_colors_options_container").toggle(!this.checked)}).change(),e(jQuery("#"+o.id)),jQuery(".ajax_chosen_select_messages").val("").trigger("chosen:updated"),jQuery("select.icegram_chosen_page").chosen({disable_search_threshold:10}),a(),jQuery(".message-setting-fields").trigger("change"),jQuery(".tips, .help_tip").tipTip({attribute:"data-tip"}),"undefined"==typeof tinyMCEPreInit.mceInit["edit"+o.id]){for(_prop in i)"string"==typeof i[_prop]&&"content_css"!==_prop&&(i[_prop]=i[_prop].replace(new RegExp("content","g"),"edit"+o.id));tinyMCEPreInit.mceInit["edit"+o.id]=i}if("undefined"==typeof tinyMCEPreInit.qtInit["edit"+o.id]){for(_prop in r)"string"==typeof r[_prop]&&"content_css"!==_prop&&(r[_prop]=r[_prop].replace(new RegExp("content","g"),"edit"+o.id));tinyMCEPreInit.qtInit["edit"+o.id]=r}tinyMCE.init({id:tinyMCEPreInit.mceInit["edit"+o.id]}),quicktags({id:"edit"+o.id}),QTags._buttonsInit(),jQuery("#wp-edit"+o.id+"-wrap").hasClass("tmce-active")?jQuery("#edit"+o.id+"-tmce").click():jQuery("#edit"+o.id+"-html").click(),"undefined"!=typeof t&&jQuery(window).trigger("icegram_tab_selected",[t])}}))}),jQuery("#campaign_target_rules").on("click","#add_local_url_row",function(e){e.preventDefault();var t=i();jQuery(".local_url").find(".url_input_field").length?jQuery(t).insertAfter(jQuery(".local_url").find(".url_input_field").last().parent("span")):jQuery(t).insertBefore(jQuery(".local_url").find("#add_local_url_row_label"))}),jQuery("#campaign_target_rules").on("click",".delete-url",function(e){jQuery(this).parent().remove()}),jQuery("select.ajax_chosen_select_messages").next("div").on("click","div.chosen-drop",function(){jQuery(this).closest("h3.hndle").trigger("click")}),jQuery("#campaign_data").on("click",".campaign_preview",function(e){jQuery(this).closest("h3.hndle").trigger("click"),0!=jQuery(".message-row").length&&(tinyMCE.triggerSave(),params=jQuery("#post").serializeArray(),params.push({name:"action",value:"save_campaign_preview"}),jQuery.ajax({type:"POST",async:!1,url:icegram_writepanel_params.ajax_url,data:params,success:function(e){""!=e&&window.open(e,"preview_window")}}))}),jQuery("select.icegram_chosen_page").chosen({disable_search_threshold:10}),jQuery("input#users_logged_in, input#users_all ,input#users_not_logged_in").on("change",function(){"logged_in"==jQuery(this).val()?(jQuery("select#users_roles").parent("p").show(),jQuery("#users_roles_chosen").find("input").trigger("click")):jQuery("select#users_roles").parent("p").hide()}),jQuery(".schedule_rule").on("change",function(){"when_schedule"==jQuery(this).attr("id")?jQuery("#date_picker").show():jQuery("#date_picker").hide()}),jQuery("input#where_other_page").on("change",function(){jQuery("select#where_page_id").parent("p").slideToggle(),jQuery(this).is(":checked")&&jQuery("#where_page_id_chosen").find("input").trigger("click")}),jQuery("input#where_sitewide").on("change",function(){jQuery("select#exclude_page_id").parent("p").slideToggle(),jQuery(this).is(":checked")&&jQuery("#exclude_page_id_chosen").find("input").trigger("click")}),jQuery("input#where_local_url").on("change",function(){jQuery(".local_url").slideToggle()}),jQuery(".date-picker").datepicker({dateFormat:"yy-mm-dd",defaultDate:0,showOtherMonths:!0,selectOtherMonths:!0,changeMonth:!0,changeYear:!0,showButtonPanel:!0}),jQuery("#campaign_target_rules").on("focusout","input.url_input_field",function(){var e=this;if(jQuery(e).parent().find("span#valid-field").removeClass("error"),"undefine"!==jQuery(e).data("option")&&"local_url"==jQuery(e).data("option")&&"*"!=jQuery(e).val()){var t=e.value;if(t.indexOf(r)<0)return void jQuery(e).val(r+t)}})});
|
assets/js/icegram.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function Icegram(){}function Icegram_Message_Type(e){var e;this.root_container="#icegram_messages_container",this.data=e,this.type=e.type,this.data.delay_time=parseInt(this.data.delay_time),"string"!=typeof this.data.link||""==this.data.link||/^tel:/i.test(this.data.link)||/^https?:\/\//i.test(this.data.link)||(this.data.link="http://"+this.data.link),this.set_template(this.get_template_default()),this.init()}Icegram.prototype.init=function(e){if(void 0!=e){jQuery(window).trigger("preinit.icegram",[e]),this.data=e,this.defaults=jQuery.extend({},e.defaults),this.message_data=e.messages,this.messages,this.tracking_data=[],this.message_template_cache={},this.map_id_to_index={},this.map_type_to_index={},this.mode=void 0==window.ig_mode?"local":window.ig_mode,this.powered_by={link:"http://www.icegram.com/?utm_source=inapp&utm_campaign=poweredby&utm_medium="},this.powered_by.text=this.defaults.powered_by_text,this.powered_by.logo=this.defaults.powered_by_logo,jQuery("body").append('<div id="icegram_messages_container"></div>');this.messages=[];var t=this;this.message_data.length>0&&jQuery.each(this.message_data,function(e,i){try{if(-1==window.location.href.indexOf("campaign_preview_id")){if("yes"==i.retargeting&&1==jQuery.cookie("icegram_messages_shown_"+i.id))return;if("yes"==i.retargeting_clicked&&1==jQuery.cookie("icegram_messages_clicked_"+i.id))return}var a=null,r=i.type.split("-").join(" ").ucwords().split(" ").join("_");a="function"==typeof window["Icegram_Message_Type_"+r]?new window["Icegram_Message_Type_"+r](i):new Icegram_Message_Type(i),t.messages.push(a),t.map_id_to_index["_"+i.id]=e,t.map_type_to_index[i.type]=jQuery.isArray(t.map_type_to_index[i.type])?t.map_type_to_index[i.type]:new Array,t.map_type_to_index[i.type].push(e)}catch(o){}}),jQuery(window).unload(function(){"function"==typeof window.icegram.submit_tracking_data&&window.icegram.submit_tracking_data(!1)}),setInterval(function(){"function"==typeof window.icegram.submit_tracking_data&&window.icegram.submit_tracking_data(!0)},5e3),jQuery(window).trigger("init.icegram",[this])}},Icegram.prototype.timer_tick=function(){},Icegram.prototype.get_template_fn=function(e){return this.message_template_cache[e]},Icegram.prototype.set_template_fn=function(e,t){this.message_template_cache[e]=t},Icegram.prototype.get_message=function(e){return this.messages.length>e?this.messages[e]:void 0},Icegram.prototype.get_message_by_id=function(e){if(this.map_id_to_index.hasOwnProperty("_"+e)){var t=this.map_id_to_index["_"+e];return this.get_message(t)}return void 0},Icegram.prototype.get_messages_by_type=function(e){if(this.map_type_to_index.hasOwnProperty(e)){var t=this.map_type_to_index[e],i=[];if(jQuery.isArray(t)){var a=this;jQuery.each(t,function(e,t){i.push(a.get_message(t))})}return i}return void 0},Icegram.prototype.get_powered_by=function(e){var t=jQuery.extend({},this.powered_by);return t.link=t.link+(e||""),t},Icegram.prototype.track=function(e,t){"object"==typeof t&&t.hasOwnProperty("message_id")&&t.hasOwnProperty("campaign_id")&&(jQuery(window).trigger("track.icegram",[e,t]),this.tracking_data.push({type:e,params:t}))},Icegram.prototype.submit_tracking_data=function(e){if(this.tracking_data.length>0&&-1==window.location.href.indexOf("campaign_preview_id")){var t={type:"POST",url:this.data.ajax_url,async:e||!1,data:{action:"icegram_event_track",event_data:JSON.parse(JSON.stringify(this.tracking_data)),ig_remote_url:"remote"==this.mode?window.location.href:void 0},success:function(e,t,i){},error:function(e,t,i){}};"remote"==this.mode&&(t.xhrFields={withCredentials:!0},t.crossDomain=!0,t.async=!0),jQuery.ajax(t),this.tracking_data=[]}},Icegram_Message_Type.prototype.init=function(){this.render(),this.add_event_handlers()},Icegram_Message_Type.prototype.add_event_handlers=function(){this.el.on("click",{self:this},this.on_click),jQuery(window).on("resize",{self:this},this.on_resize)},Icegram_Message_Type.prototype.render=function(){this.pre_render();var e=this.render_template();try{jQuery(this.root_container).append(e)}catch(t){}this.dom_id="icegram_message_"+this.data.id,this.el=jQuery("#"+this.dom_id),this.set_position();var i=window.icegram.get_powered_by(this.type);if(i.hasOwnProperty("link")&&i.hasOwnProperty("text")&&""!=i.text&&this.add_powered_by(i),(void 0==this.data.headline||""==this.data.headline)&&this.el.find(".ig_headline").hide(),(void 0==this.data.icon||""==this.data.icon)&&this.el.find(".ig_icon").remove(),(void 0==this.data.message||""==this.data.message)&&this.el.find(".ig_message").hide(),(void 0==this.data.label||""==this.data.label)&&this.el.find(".ig_button").hide(),-1===jQuery.inArray(this.data.type,["toast","badge","ribbon","exit-redirect"])){var a=null,r=this.data.form_layout,o=this.data.form_has_label,s=this.data.form_style||"none",n=this.data.label||"Submit";if(s=s.toLowerCase().replace(" ","_"),void 0!=this.data.use_form&&"yes"==this.data.use_form&&(a=this.data.form_html),this.el.find("form.ig_embed_form").length>0){var _=this.el.find("form.ig_embed_form");r="inline",-1===jQuery.inArray(this.data.type,["messenger","tab","sidebar","interstitial","sticky"])&&(_.hasClass("ig_left")?r="left":_.hasClass("ig_right")&&(r="right")),"inline"==r&&this.el.find("form.ig_embed_form").replaceWith('<div class="ig_form_container layout_inline"></div>'),o=_.find(".ig_form_el_group label").length>0?"yes":void 0,0==_.find(".ig_button").length&&0==_.find("button[type=submit]").length&&_.append('<input class="ig_button" type="submit" value="'+n+'">'),a=jQuery("<div/>").append(_).html()}if(null==a)this.el.find(".ig_form_container").remove();else{var d=window.icegram.formProcess(this,a);if(d){var l=void 0!=this.data.form_header&&""!=this.data.form_header?'<div class="ig_form_header">'+this.data.form_header+"</div>":"",c=void 0!=this.data.form_footer&&""!=this.data.form_footer?'<div class="ig_form_footer">'+this.data.form_footer+"</div>":"";this.el.find(".ig_form_container").append(l).append(d).append(c),void 0==o?this.el.find(".ig_el_label").not("span.ig_el_label").remove():(this.el.find("input, textarea").removeAttr("placeholder"),this.el.find("select option.ig_el_placeholder").remove()),this.el.find(".ig_form_container .ig_button").length>0&&(this.el.find(".ig_button").not(".ig_form_container .ig_button").hide(),this.el.find(".ig_button").val(n)),this.el.addClass("ig_form_"+r);var p="";void 0!=this.data.form_bg_color&&""!=this.data.form_bg_color?(this.el.find(".ig_form_container").css("background-color",this.data.form_bg_color),p+=".ig_form_"+r+".ig_form_"+s+" .ig_form_container:before{ background-color:"+this.data.form_bg_color+"; border-color:"+this.data.form_bg_color+";}"):p+=".ig_form_"+r+".ig_form_"+s+" .ig_form_container:before{ display:none;}",void 0!=this.data.form_text_color&&""!=this.data.form_text_color&&this.el.find(".ig_form_container").css("color",this.data.form_text_color),"none"!=s&&this.el.addClass("ig_form_"+s).find(".ig_form_container").prepend('<style type="text/css">'+p+"</style>")}}}if(void 0==this.data.use_theme_defaults||"yes"!=this.data.use_theme_defaults){if(void 0!=this.data.text_color&&""!=this.data.text_color&&(this.el.css("color",this.data.text_color),this.el.find(".ig_container").css("color",this.data.text_color)),void 0!=this.data.bg_color&&""!=this.data.bg_color&&(this.el.css("background-color",this.data.bg_color),this.el.find(".ig_container").css("background-color",this.data.bg_color)),void 0!=this.data.cta_bg_color&&""!=this.data.cta_bg_color){this.el.find('.ig_button, form input[type="submit"]').css("background-color",this.data.cta_bg_color);var g=window.icegram.hexToHsl(this.data.cta_bg_color);this.el.find('.ig_button, form input[type="submit"]').css("border-color","hsl("+g.h+","+(g.s-5)+"%,"+(g.l-8)+"%)")}void 0!=this.data.cta_text_color&&""!=this.data.cta_text_color&&this.el.find('.ig_button, form input[type="submit"]').css("color",this.data.cta_text_color)}"string"==typeof this.data.link&&""!=this.data.link&&this.el.parent().find(".ig_cta, .ig_button").css("cursor","pointer"),this.post_render(),this.hide({},!0),this.set_up_show_trigger()},Icegram.prototype.formProcess=function(e,t){var i=jQuery("<div/>").html(t).find("input, label, select, textarea, button").not("br");if(i.length>0){var a=jQuery('<div class="ig_embed_form_container ig_clear_fix"></div>'),r=jQuery("<div/>").html(t).find("form").removeAttr("class").removeAttr("style").addClass("ig_clear_fix").empty(),o=".",s=0;jQuery.each(i,function(e,t){var i=jQuery(t),r=jQuery('<div class="ig_form_els"></div>');if(i.removeAttr("class").removeAttr("style"),(-1==i.attr("tabindex")||"hidden"==i.attr("type"))&&(i.addClass("ig_detected_bot_fields"),s--),i.is("label"))o=i.not("input, select, textarea, button, span, br").text().replace(/\s+/g," ")||".";else if((i.is("input")||i.is("button")||i.is("textarea")||i.is("select"))&&!i.is("input[type=radio]")){if(i.removeAttr("id"),i.is("button")){var n=i.not("br, span, div").text().trim()||"";i.remove(),i=jQuery('<input type="submit" value="'+n+'">')}(i.is("input[type=submit]")||i.is("input[type=button]"))&&i.addClass("ig_button"),label_class="ig_el_label ig_button_label","."!=o&&(label_class="ig_el_label",i.is("select")?jQuery('<option class="ig_el_placeholder">'+o+"</option>").prependTo(i):i.attr("placeholder",o)),jQuery('<label class="'+label_class+'">'+o+"</label>").appendTo(r),o=".",r.append(i),a.append(r),s++}else i.is("input[type=radio]")&&(label_class="ig_el_label ig_button_label","."!=o&&(label_class="ig_el_label"),jQuery('<label><span class="'+label_class+'">'+o+"</span></label>").prepend(i).appendTo(r),o=".",r.addClass("ig_form_el_radio"),a.append(r),s++)});var n=["","ig_full","ig_half","ig_third","ig_quater"];return s=4>s?s:4,a.addClass(n[s]).find(".ig_detected_bot_fields").parent().css("display","none"),r.append(a),jQuery("<div/>").append(r).html()}return null},Icegram_Message_Type.prototype.render_template=function(){return"function"!=typeof window.icegram.get_template_fn(this.type)&&window.icegram.set_template_fn(this.type,new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+this.template.replace(/[\r\t\n]/g," ").split("{{").join(" ").replace(/((^|\}\})[^\t]*)'/g,"$1\r").replace(/\t=(.*?)\}\}/g,"',$1,'").split(" ").join("');").split("}}").join("p.push('").split("\r").join("\\'")+"');}return p.join('');")),window.icegram.get_template_fn(this.type)(this.data)},Icegram_Message_Type.prototype.pre_render=function(){},Icegram_Message_Type.prototype.post_render=function(){},Icegram_Message_Type.prototype.set_up_show_trigger=function(){if(isNaN(this.data.delay_time))this.show();else if(this.data.delay_time>=0){var e=this;this.timer=setTimeout(function(){e.show()},1e3*this.data.delay_time)}},Icegram_Message_Type.prototype.set_template=function(e){this.template=e},Icegram_Message_Type.prototype.get_template_default=function(){return'<div id="icegram_message_{{=id}}" class="icegram"><div class="ig_headline">{{=headline}}</div></div>'},Icegram_Message_Type.prototype.show=function(e,t){this.is_visible()||(this.el.show(e),t!==!0&&this.track("shown"));var i=this;window.icegram.adjustFormContainerHeight(i)},Icegram_Message_Type.prototype.hide=function(e,t){this.is_visible()&&(this.el.hide(e),t!==!0&&this.track("closed"))},Icegram_Message_Type.prototype.set_position=function(){},Icegram_Message_Type.prototype.add_powered_by=function(e){},Icegram_Message_Type.prototype.track=function(e,t){"function"==typeof window.icegram.track&&(t=t||{},jQuery.extend(t,{message_id:this.data.id,campaign_id:this.data.campaign_id,expiry_time:this.data.expiry_time,expiry_time_clicked:this.data.expiry_time_clicked}),window.icegram.track(e,t))},Icegram_Message_Type.prototype.is_visible=function(){return this.el.is(":visible")},Icegram_Message_Type.prototype.toggle=function(e){this.is_visible()?this.hide(e):this.show(e)},Icegram_Message_Type.prototype.on_click=function(e){if(e.data=e.data||{self:this},jQuery(e.target).filter(".ig_close").length)return void e.data.self.hide();var t=jQuery(e.target).closest(".icegram").find("form:visible").first();(jQuery(e.target).filter(".ig_button, .ig_cta ,:submit").length||jQuery(e.target).parents(".ig_button, .ig_cta ").length&&!(t.find("ig_button").length>0||t.find("input[type=button]").length>0||t.find("input[type=submit]").length>0))&&e.data.self.on_cta_click(e)},Icegram_Message_Type.prototype.on_resize=function(e){},Icegram_Message_Type.prototype.on_cta_click=function(e){if(e.data=e.data||{self:this},e.data.self.track("clicked"),jQuery(e.target).closest(".icegram").find("form").length){var t=jQuery(e.target).closest(".icegram").find("form:visible").first();jQuery(t).submit()}else"string"==typeof e.data.self.data.link&&""!=e.data.self.data.link?window.location.href=e.data.self.data.link:e.data.self.data.hide!==!1&&e.data.self.hide()},String.prototype.ucwords=function(){return this.toLowerCase().replace(/\b[a-z]/g,function(e){return e.toUpperCase()})},Icegram.prototype.adjustFormContainerHeight=function(e){var t="";if(e.el.hasClass("ig_form_left")||e.el.hasClass("ig_form_right")){t=e.el.hasClass("ig_form_left")?"left":"right";var i=e.el.find(".ig_data").outerHeight()>e.el.find(".ig_form_container.layout_"+t).outerHeight()?e.el.find(".ig_data").outerHeight():e.el.find(".ig_form_container.layout_"+t).outerHeight();e.el.find(".ig_form_container").outerHeight(i)}if(e.el.hasClass("ig_form_bottom")||e.el.hasClass("ig_form_inline")){t=e.el.hasClass("ig_form_bottom")?"bottom":"inline";var i=e.el.find(".ig_form_container.layout_"+t+" .ig_button").innerHeight()>e.el.find(".ig_form_container input").first().outerHeight()?e.el.find(".ig_form_container.layout_"+t+" .ig_button").innerHeight():e.el.find(".ig_form_container input").first().outerHeight();e.el.find(".ig_form_container input, .ig_form_container select, .ig_form_container textarea").not(".ig_form_container.layout_"+t+" .ig_button, .ig_form_el_radio input").outerHeight(i)}},Icegram.prototype.hexToRgb=function(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},Icegram.prototype.rgbToHsl=function(e,t,i){e/=255,t/=255,i/=255;var a,r,o=Math.max(e,t,i),s=Math.min(e,t,i),n=(o+s)/2;if(o==s)a=r=0;else{var _=o-s;switch(r=n>.5?_/(2-o-s):_/(o+s),o){case e:a=(t-i)/_;break;case t:a=(i-e)/_+2;break;case i:a=(e-t)/_+4}n=Math.floor(100*n),r=Math.floor(100*r),a=Math.floor(60*a),0>a&&(a+=360)}return{h:a,s:r,l:n}},Icegram.prototype.hexToHsl=function(e){var t=window.icegram.hexToRgb(e);return window.icegram.rgbToHsl(t.r,t.g,t.b)},"function"!=typeof Object.create&&!function(){var e=function(){};Object.create=function(t){if(arguments.length>1)throw Error("Second argument not supported");if(null===t)throw Error("Cannot set a null [[Prototype]]");if("object"!=typeof t)throw TypeError("Argument must be an object");return e.prototype=t,new e}}(),void 0!==typeof jQuery.cookie&&!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof exports?require("jquery"):jQuery)}(function(e){function t(e){return n.raw?e:encodeURIComponent(e)}function i(e){return n.raw?e:decodeURIComponent(e)}function a(e){return t(n.json?JSON.stringify(e):String(e))}function r(e){0===e.indexOf('"')&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return e=decodeURIComponent(e.replace(s," ")),n.json?JSON.parse(e):e}catch(t){}}function o(t,i){var a=n.raw?t:r(t);return e.isFunction(i)?i(a):a}var s=/\+/g,n=e.cookie=function(r,s,_){if(void 0!==s&&!e.isFunction(s)){if(_=e.extend({},n.defaults,_),"number"==typeof _.expires){var d=_.expires,l=_.expires=new Date;l.setTime(+l+864e5*d)}return document.cookie=[t(r),"=",a(s),_.expires?"; expires="+_.expires.toUTCString():"",_.path?"; path="+_.path:"",_.domain?"; domain="+_.domain:"",_.secure?"; secure":""].join("")}for(var c=r?void 0:{},p=document.cookie?document.cookie.split("; "):[],g=0,h=p.length;h>g;g++){var f=p[g].split("="),m=i(f.shift()),u=f.join("=");if(r&&r===m){c=o(u,s);break}r||void 0===(u=o(u))||(c[m]=u)}return c};n.defaults={},e.removeCookie=function(t,i){return void 0===e.cookie(t)?!1:(e.cookie(t,"",e.extend({},i,{expires:-1})),!e.cookie(t))}});
|
1 |
+
function Icegram(){}function Icegram_Message_Type(e){var e;this.root_container="#icegram_messages_container",this.data=e,this.type=e.type,this.data.delay_time=parseInt(this.data.delay_time),"string"!=typeof this.data.link||""==this.data.link||/^tel:/i.test(this.data.link)||/^https?:\/\//i.test(this.data.link)||(this.data.link="http://"+this.data.link),this.set_template(this.get_template_default()),this.init()}Icegram.prototype.init=function(e){if(void 0!=e){jQuery(window).trigger("preinit.icegram",[e]),this.data=e,this.defaults=jQuery.extend({},e.defaults),this.message_data=e.messages,this.messages,this.tracking_data=[],this.message_template_cache={},this.map_id_to_index={},this.map_type_to_index={},this.mode=void 0==window.ig_mode?"local":window.ig_mode,this.powered_by={link:"http://www.icegram.com/?utm_source=inapp&utm_campaign=poweredby&utm_medium="},this.powered_by.text=this.defaults.powered_by_text,this.powered_by.logo=this.defaults.powered_by_logo,jQuery("body").append('<div id="icegram_messages_container"></div>');this.messages=[];var t=this;this.message_data.length>0&&jQuery.each(this.message_data,function(e,i){try{if(-1==window.location.href.indexOf("campaign_preview_id")){if("yes"==i.retargeting&&1==jQuery.cookie("icegram_campaign_shown_"+i.id))return;if("yes"==i.retargeting_clicked&&1==jQuery.cookie("icegram_campaign_clicked_"+i.id))return}var a=null,r=i.type.split("-").join(" ").ucwords().split(" ").join("_");a="function"==typeof window["Icegram_Message_Type_"+r]?new window["Icegram_Message_Type_"+r](i):new Icegram_Message_Type(i),t.messages.push(a),t.map_id_to_index["_"+i.id]=e,t.map_type_to_index[i.type]=jQuery.isArray(t.map_type_to_index[i.type])?t.map_type_to_index[i.type]:new Array,t.map_type_to_index[i.type].push(e)}catch(o){}}),jQuery(window).unload(function(){"function"==typeof window.icegram.submit_tracking_data&&window.icegram.submit_tracking_data(!1)}),setInterval(function(){"function"==typeof window.icegram.submit_tracking_data&&window.icegram.submit_tracking_data(!0)},5e3),jQuery(window).trigger("init.icegram",[this])}},Icegram.prototype.timer_tick=function(){},Icegram.prototype.get_template_fn=function(e){return this.message_template_cache[e]},Icegram.prototype.set_template_fn=function(e,t){this.message_template_cache[e]=t},Icegram.prototype.get_message=function(e){return this.messages.length>e?this.messages[e]:void 0},Icegram.prototype.get_message_by_id=function(e){if(this.map_id_to_index.hasOwnProperty("_"+e)){var t=this.map_id_to_index["_"+e];return this.get_message(t)}return void 0},Icegram.prototype.get_messages_by_type=function(e){if(this.map_type_to_index.hasOwnProperty(e)){var t=this.map_type_to_index[e],i=[];if(jQuery.isArray(t)){var a=this;jQuery.each(t,function(e,t){i.push(a.get_message(t))})}return i}return void 0},Icegram.prototype.get_powered_by=function(e){var t=jQuery.extend({},this.powered_by);return t.link=t.link+(e||""),t},Icegram.prototype.track=function(e,t){"object"==typeof t&&t.hasOwnProperty("message_id")&&t.hasOwnProperty("campaign_id")&&(jQuery(window).trigger("track.icegram",[e,t]),this.tracking_data.push({type:e,params:t}))},Icegram.prototype.submit_tracking_data=function(e){if(this.tracking_data.length>0&&-1==window.location.href.indexOf("campaign_preview_id")){var t={type:"POST",url:this.data.ajax_url,async:e||!1,data:{action:"icegram_event_track",event_data:JSON.parse(JSON.stringify(this.tracking_data)),ig_remote_url:"remote"==this.mode?window.location.href:void 0},success:function(e,t,i){},error:function(e,t,i){}};"remote"==this.mode&&(t.xhrFields={withCredentials:!0},t.crossDomain=!0,t.async=!0),jQuery.ajax(t),this.tracking_data=[]}},Icegram_Message_Type.prototype.init=function(){this.render(),this.add_event_handlers()},Icegram_Message_Type.prototype.add_event_handlers=function(){this.el.on("click",{self:this},this.on_click),jQuery(window).on("resize",{self:this},this.on_resize)},Icegram_Message_Type.prototype.render=function(){this.pre_render();var e=this.render_template();try{jQuery(this.root_container).append(e)}catch(t){}this.dom_id="icegram_message_"+this.data.id,this.el=jQuery("#"+this.dom_id),this.set_position();var i=window.icegram.get_powered_by(this.type);if(i.hasOwnProperty("link")&&i.hasOwnProperty("text")&&""!=i.text&&this.add_powered_by(i),(void 0==this.data.headline||""==this.data.headline)&&this.el.find(".ig_headline").hide(),(void 0==this.data.icon||""==this.data.icon)&&this.el.find(".ig_icon").remove(),(void 0==this.data.message||""==this.data.message)&&this.el.find(".ig_message").hide(),(void 0==this.data.label||""==this.data.label)&&this.el.find(".ig_button").hide(),-1===jQuery.inArray(this.data.type,["toast","badge","ribbon","exit-redirect"])){var a=null,r=this.data.form_layout,o=this.data.form_has_label,s=this.data.form_style||"none",n=this.data.label||"Submit";if(s=s.toLowerCase().replace(" ","_"),void 0!=this.data.use_form&&"yes"==this.data.use_form&&(a=this.data.form_html),this.el.find("form.ig_embed_form").length>0){var _=this.el.find("form.ig_embed_form");r="inline",-1===jQuery.inArray(this.data.type,["messenger","tab","sidebar","interstitial","sticky"])&&(_.hasClass("ig_left")?r="left":_.hasClass("ig_right")&&(r="right")),"inline"==r&&this.el.find("form.ig_embed_form").replaceWith('<div class="ig_form_container layout_inline"></div>'),o=_.find(".ig_form_el_group label").length>0?"yes":void 0,0==_.find(".ig_button").length&&0==_.find("button[type=submit]").length&&_.append('<input class="ig_button" type="submit" value="'+n+'">'),a=jQuery("<div/>").append(_).html()}if(null==a)this.el.find(".ig_form_container").remove();else{var d=window.icegram.formProcess(this,a);if(d){var l=void 0!=this.data.form_header&&""!=this.data.form_header?'<div class="ig_form_header">'+this.data.form_header+"</div>":"",c=void 0!=this.data.form_footer&&""!=this.data.form_footer?'<div class="ig_form_footer">'+this.data.form_footer+"</div>":"";this.el.find(".ig_form_container").append(l).append(d).append(c),void 0==o?this.el.find(".ig_el_label").not("span.ig_el_label").remove():(this.el.find("input, textarea").removeAttr("placeholder"),this.el.find("select option.ig_el_placeholder").remove()),this.el.find(".ig_form_container .ig_button").length>0&&(this.el.find(".ig_button").not(".ig_form_container .ig_button").hide(),this.el.find(".ig_button").val(n)),this.el.addClass("ig_form_"+r);var p="";void 0!=this.data.form_bg_color&&""!=this.data.form_bg_color?(this.el.find(".ig_form_container").css("background-color",this.data.form_bg_color),p+=".ig_form_"+r+".ig_form_"+s+" .ig_form_container:before{ background-color:"+this.data.form_bg_color+"; border-color:"+this.data.form_bg_color+";}"):p+=".ig_form_"+r+".ig_form_"+s+" .ig_form_container:before{ display:none;}",void 0!=this.data.form_text_color&&""!=this.data.form_text_color&&this.el.find(".ig_form_container").css("color",this.data.form_text_color),"none"!=s&&this.el.addClass("ig_form_"+s).find(".ig_form_container").prepend('<style type="text/css">'+p+"</style>")}}}if(void 0==this.data.use_theme_defaults||"yes"!=this.data.use_theme_defaults){if(void 0!=this.data.text_color&&""!=this.data.text_color&&(this.el.css("color",this.data.text_color),this.el.find(".ig_container").css("color",this.data.text_color)),void 0!=this.data.bg_color&&""!=this.data.bg_color&&(this.el.css("background-color",this.data.bg_color),this.el.find(".ig_container").css("background-color",this.data.bg_color)),void 0!=this.data.cta_bg_color&&""!=this.data.cta_bg_color){this.el.find('.ig_button, form input[type="submit"]').css("background-color",this.data.cta_bg_color);var g=window.icegram.hexToHsl(this.data.cta_bg_color);this.el.find('.ig_button, form input[type="submit"]').css("border-color","hsl("+g.h+","+(g.s-5)+"%,"+(g.l-8)+"%)")}void 0!=this.data.cta_text_color&&""!=this.data.cta_text_color&&this.el.find('.ig_button, form input[type="submit"]').css("color",this.data.cta_text_color)}"string"==typeof this.data.link&&""!=this.data.link&&this.el.parent().find(".ig_cta, .ig_button").css("cursor","pointer"),this.post_render(),this.hide({},!0),this.set_up_show_trigger()},Icegram.prototype.formProcess=function(e,t){var i=jQuery("<div/>").html(t).find("input, label, select, textarea, button").not("br");if(i.length>0){var a=jQuery('<div class="ig_embed_form_container ig_clear_fix"></div>'),r=jQuery("<div/>").html(t).find("form").removeAttr("class").removeAttr("style").addClass("ig_clear_fix").empty(),o=".",s=0;jQuery.each(i,function(e,t){var i=jQuery(t),r=jQuery('<div class="ig_form_els"></div>');if(i.removeAttr("class").removeAttr("style"),(-1==i.attr("tabindex")||"_mc4wp_required_but_not_really"==i.attr("name"))&&(i.addClass("ig_detected_bot_fields"),s--),"hidden"==i.attr("type")&&(i.addClass("ig_detected_hidden_fields"),s--),i.is("label"))o=i.not("input, select, textarea, button, span, br").text().replace(/\s+/g," ")||".";else if((i.is("input")||i.is("button")||i.is("textarea")||i.is("select"))&&!i.is("input[type=radio]")){if(i.removeAttr("id"),i.is("button")){var n=i.not("br, span, div").text().trim()||"";i.remove(),i=jQuery('<input type="submit" value="'+n+'">')}(i.is("input[type=submit]")||i.is("input[type=button]"))&&i.addClass("ig_button"),label_class="ig_el_label ig_button_label","."!=o&&(label_class="ig_el_label",i.is("select")?jQuery('<option class="ig_el_placeholder">'+o+"</option>").prependTo(i):i.attr("placeholder",o)),jQuery('<label class="'+label_class+'">'+o+"</label>").appendTo(r),o=".",r.append(i),a.append(r),s++}else i.is("input[type=radio]")&&(label_class="ig_el_label ig_button_label","."!=o&&(label_class="ig_el_label"),jQuery('<label><span class="'+label_class+'">'+o+"</span></label>").prepend(i).appendTo(r),o=".",r.addClass("ig_form_el_radio"),a.append(r),s++)});var n=["","ig_full","ig_half","ig_third","ig_quater"];return s=4>s?s:4,a.find(".ig_detected_bot_fields").length<=0&&a.append('<div class="ig_form_els"><input class="ig_detected_bot_fields" type="text" tabindex="-1"></input></div>'),a.addClass(n[s]).find(".ig_detected_bot_fields").parent().css({position:"absolute",left:"-5000px"}).end().end().find(".ig_detected_hidden_fields").parent().css({display:"none"}),r.append(a),jQuery("<div/>").append(r).html()}return null},Icegram_Message_Type.prototype.render_template=function(){return"function"!=typeof window.icegram.get_template_fn(this.type)&&window.icegram.set_template_fn(this.type,new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+this.template.replace(/[\r\t\n]/g," ").split("{{").join(" ").replace(/((^|\}\})[^\t]*)'/g,"$1\r").replace(/\t=(.*?)\}\}/g,"',$1,'").split(" ").join("');").split("}}").join("p.push('").split("\r").join("\\'")+"');}return p.join('');")),window.icegram.get_template_fn(this.type)(this.data)},Icegram_Message_Type.prototype.pre_render=function(){},Icegram_Message_Type.prototype.post_render=function(){},Icegram_Message_Type.prototype.set_up_show_trigger=function(){if(isNaN(this.data.delay_time))this.show();else if(this.data.delay_time>=0){var e=this;this.timer=setTimeout(function(){e.show()},1e3*this.data.delay_time)}},Icegram_Message_Type.prototype.set_template=function(e){this.template=e},Icegram_Message_Type.prototype.get_template_default=function(){return'<div id="icegram_message_{{=id}}" class="icegram"><div class="ig_headline">{{=headline}}</div></div>'},Icegram_Message_Type.prototype.show=function(e,t){this.is_visible()||(this.el.show(e),t!==!0&&this.track("shown"));var i=this;window.icegram.adjustFormContainerHeight(i)},Icegram_Message_Type.prototype.hide=function(e,t){this.is_visible()&&(this.el.hide(e),t!==!0&&this.track("closed"))},Icegram_Message_Type.prototype.set_position=function(){},Icegram_Message_Type.prototype.add_powered_by=function(e){},Icegram_Message_Type.prototype.track=function(e,t){"function"==typeof window.icegram.track&&(t=t||{},jQuery.extend(t,{message_id:this.data.id,campaign_id:this.data.campaign_id,expiry_time:this.data.expiry_time,expiry_time_clicked:this.data.expiry_time_clicked}),window.icegram.track(e,t))},Icegram_Message_Type.prototype.is_visible=function(){return this.el.is(":visible")},Icegram_Message_Type.prototype.toggle=function(e){this.is_visible()?this.hide(e):this.show(e)},Icegram_Message_Type.prototype.on_click=function(e){if(e.data=e.data||{self:this},jQuery(e.target).filter(".ig_close").length)return void e.data.self.hide();var t=jQuery(e.target).closest(".icegram").find("form:visible").first();(jQuery(e.target).filter(".ig_button, .ig_cta ,:submit").length||jQuery(e.target).parents(".ig_button, .ig_cta ").length&&!(t.find("ig_button").length>0||t.find("input[type=button]").length>0||t.find("input[type=submit]").length>0))&&e.data.self.on_cta_click(e)},Icegram_Message_Type.prototype.on_resize=function(e){},Icegram_Message_Type.prototype.on_cta_click=function(e){e.data=e.data||{self:this},e.data.self.track("clicked");var t=jQuery(e.target).closest(".icegram").find("form:visible").first();return""!==jQuery(t).find(".ig_detected_bot_fields").val()?(e.preventDefault(),void e.data.self.hide()):void(jQuery(t).length&&""===jQuery(t).find(".ig_detected_bot_fields").val()?jQuery(t).submit():"string"==typeof e.data.self.data.link&&""!=e.data.self.data.link?window.location.href=e.data.self.data.link:e.data.self.data.hide!==!1&&e.data.self.hide())},String.prototype.ucwords=function(){return this.toLowerCase().replace(/\b[a-z]/g,function(e){return e.toUpperCase()})},Icegram.prototype.adjustFormContainerHeight=function(e){var t="";if(e.el.hasClass("ig_form_left")||e.el.hasClass("ig_form_right")){t=e.el.hasClass("ig_form_left")?"left":"right";var i=e.el.find(".ig_data").outerHeight()>e.el.find(".ig_form_container.layout_"+t).outerHeight()?e.el.find(".ig_data").outerHeight():e.el.find(".ig_form_container.layout_"+t).outerHeight();e.el.find(".ig_form_container").outerHeight(i)}if(e.el.hasClass("ig_form_bottom")||e.el.hasClass("ig_form_inline")){t=e.el.hasClass("ig_form_bottom")?"bottom":"inline";var i=e.el.find(".ig_form_container.layout_"+t+" .ig_button").innerHeight()>e.el.find(".ig_form_container input").first().outerHeight()?e.el.find(".ig_form_container.layout_"+t+" .ig_button").innerHeight():e.el.find(".ig_form_container input").first().outerHeight();e.el.find(".ig_form_container input, .ig_form_container select, .ig_form_container textarea").not(".ig_form_container.layout_"+t+" .ig_button, .ig_form_el_radio input").outerHeight(i)}},Icegram.prototype.hexToRgb=function(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},Icegram.prototype.rgbToHsl=function(e,t,i){e/=255,t/=255,i/=255;var a,r,o=Math.max(e,t,i),s=Math.min(e,t,i),n=(o+s)/2;if(o==s)a=r=0;else{var _=o-s;switch(r=n>.5?_/(2-o-s):_/(o+s),o){case e:a=(t-i)/_;break;case t:a=(i-e)/_+2;break;case i:a=(e-t)/_+4}n=Math.floor(100*n),r=Math.floor(100*r),a=Math.floor(60*a),0>a&&(a+=360)}return{h:a,s:r,l:n}},Icegram.prototype.hexToHsl=function(e){var t=window.icegram.hexToRgb(e);return window.icegram.rgbToHsl(t.r,t.g,t.b)},"function"!=typeof Object.create&&!function(){var e=function(){};Object.create=function(t){if(arguments.length>1)throw Error("Second argument not supported");if(null===t)throw Error("Cannot set a null [[Prototype]]");if("object"!=typeof t)throw TypeError("Argument must be an object");return e.prototype=t,new e}}(),void 0!==typeof jQuery.cookie&&!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof exports?require("jquery"):jQuery)}(function(e){function t(e){return n.raw?e:encodeURIComponent(e)}function i(e){return n.raw?e:decodeURIComponent(e)}function a(e){return t(n.json?JSON.stringify(e):String(e))}function r(e){0===e.indexOf('"')&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return e=decodeURIComponent(e.replace(s," ")),n.json?JSON.parse(e):e}catch(t){}}function o(t,i){var a=n.raw?t:r(t);return e.isFunction(i)?i(a):a}var s=/\+/g,n=e.cookie=function(r,s,_){if(void 0!==s&&!e.isFunction(s)){if(_=e.extend({},n.defaults,_),"number"==typeof _.expires){var d=_.expires,l=_.expires=new Date;l.setTime(+l+864e5*d)}return document.cookie=[t(r),"=",a(s),_.expires?"; expires="+_.expires.toUTCString():"",_.path?"; path="+_.path:"",_.domain?"; domain="+_.domain:"",_.secure?"; secure":""].join("")}for(var c=r?void 0:{},p=document.cookie?document.cookie.split("; "):[],g=0,h=p.length;h>g;g++){var f=p[g].split("="),m=i(f.shift()),u=f.join("=");if(r&&r===m){c=o(u,s);break}r||void 0===(u=o(u))||(c[m]=u)}return c};n.defaults={},e.removeCookie=function(t,i){return void 0===e.cookie(t)?!1:(e.cookie(t,"",e.extend({},i,{expires:-1})),!e.cookie(t))}});
|
classes/class-icegram-campaign-admin.php
CHANGED
@@ -60,7 +60,7 @@ if ( !class_exists( 'Icegram_Campaign_Admin' ) ) {
|
|
60 |
$campaign_box .= '<option value="'.$message['type'].'">'.__( 'Create new', 'icegram' ).' '.$message['name'].' ...</option>';
|
61 |
}
|
62 |
$campaign_box .= '</select>';
|
63 |
-
$campaign_box .= '<div class="button button-primary campaign_preview"
|
64 |
|
65 |
$title = '<label class="options_header" for="icegram_messages"><strong>' . __( 'Message', 'icegram' ) . '</strong></label>';
|
66 |
?>
|
60 |
$campaign_box .= '<option value="'.$message['type'].'">'.__( 'Create new', 'icegram' ).' '.$message['name'].' ...</option>';
|
61 |
}
|
62 |
$campaign_box .= '</select>';
|
63 |
+
$campaign_box .= '<div class="button button-primary campaign_preview">' . __( 'Preview', 'icegram' ) . '</div>';
|
64 |
|
65 |
$title = '<label class="options_header" for="icegram_messages"><strong>' . __( 'Message', 'icegram' ) . '</strong></label>';
|
66 |
?>
|
classes/class-icegram-message-admin.php
CHANGED
@@ -226,13 +226,14 @@ if ( !class_exists( 'Icegram_Message_Admin' ) ) {
|
|
226 |
|
227 |
<div class="message_form_options" <?php echo $show_form_options; ?> message_id="<?php echo $message_id; ?>">
|
228 |
<p class="message_row <?php echo "ig_".implode( ' ig_', $settings['embed_form'] )?>">
|
|
|
|
|
229 |
<label for="message_form_style" class="message_label"> </label>
|
230 |
-
<
|
231 |
-
<label for="message_form_style" class="message_label"> </label>
|
232 |
-
<select id="message_form_style" name="message_data[<?php echo $message_id; ?>][form_style]" class="icegram_chosen_page message_form_style " value="<?php echo $message_data['form_style']?>">
|
233 |
<?php
|
234 |
$available_form_styles = $this->available_form_styles();
|
235 |
foreach ( $available_form_styles as $style ) {
|
|
|
236 |
$bg_img = "background-image: url(" . $icegram->plugin_url.'/assets/images/' . strtolower(str_replace( ' ', '_', $style['name'])) . ".png)";
|
237 |
?>
|
238 |
<option style="<?php echo $bg_img; ?>" <?php echo ( !empty( $message_data['form_style'] ) && strtolower(str_replace( ' ', '_', $style['name'])) == $message_data['form_style'] ) ? 'selected' : ''; ?> value="<?php echo esc_attr( strtolower(str_replace( ' ', '_', $style['name'])) ) ?>" class="<?php echo strtolower(str_replace( ' ', '_', $style['name'])) ?>" <?php echo ( !empty( $message_data['form_style'] ) && esc_attr( strtolower($style['name']) ) == $message_data['form_style'] ) ? 'selected' : ''; ?>><?php echo esc_html( $style['name'] ) ?></option>
|
@@ -243,7 +244,7 @@ if ( !class_exists( 'Icegram_Message_Admin' ) ) {
|
|
243 |
<p class="form_layouts message_row <?php echo "ig_".implode( ' ig_', $settings['embed_form'] )?>">
|
244 |
<label for="message_form_layouts" class="message_label"> </label>
|
245 |
<div class="form_radio_group" >
|
246 |
-
<span class="message_label message_row <?php echo "ig_".implode( ' ig_', $settings['embed_form'] )?>"> <?php _e('Position', 'icegram' ); ?></span>
|
247 |
<span class="location <?php if( !empty( $form_layouts['left'] ) ) { echo "ig_".implode( ' ig_', $form_layouts['left'] ); } ?>" >
|
248 |
<label style="background-position:0px 23px;" for="form_layout_left_<?php echo $message_id;?>" title="<?php _e('Left', 'icegram' ); ?>">
|
249 |
<input class="message_form_layout" type="radio" id="form_layout_left_<?php echo $message_id;?>" name="message_data[<?php echo $message_id; ?>][form_layout]" value="left" <?php echo ( !empty($message_data['form_layout']) && "left" == $message_data['form_layout'] ) ? 'checked' : ( empty($message_data['form_layout']) && "left" == $default_form_layout ? 'checked' : '') ; ?> />
|
@@ -282,18 +283,16 @@ if ( !class_exists( 'Icegram_Message_Admin' ) ) {
|
|
282 |
</label>
|
283 |
</span>
|
284 |
</div>
|
285 |
-
|
286 |
-
<?php echo __( 'You can insert <code>[ig_form]</code> wherever you want a form as inline in message body.', 'icegram' ); ?>
|
287 |
-
</div>
|
288 |
</p>
|
289 |
<?php
|
|
|
|
|
290 |
|
291 |
$color_field_html = '<p class="message_form_color message_row ig_"'.implode( ' ig_', $settings['embed_form'] ) .'" '. $show_color_options.'>
|
292 |
<label for="message_form_bg_color" class="message_label"> </label>
|
293 |
-
<
|
294 |
-
<
|
295 |
-
<input type="text" class="message_field color-field" data-color-label="'.__( 'Background', 'icegram' ).'" name="message_data['.$message_id.'][form_bg_color]" id="message_form_bg_color" value="'. $form_bg_color .'" />
|
296 |
-
<input type="text" class="message_field color-field" data-color-label="'.__( 'Text', 'icegram' ).'" name="message_data['.$message_id.'][form_text_color]" id="message_form_text_color" value="'.$form_text_color.'" style="margin-left:5em !important" />
|
297 |
</p>';
|
298 |
$color_field = apply_filters('icegram_color_fields' , array( 'html' => $color_field_html ,'message_id' => $message_id ,'message_data' => $message_data) );
|
299 |
|
@@ -301,8 +300,8 @@ if ( !class_exists( 'Icegram_Message_Admin' ) ) {
|
|
301 |
?>
|
302 |
|
303 |
<p class="message_row <?php echo "ig_".implode( ' ig_', $settings['embed_form'] )?>">
|
304 |
-
<label for="" class="message_label"> </label>
|
305 |
-
<span class="message_label"> <?php _e('Header', 'icegram' ); ?></span>
|
306 |
<label for="" class="message_label"> </label>
|
307 |
<textarea class="message_field message_form_header" rows="2" autocomplete="off" cols="65" name="message_data[<?php echo $message_id; ?>][form_header]" id="" value="" placeholder="<?php _e('Text / HTML to show before the form', 'icegram' ); ?>"><?php echo esc_attr( $form_header ); ?></textarea>
|
308 |
</p>
|
@@ -318,11 +317,15 @@ if ( !class_exists( 'Icegram_Message_Admin' ) ) {
|
|
318 |
</p>
|
319 |
|
320 |
<p class="message_row <?php echo "ig_".implode( ' ig_', $settings['embed_form'] )?>">
|
321 |
-
<label for="" class="message_label"> </label>
|
322 |
-
<span class="message_label"> <?php _e('Footer', 'icegram' ); ?></span>
|
323 |
<label for="" class="message_label"> </label>
|
324 |
<textarea class="message_field message_form_footer" rows="2" autocomplete="off" cols="65" name="message_data[<?php echo $message_id; ?>][form_footer]" id="" value="" placeholder="<?php _e('Text / HTML to show after the form', 'icegram' ); ?>"><?php echo esc_attr( $form_footer ); ?></textarea>
|
325 |
</p>
|
|
|
|
|
|
|
|
|
326 |
</div>
|
327 |
|
328 |
<!-- Embed Form options : End -->
|
@@ -588,6 +591,7 @@ if ( !class_exists( 'Icegram_Message_Admin' ) ) {
|
|
588 |
}
|
589 |
}
|
590 |
}
|
|
|
591 |
// return apply_filters( 'icegram_message_form_layouts_to_show', $form_layouts );
|
592 |
return $form_layouts;
|
593 |
|
@@ -641,7 +645,7 @@ if ( !class_exists( 'Icegram_Message_Admin' ) ) {
|
|
641 |
//TODO :: check this and do changes if required
|
642 |
function available_form_styles( ) {
|
643 |
$available_form_styles = array(
|
644 |
-
array('name' => '
|
645 |
array('name' => 'Style 1'),
|
646 |
array('name' => 'Style 2'),
|
647 |
array('name' => 'Style 3'),
|
226 |
|
227 |
<div class="message_form_options" <?php echo $show_form_options; ?> message_id="<?php echo $message_id; ?>">
|
228 |
<p class="message_row <?php echo "ig_".implode( ' ig_', $settings['embed_form'] )?>">
|
229 |
+
<!-- <label for="message_form_style" class="message_label"> </label> -->
|
230 |
+
<!-- <span class="message_label"> <?php //_e('Style', 'icegram' ); ?></span> -->
|
231 |
<label for="message_form_style" class="message_label"> </label>
|
232 |
+
<select id="message_form_style" name="message_data[<?php echo $message_id; ?>][form_style]" class="icegram_chosen_page message_form_style " >
|
|
|
|
|
233 |
<?php
|
234 |
$available_form_styles = $this->available_form_styles();
|
235 |
foreach ( $available_form_styles as $style ) {
|
236 |
+
// $bg_img = ($style['name'] !== 'None' ) ? "background-image: url(" . $icegram->plugin_url.'/assets/images/' . strtolower(str_replace( ' ', '_', $style['name'])) . ".png)" : "";
|
237 |
$bg_img = "background-image: url(" . $icegram->plugin_url.'/assets/images/' . strtolower(str_replace( ' ', '_', $style['name'])) . ".png)";
|
238 |
?>
|
239 |
<option style="<?php echo $bg_img; ?>" <?php echo ( !empty( $message_data['form_style'] ) && strtolower(str_replace( ' ', '_', $style['name'])) == $message_data['form_style'] ) ? 'selected' : ''; ?> value="<?php echo esc_attr( strtolower(str_replace( ' ', '_', $style['name'])) ) ?>" class="<?php echo strtolower(str_replace( ' ', '_', $style['name'])) ?>" <?php echo ( !empty( $message_data['form_style'] ) && esc_attr( strtolower($style['name']) ) == $message_data['form_style'] ) ? 'selected' : ''; ?>><?php echo esc_html( $style['name'] ) ?></option>
|
244 |
<p class="form_layouts message_row <?php echo "ig_".implode( ' ig_', $settings['embed_form'] )?>">
|
245 |
<label for="message_form_layouts" class="message_label"> </label>
|
246 |
<div class="form_radio_group" >
|
247 |
+
<!-- <span class="message_label message_row <?php //echo "ig_".implode( ' ig_', $settings['embed_form'] )?>"> <?php// _e('Position', 'icegram' ); ?></span> -->
|
248 |
<span class="location <?php if( !empty( $form_layouts['left'] ) ) { echo "ig_".implode( ' ig_', $form_layouts['left'] ); } ?>" >
|
249 |
<label style="background-position:0px 23px;" for="form_layout_left_<?php echo $message_id;?>" title="<?php _e('Left', 'icegram' ); ?>">
|
250 |
<input class="message_form_layout" type="radio" id="form_layout_left_<?php echo $message_id;?>" name="message_data[<?php echo $message_id; ?>][form_layout]" value="left" <?php echo ( !empty($message_data['form_layout']) && "left" == $message_data['form_layout'] ) ? 'checked' : ( empty($message_data['form_layout']) && "left" == $default_form_layout ? 'checked' : '') ; ?> />
|
283 |
</label>
|
284 |
</span>
|
285 |
</div>
|
286 |
+
|
|
|
|
|
287 |
</p>
|
288 |
<?php
|
289 |
+
// <label for="message_form_bg_color" class="message_label"> </label>
|
290 |
+
// <span class="message_label" > '.__( 'Color', 'icegram' ).'</span>
|
291 |
|
292 |
$color_field_html = '<p class="message_form_color message_row ig_"'.implode( ' ig_', $settings['embed_form'] ) .'" '. $show_color_options.'>
|
293 |
<label for="message_form_bg_color" class="message_label"> </label>
|
294 |
+
<input type="text" class="message_field color-field" data-color-label="'.__( 'Background Color', 'icegram' ).'" name="message_data['.$message_id.'][form_bg_color]" id="message_form_bg_color" value="'. $form_bg_color .'" />
|
295 |
+
<input type="text" class="message_field color-field" data-color-label="'.__( 'Text Color', 'icegram' ).'" name="message_data['.$message_id.'][form_text_color]" id="message_form_text_color" value="'.$form_text_color.'" style="margin-left:5em !important" />
|
|
|
|
|
296 |
</p>';
|
297 |
$color_field = apply_filters('icegram_color_fields' , array( 'html' => $color_field_html ,'message_id' => $message_id ,'message_data' => $message_data) );
|
298 |
|
300 |
?>
|
301 |
|
302 |
<p class="message_row <?php echo "ig_".implode( ' ig_', $settings['embed_form'] )?>">
|
303 |
+
<!-- <label for="" class="message_label"> </label> -->
|
304 |
+
<!-- <span class="message_label"> <?php //_e('Header', 'icegram' ); ?></span> -->
|
305 |
<label for="" class="message_label"> </label>
|
306 |
<textarea class="message_field message_form_header" rows="2" autocomplete="off" cols="65" name="message_data[<?php echo $message_id; ?>][form_header]" id="" value="" placeholder="<?php _e('Text / HTML to show before the form', 'icegram' ); ?>"><?php echo esc_attr( $form_header ); ?></textarea>
|
307 |
</p>
|
317 |
</p>
|
318 |
|
319 |
<p class="message_row <?php echo "ig_".implode( ' ig_', $settings['embed_form'] )?>">
|
320 |
+
<!-- <label for="" class="message_label"> </label> -->
|
321 |
+
<!-- <span class="message_label"> <?php //_e('Footer', 'icegram' ); ?></span> -->
|
322 |
<label for="" class="message_label"> </label>
|
323 |
<textarea class="message_field message_form_footer" rows="2" autocomplete="off" cols="65" name="message_data[<?php echo $message_id; ?>][form_footer]" id="" value="" placeholder="<?php _e('Text / HTML to show after the form', 'icegram' ); ?>"><?php echo esc_attr( $form_footer ); ?></textarea>
|
324 |
</p>
|
325 |
+
<div class="form_inline_shortcode campaign_shortcode light message_row <?php echo "ig_".implode( ' ig_', $settings['embed_form'] )?>" style="font-size:.9em;display:inline;">
|
326 |
+
<?php //echo __( 'You can insert <code>[ig_form]</code> wherever you want a form as inline in message body.', 'icegram' ); ?>
|
327 |
+
<?php echo __( 'Insert <code>[ig_form]</code> where you want to show this form in message body.', 'icegram' ); ?>
|
328 |
+
</div>
|
329 |
</div>
|
330 |
|
331 |
<!-- Embed Form options : End -->
|
591 |
}
|
592 |
}
|
593 |
}
|
594 |
+
|
595 |
// return apply_filters( 'icegram_message_form_layouts_to_show', $form_layouts );
|
596 |
return $form_layouts;
|
597 |
|
645 |
//TODO :: check this and do changes if required
|
646 |
function available_form_styles( ) {
|
647 |
$available_form_styles = array(
|
648 |
+
array('name' => 'Style 0'),
|
649 |
array('name' => 'Style 1'),
|
650 |
array('name' => 'Style 2'),
|
651 |
array('name' => 'Style 3'),
|
icegram.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Icegram
|
4 |
* Plugin URI: http://www.icegram.com/
|
5 |
* Description: All in one solution to inspire, convert and engage your audiences. Action bars, Popup windows, Messengers, Toast notifications and more. Awesome themes and powerful rules.
|
6 |
-
* Version: 1.9.
|
7 |
* Author: icegram
|
8 |
* Author URI: http://www.icegram.com/
|
9 |
*
|
@@ -35,7 +35,7 @@ class Icegram {
|
|
35 |
|
36 |
function __construct() {
|
37 |
|
38 |
-
$this->version = "1.9.
|
39 |
$this->shortcode_instances = array();
|
40 |
$this->mode = 'local';
|
41 |
$this->plugin_url = untrailingslashit( plugins_url( '/', __FILE__ ) );
|
@@ -43,7 +43,7 @@ class Icegram {
|
|
43 |
$this->include_classes();
|
44 |
$this->cache_compatibility = get_option('icegram_cache_compatibility', 'no');
|
45 |
|
46 |
-
if( is_admin() && current_user_can( '
|
47 |
$ig_campaign_admin = Icegram_Campaign_Admin::getInstance();
|
48 |
$ig_message_admin = Icegram_Message_Admin::getInstance();
|
49 |
add_action( 'admin_enqueue_scripts', array( &$this, 'enqueue_admin_styles_and_scripts' ) );
|
@@ -551,7 +551,7 @@ class Icegram {
|
|
551 |
$message_ids = array_merge($message_ids, $mids);
|
552 |
}
|
553 |
}
|
554 |
-
if( !empty( $_REQUEST['campaign_preview_id'] ) && current_user_can( '
|
555 |
$campaign_ids = array( $_REQUEST['campaign_preview_id'] );
|
556 |
$preview_mode = true;
|
557 |
}
|
@@ -578,18 +578,20 @@ class Icegram {
|
|
578 |
!empty( $message_data['retargeting'] ) &&
|
579 |
$message_data['retargeting'] == 'yes'
|
580 |
) {
|
581 |
-
if(!empty($_COOKIE['icegram_messages_shown_'.$message_data['id']]) || !empty($_COOKIE['icegram_campaign_shown_'.floor($message_data['campaign_id'])]))
|
582 |
unset( $messages[$key] );
|
583 |
continue;
|
|
|
584 |
}
|
585 |
if( !empty( $message_data['id'] ) &&
|
586 |
empty( $_GET['campaign_preview_id'] ) &&
|
587 |
!empty( $message_data['retargeting_clicked'] ) &&
|
588 |
$message_data['retargeting_clicked'] == 'yes'
|
589 |
) {
|
590 |
-
if(!empty($_COOKIE['icegram_messages_clicked_'.$message_data['id']]) || !empty($_COOKIE['icegram_campaign_clicked_'.floor($message_data['campaign_id'])]))
|
591 |
unset( $messages[$key] );
|
592 |
continue;
|
|
|
593 |
}
|
594 |
|
595 |
// Avoid showing the same message twice
|
@@ -687,6 +689,7 @@ class Icegram {
|
|
687 |
}
|
688 |
$content = $this->after_wpautop( wpautop( $this->before_wpautop( $content ) ) );
|
689 |
$content = do_shortcode( shortcode_unautop( $content ) );
|
|
|
690 |
$content = convert_chars( convert_smilies( wptexturize( $content ) ) );
|
691 |
$message_data['message'] = $content;
|
692 |
//do_shortcode in headline
|
3 |
* Plugin Name: Icegram
|
4 |
* Plugin URI: http://www.icegram.com/
|
5 |
* Description: All in one solution to inspire, convert and engage your audiences. Action bars, Popup windows, Messengers, Toast notifications and more. Awesome themes and powerful rules.
|
6 |
+
* Version: 1.9.2
|
7 |
* Author: icegram
|
8 |
* Author URI: http://www.icegram.com/
|
9 |
*
|
35 |
|
36 |
function __construct() {
|
37 |
|
38 |
+
$this->version = "1.9.2";
|
39 |
$this->shortcode_instances = array();
|
40 |
$this->mode = 'local';
|
41 |
$this->plugin_url = untrailingslashit( plugins_url( '/', __FILE__ ) );
|
43 |
$this->include_classes();
|
44 |
$this->cache_compatibility = get_option('icegram_cache_compatibility', 'no');
|
45 |
|
46 |
+
if( is_admin() && current_user_can( 'edit_posts' ) ) {
|
47 |
$ig_campaign_admin = Icegram_Campaign_Admin::getInstance();
|
48 |
$ig_message_admin = Icegram_Message_Admin::getInstance();
|
49 |
add_action( 'admin_enqueue_scripts', array( &$this, 'enqueue_admin_styles_and_scripts' ) );
|
551 |
$message_ids = array_merge($message_ids, $mids);
|
552 |
}
|
553 |
}
|
554 |
+
if( !empty( $_REQUEST['campaign_preview_id'] ) && current_user_can( 'edit_posts' ) ) {
|
555 |
$campaign_ids = array( $_REQUEST['campaign_preview_id'] );
|
556 |
$preview_mode = true;
|
557 |
}
|
578 |
!empty( $message_data['retargeting'] ) &&
|
579 |
$message_data['retargeting'] == 'yes'
|
580 |
) {
|
581 |
+
if(!empty($_COOKIE['icegram_messages_shown_'.$message_data['id']]) || !empty($_COOKIE['icegram_campaign_shown_'.floor($message_data['campaign_id'])])){
|
582 |
unset( $messages[$key] );
|
583 |
continue;
|
584 |
+
}
|
585 |
}
|
586 |
if( !empty( $message_data['id'] ) &&
|
587 |
empty( $_GET['campaign_preview_id'] ) &&
|
588 |
!empty( $message_data['retargeting_clicked'] ) &&
|
589 |
$message_data['retargeting_clicked'] == 'yes'
|
590 |
) {
|
591 |
+
if(!empty($_COOKIE['icegram_messages_clicked_'.$message_data['id']]) || !empty($_COOKIE['icegram_campaign_clicked_'.floor($message_data['campaign_id'])])){
|
592 |
unset( $messages[$key] );
|
593 |
continue;
|
594 |
+
}
|
595 |
}
|
596 |
|
597 |
// Avoid showing the same message twice
|
689 |
}
|
690 |
$content = $this->after_wpautop( wpautop( $this->before_wpautop( $content ) ) );
|
691 |
$content = do_shortcode( shortcode_unautop( $content ) );
|
692 |
+
|
693 |
$content = convert_chars( convert_smilies( wptexturize( $content ) ) );
|
694 |
$message_data['message'] = $content;
|
695 |
//do_shortcode in headline
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.icegram.com/
|
|
4 |
Tags: popup, window, hellobar, optin, lead capture, marketing, form, notification, messenger, targeting, monster, ninja ,wordpress lead generation, wordpress lightbox optin, wordpress lightbox optin form, wordpress lightbox optins, wordpress mobile optin forms, wordpress mobile popup, wordpress mobile popups, wordpress optin form, wordpress overlay popup, wordpress popup, wordpress popup form, wordpress popup plugin, wordpress popup solution, wordpress popups , popups, subscribe, wp popups, optin bars, action grabber, constant contact, toast notifications, leads, lists, builder, action bar, floating bar, footer bar, hellobar alternative, pop over, Popup plugin, aweber, campaign monitor, constant contact, email list, exit-intent, getresponse, analytics, Hubspot, icontact, infusionsoft, newsletter, Mailing list pop-up, retargeting, Responsive Popup, split testing, AB testing
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 4.1.2
|
7 |
-
Stable tag: 1.9.
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -153,6 +153,9 @@ Contact Us, provide as much detail of the problem as you can. We will try to sol
|
|
153 |
3. Editing an Icegram campaign - add multiple messages, edit them, targeting rules, full HTML editor, themes and more
|
154 |
|
155 |
== Upgrade Notice ==
|
|
|
|
|
|
|
156 |
= 1.9.1 =
|
157 |
Few improvements in form functionality.
|
158 |
|
@@ -224,6 +227,12 @@ Initial Release
|
|
224 |
|
225 |
|
226 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
227 |
= 1.9.1 =
|
228 |
* Update: Retargeting option now work for campaign instead of message
|
229 |
* Fix: Inline form shortcode not getting preserved in message body
|
4 |
Tags: popup, window, hellobar, optin, lead capture, marketing, form, notification, messenger, targeting, monster, ninja ,wordpress lead generation, wordpress lightbox optin, wordpress lightbox optin form, wordpress lightbox optins, wordpress mobile optin forms, wordpress mobile popup, wordpress mobile popups, wordpress optin form, wordpress overlay popup, wordpress popup, wordpress popup form, wordpress popup plugin, wordpress popup solution, wordpress popups , popups, subscribe, wp popups, optin bars, action grabber, constant contact, toast notifications, leads, lists, builder, action bar, floating bar, footer bar, hellobar alternative, pop over, Popup plugin, aweber, campaign monitor, constant contact, email list, exit-intent, getresponse, analytics, Hubspot, icontact, infusionsoft, newsletter, Mailing list pop-up, retargeting, Responsive Popup, split testing, AB testing
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 4.1.2
|
7 |
+
Stable tag: 1.9.2
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
153 |
3. Editing an Icegram campaign - add multiple messages, edit them, targeting rules, full HTML editor, themes and more
|
154 |
|
155 |
== Upgrade Notice ==
|
156 |
+
= 1.9.2 =
|
157 |
+
Shortcode problems solved. New anti-spam mechanism for forms.
|
158 |
+
|
159 |
= 1.9.1 =
|
160 |
Few improvements in form functionality.
|
161 |
|
227 |
|
228 |
|
229 |
== Changelog ==
|
230 |
+
= 1.9.2 =
|
231 |
+
* New: Keep spammers away with new automatic anti-spam bot checking mechanism
|
232 |
+
* Fix: Shortcodes not working in Icegram messages
|
233 |
+
* Fix: WordPress crash while creating a new post
|
234 |
+
* Update: UI improvements for form embedding
|
235 |
+
|
236 |
= 1.9.1 =
|
237 |
* Update: Retargeting option now work for campaign instead of message
|
238 |
* Fix: Inline form shortcode not getting preserved in message body
|