Version Description
Few improvements in form functionality.
Download this release
Release Info
Developer | Icegram |
Plugin | Popups, Welcome Bar, Optins and Lead Generation Plugin – Icegram |
Version | 1.9.1 |
Comparing to | |
See all releases |
Code changes from version 1.9 to 1.9.1
- assets/css/frontend.css +1 -1
- assets/js/admin.js +1 -1
- assets/js/icegram.js +1 -1
- classes/class-icegram-campaign-admin.php +2 -2
- classes/class-icegram-campaign.php +1 -0
- classes/class-icegram-message-admin.php +10 -9
- icegram.php +20 -16
- message-types/action-bar/themes/hello.css +1 -1
- message-types/popup/default.css +1 -1
- message-types/popup/main.php +2 -2
- readme.txt +15 -5
assets/css/frontend.css
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
/* Powered By link */
|
2 |
-
.ig_powered_by,.ig_powered_by a,a.ig_powered_by{color:#A8A8A8!important;text-decoration:none}.icegram .ig_button,.icegram input[type="submit"],.icegram input[type="button"]{border:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ig_message p{margin:.3em 0}div.icegram .ig_clear_fix:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}.ig_form_container{display:none;position:relative;height:100%;z-index:10;padding:1em;text-align:left;line-height:1.1;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ig_form_container .ig_form_header{width:98%;text-align:left}.ig_form_container .ig_form_footer{font-size:.8em;width:98%;clear:both;text-align:left}.ig_form_container .ig_form_els{margin:.
|
1 |
/* Powered By link */
|
2 |
+
.ig_powered_by,.ig_powered_by a,a.ig_powered_by{color:#A8A8A8!important;text-decoration:none}.icegram .ig_button,.icegram input[type="submit"],.icegram input[type="button"]{border:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ig_message p{margin:.3em 0}div.icegram .ig_clear_fix:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}.ig_form_container{display:none;position:relative;height:100%;z-index:10;padding:1em;text-align:left;line-height:1.1;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ig_form_container form{margin:0;padding:0}.ig_form_container .ig_form_header{width:98%;text-align:left}.ig_form_container .ig_form_footer{font-size:.8em;width:98%;clear:both;text-align:left}.ig_form_container .ig_form_els{margin:.3em .3em .3em 0}.ig_form_left .ig_form_container.layout_left{display:block}.ig_form_right .ig_form_container.layout_right{display:block;float:left}.ig_form_bottom .ig_form_container.layout_bottom{display:block;width:100%;height:auto}.ig_form_inline .ig_form_container.layout_inline{display:block;width:100%;padding:.6em;background-color:transparent!important;color:inherit!important}.ig_form_bottom .ig_form_container.layout_bottom .ig_embed_form_container,.ig_form_inline .ig_form_container.layout_inline .ig_embed_form_container{}.ig_form_left .ig_form_container.layout_left .ig_form_els,.ig_form_right .ig_form_container.layout_right .ig_form_els{margin:.5em auto}.ig_form_bottom .ig_form_container.layout_bottom .ig_form_els{display:inline-block}.ig_form_inline .ig_form_container.layout_inline .ig_form_els{display:inline-block}.ig_form_bottom .ig_form_container.layout_bottom .ig_full .ig_form_els,.ig_form_inline .ig_form_container.layout_inline .ig_full .ig_form_els{width:90%}.ig_form_bottom .ig_form_container.layout_bottom .ig_half .ig_form_els,.ig_form_inline .ig_form_container.layout_inline .ig_half .ig_form_els{width:45%}.ig_form_bottom .ig_form_container.layout_bottom .ig_third .ig_form_els,.ig_form_inline .ig_form_container.layout_inline .ig_third .ig_form_els{width:30%}.ig_form_bottom .ig_form_container.layout_bottom .ig_quater .ig_form_els,.ig_form_inline .ig_form_container.layout_inline .ig_quater .ig_form_els{width:22%}.ig_form_container .ig_form_els input,.ig_form_container .ig_form_els label,.ig_form_container .ig_form_els textarea,.ig_form_container .ig_form_els select{width:98%;text-align:left;display:block;margin:0 auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ig_form_container .ig_form_els.ig_form_el_radio input{width:auto;display:inline;margin-right:.3em}.ig_form_bottom .ig_form_container.layout_bottom .ig_quater .ig_form_els.ig_form_el_radio,.ig_form_inline .ig_form_container.layout_inline .ig_quater .ig_form_els.ig_form_el_radio{display:inline}.ig_form_bottom .ig_form_container.layout_bottom .ig_quater .ig_form_els.ig_form_el_radio label,.ig_form_inline .ig_form_container.layout_inline .ig_quater .ig_form_els.ig_form_el_radio label{width:auto;display:inline}.ig_form_left .ig_form_container.layout_left .ig_button_label,.ig_form_right .ig_form_container.layout_right .ig_button_label{display:none}.ig_form_inline .ig_form_container.layout_inline .ig_button_label,.ig_form_bottom .ig_form_container.layout_bottom .ig_button_label{display:block;visibility:hidden;opacity:0}.ig_form_inline .ig_form_container.layout_inline .ig_button,.ig_form_inline .ig_form_container.layout_inline input[type="submit"],.ig_form_inline .ig_form_container.layout_inline input[type="button"],.ig_form_bottom .ig_form_container.layout_bottom .ig_button,.ig_form_bottom .ig_form_container.layout_bottom input[type="submit"],.ig_form_bottom .ig_form_container.layout_bottom input[type="button"],.ig_form_left .ig_form_container.layout_left .ig_button,.ig_form_left .ig_form_container.layout_left input[type="submit"],.ig_form_left .ig_form_container.layout_left input[type="button"],.ig_form_right .ig_form_container.layout_right .ig_button,.ig_form_right .ig_form_container.layout_right input[type="submit"],.ig_form_right .ig_form_container.layout_right input[type="button"]{width:98%;font-size:1em;float:none;margin:0 auto!important;text-align:center;display:block;-ms-transform:inherit;-webkit-transform:inherit;transform:inherit}.ig_form_container:before{content:'';padding:0;margin:0;position:absolute}.ig_form_style_1 .ig_form_container:before{border-width:0;border-style:solid;border-color:#000!important;opacity:.3;top:0}.ig_form_left.ig_form_style_1 .ig_form_container:before{right:0;height:inherit;border-left-width:.22em}.ig_form_right.ig_form_style_1 .ig_form_container:before{left:0;height:inherit;border-left-width:.22em}.ig_form_bottom.ig_form_style_1 .ig_form_container:before{left:0;width:100%;border-top-width:.22em}.ig_form_inline.ig_form_style_1 .ig_form_container:before{display:none}.ig_form_style_1 .ig_form_container .ig_form_els input{height:2.5em!important;border:1px solid #ccc;-webkit-border-radius:.2em;-moz-border-radius:.2em;border-radius:.2em;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;padding:inherit;padding-left:.5em}.ig_form_style_1 .ig_form_container .ig_form_els input:focus,.ig_form_style_1 .ig_form_container .ig_form_els input:hover{border-color:#999;height:2.5em!important;padding:inherit;padding-left:.5em}.ig_form_style_1 .ig_form_container .ig_form_els .ig_button:hover,.ig_form_style_1 .ig_form_container .ig_form_els .ig_button:focus,.ig_form_style_1 .ig_form_container .ig_form_els .ig_button{height:2.5em!important;border:inherit;padding:inherit}.ig_form_bottom.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els,.ig_form_inline.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els{margin-right:0;margin-left:0}.ig_form_bottom.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els .ig_button,.ig_form_inline.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els .ig_button,.ig_form_left.ig_form_style_2 .ig_form_container.layout_left .ig_form_els .ig_button,.ig_form_right.ig_form_style_2 .ig_form_container.layout_right .ig_form_els .ig_button{padding:inherit}.ig_form_left.ig_form_style_2 .ig_form_container.layout_left .ig_form_els input,.ig_form_right.ig_form_style_2 .ig_form_container.layout_right .ig_form_els input{padding-left:1em}.ig_form_left.ig_form_style_2 .ig_form_container.layout_left .ig_form_els .ig_button,.ig_form_left.ig_form_style_2 .ig_form_container.layout_left .ig_form_els input,.ig_form_right.ig_form_style_2 .ig_form_container.layout_right .ig_form_els .ig_button,.ig_form_right.ig_form_style_2 .ig_form_container.layout_right .ig_form_els input{height:2.5em!important;-webkit-border-radius:2em;-moz-border-radius:2em;border-radius:2em}.ig_form_left.ig_form_style_2 .ig_form_container.layout_left .ig_form_els label,.ig_form_right.ig_form_style_2 .ig_form_container.layout_right .ig_form_els label{padding-left:1em}.ig_form_bottom.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els .ig_button,.ig_form_inline.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els .ig_button,.ig_form_bottom.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els input,.ig_form_inline.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els input{height:2.5em!important;width:100%;border-right-width:0}.ig_form_bottom.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els:first-child input,.ig_form_inline.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els:first-child input{-webkit-border-radius:2em 0 0 2em;-moz-border-radius:2em 0 0 2em;border-radius:2em 0 0 2em;padding-left:1em}.ig_form_bottom.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els:first-child label,.ig_form_inline.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els:first-child label{padding-left:1em}.ig_form_bottom.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els:last-child input,.ig_form_inline.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els:last-child input{-webkit-border-radius:0 2em 2em 0;-moz-border-radius:0 2em 2em 0;border-radius:0 2em 2em 0}.ig_form_style_3 .ig_form_container .ig_form_els input{height:2.5em!important;border:1px solid rgba(255,255,255,.3);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;padding:inherit;padding-left:.5em;background-color:rgba(0,0,0,.3);color:inherit}.ig_form_style_3 .ig_form_container .ig_form_els input:focus,.ig_form_style_3 .ig_form_container .ig_form_els input:hover{border-color:rgba(255,255,255,.6);height:2.5em!important;padding:inherit;padding-left:.5em}.ig_form_style_3 .ig_form_container .ig_form_els .ig_button:hover,.ig_form_style_3 .ig_form_container .ig_form_els .ig_button:focus,.ig_form_style_3 .ig_form_container .ig_form_els .ig_button{height:2.5em!important;border:inherit;padding:inherit}.ig_form_style_3 .ig_form_container .ig_form_els::-webkit-input-placeholder{color:rgba(255,255,255,.5)}.ig_form_style_3 .ig_form_container .ig_form_els:-moz-placeholder{color:rgba(255,255,255,.5);opacity:1}.ig_form_style_3 .ig_form_container .ig_form_els::-moz-placeholder{color:rgba(255,255,255,.5);opacity:1}.ig_form_style_3 .ig_form_container .ig_form_els:-ms-input-placeholder{color:rgba(255,255,255,.5)}.ig_form_style_4 .ig_form_container:before{border-style:solid;top:-1.2em;left:-1.3em;width:100%;height:100%;border-width:1.3em;z-index:-1;-moz-box-shadow:0 0 15px rgba(0,0,0,0.7);-webkit-box-shadow:0 0 15px rgba(0,0,0,0.7);box-shadow:0 0 15px rgba(0,0,0,0.7)}.ig_form_bottom.ig_form_style_4 .ig_form_container:before{top:0;border-bottom-width:0}.ig_form_right.ig_form_style_4 .ig_form_container:before{left:inherit;right:-1.3em}.ig_form_inline.ig_form_style_4 .ig_form_container:before{display:none}
|
assets/js/admin.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(function(){function e(e){var t=jQuery(e).find(".message_type option:selected").val(),a=jQuery(e).find(".message_row.ig_"+t).find(".message_theme").val(),i=jQuery(e).find("#message_theme_ig_"+t).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",i),"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,a,i){var r=Math.floor(Math.random()*(i-a+1))+a;return r==e?t(r,a,i):r}function a(){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 i(){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 a=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(),i(),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 a=jQuery(t.target).parents(".message-setting-fields");e(a)}),jQuery("#campaign_data, #message-settings").on("change",".message_theme",function(e){var t=jQuery(e.target).parents(".message-setting-fields"),a=jQuery(t).find(".message_type").val(),i=jQuery(t).find(".message_row.ig_"+a).find(".message_theme").val(),r=jQuery(t).find("#message_theme_ig_"+a).find("."+i).attr("style");jQuery(t).find(".message_row.ig_"+a).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=a},!1}),jQuery("#campaign_data ,#message-settings").on("click",".message_headline_button",function(){var e=jQuery(this).prev().attr("data-headline"),a=icegram_writepanel_params.available_headlines.length,i=t(e,0,a),r=icegram_writepanel_params.available_headlines[i];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(),i()}),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,a){t[e]=a}),t}),jQuery("#campaign_data").on("change",".show_form_options",function(e){var t=jQuery(this).closest("p");jQuery(t).siblings(".message_form_options").slideToggle(this.checked).find(".message_form_layout").change(),this.checked||jQuery(t).siblings("p.cta-actions").find("select option").removeAttr("disabled")}).change(),jQuery("#campaign_data, #message-settings").on("change",".message_form_style",function(e){var t=jQuery(e.target).parents(".message-setting-fields"),a=jQuery(t).find("#message_form_style").val(),i=jQuery(t).find("#message_form_style").find("."+a).attr("style");jQuery(t).find(".message_form_style").next().find(".chosen-single span").attr("style",i)}),jQuery("#campaign_data").on("change",".message_form_layout ",function(){if(jQuery(this).is(":visible")){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"),a=jQuery(t).val().trim().replace("[ig_form]","");jQuery(e).closest(".form_radio_group").siblings(".form_inline_shortcode").hide(),"inline"==jQuery(e).val()&&jQuery(e).is(":checked")&&jQuery(e).closest(".message_form_options").prev("p.message_form_options_check").find(".show_form_options").is(":checked")&&(a+="[ig_form]",jQuery(e).closest(".form_radio_group").siblings(".message_form_color, .form_inline_shortcode").toggle()),jQuery(t).val(a)}}),jQuery("#campaign_data").on("blur",".message_form_html_original",function(e){var t=this,a=jQuery("<div/>").html(jQuery(t).val()).find("input[type=submit], button, input[type=button]");if(jQuery(i).parent().find("p.cta-actions select option").removeAttr("disabled"),a.length>0){var i=jQuery(t).closest(".message_form_options"),r=jQuery(a[a.length-1]),n=r.is("button")?r.not("br, span, div").text():r.val();jQuery(i).siblings("p").find("#message_label").val(n.trim()),jQuery(i).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"),a=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}),i(),jQuery(".message-setting-fields").trigger("change"),jQuery(".tips, .help_tip").tipTip({attribute:"data-tip"}),"undefined"==typeof tinyMCEPreInit.mceInit["edit"+o.id]){for(_prop in a)"string"==typeof a[_prop]&&"content_css"!==_prop&&(a[_prop]=a[_prop].replace(new RegExp("content","g"),"edit"+o.id));tinyMCEPreInit.mceInit["edit"+o.id]=a}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=a();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"),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)}})});
|
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=_.hasClass("ig_left")?"left":_.hasClass("ig_right")?"right":"inline","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&&_.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_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))}});
|
classes/class-icegram-campaign-admin.php
CHANGED
@@ -354,7 +354,7 @@ if ( !class_exists( 'Icegram_Campaign_Admin' ) ) {
|
|
354 |
<label class="options_header"><?php _e( 'Retargeting', 'icegram' ); ?></label>
|
355 |
<label for="retargeting">
|
356 |
<input type="checkbox" name="campaign_target_rules[retargeting]" id="retargeting" value="yes" <?php ( !empty( $campaign_target_rules['retargeting'] ) ) ? checked( $campaign_target_rules['retargeting'], 'yes' ) : ''; ?> />
|
357 |
-
<?php _e( 'Once shown, do NOT show
|
358 |
<select name="campaign_target_rules[expiry_time]">
|
359 |
<?php foreach($expiry_options_for_shown as $key => $option){
|
360 |
?>
|
@@ -369,7 +369,7 @@ if ( !class_exists( 'Icegram_Campaign_Admin' ) ) {
|
|
369 |
<label class="options_header"> </label>
|
370 |
<label for="retargeting_clicked">
|
371 |
<input type="checkbox" name="campaign_target_rules[retargeting_clicked]" id="retargeting_clicked" value="yes" <?php ( !empty( $campaign_target_rules['retargeting_clicked'] ) ) ? checked( $campaign_target_rules['retargeting_clicked'], 'yes' ) : ''; ?> />
|
372 |
-
<?php _e( 'Once CTA is clicked, do NOT show
|
373 |
<select name="campaign_target_rules[expiry_time_clicked]">
|
374 |
<?php foreach($expiry_options_for_clicked as $key => $option){
|
375 |
?>
|
354 |
<label class="options_header"><?php _e( 'Retargeting', 'icegram' ); ?></label>
|
355 |
<label for="retargeting">
|
356 |
<input type="checkbox" name="campaign_target_rules[retargeting]" id="retargeting" value="yes" <?php ( !empty( $campaign_target_rules['retargeting'] ) ) ? checked( $campaign_target_rules['retargeting'], 'yes' ) : ''; ?> />
|
357 |
+
<?php _e( 'Once shown, do NOT show this campaign again for', 'icegram' ); ?>
|
358 |
<select name="campaign_target_rules[expiry_time]">
|
359 |
<?php foreach($expiry_options_for_shown as $key => $option){
|
360 |
?>
|
369 |
<label class="options_header"> </label>
|
370 |
<label for="retargeting_clicked">
|
371 |
<input type="checkbox" name="campaign_target_rules[retargeting_clicked]" id="retargeting_clicked" value="yes" <?php ( !empty( $campaign_target_rules['retargeting_clicked'] ) ) ? checked( $campaign_target_rules['retargeting_clicked'], 'yes' ) : ''; ?> />
|
372 |
+
<?php _e( 'Once CTA is clicked, do NOT show this campaign again for', 'icegram' ); ?>
|
373 |
<select name="campaign_target_rules[expiry_time_clicked]">
|
374 |
<?php foreach($expiry_options_for_clicked as $key => $option){
|
375 |
?>
|
classes/class-icegram-campaign.php
CHANGED
@@ -21,6 +21,7 @@ if ( !class_exists( 'Icegram_Campaign' ) ) {
|
|
21 |
//icegram_campaign_meta_key
|
22 |
$meta_key = apply_filters('icegram_campaign_meta_key' ,'messages' ,$this->_post->ID);
|
23 |
$this->messages = get_post_meta( $this->_post->ID, $meta_key, true );
|
|
|
24 |
$this->rules = get_post_meta( $this->_post->ID, 'icegram_campaign_target_rules', true );
|
25 |
$this->rules_summary['where'] = array(
|
26 |
'homepage' => ( !empty( $this->rules['homepage'] ) ) ? $this->rules['homepage'] : '',
|
21 |
//icegram_campaign_meta_key
|
22 |
$meta_key = apply_filters('icegram_campaign_meta_key' ,'messages' ,$this->_post->ID);
|
23 |
$this->messages = get_post_meta( $this->_post->ID, $meta_key, true );
|
24 |
+
|
25 |
$this->rules = get_post_meta( $this->_post->ID, 'icegram_campaign_target_rules', true );
|
26 |
$this->rules_summary['where'] = array(
|
27 |
'homepage' => ( !empty( $this->rules['homepage'] ) ) ? $this->rules['homepage'] : '',
|
classes/class-icegram-message-admin.php
CHANGED
@@ -11,7 +11,7 @@ if ( !class_exists( 'Icegram_Message_Admin' ) ) {
|
|
11 |
var $is_icegram_editor;
|
12 |
|
13 |
private function __construct() {
|
14 |
-
|
15 |
add_action( 'add_meta_boxes', array( &$this, 'add_message_meta_boxes' ) );
|
16 |
add_action( 'wp_ajax_get_message_setting', array( &$this , 'message_form_fields' ) );
|
17 |
|
@@ -204,6 +204,7 @@ if ( !class_exists( 'Icegram_Message_Admin' ) ) {
|
|
204 |
<!-- Embed Form options -->
|
205 |
|
206 |
<?php
|
|
|
207 |
$form_html = ( !empty( $message_data['form_html'] ) ) ? $message_data['form_html'] : '';
|
208 |
$form_html_original = ( !empty( $message_data['form_html_original'] ) ) ? $message_data['form_html_original'] : '';
|
209 |
$form_header = ( !empty( $message_data['form_header'] ) ) ? $message_data['form_header'] : '';
|
@@ -228,13 +229,13 @@ if ( !class_exists( 'Icegram_Message_Admin' ) ) {
|
|
228 |
<label for="message_form_style" class="message_label"> </label>
|
229 |
<span class="message_label"> <?php _e('Style', 'icegram' ); ?></span>
|
230 |
<label for="message_form_style" class="message_label"> </label>
|
231 |
-
<select id="message_form_style" name="message_data[<?php echo $message_id; ?>][form_style]" class="icegram_chosen_page message_form_style ">
|
232 |
<?php
|
233 |
$available_form_styles = $this->available_form_styles();
|
234 |
foreach ( $available_form_styles as $style ) {
|
235 |
$bg_img = "background-image: url(" . $icegram->plugin_url.'/assets/images/' . strtolower(str_replace( ' ', '_', $style['name'])) . ".png)";
|
236 |
?>
|
237 |
-
<option style="<?php echo $bg_img; ?>" 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>
|
238 |
<?php } ?>
|
239 |
</select>
|
240 |
</p>
|
@@ -264,12 +265,12 @@ if ( !class_exists( 'Icegram_Message_Admin' ) ) {
|
|
264 |
</label>
|
265 |
</span>
|
266 |
|
267 |
-
<span class="location <?php if( !empty( $form_layouts['top'] ) ) { echo "ig_".implode( ' ig_', $form_layouts['top'] ); } ?>">
|
268 |
-
<label for="form_layout_top_<?php echo $message_id;?>" title="<?php _e('Top', 'icegram' ); ?>">
|
269 |
-
<input class="message_form_layout" type="radio" id="form_layout_top_<?php echo $message_id;?>" name="message_data[<?php echo $message_id; ?>][form_layout]" value="top" <?php echo ( !empty( $message_data['form_layout'] ) && "top" == $message_data['form_layout'] ) ? 'checked' : ( empty($message_data['form_layout']) && "top" == $default_form_layout ? 'checked' : '') ; ?> />
|
270 |
-
|
271 |
</label>
|
272 |
-
</span>
|
273 |
<?php
|
274 |
$inline_position_checked = ( !empty( $message_data['form_layout'] ) && "inline" == $message_data['form_layout'] ) ? 'checked' : ( empty($message_data['form_layout']) && "inline" == $default_form_layout ? 'checked' : '') ;
|
275 |
$show_color_options = !empty( $inline_position_checked ) ? 'style="display:none;"' : '';
|
@@ -336,7 +337,7 @@ if ( !class_exists( 'Icegram_Message_Admin' ) ) {
|
|
336 |
$target_link_field = '<p class="message_row ig_'.implode( ' ig_', $settings['link'] ).'">
|
337 |
<label for="message_link" class="message_label">
|
338 |
<strong>'.__('Target Link' ,'icegram').'</strong>
|
339 |
-
<span class="help_tip admin_field_icon" data-tip='.__(
|
340 |
</label>
|
341 |
<input type="text" class="message_field" name="message_data['.$message_id.'][link]"
|
342 |
id="message_link" value="'.esc_attr( ( isset($message_data['link']) ? $message_data['link'] : '') ) .'" />
|
11 |
var $is_icegram_editor;
|
12 |
|
13 |
private function __construct() {
|
14 |
+
|
15 |
add_action( 'add_meta_boxes', array( &$this, 'add_message_meta_boxes' ) );
|
16 |
add_action( 'wp_ajax_get_message_setting', array( &$this , 'message_form_fields' ) );
|
17 |
|
204 |
<!-- Embed Form options -->
|
205 |
|
206 |
<?php
|
207 |
+
|
208 |
$form_html = ( !empty( $message_data['form_html'] ) ) ? $message_data['form_html'] : '';
|
209 |
$form_html_original = ( !empty( $message_data['form_html_original'] ) ) ? $message_data['form_html_original'] : '';
|
210 |
$form_header = ( !empty( $message_data['form_header'] ) ) ? $message_data['form_header'] : '';
|
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 " 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>
|
239 |
<?php } ?>
|
240 |
</select>
|
241 |
</p>
|
265 |
</label>
|
266 |
</span>
|
267 |
|
268 |
+
<!-- <span class="location <?php //if( !empty( $form_layouts['top'] ) ) { echo "ig_".implode( ' ig_', $form_layouts['top'] ); } ?>">
|
269 |
+
<label for="form_layout_top_<?php //echo $message_id;?>" title="<?php // _e('Top', 'icegram' ); ?>">
|
270 |
+
<input class="message_form_layout" type="radio" id="form_layout_top_<?php // echo $message_id;?>" name="message_data[<?php // echo $message_id; ?>][form_layout]" value="top" <?php //echo ( !empty( $message_data['form_layout'] ) && "top" == $message_data['form_layout'] ) ? 'checked' : ( empty($message_data['form_layout']) && "top" == $default_form_layout ? 'checked' : '') ; ?> />
|
271 |
+
<?//php _e('Top', 'icegram' ); ?>
|
272 |
</label>
|
273 |
+
</span> -->
|
274 |
<?php
|
275 |
$inline_position_checked = ( !empty( $message_data['form_layout'] ) && "inline" == $message_data['form_layout'] ) ? 'checked' : ( empty($message_data['form_layout']) && "inline" == $default_form_layout ? 'checked' : '') ;
|
276 |
$show_color_options = !empty( $inline_position_checked ) ? 'style="display:none;"' : '';
|
337 |
$target_link_field = '<p class="message_row ig_'.implode( ' ig_', $settings['link'] ).'">
|
338 |
<label for="message_link" class="message_label">
|
339 |
<strong>'.__('Target Link' ,'icegram').'</strong>
|
340 |
+
<span class="help_tip admin_field_icon" data-tip="'.__('Enter destination URL here. Clicking will redirect to this link.' ,'icegram').'"></span>
|
341 |
</label>
|
342 |
<input type="text" class="message_field" name="message_data['.$message_id.'][link]"
|
343 |
id="message_link" value="'.esc_attr( ( isset($message_data['link']) ? $message_data['link'] : '') ) .'" />
|
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' ) );
|
@@ -340,6 +340,7 @@ class Icegram {
|
|
340 |
if( !empty( $_POST['event_data'] ) ) {
|
341 |
|
342 |
foreach ( $_POST['event_data'] as $event ) {
|
|
|
343 |
switch ($event['type']) {
|
344 |
case 'shown':
|
345 |
if (is_array($event['params']) && !empty($event['params']['message_id'])) {
|
@@ -352,7 +353,8 @@ class Icegram {
|
|
352 |
}else{
|
353 |
$event['params']['expiry_time'] = strtotime($event['params']['expiry_time']);
|
354 |
}
|
355 |
-
setcookie('icegram_messages_shown_'.$event['params']['message_id'],true , $event['params']['expiry_time'] , '/');
|
|
|
356 |
}
|
357 |
}
|
358 |
break;
|
@@ -367,7 +369,8 @@ class Icegram {
|
|
367 |
}else{
|
368 |
$event['params']['expiry_time_clicked'] = strtotime($event['params']['expiry_time_clicked']);
|
369 |
}
|
370 |
-
setcookie('icegram_messages_clicked_'.$event['params']['message_id'],true , $event['params']['expiry_time_clicked'] , '/' );
|
|
|
371 |
}
|
372 |
}
|
373 |
break;
|
@@ -548,13 +551,14 @@ class Icegram {
|
|
548 |
$message_ids = array_merge($message_ids, $mids);
|
549 |
}
|
550 |
}
|
551 |
-
if( !empty( $_REQUEST['campaign_preview_id'] ) && current_user_can( '
|
552 |
$campaign_ids = array( $_REQUEST['campaign_preview_id'] );
|
553 |
$preview_mode = true;
|
554 |
}
|
|
|
555 |
|
556 |
$messages = $this->get_valid_messages( $message_ids, $campaign_ids, $preview_mode, $skip_others );
|
557 |
-
|
558 |
if( empty( $messages ) ) {
|
559 |
//wp_die(0);
|
560 |
return;
|
@@ -566,26 +570,26 @@ class Icegram {
|
|
566 |
if( !is_array( $message_data ) || empty( $message_data ) ) {
|
567 |
continue;
|
568 |
}
|
569 |
-
|
570 |
-
|
571 |
-
//
|
572 |
if( !empty( $message_data['id'] ) &&
|
573 |
empty( $_GET['campaign_preview_id'] ) &&
|
574 |
-
!empty($_COOKIE['icegram_messages_shown_'.$message_data['id']])&&
|
575 |
!empty( $message_data['retargeting'] ) &&
|
576 |
$message_data['retargeting'] == 'yes'
|
577 |
) {
|
578 |
-
|
579 |
-
|
|
|
580 |
}
|
581 |
if( !empty( $message_data['id'] ) &&
|
582 |
empty( $_GET['campaign_preview_id'] ) &&
|
583 |
-
!empty($_COOKIE['icegram_messages_clicked_'.$message_data['id']]) &&
|
584 |
!empty( $message_data['retargeting_clicked'] ) &&
|
585 |
$message_data['retargeting_clicked'] == 'yes'
|
586 |
) {
|
587 |
-
|
588 |
-
|
|
|
589 |
}
|
590 |
|
591 |
// Avoid showing the same message twice
|
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.1
|
7 |
* Author: icegram
|
8 |
* Author URI: http://www.icegram.com/
|
9 |
*
|
35 |
|
36 |
function __construct() {
|
37 |
|
38 |
+
$this->version = "1.9.1";
|
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_post' ) ) {
|
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' ) );
|
340 |
if( !empty( $_POST['event_data'] ) ) {
|
341 |
|
342 |
foreach ( $_POST['event_data'] as $event ) {
|
343 |
+
|
344 |
switch ($event['type']) {
|
345 |
case 'shown':
|
346 |
if (is_array($event['params']) && !empty($event['params']['message_id'])) {
|
353 |
}else{
|
354 |
$event['params']['expiry_time'] = strtotime($event['params']['expiry_time']);
|
355 |
}
|
356 |
+
//setcookie('icegram_messages_shown_'.$event['params']['message_id'],true , $event['params']['expiry_time'] , '/');
|
357 |
+
setcookie('icegram_campaign_shown_'.floor($event['params']['campaign_id']),true , $event['params']['expiry_time'] , '/');
|
358 |
}
|
359 |
}
|
360 |
break;
|
369 |
}else{
|
370 |
$event['params']['expiry_time_clicked'] = strtotime($event['params']['expiry_time_clicked']);
|
371 |
}
|
372 |
+
//setcookie('icegram_messages_clicked_'.$event['params']['message_id'],true , $event['params']['expiry_time_clicked'] , '/' );
|
373 |
+
setcookie('icegram_campaign_clicked_'.floor($event['params']['campaign_id']),true , $event['params']['expiry_time_clicked'] , '/' );
|
374 |
}
|
375 |
}
|
376 |
break;
|
551 |
$message_ids = array_merge($message_ids, $mids);
|
552 |
}
|
553 |
}
|
554 |
+
if( !empty( $_REQUEST['campaign_preview_id'] ) && current_user_can( 'edit_post' ) ) {
|
555 |
$campaign_ids = array( $_REQUEST['campaign_preview_id'] );
|
556 |
$preview_mode = true;
|
557 |
}
|
558 |
+
|
559 |
|
560 |
$messages = $this->get_valid_messages( $message_ids, $campaign_ids, $preview_mode, $skip_others );
|
561 |
+
|
562 |
if( empty( $messages ) ) {
|
563 |
//wp_die(0);
|
564 |
return;
|
570 |
if( !is_array( $message_data ) || empty( $message_data ) ) {
|
571 |
continue;
|
572 |
}
|
573 |
+
|
574 |
+
// Don't show a seen message again - if needed
|
575 |
+
// change to campaign targetting in v1.9.1
|
576 |
if( !empty( $message_data['id'] ) &&
|
577 |
empty( $_GET['campaign_preview_id'] ) &&
|
|
|
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
|
message-types/action-bar/themes/hello.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.ig_action_bar.ig_hello.ig_container{background-color:#EB5B31;color:hsl(0,100%,100%);line-height:1.5em}.ig_action_bar.ig_hello.ig_container.ig_top{border-bottom:3px solid #fff;-moz-box-shadow:0 -6px 16px 7px #000;-webkit-box-shadow:0 -6px 16px 7px #000;box-shadow:0 -6px 16px 7px #000}.ig_action_bar.ig_hello.ig_container.ig_bottom{border-top:3px solid #fff;-moz-box-shadow:0 8px 23px 7px #000;-webkit-box-shadow:0 8px 23px 7px #000;box-shadow:0 8px 23px 7px #000}.ig_action_bar.ig_hello .ig_content{padding:.5em;text-align:center}.ig_action_bar.ig_hello .ig_content p{margin:0;line-height:1.2em}.ig_action_bar.ig_hello .ig_data{text-align:center;display:inline-block}.ig_action_bar.ig_hello .ig_headline{display:inline-block;font-weight:bold;margin-right:1.5em}.ig_action_bar.ig_hello .ig_message{display:inline-block;margin-right:1.5em}.ig_action_bar.ig_hello .
|
1 |
+
.ig_action_bar.ig_hello.ig_container{background-color:#EB5B31;color:hsl(0,100%,100%);line-height:1.5em}.ig_action_bar.ig_hello.ig_container.ig_top{border-bottom:3px solid #fff;-moz-box-shadow:0 -6px 16px 7px #000;-webkit-box-shadow:0 -6px 16px 7px #000;box-shadow:0 -6px 16px 7px #000}.ig_action_bar.ig_hello.ig_container.ig_bottom{border-top:3px solid #fff;-moz-box-shadow:0 8px 23px 7px #000;-webkit-box-shadow:0 8px 23px 7px #000;box-shadow:0 8px 23px 7px #000}.ig_action_bar.ig_hello .ig_content{padding:.5em;text-align:center}.ig_action_bar.ig_hello .ig_content p{margin:0;line-height:1.2em}.ig_action_bar.ig_hello .ig_data{text-align:center;display:inline-block}.ig_action_bar.ig_hello .ig_headline{display:inline-block;font-weight:bold;margin-right:1.5em}.ig_action_bar.ig_hello .ig_message{display:inline-block;margin-right:1.5em}.ig_action_bar.ig_hello .ig_button,.ig_action_bar.ig_hello input[type="submit"],.ig_action_bar.ig_hello input[type="button"]{display:inline-block;background-color:#4A4844;background-image:-moz-linear-gradient(top,transparent 0%,rgba(51,51,51,0.4) 100%);background-image:-o-linear-gradient(top,transparent 0%,rgba(51,51,51,0.4) 100%);background-image:-webkit-linear-gradient(top,transparent 0%,rgba(51,51,51,0.4) 100%);background-image:linear-gradient(top,transparent 0%,rgba(51,51,51,0.4) 100%);-moz-box-shadow:1px 1px 3px rgba(0,0,0,0.28);-webkit-box-shadow:1px 1px 3px rgba(0,0,0,0.28);box-shadow:1px 1px 3px rgba(0,0,0,0.28);color:#FFF;font-weight:400;text-align:center;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;text-decoration:none;font-size:1em;padding:.25em 1em;float:none;margin:0 0 .8em 0!important}.ig_action_bar.ig_hello .ig_button:hover,.ig_action_bar.ig_hello input[type="submit"]:hover,.ig_action_bar.ig_hello input[type="button"]:hover{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";filter:alpha(opacity=80);opacity:0.8}.ig_action_bar.ig_hello .ig_arrow_block.ig_border{background-color:#EB5B31;border:3px solid #fff;border-top-width:0;-moz-box-shadow:0 0 7px rgba(0,0,0,0.35);-webkit-box-shadow:0 0 7px rgba(0,0,0,0.35);box-shadow:0 0 7px rgba(0,0,0,0.35);-moz-border-radius:0 0 7px 7px;-webkit-border-radius:0 0 7px 7px;border-radius:0 0 7px 7px}.ig_action_bar.ig_hello .ig_powered_by{margin-top:0;height:32px}.ig_action_bar.ig_hello .ig_powered_by img{width:24px;width:1.5em!important;margin-left:1em!important;margin-top:.4em!important}.ig_action_bar.ig_form_inline.ig_hello .ig_form_container.layout_inline .ig_form_header,.ig_action_bar.ig_form_bottom.ig_hello .ig_form_container.layout_bottom .ig_form_header,.ig_action_bar.ig_form_inline.ig_hello .ig_form_container.layout_inline .ig_form_footer,.ig_action_bar.ig_form_bottom.ig_hello .ig_form_container.layout_bottom .ig_form_footer,.ig_action_bar.ig_form_bottom.ig_hello .ig_form_container.layout_bottom .ig_embed_form_container,.ig_action_bar.ig_form_inline.ig_hello .ig_form_container.layout_inline .ig_embed_form_container{text-align:center}.ig_form_bottom .ig_form_container.layout_bottom .ig_embed_form_container,.ig_form_inline .ig_form_container.layout_inline .ig_embed_form_container.ig_action_bar.ig_form_inline.ig_hello .ig_data{width:auto!important;padding:.3em 3em .3em 3em}.ig_action_bar.ig_form_inline.ig_hello .ig_data{padding-top:0;padding-bottom:0}.ig_action_bar.ig_form_inline.ig_hello .ig_message{vertical-align:middle}.ig_action_bar.ig_form_inline.ig_hello .ig_headline{line-height:2em;vertical-align:middle;padding:.5em 0;margin-right:.5em}
|
message-types/popup/default.css
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
/* Magnific popup css */
|
2 |
-
.mfp-bg{top:0;left:0;width:100%;height:100%;z-index:1042;overflow:hidden;position:fixed;background:#0b0b0b;opacity:.8;filter:alpha(opacity=80)}.mfp-wrap{top:0;left:0;width:100%;height:100%;z-index:999999;position:fixed;outline:0!important;-webkit-backface-visibility:hidden}.mfp-container{text-align:center;position:absolute;width:100%;height:100%;left:0;top:0;padding:0 8px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.mfp-container:before{content:'';display:inline-block;height:100%;vertical-align:middle}.mfp-align-top .mfp-container:before{display:none}.mfp-content{position:relative;display:inline-block;vertical-align:middle;margin:0 auto;text-align:left;z-index:1045}.mfp-ajax-holder .mfp-content,.mfp-inline-holder .mfp-content{width:100%;cursor:auto}.mfp-ajax-cur{cursor:progress}.mfp-zoom-out-cur,.mfp-zoom-out-cur .mfp-image-holder .mfp-close{cursor:-moz-zoom-out;cursor:-webkit-zoom-out;cursor:zoom-out}.mfp-zoom{cursor:pointer;cursor:-webkit-zoom-in;cursor:-moz-zoom-in;cursor:zoom-in}.mfp-auto-cursor .mfp-content{cursor:auto}.mfp-arrow,.mfp-close,.mfp-counter,.mfp-preloader{-webkit-user-select:none;-moz-user-select:none;user-select:none}.mfp-loading.mfp-figure{display:none}.mfp-hide{display:none!important}.mfp-preloader{color:#CCC;position:absolute;top:50%;width:auto;text-align:center;margin-top:-.8em;left:8px;right:8px;z-index:1044}.mfp-preloader a{color:#CCC}.mfp-preloader a:hover{color:#FFF}.mfp-s-error .mfp-content,.mfp-s-ready .mfp-preloader{display:none}button.mfp-arrow,button.mfp-close{overflow:visible;cursor:pointer;background:0 0;border:0;-webkit-appearance:none;display:block;outline:0;padding:0;z-index:1046;-webkit-box-shadow:none;box-shadow:none}button::-moz-focus-inner{padding:0;border:0}.mfp-close{width:44px;height:44px;line-height:44px;position:absolute;right:0;top:0;text-decoration:none;text-align:center;opacity:.65;filter:alpha(opacity=65);padding:0 0 18px 10px;color:#FFF;font-style:normal;font-size:28px;font-family:Arial,Baskerville,monospace}.mfp-close:focus,.mfp-close:hover{opacity:1;filter:alpha(opacity=100)}.mfp-close:active{top:1px}.mfp-close-btn-in .mfp-close{color:#333}.mfp-iframe-holder .mfp-close,.mfp-image-holder .mfp-close{color:#FFF;right:-6px;text-align:right;padding-right:6px;width:100%}.mfp-counter{position:absolute;top:0;right:0;color:#CCC;font-size:12px;line-height:18px;white-space:nowrap}.mfp-arrow{position:absolute;opacity:.65;filter:alpha(opacity=65);margin:-55px 0 0;top:50%;padding:0;width:90px;height:110px;-webkit-tap-highlight-color:transparent}.mfp-arrow:active{margin-top:-54px}.mfp-arrow:focus,.mfp-arrow:hover{opacity:1;filter:alpha(opacity=100)}.mfp-arrow .mfp-a,.mfp-arrow .mfp-b,.mfp-arrow:after,.mfp-arrow:before{content:'';display:block;width:0;height:0;position:absolute;left:0;top:0;margin-top:35px;margin-left:35px;border:inset transparent}.mfp-arrow .mfp-a,.mfp-arrow:after{border-top-width:13px;border-bottom-width:13px;top:8px}.mfp-arrow .mfp-b,.mfp-arrow:before{border-top-width:21px;border-bottom-width:21px;opacity:.7}.mfp-arrow-left{left:0}.mfp-arrow-left .mfp-a,.mfp-arrow-left:after{border-right:17px solid #FFF;margin-left:31px}.mfp-arrow-left .mfp-b,.mfp-arrow-left:before{margin-left:25px;border-right:27px solid #3F3F3F}.mfp-arrow-right{right:0}.mfp-arrow-right .mfp-a,.mfp-arrow-right:after{border-left:17px solid #FFF;margin-left:39px}.mfp-arrow-right .mfp-b,.mfp-arrow-right:before{border-left:27px solid #3F3F3F}.mfp-iframe-holder{padding-top:40px;padding-bottom:40px}.mfp-iframe-holder .mfp-content{line-height:0;width:100%;max-width:900px}.mfp-iframe-holder .mfp-close{top:-40px}.mfp-iframe-scaler{width:100%;height:0;overflow:hidden;padding-top:56.25%}.mfp-iframe-scaler iframe{position:absolute;display:block;top:0;left:0;width:100%;height:100%;box-shadow:0 0 8px rgba(0,0,0,.6);background:#000}img.mfp-img{width:auto;max-width:100%;height:auto;display:block;line-height:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:40px 0;margin:0 auto}.mfp-figure{line-height:0}.mfp-figure:after{content:'';position:absolute;left:0;top:40px;bottom:40px;display:block;right:0;width:auto;height:auto;z-index:-1;box-shadow:0 0 8px rgba(0,0,0,.6);background:#444}.mfp-figure small{color:#BDBDBD;display:block;font-size:12px;line-height:14px}.mfp-figure figure{margin:0}.mfp-bottom-bar{margin-top:-36px;position:absolute;top:100%;left:0;width:100%;cursor:auto}.mfp-title{text-align:left;line-height:18px;color:#F3F3F3;word-wrap:break-word;padding-right:36px}.mfp-image-holder .mfp-content{max-width:100%}.mfp-gallery .mfp-image-holder .mfp-figure{cursor:pointer}@media screen and (max-width:800px) and (orientation:landscape),screen and (max-height:300px){.mfp-img-mobile .mfp-image-holder{padding-left:0;padding-right:0}.mfp-img-mobile img.mfp-img{padding:0}.mfp-img-mobile .mfp-figure:after{top:0;bottom:0}.mfp-img-mobile .mfp-figure small{display:inline;margin-left:5px}.mfp-img-mobile .mfp-bottom-bar{background:rgba(0,0,0,.6);bottom:0;margin:0;top:auto;padding:3px 5px;position:fixed;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.mfp-img-mobile .mfp-bottom-bar:empty{padding:0}.mfp-img-mobile .mfp-counter{right:5px;top:3px}.mfp-img-mobile .mfp-close{top:0;right:0;width:35px;height:35px;line-height:35px;background:rgba(0,0,0,.6);position:fixed;text-align:center;padding:0}}@media all and (max-width:900px){.mfp-arrow{-webkit-transform:scale(.75);transform:scale(.75)}.mfp-arrow-left{-webkit-transform-origin:0;transform-origin:0}.mfp-arrow-right{-webkit-transform-origin:100%;transform-origin:100%}.mfp-container{padding-left:6px;padding-right:6px}}.mfp-ie7 .mfp-img{padding:0}.mfp-ie7 .mfp-bottom-bar{width:600px;left:50%;margin-left:-300px;margin-top:5px;padding-bottom:5px}.mfp-ie7 .mfp-container{padding:0}.mfp-ie7 .mfp-content{padding-top:44px}.mfp-ie7 .mfp-close{top:0;right:0;padding-top:0}.ig_popup{opacity:1;display:block;z-index:100000;background-color:transparent!important;color:transparent!important;width:60%;margin:32px auto 20px auto!important}.ig_popup .ig_container{position:relative}.ig_popup .ig_container,.ig_popup .ig_container .ig_content{background-color:transparent}.ig_popup .ig_container .ig_bg_overlay{background-color:transparent;width:100%;height:100%;top:0;left:0;margin:0;padding:0;position:absolute;display:none}.ig_popup .ig_headline{text-decoration:none;font-weight:800;font-size:2em;line-height:1.2em}.ig_popup .ig_data{position:relative}.ig_popup .ig_image{margin:0 1em}.ig_popup .ig_message{line-height:1.2em;font-size:1.2em}.ig_popup .ig_close{background-image:url(../popup/images/popup-close.png);background-repeat:no-repeat;background-position:left bottom;height:32px;width:30px;cursor:pointer;-webkit-background-size:100%;background-size:100%;float:right;margin:-2em -1em 0 0;top:1em;position:relative;z-index:20}.ig_popup .ig_close:hover{height:32px;width:30px;background-position:left top}.ig_popup .ig_button,.ig_popup input[type="submit"],.ig_popup input[type="button"]{cursor:pointer;display:block;border-bottom:none;background-image:none;position:relative}.ig_popup .ig_button:hover,.ig_popup input[type="submit"]:hover,.ig_popup input[type="button"]:hover{}.ig_popup .ig_button:active,.ig_popup input[type="submit"]:active,.ig_popup input[type="button"]:active{}.mfp-wrap .ig_powered_by{position:fixed;bottom:1em;left:1em;font-size:14px;padding:0.1em}@media only screen and (max-device-width:319px){.ig_popup{width:90%;top:3%!important;margin:5px auto!important;font-size:8px}.ig_popup .ig_button,.ig_popup input[type="submit"],.ig_popup input[type="button"]{width:90%!important}}@media only screen and (min-device-width:320px) and (max-device-width:359px){.ig_popup{width:85%;top:5%!important;margin:10px auto!important;font-size:10px}.ig_popup .ig_button,.ig_popup input[type="submit"],.ig_popup input[type="button"]{width:90%!important}}@media only screen and (min-device-width:360px) and (max-device-width:413px){.ig_popup{width:85%;top:5%!important;margin:10px auto!important;font-size:12px}.ig_popup .ig_button,.ig_popup input[type="submit"],.ig_popup input[type="button"]{width:90%!important}}@media only screen and (min-device-width:414px) and (max-device-width:643px){.ig_popup{width:85%;top:5%!important;margin:10px auto!important;font-size:13px}.ig_popup .ig_button,.ig_popup input[type="submit"],.ig_popup input[type="button"]{width:90%!important}}@media only screen and (min-device-width:644px) and (max-device-width:767px) and (orientation:portrait){.ig_popup{top:5%!important;margin:10px auto!important;font-size:14px}}@media only screen and (min-device-width:644px) and (max-device-width:767px) and (orientation:landscape){.ig_popup{top:5%!important;margin:10px auto!important;font-size:11px}}@media only screen and (min-width:768px) and (max-device-width:992px){.ig_popup{top:5%!important;margin:10px auto!important;font-size:14px}}.ig_popup .ig_form_container{width:30%;float:left;padding-top:2em}.ig_popup.ig_form_left .ig_data{position:relative}.ig_popup.ig_form_left .ig_data,.ig_popup.ig_form_right .ig_data{width:70%;float:left}.ig_popup.ig_form_right.ig_form_style_4 .ig_close,.ig_popup.ig_form_right.ig_form_style_4 .ig_close:hover{margin:-4em -2em 0 0;top:2em}@media only screen and (max-device-width:319px),(min-device-width:320px) and (max-device-width:359px),(min-device-width:360px) and (max-device-width:413px),(min-device-width:414px) and (max-device-width:643px),(min-device-width:644px) and (max-device-width:767px) and (orientation:portrait),(min-device-width:644px) and (max-device-width:767px) and (orientation:landscape),(min-width:768px) and (max-device-width:992px){.ig_popup.ig_form_left .ig_form_container.layout_left,.ig_popup.ig_form_right .ig_form_container.layout_right{display:none}.ig_popup.ig_form_left .ig_form_container.layout_bottom,.ig_popup.ig_form_right .ig_form_container.layout_bottom,.ig_popup.ig_form_bottom .ig_form_container.layout_bottom{display:block;width:100%;font-size:1.5em;height:auto!important}.ig_popup.ig_form_inline .ig_form_container.layout_inline{padding:.6em 0}.ig_popup.ig_form_left .ig_data,.ig_popup.ig_form_right .ig_data{width:100%}.ig_popup .ig_form_container.layout_bottom .ig_full .ig_form_els,.ig_popup .ig_form_container.layout_inline .ig_full .ig_form_els,.ig_popup .ig_form_container.layout_bottom .ig_half .ig_form_els,.ig_popup .ig_form_container.layout_inline .ig_half .ig_form_els,.ig_popup .ig_form_container.layout_bottom .ig_third .ig_form_els,.ig_popup .ig_form_container.layout_inline .ig_third .ig_form_els,.ig_popup .ig_form_container.layout_bottom .ig_quater .ig_form_els,.ig_popup .ig_form_container.layout_inline .ig_quater .ig_form_els{width:98%;margin:.5em auto 0 auto}.ig_popup .ig_form_container.layout_inline .ig_button_label,.ig_popup .ig_form_container.layout_bottom .ig_button_label{display:none}.ig_popup .ig_form_container.layout_inline .ig_button,.ig_popup .ig_form_container.layout_inline input[type="submit"],.ig_popup .ig_form_container.layout_inline input[type="button"],.ig_popup .ig_form_container.layout_bottom .ig_button,.ig_popup .ig_form_container.layout_bottom input[type="submit"],.ig_popup .ig_form_container.layout_bottom input[type="button"]{width:98%!important;font-size:1em}.ig_popup.ig_form_bottom .ig_form_container.layout_bottom .ig_form_els.ig_form_el_radio,.ig_popup.ig_form_inline .ig_form_container.layout_inline .ig_form_els.ig_form_el_radio{display:block}.ig_popup.ig_form_bottom .ig_form_container.layout_bottom .ig_form_els.ig_form_el_radio label,.ig_popup.ig_form_inline .ig_form_container.layout_inline .ig_form_els.ig_form_el_radio label{display:block}.ig_form_style_1 .ig_form_container:before{border-width:0;border-style:solid;border-color:#000!important;opacity:.3;top:0}.ig_popup.ig_form_left.ig_form_style_1 .ig_form_container.layout_bottom:before,.ig_popup.ig_form_right.ig_form_style_1 .ig_form_container.layout_bottom:before{width:100%;border-top-width:.22em}.ig_popup.ig_form_bottom.ig_form_style_1 .ig_form_container.layout_bottom:before{border-top-width:.22em}.ig_popup.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els,.ig_popup.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els{margin-right:0;margin-left:0}.ig_popup.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els:first-child input,.ig_popup.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els:first-child input,.ig_popup.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els:last-child input,.ig_popup.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els:last-child input,.ig_popup.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els input,.ig_popup.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els input{height:2.5em!important;-webkit-border-radius:2em;-moz-border-radius:2em;border-radius:2em;padding-left:1em}.ig_popup .ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els input.ig_button,.ig_popup.ig_form_style_2 .ig_form_container.layout_inline input.ig_form_els .ig_button{padding:inherit}.ig_popup.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els:first-child label,.ig_popup.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els:first-child label,.ig_popup.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els:last-child label,.ig_popup.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els:last-child label,.ig_popup.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els label,.ig_popup.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els label{padding-left:1em}.ig_popup.ig_form_right.ig_form_style_4 .ig_close,.ig_popup.ig_form_right.ig_form_style_4 .ig_close:hover{margin:-2em -1em 0 0;top:1em}.ig_popup.ig_form_left.ig_form_style_4 .ig_form_container:before,.ig_popup.ig_form_right.ig_form_style_4 .ig_form_container:before{border-bottom-width:0}}
|
1 |
/* Magnific popup css */
|
2 |
+
.mfp-bg{top:0;left:0;width:100%;height:100%;z-index:1042;overflow:hidden;position:fixed;background:#0b0b0b;opacity:.8;filter:alpha(opacity=80)}.mfp-wrap{top:0;left:0;width:100%;height:100%;z-index:999999;position:fixed;outline:0!important;-webkit-backface-visibility:hidden}.mfp-container{text-align:center;position:absolute;width:100%;height:100%;left:0;top:0;padding:0 8px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.mfp-container:before{content:'';display:inline-block;height:100%;vertical-align:middle}.mfp-align-top .mfp-container:before{display:none}.mfp-content{position:relative;display:inline-block;vertical-align:middle;margin:0 auto;text-align:left;z-index:1045}.mfp-ajax-holder .mfp-content,.mfp-inline-holder .mfp-content{width:100%;cursor:auto}.mfp-ajax-cur{cursor:progress}.mfp-zoom-out-cur,.mfp-zoom-out-cur .mfp-image-holder .mfp-close{cursor:-moz-zoom-out;cursor:-webkit-zoom-out;cursor:zoom-out}.mfp-zoom{cursor:pointer;cursor:-webkit-zoom-in;cursor:-moz-zoom-in;cursor:zoom-in}.mfp-auto-cursor .mfp-content{cursor:auto}.mfp-arrow,.mfp-close,.mfp-counter,.mfp-preloader{-webkit-user-select:none;-moz-user-select:none;user-select:none}.mfp-loading.mfp-figure{display:none}.mfp-hide{display:none!important}.mfp-preloader{color:#CCC;position:absolute;top:50%;width:auto;text-align:center;margin-top:-.8em;left:8px;right:8px;z-index:1044}.mfp-preloader a{color:#CCC}.mfp-preloader a:hover{color:#FFF}.mfp-s-error .mfp-content,.mfp-s-ready .mfp-preloader{display:none}button.mfp-arrow,button.mfp-close{overflow:visible;cursor:pointer;background:0 0;border:0;-webkit-appearance:none;display:block;outline:0;padding:0;z-index:1046;-webkit-box-shadow:none;box-shadow:none}button::-moz-focus-inner{padding:0;border:0}.mfp-close{width:44px;height:44px;line-height:44px;position:absolute;right:0;top:0;text-decoration:none;text-align:center;opacity:.65;filter:alpha(opacity=65);padding:0 0 18px 10px;color:#FFF;font-style:normal;font-size:28px;font-family:Arial,Baskerville,monospace}.mfp-close:focus,.mfp-close:hover{opacity:1;filter:alpha(opacity=100)}.mfp-close:active{top:1px}.mfp-close-btn-in .mfp-close{color:#333}.mfp-iframe-holder .mfp-close,.mfp-image-holder .mfp-close{color:#FFF;right:-6px;text-align:right;padding-right:6px;width:100%}.mfp-counter{position:absolute;top:0;right:0;color:#CCC;font-size:12px;line-height:18px;white-space:nowrap}.mfp-arrow{position:absolute;opacity:.65;filter:alpha(opacity=65);margin:-55px 0 0;top:50%;padding:0;width:90px;height:110px;-webkit-tap-highlight-color:transparent}.mfp-arrow:active{margin-top:-54px}.mfp-arrow:focus,.mfp-arrow:hover{opacity:1;filter:alpha(opacity=100)}.mfp-arrow .mfp-a,.mfp-arrow .mfp-b,.mfp-arrow:after,.mfp-arrow:before{content:'';display:block;width:0;height:0;position:absolute;left:0;top:0;margin-top:35px;margin-left:35px;border:inset transparent}.mfp-arrow .mfp-a,.mfp-arrow:after{border-top-width:13px;border-bottom-width:13px;top:8px}.mfp-arrow .mfp-b,.mfp-arrow:before{border-top-width:21px;border-bottom-width:21px;opacity:.7}.mfp-arrow-left{left:0}.mfp-arrow-left .mfp-a,.mfp-arrow-left:after{border-right:17px solid #FFF;margin-left:31px}.mfp-arrow-left .mfp-b,.mfp-arrow-left:before{margin-left:25px;border-right:27px solid #3F3F3F}.mfp-arrow-right{right:0}.mfp-arrow-right .mfp-a,.mfp-arrow-right:after{border-left:17px solid #FFF;margin-left:39px}.mfp-arrow-right .mfp-b,.mfp-arrow-right:before{border-left:27px solid #3F3F3F}.mfp-iframe-holder{padding-top:40px;padding-bottom:40px}.mfp-iframe-holder .mfp-content{line-height:0;width:100%;max-width:900px}.mfp-iframe-holder .mfp-close{top:-40px}.mfp-iframe-scaler{width:100%;height:0;overflow:hidden;padding-top:56.25%}.mfp-iframe-scaler iframe{position:absolute;display:block;top:0;left:0;width:100%;height:100%;box-shadow:0 0 8px rgba(0,0,0,.6);background:#000}img.mfp-img{width:auto;max-width:100%;height:auto;display:block;line-height:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:40px 0;margin:0 auto}.mfp-figure{line-height:0}.mfp-figure:after{content:'';position:absolute;left:0;top:40px;bottom:40px;display:block;right:0;width:auto;height:auto;z-index:-1;box-shadow:0 0 8px rgba(0,0,0,.6);background:#444}.mfp-figure small{color:#BDBDBD;display:block;font-size:12px;line-height:14px}.mfp-figure figure{margin:0}.mfp-bottom-bar{margin-top:-36px;position:absolute;top:100%;left:0;width:100%;cursor:auto}.mfp-title{text-align:left;line-height:18px;color:#F3F3F3;word-wrap:break-word;padding-right:36px}.mfp-image-holder .mfp-content{max-width:100%}.mfp-gallery .mfp-image-holder .mfp-figure{cursor:pointer}@media screen and (max-width:800px) and (orientation:landscape),screen and (max-height:300px){.mfp-img-mobile .mfp-image-holder{padding-left:0;padding-right:0}.mfp-img-mobile img.mfp-img{padding:0}.mfp-img-mobile .mfp-figure:after{top:0;bottom:0}.mfp-img-mobile .mfp-figure small{display:inline;margin-left:5px}.mfp-img-mobile .mfp-bottom-bar{background:rgba(0,0,0,.6);bottom:0;margin:0;top:auto;padding:3px 5px;position:fixed;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.mfp-img-mobile .mfp-bottom-bar:empty{padding:0}.mfp-img-mobile .mfp-counter{right:5px;top:3px}.mfp-img-mobile .mfp-close{top:0;right:0;width:35px;height:35px;line-height:35px;background:rgba(0,0,0,.6);position:fixed;text-align:center;padding:0}}@media all and (max-width:900px){.mfp-arrow{-webkit-transform:scale(.75);transform:scale(.75)}.mfp-arrow-left{-webkit-transform-origin:0;transform-origin:0}.mfp-arrow-right{-webkit-transform-origin:100%;transform-origin:100%}.mfp-container{padding-left:6px;padding-right:6px}}.mfp-ie7 .mfp-img{padding:0}.mfp-ie7 .mfp-bottom-bar{width:600px;left:50%;margin-left:-300px;margin-top:5px;padding-bottom:5px}.mfp-ie7 .mfp-container{padding:0}.mfp-ie7 .mfp-content{padding-top:44px}.mfp-ie7 .mfp-close{top:0;right:0;padding-top:0}.ig_popup{opacity:1;display:block;z-index:100000;background-color:transparent!important;color:transparent!important;width:60%;margin:32px auto 20px auto!important}.ig_popup .ig_container{position:relative}.ig_popup .ig_container,.ig_popup .ig_container .ig_content{background-color:transparent}.ig_popup .ig_container .ig_bg_overlay{background-color:transparent;width:100%;height:100%;top:0;left:0;margin:0;padding:0;position:absolute;display:none}.ig_popup .ig_headline{text-decoration:none;font-weight:800;font-size:2em;line-height:1.2em}.ig_popup .ig_data{position:relative}.ig_popup .ig_image{margin:0 1em}.ig_popup .ig_message{line-height:1.2em;font-size:1.2em}.ig_popup .ig_close{background-image:url(../popup/images/popup-close.png);background-repeat:no-repeat;background-position:left bottom;height:32px;width:30px;cursor:pointer;-webkit-background-size:100%;background-size:100%;float:right;margin:-2em -1em 0 0;top:1em;position:relative;z-index:20}.ig_popup .ig_close:hover{height:32px;width:30px;background-position:left top}.ig_popup .ig_button,.ig_popup input[type="submit"],.ig_popup input[type="button"]{cursor:pointer;display:block;background-image:none;border:none;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;position:relative}.ig_popup .ig_button:hover,.ig_popup input[type="submit"]:hover,.ig_popup input[type="button"]:hover{}.ig_popup .ig_button:active,.ig_popup input[type="submit"]:active,.ig_popup input[type="button"]:active{}.mfp-wrap .ig_powered_by{position:fixed;bottom:1em;left:1em;font-size:14px;padding:0.1em}@media only screen and (max-device-width:319px){.ig_popup{width:90%;top:3%!important;margin:5px auto!important;font-size:8px}.ig_popup .ig_button,.ig_popup input[type="submit"],.ig_popup input[type="button"]{width:90%!important}}@media only screen and (min-device-width:320px) and (max-device-width:359px){.ig_popup{width:85%;top:5%!important;margin:10px auto!important;font-size:10px}.ig_popup .ig_button,.ig_popup input[type="submit"],.ig_popup input[type="button"]{width:90%!important}}@media only screen and (min-device-width:360px) and (max-device-width:413px){.ig_popup{width:85%;top:5%!important;margin:10px auto!important;font-size:12px}.ig_popup .ig_button,.ig_popup input[type="submit"],.ig_popup input[type="button"]{width:90%!important}}@media only screen and (min-device-width:414px) and (max-device-width:643px){.ig_popup{width:85%;top:5%!important;margin:10px auto!important;font-size:13px}.ig_popup .ig_button,.ig_popup input[type="submit"],.ig_popup input[type="button"]{width:90%!important}}@media only screen and (min-device-width:644px) and (max-device-width:767px) and (orientation:portrait){.ig_popup{top:5%!important;margin:10px auto!important;font-size:14px}}@media only screen and (min-device-width:644px) and (max-device-width:767px) and (orientation:landscape){.ig_popup{top:5%!important;margin:10px auto!important;font-size:11px}}@media only screen and (min-width:768px) and (max-device-width:992px){.ig_popup{top:5%!important;margin:10px auto!important;font-size:14px}}.ig_popup .ig_form_container{width:30%;float:left;padding-top:2em}.ig_popup.ig_form_left .ig_data{position:relative}.ig_popup.ig_form_left .ig_data,.ig_popup.ig_form_right .ig_data{width:70%;float:left}.ig_popup.ig_form_right.ig_form_style_4 .ig_close,.ig_popup.ig_form_right.ig_form_style_4 .ig_close:hover{margin:-4em -2em 0 0;top:2em}@media only screen and (max-device-width:319px),(min-device-width:320px) and (max-device-width:359px),(min-device-width:360px) and (max-device-width:413px),(min-device-width:414px) and (max-device-width:643px),(min-device-width:644px) and (max-device-width:767px) and (orientation:portrait),(min-device-width:644px) and (max-device-width:767px) and (orientation:landscape),(min-width:768px) and (max-device-width:992px){.ig_popup.ig_form_left .ig_form_container.layout_left,.ig_popup.ig_form_right .ig_form_container.layout_right{display:none}.ig_popup.ig_form_left .ig_form_container.layout_bottom,.ig_popup.ig_form_right .ig_form_container.layout_bottom,.ig_popup.ig_form_bottom .ig_form_container.layout_bottom{display:block;width:100%;font-size:1.5em;height:auto!important}.ig_popup.ig_form_inline .ig_form_container.layout_inline{padding:.6em 0}.ig_popup.ig_form_left .ig_data,.ig_popup.ig_form_right .ig_data{width:100%}.ig_popup .ig_form_container.layout_bottom .ig_full .ig_form_els,.ig_popup .ig_form_container.layout_inline .ig_full .ig_form_els,.ig_popup .ig_form_container.layout_bottom .ig_half .ig_form_els,.ig_popup .ig_form_container.layout_inline .ig_half .ig_form_els,.ig_popup .ig_form_container.layout_bottom .ig_third .ig_form_els,.ig_popup .ig_form_container.layout_inline .ig_third .ig_form_els,.ig_popup .ig_form_container.layout_bottom .ig_quater .ig_form_els,.ig_popup .ig_form_container.layout_inline .ig_quater .ig_form_els{width:98%;margin:.5em auto 0 auto}.ig_popup .ig_form_container.layout_inline .ig_button_label,.ig_popup .ig_form_container.layout_bottom .ig_button_label{display:none}.ig_popup .ig_form_container.layout_inline .ig_button,.ig_popup .ig_form_container.layout_inline input[type="submit"],.ig_popup .ig_form_container.layout_inline input[type="button"],.ig_popup .ig_form_container.layout_bottom .ig_button,.ig_popup .ig_form_container.layout_bottom input[type="submit"],.ig_popup .ig_form_container.layout_bottom input[type="button"]{width:98%!important;font-size:1em}.ig_popup.ig_form_bottom .ig_form_container.layout_bottom .ig_form_els.ig_form_el_radio,.ig_popup.ig_form_inline .ig_form_container.layout_inline .ig_form_els.ig_form_el_radio{display:block}.ig_popup.ig_form_bottom .ig_form_container.layout_bottom .ig_form_els.ig_form_el_radio label,.ig_popup.ig_form_inline .ig_form_container.layout_inline .ig_form_els.ig_form_el_radio label{display:block}.ig_form_style_1 .ig_form_container:before{border-width:0;border-style:solid;border-color:#000!important;opacity:.3;top:0}.ig_popup.ig_form_left.ig_form_style_1 .ig_form_container.layout_bottom:before,.ig_popup.ig_form_right.ig_form_style_1 .ig_form_container.layout_bottom:before{width:100%;border-top-width:.22em}.ig_popup.ig_form_bottom.ig_form_style_1 .ig_form_container.layout_bottom:before{border-top-width:.22em}.ig_popup.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els,.ig_popup.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els{margin-right:0;margin-left:0}.ig_popup.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els:first-child input,.ig_popup.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els:first-child input,.ig_popup.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els:last-child input,.ig_popup.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els:last-child input,.ig_popup.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els input,.ig_popup.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els input{height:2.5em!important;-webkit-border-radius:2em;-moz-border-radius:2em;border-radius:2em;padding-left:1em}.ig_popup .ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els input.ig_button,.ig_popup.ig_form_style_2 .ig_form_container.layout_inline input.ig_form_els .ig_button{padding:inherit}.ig_popup.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els:first-child label,.ig_popup.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els:first-child label,.ig_popup.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els:last-child label,.ig_popup.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els:last-child label,.ig_popup.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els label,.ig_popup.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els label{padding-left:1em}.ig_popup.ig_form_right.ig_form_style_4 .ig_close,.ig_popup.ig_form_right.ig_form_style_4 .ig_close:hover{margin:-2em -1em 0 0;top:1em}.ig_popup.ig_form_left.ig_form_style_4 .ig_form_container:before,.ig_popup.ig_form_right.ig_form_style_4 .ig_form_container:before{border-bottom-width:0}}
|
message-types/popup/main.php
CHANGED
@@ -6,10 +6,10 @@ if ( class_exists( 'Icegram_Message_Type_Popup' ) ) return;
|
|
6 |
* Class Icegram Popup
|
7 |
*/
|
8 |
class Icegram_Message_Type_Popup extends Icegram_Message_Type {
|
9 |
-
var $popup_default_delay_time;
|
|
|
10 |
function __construct() {
|
11 |
parent::__construct( dirname( __FILE__ ), plugins_url( '/', __FILE__ ) );
|
12 |
-
|
13 |
$this->popup_default_delay_time = 3;
|
14 |
add_filter( 'icegram_data', array( $this, 'arrange_proper_delay_time' ) , 11);
|
15 |
add_filter( 'icegram_message_type_params_popup', array( $this, 'set_admin_style' ) );
|
6 |
* Class Icegram Popup
|
7 |
*/
|
8 |
class Icegram_Message_Type_Popup extends Icegram_Message_Type {
|
9 |
+
var $popup_default_delay_time;
|
10 |
+
|
11 |
function __construct() {
|
12 |
parent::__construct( dirname( __FILE__ ), plugins_url( '/', __FILE__ ) );
|
|
|
13 |
$this->popup_default_delay_time = 3;
|
14 |
add_filter( 'icegram_data', array( $this, 'arrange_proper_delay_time' ) , 11);
|
15 |
add_filter( 'icegram_message_type_params_popup', array( $this, 'set_admin_style' ) );
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: icegram, storeapps, niravmehta, putler
|
|
3 |
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.
|
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 =
|
157 |
Form embed functionality improvements , Added forms styles.
|
158 |
|
@@ -221,6 +224,13 @@ Initial Release
|
|
221 |
|
222 |
|
223 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
= 1.9 =
|
225 |
* New:Forms now comes with various form styles and multiple positions
|
226 |
* New:Forms also provides background and text color
|
@@ -229,14 +239,14 @@ Initial Release
|
|
229 |
* Fix: Homepage page targeting not working when "Lazy loading" was off
|
230 |
|
231 |
= 1.8.10 =
|
232 |
-
* Fix:
|
233 |
-
* Fix:
|
234 |
* Fix: Local site targeting not working without wildcard character
|
235 |
|
236 |
= 1.8.9 =
|
237 |
* New: Both body and button colors (background and foreground) can now be set
|
238 |
* Update: Brought back CTA Buttons default colors
|
239 |
-
* New: Lazy load Icegram messages for better
|
240 |
* Update: Updated all themes to support new theme coloring scheme
|
241 |
* Fix: Some alignment issues with images in popups
|
242 |
* Update: Minified all JS and CSS to improve performance
|
3 |
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.1
|
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.1 =
|
157 |
+
Few improvements in form functionality.
|
158 |
+
|
159 |
= 1.9 =
|
160 |
Form embed functionality improvements , Added forms styles.
|
161 |
|
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
|
230 |
+
* Fix: Form style options not getting saved
|
231 |
+
* Fix: Minor issues with form css
|
232 |
+
* Fix: Compatibility issues of previous embed form functionality with new one
|
233 |
+
|
234 |
= 1.9 =
|
235 |
* New:Forms now comes with various form styles and multiple positions
|
236 |
* New:Forms also provides background and text color
|
239 |
* Fix: Homepage page targeting not working when "Lazy loading" was off
|
240 |
|
241 |
= 1.8.10 =
|
242 |
+
* Fix: Compatibility for themes with CSS class name conflicts
|
243 |
+
* Fix: Compatibility with "auto optimize" and other minification plugins
|
244 |
* Fix: Local site targeting not working without wildcard character
|
245 |
|
246 |
= 1.8.9 =
|
247 |
* New: Both body and button colors (background and foreground) can now be set
|
248 |
* Update: Brought back CTA Buttons default colors
|
249 |
+
* New: Lazy load Icegram messages for better compatibility with caching plugins
|
250 |
* Update: Updated all themes to support new theme coloring scheme
|
251 |
* Fix: Some alignment issues with images in popups
|
252 |
* Update: Minified all JS and CSS to improve performance
|