Version Description
- New HubSpot integration (static list).
- Improved ConstantContact integration.
- Improved InfusionSoft integration.
- Improved AWeber integration.
- Improved Mautic integration.
- Improved SendInBlue integration.
- Improved Opt-in when provider not set but uses "Save Emails to local list".
- Fixed Opt-in signup button not showing on some layouts.
- Fixed Custom Content front-end JavaScript errors.
Download this release
Release Info
Developer | diobethray |
Plugin | Hustle – Pop-Ups, Slide-ins and Email Opt-ins |
Version | 5.1.4 |
Comparing to | |
See all releases |
Code changes from version 5.1.3.2 to 5.1.4
assets/js/admin.min.js
CHANGED
@@ -2,6 +2,6 @@
|
|
2 |
},body:function(){return this.template(this.get_data())},rendered:function(){this.$(".js-wpoi-select").wpmuiSelect({tags:"true",width:"100%",createTag:function(){return!1}}).on("select2:selecting",i).on("select2:unselect",i)}})),Optin.View.Conditions.visitor_logged_in=t.extend({condition_id:"visitor_logged_in",disable:["visitor_not_logged_in"],title:optin_vars.messages.conditions.visitor_logged_in,label:optin_vars.messages.condition_labels.visitor_logged_in,body:optin_vars.messages.conditions_body.visitor_logged_in}),Optin.View.Conditions.visitor_not_logged_in=t.extend({condition_id:"visitor_not_logged_in",disable:["visitor_logged_in"],title:optin_vars.messages.conditions.visitor_not_logged_in,label:optin_vars.messages.condition_labels.visitor_not_logged_in,body:optin_vars.messages.conditions_body.visitor_not_logged_in}),Optin.View.Conditions.shown_less_than=t.extend({condition_id:"shown_less_than",title:optin_vars.messages.conditions.shown_less_than,label:optin_vars.messages.condition_labels.shown_less_than,defaults:{less_than:1},body:function(){return this.template(this.get_data())}}),Optin.View.Conditions.only_on_mobile=t.extend({condition_id:"only_on_mobile",disable:["not_on_mobile"],title:optin_vars.messages.conditions.only_on_mobile,label:optin_vars.messages.condition_labels.only_on_mobile,body:optin_vars.messages.conditions_body.only_on_mobile}),Optin.View.Conditions.not_on_mobile=t.extend({condition_id:"not_on_mobile",disable:["only_on_mobile"],title:optin_vars.messages.conditions.not_on_mobile,label:optin_vars.messages.condition_labels.not_on_mobile,body:optin_vars.messages.conditions_body.not_on_mobile}),Optin.View.Conditions.from_specific_ref=t.extend({condition_id:"from_specific_ref",disable:["not_from_specific_ref"],title:optin_vars.messages.conditions.from_specific_ref,label:optin_vars.messages.condition_labels.from_specific_ref,defaults:{refs:""},body:function(){return this.template(this.get_data())}}),Optin.View.Conditions.not_from_specific_ref=t.extend({condition_id:"not_from_specific_ref",disable:["from_specific_ref"],title:optin_vars.messages.conditions.not_from_specific_ref,label:optin_vars.messages.condition_labels.not_from_specific_ref,defaults:{refs:""},body:function(){return this.template(this.get_data())}}),Optin.View.Conditions.not_from_internal_link=t.extend({condition_id:"not_from_internal_link",title:optin_vars.messages.conditions.not_from_internal_link,label:optin_vars.messages.condition_labels.not_from_internal_link,body:optin_vars.messages.conditions_body.not_from_internal_link}),Optin.View.Conditions.from_search_engine=t.extend({condition_id:"from_search_engine",title:optin_vars.messages.conditions.from_search_engine,label:optin_vars.messages.condition_labels.from_search_engine,body:optin_vars.messages.conditions_body.from_search_engine}),Optin.View.Conditions.on_specific_url=t.extend({condition_id:"on_specific_url",disable:["not_on_specific_url"],title:optin_vars.messages.conditions.on_specific_url,label:optin_vars.messages.condition_labels.on_specific_url,defaults:{urls:""},body:function(){return this.template(this.get_data())}}),Optin.View.Conditions.not_on_specific_url=t.extend({condition_id:"not_on_specific_url",disable:["on_specific_url"],title:optin_vars.messages.conditions.not_on_specific_url,label:optin_vars.messages.condition_labels.not_on_specific_url,defaults:{urls:""},body:function(){return this.template(this.get_data())}}),Optin.View.Conditions.visitor_has_commented=t.extend({condition_id:"visitor_has_commented",disable:["visitor_has_never_commented"],title:optin_vars.messages.conditions.visitor_has_commented,label:optin_vars.messages.condition_labels.visitor_has_commented,body:optin_vars.messages.conditions_body.visitor_has_commented}),Optin.View.Conditions.visitor_has_never_commented=t.extend({condition_id:"visitor_has_never_commented",disable:["visitor_has_commented"],title:optin_vars.messages.conditions.visitor_has_never_commented,label:optin_vars.messages.condition_labels.visitor_has_never_commented,body:optin_vars.messages.conditions_body.visitor_has_never_commented}),Optin.View.Conditions.in_a_country=t.extend({condition_id:"in_a_country",disable:["not_in_a_country"],title:optin_vars.messages.conditions.in_a_country,label:optin_vars.messages.condition_labels.in_a_country,defaults:{countries:""},body:function(){return this.template(this.get_data())},rendered:function(){this.$(".js-wpoi-select").val(this.get_attribute("countries")).wpmuiSelect().on("select2:selecting",i).on("select2:unselect",i)}}),Optin.View.Conditions.not_in_a_country=t.extend({condition_id:"not_in_a_country",disable:["in_a_country"],title:optin_vars.messages.conditions.not_in_a_country,label:optin_vars.messages.condition_labels.not_in_a_country,defaults:{countries:""},body:function(){return this.template(this.get_data())},rendered:function(){this.$(".js-wpoi-select").val(this.get_attribute("countries")).wpmuiSelect().on("select2:selecting",i).on("select2:unselect",i)}})}(jQuery),Hustle.define("Settings.Display_Triggers_View",function(e,t,i){"use strict";return Hustle.View.extend(_.extend({},Hustle.get("Mixins.Model_Updater"),{template:Optin.template("wpoi-settings-display-triggers-tpl"),events:{"click .tabs-header label":"change_tab"},init:function(e){this.type=e.type,this.listenTo(this.model,"change:on_adblock",this.hide_adblock_options_on_toggle),this.render()},render:function(){return this.$el.html(this.template(this.get_data())),this.hide_adblock_options_on_toggle(),this},get_data:function(){var e={};return e.type=this.type,_.extend({},e,this.model.toJSON())},change_tab:function(e){e.preventDefault();var t=this.$(e.target),i=t.parent("li"),s=this.$(t.attr("href")),n=t.find("input[type='radio']");this.$(".tabs-header li").removeClass("current"),this.$(".tabs-content").removeClass("current"),i.addClass("current"),s.addClass("current"),n.prop("checked",!0),this.model.set("trigger",n.val())},hide_adblock_options_on_toggle:function(){_.isTrue(this.model.get("on_adblock"))?this.$(".wpoi-popup-trigger-on-adblock-option").show():this.$(".wpoi-popup-trigger-on-adblock-option").hide()}}))}),Hustle.define("Settings.E_News",function(e){"use strict";return Backbone.View.extend({el:"#enews-sync-box",back_tpl:Optin.template("wpoi-e-newsletter-box-back"),initial_html:"",events:{"click .optin-enews-sync-setup":"setup","click .optin-enews-sync-cancel":"cancel","click .optin-enews-sync-save":"save","click .optin-enews-sync-toggle":"toggle","click .optin-enews-sync-edit":"setup"},initialize:function(){this.initial_html=this.$el.html()},setup:function(t){t.preventDefault();var i=this,s=e(t.target),n=s.data("id"),o=s.data("nonce");s.hasClass("optin-enews-sync-edit");e.ajax({url:ajaxurl,type:"GET",data:{action:"inc_opt_get_enews_sync_setup",_ajax_nonce:o,id:n},success:function(e){e.success&&i.$el.html(i.back_tpl(e.data))},error:function(e){}})},cancel:function(e){e.preventDefault(),this.$el.html(this.initial_html)},save:function(t){t.preventDefault();var i=this,s=e(t.target),n=s.data("id"),o=[],a=s.data("nonce");this.$(".wpoi-e-newsletter-group").each(function(e,t){t.checked&&o.push(t.value)}),e.ajax({url:ajaxurl,type:"POST",data:{action:"inc_opt_save_enews_sync_setup",_ajax_nonce:a,id:n,groups:o},success:function(e){e.success&&i.$el.html(e.data.html)},error:function(e){}})},toggle:function(t){var i=this,s=e(t.target),n=s.data("id"),o=s.data("nonce"),a=s.is(":checked");e.ajax({url:ajaxurl,type:"POST",data:{action:"inc_opt_toggle_enews_sync",_ajax_nonce:o,id:n,state:a},success:function(e){e.success&&(s.attr("checked",a),i.initial_html=i.$el.html())}})}})}),Hustle.define("Settings.Modules_Activity",function(e){"use strict";return Backbone.View.extend({el:"#modules-activity",events:{"change .hustle-for-admin-user-toggle":"toggle_for_user","change .hustle-for-logged-in-user-toggle":"toggle_for_user"},initialize:function(){},toggle_for_user:function(t){var i=this.$(t.target),s=i.data("id"),n=i.data("nonce"),o=i.data("user");i.attr("disabled",!0),e.ajax({url:ajaxurl,type:"POST",data:{action:"hustle_toggle_module_for_user",id:s,_ajax_nonce:n,user_type:o},complete:function(e,t){i.attr("disabled",!1)},success:function(e){e.success||i.prop("checked",!i.is(":checked"))},error:function(){i.prop("checked",!i.is(":checked"))}})}})}),Hustle.define("Settings.Services_Edit_Modal",function(e){"use strict";return Backbone.View.extend({template:Hustle.template("wph-edit-provider-modal-tpl"),id:"wph-edit-provider-modal",events:{"click .i-close":"close","click .js-wph-button-cancel":"close","change #wph-provider-edit-modal-provider":"get_provider_options","click #wph-edit-service-save":"save_settings","submit form":"save_settings"},provider_options_nonce:!1,initialize:function(){this.render()},render:function(){var t=this;this.$el.html(this.template()).appendTo("body"),e.ajax({url:ajaxurl,type:"get",data:{action:"hustle_get_providers_edit_modal_content",id:t.model.get("id"),source:t.model.get("source"),_ajax_nonce:t.model.get("nonce")},success:function(e){e.success&&(t.$(".wph-edit-provider-modal-content").html(e.data.html),t.provider_options_nonce=e.data.provider_options_nonce,Hustle.Events.trigger("view.rendered",t))}})},get_provider_options:function(t){var i=this,s=this.$(t.target),n=this.$("#optin_new_provider_account_details"),o=this.$("#optin_new_provider_account_options");n.empty(),o.empty(),e.ajax({url:ajaxurl,type:"get",data:{action:"render_provider_account_options",provider_id:s.val(),_ajax_nonce:i.provider_options_nonce,optin:i.model.get("id")},success:function(e){e.success&&(n.html(e.data),Hustle.Events.trigger("view.rendered",i))}})},close:function(e){e.preventDefault(),this.remove()},hide:function(){},show:function(){},save_settings:function(t){t.preventDefault();var i=this.$(t.target),s=i.data("nonce"),n=this.$("#wph-provider-edit-modal-provider"),o=i.closest("form");e.ajax({url:ajaxurl,type:"post",data:{action:"hustle_save_providers_edit_modal",provider_id:n.val(),_ajax_nonce:s,id:this.model.get("id"),source:this.model.get("source"),form:o.serialize()},success:function(e){}})}})}),Hustle.define("Settings.Services",function(e){"use strict";return Backbone.View.extend({el:"#providers-edit-box",Modal_View:Hustle.get("Settings.Services_Edit_Modal"),modal:!1,events:{"click .wph-providers-edit":"open_edit_modal"},open_edit_modal:function(e){var t=this.$(e.target),i=t.data("id"),s=t.data("source"),n=t.data("nonce");this.modal=new this.Modal_View({model:new Backbone.Model({id:i,nonce:n,source:s})})}})}),function(e,t){"use strict";e(document).on("click",".wpoi-listing-wrap header.can-open .toggle, .wpoi-listing-wrap header.can-open .toggle-label",function(e){e.stopPropagation()}),e(".accordion header .optin-delete-optin, .accordion header .edit-optin, .wpoi-optin-details tr .button-edit").hide().css({transition:"none"}),e(document).on({mouseenter:function(){var t=e(this);t.find(".optin-delete-optin, .edit-optin").stop().fadeIn("fast")},mouseleave:function(){var t=e(this);t.find(".toggle-checkbox").removeProp("disabled"),t.find(".edit-optin").removeProp("disabled"),t.removeClass("disabled"),t.find(".optin-delete-optin, .edit-optin, .delete-optin-confirmation").stop().fadeOut("fast")}},".accordion header"),e(document).on({mouseenter:function(){var t=e(this);t.find(".button-edit").stop().fadeIn("fast")},mouseleave:function(){var t=e(this);t.find(".button-edit").stop().fadeOut("fast")}},".wpoi-optin-details tr"),e(document).on("click",".wpoi-tabs-menu a",function(t){t.preventDefault();var i=e(this).attr("tab");Optin.router.navigate(i,!0)}),e(document).on("click",".edit-optin",function(t){t.stopPropagation(),t.preventDefault(),window.location.href=e(this).attr("href")}),e(document).on("click",".wpoi-type-edit-button",function(t){t.preventDefault();var i=e(this).data("id"),s=e(this).data("type");window.location.href="admin.php?page=inc_optin&optin="+i+"#display/"+s}),e(document).on("click","*[for]",function(t){var i=e(this),s=i.attr("for"),n=e("#"+s);!i.is("label")&&n.length&&(n.trigger("change"),n.trigger("click"))}),e("#wpoi-complete-message").fadeIn(),e(document).on("click","#wpoi-complete-message .next-button button",function(t){e("#wpoi-complete-message").fadeOut()}),e(document).on("click",".wpoi-listing-page .wpoi-listing-wrap header.can-open",function(t){e(this).find(".open").trigger("click")}),e(document).on("click",".wpoi-listing-page .wpoi-listing-wrap .can-open .open",function(t){t.stopPropagation();var i=e(this),s=i.closest(".wpoi-listing-wrap"),n=s.find("section"),o=e(".wpoi-listing-wrap").not(s),a=e(".wpoi-listing-wrap section").not(n);a.slideUp(300,function(){a.removeClass("open")}),o.find(".dev-icon").removeClass("dev-icon-caret_up").addClass("dev-icon-caret_down"),n.slideToggle(300,function(){s.toggleClass("open"),s.find(".dev-icon").toggleClass("dev-icon-caret_up dev-icon-caret_down")})}),Optin.decorate_number_inputs=function(t){var i=t&&t.$el?t.$el.find(".wph-input--number input"):e(".wph-input--number input"),s=Hustle.create_template('<div class="wph-nbr--nav"><div class="wph-nbr--button wph-nbr--up {{disabled}}">+</div><div class="wph-nbr--button wph-nbr--down {{disabled}}">-</div></div>');i.each(function(){var t=e(this),i=t.is(":disabled")?"disabled":"";t.siblings(".wph-nbr--nav").length||t.after(s({disabled:i}))})},Hustle.Events.on("view.rendered",Optin.decorate_number_inputs),function(){e(document).on("click",".wph-nbr--up:not(.disabled)",function(t){var i,s=e(this),n=s.closest(".wph-input--number"),o=n.find("input"),a=parseFloat(o.val()),l=(o.attr("min"),o.attr("max"));i=a>=l?a:a+1,i!==a&&o.val(i).trigger("change")}),e(document).on("click",".wph-nbr--down:not(.disabled)",function(t){var i,s=e(this),n=s.closest(".wph-input--number"),o=n.find("input"),a=parseFloat(o.val()),l=o.attr("min");o.attr("max");i=a<=l?a:a-1,i!==a&&o.val(i).trigger("change")})}(),function(){function t(){var t=e(window).scrollTop(),i=e(".wph-sticky--anchor");i.length&&(i=i.offset().top,t>i?(e(".wph-preview--eye").addClass("wph-sticky--element"),e(".wph-sticky--anchor").height(e(".wph-preview--eye").outerHeight())):(e(".wph-preview--eye").removeClass("wph-sticky--element"),e(".wph-sticky--anchor").height(0)))}e(function(){e(window).scroll(t),t()})}()}(jQuery,document),Hustle.define("Model",function(){"use strict";return Backbone.Model.extend({initialize:function(){this.on("change",this.user_has_change,this),Backbone.Model.prototype.initialize.apply(this,arguments)},user_has_change:function(){Optin.hasChanges=!0}})}),Hustle.define("Models.M",function(){"use strict";return Hustle.get("Model").extend({toJSON:function(){var e=_.clone(this.attributes);for(var t in e)(e[t]instanceof Backbone.Model||e[t]instanceof Backbone.Collection)&&(e[t]=e[t].toJSON());return e},set:function(e,t,i){if("string"==typeof e&&e.indexOf(".")!==-1){var s=e.split(".")[0],n=e.split(".")[1],o=this.get(s);o&&o instanceof Backbone.Model&&(o.set(n,t,i),this.trigger("change:"+e,e,t,i),this.trigger("change:"+s,e,t,i))}else Backbone.Model.prototype.set.call(this,e,t,i)},get:function(e){if("string"==typeof e&&e.indexOf(".")!==-1){var t=e.split(".")[0],i=e.split(".")[1];return this.get(t).get(i)}return Backbone.Model.prototype.get.call(this,e)}})}),Optin.Model=Hustle.get("Models.M").extend({defaults:{optin_name:optin_vars.messages.model.defaults.optin_name,optin_title:optin_vars.messages.model.defaults.optin_title,optin_message:optin_vars.messages.model.defaults.optin_message,optin_provider:"",api_key:"",mail_list:"",active:1,test_mode:0,save_to_local:0,service_source:"existing"},validate_first_step:function(e){var t=[];return e=e||this.attributes,e.optin_name&&!e.optin_name.isEmpty()||t.push({name:"name",message:optin_vars.messages.model.errors.name}),1!=e.test_mode&&1!=e.save_to_local&&(e.optin_provider&&!e.optin_provider.isEmpty()||t.push({name:"provider",message:optin_vars.messages.model.errors.provider}),e.api_key&&!e.api_key.isEmpty()||t.push({name:"api_key",message:optin_vars.messages.model.errors.api_key}),e.optin_mail_list&&!e.optin_mail_list.isEmpty()||t.push({name:"mail_list",message:optin_vars.messages.model.errors.mail_list})),_(t)}}),Optin.Models.Color_Palette=Hustle.get("Models.M").extend({defaults:{_id:"",label:"",main_background:"",form_background:"",button_background:"",button_label_color:"",title_color:"",content_color:"",fields_background:"",fields_color:""}}),Optin.Models.Color_Palette_Collection=Backbone.Collection.extend({model:Optin.Models.Color_Palette});var Palettes=new Optin.Models.Color_Palette_Collection;_.each(optin_vars.palettes,function(e,t){e._id=t.replace(new RegExp(" ","g"),"_").toLowerCase(),e.label=t;var i=new Optin.Models.Color_Palette(e);Palettes.add(i)}),Optin.Models.Colors_Model=Hustle.get("Models.M").extend({defaults:_.extend({customize:!1,palette:Palettes.at(0).get("_id"),main_background:"",form_background:"",button_background:"",button_label:"",title_color:"",content_color:"",fields_background:"",fields_color:""},Palettes.at(0).toJSON())}),Optin.Models.Borders_Model=Backbone.Model.extend({defaults:{rounded_corners:!0,corners_radius:0,fields_corners_radius:0,button_corners_radius:0,drop_shadow:!1,dropshadow_value:0,shadow_color:"#000",fields_style:"joined",rounded_form_fields:!0,rounded_form_button:!0}}),Optin.Models.Design_Model=Hustle.get("Models.M").extend({defaults:{success_message:optin_vars.messages.model.defaults.success_message,form_location:"0",elements:["image"],image_location:"left",image_style:"cover",image_src:optin_vars.preview_image,colors:new Optin.Models.Colors_Model,borders:new Optin.Models.Borders_Model,opening_animation:"",closing_animation:"",css:"",on_submit:"success_message",on_submit_page_id:"",input_icons:"animated_icon",on_success:"remain",on_success_time:0,on_success_unit:"s",customize_css:!1,cta_button:optin_vars.messages.model.defaults.cta_button,module_fields:optin_vars.module_fields},initialize:function(e){_.extend(this,e),this.get("colors")instanceof Backbone.Model||this.set("colors",new Optin.Models.Colors_Model(this.colors)),this.get("borders")instanceof Backbone.Model||this.set("borders",new Optin.Models.Borders_Model(this.borders)),this.on("change",this.user_has_change,this)}});var old_conditions=["show_on_all_posts","excluded_posts","selected_posts","show_on_all_pages","excluded_pages","selected_pages","show_on_all_cats","show_on_these_cats","show_on_all_tags","show_on_these_tags"];Optin.Models.Settings_After_Content=Hustle.get("Models.M").extend({defaults:{enabled:!1,animate:!1,animation:""},initialize:function(e){if(!(this.get("conditions")instanceof Backbone.Model)){var t=Hustle.get("Model");_.isEmpty(this.get("conditions"))&&_.isArray(this.get("conditions"))?this.set("conditions",new t):this.set("conditions",new t(this.get("conditions")))}this.on("change",this.user_has_change,this)}}),Optin.Models.Settings_Popup_Model=Hustle.get("Model").extend({defaults:{enabled:!1,animation_in:"",animation_out:"",appear_after:"time",on_exit_trigger_once_per_session:!0,appear_after_scroll:"scrolled",appear_after_time_val:5,appear_after_time_unit:"seconds",appear_after_page_portion_val:20,appear_after_page_portion_unit:"%",appear_after_element_val:"",add_never_see_this_message:!1,close_button_acts_as_never_see_again:!1,never_see_expiry:2,show_on_all_posts:!0,excluded_posts:[],selected_posts:[],show_on_all_pages:!0,excluded_pages:[],selected_pages:[],show_on_all_cats:!0,show_on_these_cats:[],show_on_all_tags:!0,show_on_these_tags:[],conditions:{},trigger_on_time:"immediately",trigger_on_element_click:"",trigger_on_exit:!1,trigger_on_adblock:!1,trigger_on_adblock_timed:!1,trigger_on_adblock_timed_val:180,trigger_on_adblock_timed_unit:"seconds"},initialize:function(e){if(_.extend(this,e),!(this.get("conditions")instanceof Backbone.Model)){var t=Hustle.get("Model");_.isEmpty(this.get("conditions"))&&_.isArray(this.get("conditions"))?this.set("conditions",new t):this.set("conditions",new t(this.get("conditions")))}this.on("change",this.user_has_change,this)}}),Optin.Models.Settings_Slide_In_Model=Hustle.get("Model").extend({defaults:{enabled:!1,appear_after:"time",on_exit_trigger_once_per_session:!0,appear_after_scroll:"scrolled",appear_after_time_val:5,appear_after_time_unit:"seconds",appear_after_page_portion_val:30,appear_after_page_portion_unit:"%",appear_after_element_val:"",hide_after:!0,hide_after_val:10,hide_after_unit:"seconds",position:"bottom_right",after_close:"keep_showing",show_on_all_posts:!0,excluded_posts:[],selected_posts:[],show_on_all_pages:!0,excluded_pages:[],selected_pages:[],show_on_all_cats:!0,show_on_these_cats:[],show_on_all_tags:!0,show_on_these_tags:[],conditions:{},trigger_on_time:"immediately",trigger_on_element_click:"",trigger_on_exit:!1,trigger_on_adblock:!1,trigger_on_adblock_timed:!1,trigger_on_adblock_timed_val:180,trigger_on_adblock_timed_unit:"seconds"},initialize:function(e){if(!(this.get("conditions")instanceof Backbone.Model)){var t=Hustle.get("Model");_.isEmpty(this.get("conditions"))&&_.isArray(this.get("conditions"))?this.set("conditions",new t):this.set("conditions",new t(this.get("conditions")))}this.on("change",this.user_has_change,this)}}),Optin.Models.Settings_Model=Hustle.get("Models.M").extend({defaults:{shortcode_id:"",after_content:new Optin.Models.Settings_After_Content,popup:new Optin.Models.Settings_Popup_Model,slide_in:new Optin.Models.Settings_Slide_In_Model},initialize:function(e){_.extend(this,e),this.get("after_content")instanceof Backbone.Model||this.set("after_content",new Optin.Models.Settings_After_Content(this.get("after_content"))),this.get("popup")instanceof Backbone.Model||this.set("popup",new Optin.Models.Settings_Popup_Model(this.get("popup"))),this.get("slide_in")instanceof Backbone.Model||this.set("slide_in",new Optin.Models.Settings_Slide_In_Model(this.get("slide_in"))),this.on("change",this.user_has_change,this)}}),Hustle.define("Models.Trigger",function(){"use strict";return Hustle.get("Model").extend({defaults:{trigger:"time",on_time:"immediately",on_time_delay:5,on_time_unit:"seconds",on_scroll:"scrolled",on_scroll_page_percent:"20",on_scroll_css_selector:"",on_click_element:"",on_exit_intent:!0,on_exit_intent_per_session:!0,on_adblock:!1,on_adblock_delayed:!1,on_adblock_delayed_time:180,on_adblock_delayed_unit:"seconds"}})}),function(e){"use strict";Optin.get_tpl=function(e){var t=["optin-layout-one","optin-layout-two","optin-layout-three","optin-layout-four"];return Optin.template(t[e])},Optin.View.Alert=Backbone.View.extend({template:Optin.template("optin-alert-modal"),events:{"click .inc-opt-alert-modal-close":"close","click .inc-opt-alert-modal":"close","click .inc-opt-alert-modal-close-btn":"close","click .inc-opt-alert-modal-inner-container":"prevent_close"},initialize:function(e){return this.options=e,this.render()},render:function(){this.$el.html(this.template(_.extend({close_text:optin_vars.messages.ok},this.options))),this.$el.appendTo("body")},close:function(e){this.$el.hide(),this.remove()},prevent_close:function(e){e.preventDefault(),e.stopPropagation()}}),Optin.hasChanges=!1,Optin.user_change=function(){Optin.hasChanges=!0},window.onbeforeunload=function(){if(Optin.hasChanges)return optin_vars.messages.dont_navigate_away},Optin.step=Optin.step||{},Optin.step.activate_step=function(t){e(".wpoi-tabs-menu li").removeClass("active"),e(".wpoi-tabs-menu li").removeClass("before"),e(".wpoi-tabs-menu li").eq(t).addClass("active"),e(".wpoi-tabs-menu li").slice(0,t).addClass("before"),e(".wpoi-tabs-wrap > div").hide(),e(".wpoi-tabs-wrap > div").eq(t).show(),Optin.step.current=t},Optin.step.get_current_step=function(){return parseInt(Optin.step.current||0,10)},Optin.step.get_current=function(){return parseInt(Optin.step.current||0,10)},Optin.step.get_current_step=function(){switch(this.get_current){case 0:return Optin.step.services;case 1:return Optin.step.design;case 2:return Optin.step.display}}}(jQuery),Hustle.define("Custom_Content.After_Content_View",function(e,t,i){"use strict";return Hustle.View.extend(_.extend({},Hustle.get("Mixins.Model_Updater"),{template:Hustle.template("wpoi-custom-content-after-content-tpl"),message_editor:!1,events:{'change [name="animate"]':"toggle_animation"},init:function(e){return this.type=e.type,this.conditions_view=e.conditions_view,this.listenTo(this.model,"change:enabled",this.toggle_panel),this.conditions_view.on("toggle_condition",this.update_conditions_label),this.conditions_view.on("change:update_view_label",this.update_conditions_label),this.render()},render:function(){return this.$el.html(this.template(_.extend({},{type:this.type,type_name:optin_vars.messages.settings[this.type],condition_labels:this.conditions_view.get_all_conditions_labels()},this.model.toJSON()))),this.$(".wph-conditions").replaceWith(this.conditions_view.$el),_.isFalse(this.model.enabled)&&this.$el.find("#wph-after-content-condition-labels").hide(),this.toggle_animation(),this},toggle_panel:function(e){this.$(".switch-wrap").toggleClass("open closed"),this.$el.find("#wph-after-content-condition-labels").toggle()},update_conditions_label:function(t){e("#wph-after-content-condition-labels").html(t.get_all_conditions_labels())},toggle_animation:function(){var e=this.$('[name="animate"]:checked'),t="false"===e.val(),i=this.$("#optin-afterc-animation-block");i[t?"hide":"show"]()}}))}),Hustle.define("Custom_Content.Content_View",function(e,t,i){"use strict";return Hustle.View.extend(_.extend({},Hustle.get("Mixins.Model_Updater"),{template:Optin.template("wpoi-custom-content-content-tpl"),message_editor:!1,skip_tinyMCE_sync:!1,init:function(e){return this.design_model=e.design_model,this.sync_message(),this.listenTo(Hustle.Events,"CC.save_changes",this.sync_model_message),this.listenTo(Hustle.Events,"CC.opening_preview",this.sync_model_message),this.render()},render:function(e){this.setElement(this.template(_.extend({},this.model.toJSON(),this.design_model.toJSON())));var t=Hustle.get("Media_Holder");return this.media_holder=new t({model:this.design_model,attribute:"image"}),this.$(".wph-media--holder").html(this.media_holder.$el),this.listenTo(this.model,"change:optin_message",_.throttle(this.update_content,50)),this},sync_message:function(){var e=this,t=setInterval(function(){"object"==typeof tinyMCE&&(clearInterval(t),tinyMCE.on("AddEditor",function(t){e.message_editor=tinyMCE.get("optin_message"),e.message_editor.on("change",function(t){e.model.set("optin_message",e.message_editor.getContent())})}))})},sync_model_message:function(){this.skip_tinyMCE_sync||"object"==typeof tinyMCE&&(this.message_editor||(this.message_editor=tinyMCE.get("optin_message")),this.model.set("optin_message",this.message_editor.getContent()))},update_content:function(){var t=this;e.ajax({url:ajaxurl,type:"get",data:{action:"hustle_CC_parse_content",html:t.model.get("optin_message")},success:function(e){e.success&&t.model.set("content",e.data)}})}}))}),Hustle.define("Custom_Content.Design_View",function(e,t,i){"use strict";return Hustle.View.extend(_.extend({},Hustle.get("Mixins.Model_Updater"),{template:Optin.template("wpoi-custom-content-design-tpl"),media_frame:!1,css_editor:!1,stylables:{".wph-modal.wph-modal-container .wph-modal--content ":"Container",".wph-modal.wph-modal-container.wph-customize-css h2.wph-modal--title ":"Title",".wph-modal.wph-modal-container.wph-customize-css .wph-modal--content h4.wph-modal--subtitle ":"Subtitle",".wph-modal .wph-modal--content .wph-modal--message ":"Content",".wph-modal .wph-modal--content .wph-modal--image ":"Image Container",".wph-modal.wph-modal-container.wph-customize-css .wph-modal--content .wph-modal--image img ":"Image",".wph-modal .wph-modal--cta ":"CTA Button",".wph-modal .wph-modal-never-see-again ":"Never See Again"},stylable_elements:_({main_bg_color:".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content",title_color:".wph-modal.wph-modal--cabriolet .wph-modal--content h2.wph-modal--title, .wph-modal.wph-modal--simple .wph-modal--content header h2.wph-modal--title, .wph-modal.wph-modal--minimal .wph-modal--content h2.wph-modal--title",subtitle_color:".wph-modal.wph-modal--cabriolet .wph-modal--content h4.wph-modal--subtitle, .wph-modal.wph-modal--simple .wph-modal--content header h4.wph-modal--subtitle, .wph-modal.wph-modal--minimal .wph-modal--content header h4.wph-modal--subtitle",link_static_color:".wph-modal .wph-modal--message a, .wph-modal.wph-modal--cabriolet .wph-modal--content .wph-modal--message a:not(.wph-modal--cta), .wph-modal.wph-modal--simple .wph-modal--content .wph-modal--message a:not(.wph-modal--cta), .wph-modal.wph-modal--minimal .wph-modal--content .wph-modal--message a:not(.wph-modal--cta)",link_hover_color:".wph-modal .wph-modal--message a:hover, .wph-modal.wph-modal--cabriolet section .wph-modal--message a:not(.wph-modal--cta):hover, .wph-modal.wph-modal--simple .wph-modal--content .wph-modal--message a:not(.wph-modal--cta):hover, .wph-modal.wph-modal--minimal .wph-modal--content a:not(.wph-modal--cta):hover",link_active_color:".wph-modal .wph-modal--message a:active, .wph-modal.wph-modal--cabriolet section .wph-modal--message a:not(.wph-modal--cta):active, .wph-modal.wph-modal--simple .wph-modal--content .wph-modal--message a:not(.wph-modal--cta):active, .wph-modal.wph-modal--minimal .wph-modal--content a:not(.wph-modal--cta):active",cta_static_background:".wph-modal .wph-modal--cta, .wph-modal .wph-modal--message a.wph-modal--cta",cta_hover_background:".wph-modal .wph-modal--cta:hover, .wph-modal .wph-modal--message a.wph-modal--cta:hover",cta_active_background:".wph-modal .wph-modal--cta:active, .wph-modal .wph-modal--message a.wph-modal--cta:active",cta_static_color:".wph-modal .wph-modal--cta, .wph-modal .wph-modal--message a.wph-modal--cta",cta_hover_color:".wph-modal .wph-modal--cta:hover, .wph-modal .wph-modal--message a.wph-modal--cta:hover",cta_active_color:".wph-modal .wph-modal--cta:active, .wph-modal .wph-modal--message a.wph-modal--cta:active",border_static_color:".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content",border_radius:".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content",border_weight:".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content",border_type:".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content",drop_shadow_color:".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content",drop_shadow_x:".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content",drop_shadow_y:".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content",drop_shadow_blur:".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content",drop_shadow_spread:".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content",custom_height:".wph-modal.wph-modal--popup, .wph-modal.wph-modal--popup .wph-modal--content",custom_width:".wph-modal.wph-modal--popup, .wph-modal.wph-modal--popup .wph-modal--content"}),events:{"click .wph-stylable-element":"insert_stylable_element"},init:function(){return this.on("rendered",this.create_color_pickers),this.listenTo(this.model,"change:customize_colors",this.render),this.listenTo(this.model,"change:customize_css",this.render),this.listenTo(this.model,"change:customize_size",this.render),this.listenTo(this.model,"change:border",this.render),this.listenTo(this.model,"change:drop_shadow",this.render),
|
3 |
this.listenTo(this.model,"change:style",this.render),this.listenTo(this.model,"change",this.apply_styles),this.render()},render:function(){return this.$el.html(this.template(_.extend({},this.model.toJSON(),{stylables:this.stylables}))),this.apply_styles(),this.create_css_editor(),this},create_color_pickers:function(){this.$(".wph-color-picker").wpColorPicker({change:function(t,i){var s=e(this);s.val(i.color.toCSS()).trigger("change")}})},get_layout_colors:function(){return!!_.isTrue(this.model.get("customize_colors"))&&_(this.model.toJSON()).reduce(function(e,t,i){return _.indexOf(["drop_shadow_color"],i)!==-1||/^border_/.test(i)||/^drop_/.test(i)?e:((/_background$/.test(i)||/_color$/.test(i)||/_background_color$/.test(i))&&(e[i]=t),e)},{})},apply_styles:_.debounce(function(){var t=this,i=this.model.toJSON(),s=this.get_layout_colors(),n="",o=e("#hustle-css-preview-styles").length?e("#hustle-css-preview-styles"):e('<style id="hustle-css-preview-styles">').appendTo("body");if(_.isEmpty(s)||_.each(s,function(e,i){var s=/_background$/.test(i)||/_background_color$/.test(i)||/_bg_color/.test(i)?"background":"color",o=t.stylable_elements.result(i);o&&(n+=o+"{ "+s+": "+e+";} ")}),_.isTrue(i.border)){var a=Hustle.create_template(" {{el}} {border:{{weight}}px {{type}} {{color}}; }"),l=Hustle.create_template(" {{el}} {border-radius:{{radius}}px; }");_(["border_static_color"]).each(function(e,t){n+=a({el:this.stylable_elements.result(e),weight:i.border_weight,type:i.border_type,color:i[e]})}.bind(this)),n+=l({el:this.stylable_elements.result("border_radius"),radius:i.border_radius})}if(_.isTrue(i.drop_shadow)){var r=Hustle.create_template(" {{el}} {box-shadow:{{x}}px {{y}}px {{blur}}px {{spread}}px {{color}}; }");n+=r({el:this.stylable_elements.result("drop_shadow_color"),x:i.drop_shadow_x,y:i.drop_shadow_y,blur:i.drop_shadow_blur,spread:i.drop_shadow_spread,color:i.drop_shadow_color})}_.isTrue(i.customize_css)&&(n+=i.custom_css),o.html(n)},10),create_css_editor:_.debounce(function(){_.isFalse(this.model.get("customize_css"))||(this.css_editor=ace.edit("hustle_custom_css"),this.css_editor.getSession().setMode("ace/mode/css"),this.css_editor.setTheme("ace/theme/solarized_light"),this.css_editor.getSession().setUseWrapMode(!0),this.css_editor.getSession().setUseWorker(!1),this.css_editor.setShowPrintMargin(!1),this.css_editor.renderer.setShowGutter(!0),this.css_editor.setHighlightActiveLine(!0),this.css_editor.on("blur",e.proxy(this.update_custom_css,this)))},0),update_custom_css:function(){this.css_editor&&this.model.set("custom_css",this.css_editor.getValue())},insert_stylable_element:function(t){t.preventDefault();var i=e(t.target),s=i.data("stylable")+"{}";this.css_editor.navigateFileEnd(),this.css_editor.insert(s),this.css_editor.navigateLeft(1),this.css_editor.focus()}}))}),Hustle.define("Custom_Content.Listing",function(e,t,i){"use strict";var s=Hustle.get("Delete_Confirmation");return Backbone.View.extend({el:"#wph-ccontent--modules",events:{"click .wph-accordions header":"toggle_accordion","change .custom-content-toggle-activity":"toggle_activity","change .custom-content-toggle-tracking-activity":"toggle_tracking_activity","change .custom-content-toggle-type-activity":"toggle_type_activity","change .custom-content-toggle-test-activity":"toggle_test_activity","click .custom-content-edit":"edit","click .custom-content-delete":"delete"},delete_confirmations:{},initialize:function(){e(t).on("click","#hustle-legacy-popup-notice button.notice-dismiss",this.dismiss_legacy_popup_notice)},dismiss_legacy_popup_notice:function(t){var i=e(t.target).closest("#hustle-legacy-popup-notice"),s=i.data("nonce");e.ajax({url:ajaxurl,type:"POST",data:{action:"hustle_custom_content_dismiss_legacy_notice",_ajax_nonce:s}})},toggle_accordion:function(t){if(_.indexOf(["wph-accordion--animate_buttons","wph-icon i-arrow"],t.target.className)!==-1){var i=e(t.target),s=i.find(".dev-icon"),n=i.closest("li");n.find("section");s.toggleClass("dev-icon-caret_down dev-icon-caret_up"),n.toggleClass("wph-accordion--closed wph-accordion--open"),n.siblings("li.wph-accordion--open").toggleClass("wph-accordion--closed wph-accordion--open")}},toggle_activity:function(t){t.stopPropagation();var i=e(t.target),s=i.data("id"),n=i.data("nonce"),o=i.is(":checked");i.attr("disabled",!0),e.ajax({url:ajaxurl,type:"POST",data:{action:"hustle_custom_content_toggle_activity",id:s,_ajax_nonce:n},complete:function(){i.attr("disabled",!1)},success:function(e){e.success||i.attr("checked",!o)},error:function(){i.attr("checked",!o)}})},toggle_tracking_activity:function(t){t.stopPropagation();var i=e(t.target),s=i.data("id"),n=i.data("nonce"),o=i.data("type"),a=i.is(":checked");i.attr("disabled",!0),e.ajax({url:ajaxurl,type:"POST",data:{action:"hustle_custom_content_toggle_tracking_activity",id:s,type:o,_ajax_nonce:n},complete:function(){i.attr("disabled",!1)},success:function(e){e.success||i.attr("checked",!a)},error:function(e){e.success||i.attr("checked",!a)}})},toggle_type_activity:function(t){t.stopPropagation();var i=e(t.target),s=i.data("id"),n=i.data("nonce"),o=i.data("type"),a=i.is(":checked");i.attr("disabled",!0),e.ajax({url:ajaxurl,type:"POST",data:{action:"hustle_custom_content_toggle_type_activity",id:s,type:o,_ajax_nonce:n},complete:function(){i.attr("disabled",!1)},success:function(e){e.success||i.attr("checked",!a)},error:function(e){e.success||i.attr("checked",!a)}})},toggle_test_activity:function(t){t.stopPropagation();var i=e(t.target),s=i.data("id"),n=i.data("nonce"),o=i.data("type"),a=i.is(":checked");i.attr("disabled",!0),e.ajax({url:ajaxurl,type:"POST",data:{action:"hustle_custom_content_toggle_test_activity",id:s,type:o,_ajax_nonce:n},complete:function(){i.attr("disabled",!1)},success:function(e){e.success||i.attr("checked",!a)},error:function(e){e.success||i.attr("checked",!a)}})},edit:function(e){e.stopPropagation()},"delete":function(e){e.stopPropagation();var t=this.$(e.target);if(!t.prev(".hustle-delete-module-confirmation").length){var i=t.closest("li.wph-accordions--item"),n=(t.data("id"),new s({id:t.data("id"),nonce:t.data("nonce"),action:"hustle_custom_content_delete",onSuccess:function(e){e.success&&(n.remove(),i.toggle("highlight"))}}));t.before(n.$el)}}})}),Hustle.define("Custom_Content.Models",function(){"use strict";var e=Hustle.get("Models.M").extend({defaults:{optin_name:"",optin_title:"",subtitle:"",optin_message:"Type your content here ...",content:"",optin_provider:"custom_content",api_key:"",mail_list:"",active:1,test_mode:0}}),t=Hustle.get("Models.M").extend({defaults:{style:"cabriolet",customize_colors:0,customize_css:0,custom_css:"",main_bg_color:"rgba(255,255,255,1)",title_color:"rgba(51,51,51,1)",subtitle_color:"rgba(51,51,51,1)",link_static_color:"#1FC5B6",link_hover_color:"#15A296",link_active_color:"#15A296",cta_static_background:"#1FC5B6",cta_hover_background:"#15A296",cta_active_background:"#15A296",cta_static_color:"rgba(255,255,255,1)",cta_hover_color:"rgba(255,255,255,1)",cta_active_color:"rgba(255,255,255,1)",border:!0,border_radius:5,border_weight:3,border_type:"solid",border_static_color:"rgba(218,218,218,1)",border_hover_color:"rgba(218,218,218,1)",border_active_color:"rgba(218,218,218,1)",drop_shadow:!1,drop_shadow_x:0,drop_shadow_y:0,drop_shadow_blur:0,drop_shadow_spread:0,drop_shadow_color:"rgba(0,0,0,0)",image:"",hide_image_on_mobile:!1,image_position:"left",cta_label:"",cta_url:"",cta_target:"_blank",customize_size:!1,custom_height:300,custom_width:600}}),i=Hustle.get("Models.Trigger"),s=Hustle.get("Models.M").extend({defaults:{enabled:!1,conditions:"",triggers:"",animation_in:"",animation_out:"",make_fullscreen:!1,add_never_see_link:!1,close_btn_as_never_see:!1,allow_scroll_page:!1,not_close_on_background_click:!1,expiration_days:365,on_submit:"default"},initialize:function(e){if(_.extend(this,e),this.get("triggers")instanceof Backbone.Model||this.set("triggers",new i(this.triggers)),!(this.get("conditions")instanceof Backbone.Model)){_.isEmpty(this.get("conditions"))&&_.isArray(this.get("conditions"))&&(this.conditions={});var t=Hustle.get("Model");this.set("conditions",new t(this.conditions))}this.on("change",this.user_has_change,this)}}),n=s.extend({defaults:{enabled:!1,animate:!1,animation:"",on_submit:""}}),o=s.extend(),a=s.extend({defaults:{enabled:!1,conditions:"",triggers:"",animation_in:"",animation_out:"",make_fullscreen:!1,add_never_see_link:!1,close_btn_as_never_see:!1,expiration_days:0,on_submit:"refresh_or_close",hide_after:!0,hide_after_val:10,hide_after_unit:"seconds",position:"bottom_right",after_close:"keep_showing"}}),l=s.extend();return{Content:e,Design:t,TypeBase:s,AfterContent:n,Popup:o,Slide_In:a,Magic_Bar:l}}),Hustle.define("Custom_Content.Popup_View",function(e,t,i){"use strict";return Hustle.View.extend(_.extend({},Hustle.get("Mixins.Model_Updater"),{template:Hustle.template("wpoi-custom-content-popup-tpl"),message_editor:!1,init:function(e){return this.type=e.type,this.display_triggers_view=e.display_triggers_view,this.conditions_view=e.conditions_view,this.listenTo(this.model,"change:enabled",this.toggle_panel),this.conditions_view.on("toggle_condition",this.update_conditions_label),this.conditions_view.on("change:update_view_label",this.update_conditions_label),this.render()},render:function(){return this.$el.html(this.template(_.extend({},{type:this.type,type_name:optin_vars.messages.settings[this.type],condition_labels:this.conditions_view.get_all_conditions_labels()},this.model.toJSON()))),this.$(".wph-trigger").html(this.display_triggers_view.$el),this.$(".wph-conditions").replaceWith(this.conditions_view.$el),_.isFalse(this.model.enabled)&&this.$el.find("#wph-popup-condition-labels").hide(),this},toggle_panel:function(e){this.$(".switch-wrap").toggleClass("open closed"),this.$el.find("#wph-popup-condition-labels").toggle()},update_conditions_label:function(t){e("#wph-popup-condition-labels").html(t.get_all_conditions_labels())}}))}),Hustle.define("Custom_Content.Preview",function(e){"use strict";return Backbone.View.extend({el:".wph-preview",preview_modal:!1,$preview_yield:!1,events:{"click .wph-preview--mask":"hide","click .wph-preview--close":"hide","change #wph-preview-type-selector":"change_type"},initialize:function(){this.$preview_yield=this.$("#wph-preview-yield"),this.render(),this.listenTo(this.preview_modal.model,"all",this.render)},render:function(){var e=Hustle.get("Modal");this.preview_modal=new e({model:this.model}),this.$preview_yield.replaceWith(this.preview_modal.$el),this.$preview_yield=this.preview_modal.$el,this.preview_modal.show(),this.$("#wph-preview-type-selector").val(this.model.get("type")),Hustle.Events.trigger("view.rendered",this)},show:function(){this.$el.removeClass("wph-preview--closed").addClass("wph-preview--open")},hide:function(e){this.$el.removeClass("wph-preview--open").addClass("wph-preview--closed")},change_type:function(e){this.preview_modal.model.set("type",this.$(e.target).val()),Hustle.Events.trigger("cc.type_changed",this)}})}),Hustle.define("Custom_Content.Slide_In_View",function(e,t,i){"use strict";return Hustle.View.extend(_.extend({},Hustle.get("Mixins.Model_Updater"),{template:Hustle.template("wpoi-custom-content-slide_in-tpl"),message_editor:!1,init:function(e){return this.type=e.type,this.display_triggers_view=e.display_triggers_view,this.conditions_view=e.conditions_view,this.listenTo(this.model,"change:enabled",this.toggle_panel),this.listenTo(this.model,"change:position",this.update_slide_in_position_label),this.conditions_view.on("toggle_condition",this.update_conditions_label),this.conditions_view.on("change:update_view_label",this.update_conditions_label),this.render()},render:function(){return this.model.set("position_label",optin_vars.messages.positions[this.model.get("position")],{silent:!0}),this.$el.html(this.template(_.extend({},{type:this.type,type_name:optin_vars.messages.settings[this.type],condition_labels:this.conditions_view.get_all_conditions_labels()},this.model.toJSON()))),this.$(".wph-trigger").html(this.display_triggers_view.$el),this.$(".wph-conditions").replaceWith(this.conditions_view.$el),_.isFalse(this.model.enabled)&&this.$el.find("#wph-slide-in-condition-labels").hide(),this},toggle_panel:function(e){this.$(".switch-wrap").toggleClass("open closed"),this.$el.find("#wph-slide-in-condition-labels").toggle()},update_slide_in_position_label:function(e){this.$("#wpoi-slide_in-position-label").text(optin_vars.messages.positions[this.model.get("position")])},update_conditions_label:function(t){e("#wph-slide-in-condition-labels").html(t.get_all_conditions_labels())}}))}),Hustle.define("Custom_Content.View",function(e,t,i){"use strict";return Hustle.View.extend({el:".wph-custom-content",message_box_tpl:Optin.template("wpoi-custom-content-message-box-tp"),preview:!1,preview_model:!1,initial_data:new Backbone.Model({content:"",design:"",popup:"",slide_in:"",magic_bar:""}),events:{"click .wph-toggletabs .can-open":"toggle_accordion","click #save-and-next":"save_and_next","click #next-step":"save_and_next","click #save-and-finish":"save_and_finish","click #finish-setup":"save_and_finish","click .wph-preview--eye.wph-button":"open_preview","click .wph-js-cancel-design-changes":"cancel_changes","click .wph-js-back":"go_back","click .wph-triggers--options label":"handle_triggers","click button#optin_message-tmce":"tinyMCE_toggled","change textarea#optin_message":"text_area_update","keyup [data-attribute='optin_name']":"remove_error"},init:function(e){return this.content_view=e.content_view,this.design_view=e.design_view,this.after_content_view=e.after_content_view,this.popup_view=e.popup_view,this.slide_in=e.slide_in,this.magic_bar=e.magic_bar,this.update_initial_state(),this.listenTo(this.model,"change",this.render_message_box),this.listenTo(this.content_view.model,"change",this.enable_cancel),this.listenTo(this.content_view.model,"change:content",this._set_preview_model),this.listenTo(Hustle.Events,"cc.type_changed",this.apply_proper_preview_styles),this.listenTo(this.design_view.model,"change",this.enable_cancel),this.render_message_box(),this.render()},tinyMCE_toggled:function(e){this.content_view.skip_tinyMCE_sync=!1},text_area_update:function(t){this.content_view.model.set("optin_message",e(t.target).val()),this.content_view.model.set("content",e(t.target).val()),this.content_view.skip_tinyMCE_sync=!0},handle_triggers:function(t){var i=e(t.target),s=i.closest("li"),n=s.siblings();n.removeClass("current"),s.addClass("current")},update_initial_state:function(){_.extend(this.initial_data,{content:this.content_view.model.toJSON(),design:this.design_view.model.toJSON(),popup:this.popup_view.model.toJSON(),slide_in:this.slide_in.model.toJSON(),magic_bar:this.magic_bar.model.toJSON()})},enable_cancel:_.throttle(function(){},50),render:function(){e(t).on("click","#hustle-legacy-popup-notice button.notice-dismiss",this.dismiss_legacy_popup_notice),this.content_view.delegateEvents(),this.design_view.delegateEvents(),this.$("#wph-ccontent--designtab .wph-toggletabs--content").append(this.content_view.$el).append(this.design_view.$el);var i=this.$("#wph-ccontent-after-content-container").attr("class");this.$("#wph-ccontent-after-content-container").replaceWith(this.after_content_view.$el.addClass(i).attr("id","wph-ccontent-after-content-container"));var s=this.$("#wph-ccontent-popup-container").attr("class");this.$("#wph-ccontent-popup-container").replaceWith(this.popup_view.$el.addClass(s).attr("id","wph-ccontent-popup-container"));var n=this.$("#wph-ccontent-slide_in-container").attr("class");this.$("#wph-ccontent-slide_in-container").replaceWith(this.slide_in.$el.addClass(n).attr("id","wph-ccontent-slide_in-container"));var o=this.$("#wph-ccontent-magic_bar-container").attr("class");this.$("#wph-ccontent-magic_bar-container").replaceWith(this.magic_bar.$el.addClass(o).attr("id","wph-ccontent-magic_bar-container"))},render_message_box:function(){var e=this._get_shortcode_id();this.$("#wph-ccontent--messagebox").html(this.message_box_tpl({shortcode_id:e}))},toggle_accordion:function(t){t.preventDefault();var i=e(t.target),s=e(".wph-toggletabs"),n=i.closest(".wph-toggletabs"),o=s.not(n),a=n.find(".dev-icon-caret_down, .dev-icon-caret_up");o.removeClass("wph-toggletabs--open"),o.find(".dev-icon-caret_up").removeClass("dev-icon-caret_up").addClass("dev-icon-caret_down"),n.toggleClass("wph-toggletabs--open wph-toggletabs--closed"),a.toggleClass("dev-icon-caret_down dev-icon-caret_up")},_get_shortcode_id:function(){return this.model.get("optin_name").trim().toLowerCase().replace(/\s+/g,"-")},dismiss_legacy_popup_notice:function(t){var i=e(t.target).closest("#hustle-legacy-popup-notice"),s=i.data("nonce");e.ajax({url:ajaxurl,type:"POST",data:{action:"hustle_custom_content_dismiss_legacy_notice",_ajax_nonce:s}})},_save:function(t){var i=(t.next().hasClass("wph-button-finish")?t.outerWidth()+1:t.outerWidth(),t.data("id"));return e.ajax({url:ajaxurl,type:"POST",data:{action:"hustle_custom_content_save",_ajax_nonce:t.data("nonce"),id:t.data("id"),content:this.content_view.model.toJSON(),design:this.design_view.model.toJSON(),after_content:this.after_content_view.model.toJSON(),popup:this.popup_view.model.toJSON(),slide_in:this.slide_in.model.toJSON(),magic_bar:this.magic_bar.model.toJSON(),shortcode_id:this._get_shortcode_id()},complete:function(e){if(t.attr("disabled",!1).removeClass("wph-button-next--loading").removeClass("wph-button-save--loading"),Optin.hasChanges=!1,i==-1){var s=window.location.pathname+window.location.search;s=s.replace("id=-1","id="+e.responseJSON.data),window.history.replaceState({},"",s)}}})},save_and_next:function(t){if(t.preventDefault(),Hustle.Events.trigger("CC.save_changes"),this.validate()){var i=this,s=this.$(t.target).closest("button");s.attr("disabled",!0),s.is("#save-and-next")?s.addClass("wph-button-save--loading"):s.addClass("wph-button-next--loading"),s.siblings().each(function(){e(this).attr("disabled",!0)}),this._save(s).done(function(n){n.success&&(i.$("#next-step").data("id",n.data),i.$("#save-and-next").data("id",n.data),i.$("#save-and-finish").data("id",n.data),i.$("#finish-setup").data("id",n.data),i.update_initial_state(),s.is("#next-step")&&i.next_step(t),_.delay(function(){s.siblings().each(function(){e(this).attr("disabled",!1)})},300)),Optin.hasChanges=!1})}},next_step:function(e){e.preventDefault(),this.$("#wph-ccontent--settingstab .wph-toggletabs--title.can-open span").click()},save_and_finish:function(t){if(Hustle.Events.trigger("CC.save_changes"),t.preventDefault(),this.validate()){var i=this,s=this.$(t.target).closest("button");parseInt(s.data("id"))==-1;s.attr("disabled",!0),s.is("#save-and-finish")?s.addClass("wph-button-save--loading"):s.addClass("wph-button-next--loading"),s.siblings().each(function(){e(this).attr("disabled",!0)}),this._save(s).done(function(t){t.success&&(i.$("#next-step").data("id",t.data),i.$("#save-and-next").data("id",t.data),i.$("#save-and-finish").data("id",t.data),i.$("#finish-setup").data("id",t.data),s.is("#finish-setup")&&i.finish_setup(s),_.delay(function(){s.siblings().each(function(){e(this).attr("disabled",!1)})},300)),Optin.hasChanges=!1})}},finish_setup:function(e){var t=parseInt(e.data("id"))==-1;window.onbeforeunload=null;var i="?page=inc_hustle_custom_content";i+=t?"&new_id="+e.data("id"):"&updated_id="+e.data("id"),window.location.replace(i)},remove_error:function(){this.$(".dashicons-warning").remove()},validate:function(){var t,i=!0,s=(this.design_view.model.get("cta_url"),this.$('[data-attribute="optin_name"]'));return s.val()||(t=e('<span class="dashicons dashicons-warning">').attr("title",optin_vars.messages.custom_content.no_name),s.after(t),i=!1),i&&e("span.dashicons.dashicons-warning").remove(),i},_set_preview_model:function(){return this.preview_model?void this.preview_model.set(_.extend({},{type:"popup"},this.design_view.model.toJSON(),this.content_view.model.toJSON(),{optin_message:this.content_view.model.get("content")},{types:{popup:this.popup_view.model.toJSON(),slide_in:this.slide_in.model.toJSON(),after_content:this.after_content_view.model.toJSON()}})):void(this.preview_model=new Backbone.Model(_.extend({},{id:this.content_view.model.get("optin_id"),type:"popup"},this.design_view.model.toJSON(),this.content_view.model.toJSON(),{optin_message:this.content_view.model.get("content")},{types:{popup:this.popup_view.model.toJSON(),slide_in:this.slide_in.model.toJSON(),after_content:this.after_content_view.model.toJSON()}})))},open_preview:function(e){if(Hustle.Events.trigger("CC.opening_preview"),this.validate()){if(this._set_preview_model(),this.preview)this.preview.render(),this.preview.show();else{var t=Hustle.get("Custom_Content.Preview");this.preview=new t({model:this.preview_model}),this.preview.show()}this.apply_custom_css();var i=this;setTimeout(function(){i.apply_proper_preview_styles()},500)}},cancel_changes:function(e){window.onbeforeunload=null,window.location.replace("?page=inc_hustle_custom_content")},go_back:function(e){this.$("#wph-ccontent--designtab .wph-toggletabs--title.can-open span").click()},apply_proper_preview_styles:function(){var t=this;e(".wph-modal").each(function(){var i=e(this),s=i.find(".wph-modal--content"),n=i.find(".wph-modal--content > section"),o=s.find("section > figure"),a=i.find(".wph-modal--content > figure"),l=o.find("img"),r=a.find("img"),c=i.hasClass("wph-modal--cabriolet")&&(o.hasClass("wph-modal--image_full")||o.hasClass("wph-modal--image")&&l.height()<o.height()),d=i.hasClass("wph-modal--simple")&&(a.hasClass("wph-modal--image_full")||a.hasClass("wph-modal--image")&&r.height()<a.height()),p=i.hasClass("wph-modal--minimal")&&(o.hasClass("wph-modal--image_full")||o.hasClass("wph-modal--image")&&l.height()<o.height());(c||p)&&l.css({height:n.height()+"px",width:n.width()+"px"}),d&&r.css({height:s.height()+"px",width:s.width()+"px"});var h=t.design_view.model.toJSON(),u=i.find(".wph-modal--content header"),g=i.find(".wph-modal--content footer"),m=i.find(".wph-modal--content"),w=i.find(".wph-modal--content .wph-modal--message"),v=i.find(".wph-modal--content section"),f=i.find(".wph-modal--content .wph-modal--image"),b=i.find(".wph-modal--content .wph-modal--image img"),y=parseInt(h.custom_width),x=parseInt(h.custom_height),k=_.isTrue(h.border)?2*parseInt(h.border_weight):0;_.isTrue(h.customize_size)&&(i.css("width",y+"px"),i.css("max-width","none"),i.hasClass("wph-modal--cabriolet")&&(w.outerHeight(x-u.outerHeight(!0)-k),f.outerHeight(w.outerHeight(!0)),b.outerHeight(w.outerHeight(!0))),i.hasClass("wph-modal--simple")&&(m.outerHeight(x),f.outerHeight(m.height()),b.outerHeight(m.height())),i.hasClass("wph-modal--minimal")&&(v.outerHeight(x-(u.outerHeight(!0)+g.outerHeight(!0))-k),f.outerHeight(v.outerHeight(!0)),b.outerHeight(v.outerHeight(!0))))})},apply_custom_css:function(){if(this.design_view.css_editor){var t=e("#hustle-cc-custom-styles").length?e("#hustle-cc-custom-styles"):e('<style id="hustle-cc-custom-styles">').appendTo("body"),i=this.design_view.css_editor.getValue();e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"hustle_CC_prepare_custom_css",css:i,_ajax_nonce:e("#hustle_custom_css").data("nonce")},success:function(e){e&&e.success&&t.html(e.data)},error:function(){}})}}})}),Hustle.define("Social_Sharing.Appearance_View",function(e,t,i){"use strict";return Hustle.View.extend(_.extend({},Hustle.get("Mixins.Model_Updater"),{template:Optin.template("wpoi-social-sharing-appreance-tpl"),init:function(e){return this.on("rendered",this.create_color_pickers),this.listenTo(Hustle.Events,"SS.appearance_view_ready",this.ready),this.render()},render:function(e){return this.service_model_json=window.services_model.toJSON(),this._handle_icons_order(),this.setElement(this.template(_.extend({},this.model.toJSON(),this.service_model_json))),this},create_color_pickers:function(){this.$(".wph-color-picker").wpColorPicker({change:function(t,i){var s=e(this);s.val(i.color.toCSS()).trigger("change")}})},ready:function(){var t=this.service_model_json.social_icons,i=this.$(".wph-sshare-reorder_box"),s=this.model.get("icon_style"),n=this.$(".wph-sshare-floating-social--preview_box"),o=n.find(".wph-sshare--container"),a=this.$(".wph-sshare-widget--preview_box"),l=a.find(".wph-sshare--container");_.each(t,e.proxy(function(e,t){var n="one"==s?Optin.template("wpoi-sshare-"+t+"-one-svg"):Optin.template("wpoi-sshare-"+t+"-svg"),a=n(),r='<div class="wph-sshare-reorder_item" data-id="'+t+'">'+a+"</div>";i.append(r);var c=a,d="";"native"==this.service_model_json.service_type&&(_.isTrue(this.service_model_json.click_counter)&&(c+='<div class="wph-sshare_social_counter"><span>'+e.counter+"</span></div>"),d="native-social-share");var p='<a data-social="'+t+'" href="#" class="'+d+'" target="_blank">'+c+"</a>";o.append(p);var h='<a data-social="'+t+'" href="#" class="'+d+'" target="_blank">'+c+"</a>";l.append(h)},this)),this.make_icons_sortable(),"native"==this.service_model_json.service_type&&("1"==this.model.get("floating_inline_count")?o.addClass("wph-sshare--count_inline"):o.addClass("wph-sshare--count_block"),"1"==this.model.get("widget_inline_count")?l.addClass("wph-sshare--count_inline"):l.addClass("wph-sshare--count_block"))},make_icons_sortable:function(){var e=this,t={items:".wph-sshare-reorder_item",revert:!0,axis:"x",containment:this.$("#wph-sshare-icons_reorder"),stop:function(t,i){e._reorder_icons()}};this.$(".wph-sshare-reorder_box").sortable(t).disableSelection()},_handle_icons_order:function(){var e={},t=this.service_model_json.social_icons,i=this.model.get("icons_order"),s=i.split(",");i&&s.length&&(_.each(s,function(i,s){"undefined"!=typeof t[i]&&(e[i]=t[i],t=_.pick(t,function(e,t){if(i!==t)return t=e}))}),Object.keys(t).length&&(e=_.extend(e,_.pick(t,function(e,t){if("undefined"!=typeof e)return t=e}))),this.service_model_json.social_icons=e)},_reorder_icons:function(){var t=[];this.$(".wph-sshare-reorder_box").find(".wph-sshare-reorder_item").each(function(){t.push(e(this).data("id"))}),this.model.set("icons_order",t.join())}}))}),Hustle.define("Social_Sharing.Floating_View",function(e,t,i){"use strict";return Hustle.View.extend(_.extend({},Hustle.get("Mixins.Model_Updater"),{template:Hustle.template("wpoi-social-sharing-floating-tpl"),message_editor:!1,events:{'change [name="animate"]':"toggle_animation"},init:function(e){return this.type=e.type,this.conditions_view=e.conditions_view,this.listenTo(this.model,"change:enabled",this.toggle_panel),this.conditions_view.on("toggle_condition",this.update_conditions_label),this.conditions_view.on("change:update_view_label",this.update_conditions_label),this.render()},render:function(){return this.$el.html(this.template(_.extend({},{type:this.type,type_name:optin_vars.messages.settings[this.type],condition_labels:this.conditions_view.get_all_conditions_labels()},this.model.toJSON()))),this.$(".wph-conditions").replaceWith(this.conditions_view.$el),_.isFalse(this.model.enabled)&&this.$el.find("#wph-floating-social-condition-labels").hide(),this.toggle_animation(),this},toggle_panel:function(e){this.$(".switch-wrap").toggleClass("open closed"),this.$el.find("#wph-floating-social-condition-labels").toggle()},update_conditions_label:function(t){e("#wph-floating-social-condition-labels").html(t.get_all_conditions_labels())},toggle_animation:function(){var e=this.$('[name="animate"]:checked'),t="false"===e.val(),i=this.$("#optin-afterc-animation-block");i[t?"hide":"show"]()}}))}),Hustle.define("Social_Sharing.Listing",function(e,t,i){"use strict";var s=Hustle.get("Delete_Confirmation");return Backbone.View.extend({el:"#wph-ccontent--modules",events:{"click .wph-accordions header":"toggle_accordion","change .social-sharing-toggle-activity":"toggle_activity","change .social-sharing-toggle-tracking-activity":"toggle_tracking_activity","change .social-sharing-toggle-type-activity":"toggle_type_activity","change .social-sharing-toggle-test-activity":"toggle_test_activity","click .social-sharing-edit":"edit","click .social-sharing-delete":"delete"},delete_confirmations:{},initialize:function(){},toggle_accordion:function(t){if(_.indexOf(["wph-accordion--animate_buttons","wph-icon i-arrow"],t.target.className)!==-1){var i=e(t.target),s=i.find(".dev-icon"),n=i.closest("li");n.find("section");s.toggleClass("dev-icon-caret_down dev-icon-caret_up"),n.toggleClass("wph-accordion--closed wph-accordion--open"),n.siblings("li.wph-accordion--open").toggleClass("wph-accordion--closed wph-accordion--open")}},toggle_activity:function(t){t.stopPropagation();var i=e(t.target),s=i.data("id"),n=i.data("nonce"),o=i.is(":checked");i.attr("disabled",!0),e.ajax({url:ajaxurl,type:"POST",data:{action:"hustle_social_sharing_toggle_activity",id:s,_ajax_nonce:n},complete:function(){i.attr("disabled",!1)},success:function(e){e.success||i.attr("checked",!o)},error:function(){i.attr("checked",!o)}})},toggle_tracking_activity:function(t){t.stopPropagation();var i=e(t.target),s=i.data("id"),n=i.data("nonce"),o=i.data("type"),a=i.is(":checked");i.attr("disabled",!0),e.ajax({url:ajaxurl,type:"POST",data:{action:"hustle_social_sharing_toggle_tracking_activity",id:s,type:o,_ajax_nonce:n},complete:function(){i.attr("disabled",!1)},success:function(e){e.success||i.attr("checked",!a)},error:function(e){e.success||i.attr("checked",!a)}})},toggle_type_activity:function(t){t.stopPropagation();var i=e(t.target),s=i.data("id"),n=i.data("nonce"),o=i.data("type"),a=i.is(":checked");i.attr("disabled",!0),e.ajax({url:ajaxurl,type:"POST",data:{action:"hustle_social_sharing_toggle_type_activity",id:s,type:o,_ajax_nonce:n},complete:function(){i.attr("disabled",!1)},success:function(e){e.success||i.attr("checked",!a)},error:function(e){e.success||i.attr("checked",!a)}})},toggle_test_activity:function(t){t.stopPropagation();var i=e(t.target),s=i.data("id"),n=i.data("nonce"),o=i.data("type"),a=i.is(":checked");i.attr("disabled",!0),e.ajax({url:ajaxurl,type:"POST",data:{action:"hustle_social_sharing_toggle_test_activity",id:s,type:o,_ajax_nonce:n},complete:function(){i.attr("disabled",!1)},success:function(e){e.success||i.attr("checked",!a)},error:function(e){e.success||i.attr("checked",!a)}})},edit:function(e){e.stopPropagation()},"delete":function(e){e.stopPropagation();var t=this.$(e.target);if(!t.prev(".hustle-delete-module-confirmation").length){var i=t.closest("li.wph-accordions--item"),n=(t.data("id"),new s({id:t.data("id"),nonce:t.data("nonce"),action:"hustle_social_sharing_delete",onSuccess:function(e){e.success&&(n.remove(),i.toggle("highlight"))}}));t.before(n.$el)}}})}),Hustle.define("Social_Sharing.Models",function(){"use strict";var e=Hustle.get("Models.M").extend({defaults:{optin_name:"",optin_title:"",optin_provider:"social_sharing",active:1,test_mode:0,service_type:"native",click_counter:1,social_icons:""}}),t=Hustle.get("Models.M").extend({defaults:{icon_style:"four",icons_order:"",customize_colors:0,icon_bg_color:"rgba(146, 158, 170, 1)",icon_color:"rgba(255, 255, 255, 1)",floating_social_bg:"rgba(4, 48, 69, 1)",drop_shadow:0,drop_shadow_x:0,drop_shadow_y:0,drop_shadow_blur:0,drop_shadow_spread:0,drop_shadow_color:"rgba(0,0,0,0)",floating_inline_count:0,counter_border:"rgba(146, 158, 170, 1)",counter_text:"rgba(255, 255, 255, 1)",customize_widget_colors:0,widget_icon_bg_color:"rgba(146, 158, 170, 1)",widget_icon_color:"rgba(255, 255, 255, 1)",widget_bg_color:"rgba(146, 158, 170, 1)",widget_drop_shadow:0,widget_drop_shadow_x:0,widget_drop_shadow_y:0,widget_drop_shadow_blur:0,widget_drop_shadow_spread:0,widget_drop_shadow_color:"rgba(0,0,0,0)",widget_inline_count:0,widget_counter_text:"rgba(255, 255, 255, 1)"}}),i=Hustle.get("Models.M").extend({defaults:{enabled:!1,conditions:"",location_type:"screen",location_target:"",location_align_x:"left",location_align_y:"top",location_top:0,location_bottom:0,location_right:0,location_left:0},initialize:function(e){if(_.extend(this,e),!(this.get("conditions")instanceof Backbone.Model)){_.isEmpty(this.get("conditions"))&&_.isArray(this.get("conditions"))&&(this.conditions={});
|
4 |
var t=Hustle.get("Model");this.set("conditions",new t(this.conditions))}this.on("change",this.user_has_change,this)}}),s=i.extend();return{Services:e,Appearance:t,TypeBase:i,Floating_Social:s}}),Hustle.define("Social_Sharing.Services_View",function(e,t,i){"use strict";return Hustle.View.extend(_.extend({},Hustle.get("Mixins.Model_Updater"),{template:Optin.template("wpoi-social-sharing-services-tpl"),init:function(e){return this.render()},render:function(e){return this.setElement(this.template(_.extend({},this.model.toJSON()))),this}}))}),Hustle.define("Social_Sharing.View",function(e,t,i){"use strict";return Hustle.View.extend({el:".wph-sshare-wizard-view",message_box_tpl:Optin.template("wpoi-social-sharing-message-box-tpl"),preview:!1,preview_model:!1,initial_data:new Backbone.Model({content:""}),events:{"click .wph-toggletabs .can-open":"toggle_accordion","click ul.wph-ss-service-type li label":"toggle_service_type","click .wph-button.ss-save-changes":"ss_save","click .wph-button.ss-cancel":"ss_cancel","click .wph-button.ss-next-step":"ss_next_step","click .wph-button.ss-back":"ss_back","click .wph-button.ss-finish":"ss_finish","change .wph-sshare--pick_social_icons input.wph-share-icon-enable":"toggle_icon","change .wph-sshare--pick_social_icons .wph-input--number input":"icon_counter_updated","change .wph-sshare--pick_social_icons .wph-sshare--input_wrap input":"icon_link_updated",'click ul.wph-share-icon_style [name="wph-sshare-type_icons_design"]':"toggle_icon_style","click ul.wph-share-customize-color li > label":"toggle_floating_custom_color","click ul.wph-share-widget-customize-color li > label":"toggle_widget_custom_color","click ul.wph-sshare--pick_location_type li > label":"toggle_location_type","click ul.wph-sshare--select_location_align_x li > label":"toggle_location_align","click ul.wph-sshare--select_location_align_y li > label":"toggle_location_align"},init:function(e){return this.services_view=e.services_view,this.appearance_view=e.appearance_view,this.floating_view=e.floating_view,this.listenTo(this.model,"change",this.render_message_box),this.listenTo(this.services_view.model,"change:service_type",this.services_view_changes),this.listenTo(this.services_view.model,"change:click_counter",this.services_view_changes),this.listenTo(this.appearance_view.model,"change:icons_order",this.icons_order_updated),this.listenTo(this.appearance_view.model,"change:drop_shadow",this.appearance_view_changes),this.listenTo(this.appearance_view.model,"change:customize_colors",this.appearance_view_changes),this.listenTo(this.appearance_view.model,"change:customize_widget_colors",this.appearance_view_changes),this.listenTo(this.appearance_view.model,"change:widget_drop_shadow",this.appearance_view_changes),this.listenTo(this.appearance_view.model,"change:floating_inline_count",this.appearance_view_changes),this.listenTo(this.appearance_view.model,"change:widget_inline_count",this.appearance_view_changes),this.listenTo(this.appearance_view.model,"change",_.debounce(this.render_preview,100)),this.render_message_box(),this.render()},render:function(){this.render_service_view(),this.render_appearance_view();var e=this.$("#wph-social-sharing--floating-social-container"),t=e.attr("class");e.replaceWith(this.floating_view.$el.addClass(t).attr("id","wph-social-sharing--floating-social-container"))},render_service_view:function(){this.$("#wph-social-sharing--services_tab .wph-toggletabs--content").html(""),this.services_view.delegateEvents(),this.$("#wph-social-sharing--services_tab .wph-toggletabs--content").append(this.services_view.$el)},render_appearance_view:function(){this.$("#wph-social-sharing--appearance_tab .wph-toggletabs--content").html(""),this.appearance_view.delegateEvents(),this.$("#wph-social-sharing--appearance_tab .wph-toggletabs--content").append(this.appearance_view.$el),Hustle.Events.trigger("SS.appearance_view_ready"),this.render_preview()},services_view_changes:function(){Optin.hasChanges=!0,this.services_view.render(),this.render_service_view(),this.appearance_view_changes()},appearance_view_changes:function(){Optin.hasChanges=!0,this._set_social_icons(),this.appearance_view.render(),this.render_appearance_view()},render_message_box:function(){var e=this._get_shortcode_id();this.$("#wph-social-sharing--messagebox").html(this.message_box_tpl({shortcode_id:e}))},render_preview:function(){var e=this.$("#wph-sshare--floating_social .wph-sshare--preview_box .wph-sshare--container"),t=this.$("#wph-sshare--widget_shortcode .wph-sshare--preview_box .wph-sshare--container"),i=this.appearance_view.model.toJSON();if(e.css("background",i.floating_social_bg),i.counter_text&&e.find(".wph-sshare_social_counter span").css("color",i.counter_text),"1"==i.customize_colors&&("one"==i.icon_style&&(e.find("a").css("background",i.icon_bg_color),e.find(".wph-social-path .wph-social-icon").css("fill",i.icon_color)),"two"==i.icon_style&&(e.find(".wph-social").css("border-color",i.icon_bg_color),e.find(".wph-social .wph-social-icon").css("fill",i.icon_color)),"three"!=i.icon_style&&"four"!=i.icon_style||(e.find(".wph-social").css("background",i.icon_bg_color),e.find(".wph-social .wph-social-icon").css("fill",i.icon_color)),i.counter_border&&e.find("a").css("border","1px solid "+i.counter_border)),"1"==i.drop_shadow){var s=""+i.drop_shadow_x+"px "+i.drop_shadow_y+"px "+i.drop_shadow_blur+"px "+i.drop_shadow_spread+"px "+i.drop_shadow_color;e.css("box-shadow",s)}if(t.css("background",i.widget_bg_color),t.find(".wph-sshare_social_counter span").css("color",i.widget_counter_text),"1"==i.customize_widget_colors&&("one"==i.icon_style&&(t.find("a").css("background",i.widget_icon_bg_color),t.find(".wph-social-path .wph-social-icon").css("fill",i.widget_icon_color)),"two"==i.icon_style&&(t.find(".wph-social").css("border-color",i.widget_icon_bg_color),t.find(".wph-social .wph-social-icon").css("fill",i.widget_icon_color)),"three"!=i.icon_style&&"four"!=i.icon_style||(t.find(".wph-social").css("background",i.widget_icon_bg_color),t.find(".wph-social .wph-social-icon").css("fill",i.widget_icon_color))),"1"==i.widget_drop_shadow){var n=""+i.widget_drop_shadow_x+"px "+i.widget_drop_shadow_y+"px "+i.widget_drop_shadow_blur+"px "+i.widget_drop_shadow_spread+"px "+i.widget_drop_shadow_color;t.css("box-shadow",n)}},toggle_accordion:function(t){t.preventDefault();var i=e(t.target),s=e(".wph-toggletabs"),n=i.closest(".wph-toggletabs"),o=s.not(n),a=n.find(".dev-icon-caret_down, .dev-icon-caret_up");o.removeClass("wph-toggletabs--open"),o.find(".dev-icon-caret_up").removeClass("dev-icon-caret_up").addClass("dev-icon-caret_down"),n.toggleClass("wph-toggletabs--open wph-toggletabs--closed"),a.toggleClass("dev-icon-caret_down dev-icon-caret_up")},toggle_service_type:function(t){t.preventDefault(),Optin.hasChanges=!0;var i=this.$(t.target);i.closest("li").hasClass("current")||this.model.set("service_type",e(t.target).find("input").val())},toggle_icon:function(e){var t=this.$(e.target),i=t.is(":checked"),s=this.services_view.model.get("service_type"),n=t.parents(".wph-sshare--social_"+s);i?n.find(".disabled").removeClass("disabled"):(n.find(".wph-sshare--icon").addClass("disabled"),"native"==s?n.find(".wph-input--number").addClass("disabled"):n.find(".wph-sshare--input_wrap").addClass("disabled")),this.appearance_view_changes()},icons_order_updated:_.debounce(function(){this.appearance_view_changes()},500),icon_counter_updated:_.debounce(function(){this.appearance_view_changes()},500),icon_link_updated:function(e){this._set_social_icons()},toggle_icon_style:function(e){e.preventDefault();var t=this.$(e.target);t.closest("li").hasClass("current")||(this.appearance_view.model.set("icon_style",t.val(),{silent:!0}),this.appearance_view.render(),this.render_appearance_view())},toggle_floating_custom_color:function(e){e.preventDefault();var t=this.$(e.target),i=t.closest("li"),s=i.find("input");i.hasClass("current")||(i.addClass("current"),i.siblings().removeClass("current"),this.appearance_view.model.set("customize_colors",s.val()))},toggle_widget_custom_color:function(e){e.preventDefault();var t=this.$(e.target),i=t.closest("li"),s=i.find("input");i.hasClass("current")||(i.addClass("current"),i.siblings().removeClass("current"),this.appearance_view.model.set("customize_widget_colors",s.val()))},toggle_location_type:function(e){e.preventDefault();var t=this.$(e.target),i=t.closest("li"),s=i.find("input"),n=this.$(".wph-sshare--selector");i.hasClass("current")||(i.addClass("current"),i.siblings().removeClass("current"),this.floating_view.model.set("location_type",s.val()),"selector"==s.val()?n.removeClass("hidden"):n.hasClass("hidden")||n.addClass("hidden"))},toggle_location_align:function(t){t.preventDefault();var i=this.$(t.target),s=i.closest("li"),n=s.find("input"),o=this.$(".wph-sshare--offset_"+n.val()),a=n.data("attribute");s.hasClass("current")||(s.addClass("current"),s.siblings().removeClass("current"),this.floating_view.model.set(a,n.val()),o.removeClass("hidden"),o.siblings('[class^="wph-sshare--offset_"]').each(function(){e(this).hasClass("hidden")||e(this).addClass("hidden")}))},ss_save:function(t){if(t.preventDefault(),this.validate()){var i=this,s=this.$(t.target).closest("button"),n=s.data("id"),o=s.parents(".row").find("button.wph-button"),a=this.services_view.model.toJSON(),l=this.appearance_view.model.toJSON(),r=this.floating_view.model.toJSON(),c=this._get_shortcode_id();return s.addClass("wph-button-save--loading"),o.each(function(){e(this).attr("disabled",!0)}),a=this._get_social_icons_data(a),e.ajax({url:ajaxurl,type:"POST",data:{action:"hustle_social_sharing_save",_ajax_nonce:s.data("nonce"),id:s.data("id"),services:a,appearance:l,floating_social:r,shortcode_id:c},complete:function(t){var a=t.responseJSON,l=i.$('button.wph-button[data-id="'+n+'"]');if(s.removeClass("wph-button-save--loading"),o.each(function(){e(this).attr("disabled",!1)}),Optin.hasChanges=!1,n==-1){l.attr("data-id",a.data);var r=window.location.pathname+window.location.search;r=r.replace("id=-1","id="+a.data),window.history.replaceState({},"",r)}}})}},ss_cancel:function(e){e.preventDefault(),window.onbeforeunload=null,window.location.replace("?page=inc_hustle_social_sharing")},ss_next_step:function(e){if(e.preventDefault(),this.validate()){var t=this.$(".wph-toggletabs.wph-toggletabs--open ~ .wph-toggletabs").first();this.ss_save(e).done(function(e){e.success&&t.find(".can-open span").click()})}},ss_back:function(e){e.preventDefault();var t=this.$(".wph-toggletabs.wph-toggletabs--open").prevAll(".wph-toggletabs").first();t.find(".can-open span").click()},ss_finish:function(e){if(e.preventDefault(),this.validate()){var t=this.$(e.target),i=parseInt(t.data("id"))==-1;this.ss_save(e).done(function(e){if(e.success){window.onbeforeunload=null;var t="?page=inc_hustle_social_sharing";t+=i?"&new_id="+e.data:"&updated_id="+e.data,window.location.replace(t)}})}},validate:function(){var t=!0,i=this.$('[data-attribute="optin_name"]'),s=i.attr("placeholder");if(!i.val()){if(t=!1,0===i.siblings("span.wph-icon.i-warning").length){var n=e('<span class="wph-icon i-warning" title="'+s+'"></span>');n.insertBefore(i)}i.focus()}return t&&e("span.dashicons.dashicons-warning").remove(),t},_set_social_icons:function(){Optin.hasChanges=!0;var e=this.services_view.model.toJSON();e=this._get_social_icons_data(e),this.services_view.model.set("social_icons",e.social_icons,{silent:!0}),window.services_model=this.services_view.model},_get_social_icons_data:function(t){var i=this.$(".wph-sshare--social_"+t.service_type),s={};return i.each(function(){var t=e(this),i=t.find("span.toggle input"),n=t.find(".wph-sshare--icon").data("id"),o=t.find(".wph-input--number input"),a=t.find(".wph-sshare--input_wrap input"),l=parseInt(o.val());l<0&&o.val(0),i.is(":checked")&&(s[n]={enabled:!0,counter:o.length?o.val():"0",link:a.length?a.val():""})}),t.social_icons=s,t},_get_shortcode_id:function(){return this.model.get("optin_name").trim().toLowerCase().replace(/\s+/g,"-")}})}),Hustle.define("Legacy_Popups.Listing",function(e){"use strict";return Backbone.View.extend({el:"#wph-ccontent--migration",events:{"click .custom-content-legacy-toggle-activity":"toggle_activity","click .wph-button-legacy-quickedit-btn":"toggle_quick_edit","click .custom-content-legacy-popup-save-quickedit":"save_quick_edit","click .wph-button-legacy-migrate-btn":"migrate"},initialize:function(){},toggle_activity:function(t){var i=this.$(t.target),s=i.data("id"),n=i.data("nonce"),o=i.is(":checked");i.prop("disabled",!0),e.ajax({url:ajaxurl,data:{action:"hustle_legacy_popup_toggle_activity",id:s,target_state:o,_ajax_nonce:n},complete:function(){i.prop("disabled",!1)},success:function(e){e.success||i.prop("checked",!o)},error:function(){i.prop("checked",!o)}})},toggle_quick_edit:function(e){var t=this.$(e.target),i=t.closest("li");t.toggleClass("wph-button--open wph-button--closed"),i.toggleClass("wph-accordion--open wph-accordion--closed")},save_quick_edit:function(t){var i=this,s=this.$(t.target),n=s.closest("li"),o={action:"hustle_custom_content_legacy_popup_quick_edit_save",content:n.find(".hustle-custom-content-legacy-popup-content").val(),heading:n.find(".hustle-custom-content-legacy-popup-heading").val(),subheading:n.find(".hustle-custom-content-legacy-popup-subheading").val(),id:s.data("id"),_ajax_nonce:s.data("nonce")},a=e("<span class='button-spinner'>"),l=n.find(".wph-button-legacy-quickedit-btn")[0],r=s.outerWidth();s.append(a).animate({width:r+.3*r}).attr("disabled",!0),e.ajax({url:ajaxurl,data:o,complete:function(){s.animate({width:r}).attr("disabled",!1).find(".button-spinner").remove()},success:function(e){e.success&&i.toggle_quick_edit({target:l})}})},migrate:function(t){var i=this.$(t.target),s=i.closest("li"),n=i.data("id"),o=i.data("nonce"),a=e("<span class='button-spinner'>"),l=i.outerWidth();i.append(a).animate({width:l+.3*l}).attr("disabled",!0),e.ajax({url:ajaxurl,data:{action:"hustle_custom_content_legacy_popup_migrate",id:n,_ajax_nonce:o},complete:function(){i.animate({width:l}).attr("disabled",!1).find(".button-spinner").remove()},success:function(e){s.slideUp(300,function(){s.remove()})}})}})}),Hustle.define("Custom_Content.Module",function(e){"use strict";!function(){if("hustle_page_inc_hustle_custom_content"===pagenow){var e=Hustle.get("Custom_Content.Listing"),t=(new e,Hustle.get("Legacy_Popups.Listing"));new t}}(),function(){if(_.indexOf(["hustle_page_inc_hustle_custom_content_new","hustle_page_inc_hustle_custom_content_edit"],pagenow)!==-1&&!parseInt(optin_vars.current.is_cc_limited)){var e=Hustle.get("Custom_Content.View"),t=Hustle.get("Custom_Content.Content_View"),i=Hustle.get("Custom_Content.Design_View"),s=Hustle.get("Custom_Content.After_Content_View"),n=Hustle.get("Custom_Content.Popup_View"),o=Hustle.get("Custom_Content.Slide_In_View"),a=Hustle.get("Settings.Display_Triggers_View"),l=Hustle.get("Settings.Conditions_View"),r=Hustle.get("Custom_Content.Models.Content"),c=Hustle.get("Custom_Content.Models.Design"),d=Hustle.get("Custom_Content.Models.AfterContent"),p=Hustle.get("Custom_Content.Models.Popup"),h=Hustle.get("Custom_Content.Models.Slide_In"),u=Hustle.get("Custom_Content.Models.Magic_Bar"),g=new r(optin_vars.current.content||{}),m=new d(optin_vars.current.after_content||{}),w=new c(optin_vars.current.design||{}),v=new p(optin_vars.current.popup||{}),f=new h(optin_vars.current.slide_in||{}),b=new u(optin_vars.current.magic_bar||{});return window.content_model=g,window.design_model=w,window.after_content_model=m,window.popup_model=v,window.slide_in_model=f,window.magic_bar_model=b,new e({model:g,content_view:new t({model:g,design_model:w}),design_view:new i({model:w}),after_content_view:new s({type:"after_content",model:m,display_triggers_view:new a({model:m.get("triggers"),type:"after_content"}),conditions_view:new l({model:m.get("conditions"),type:"after_content"})}),popup_view:new n({type:"popup",model:v,display_triggers_view:new a({model:v.get("triggers"),type:"popup"}),conditions_view:new l({model:v.get("conditions"),type:"popup"})}),slide_in:new o({type:"slide_in",model:f,display_triggers_view:new a({model:f.get("triggers"),type:"slide_in"}),conditions_view:new l({model:f.get("conditions"),type:"slide_in"})}),magic_bar:new Backbone.View({model:b})})}}()}),Hustle.define("Social_Sharing.Module",function(e){"use strict";!function(){if("hustle_page_inc_hustle_social_sharing"===pagenow){var e=Hustle.get("Social_Sharing.Listing");new e}}(),function(){if(_.indexOf(["hustle_page_inc_hustle_social_sharing_new","hustle_page_inc_hustle_social_sharing_edit"],pagenow)!==-1&&!parseInt(optin_vars.current.is_ss_limited)){var e=Hustle.get("Social_Sharing.View"),t=Hustle.get("Social_Sharing.Services_View"),i=Hustle.get("Social_Sharing.Appearance_View"),s=Hustle.get("Social_Sharing.Floating_View"),n=Hustle.get("Settings.Conditions_View"),o=Hustle.get("Social_Sharing.Models.Services"),a=Hustle.get("Social_Sharing.Models.Appearance"),l=Hustle.get("Social_Sharing.Models.Floating_Social"),r=new o(optin_vars.current.services||{}),c=new a(optin_vars.current.appearance||{}),d=new l(optin_vars.current.floating_social||{});return window.services_model=r,window.appearance_model=c,window.floating_social_model=d,new e({model:r,services_view:new t({model:r}),appearance_view:new i({model:c}),floating_view:new s({type:"floating_social",model:d,conditions_view:new n({model:d.get("conditions"),type:"floating_social"})})})}}()}),Hustle.define("Optin.Error_List_Modal",function(e){"use strict";var t=Backbone.View.extend({tagName:"tr",template:Optin.template("wpoi-error-list-tpl"),controller:!1,initialize:function(e){this.controller=e.controller,this.module_fields=e.module_fields,this.render()},render:function(){var e=this.template({model:this.model,module_fields:this.module_fields});this.$el.html(e),this.$el.appendTo(this.controller.$("#wpoi-error-list"))}});return Backbone.View.extend({id:"wpoi-error-list-modal",button:!1,list:[],template:Optin.template("wpoi-error-list-modal-tpl"),header_template:Optin.template("wpoi-error-header-list-tpl"),hasHeader:!1,events:{"click .inc-opt-close-error-list":"toggleErrorLog","click .button-clear-logs":"clearLogs","click .button-delete-logs":"_clean","click .button-cancel-delete-logs":"cancelDelete"},initialize:function(e){this.button=e.button,this.render()},render:function(){var i=this,s=this.template(this.model);this.$el.html(s),this.$el.appendTo("body"),this.clearLogButton=this.$(".button-clear-logs"),this.exportButton=this.$(".button-download-csv"),this.deleteConfirmation=this.$(".hustle-delete-logs-confirmation"),this.header=this.$(".wph-table-header"),this.button.addClass("loading"),e.getJSON(window.ajaxurl,{optin_id:this.model.optin_id,_wpnonce:optin_vars.error_log_nonce,action:"get_error_list"},function(e){e.success&&e.data&&e.data.logs&&(i.header.html(i.header_template({headers:e.data.module_fields})),_.each(e.data.logs,function(s){new t({module_fields:e.data.module_fields,model:s,controller:i})}),i.show())})},show:function(){this.$el.addClass("show")},toggleErrorLog:function(){this.$el.removeClass("show")},clearLogs:function(){this.deleteConfirmation.show(),this.clearLogButton.attr("disabled",!0),this.exportButton.attr("disabled",!0)},_clean:function(){var t=this;e.get(window.ajaxurl,{optin_id:this.model.optin_id,_wpnonce:optin_vars.clear_log_nonce,action:"clear_logs"},function(e){e.success&&(t.toggleErrorLog(),_.delay(function(){t.button.remove(),t.remove()},350))})},cancelDelete:function(){this.deleteConfirmation.hide(),this.clearLogButton.removeAttr("disabled"),this.exportButton.removeAttr("disabled")}})}),Hustle.define("Optin.Listing",function(e){"use strict";var t=Hustle.get("Delete_Confirmation");return Backbone.View.extend({el:"#hustle-optin-listing",logShown:!1,events:{"click .wph-accordions header":"toggle_optin_accordion","click .hustle-delete-optin":"delete_optin","click .optin-active-state":"toggle_optin_activity","click .button-view-email-list":"view_email_list","change .optin-type-active-state":"toggle_type_activity","change .wpoi-testmode-active-state":"toggle_type_mode_activity","change .optin-toggle-tracking-activity":"toggle_tracking_activity","click .button-view-log-list":"view_error_log_list"},initialize:function(){var t=this;this.$(".optin-type-active-state").each(function(){t.set_testmode_visibiliy(e(this),0)})},toggle_optin_accordion:function(t){if(_.indexOf(["wph-accordion--animate_buttons","wph-icon i-arrow"],t.target.className)!==-1){var i=e(t.target),s=i.find(".dev-icon"),n=i.closest("li");n.find("section");s.toggleClass("dev-icon-caret_down dev-icon-caret_up"),n.toggleClass("wph-accordion--closed wph-accordion--open"),n.siblings("li.wph-accordion--open").toggleClass("wph-accordion--closed wph-accordion--open")}},delete_optin:function(i){i.preventDefault(),i.stopPropagation();var s=this.$(i.target);if(!s.prev(".hustle-delete-module-confirmation").length){var n=(s.closest("li.wph-accordions--item"),s.data("id"),new t({id:s.data("id"),nonce:s.data("nonce"),action:"inc_opt_delete_optin",onSuccess:function(t){t.success&&s.closest("li").slideUp(300,function(){e(this).remove()})}}));s.before(n.$el)}},toggle_optin_activity:function(t){var i=this.$(t.target),s=i.data()||{},n=i.closest(".wph-accordions--item").find(".wph-accordion--disable"),o=i.closest("li");s.action="inc_opt_toggle_state",s._ajax_nonce=s.nonce,i.prop("disabled",!0),i.is(":checked")?(n.addClass("hidden"),o.removeClass("wph-accordion--closed").addClass("wph-accordion--open")):(n.removeClass("hidden"),o.addClass("wph-accordion--closed").removeClass("wph-accordion--open")),e.post(ajaxurl,s,function(e){i.prop("disabled",!1)})},view_email_list:function(t){t.preventDefault(),t.stopPropagation();var i=e(t.target),s=i.data("id"),n=i.data("name"),o=i.data("total"),a=Hustle.get("Optin.Subscription_List_Modal");new a({model:{id:s,total:o,name:n,module_fields:[]}})},set_testmode_visibiliy:function(e,t){"undefined"==typeof t&&(t=400);var i=e,s=i.data()||{},n=this.$('.wpoi-testmode-active-state[data-id="'+s.id+'"][data-type="'+s.type+'"]').closest(".test-mode");i.is(":checked")?n.fadeOut(t):n.fadeIn(t)},toggle_tracking_activity:function(t){t.stopPropagation();var i=e(t.target),s=i.data("id"),n=i.data("nonce"),o=i.data("type"),a=i.is(":checked");i.attr("disabled",!0),e.ajax({url:ajaxurl,type:"POST",data:{action:"inc_optin_toggle_tracking_activity",id:s,type:o,_ajax_nonce:n},complete:function(){i.attr("disabled",!1)},success:function(e){e.success||i.attr("checked",!a)},error:function(e){e.success||i.attr("checked",!a)}})},toggle_type_activity:function(t){var i=e(t.target),s=i.data()||{};this.set_testmode_visibiliy(i),e('.optin-type-active-state[data-id="'+s.id+'"][data-type="'+s.type+'"]').not(this).prop("checked",!!i.is(":checked")),s.action="inc_opt_toggle_optin_type_state",s._ajax_nonce=s.nonce,i.prop("disabled",!0),e.post(ajaxurl,s,function(e){i.prop("disabled",!1)})},toggle_type_mode_activity:function(t){var i=e(t.target),s=i.data()||{};s.action="inc_opt_toggle_type_test_mode",s._ajax_nonce=s.nonce,e('.wpoi-testmode-active-state[data-id="'+s.id+'"][data-type="'+s.type+'"]').not(this).prop("checked",!!i.is(":checked")),i.prop("disabled",!0),e.post(ajaxurl,s,function(e){i.prop("disabled",!1)})},view_error_log_list:function(t){var i=e(t.currentTarget),s=i.data(),n=s.id,o=s.name,a=Hustle.get("Optin.Error_List_Modal");this.logShown?this.logShown.show():this.logShown=new a({button:i,model:{name:o,optin_id:n,total:s.total}})}})}),Hustle.define("Optin.Preview",function(e){"use strict";return Backbone.View.extend({el:".wph-preview",preview_modal:!1,$preview_yield:!1,wrapper_class_tpl:Hustle.create_template("wph-preview--optin wph-preview--{{type}}"),events:{"click .wph-preview--mask":"hide","click .wph-preview--close":"hide","change #wph-preview-type-selector":"change_type"},initialize:function(){this.$preview_yield=this.$("#optin-preview-wrapper"),this.render(),this.listenTo(this.preview_modal.model,"change",this.render),this.$("#wph-preview-type-selector").val(this.model.get("type"))},get_tpl:function(e){var t=["optin-layout-one","optin-layout-two","optin-layout-three","optin-layout-four"];return Hustle.template(t[e])},render:function(){var e=Hustle.get("Modal");this.preview_modal=new e({model:this.model,template:this.get_tpl(this.model.get("form_location").toInt())}),this.$preview_yield.replaceWith(this.preview_modal.$el),this.$preview_yield=this.preview_modal.$el,this.preview_modal.show(),this.$("#wph-preview-type-selector").val(this.model.get("type")),Hustle.Events.trigger("view.rendered",this)},show:function(){this.$el.removeClass("wph-preview--closed").addClass("wph-preview--open"),this.$(".wph-preview--optin").attr("class",this.wrapper_class_tpl({type:this.model.get("type")})),Optin.Events.trigger("design:preview:render:finish",this.preview_modal)},hide:function(e){this.$el.removeClass("wph-preview--open").addClass("wph-preview--closed")},change_type:function(e){var t=this.$(e.target).val();this.preview_modal.model.set("type",t),this.$(".wph-preview--optin").attr("class",this.wrapper_class_tpl({type:t})),Optin.Events.trigger("design:preview:render:finish",this.preview_modal),Hustle.Events.trigger("Optin.preview.changed.type",this)}})}),Hustle.define("Optin.Subscription_List_Modal",function(e){"use strict";var t={};return Backbone.View.extend({id:"wpoi-emails-list-modal",template:Optin.template("wpoi-emails-list-modal-tpl"),list_header_template:Optin.template("wpoi-email-list-header-tpl"),list_template:Optin.template("wpoi-emails-list-tpl"),show_delay:350,events:{"click .inc-opt-close-emails-list":"close","click .wpoi-complete-mask":"close"},initialize:function(){return this.render()},render:function(){var i=this,s=this.template(this.model);return s=s.replace("__id",this.model.id),this.$el.html(s),t[this.model.id]||(t[this.model.id]=e.ajax({url:ajaxurl,type:"GET",data:{action:"inc_optin_get_email_lists",id:this.model.id,_ajax_nonce:e("#wpoi_get_emails_list_nonce").val()}}),this.delay_show=0),t[this.model.id].then(function(e){if(e.success){var t=e.data.module_fields,s=[];i.model.module_fields.length||(i.model.module_fields=t,i.$(".wpoi-emails-list-header").html(i.list_header_template({module_fields:t})),_.each(t,function(e){s.push({name:e.name,label:e.label})}));var n=i.list_template({subscriptions:e.data.subscriptions,module_fields:s});i.$("#wpoi-emails-list-content").html(n),i.show()}}),this.$el.appendTo("body"),this},show:function(){_.delay(function(){this.$el.addClass("show")}.bind(this),this.show_delay)},close:function(e){e.preventDefault(),this.$el.removeClass("show"),_.delay(function(){this.remove()}.bind(this),350)}})}),Hustle.define("Optin.Module",function(){"use strict";if("hustle_page_inc_optin_listing"===pagenow){var e=Hustle.get("Optin.Listing");new e}}),Hustle.define("Dashboard.View",function(e,t,i){"use strict";if("toplevel_page_inc_optins"===pagenow&&!_.isTrue(optin_vars.is_free)){var s=Backbone.View.extend({el:".wph-dashboard",conversions_chart:null,chart_data:null,chart_options:null,empty_chart:!0,default_dataset_options:{fill:!1,cubicInterpolationMode:"monotone",borderCapStyle:"butt",borderDash:[],borderWidth:1,borderDashOffset:0,borderJoinStyle:"miter",pointBackgroundColor:"#fff",pointBorderWidth:3,pointHoverRadius:5,pointHoverBorderColor:"rgba(220,220,220,1)",pointHoverBorderWidth:2,pointRadius:1,pointHitRadius:10,spanGaps:!1},events:{"click .wph-icon.i-close":"close"},initialize:function(t){for(var i=[],s=0;s<hustle_vars.conversion_chart_data.length;s++){hustle_vars.conversion_chart_data[s].data.length>=1&&(this.empty_chart=!1);var n={label:hustle_vars.conversion_chart_data[s].module_name,data:hustle_vars.conversion_chart_data[s].data,backgroundColor:hustle_vars.conversion_chart_data[s].color,borderColor:hustle_vars.conversion_chart_data[s].color,pointBorderColor:hustle_vars.conversion_chart_data[s].color,pointHoverBackgroundColor:hustle_vars.conversion_chart_data[s].color};i.push(e.extend(!0,{},this.default_dataset_options,n))}return this.chart_data={datasets:i},this.chart_options={responsive:!0,maintainAspectRatio:!1,legend:{display:!1},scales:{xAxes:[{type:"time",time:{unit:"week",unitStepSize:3,tooltipFormat:"D MMM",displayFormat:"D MMM",min:hustle_vars.previous_month,max:hustle_vars.today},gridLines:{display:!1}}],yAxes:[{ticks:{min:0},gridLines:{display:!1}}]},tooltips:{callbacks:{label:function(e,t){var i=[];return i.push(e.yLabel+" Conv"),i}},cornerRadius:3,displayColors:!1,backgroundColor:"rgba(11,47,63,1)"},hover:{mode:"nearest",intersect:!0}},this.render()},render:function(){e(".tabs-header li label").on("click",this.toggle_overview),e(".can-close .wph-icon.i-close").on("click",this.close),e("a#wph-sshare_stats_view_all").on("click",this.toggle_sshare_modal),e("a#wph-sshare_stats_close").on("click",this.toggle_sshare_modal),this.handle_sshare_modal_pagination();var t=e("#conversions_chart");if(t.length)if(this.empty_chart){t.parent().css("height","100%").css("width","100%").css("display","table");var i=e('<div class="graph-no-data">'+optin_vars.messages.dashboard.not_enough_data+"</div>");i.css("display","table-cell").css("text-align","center").css("vertical-align","middle"),t.replaceWith(i)}else{var s=t.closest("#wph-module-stats").find("table.wph-table.wph-module--stats"),n=s.outerHeight();n>230?t.attr("height",n):t.attr("height",230);for(var o in this.chart_data.datasets)this.chart_data.datasets[o].data&&(this.chart_data.datasets[o].data=_.sortBy(this.chart_data.datasets[o].data,"x"));this.conversions_chart=new Chart(t,{type:"line",data:this.chart_data,options:this.chart_options})}},close:function(t){t.preventDefault();var i=e(t.target).closest(".row"),s=e(t.target).closest("#wph-welcome"),n=s.data("nonce");i.slideToggle(300,function(){e.ajax({url:ajaxurl,type:"POST",data:{action:"persist_new_welcome_close",_ajax_nonce:n},complete:function(e){i.remove()}})})},toggle_overview:function(t){t.preventDefault();var i=e(t.target),s=i.find("input").val(),n=e("#wph-"+s+"-overview"),o=i.parent();e(".wph-modules-overview").not(n).removeClass("current"),n.addClass("current"),e(".tabs-header li").not(o).removeClass("current"),o.addClass("current")},toggle_sshare_modal:function(t){t.preventDefault();var i=e("#wpoi-sshare-stats-modal");i.toggleClass("show")},handle_sshare_modal_pagination:function(){e("li.wph-sshare--prev_page a").on("click",e.proxy(this.sshare_modal_prev,this)),e("li.wph-sshare--next_page a").on("click",e.proxy(this.sshare_modal_next,this)),e("li.wph-sshare--page_number a").on("click",e.proxy(this.sshare_modal_goto,this))},sshare_modal_prev:function(t){t.preventDefault(),t.stopImmediatePropagation();var i=e(t.target).closest("li"),s=i.parent(),n=s.data("nonce"),o=s.find("li.wph-sshare--current_page"),a=s.find("li.wph-sshare--page_number"),l=s.find("li.wph-sshare--next_page"),r=(parseInt(s.data("total")),parseInt(o.data("page"))),c=parseInt(i.data("page"));o.data("page",c);var d=l.find("i.wph-icon");if(l.data("page",r),d.length&&l.html('<a href="#">'+d[0].outerHTML+"</a>"),1==c){var p=i.find("i.wph-icon");p.length&&i.html("<span>"+p[0].outerHTML+"</span>")}if(a.length)a.data("page",r),a.find("a").text(r);else{var _='<li class="wph-link wph-sshare--page_number" data-page="'+r+'"><a href="#">'+r+"</a></li>";e(_).insertAfter(o)}o.find("span").text(c),i.data("page",c-1),this.handle_sshare_modal_pagination(),this.sshare_show_page_content(c,n)},sshare_modal_next:function(t){t.preventDefault(),t.stopImmediatePropagation();var i=e(t.target).closest("li"),s=i.parent(),n=s.data("nonce"),o=s.find("li.wph-sshare--current_page"),a=s.find("li.wph-sshare--page_number"),l=s.find("li.wph-sshare--prev_page"),r=parseInt(s.data("total")),c=parseInt(o.data("page")),d=parseInt(i.data("page"));o.data("page",d);var p=l.find("i.wph-icon");if(l.data("page",c),p.length&&l.html('<a href="#">'+p[0].outerHTML+"</a>"),d<r){if(a.length){var _=d+1;a.data("page",_),a.find("a").text(_),i.data("page",_)}}else{a.length&&a.remove();var h=i.find("i.wph-icon");h.length&&i.html("<span>"+h[0].outerHTML+"</span>");
|
5 |
-
}o.find("span").text(d),this.handle_sshare_modal_pagination(),this.sshare_show_page_content(d,n)},sshare_modal_goto:function(t){t.preventDefault(),t.stopImmediatePropagation();var i=e(t.target).closest("li"),s=i.parent();s.find("li.wph-sshare--next_page a").click()},sshare_show_page_content:function(t,i){var s=Optin.template("wpoi-sshare-stats-modal-tpl"),n=e("table#wph-sshare--stats_items");n.html('<div class="wph-sshare--loading_stats"><span class="on-action">Loading...</span></div>'),e.ajax({url:ajaxurl,type:"POST",data:{action:"sshare_show_page_content",page_id:t,_ajax_nonce:i},complete:function(e){var t=e.responseJSON.data,i=s(_.extend({},t));n.replaceWith(i)}})}});new s}}),function(e,t){"use strict";if("hustle_page_inc_hustle_settings"===pagenow){var i=Hustle.get("Settings.E_News"),s=Hustle.get("Settings.Modules_Activity"),n=Hustle.get("Settings.Services");new i,new s,new n}}(jQuery,document),function(e){"use strict";Optin.Provider=function(t){var i=this;return _.extend(this,{id:!1,provider_args:{},errors:{},render_in_previewr:_.noop,init:_.noop,add_args:function(){i.id===Optin.step.services.model.get("optin_provider")&&_.each(i.provider_args,function(t,i){var s=e(t);s.length&&(s=s.val().trim(),Optin.step.services.provider_args.set(i,s))})},clear_provider_args:function(){i.id===Optin.step.services.model.previousAttributes().optin_provider&&i.id!==Optin.step.services.model.get("optin_provider")&&Optin.step.services.provider_args.clear({silent:!0})},validate:function(){var t=[];return _.each(i.provider_args,function(s,n){var o=e(s),a=e("<span></span>");o.length>0&&""===o.val().trim()&&(t.push(i.errors[n]),a.attr("title",i.errors[n].message),o.addClass("wpoi-error"),o.after(a),_.defer(function(){a.addClass("dashicons dashicons-warning "+i.errors[n].iconClass)}))}),_(t)},check_module_field:function(t,i,s){e.getJSON(window.ajaxurl,{action:"add_module_field",provider:this.id,_wpnonce:optin_vars.get_module_field_nonce,optin_id:i,field:t},s).fail(function(){var e={error:!0};s&&s(e)})},validate_custom_field:function(t,i,s){i.$(".dashicons-warning").remove(),i.$("[name]").prop("disabled",!0),this.check_module_field(t,s,function(s){if(i.$("[name]").prop("disabled",!1),s.success)i.options=t,i._updateOptions();else{var n=e('<span class="dashicons dashicons-warning">'),o="custom"!==s.data.code?optin_vars.messages.module_fields[s.data.code]:s.data.message;n.attr("title",o),i.$('[name="label"]').before(n)}})},add_module_field:function(t,i,s){var n=i.$(".wph-add-new-field","#wpoi-module-field-maker");n.addClass("wp-button-save--loading"),n.prop("disabled",!0),this.check_module_field(t,s,function(s){if(n.prop("disabled",!1),s.success)t=s.data.field,i._add_module_field(t);else{var o=e('<span class="dashicons dashicons-warning">'),a="custom"!==s.data.code?optin_vars.messages.module_fields[s.data.code]:s.data.message;o.attr("title",a),n.before(o)}})}},t),this.init(),Optin.Events.on("services:validate:after",e.proxy(this,"add_args")),Optin.Events.on("design:preview:render:start",e.proxy(this,"clear_provider_args")),Optin.Events.on("optin:add_module_field_"+this.id,e.proxy(this,"add_module_field")),Optin.Events.on("optin:update_module_field_"+this.id,e.proxy(this,"validate_custom_field")),this}}(jQuery,document),function(e){"use strict";Optin.Mixins.add_services_mixin("activecampaign",function(){return new Optin.Provider({id:"activecampaign",provider_args:{url:"#optin_url"},errors:{url:{name:"optin_url",message:optin_vars.messages.activecampaign.enter_url,iconClass:"dashicons-warning-account_name"}}})})}(jQuery,document),function(e){"use strict";Optin.Mixins.add_services_mixin("convertkit",function(){return new Optin.Provider({id:"convertkit",provider_args:{api_secret:"#optin_api_secret"},errors:{api_secret:{name:"optin_api_secret",message:optin_vars.messages.convertkit.enter_api_secret,iconClass:"dashicons-warning-account_name"}}})})}(jQuery,document),function(e,t,i){"use strict";Optin.Mixins.add_services_mixin("hubspot",function(){return new Optin.Provider({id:"hubspot"})});var s=function(){var t,s,n=e(this),o=n.data("optin"),a=n.attr("href");if(!o){var l=e(".next-button button.wph-button-save","#wpoi-wizard-services");l.trigger("click"),t=setInterval(function(){o=Optin.step.services.model.get("optin_id"),parseInt(o)>0&&(clearInterval(t),s={optin_id:o,_wpnonce:window.optin_vars.hubspot_nonce,action:"update_hubspot_referrer"},e.get(ajaxurl,s),_.delay(function(){i.location=a},300))},100)}};e(t).on("click",".hubspot-authorize",s)}(jQuery,document,window),function(e){"use strict";Optin.Mixins.add_services_mixin("infusionsoft",function(){return new Optin.Provider({id:"infusionsoft",provider_args:{account_name:"#optin_account_name"},errors:{account_name:{name:"optin_account_name",message:optin_vars.messages.infusionsoft.enter_account_name,iconClass:"dashicons-warning-account_name"}}})})}(jQuery,document),function(e){"use strict";Optin.Mixins.add_services_mixin("mad_mimi",function(){return new Optin.Provider({id:"mad_mimi",provider_args:{username:"#optin_username"},errors:{username:{name:"optin_username",message:optin_vars.messages.sendy.enter_url,iconClass:"dashicons-warning-url"}}})})}(jQuery,document),function(e,t){"use strict";Optin.Mixins.add_services_mixin("mailchimp",function(i){return new Optin.Provider({id:"mailchimp",provider_args:{email_list:"#optin_email_list"},errors:{email_list:{name:"optin_email_list",message:optin_vars.messages.infusionsoft.enter_account_name,iconClass:"dashicons-warning-account_name"}},render_in_previewr:function(e){var t=e.$el?e.$el:e;if(!Optin.step.services.provider_args.isEmpty()&&"mailchimp"===Optin.step.services.model.get("optin_provider")){var i=Optin.template("optin-"+Optin.step.services.model.get("optin_provider")+"-args"),s=Optin.step.services.provider_args.toJSON();s.cta_button=Optin.step.design.model.get("cta_button"),t.find(".wpoi-provider-args").html(i(s))}},init:function(){var s=i,n=s.$("#hustle_service_details_form"),o=e("#wpoi-mailchimp-prev-group-args"),a=function(t){var i=e(t.target),s=e(".wpoi-list-groups"),a=e(".wpoi-list-group-interests-wrap"),l=_.reduce(n.serializeArray(),function(e,t){return e[t.name]=t.value,e},{});l.action="hustle_mailchimp_get_list_groups",l._ajax_nonce=i.data("nonce"),Optin.step.services.provider_args.clear({silent:!0}),a.empty(),o.empty(),e.get(ajaxurl,l).done(function(t){t&&(t.success?(s.html(t.data),s.find("select").wpmuiSelect(),e(".mailchimp_optin_load_more_lists").show()):(e(".mailchimp_optin_load_more_lists").hide(),s.empty()))})},l=function(t){var i=e(".wpoi-list-group-interests-wrap"),s=e(t.target),o=_.reduce(n.serializeArray(),function(e,t){return e[t.name]=t.value,e},{});return["-1","0"].indexOf(t.target.value)!==-1?void i.empty():(o._ajax_nonce=s.data("nonce"),o.action="hustle_mailchimp_get_group_interests",void e.get(ajaxurl,o).done(function(e){if(e&&e.success&&(i.html(e.data.html),Optin.step.services.provider_args.set("group",e.data.group),i.find("select").wpmuiSelect(),e.data.group&&e.data.group.groups&&_.isArray(e.data.group.groups))){Optin.step.services.provider_args.get("group")}e&&!e.success&&i.empty()}).fail(function(e){}))},r=function(t){var i,s=e(t.target);(s.is(":radio")||s.is("select"))&&(i=s.val()),s.is(":checkbox")&&(i=[],e("[name='"+t.target.name+"'").filter(":checked").each(function(){i.push(this.value)})),Optin.step.services.provider_args.set("group",_.extend({},Optin.step.services.provider_args.get("group"),{selected:i}))},c=function(t){t.preventDefault(),e("[name='mailchimp_groups_interests']").prop("checked",!1),Optin.step.services.provider_args.set("group",_.extend({},Optin.step.services.provider_args.get("group"),{selected:[]}))},d=function(t){var i=e(t.target),s=i.closest("form"),n=e(".wpoi-box"),o=s.serialize(),a=e("#optin_new_provider_account_options");e("#wpoi-mailchimp-prev-group-args").empty(),a.html(e("#wpoi_loading_indicator").html()),o+="&action=refresh_provider_account_details&load_more=true",o+="&optin=mailchimp",n.find("*").attr("disabled",!0),Optin.step.services.provider_args.clear({silent:!0}),Optin.step.services.model.set("optin_mail_list","none"),e.post(ajaxurl,o,function(t){n.find("*").attr("disabled",!1),t.success===!0?t.data.redirect_to?window.location.href=t.data.redirect_to:(t.data?a.html(t.data):a.html(optin_vars.messages.something_went_wrong),e(".mailchimp_optin_email_list").wpmuiSelect()):t.data?a.html(t.data):a.html(optin_vars.messages.something_went_wrong)}).fail(function(e){a.html(optin_vars.messages.something_went_wrong)})};e(t).on("change","#optin_email_list.mailchimp_optin_email_list",a),e(t).on("change","#mailchimp_groups",l),e(t).on("change","[name='mailchimp_groups_interests'], [name='mailchimp_groups_interests[]']",r),e(t).on("click",".wpoi-leave-group-intrests-blank-radios",c),e(t).on("click",".mailchimp_optin_load_more_lists",d),Optin.Events.on("design:preview:render:finish",e.proxy(this,"render_in_previewr"))}})})}(jQuery,document),function(e){"use strict";Optin.Mixins.add_services_mixin("mautic",function(){return new Optin.Provider({id:"mautic",provider_args:{url:"#optin_url",username:"#optin_username",password:"#optin_password"},errors:{url:{name:"optin_url",message:optin_vars.messages.mautic.enter_url,iconClass:"dashicons-warning-url"},username:{name:"optin_username",message:optin_vars.messages.mautic.username,iconClass:""},password:{name:"optin_password",message:optin_vars.messages.mautic.password,iconClass:""}}})})}(jQuery,document),function(e){"use strict";var t=["getresponse","campaignmonitor","constantcontact","aweber"];_.each(t,function(e){Optin.Mixins.add_services_mixin(e,function(){return new Optin.Provider({id:e})})})}(jQuery,document),function(e,t){"use strict";Optin.Mixins.add_services_mixin("sendinblue",function(i){return new Optin.Provider({id:"sendinblue",provider_args:{email_list:"#optin_email_list"},errors:{email_list:{name:"optin_email_list",message:optin_vars.messages.infusionsoft.enter_account_name,iconClass:"dashicons-warning-account_name"}},init:function(){var i=function(t){var i=e(t.target),s=i.closest("form"),n=e("#wpoi-wizard-services"),o=s.serialize(),a=e("#optin_new_provider_account_options");e("#wpoi-sendinblue-prev-group-args").empty(),a.html(e("#wpoi_loading_indicator").html()),o+="&action=refresh_provider_account_details&load_more=true",o+="&optin=sendinblue",n.find("input,select,button").attr("disabled",!0),Optin.step.services.provider_args.clear({silent:!0}),Optin.step.services.model.set("optin_mail_list","none"),e.post(ajaxurl,o,function(t){n.find("input,select,button").attr("disabled",!1),t.success===!0?t.data.redirect_to?window.location.href=t.data.redirect_to:(t.data?a.html(t.data):a.html(optin_vars.messages.something_went_wrong),e(".sendinblue_optin_email_list").wpmuiSelect()):t.data?a.html(t.data):a.html(optin_vars.messages.something_went_wrong)}).fail(function(e){a.html(optin_vars.messages.something_went_wrong)})};e(t).on("click",".sendinblue_optin_load_more_lists",i)}})})}(jQuery,document),function(e){"use strict";Optin.Mixins.add_services_mixin("sendy",function(){return new Optin.Provider({id:"sendy",provider_args:{installation_url:"#optin_sendy_installation_url"},errors:{installation_url:{name:"optin_sendy_installation_url",message:optin_vars.messages.sendy.enter_url,iconClass:"dashicons-warning-url"}}})})}(jQuery,document),Hustle.define("Optin.Wizard",function(e){"use strict";return Backbone.View.extend({el:"#wpoi-wizard",events:{"click .next-button button.wph-button-save":"save","click .next-button button.wph-button-next":"save","click .next-button button.wph-button-finish":"save","click .wph-toggletabs--title.can-open":"toggle_section","click .js-wph-optin-cancel":"cancel","click .js-wph-optin-back":"back"},toggle_section:function(t){var i=this.$(t.target),s=i.closest(".wph-toggletabs");e(".wph-toggletabs").not(s).removeClass("wph-toggletabs--open"),s.toggleClass("wph-toggletabs--closed wph-toggletabs--open")},validate:function(){var e=0;return this.$("#optin_new_name").val()||e++,this.$("#optin_new_provider_name").val()||this.$("#wpoi-test-mode-setup").is(":checked")||this.$("#wpoi-save-to-local").is(":checked")||e++,e},save:function(t){t.preventDefault(),Hustle.Events.trigger("Optin.save");var i=Optin.step.services.errors,s=this,n=this.$(t.target).closest("button"),o=n.data("nonce"),a=Optin.step.services.model.get("optin_id")||-1,l=a==-1;this.validate()>0||i>0||(n.attr("disabled",!0),n.hasClass("wph-button-next")||n.hasClass("wph-button-finish")?n.addClass("wph-button-next--loading"):n.addClass("wph-button-save--loading"),n.siblings().attr("disabled",!0),e.ajax({type:"POST",url:ajaxurl,data:{action:"inc_opt_save_new",id:a,_ajax_nonce:o,optin:Optin.step.services.model.toJSON(),design:Optin.step.design.model.toJSON(),settings:Optin.step.display.model.toJSON(),provider_args:Optin.step.services.provider_args.toJSON()},complete:function(){Optin.hasChanges=!1,n.attr("disabled",!1).removeClass("wph-button-next--loading").removeClass("wph-button-save--loading"),n.siblings().attr("disabled",!1),n.hasClass("wph-button-next")&&s.next(t),n.hasClass("wph-button-finish")&&s.finish_setup(t)},success:function(e){if(e.success){Optin.step.services.model.set("optin_id",e.data),Optin.hasChanges=!1;var t=window.location.pathname+window.location.search;l&&t.indexOf("&optin=")===-1&&(t+="&optin="+e.data,window.history.replaceState({},"",t))}}}))},next:function(t){var i=this.$(t.target),s=i.closest(".wph-toggletabs"),n=s.nextAll(".wph-toggletabs");if(n.length){var o=n.eq(0);return s.removeClass("wph-toggletabs--open").addClass("wph-toggletabs--closed"),o.addClass("wph-toggletabs--open"),void e("html, body").animate({scrollTop:o.offset().top},700)}},cancel:function(e){e.preventDefault(),window.onbeforeunload=null,window.location.replace("?page=inc_optin_listing")},finish_setup:function(e){e.preventDefault();var t=Optin.step.services.model.get("optin_id")||-1,i=t==-1;window.onbeforeunload=null;var s="?page=inc_optin_listing";s+=i?"&optin="+t:"&optin_updated="+t,window.location.replace(s)},back:function(t){t.preventDefault();var i=this.$(t.target),s=i.closest(".wph-toggletabs"),n=s.prevAll(".wph-toggletabs"),o=n.first();s.removeClass("wph-toggletabs--open"),o.addClass("wph-toggletabs--open"),e("html, body").animate({scrollTop:o.offset().top},700)}})}),Hustle.define("Optin.Email_Services_Tab",function(e){"use strict";return Hustle.View.extend(_.extend({},Hustle.get("Mixins.Model_Updater"),{template:Hustle.template("wpoi-wizard-services_template"),el:"#wpoi-wizard-services",events:{"click .next-button button":"validate","change #optin_new_provider_name":"provider_change","click .optin_refresh_provider_details":"refresh_provider_details"},fields:{name:"#optin_new_name",provider:"#optin_new_provider_name",api_key:"#optin_api_key",mail_list:"#optin_email_list",test_mode:"#wpoi-test-mode-setup",save_to_local:"#wpoi-save-to-local"},init:function(t){return this.render(),this.provider_args=t.provider_args,this.$details_placeholder=e("#optin_new_provider_account_details"),this.$options_placeholder=e("#optin_new_provider_account_options"),this.params=this.get_params(),"undefined"!=typeof this.params.code&&window.setTimeout(function(){e("#optin_new_provider_name").trigger("change")},750),_.each(Optin.Mixins.get_services_mixins(),function(e,t){e&&"function"==typeof e&&(this[t]=e(this))},this),this.listenTo(this.model,"change:test_mode",this.toggle_optin_provider_settings),this.listenTo(this.model,"change:optin_name",this.set_shortcode_id),this},render:function(){return this.$el.html(this.template(this.model.toJSON())),this.toggle_optin_provider_settings(),this},toggle_optin_provider_settings:function(){this.$(".wph-label--notice").toggleClass("hidden",_.isFalse(this.model.get("test_mode"))),this.$(".wph-label--notice").siblings().toggleClass("hidden",_.isTrue(this.model.get("test_mode"))),this.$("#optin_new_provider_name").prop("disabled",_.isTrue(this.model.get("test_mode")))},update_model:function(t){t&&t.preventDefault();e(".optwiz-container");Optin.step.model=Optin.step.model||new Optin.Model(optin_vars.current.data),Optin.step.model.set("optin_name",this.$(this.fields.name).val()),Optin.step.model.set("optin_provider",this.$(this.fields.provider).val()),this.$(this.fields.api_key)&&Optin.step.model.set("api_key",this.$(this.fields.api_key).val()),this.$(this.fields.mail_list).length&&Optin.step.model.set("optin_mail_list",this.$(this.fields.mail_list).val()),Optin.step.model.set("test_mode",this.$(this.fields.test_mode).is(":checked")?1:0),Optin.step.model.set("save_to_local",this.$(this.fields.save_to_local).is(":checked")?1:0),this.toggle_optin_provider_settings()},set_shortcode_id:function(){var e=_.isEmpty(Optin.step.model.get("optin_name"))?"":Optin.step.model.get("optin_name").toString().toLowerCase().trim().replace(/\s+/g,"-");Optin.step.display.model.set("shortcode_id",e)},validate:function(t){void 0!==t&&t.preventDefault(),Optin.Events.trigger("services:validate:before"),this.update_model(),Optin.step.services.errors=0;var i=Optin.step.model.validate_first_step(),s=this.$("#optin_new_provider_name").val();if(s&&this[s]&&"function"==typeof this[s].validate){var n=this[s].validate.call(this,i);i=_(i._wrapped.concat(n._wrapped))}if(!i.size()||this.$(this.fields.test_mode).is(":checked")&&!_.isEmpty(this.$(this.fields.name).val())||this.$(this.fields.save_to_local).is(":checked")&&!_.isEmpty(this.$(this.fields.name).val()))void 0!==t&&Optin.router.navigate("design",!0);else{var o=this;this.$el.find("span.dashicons-warning").remove(),i.each(function(t,i){var s=e('<span class="dashicons dashicons-warning"></span>'),n=o.$(o.fields[t.name]);n.length&&(s.attr("title",t.message),n.hasClass("wdev-styled")?n.closest(".select-container").addClass("wpoi-error"):n.addClass("wpoi-error"),n.closest(".select-container").length?n.closest(".select-container").before(s):n.after(s))})}Optin.Events.trigger("services:validate:after")},get_params:function(){var e=location.search,t="&";return _.chain(e.slice(1).split(t)).map(function(e){if(e)return e.split("=")}).compact().object().value()},provider_change:function(t){var i=this,s=e(t.currentTarget).val(),n=e("#wpoi-email-provider-details-container");return s?(n.show(),this.$details_placeholder.html(""),this.$options_placeholder.html(""),this.remove_prev_provider_args(),void e.ajax({url:ajaxurl,type:"get",async:!0,data:{action:"render_provider_account_options",provider_id:t.target.value,_ajax_nonce:e(t.target).data("nonce"),optin:i.model.get("optin_id")},success:function(s){if(s.success===!0)i.$details_placeholder.html(s.data),"constantcontact"==t.target.value&&"undefined"!=typeof i.params.code&&(e("#optin_api_key").val(i.params.code),e(".optin_refresh_provider_details").trigger("click")),i.delegateEvents(),Hustle.Events.trigger("view.rendered",i);else{var n="";s.data&&_.isArray(s.data)&&(n=s.data.join(", ")),i.$details_placeholder.html(n)}}})):void n.hide()},refresh_provider_details:function(t){var i=this,s=this.$(t.target),n=s.closest("form"),o=this.$(".wpoi-box"),a=n.serialize(),l=s.closest("#wpoi-get-lists").find("input"),r=this.$("#optin_new_provider_account_options");return _.isEmpty(l.val())?t.preventDefault():(this.remove_prev_provider_args(),r.html(this.$("#wpoi_loading_indicator").html()),a+="&action=refresh_provider_account_details","undefined"!=typeof i.model.attributes.optin_id&&(a+="&optin="+i.model.attributes.optin_id),o.find("input,select,button").attr("disabled",!0),Optin.step.services.provider_args.clear({silent:!0}),Optin.step.services.model.set("optin_mail_list","none"),void e.post(ajaxurl,a,function(e){o.find("input,select,button").attr("disabled",!1),e.success===!0?e.data.redirect_to?window.location.href=e.data.redirect_to:(e.data?r.html(e.data):r.html(optin_vars.messages.something_went_wrong),i.$("select").wpmuiSelect()):e.data?r.html(e.data):r.html(optin_vars.messages.something_went_wrong)}).fail(function(e){r.html(optin_vars.messages.something_went_wrong)}))},remove_prev_provider_args:function(){var t=e("#wpoi-mailchimp-prev-group-args");t.empty()}}))}),Hustle.define("Optin.Design_Tab",function(e){"use strict";var t=Hustle.View.extend({template:Hustle.template("wpoi-module-field"),tagName:"tr",options:{},controller:!1,events:{"change [name]":"updateOptions","click .wph-column-icon":"removeModule"},initialize:function(e){this.options=e.options,this.controller=e.controller,this.field_container=this.controller.$("tbody"),this.render()},render:function(){this.$el.html(this.template(this.options)).attr("data-index",this.options.index),this.$el.appendTo("#wpoi-module-fields");var e=this,t={items:"tr",containment:this.controller.$(".wph-table--module_fields table"),stop:function(t,i){e.reOrderFields()}};this.field_container.sortable(t).disableSelection()},reOrderFields:function(){var t=this,i=[];this.field_container.find("tr").each(function(s){var n=e(this),o=n.data("index"),a=t.controller.module_fields[o];a.index=s,i[s]=a,n.data("index",s)}),this.controller.module_fields=i,this.controller.model.set("module_fields",i)},updateOptions:function(t){var i=e(t.currentTarget),s=i.attr("name"),n=i.val(),o=Optin.step.services.model.get("optin_provider");return"required"===s&&(n=i.is(":checked")),this.options[s]=n,o&&optin_vars.providers[o]&&_.contains(["name","label"],s)?void Optin.Events.trigger("optin:update_module_field_"+o,this.options,this,this.controller.optin.toJSON().optin_id):void this._updateOptions()},_updateOptions:function(){this.controller.module_fields[this.options.index]=this.options,this.controller.model.set("module_fields",this.controller.module_fields)},removeModule:function(){var e=this,t=0;this.controller.module_fields=_.filter(this.controller.module_fields,function(i){if(i.name!=e.options.name)return i.index=t,t++,i}),this.controller.model.set("module_fields",this.controller.module_fields),this.remove()}});return Hustle.View.extend(_.extend({},Hustle.get("Mixins.Model_Updater"),{template:Hustle.template("wpoi-wizard-design_template"),message_editor:!1,success_editor:!1,structure_tpl:Hustle.template("wpoi-wizard-design_structure_template"),module_fields_tpl:Hustle.template("wpoi-wizard-design_module_fields_template"),shapes_tpl:Hustle.template("wpoi-wizard-design_shapes_template"),after_submit_tpl:Hustle.template("wpoi-wizard-design_after_submit_template"),color_pickers_tpl:Hustle.template("optin-color-pickers"),el:"#wpoi-wizard-design",preview:!1,preview_model:!1,defaults:{optin_input_icons:""},module_index:0,stylable_elements:{main_background:".wpoi-hustle .wpoi-optin",title_color:".wpoi-hustle h2.wpoi-title",link_color:".wpoi-hustle .wpoi-message p a",content_color:".wpoi-hustle .wpoi-message, .wpoi-hustle .wpoi-message p",link_hover_color:".wpoi-hustle .wpoi-message p a:hover",link_active_color:".wpoi-hustle .wpoi-message p a:active, .wpoi-hustle .wpoi-message p a:focus",form_background:".wpoi-hustle .wpoi-form",fields_background:".wpoi-hustle form .wpoi-element",fields_hover_background:".wpoi-hustle form .wpoi-element:hover",fields_active_background:".wpoi-hustle form .wpoi-element:active, .wpoi-hustle form .wpoi-element:focus",label_color:".wpoi-hustle form .wpoi-element label, .wpoi-hustle form .wpoi-element label span, .wpoi-hustle form .wpoi-element .wphi-font",button_background:".wpoi-hustle form button",button_label:".wpoi-hustle form button",fields_color:".wpoi-hustle form > .wpoi-element input",fields_hover_color:".wpoi-hustle form > .wpoi-element input:hover",fields_active_color:".wpoi-hustle form > .wpoi-element input:active, .wpoi-hustle form > .wpoi-element input:focus",error_color:".wpoi-hustle form .i-error, .wpoi-hustle form .i-error + span",button_hover_background:".wpoi-hustle form button:hover",button_active_background:".wpoi-hustle form button:active, .wpoi-hustle form button:focus",button_hover_label:".wpoi-hustle form button:hover",button_active_label:".wpoi-hustle form button:active, .wpoi-hustle form button:focus",checkmark_color:".wpoi-hustle .wpoi-success-message .wphi-font",success_color:".wpoi-hustle .wpoi-success-message .wpoi-content, .wpoi-hustle .wpoi-success-message .wpoi-content p",close_color:"a.inc-opt-close-btn, a.inc-opt-close-btn:visited",nsa_color:".wpoi-nsa > a, .wpoi-nsa > a.inc_opt_never_see_again",overlay_background:".wpoi-popup-overlay",close_hover_color:"a.inc-opt-close-btn:hover",nsa_hover_color:".wpoi-nsa > a:hover, .wpoi-nsa > a.inc_opt_never_see_again:hover",nsa_active_color:".wpoi-nsa > a:active, .wpoi-nsa > a.inc_opt_never_see_again:active, .wpoi-nsa > a:focus, .wpoi-nsa > a.inc_opt_never_see_again:focus",radio_background:'.wpoi-hustle form .wpoi-mcg-option input[type="radio"] + label:before',radio_checked_background:'.wpoi-hustle form .wpoi-mcg-option input[type="radio"]:checked + label:after',checkbox_background:'.wpoi-hustle form .wpoi-mcg-option input[type="checkbox"] + label:before',checkbox_checked_color:'.wpoi-hustle form .wpoi-mcg-option input[type="checkbox"]:checked + label:before',mcg_title_color:".wpoi-hustle form .wpoi-mcg-list-name, .wpoi-hustle .wpoi-submit-failure",mcg_label_color:'.wpoi-hustle form .wpoi-mcg-option input[type="checkbox"] + label, .wpoi-hustle form .wpoi-mcg-option input[type="radio"] + label',close_active_color:"a.inc-opt-close-btn:active, a.inc-opt-close-btn:focus"},events:{"click .wph-preview--eye":"open_preview","change #optin_color_palettes":"update_color_palette","submit form.wpoi-form-wrap":"cancel_dummy_optin_submit","change #optin-active-css":"toggleCustomCSS","click #optin_apply_custom_css":"apply_custom_css","click .wph-triggers--options label":"handle_triggers","mouseenter .wpoi-stylable-element":"highlight_stylable_element","mouseleave .wpoi-stylable-element":"highlight_stylable_element","click .wpoi-stylable-element":"insert_stylable_element","change #optin_fname":"update_optional_elements","change #optin_lname":"update_optional_elements","change #optin_customize_color_palette":"_toggleColorScheme",'change [name="on_success"]':"updateMeta",'change [name="on_success_time"]':"updateMeta",'change [name="on_success_unit"]':"updateMeta","change .wysiwyg-tab":"toggleSuccessMessageFields","click .add-new-module-field":"newModuleField","click .wph-cancel-add-field":"cancelAddField","click .wph-add-new-field":"addNewField",'keyup [data-name="label"]':"removeWarningIcons",'keyup [data-name="name"]':"removeWarningIcons"},stylables:{".wpoi-hustle .wpoi-optin ":"Opt-in Container",".wpoi-title ":"Title",".wpoi-message, .wpoi-message p ":"Content",".wpoi-form ":"Form Container",".wpoi-form .wpoi-subscribe-fname ":"First Name",".wpoi-form .wpoi-subscribe-lname ":"Last Name",".wpoi-form .wpoi-subscribe-email ":"Email",".wpoi-form .wpoi-subscribe-send ":"Form Button"},init:function(e){return this.optin=e.optin,this.listenTo(this.model,"change",this.render_structure),this.listenTo(this.model,"change:colors.customize",this.render_color_pickers),this.listenTo(this.model,"change:borders.fields_style",this.render_shapes),this.listenTo(this.model,"change:on_submit",this.render_on_submit),this.listenTo(this.model,"change:image_style",this.update_image_style),this.listenTo(this.model,"change:image_src",this.update_image_style),this.listenTo(this.model,"change:form_location",this.set_proper_image_location),this.listenTo(Hustle.Events,"Optin.save",this.sync_model_data),this.listenTo(Hustle.Events,"Optin.preview.changed.type",this.preview_type_changed),this.render()},render:function(){this.$el.html(this.template(_.extend({},{palettes:Palettes.toJSON()},{stylables:this.stylables},this.optin.toJSON(),this.model.toJSON()))),this.render_structure(),this.render_module_fields(),this.render_shapes(),this.render_on_submit(),this.create_editors(),this.update_styles(),this.update_borders_style(),this.render_color_pickers(),this.render_image_holder(),this.update_image_style(),this.apply_custom_css()},render_structure:function(){this.$("#wph-optin--structure").html(this.structure_tpl(this.model.toJSON()))},render_module_fields:function(){this.$("#wph-optin--module-fields").html(this.module_fields_tpl(this.model.toJSON())),this.module_fields=this.model.get("module_fields"),this.module_fields||(this.module_fields=optin_vars.module_fields),_.each(this.module_fields,function(e){e.index=this.module_index;new t({options:e,controller:this});this.module_index+=1},this)},handle_triggers:function(t){var i=e(t.target),s=i.closest("li"),n=s.siblings();n.removeClass("current"),s.addClass("current")},render_shapes:function(){var e=this.model.toJSON();e.wph_disabled="","joined"===this.model.get("borders.fields_style")&&(e.wph_disabled="disabled"),this.$("#wph-optin--shapes").html(this.shapes_tpl(e)),Hustle.Events.trigger("view.rendered",this.$("#wph-optin--shapes")),this.create_color_pickers()},render_on_submit:function(){"success_message"==this.model.get("on_submit")?this.$("label[for='wpoi-sm']").show():(this.$("label[for='wpoi-sm']").hide(),this.$("label[for='wpoi-om']").click())},update_image_style:function(){var e=this.model.get("image_src"),t=this.model.get("image_style"),i=this.$(".wph-media--holder .wph-media--preview");e.trim()&&i.length&&i.css("background-size",t)},create_color_pickers:function(){this.$(".optin_color_picker").not(".wp-color-picker").wpColorPicker({change:function(t,i){var s=e(this);s.val(i.color.toCSS()).trigger("change")}})},render_image_holder:function(){var e=Hustle.get("Media_Holder");this.media_holder=new e({model:this.model,attribute:"image_src"}),this.$(".wph-media--holder").html(this.media_holder.$el)},cancel_dummy_optin_submit:function(e){e.preventDefault()},update_color_palette:function(e){var t=Palettes.findWhere({_id:e.target.value}),i=(this.model.get("colors").toJSON(),Hustle.get("Models.M"));this.model.set("colors",new i(_.extend({},t.toJSON(),{palette:e.target.value}))),this.$("#optin_customize_color_palette").prop("checked",!1),this.render_color_pickers()},render_color_pickers:function(){var e=this.$("#optwiz-custom_color");_.isTrue(this.model.get("colors.customize"))?e.html(this.color_pickers_tpl(this.model.toJSON())).removeClass("hidden"):e.addClass("hidden"),this.create_color_pickers()},_fix_layout_3_sizes:function(){e(".wpoi-layout-three .wpoi-optin:not(.wpoi-small) .nocontent:not(.noimage)").each(function(){var t=e(this),i=t.find(".wpoi-aside-x").prev(".wpoi-element"),s=t.find(".wpoi-aside-x").prev(".wpoi-element").find(".wpoi-container.wpoi-col");s.css("height",i.height())}),e(".wpoi-layout-three .wpoi-optin:not(.wpoi-small) > .wpoi-container.noimage:not(.nocontent)").each(function(){var t=e(this),i=t.find(".wpoi-aside-x"),s=t.find(".wpoi-image").next(".wpoi-element"),n=i.prev(".wpoi-element"),o=t.find(".wpoi-content"),a=n.find(".wpoi-col"),l=t.find("form");l.height()>o.height()&&(a.css("height",i.height()+"px"),s.addClass("wpoi-align"),o.addClass("wpoi-align-element")),l.height()<o.height()&&(i.css("height",n.height()+"px"),i.addClass("wpoi-align"),l.addClass("wpoi-align-element"))}),e(".wpoi-layout-three .wpoi-optin:not(.wpoi-small) > .wpoi-container:not(.noimage):not(.nocontent)").each(function(){var t=e(this),i=t.find(".wpoi-aside-x"),s=i.prev(".wpoi-element"),n=t.find("form");n.height()<s.height()&&(i.css("height",s.height()),i.addClass("wpoi-align"),n.addClass("wpoi-align-element"))})},create_editors:function(){this._bind_to_message_editor(),this._create_css_editor()},highlight_stylable_element:function(t){var i=e(t.target),s=e(i.data("stylable"));s.toggleClass("optin_hovered_stylable_element")},insert_stylable_element:function(t){t.preventDefault();var i=e(t.target),s=i.data("stylable")+"{}";this.css_editor.navigateFileEnd(),this.css_editor.insert(s),this.css_editor.navigateLeft(1),this.css_editor.focus()},apply_proper_preview_classes:function(){e(".wpoi-hustle").each(function(){e(this).width()<=405?e(this).find(".wpoi-optin").addClass("wpoi-small"):e(this).find(".wpoi-optin").removeClass("wpoi-small"),e(this).width()<=585&&e(this).width()>405?e(this).find(".wpoi-optin").addClass("wpoi-medium"):e(this).find(".wpoi-optin").removeClass("wpoi-medium")}),e(".wpoi-layout-three .wpoi-optin:not(.wpoi-small) .wpoi-form").each(function(){
|
6 |
-
e(this).height()>168?(e(this).addClass("wpoi-align"),e(this).next("form").addClass("wpoi-align-element")):(e(this).removeClass("wpoi-align"),e(this).next("form").removeClass("wpoi-align-element"))}),e(".wpoi-mcg-select").each(function(){e(this).parent(".wpoi-provider-args > .wpoi-container > .wpoi-element:nth-child(2) > .wpoi-container > .wpoi-element").css({padding:"0",background:"transparent"})}),e(".wpoi-layout-three .wpoi-optin:not(.wpoi-small) .nocontent:not(.noimage)").each(function(){var t=e(this),i=t.find(".wpoi-aside-x").prev(".wpoi-element"),s=t.find(".wpoi-aside-x").prev(".wpoi-element").find(".wpoi-container.wpoi-col");s.css("height",i.height())}),e(".wpoi-layout-three .wpoi-optin:not(.wpoi-small) > .wpoi-container.noimage:not(.nocontent)").each(function(){var t=e(this),i=t.find(".wpoi-aside-x"),s=t.find(".wpoi-image").next(".wpoi-element"),n=i.prev(".wpoi-element"),o=t.find(".wpoi-content"),a=n.find(".wpoi-col"),l=t.find("form");l.height()>o.height()&&(a.css("height",i.height()+"px"),s.addClass("wpoi-align"),o.addClass("wpoi-align-element")),l.height()<o.height()&&(i.css("height",n.height()+"px"),i.addClass("wpoi-align"),l.addClass("wpoi-align-element"))}),e(".wpoi-layout-three .wpoi-optin:not(.wpoi-small) > .wpoi-container:not(.noimage):not(.nocontent)").each(function(){var t=e(this),i=t.find(".wpoi-aside-x"),s=i.prev(".wpoi-element"),n=t.find("form");n.height()<s.height()&&(i.css("height",s.height()),i.addClass("wpoi-align"),n.addClass("wpoi-align-element"))}),e(".wpoi-layout-three .wpoi-optin:not(.wpoi-small)").each(function(){for(var t=e(this),i=t.find("form > .wpoi-element:not(.wpoi-provider-args)"),s=0;s<i.length;s+=2)i.slice(s,s+2).wrapAll('<div class="wpoi-element" style="background-color: transparent;"><div class="wpoi-container"></div></div>')}),e(".wpoi-layout-four .wpoi-optin:not(.wpoi-small)").each(function(){for(var t=e(this),i=t.find("form > .wpoi-element:not(.wpoi-provider-args)"),s=0;s<i.length;s+=2)i.slice(s,s+2).wrapAll('<div class="wpoi-element" style="background-color: transparent;"><div class="wpoi-container"></div></div>')}),e(".wpoi-layout-four .wpoi-optin:not(.wpoi-small) > .wpoi-container.noimage:not(.nocontent)").each(function(){var t=e(this),i=t.find(".wpoi-aside-xl"),s=t.find(".wpoi-aside-xl > .wpoi-container"),n=i.find(".wpoi-form"),o=i.find("form"),a=i.next(".wpoi-element"),l=a.find(".wpoi-content");l.height()>o.height()&&(s.css("height",i.height()+"px"),n.addClass("wpoi-align"),o.addClass("wpoi-align-element")),l.height()<o.height()&&(a.css("height",s.height()+"px"),a.addClass("wpoi-align"),l.addClass("wpoi-align-element"))}),e(".wpoi-layout-four .wpoi-optin:not(.wpoi-small) > .wpoi-container:not(.noimage):not(.nocontent)").each(function(){var t=e(this),i=t.find(".wpoi-aside-xl"),s=t.find(".wpoi-aside-xl > .wpoi-container"),n=t.find(".wpoi-image"),o=i.find(".wpoi-form"),a=i.find("form"),l=i.next(".wpoi-element"),r=t.find(".wpoi-content");r.height()>s.height()&&(s.css("height",i.height()+"px"),o.css("height",s.height()-n.height()),o.addClass("wpoi-align"),a.addClass("wpoi-align-element")),r.height()<s.height()&&(l.css("height",i.height()+"px"),l.addClass("wpoi-align"),r.addClass("wpoi-align-element"))})},_bind_to_message_editor:function(){var e=this,t=setInterval(function(){"object"==typeof tinymce&&(clearInterval(t),tinymce.on("AddEditor",function(t){var i=function(){t&&"optin_message"===t.editor.getParam("id")&&e.optin.set("optin_message",this.getContent()),t&&"success_message"===t.editor.getParam("id")&&e.model.set("success_message",this.getContent()),e.apply_proper_preview_classes()};t&&"optin_message"===t.editor.getParam("id")&&(e.message_editor=t.editor),t&&"success_message"===t.editor.getParam("id")&&(e.success_editor=t.editor),t.editor.on("loadContent",function(e){this.dom.setStyle("tinymce","maxWidth","100%")}),Optin.Events.off("navigate",e.refresh_editor,e),Optin.Events.on("navigate",e.refresh_editor,e),e.on("rendered",e.refresh_editor,e),t.editor.on("change",i),t.editor.on("AddUndo",i),t.editor.on("keyup",i),e.apply_proper_preview_classes()}))},50)},refresh_editor:function(t,i){"design"===i&&_.isObject(this.message_editor)&&(this.message_editor.remove(),tinymce.init(this.message_editor.settings),e(this.message_editor.settings.selector+"_ifr").height(240),this.success_editor.remove(),tinymce.init(this.success_editor.settings),e(this.success_editor.settings.selector+"_ifr").height(240))},_create_css_editor:function(){this.css_editor=ace.edit("optin_custom_css"),this.css_editor.getSession().setMode("ace/mode/css"),this.css_editor.setTheme("ace/theme/solarized_light"),this.css_editor.getSession().setUseWrapMode(!0),this.css_editor.getSession().setUseWorker(!1),this.css_editor.setShowPrintMargin(!1),this.css_editor.renderer.setShowGutter(!0),this.css_editor.setHighlightActiveLine(!0),this.css_editor.on("blur",e.proxy(this.update_custom_css,this))},_create_color_pickers:function(){var e=this;this.$(".optin_color_picker").wpColorPicker({change:function(t,i){var s="update_"+this.id.replace("optin_","");"function"==typeof e[s]?e[s](t,i):console.warn("Method ",s," not found")}}),this.$(".ui-draggable-handle").click(function(e){e.preventDefault()})},update_custom_css:function(){this.model.set("css",this.css_editor.getValue())},_toggleColorScheme:function(){var t=e("#optin_color_palettes"),i=e("#optin_customize_color_palette");t.prop("disabled",i.is(":checked"))},toggleCustomCSS:function(t){var i=e(t.currentTarget),s=i.is(":checked"),n=this.$("#wph-css-holder");n[s?"removeClass":"addClass"]("hidden"),i.closest("label.wph-label--border").toggleClass("toggle-off")},apply_custom_css:function(t){t&&(t.preventDefault(),e(t.target).prop("disabled",!0)),this._toggleColorScheme(),this.update_custom_css();var i=e("#optin-custom-styles").length?e("#optin-custom-styles"):e('<style id="optin-custom-styles">').appendTo("body"),s=this.css_editor.getValue();e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"inc_opt_prepare_custom_css",css:s,_ajax_nonce:e("#optin_custom_css").data("nonce"),optin_id:optin_vars.current.data.optin_id},success:function(s){s&&s.success&&i.html(s.data),t&&e(t.target).prop("disabled",!1)},error:function(){t&&e(t.target).prop("disabled",!1)}})},get_layout_colors:function(){return _.isTrue(this.model.get("colors.customize"))?this.model.toJSON().colors:Palettes.findWhere({_id:this.model.get("colors.palette")}).toJSON()},update_styles:function(){var t=this.get_layout_colors(),i="",s=e("#optin-preview-styles").length?e("#optin-preview-styles"):e('<style id="optin-preview-styles">').appendTo("body");_.each(this.stylable_elements,function(e,s){var n=s.indexOf("background")!==-1?"background":"color",o=t[s];i+=e+"{ "+n+": "+o+";} "}),s.html(i)},update_borders_style:function(){var t=this.model.toJSON().borders,i=this.stylable_elements,s="",n=e("#optin-preview-styles-borders").length?e("#optin-preview-styles-borders"):e('<style id="optin-preview-styles-borders">').appendTo("body");s+=i.main_background+"{border-radius:"+t.corners_radius+"px;}","joined"===this.model.get("borders").get("fields_style")?(s+=i.fields_background+"{border-radius: 0px;}",s+=i.button_background+"{border-radius: 0px;}"):(s+=i.fields_background+"{border-radius:"+t.fields_corners_radius+"px;}",s+=i.button_background+"{border-radius:"+t.button_corners_radius+"px;}"),s+=i.main_background+"{box-shadow: 0 0 "+t.dropshadow_value+"px "+t.shadow_color+"}",n.html(s)},update_optional_elements:function(e){var t=this.model.get("elements");e.target.checked?(t.push(e.target.value),this.model.set("elements",t,{silent:!0})):this.model.set("elements",_.without(t,e.target.name),{silent:!0})},_show_args:function(){return"mailchimp"===Optin.step.services.model.get("optin_provider")&&!Optin.step.services.provider_args.isEmpty()&&"hidden"!==Optin.step.services.provider_args.get("group").form_field},set_proper_image_location:function(e){0!==e.get("form_location")&&e.set("image_location","left")},_set_preview_model:function(){var e=this.optin.toJSON(),t=function(){return!("mailchimp"!==e.optin_provider||!Optin.step.services.provider_args||!Optin.step.services.provider_args.get("group")||"hidden"===Optin.step.services.provider_args.get("group").form_field)},i=Optin.step.display.model.toJSON();return this.preview_model?void this.preview_model.set(_.extend({image_style:"",type:"popup"},this.model.toJSON(),this.model.get("borders").toJSON(),this.optin.toJSON(),{types:{after_content:i.after_content,popup:i.popup,slide_in:i.slide_in}},{has_args:t()})):void(this.preview_model=new Backbone.Model(_.extend({image_style:"",type:"popup"},this.model.toJSON(),this.model.get("borders").toJSON(),this.optin.toJSON(),{types:{after_content:i.after_content,popup:i.popup,slide_in:i.slide_in}},{has_args:t()})))},open_preview:function(e){if(Optin.Events.trigger("design:preview:render:start"),this.sync_model_data(),this._set_preview_model(),this.preview)this.preview.render(),this.preview.show();else{var t=Hustle.get("Optin.Preview");this.preview=new t({model:this.preview_model}),this.preview.show()}this._fix_layout_3_sizes(),this.update_styles(),this.update_borders_style(),this.apply_proper_preview_classes(),this.apply_custom_css()},preview_type_changed:function(){this._fix_layout_3_sizes(),this.update_styles(),this.update_borders_style(),this.apply_proper_preview_classes(),this.apply_custom_css()},sync_model_data:function(){var t=this.model.get("optin_title");t||(t=e("#optin_title").val()),this.optin.set("optin_title",t),"object"==typeof tinymce&&(this.message_editor||(this.message_editor=tinymce.get("optin_message")),this.optin.set("optin_message",this.message_editor.getContent()),this.success_editor||(this.success_editor=tinymce.get("success_message")),this.model.set("success_message",this.success_editor.getContent()))},updateMeta:function(t){var i=e(t.currentTarget),s=i.attr("name");this.model.set(s,i.val())},toggleSuccessMessageFields:function(t){var i=e(t.currentTarget),s="success_message"===i.val(),n=e("#wpoi-success-message-fields");n[s?"removeClass":"addClass"]("hidden")},newModuleField:function(t){var i=e(t.currentTarget);this.$("#wpoi-module-field-maker").removeClass("hidden");i.attr("disabled","disabled")},cancelAddField:function(){var t=this.$("#wpoi-module-field-maker").addClass("hidden");e(".dashicons-warning",t).remove(),e('[type="text"]',t).val(""),this.$(".add-new-module-field").attr("disabled",!1)},addNewField:function(){var t=this.$("[data-name]","#wpoi-module-field-maker").not(":disabled"),i={},s=0;if(_.each(t,function(t){t=e(t);var n=t.data("name"),o=t.val();if(_.contains(["label","name"],n)&&""===o.trim()){s++;var a=e('<span class="dashicons dashicons-warning"></span>');t.after(a),"label"===n&&a.attr("title",optin_vars.messages.module_fields.no_label),"name"===n&&a.attr("title",optin_vars.messages.module_fields.no_name)}"name"===n&&this.$('td.wph-column-name input[name="name"]').each(function(i){if(e(this).val()===o){s++;var n=e('<span class="dashicons dashicons-warning"></span>'),a=optin_vars.messages.module_fields.custom_field_already_exists.replace("{name}",o);t.after(n),n.attr("title",a)}}),"checkbox"===t.attr("type")?i[n]=t.is(":checked"):i[n]=t.val()},this),!(s>0)){this.removeWarningIcons();var n=Optin.step.services.model.get("optin_provider");return n&&optin_vars.providers[n]?(Optin.Events.trigger("optin:add_module_field_"+n,i,this,this.optin.toJSON().optin_id),!1):void this._add_module_field(i)}},_add_module_field:function(e){e.index=this.module_index++;new t({options:e,controller:this});this.module_fields.push(e),this.model.set("module_fields",this.module_fields),this.$(".wph-cancel-add-field").trigger("click")},removeWarningIcons:function(){this.$(".dashicons-warning","#wpoi-module-field-maker").remove()}}))}),function(e){"use strict";Optin.View.Display_Triggers=Backbone.View.extend(e.extend(!0,{},Optin.View.Template_Mixin,{template:Optin.template("wpoi-wizard-settings-triggers-template"),events:{"click .tabs-header label":"change_tab"},initialize:function(e){this.el=e.el,this.type=e.type,this.listenTo(this.model,"change:"+this.type+".trigger_on_adblock",this.hide_adblock_options_on_toggle),this.render()},render:function(){return this.$el.html(this.template(this.get_data())),this.hide_adblock_options_on_toggle(),this},get_data:function(){var e={};return e.type=this.type,e.shortcode_id=this.model.get("shortcode_id"),_.extend({},e,this.model.get(this.type).toJSON())},change_tab:function(e){e.preventDefault();var t=this.$(e.target),i=t.parent("li"),s=this.$(t.attr("href")),n=t.find("input[type='radio']");this.$(".tabs-header li").removeClass("current"),this.$(".tabs-content").removeClass("current"),i.addClass("current"),s.addClass("current"),n.prop("checked",!0),this.model.set(this.type+".appear_after",n.val())},hide_adblock_options_on_toggle:function(){_.isTrue(this.model.get(this.type+".trigger_on_adblock"))?this.$(".wpoi-popup-trigger-on-adblock-option").show():this.$(".wpoi-popup-trigger-on-adblock-option").hide()}}))}(jQuery),Hustle.define("Optin.Display_Tab",function(e){"use strict";return Hustle.View.extend(_.extend({},Hustle.get("Mixins.Model_Updater"),{template:Optin.template("wpoi-wizard-settings_template"),widget_message_tpl:Optin.template("wpoi-wizard-settings_widget_template"),el:"#wpoi-wizard-settings",events:{"click .next-button a.previous":"go_to_design","click .can-open.display-settings-icon span.open i.dev-icon":"toggle_boxes","change #wpoi-after-content-state-toggle":"optin_type_toggle","change #wpoi-popup-state-toggle":"optin_type_toggle","change #wpoi-slide-in-state-toggle":"optin_type_toggle"},init:function(){return this.listenTo(this.model,"change:after_content.animate",this.toggle_after_content_animation_select),this.listenTo(this.model,"change:popup.enabled",this.render),this.listenTo(this.model,"change:slide_in.enabled",this.render),this.listenTo(this.model,"change:after_content.enabled",this.render),this.listenTo(this.model,"change:slide_in.position",this.update_slide_in_position_label),this.listenTo(this.model,"change:shortcode_id",_.bind(this.render_widget_message,this)),this.render()},move_selects_under_selected_radio:function(e,t,i){var s=this.model.get(e),n="."+e.replace(".","_")+"_block",o=n+"_select_wrap",a=this.$(n).eq(1),l=this.$(o);a.length&&l.length&&(_.isTrue(s)?a.insertAfter(l):a.insertBefore(l))},render_widget_message:function(){var e=this.widget_message_tpl(this.model.toJSON());this.$("#wpoi-wizard-settings-widget-message").html(e)},render:function(){var t=Hustle.get("Settings.Conditions_View");this.popup_conditions_view=new t({model:this.model.get("popup.conditions"),type:"popup"}),this.slide_in_conditions_view=new t({model:this.model.get("slide_in.conditions"),type:"slide_in"}),this.after_content_conditions_view=new t({model:this.model.get("after_content.conditions"),type:"after_content"}),this.model.set("slide_in.position_label",optin_vars.messages.positions[this.model.get("slide_in.position")],{silent:!0}),this.$el.html(this.template(e.extend(!0,{},this.model.toJSON(),{popup:{condition_labels:this.popup_conditions_view.get_all_conditions_labels()},after_content:{condition_labels:this.after_content_conditions_view.get_all_conditions_labels()},slide_in:{condition_labels:this.slide_in_conditions_view.get_all_conditions_labels()}}))),this.render_widget_message(),this.popup_conditions_view.delegateEvents(),this.popup_conditions_view.on("toggle_condition",this.render_condition_labels),this.popup_conditions_view.on("change:update_view_label",this.render_condition_labels),this.$("#wph-optin--popup_conditions .wph-conditions").html(this.popup_conditions_view.$el),this.slide_in_conditions_view.delegateEvents(),this.slide_in_conditions_view.on("toggle_condition",this.render_condition_labels),this.slide_in_conditions_view.on("change:update_view_label",this.render_condition_labels),this.$("#wph-optin--slide_in_conditions .wph-conditions").html(this.slide_in_conditions_view.$el),this.after_content_conditions_view.delegateEvents(),this.after_content_conditions_view.on("toggle_condition",this.render_condition_labels),this.after_content_conditions_view.on("change:update_view_label",this.render_condition_labels),this.$("#wph-optin--after_content_conditions .wph-conditions").html(this.after_content_conditions_view.$el);new Optin.View.Display_Triggers({model:this.model,el:"#triggers-section-popup",type:"popup"}),new Optin.View.Display_Triggers({model:this.model,el:"#triggers-section-slide_in",type:"slide_in"});this.$el.find(".can-open.display-settings-icon span.open i.dev-icon").trigger("click")},optin_type_toggle:function(t){var i=e(t.target),s=i.closest(".wpoi-toggle-block"),n=s.find("p").first(),o=i.closest(".wpoi-listing-wrap").find("section");i.is(":checked")?(n.fadeOut(),s.removeClass("inactive")):(n.fadeIn(),s.addClass("inactive")),o.is(".closed")&&i.is(":checked")&&i.closest(".wpoi-toggle-mask").find("span.open i.dev-icon").trigger("click")},toggle_boxes:function(t){var i=e(t.target),s="dev-icon-caret_up",n="dev-icon-caret_down",o=i.hasClass(s)?s:n,a=o==s?n:s,l=i.closest(".wpoi-listing-wrap").find("section");i.switchClass(o,a),l.toggleClass("closed",o==n),l.toggle(a==n)},go_to_design:function(e){e.preventDefault(),Optin.router.navigate("design",!0)},toggle_after_content_animation_select:function(){_.isTrue(this.model.get("after_content.animate"))?this.$("#optin-afterc-animation-block").show(function(){e(this).removeClass("hidden")}):this.$("#optin-afterc-animation-block").hide(function(){e(this).addClass("hidden")})},update_slide_in_position_label:function(e){this.$("#wpoi-slide_in-position-label").text(optin_vars.messages.positions[this.model.get("slide_in.position")])},render_condition_labels:function(t){var i={after_content:e("#wph-after-content-condition-labels"),popup:e("#wph-popup-condition-labels"),slide_in:e("#wph-slide-in-condition-labels")};i[t.type]&&i[t.type].html(t.get_all_conditions_labels())}}))});var Inc_Opt_Router=Backbone.Router.extend({routes:{"":"services",services:"services",design:"design","display(/:optin_type)":"display"},route:function(e,t,i){var s=this;i||(i=this[t]);var n=function(){if(Optin.step.model||(Optin.step.model=new Optin.Model(optin_vars.current.data)),!parseInt(optin_vars.is_limited)){var e=Hustle.get("Optin.Email_Services_Tab");if(!Optin.step.services){var t=Hustle.get("Models.M");Optin.step.services=new e({model:Optin.step.model,provider_args:new t(optin_vars.current.provider_args)})}var n=Hustle.get("Optin.Design_Tab");Optin.step.design||(Optin.step.design=new n({model:new Optin.Models.Design_Model(optin_vars.current.design),optin:Optin.step.model}));var o=Hustle.get("Optin.Display_Tab");if(Optin.step.display||(Optin.step.display=new o({model:new Optin.Models.Settings_Model(optin_vars.current.settings)})),!Optin.step.wizard){var a=Hustle.get("Optin.Wizard");Optin.step.wizard=new a}}i.apply(s,arguments)};return Backbone.Router.prototype.route.call(this,e,t,n)},execute:function(e,t,i){var s=_.keys(this.routes).indexOf(i)-1;if(s==Optin.step.current)return Optin.router.navigate(_.keys(this.routes)[Optin.step.current+1],!1),!1;switch(Optin.step.current){case 0:var n=Optin.step.model.validate_first_step();if(n.size())return Optin.step.services.validate(),Optin.router.navigate(_.keys(this.routes)[Optin.step.current+1],!1),!1}Optin.Events.trigger("navigate",t,i),e&&e.apply(this,t)},services:function(){Optin.step.activate_step(0)},design:function(){Optin.step.activate_step(1)},display:function(e){Optin.step.activate_step(2),e=e||"",""!==e&&jQuery("#wpoi-listing-wrap-"+e).length&&jQuery("#wpoi-listing-wrap-"+e).find("i.dev-icon:not(.search-icon)").trigger("click")}});adminpage=adminpage.replace("hustle-pro","hustle"),"hustle_page_inc_optin"==adminpage&&(Optin.router=new Inc_Opt_Router,Backbone.history.start());
|
7 |
//# sourceMappingURL=maps/admin.min.js.map
|
2 |
},body:function(){return this.template(this.get_data())},rendered:function(){this.$(".js-wpoi-select").wpmuiSelect({tags:"true",width:"100%",createTag:function(){return!1}}).on("select2:selecting",i).on("select2:unselect",i)}})),Optin.View.Conditions.visitor_logged_in=t.extend({condition_id:"visitor_logged_in",disable:["visitor_not_logged_in"],title:optin_vars.messages.conditions.visitor_logged_in,label:optin_vars.messages.condition_labels.visitor_logged_in,body:optin_vars.messages.conditions_body.visitor_logged_in}),Optin.View.Conditions.visitor_not_logged_in=t.extend({condition_id:"visitor_not_logged_in",disable:["visitor_logged_in"],title:optin_vars.messages.conditions.visitor_not_logged_in,label:optin_vars.messages.condition_labels.visitor_not_logged_in,body:optin_vars.messages.conditions_body.visitor_not_logged_in}),Optin.View.Conditions.shown_less_than=t.extend({condition_id:"shown_less_than",title:optin_vars.messages.conditions.shown_less_than,label:optin_vars.messages.condition_labels.shown_less_than,defaults:{less_than:1},body:function(){return this.template(this.get_data())}}),Optin.View.Conditions.only_on_mobile=t.extend({condition_id:"only_on_mobile",disable:["not_on_mobile"],title:optin_vars.messages.conditions.only_on_mobile,label:optin_vars.messages.condition_labels.only_on_mobile,body:optin_vars.messages.conditions_body.only_on_mobile}),Optin.View.Conditions.not_on_mobile=t.extend({condition_id:"not_on_mobile",disable:["only_on_mobile"],title:optin_vars.messages.conditions.not_on_mobile,label:optin_vars.messages.condition_labels.not_on_mobile,body:optin_vars.messages.conditions_body.not_on_mobile}),Optin.View.Conditions.from_specific_ref=t.extend({condition_id:"from_specific_ref",disable:["not_from_specific_ref"],title:optin_vars.messages.conditions.from_specific_ref,label:optin_vars.messages.condition_labels.from_specific_ref,defaults:{refs:""},body:function(){return this.template(this.get_data())}}),Optin.View.Conditions.not_from_specific_ref=t.extend({condition_id:"not_from_specific_ref",disable:["from_specific_ref"],title:optin_vars.messages.conditions.not_from_specific_ref,label:optin_vars.messages.condition_labels.not_from_specific_ref,defaults:{refs:""},body:function(){return this.template(this.get_data())}}),Optin.View.Conditions.not_from_internal_link=t.extend({condition_id:"not_from_internal_link",title:optin_vars.messages.conditions.not_from_internal_link,label:optin_vars.messages.condition_labels.not_from_internal_link,body:optin_vars.messages.conditions_body.not_from_internal_link}),Optin.View.Conditions.from_search_engine=t.extend({condition_id:"from_search_engine",title:optin_vars.messages.conditions.from_search_engine,label:optin_vars.messages.condition_labels.from_search_engine,body:optin_vars.messages.conditions_body.from_search_engine}),Optin.View.Conditions.on_specific_url=t.extend({condition_id:"on_specific_url",disable:["not_on_specific_url"],title:optin_vars.messages.conditions.on_specific_url,label:optin_vars.messages.condition_labels.on_specific_url,defaults:{urls:""},body:function(){return this.template(this.get_data())}}),Optin.View.Conditions.not_on_specific_url=t.extend({condition_id:"not_on_specific_url",disable:["on_specific_url"],title:optin_vars.messages.conditions.not_on_specific_url,label:optin_vars.messages.condition_labels.not_on_specific_url,defaults:{urls:""},body:function(){return this.template(this.get_data())}}),Optin.View.Conditions.visitor_has_commented=t.extend({condition_id:"visitor_has_commented",disable:["visitor_has_never_commented"],title:optin_vars.messages.conditions.visitor_has_commented,label:optin_vars.messages.condition_labels.visitor_has_commented,body:optin_vars.messages.conditions_body.visitor_has_commented}),Optin.View.Conditions.visitor_has_never_commented=t.extend({condition_id:"visitor_has_never_commented",disable:["visitor_has_commented"],title:optin_vars.messages.conditions.visitor_has_never_commented,label:optin_vars.messages.condition_labels.visitor_has_never_commented,body:optin_vars.messages.conditions_body.visitor_has_never_commented}),Optin.View.Conditions.in_a_country=t.extend({condition_id:"in_a_country",disable:["not_in_a_country"],title:optin_vars.messages.conditions.in_a_country,label:optin_vars.messages.condition_labels.in_a_country,defaults:{countries:""},body:function(){return this.template(this.get_data())},rendered:function(){this.$(".js-wpoi-select").val(this.get_attribute("countries")).wpmuiSelect().on("select2:selecting",i).on("select2:unselect",i)}}),Optin.View.Conditions.not_in_a_country=t.extend({condition_id:"not_in_a_country",disable:["in_a_country"],title:optin_vars.messages.conditions.not_in_a_country,label:optin_vars.messages.condition_labels.not_in_a_country,defaults:{countries:""},body:function(){return this.template(this.get_data())},rendered:function(){this.$(".js-wpoi-select").val(this.get_attribute("countries")).wpmuiSelect().on("select2:selecting",i).on("select2:unselect",i)}})}(jQuery),Hustle.define("Settings.Display_Triggers_View",function(e,t,i){"use strict";return Hustle.View.extend(_.extend({},Hustle.get("Mixins.Model_Updater"),{template:Optin.template("wpoi-settings-display-triggers-tpl"),events:{"click .tabs-header label":"change_tab"},init:function(e){this.type=e.type,this.listenTo(this.model,"change:on_adblock",this.hide_adblock_options_on_toggle),this.render()},render:function(){return this.$el.html(this.template(this.get_data())),this.hide_adblock_options_on_toggle(),this},get_data:function(){var e={};return e.type=this.type,_.extend({},e,this.model.toJSON())},change_tab:function(e){e.preventDefault();var t=this.$(e.target),i=t.parent("li"),s=this.$(t.attr("href")),n=t.find("input[type='radio']");this.$(".tabs-header li").removeClass("current"),this.$(".tabs-content").removeClass("current"),i.addClass("current"),s.addClass("current"),n.prop("checked",!0),this.model.set("trigger",n.val())},hide_adblock_options_on_toggle:function(){_.isTrue(this.model.get("on_adblock"))?this.$(".wpoi-popup-trigger-on-adblock-option").show():this.$(".wpoi-popup-trigger-on-adblock-option").hide()}}))}),Hustle.define("Settings.E_News",function(e){"use strict";return Backbone.View.extend({el:"#enews-sync-box",back_tpl:Optin.template("wpoi-e-newsletter-box-back"),initial_html:"",events:{"click .optin-enews-sync-setup":"setup","click .optin-enews-sync-cancel":"cancel","click .optin-enews-sync-save":"save","click .optin-enews-sync-toggle":"toggle","click .optin-enews-sync-edit":"setup"},initialize:function(){this.initial_html=this.$el.html()},setup:function(t){t.preventDefault();var i=this,s=e(t.target),n=s.data("id"),o=s.data("nonce");s.hasClass("optin-enews-sync-edit");e.ajax({url:ajaxurl,type:"GET",data:{action:"inc_opt_get_enews_sync_setup",_ajax_nonce:o,id:n},success:function(e){e.success&&i.$el.html(i.back_tpl(e.data))},error:function(e){}})},cancel:function(e){e.preventDefault(),this.$el.html(this.initial_html)},save:function(t){t.preventDefault();var i=this,s=e(t.target),n=s.data("id"),o=[],a=s.data("nonce");this.$(".wpoi-e-newsletter-group").each(function(e,t){t.checked&&o.push(t.value)}),e.ajax({url:ajaxurl,type:"POST",data:{action:"inc_opt_save_enews_sync_setup",_ajax_nonce:a,id:n,groups:o},success:function(e){e.success&&i.$el.html(e.data.html)},error:function(e){}})},toggle:function(t){var i=this,s=e(t.target),n=s.data("id"),o=s.data("nonce"),a=s.is(":checked");e.ajax({url:ajaxurl,type:"POST",data:{action:"inc_opt_toggle_enews_sync",_ajax_nonce:o,id:n,state:a},success:function(e){e.success&&(s.attr("checked",a),i.initial_html=i.$el.html())}})}})}),Hustle.define("Settings.Modules_Activity",function(e){"use strict";return Backbone.View.extend({el:"#modules-activity",events:{"change .hustle-for-admin-user-toggle":"toggle_for_user","change .hustle-for-logged-in-user-toggle":"toggle_for_user"},initialize:function(){},toggle_for_user:function(t){var i=this.$(t.target),s=i.data("id"),n=i.data("nonce"),o=i.data("user");i.attr("disabled",!0),e.ajax({url:ajaxurl,type:"POST",data:{action:"hustle_toggle_module_for_user",id:s,_ajax_nonce:n,user_type:o},complete:function(e,t){i.attr("disabled",!1)},success:function(e){e.success||i.prop("checked",!i.is(":checked"))},error:function(){i.prop("checked",!i.is(":checked"))}})}})}),Hustle.define("Settings.Services_Edit_Modal",function(e){"use strict";return Backbone.View.extend({template:Hustle.template("wph-edit-provider-modal-tpl"),id:"wph-edit-provider-modal",events:{"click .i-close":"close","click .js-wph-button-cancel":"close","change #wph-provider-edit-modal-provider":"get_provider_options","click #wph-edit-service-save":"save_settings","submit form":"save_settings"},provider_options_nonce:!1,initialize:function(){this.render()},render:function(){var t=this;this.$el.html(this.template()).appendTo("body"),e.ajax({url:ajaxurl,type:"get",data:{action:"hustle_get_providers_edit_modal_content",id:t.model.get("id"),source:t.model.get("source"),_ajax_nonce:t.model.get("nonce")},success:function(e){e.success&&(t.$(".wph-edit-provider-modal-content").html(e.data.html),t.provider_options_nonce=e.data.provider_options_nonce,Hustle.Events.trigger("view.rendered",t))}})},get_provider_options:function(t){var i=this,s=this.$(t.target),n=this.$("#optin_new_provider_account_details"),o=this.$("#optin_new_provider_account_options");n.empty(),o.empty(),e.ajax({url:ajaxurl,type:"get",data:{action:"render_provider_account_options",provider_id:s.val(),_ajax_nonce:i.provider_options_nonce,optin:i.model.get("id")},success:function(e){e.success&&(n.html(e.data),Hustle.Events.trigger("view.rendered",i))}})},close:function(e){e.preventDefault(),this.remove()},hide:function(){},show:function(){},save_settings:function(t){t.preventDefault();var i=this.$(t.target),s=i.data("nonce"),n=this.$("#wph-provider-edit-modal-provider"),o=i.closest("form");e.ajax({url:ajaxurl,type:"post",data:{action:"hustle_save_providers_edit_modal",provider_id:n.val(),_ajax_nonce:s,id:this.model.get("id"),source:this.model.get("source"),form:o.serialize()},success:function(e){}})}})}),Hustle.define("Settings.Services",function(e){"use strict";return Backbone.View.extend({el:"#providers-edit-box",Modal_View:Hustle.get("Settings.Services_Edit_Modal"),modal:!1,events:{"click .wph-providers-edit":"open_edit_modal"},open_edit_modal:function(e){var t=this.$(e.target),i=t.data("id"),s=t.data("source"),n=t.data("nonce");this.modal=new this.Modal_View({model:new Backbone.Model({id:i,nonce:n,source:s})})}})}),function(e,t){"use strict";e(document).on("click",".wpoi-listing-wrap header.can-open .toggle, .wpoi-listing-wrap header.can-open .toggle-label",function(e){e.stopPropagation()}),e(".accordion header .optin-delete-optin, .accordion header .edit-optin, .wpoi-optin-details tr .button-edit").hide().css({transition:"none"}),e(document).on({mouseenter:function(){var t=e(this);t.find(".optin-delete-optin, .edit-optin").stop().fadeIn("fast")},mouseleave:function(){var t=e(this);t.find(".toggle-checkbox").removeProp("disabled"),t.find(".edit-optin").removeProp("disabled"),t.removeClass("disabled"),t.find(".optin-delete-optin, .edit-optin, .delete-optin-confirmation").stop().fadeOut("fast")}},".accordion header"),e(document).on({mouseenter:function(){var t=e(this);t.find(".button-edit").stop().fadeIn("fast")},mouseleave:function(){var t=e(this);t.find(".button-edit").stop().fadeOut("fast")}},".wpoi-optin-details tr"),e(document).on("click",".wpoi-tabs-menu a",function(t){t.preventDefault();var i=e(this).attr("tab");Optin.router.navigate(i,!0)}),e(document).on("click",".edit-optin",function(t){t.stopPropagation(),t.preventDefault(),window.location.href=e(this).attr("href")}),e(document).on("click",".wpoi-type-edit-button",function(t){t.preventDefault();var i=e(this).data("id"),s=e(this).data("type");window.location.href="admin.php?page=inc_optin&optin="+i+"#display/"+s}),e(document).on("click","*[for]",function(t){var i=e(this),s=i.attr("for"),n=e("#"+s);!i.is("label")&&n.length&&(n.trigger("change"),n.trigger("click"))}),e("#wpoi-complete-message").fadeIn(),e(document).on("click","#wpoi-complete-message .next-button button",function(t){e("#wpoi-complete-message").fadeOut()}),e(document).on("click",".wpoi-listing-page .wpoi-listing-wrap header.can-open",function(t){e(this).find(".open").trigger("click")}),e(document).on("click",".wpoi-listing-page .wpoi-listing-wrap .can-open .open",function(t){t.stopPropagation();var i=e(this),s=i.closest(".wpoi-listing-wrap"),n=s.find("section"),o=e(".wpoi-listing-wrap").not(s),a=e(".wpoi-listing-wrap section").not(n);a.slideUp(300,function(){a.removeClass("open")}),o.find(".dev-icon").removeClass("dev-icon-caret_up").addClass("dev-icon-caret_down"),n.slideToggle(300,function(){s.toggleClass("open"),s.find(".dev-icon").toggleClass("dev-icon-caret_up dev-icon-caret_down")})}),Optin.decorate_number_inputs=function(t){var i=t&&t.$el?t.$el.find(".wph-input--number input"):e(".wph-input--number input"),s=Hustle.create_template('<div class="wph-nbr--nav"><div class="wph-nbr--button wph-nbr--up {{disabled}}">+</div><div class="wph-nbr--button wph-nbr--down {{disabled}}">-</div></div>');i.each(function(){var t=e(this),i=t.is(":disabled")?"disabled":"";t.siblings(".wph-nbr--nav").length||t.after(s({disabled:i}))})},Hustle.Events.on("view.rendered",Optin.decorate_number_inputs),function(){e(document).on("click",".wph-nbr--up:not(.disabled)",function(t){var i,s=e(this),n=s.closest(".wph-input--number"),o=n.find("input"),a=parseFloat(o.val()),l=(o.attr("min"),o.attr("max"));i=a>=l?a:a+1,i!==a&&o.val(i).trigger("change")}),e(document).on("click",".wph-nbr--down:not(.disabled)",function(t){var i,s=e(this),n=s.closest(".wph-input--number"),o=n.find("input"),a=parseFloat(o.val()),l=o.attr("min");o.attr("max");i=a<=l?a:a-1,i!==a&&o.val(i).trigger("change")})}(),function(){function t(){var t=e(window).scrollTop(),i=e(".wph-sticky--anchor");i.length&&(i=i.offset().top,t>i?(e(".wph-preview--eye").addClass("wph-sticky--element"),e(".wph-sticky--anchor").height(e(".wph-preview--eye").outerHeight())):(e(".wph-preview--eye").removeClass("wph-sticky--element"),e(".wph-sticky--anchor").height(0)))}e(function(){e(window).scroll(t),t()})}()}(jQuery,document),Hustle.define("Model",function(){"use strict";return Backbone.Model.extend({initialize:function(){this.on("change",this.user_has_change,this),Backbone.Model.prototype.initialize.apply(this,arguments)},user_has_change:function(){Optin.hasChanges=!0}})}),Hustle.define("Models.M",function(){"use strict";return Hustle.get("Model").extend({toJSON:function(){var e=_.clone(this.attributes);for(var t in e)(e[t]instanceof Backbone.Model||e[t]instanceof Backbone.Collection)&&(e[t]=e[t].toJSON());return e},set:function(e,t,i){if("string"==typeof e&&e.indexOf(".")!==-1){var s=e.split(".")[0],n=e.split(".")[1],o=this.get(s);o&&o instanceof Backbone.Model&&(o.set(n,t,i),this.trigger("change:"+e,e,t,i),this.trigger("change:"+s,e,t,i))}else Backbone.Model.prototype.set.call(this,e,t,i)},get:function(e){if("string"==typeof e&&e.indexOf(".")!==-1){var t=e.split(".")[0],i=e.split(".")[1];return this.get(t).get(i)}return Backbone.Model.prototype.get.call(this,e)}})}),Optin.Model=Hustle.get("Models.M").extend({defaults:{optin_name:optin_vars.messages.model.defaults.optin_name,optin_title:optin_vars.messages.model.defaults.optin_title,optin_message:optin_vars.messages.model.defaults.optin_message,optin_provider:"",api_key:"",mail_list:"",active:1,test_mode:0,save_to_local:0,service_source:"existing"},validate_first_step:function(e){var t=[];return e=e||this.attributes,e.optin_name&&!e.optin_name.isEmpty()||t.push({name:"name",message:optin_vars.messages.model.errors.name}),1!=e.test_mode&&1!=e.save_to_local&&(e.optin_provider&&!e.optin_provider.isEmpty()||t.push({name:"provider",message:optin_vars.messages.model.errors.provider}),e.api_key&&!e.api_key.isEmpty()||t.push({name:"api_key",message:optin_vars.messages.model.errors.api_key}),e.optin_mail_list&&!e.optin_mail_list.isEmpty()||t.push({name:"mail_list",message:optin_vars.messages.model.errors.mail_list})),_(t)}}),Optin.Models.Color_Palette=Hustle.get("Models.M").extend({defaults:{_id:"",label:"",main_background:"",form_background:"",button_background:"",button_label_color:"",title_color:"",content_color:"",fields_background:"",fields_color:""}}),Optin.Models.Color_Palette_Collection=Backbone.Collection.extend({model:Optin.Models.Color_Palette});var Palettes=new Optin.Models.Color_Palette_Collection;_.each(optin_vars.palettes,function(e,t){e._id=t.replace(new RegExp(" ","g"),"_").toLowerCase(),e.label=t;var i=new Optin.Models.Color_Palette(e);Palettes.add(i)}),Optin.Models.Colors_Model=Hustle.get("Models.M").extend({defaults:_.extend({customize:!1,palette:Palettes.at(0).get("_id"),main_background:"",form_background:"",button_background:"",button_label:"",title_color:"",content_color:"",fields_background:"",fields_color:""},Palettes.at(0).toJSON())}),Optin.Models.Borders_Model=Backbone.Model.extend({defaults:{rounded_corners:!0,corners_radius:0,fields_corners_radius:0,button_corners_radius:0,drop_shadow:!1,dropshadow_value:0,shadow_color:"#000",fields_style:"joined",rounded_form_fields:!0,rounded_form_button:!0}}),Optin.Models.Design_Model=Hustle.get("Models.M").extend({defaults:{success_message:optin_vars.messages.model.defaults.success_message,form_location:"0",elements:["image"],image_location:"left",image_style:"cover",image_src:optin_vars.preview_image,colors:new Optin.Models.Colors_Model,borders:new Optin.Models.Borders_Model,opening_animation:"",closing_animation:"",css:"",on_submit:"success_message",on_submit_page_id:"",input_icons:"animated_icon",on_success:"remain",on_success_time:0,on_success_unit:"s",customize_css:!1,cta_button:optin_vars.messages.model.defaults.cta_button,module_fields:optin_vars.module_fields},initialize:function(e){_.extend(this,e),this.get("colors")instanceof Backbone.Model||this.set("colors",new Optin.Models.Colors_Model(this.colors)),this.get("borders")instanceof Backbone.Model||this.set("borders",new Optin.Models.Borders_Model(this.borders)),this.on("change",this.user_has_change,this)}});var old_conditions=["show_on_all_posts","excluded_posts","selected_posts","show_on_all_pages","excluded_pages","selected_pages","show_on_all_cats","show_on_these_cats","show_on_all_tags","show_on_these_tags"];Optin.Models.Settings_After_Content=Hustle.get("Models.M").extend({defaults:{enabled:!1,animate:!1,animation:""},initialize:function(e){if(!(this.get("conditions")instanceof Backbone.Model)){var t=Hustle.get("Model");_.isEmpty(this.get("conditions"))&&_.isArray(this.get("conditions"))?this.set("conditions",new t):this.set("conditions",new t(this.get("conditions")))}this.on("change",this.user_has_change,this)}}),Optin.Models.Settings_Popup_Model=Hustle.get("Model").extend({defaults:{enabled:!1,animation_in:"",animation_out:"",appear_after:"time",on_exit_trigger_once_per_session:!0,appear_after_scroll:"scrolled",appear_after_time_val:5,appear_after_time_unit:"seconds",appear_after_page_portion_val:20,appear_after_page_portion_unit:"%",appear_after_element_val:"",add_never_see_this_message:!1,close_button_acts_as_never_see_again:!1,never_see_expiry:2,show_on_all_posts:!0,excluded_posts:[],selected_posts:[],show_on_all_pages:!0,excluded_pages:[],selected_pages:[],show_on_all_cats:!0,show_on_these_cats:[],show_on_all_tags:!0,show_on_these_tags:[],conditions:{},trigger_on_time:"immediately",trigger_on_element_click:"",trigger_on_exit:!1,trigger_on_adblock:!1,trigger_on_adblock_timed:!1,trigger_on_adblock_timed_val:180,trigger_on_adblock_timed_unit:"seconds"},initialize:function(e){if(_.extend(this,e),!(this.get("conditions")instanceof Backbone.Model)){var t=Hustle.get("Model");_.isEmpty(this.get("conditions"))&&_.isArray(this.get("conditions"))?this.set("conditions",new t):this.set("conditions",new t(this.get("conditions")))}this.on("change",this.user_has_change,this)}}),Optin.Models.Settings_Slide_In_Model=Hustle.get("Model").extend({defaults:{enabled:!1,appear_after:"time",on_exit_trigger_once_per_session:!0,appear_after_scroll:"scrolled",appear_after_time_val:5,appear_after_time_unit:"seconds",appear_after_page_portion_val:30,appear_after_page_portion_unit:"%",appear_after_element_val:"",hide_after:!0,hide_after_val:10,hide_after_unit:"seconds",position:"bottom_right",after_close:"keep_showing",show_on_all_posts:!0,excluded_posts:[],selected_posts:[],show_on_all_pages:!0,excluded_pages:[],selected_pages:[],show_on_all_cats:!0,show_on_these_cats:[],show_on_all_tags:!0,show_on_these_tags:[],conditions:{},trigger_on_time:"immediately",trigger_on_element_click:"",trigger_on_exit:!1,trigger_on_adblock:!1,trigger_on_adblock_timed:!1,trigger_on_adblock_timed_val:180,trigger_on_adblock_timed_unit:"seconds"},initialize:function(e){if(!(this.get("conditions")instanceof Backbone.Model)){var t=Hustle.get("Model");_.isEmpty(this.get("conditions"))&&_.isArray(this.get("conditions"))?this.set("conditions",new t):this.set("conditions",new t(this.get("conditions")))}this.on("change",this.user_has_change,this)}}),Optin.Models.Settings_Model=Hustle.get("Models.M").extend({defaults:{shortcode_id:"",after_content:new Optin.Models.Settings_After_Content,popup:new Optin.Models.Settings_Popup_Model,slide_in:new Optin.Models.Settings_Slide_In_Model},initialize:function(e){_.extend(this,e),this.get("after_content")instanceof Backbone.Model||this.set("after_content",new Optin.Models.Settings_After_Content(this.get("after_content"))),this.get("popup")instanceof Backbone.Model||this.set("popup",new Optin.Models.Settings_Popup_Model(this.get("popup"))),this.get("slide_in")instanceof Backbone.Model||this.set("slide_in",new Optin.Models.Settings_Slide_In_Model(this.get("slide_in"))),this.on("change",this.user_has_change,this)}}),Hustle.define("Models.Trigger",function(){"use strict";return Hustle.get("Model").extend({defaults:{trigger:"time",on_time:"immediately",on_time_delay:5,on_time_unit:"seconds",on_scroll:"scrolled",on_scroll_page_percent:"20",on_scroll_css_selector:"",on_click_element:"",on_exit_intent:!0,on_exit_intent_per_session:!0,on_adblock:!1,on_adblock_delayed:!1,on_adblock_delayed_time:180,on_adblock_delayed_unit:"seconds"}})}),function(e){"use strict";Optin.get_tpl=function(e){var t=["optin-layout-one","optin-layout-two","optin-layout-three","optin-layout-four"];return Optin.template(t[e])},Optin.View.Alert=Backbone.View.extend({template:Optin.template("optin-alert-modal"),events:{"click .inc-opt-alert-modal-close":"close","click .inc-opt-alert-modal":"close","click .inc-opt-alert-modal-close-btn":"close","click .inc-opt-alert-modal-inner-container":"prevent_close"},initialize:function(e){return this.options=e,this.render()},render:function(){this.$el.html(this.template(_.extend({close_text:optin_vars.messages.ok},this.options))),this.$el.appendTo("body")},close:function(e){this.$el.hide(),this.remove()},prevent_close:function(e){e.preventDefault(),e.stopPropagation()}}),Optin.hasChanges=!1,Optin.user_change=function(){Optin.hasChanges=!0},window.onbeforeunload=function(){if(Optin.hasChanges)return optin_vars.messages.dont_navigate_away},Optin.step=Optin.step||{},Optin.step.activate_step=function(t){e(".wpoi-tabs-menu li").removeClass("active"),e(".wpoi-tabs-menu li").removeClass("before"),e(".wpoi-tabs-menu li").eq(t).addClass("active"),e(".wpoi-tabs-menu li").slice(0,t).addClass("before"),e(".wpoi-tabs-wrap > div").hide(),e(".wpoi-tabs-wrap > div").eq(t).show(),Optin.step.current=t},Optin.step.get_current_step=function(){return parseInt(Optin.step.current||0,10)},Optin.step.get_current=function(){return parseInt(Optin.step.current||0,10)},Optin.step.get_current_step=function(){switch(this.get_current){case 0:return Optin.step.services;case 1:return Optin.step.design;case 2:return Optin.step.display}}}(jQuery),Hustle.define("Custom_Content.After_Content_View",function(e,t,i){"use strict";return Hustle.View.extend(_.extend({},Hustle.get("Mixins.Model_Updater"),{template:Hustle.template("wpoi-custom-content-after-content-tpl"),message_editor:!1,events:{'change [name="animate"]':"toggle_animation"},init:function(e){return this.type=e.type,this.conditions_view=e.conditions_view,this.listenTo(this.model,"change:enabled",this.toggle_panel),this.conditions_view.on("toggle_condition",this.update_conditions_label),this.conditions_view.on("change:update_view_label",this.update_conditions_label),this.render()},render:function(){return this.$el.html(this.template(_.extend({},{type:this.type,type_name:optin_vars.messages.settings[this.type],condition_labels:this.conditions_view.get_all_conditions_labels()},this.model.toJSON()))),this.$(".wph-conditions").replaceWith(this.conditions_view.$el),_.isFalse(this.model.enabled)&&this.$el.find("#wph-after-content-condition-labels").hide(),this.toggle_animation(),this},toggle_panel:function(e){this.$(".switch-wrap").toggleClass("open closed"),this.$el.find("#wph-after-content-condition-labels").toggle()},update_conditions_label:function(t){e("#wph-after-content-condition-labels").html(t.get_all_conditions_labels())},toggle_animation:function(){var e=this.$('[name="animate"]:checked'),t="false"===e.val(),i=this.$("#optin-afterc-animation-block");i[t?"hide":"show"]()}}))}),Hustle.define("Custom_Content.Content_View",function(e,t,i){"use strict";return Hustle.View.extend(_.extend({},Hustle.get("Mixins.Model_Updater"),{template:Optin.template("wpoi-custom-content-content-tpl"),message_editor:!1,skip_tinyMCE_sync:!1,init:function(e){return this.design_model=e.design_model,this.sync_message(),this.listenTo(Hustle.Events,"CC.save_changes",this.sync_model_message),this.listenTo(Hustle.Events,"CC.opening_preview",this.sync_model_message),this.render()},render:function(e){this.setElement(this.template(_.extend({},this.model.toJSON(),this.design_model.toJSON())));var t=Hustle.get("Media_Holder");return this.media_holder=new t({model:this.design_model,attribute:"image"}),this.$(".wph-media--holder").html(this.media_holder.$el),this.listenTo(this.model,"change:optin_message",_.throttle(this.update_content,50)),this},sync_message:function(){var e=this,t=setInterval(function(){"object"==typeof tinyMCE&&(clearInterval(t),tinyMCE.on("AddEditor",function(t){e.message_editor=tinyMCE.get("optin_message"),e.message_editor.on("change",function(t){e.model.set("optin_message",e.message_editor.getContent())})}))})},sync_model_message:function(){this.skip_tinyMCE_sync||"object"==typeof tinyMCE&&(this.message_editor||(this.message_editor=tinyMCE.get("optin_message")),this.model.set("optin_message",this.message_editor.getContent()))},update_content:function(){var t=this;e.ajax({url:ajaxurl,type:"get",data:{action:"hustle_CC_parse_content",html:t.model.get("optin_message")},success:function(e){e.success&&t.model.set("content",e.data)}})}}))}),Hustle.define("Custom_Content.Design_View",function(e,t,i){"use strict";return Hustle.View.extend(_.extend({},Hustle.get("Mixins.Model_Updater"),{template:Optin.template("wpoi-custom-content-design-tpl"),media_frame:!1,css_editor:!1,stylables:{".wph-modal.wph-modal-container .wph-modal--content ":"Container",".wph-modal.wph-modal-container.wph-customize-css h2.wph-modal--title ":"Title",".wph-modal.wph-modal-container.wph-customize-css .wph-modal--content h4.wph-modal--subtitle ":"Subtitle",".wph-modal .wph-modal--content .wph-modal--message ":"Content",".wph-modal .wph-modal--content .wph-modal--image ":"Image Container",".wph-modal.wph-modal-container.wph-customize-css .wph-modal--content .wph-modal--image img ":"Image",".wph-modal .wph-modal--cta ":"CTA Button",".wph-modal .wph-modal-never-see-again ":"Never See Again"},stylable_elements:_({main_bg_color:".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content",title_color:".wph-modal.wph-modal--cabriolet .wph-modal--content h2.wph-modal--title, .wph-modal.wph-modal--simple .wph-modal--content header h2.wph-modal--title, .wph-modal.wph-modal--minimal .wph-modal--content h2.wph-modal--title",subtitle_color:".wph-modal.wph-modal--cabriolet .wph-modal--content h4.wph-modal--subtitle, .wph-modal.wph-modal--simple .wph-modal--content header h4.wph-modal--subtitle, .wph-modal.wph-modal--minimal .wph-modal--content header h4.wph-modal--subtitle",link_static_color:".wph-modal .wph-modal--message a, .wph-modal.wph-modal--cabriolet .wph-modal--content .wph-modal--message a:not(.wph-modal--cta), .wph-modal.wph-modal--simple .wph-modal--content .wph-modal--message a:not(.wph-modal--cta), .wph-modal.wph-modal--minimal .wph-modal--content .wph-modal--message a:not(.wph-modal--cta)",link_hover_color:".wph-modal .wph-modal--message a:hover, .wph-modal.wph-modal--cabriolet section .wph-modal--message a:not(.wph-modal--cta):hover, .wph-modal.wph-modal--simple .wph-modal--content .wph-modal--message a:not(.wph-modal--cta):hover, .wph-modal.wph-modal--minimal .wph-modal--content a:not(.wph-modal--cta):hover",link_active_color:".wph-modal .wph-modal--message a:active, .wph-modal.wph-modal--cabriolet section .wph-modal--message a:not(.wph-modal--cta):active, .wph-modal.wph-modal--simple .wph-modal--content .wph-modal--message a:not(.wph-modal--cta):active, .wph-modal.wph-modal--minimal .wph-modal--content a:not(.wph-modal--cta):active",cta_static_background:".wph-modal .wph-modal--cta, .wph-modal .wph-modal--message a.wph-modal--cta",cta_hover_background:".wph-modal .wph-modal--cta:hover, .wph-modal .wph-modal--message a.wph-modal--cta:hover",cta_active_background:".wph-modal .wph-modal--cta:active, .wph-modal .wph-modal--message a.wph-modal--cta:active",cta_static_color:".wph-modal .wph-modal--cta, .wph-modal .wph-modal--message a.wph-modal--cta",cta_hover_color:".wph-modal .wph-modal--cta:hover, .wph-modal .wph-modal--message a.wph-modal--cta:hover",cta_active_color:".wph-modal .wph-modal--cta:active, .wph-modal .wph-modal--message a.wph-modal--cta:active",border_static_color:".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content",border_radius:".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content",border_weight:".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content",border_type:".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content",drop_shadow_color:".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content",drop_shadow_x:".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content",drop_shadow_y:".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content",drop_shadow_blur:".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content",drop_shadow_spread:".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content",custom_height:".wph-modal.wph-modal--popup, .wph-modal.wph-modal--popup .wph-modal--content",custom_width:".wph-modal.wph-modal--popup, .wph-modal.wph-modal--popup .wph-modal--content"}),events:{"click .wph-stylable-element":"insert_stylable_element"},init:function(){return this.on("rendered",this.create_color_pickers),this.listenTo(this.model,"change:customize_colors",this.render),this.listenTo(this.model,"change:customize_css",this.render),this.listenTo(this.model,"change:customize_size",this.render),this.listenTo(this.model,"change:border",this.render),this.listenTo(this.model,"change:drop_shadow",this.render),
|
3 |
this.listenTo(this.model,"change:style",this.render),this.listenTo(this.model,"change",this.apply_styles),this.render()},render:function(){return this.$el.html(this.template(_.extend({},this.model.toJSON(),{stylables:this.stylables}))),this.apply_styles(),this.create_css_editor(),this},create_color_pickers:function(){this.$(".wph-color-picker").wpColorPicker({change:function(t,i){var s=e(this);s.val(i.color.toCSS()).trigger("change")}})},get_layout_colors:function(){return!!_.isTrue(this.model.get("customize_colors"))&&_(this.model.toJSON()).reduce(function(e,t,i){return _.indexOf(["drop_shadow_color"],i)!==-1||/^border_/.test(i)||/^drop_/.test(i)?e:((/_background$/.test(i)||/_color$/.test(i)||/_background_color$/.test(i))&&(e[i]=t),e)},{})},apply_styles:_.debounce(function(){var t=this,i=this.model.toJSON(),s=this.get_layout_colors(),n="",o=e("#hustle-css-preview-styles").length?e("#hustle-css-preview-styles"):e('<style id="hustle-css-preview-styles">').appendTo("body");if(_.isEmpty(s)||_.each(s,function(e,i){var s=/_background$/.test(i)||/_background_color$/.test(i)||/_bg_color/.test(i)?"background":"color",o=t.stylable_elements.result(i);o&&(n+=o+"{ "+s+": "+e+";} ")}),_.isTrue(i.border)){var a=Hustle.create_template(" {{el}} {border:{{weight}}px {{type}} {{color}}; }"),l=Hustle.create_template(" {{el}} {border-radius:{{radius}}px; }");_(["border_static_color"]).each(function(e,t){n+=a({el:this.stylable_elements.result(e),weight:i.border_weight,type:i.border_type,color:i[e]})}.bind(this)),n+=l({el:this.stylable_elements.result("border_radius"),radius:i.border_radius})}if(_.isTrue(i.drop_shadow)){var r=Hustle.create_template(" {{el}} {box-shadow:{{x}}px {{y}}px {{blur}}px {{spread}}px {{color}}; }");n+=r({el:this.stylable_elements.result("drop_shadow_color"),x:i.drop_shadow_x,y:i.drop_shadow_y,blur:i.drop_shadow_blur,spread:i.drop_shadow_spread,color:i.drop_shadow_color})}_.isTrue(i.customize_css)&&(n+=i.custom_css),o.html(n)},10),create_css_editor:_.debounce(function(){_.isFalse(this.model.get("customize_css"))||(this.css_editor=ace.edit("hustle_custom_css"),this.css_editor.getSession().setMode("ace/mode/css"),this.css_editor.setTheme("ace/theme/solarized_light"),this.css_editor.getSession().setUseWrapMode(!0),this.css_editor.getSession().setUseWorker(!1),this.css_editor.setShowPrintMargin(!1),this.css_editor.renderer.setShowGutter(!0),this.css_editor.setHighlightActiveLine(!0),this.css_editor.on("blur",e.proxy(this.update_custom_css,this)))},0),update_custom_css:function(){this.css_editor&&this.model.set("custom_css",this.css_editor.getValue())},insert_stylable_element:function(t){t.preventDefault();var i=e(t.target),s=i.data("stylable")+"{}";this.css_editor.navigateFileEnd(),this.css_editor.insert(s),this.css_editor.navigateLeft(1),this.css_editor.focus()}}))}),Hustle.define("Custom_Content.Listing",function(e,t,i){"use strict";var s=Hustle.get("Delete_Confirmation");return Backbone.View.extend({el:"#wph-ccontent--modules",events:{"click .wph-accordions header":"toggle_accordion","change .custom-content-toggle-activity":"toggle_activity","change .custom-content-toggle-tracking-activity":"toggle_tracking_activity","change .custom-content-toggle-type-activity":"toggle_type_activity","change .custom-content-toggle-test-activity":"toggle_test_activity","click .custom-content-edit":"edit","click .custom-content-delete":"delete"},delete_confirmations:{},initialize:function(){e(t).on("click","#hustle-legacy-popup-notice button.notice-dismiss",this.dismiss_legacy_popup_notice)},dismiss_legacy_popup_notice:function(t){var i=e(t.target).closest("#hustle-legacy-popup-notice"),s=i.data("nonce");e.ajax({url:ajaxurl,type:"POST",data:{action:"hustle_custom_content_dismiss_legacy_notice",_ajax_nonce:s}})},toggle_accordion:function(t){if(_.indexOf(["wph-accordion--animate_buttons","wph-icon i-arrow"],t.target.className)!==-1){var i=e(t.target),s=i.find(".dev-icon"),n=i.closest("li");n.find("section");s.toggleClass("dev-icon-caret_down dev-icon-caret_up"),n.toggleClass("wph-accordion--closed wph-accordion--open"),n.siblings("li.wph-accordion--open").toggleClass("wph-accordion--closed wph-accordion--open")}},toggle_activity:function(t){t.stopPropagation();var i=e(t.target),s=i.data("id"),n=i.data("nonce"),o=i.is(":checked");i.attr("disabled",!0),e.ajax({url:ajaxurl,type:"POST",data:{action:"hustle_custom_content_toggle_activity",id:s,_ajax_nonce:n},complete:function(){i.attr("disabled",!1)},success:function(e){e.success||i.attr("checked",!o)},error:function(){i.attr("checked",!o)}})},toggle_tracking_activity:function(t){t.stopPropagation();var i=e(t.target),s=i.data("id"),n=i.data("nonce"),o=i.data("type"),a=i.is(":checked");i.attr("disabled",!0),e.ajax({url:ajaxurl,type:"POST",data:{action:"hustle_custom_content_toggle_tracking_activity",id:s,type:o,_ajax_nonce:n},complete:function(){i.attr("disabled",!1)},success:function(e){e.success||i.attr("checked",!a)},error:function(e){e.success||i.attr("checked",!a)}})},toggle_type_activity:function(t){t.stopPropagation();var i=e(t.target),s=i.data("id"),n=i.data("nonce"),o=i.data("type"),a=i.is(":checked");i.attr("disabled",!0),e.ajax({url:ajaxurl,type:"POST",data:{action:"hustle_custom_content_toggle_type_activity",id:s,type:o,_ajax_nonce:n},complete:function(){i.attr("disabled",!1)},success:function(e){e.success||i.attr("checked",!a)},error:function(e){e.success||i.attr("checked",!a)}})},toggle_test_activity:function(t){t.stopPropagation();var i=e(t.target),s=i.data("id"),n=i.data("nonce"),o=i.data("type"),a=i.is(":checked");i.attr("disabled",!0),e.ajax({url:ajaxurl,type:"POST",data:{action:"hustle_custom_content_toggle_test_activity",id:s,type:o,_ajax_nonce:n},complete:function(){i.attr("disabled",!1)},success:function(e){e.success||i.attr("checked",!a)},error:function(e){e.success||i.attr("checked",!a)}})},edit:function(e){e.stopPropagation()},"delete":function(e){e.stopPropagation();var t=this.$(e.target);if(!t.prev(".hustle-delete-module-confirmation").length){var i=t.closest("li.wph-accordions--item"),n=(t.data("id"),new s({id:t.data("id"),nonce:t.data("nonce"),action:"hustle_custom_content_delete",onSuccess:function(e){e.success&&(n.remove(),i.toggle("highlight"))}}));t.before(n.$el)}}})}),Hustle.define("Custom_Content.Models",function(){"use strict";var e=Hustle.get("Models.M").extend({defaults:{optin_name:"",optin_title:"",subtitle:"",optin_message:"Type your content here ...",content:"",optin_provider:"custom_content",api_key:"",mail_list:"",active:1,test_mode:0}}),t=Hustle.get("Models.M").extend({defaults:{style:"cabriolet",customize_colors:0,customize_css:0,custom_css:"",main_bg_color:"rgba(255,255,255,1)",title_color:"rgba(51,51,51,1)",subtitle_color:"rgba(51,51,51,1)",link_static_color:"#1FC5B6",link_hover_color:"#15A296",link_active_color:"#15A296",cta_static_background:"#1FC5B6",cta_hover_background:"#15A296",cta_active_background:"#15A296",cta_static_color:"rgba(255,255,255,1)",cta_hover_color:"rgba(255,255,255,1)",cta_active_color:"rgba(255,255,255,1)",border:!0,border_radius:5,border_weight:3,border_type:"solid",border_static_color:"rgba(218,218,218,1)",border_hover_color:"rgba(218,218,218,1)",border_active_color:"rgba(218,218,218,1)",drop_shadow:!1,drop_shadow_x:0,drop_shadow_y:0,drop_shadow_blur:0,drop_shadow_spread:0,drop_shadow_color:"rgba(0,0,0,0)",image:"",hide_image_on_mobile:!1,image_position:"left",cta_label:"",cta_url:"",cta_target:"_blank",customize_size:!1,custom_height:300,custom_width:600}}),i=Hustle.get("Models.Trigger"),s=Hustle.get("Models.M").extend({defaults:{enabled:!1,conditions:"",triggers:"",animation_in:"",animation_out:"",make_fullscreen:!1,add_never_see_link:!1,close_btn_as_never_see:!1,allow_scroll_page:!1,not_close_on_background_click:!1,expiration_days:365,on_submit:"default"},initialize:function(e){if(_.extend(this,e),this.get("triggers")instanceof Backbone.Model||this.set("triggers",new i(this.triggers)),!(this.get("conditions")instanceof Backbone.Model)){_.isEmpty(this.get("conditions"))&&_.isArray(this.get("conditions"))&&(this.conditions={});var t=Hustle.get("Model");this.set("conditions",new t(this.conditions))}this.on("change",this.user_has_change,this)}}),n=s.extend({defaults:{enabled:!1,animate:!1,animation:"",on_submit:""}}),o=s.extend(),a=s.extend({defaults:{enabled:!1,conditions:"",triggers:"",animation_in:"",animation_out:"",make_fullscreen:!1,add_never_see_link:!1,close_btn_as_never_see:!1,expiration_days:0,on_submit:"refresh_or_close",hide_after:!0,hide_after_val:10,hide_after_unit:"seconds",position:"bottom_right",after_close:"keep_showing"}}),l=s.extend();return{Content:e,Design:t,TypeBase:s,AfterContent:n,Popup:o,Slide_In:a,Magic_Bar:l}}),Hustle.define("Custom_Content.Popup_View",function(e,t,i){"use strict";return Hustle.View.extend(_.extend({},Hustle.get("Mixins.Model_Updater"),{template:Hustle.template("wpoi-custom-content-popup-tpl"),message_editor:!1,init:function(e){return this.type=e.type,this.display_triggers_view=e.display_triggers_view,this.conditions_view=e.conditions_view,this.listenTo(this.model,"change:enabled",this.toggle_panel),this.conditions_view.on("toggle_condition",this.update_conditions_label),this.conditions_view.on("change:update_view_label",this.update_conditions_label),this.render()},render:function(){return this.$el.html(this.template(_.extend({},{type:this.type,type_name:optin_vars.messages.settings[this.type],condition_labels:this.conditions_view.get_all_conditions_labels()},this.model.toJSON()))),this.$(".wph-trigger").html(this.display_triggers_view.$el),this.$(".wph-conditions").replaceWith(this.conditions_view.$el),_.isFalse(this.model.enabled)&&this.$el.find("#wph-popup-condition-labels").hide(),this},toggle_panel:function(e){this.$(".switch-wrap").toggleClass("open closed"),this.$el.find("#wph-popup-condition-labels").toggle()},update_conditions_label:function(t){e("#wph-popup-condition-labels").html(t.get_all_conditions_labels())}}))}),Hustle.define("Custom_Content.Preview",function(e){"use strict";return Backbone.View.extend({el:".wph-preview",preview_modal:!1,$preview_yield:!1,events:{"click .wph-preview--mask":"hide","click .wph-preview--close":"hide","change #wph-preview-type-selector":"change_type"},initialize:function(){this.$preview_yield=this.$("#wph-preview-yield"),this.render(),this.listenTo(this.preview_modal.model,"all",this.render)},render:function(){var e=Hustle.get("Modal");this.preview_modal=new e({model:this.model}),this.$preview_yield.replaceWith(this.preview_modal.$el),this.$preview_yield=this.preview_modal.$el,this.preview_modal.show(),this.$("#wph-preview-type-selector").val(this.model.get("type")),Hustle.Events.trigger("view.rendered",this)},show:function(){this.$el.removeClass("wph-preview--closed").addClass("wph-preview--open")},hide:function(e){this.$el.removeClass("wph-preview--open").addClass("wph-preview--closed")},change_type:function(e){this.preview_modal.model.set("type",this.$(e.target).val()),Hustle.Events.trigger("cc.type_changed",this)}})}),Hustle.define("Custom_Content.Slide_In_View",function(e,t,i){"use strict";return Hustle.View.extend(_.extend({},Hustle.get("Mixins.Model_Updater"),{template:Hustle.template("wpoi-custom-content-slide_in-tpl"),message_editor:!1,init:function(e){return this.type=e.type,this.display_triggers_view=e.display_triggers_view,this.conditions_view=e.conditions_view,this.listenTo(this.model,"change:enabled",this.toggle_panel),this.listenTo(this.model,"change:position",this.update_slide_in_position_label),this.conditions_view.on("toggle_condition",this.update_conditions_label),this.conditions_view.on("change:update_view_label",this.update_conditions_label),this.render()},render:function(){return this.model.set("position_label",optin_vars.messages.positions[this.model.get("position")],{silent:!0}),this.$el.html(this.template(_.extend({},{type:this.type,type_name:optin_vars.messages.settings[this.type],condition_labels:this.conditions_view.get_all_conditions_labels()},this.model.toJSON()))),this.$(".wph-trigger").html(this.display_triggers_view.$el),this.$(".wph-conditions").replaceWith(this.conditions_view.$el),_.isFalse(this.model.enabled)&&this.$el.find("#wph-slide-in-condition-labels").hide(),this},toggle_panel:function(e){this.$(".switch-wrap").toggleClass("open closed"),this.$el.find("#wph-slide-in-condition-labels").toggle()},update_slide_in_position_label:function(e){this.$("#wpoi-slide_in-position-label").text(optin_vars.messages.positions[this.model.get("position")])},update_conditions_label:function(t){e("#wph-slide-in-condition-labels").html(t.get_all_conditions_labels())}}))}),Hustle.define("Custom_Content.View",function(e,t,i){"use strict";return Hustle.View.extend({el:".wph-custom-content",message_box_tpl:Optin.template("wpoi-custom-content-message-box-tp"),preview:!1,preview_model:!1,initial_data:new Backbone.Model({content:"",design:"",popup:"",slide_in:"",magic_bar:""}),events:{"click .wph-toggletabs .can-open":"toggle_accordion","click #save-and-next":"save_and_next","click #next-step":"save_and_next","click #save-and-finish":"save_and_finish","click #finish-setup":"save_and_finish","click .wph-preview--eye.wph-button":"open_preview","click .wph-js-cancel-design-changes":"cancel_changes","click .wph-js-back":"go_back","click .wph-triggers--options label":"handle_triggers","click button#optin_message-tmce":"tinyMCE_toggled","change textarea#optin_message":"text_area_update","keyup [data-attribute='optin_name']":"remove_error"},init:function(e){return this.content_view=e.content_view,this.design_view=e.design_view,this.after_content_view=e.after_content_view,this.popup_view=e.popup_view,this.slide_in=e.slide_in,this.magic_bar=e.magic_bar,this.update_initial_state(),this.listenTo(this.model,"change",this.render_message_box),this.listenTo(this.content_view.model,"change",this.enable_cancel),this.listenTo(this.content_view.model,"change:content",this._set_preview_model),this.listenTo(Hustle.Events,"cc.type_changed",this.apply_proper_preview_styles),this.listenTo(this.design_view.model,"change",this.enable_cancel),this.render_message_box(),this.render()},tinyMCE_toggled:function(e){this.content_view.skip_tinyMCE_sync=!1},text_area_update:function(t){this.content_view.model.set("optin_message",e(t.target).val()),this.content_view.model.set("content",e(t.target).val()),this.content_view.skip_tinyMCE_sync=!0},handle_triggers:function(t){var i=e(t.target),s=i.closest("li"),n=s.siblings();n.removeClass("current"),s.addClass("current")},update_initial_state:function(){_.extend(this.initial_data,{content:this.content_view.model.toJSON(),design:this.design_view.model.toJSON(),popup:this.popup_view.model.toJSON(),slide_in:this.slide_in.model.toJSON(),magic_bar:this.magic_bar.model.toJSON()})},enable_cancel:_.throttle(function(){},50),render:function(){e(t).on("click","#hustle-legacy-popup-notice button.notice-dismiss",this.dismiss_legacy_popup_notice),this.content_view.delegateEvents(),this.design_view.delegateEvents(),this.$("#wph-ccontent--designtab .wph-toggletabs--content").append(this.content_view.$el).append(this.design_view.$el);var i=this.$("#wph-ccontent-after-content-container").attr("class");this.$("#wph-ccontent-after-content-container").replaceWith(this.after_content_view.$el.addClass(i).attr("id","wph-ccontent-after-content-container"));var s=this.$("#wph-ccontent-popup-container").attr("class");this.$("#wph-ccontent-popup-container").replaceWith(this.popup_view.$el.addClass(s).attr("id","wph-ccontent-popup-container"));var n=this.$("#wph-ccontent-slide_in-container").attr("class");this.$("#wph-ccontent-slide_in-container").replaceWith(this.slide_in.$el.addClass(n).attr("id","wph-ccontent-slide_in-container"));var o=this.$("#wph-ccontent-magic_bar-container").attr("class");this.$("#wph-ccontent-magic_bar-container").replaceWith(this.magic_bar.$el.addClass(o).attr("id","wph-ccontent-magic_bar-container"))},render_message_box:function(){var e=this._get_shortcode_id();this.$("#wph-ccontent--messagebox").html(this.message_box_tpl({shortcode_id:e}))},toggle_accordion:function(t){t.preventDefault();var i=e(t.target),s=e(".wph-toggletabs"),n=i.closest(".wph-toggletabs"),o=s.not(n),a=n.find(".dev-icon-caret_down, .dev-icon-caret_up");o.removeClass("wph-toggletabs--open"),o.find(".dev-icon-caret_up").removeClass("dev-icon-caret_up").addClass("dev-icon-caret_down"),n.toggleClass("wph-toggletabs--open wph-toggletabs--closed"),a.toggleClass("dev-icon-caret_down dev-icon-caret_up")},_get_shortcode_id:function(){return this.model.get("optin_name").trim().toLowerCase().replace(/\s+/g,"-")},dismiss_legacy_popup_notice:function(t){var i=e(t.target).closest("#hustle-legacy-popup-notice"),s=i.data("nonce");e.ajax({url:ajaxurl,type:"POST",data:{action:"hustle_custom_content_dismiss_legacy_notice",_ajax_nonce:s}})},_save:function(t){var i=(t.next().hasClass("wph-button-finish")?t.outerWidth()+1:t.outerWidth(),t.data("id"));return e.ajax({url:ajaxurl,type:"POST",data:{action:"hustle_custom_content_save",_ajax_nonce:t.data("nonce"),id:t.data("id"),content:this.content_view.model.toJSON(),design:this.design_view.model.toJSON(),after_content:this.after_content_view.model.toJSON(),popup:this.popup_view.model.toJSON(),slide_in:this.slide_in.model.toJSON(),magic_bar:this.magic_bar.model.toJSON(),shortcode_id:this._get_shortcode_id()},complete:function(e){if(t.attr("disabled",!1).removeClass("wph-button-next--loading").removeClass("wph-button-save--loading"),Optin.hasChanges=!1,i==-1){var s=window.location.pathname+window.location.search;s=s.replace("id=-1","id="+e.responseJSON.data),window.history.replaceState({},"",s)}}})},save_and_next:function(t){if(t.preventDefault(),Hustle.Events.trigger("CC.save_changes"),this.validate()){var i=this,s=this.$(t.target).closest("button");s.attr("disabled",!0),s.is("#save-and-next")?s.addClass("wph-button-save--loading"):s.addClass("wph-button-next--loading"),s.siblings().each(function(){e(this).attr("disabled",!0)}),this._save(s).done(function(n){n.success&&(i.$("#next-step").data("id",n.data),i.$("#save-and-next").data("id",n.data),i.$("#save-and-finish").data("id",n.data),i.$("#finish-setup").data("id",n.data),i.update_initial_state(),s.is("#next-step")&&i.next_step(t),_.delay(function(){s.siblings().each(function(){e(this).attr("disabled",!1)})},300)),Optin.hasChanges=!1})}},next_step:function(e){e.preventDefault(),this.$("#wph-ccontent--settingstab .wph-toggletabs--title.can-open span").click()},save_and_finish:function(t){if(Hustle.Events.trigger("CC.save_changes"),t.preventDefault(),this.validate()){var i=this,s=this.$(t.target).closest("button");parseInt(s.data("id"))==-1;s.attr("disabled",!0),s.is("#save-and-finish")?s.addClass("wph-button-save--loading"):s.addClass("wph-button-next--loading"),s.siblings().each(function(){e(this).attr("disabled",!0)}),this._save(s).done(function(t){t.success&&(i.$("#next-step").data("id",t.data),i.$("#save-and-next").data("id",t.data),i.$("#save-and-finish").data("id",t.data),i.$("#finish-setup").data("id",t.data),s.is("#finish-setup")&&i.finish_setup(s),_.delay(function(){s.siblings().each(function(){e(this).attr("disabled",!1)})},300)),Optin.hasChanges=!1})}},finish_setup:function(e){var t=parseInt(e.data("id"))==-1;window.onbeforeunload=null;var i="?page=inc_hustle_custom_content";i+=t?"&new_id="+e.data("id"):"&updated_id="+e.data("id"),window.location.replace(i)},remove_error:function(){this.$(".dashicons-warning").remove()},validate:function(){var t,i=!0,s=(this.design_view.model.get("cta_url"),this.$('[data-attribute="optin_name"]'));return s.val()||(t=e('<span class="dashicons dashicons-warning">').attr("title",optin_vars.messages.custom_content.no_name),s.after(t),i=!1),i&&e("span.dashicons.dashicons-warning").remove(),i},_set_preview_model:function(){return this.preview_model?void this.preview_model.set(_.extend({},{type:"popup"},this.design_view.model.toJSON(),this.content_view.model.toJSON(),{optin_message:this.content_view.model.get("content")},{types:{popup:this.popup_view.model.toJSON(),slide_in:this.slide_in.model.toJSON(),after_content:this.after_content_view.model.toJSON()}})):void(this.preview_model=new Backbone.Model(_.extend({},{id:this.content_view.model.get("optin_id"),type:"popup"},this.design_view.model.toJSON(),this.content_view.model.toJSON(),{optin_message:this.content_view.model.get("content")},{types:{popup:this.popup_view.model.toJSON(),slide_in:this.slide_in.model.toJSON(),after_content:this.after_content_view.model.toJSON()}})))},open_preview:function(e){if(Hustle.Events.trigger("CC.opening_preview"),this.validate()){if(this._set_preview_model(),this.preview)this.preview.render(),this.preview.show();else{var t=Hustle.get("Custom_Content.Preview");this.preview=new t({model:this.preview_model}),this.preview.show()}this.apply_custom_css();var i=this;setTimeout(function(){i.apply_proper_preview_styles()},500)}},cancel_changes:function(e){window.onbeforeunload=null,window.location.replace("?page=inc_hustle_custom_content")},go_back:function(e){this.$("#wph-ccontent--designtab .wph-toggletabs--title.can-open span").click()},apply_proper_preview_styles:function(){var t=this;e(".wph-modal").each(function(){var i=e(this),s=i.find(".wph-modal--content"),n=i.find(".wph-modal--content > section"),o=s.find("section > figure"),a=i.find(".wph-modal--content > figure"),l=o.find("img"),r=a.find("img"),c=i.hasClass("wph-modal--cabriolet")&&(o.hasClass("wph-modal--image_full")||o.hasClass("wph-modal--image")&&l.height()<o.height()),d=i.hasClass("wph-modal--simple")&&(a.hasClass("wph-modal--image_full")||a.hasClass("wph-modal--image")&&r.height()<a.height()),p=i.hasClass("wph-modal--minimal")&&(o.hasClass("wph-modal--image_full")||o.hasClass("wph-modal--image")&&l.height()<o.height());(c||p)&&l.css({height:n.height()+"px",width:n.width()+"px"}),d&&r.css({height:s.height()+"px",width:s.width()+"px"});var h=t.design_view.model.toJSON(),u=i.find(".wph-modal--content header"),g=i.find(".wph-modal--content footer"),m=i.find(".wph-modal--content"),w=i.find(".wph-modal--content .wph-modal--message"),v=i.find(".wph-modal--content section"),f=i.find(".wph-modal--content .wph-modal--image"),b=i.find(".wph-modal--content .wph-modal--image img"),y=parseInt(h.custom_width),x=parseInt(h.custom_height),k=_.isTrue(h.border)?2*parseInt(h.border_weight):0;_.isTrue(h.customize_size)&&(i.css("width",y+"px"),i.css("max-width","none"),i.hasClass("wph-modal--cabriolet")&&(w.outerHeight(x-u.outerHeight(!0)-k),f.outerHeight(w.outerHeight(!0)),b.outerHeight(w.outerHeight(!0))),i.hasClass("wph-modal--simple")&&(m.outerHeight(x),f.outerHeight(m.height()),b.outerHeight(m.height())),i.hasClass("wph-modal--minimal")&&(v.outerHeight(x-(u.outerHeight(!0)+g.outerHeight(!0))-k),f.outerHeight(v.outerHeight(!0)),b.outerHeight(v.outerHeight(!0))))})},apply_custom_css:function(){if(this.design_view.css_editor){var t=e("#hustle-cc-custom-styles").length?e("#hustle-cc-custom-styles"):e('<style id="hustle-cc-custom-styles">').appendTo("body"),i=this.design_view.css_editor.getValue();e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"hustle_CC_prepare_custom_css",css:i,_ajax_nonce:e("#hustle_custom_css").data("nonce")},success:function(e){e&&e.success&&t.html(e.data)},error:function(){}})}}})}),Hustle.define("Social_Sharing.Appearance_View",function(e,t,i){"use strict";return Hustle.View.extend(_.extend({},Hustle.get("Mixins.Model_Updater"),{template:Optin.template("wpoi-social-sharing-appreance-tpl"),init:function(e){return this.on("rendered",this.create_color_pickers),this.listenTo(Hustle.Events,"SS.appearance_view_ready",this.ready),this.render()},render:function(e){return this.service_model_json=window.services_model.toJSON(),this._handle_icons_order(),this.setElement(this.template(_.extend({},this.model.toJSON(),this.service_model_json))),this},create_color_pickers:function(){this.$(".wph-color-picker").wpColorPicker({change:function(t,i){var s=e(this);s.val(i.color.toCSS()).trigger("change")}})},ready:function(){var t=this.service_model_json.social_icons,i=this.$(".wph-sshare-reorder_box"),s=this.model.get("icon_style"),n=this.$(".wph-sshare-floating-social--preview_box"),o=n.find(".wph-sshare--container"),a=this.$(".wph-sshare-widget--preview_box"),l=a.find(".wph-sshare--container");_.each(t,e.proxy(function(e,t){var n="one"==s?Optin.template("wpoi-sshare-"+t+"-one-svg"):Optin.template("wpoi-sshare-"+t+"-svg"),a=n(),r='<div class="wph-sshare-reorder_item" data-id="'+t+'">'+a+"</div>";i.append(r);var c=a,d="";"native"==this.service_model_json.service_type&&(_.isTrue(this.service_model_json.click_counter)&&(c+='<div class="wph-sshare_social_counter"><span>'+e.counter+"</span></div>"),d="native-social-share");var p='<a data-social="'+t+'" href="#" class="'+d+'" target="_blank">'+c+"</a>";o.append(p);var h='<a data-social="'+t+'" href="#" class="'+d+'" target="_blank">'+c+"</a>";l.append(h)},this)),this.make_icons_sortable(),"native"==this.service_model_json.service_type&&("1"==this.model.get("floating_inline_count")?o.addClass("wph-sshare--count_inline"):o.addClass("wph-sshare--count_block"),"1"==this.model.get("widget_inline_count")?l.addClass("wph-sshare--count_inline"):l.addClass("wph-sshare--count_block"))},make_icons_sortable:function(){var e=this,t={items:".wph-sshare-reorder_item",revert:!0,axis:"x",containment:this.$("#wph-sshare-icons_reorder"),stop:function(t,i){e._reorder_icons()}};this.$(".wph-sshare-reorder_box").sortable(t).disableSelection()},_handle_icons_order:function(){var e={},t=this.service_model_json.social_icons,i=this.model.get("icons_order"),s=i.split(",");i&&s.length&&(_.each(s,function(i,s){"undefined"!=typeof t[i]&&(e[i]=t[i],t=_.pick(t,function(e,t){if(i!==t)return t=e}))}),Object.keys(t).length&&(e=_.extend(e,_.pick(t,function(e,t){if("undefined"!=typeof e)return t=e}))),this.service_model_json.social_icons=e)},_reorder_icons:function(){var t=[];this.$(".wph-sshare-reorder_box").find(".wph-sshare-reorder_item").each(function(){t.push(e(this).data("id"))}),this.model.set("icons_order",t.join())}}))}),Hustle.define("Social_Sharing.Floating_View",function(e,t,i){"use strict";return Hustle.View.extend(_.extend({},Hustle.get("Mixins.Model_Updater"),{template:Hustle.template("wpoi-social-sharing-floating-tpl"),message_editor:!1,events:{'change [name="animate"]':"toggle_animation"},init:function(e){return this.type=e.type,this.conditions_view=e.conditions_view,this.listenTo(this.model,"change:enabled",this.toggle_panel),this.conditions_view.on("toggle_condition",this.update_conditions_label),this.conditions_view.on("change:update_view_label",this.update_conditions_label),this.render()},render:function(){return this.$el.html(this.template(_.extend({},{type:this.type,type_name:optin_vars.messages.settings[this.type],condition_labels:this.conditions_view.get_all_conditions_labels()},this.model.toJSON()))),this.$(".wph-conditions").replaceWith(this.conditions_view.$el),_.isFalse(this.model.enabled)&&this.$el.find("#wph-floating-social-condition-labels").hide(),this.toggle_animation(),this},toggle_panel:function(e){this.$(".switch-wrap").toggleClass("open closed"),this.$el.find("#wph-floating-social-condition-labels").toggle()},update_conditions_label:function(t){e("#wph-floating-social-condition-labels").html(t.get_all_conditions_labels())},toggle_animation:function(){var e=this.$('[name="animate"]:checked'),t="false"===e.val(),i=this.$("#optin-afterc-animation-block");i[t?"hide":"show"]()}}))}),Hustle.define("Social_Sharing.Listing",function(e,t,i){"use strict";var s=Hustle.get("Delete_Confirmation");return Backbone.View.extend({el:"#wph-ccontent--modules",events:{"click .wph-accordions header":"toggle_accordion","change .social-sharing-toggle-activity":"toggle_activity","change .social-sharing-toggle-tracking-activity":"toggle_tracking_activity","change .social-sharing-toggle-type-activity":"toggle_type_activity","change .social-sharing-toggle-test-activity":"toggle_test_activity","click .social-sharing-edit":"edit","click .social-sharing-delete":"delete"},delete_confirmations:{},initialize:function(){},toggle_accordion:function(t){if(_.indexOf(["wph-accordion--animate_buttons","wph-icon i-arrow"],t.target.className)!==-1){var i=e(t.target),s=i.find(".dev-icon"),n=i.closest("li");n.find("section");s.toggleClass("dev-icon-caret_down dev-icon-caret_up"),n.toggleClass("wph-accordion--closed wph-accordion--open"),n.siblings("li.wph-accordion--open").toggleClass("wph-accordion--closed wph-accordion--open")}},toggle_activity:function(t){t.stopPropagation();var i=e(t.target),s=i.data("id"),n=i.data("nonce"),o=i.is(":checked");i.attr("disabled",!0),e.ajax({url:ajaxurl,type:"POST",data:{action:"hustle_social_sharing_toggle_activity",id:s,_ajax_nonce:n},complete:function(){i.attr("disabled",!1)},success:function(e){e.success||i.attr("checked",!o)},error:function(){i.attr("checked",!o)}})},toggle_tracking_activity:function(t){t.stopPropagation();var i=e(t.target),s=i.data("id"),n=i.data("nonce"),o=i.data("type"),a=i.is(":checked");i.attr("disabled",!0),e.ajax({url:ajaxurl,type:"POST",data:{action:"hustle_social_sharing_toggle_tracking_activity",id:s,type:o,_ajax_nonce:n},complete:function(){i.attr("disabled",!1)},success:function(e){e.success||i.attr("checked",!a)},error:function(e){e.success||i.attr("checked",!a)}})},toggle_type_activity:function(t){t.stopPropagation();var i=e(t.target),s=i.data("id"),n=i.data("nonce"),o=i.data("type"),a=i.is(":checked");i.attr("disabled",!0),e.ajax({url:ajaxurl,type:"POST",data:{action:"hustle_social_sharing_toggle_type_activity",id:s,type:o,_ajax_nonce:n},complete:function(){i.attr("disabled",!1)},success:function(e){e.success||i.attr("checked",!a)},error:function(e){e.success||i.attr("checked",!a)}})},toggle_test_activity:function(t){t.stopPropagation();var i=e(t.target),s=i.data("id"),n=i.data("nonce"),o=i.data("type"),a=i.is(":checked");i.attr("disabled",!0),e.ajax({url:ajaxurl,type:"POST",data:{action:"hustle_social_sharing_toggle_test_activity",id:s,type:o,_ajax_nonce:n},complete:function(){i.attr("disabled",!1)},success:function(e){e.success||i.attr("checked",!a)},error:function(e){e.success||i.attr("checked",!a)}})},edit:function(e){e.stopPropagation()},"delete":function(e){e.stopPropagation();var t=this.$(e.target);if(!t.prev(".hustle-delete-module-confirmation").length){var i=t.closest("li.wph-accordions--item"),n=(t.data("id"),new s({id:t.data("id"),nonce:t.data("nonce"),action:"hustle_social_sharing_delete",onSuccess:function(e){e.success&&(n.remove(),i.toggle("highlight"))}}));t.before(n.$el)}}})}),Hustle.define("Social_Sharing.Models",function(){"use strict";var e=Hustle.get("Models.M").extend({defaults:{optin_name:"",optin_title:"",optin_provider:"social_sharing",active:1,test_mode:0,service_type:"native",click_counter:1,social_icons:""}}),t=Hustle.get("Models.M").extend({defaults:{icon_style:"four",icons_order:"",customize_colors:0,icon_bg_color:"rgba(146, 158, 170, 1)",icon_color:"rgba(255, 255, 255, 1)",floating_social_bg:"rgba(4, 48, 69, 1)",drop_shadow:0,drop_shadow_x:0,drop_shadow_y:0,drop_shadow_blur:0,drop_shadow_spread:0,drop_shadow_color:"rgba(0,0,0,0)",floating_inline_count:0,counter_border:"rgba(146, 158, 170, 1)",counter_text:"rgba(255, 255, 255, 1)",customize_widget_colors:0,widget_icon_bg_color:"rgba(146, 158, 170, 1)",widget_icon_color:"rgba(255, 255, 255, 1)",widget_bg_color:"rgba(146, 158, 170, 1)",widget_drop_shadow:0,widget_drop_shadow_x:0,widget_drop_shadow_y:0,widget_drop_shadow_blur:0,widget_drop_shadow_spread:0,widget_drop_shadow_color:"rgba(0,0,0,0)",widget_inline_count:0,widget_counter_text:"rgba(255, 255, 255, 1)"}}),i=Hustle.get("Models.M").extend({defaults:{enabled:!1,conditions:"",location_type:"screen",location_target:"",location_align_x:"left",location_align_y:"top",location_top:0,location_bottom:0,location_right:0,location_left:0},initialize:function(e){if(_.extend(this,e),!(this.get("conditions")instanceof Backbone.Model)){_.isEmpty(this.get("conditions"))&&_.isArray(this.get("conditions"))&&(this.conditions={});
|
4 |
var t=Hustle.get("Model");this.set("conditions",new t(this.conditions))}this.on("change",this.user_has_change,this)}}),s=i.extend();return{Services:e,Appearance:t,TypeBase:i,Floating_Social:s}}),Hustle.define("Social_Sharing.Services_View",function(e,t,i){"use strict";return Hustle.View.extend(_.extend({},Hustle.get("Mixins.Model_Updater"),{template:Optin.template("wpoi-social-sharing-services-tpl"),init:function(e){return this.render()},render:function(e){return this.setElement(this.template(_.extend({},this.model.toJSON()))),this}}))}),Hustle.define("Social_Sharing.View",function(e,t,i){"use strict";return Hustle.View.extend({el:".wph-sshare-wizard-view",message_box_tpl:Optin.template("wpoi-social-sharing-message-box-tpl"),preview:!1,preview_model:!1,initial_data:new Backbone.Model({content:""}),events:{"click .wph-toggletabs .can-open":"toggle_accordion","click ul.wph-ss-service-type li label":"toggle_service_type","click .wph-button.ss-save-changes":"ss_save","click .wph-button.ss-cancel":"ss_cancel","click .wph-button.ss-next-step":"ss_next_step","click .wph-button.ss-back":"ss_back","click .wph-button.ss-finish":"ss_finish","change .wph-sshare--pick_social_icons input.wph-share-icon-enable":"toggle_icon","change .wph-sshare--pick_social_icons .wph-input--number input":"icon_counter_updated","change .wph-sshare--pick_social_icons .wph-sshare--input_wrap input":"icon_link_updated",'click ul.wph-share-icon_style [name="wph-sshare-type_icons_design"]':"toggle_icon_style","click ul.wph-share-customize-color li > label":"toggle_floating_custom_color","click ul.wph-share-widget-customize-color li > label":"toggle_widget_custom_color","click ul.wph-sshare--pick_location_type li > label":"toggle_location_type","click ul.wph-sshare--select_location_align_x li > label":"toggle_location_align","click ul.wph-sshare--select_location_align_y li > label":"toggle_location_align"},init:function(e){return this.services_view=e.services_view,this.appearance_view=e.appearance_view,this.floating_view=e.floating_view,this.listenTo(this.model,"change",this.render_message_box),this.listenTo(this.services_view.model,"change:service_type",this.services_view_changes),this.listenTo(this.services_view.model,"change:click_counter",this.services_view_changes),this.listenTo(this.appearance_view.model,"change:icons_order",this.icons_order_updated),this.listenTo(this.appearance_view.model,"change:drop_shadow",this.appearance_view_changes),this.listenTo(this.appearance_view.model,"change:customize_colors",this.appearance_view_changes),this.listenTo(this.appearance_view.model,"change:customize_widget_colors",this.appearance_view_changes),this.listenTo(this.appearance_view.model,"change:widget_drop_shadow",this.appearance_view_changes),this.listenTo(this.appearance_view.model,"change:floating_inline_count",this.appearance_view_changes),this.listenTo(this.appearance_view.model,"change:widget_inline_count",this.appearance_view_changes),this.listenTo(this.appearance_view.model,"change",_.debounce(this.render_preview,100)),this.render_message_box(),this.render()},render:function(){this.render_service_view(),this.render_appearance_view();var e=this.$("#wph-social-sharing--floating-social-container"),t=e.attr("class");e.replaceWith(this.floating_view.$el.addClass(t).attr("id","wph-social-sharing--floating-social-container"))},render_service_view:function(){this.$("#wph-social-sharing--services_tab .wph-toggletabs--content").html(""),this.services_view.delegateEvents(),this.$("#wph-social-sharing--services_tab .wph-toggletabs--content").append(this.services_view.$el)},render_appearance_view:function(){this.$("#wph-social-sharing--appearance_tab .wph-toggletabs--content").html(""),this.appearance_view.delegateEvents(),this.$("#wph-social-sharing--appearance_tab .wph-toggletabs--content").append(this.appearance_view.$el),Hustle.Events.trigger("SS.appearance_view_ready"),this.render_preview()},services_view_changes:function(){Optin.hasChanges=!0,this.services_view.render(),this.render_service_view(),this.appearance_view_changes()},appearance_view_changes:function(){Optin.hasChanges=!0,this._set_social_icons(),this.appearance_view.render(),this.render_appearance_view()},render_message_box:function(){var e=this._get_shortcode_id();this.$("#wph-social-sharing--messagebox").html(this.message_box_tpl({shortcode_id:e}))},render_preview:function(){var e=this.$("#wph-sshare--floating_social .wph-sshare--preview_box .wph-sshare--container"),t=this.$("#wph-sshare--widget_shortcode .wph-sshare--preview_box .wph-sshare--container"),i=this.appearance_view.model.toJSON();if(e.css("background",i.floating_social_bg),i.counter_text&&e.find(".wph-sshare_social_counter span").css("color",i.counter_text),"1"==i.customize_colors&&("one"==i.icon_style&&(e.find("a").css("background",i.icon_bg_color),e.find(".wph-social-path .wph-social-icon").css("fill",i.icon_color)),"two"==i.icon_style&&(e.find(".wph-social").css("border-color",i.icon_bg_color),e.find(".wph-social .wph-social-icon").css("fill",i.icon_color)),"three"!=i.icon_style&&"four"!=i.icon_style||(e.find(".wph-social").css("background",i.icon_bg_color),e.find(".wph-social .wph-social-icon").css("fill",i.icon_color)),i.counter_border&&e.find("a").css("border","1px solid "+i.counter_border)),"1"==i.drop_shadow){var s=""+i.drop_shadow_x+"px "+i.drop_shadow_y+"px "+i.drop_shadow_blur+"px "+i.drop_shadow_spread+"px "+i.drop_shadow_color;e.css("box-shadow",s)}if(t.css("background",i.widget_bg_color),t.find(".wph-sshare_social_counter span").css("color",i.widget_counter_text),"1"==i.customize_widget_colors&&("one"==i.icon_style&&(t.find("a").css("background",i.widget_icon_bg_color),t.find(".wph-social-path .wph-social-icon").css("fill",i.widget_icon_color)),"two"==i.icon_style&&(t.find(".wph-social").css("border-color",i.widget_icon_bg_color),t.find(".wph-social .wph-social-icon").css("fill",i.widget_icon_color)),"three"!=i.icon_style&&"four"!=i.icon_style||(t.find(".wph-social").css("background",i.widget_icon_bg_color),t.find(".wph-social .wph-social-icon").css("fill",i.widget_icon_color))),"1"==i.widget_drop_shadow){var n=""+i.widget_drop_shadow_x+"px "+i.widget_drop_shadow_y+"px "+i.widget_drop_shadow_blur+"px "+i.widget_drop_shadow_spread+"px "+i.widget_drop_shadow_color;t.css("box-shadow",n)}},toggle_accordion:function(t){t.preventDefault();var i=e(t.target),s=e(".wph-toggletabs"),n=i.closest(".wph-toggletabs"),o=s.not(n),a=n.find(".dev-icon-caret_down, .dev-icon-caret_up");o.removeClass("wph-toggletabs--open"),o.find(".dev-icon-caret_up").removeClass("dev-icon-caret_up").addClass("dev-icon-caret_down"),n.toggleClass("wph-toggletabs--open wph-toggletabs--closed"),a.toggleClass("dev-icon-caret_down dev-icon-caret_up")},toggle_service_type:function(t){t.preventDefault(),Optin.hasChanges=!0;var i=this.$(t.target);i.closest("li").hasClass("current")||this.model.set("service_type",e(t.target).find("input").val())},toggle_icon:function(e){var t=this.$(e.target),i=t.is(":checked"),s=this.services_view.model.get("service_type"),n=t.parents(".wph-sshare--social_"+s);i?n.find(".disabled").removeClass("disabled"):(n.find(".wph-sshare--icon").addClass("disabled"),"native"==s?n.find(".wph-input--number").addClass("disabled"):n.find(".wph-sshare--input_wrap").addClass("disabled")),this.appearance_view_changes()},icons_order_updated:_.debounce(function(){this.appearance_view_changes()},500),icon_counter_updated:_.debounce(function(){this.appearance_view_changes()},500),icon_link_updated:function(e){this._set_social_icons()},toggle_icon_style:function(e){e.preventDefault();var t=this.$(e.target);t.closest("li").hasClass("current")||(this.appearance_view.model.set("icon_style",t.val(),{silent:!0}),this.appearance_view.render(),this.render_appearance_view())},toggle_floating_custom_color:function(e){e.preventDefault();var t=this.$(e.target),i=t.closest("li"),s=i.find("input");i.hasClass("current")||(i.addClass("current"),i.siblings().removeClass("current"),this.appearance_view.model.set("customize_colors",s.val()))},toggle_widget_custom_color:function(e){e.preventDefault();var t=this.$(e.target),i=t.closest("li"),s=i.find("input");i.hasClass("current")||(i.addClass("current"),i.siblings().removeClass("current"),this.appearance_view.model.set("customize_widget_colors",s.val()))},toggle_location_type:function(e){e.preventDefault();var t=this.$(e.target),i=t.closest("li"),s=i.find("input"),n=this.$(".wph-sshare--selector");i.hasClass("current")||(i.addClass("current"),i.siblings().removeClass("current"),this.floating_view.model.set("location_type",s.val()),"selector"==s.val()?n.removeClass("hidden"):n.hasClass("hidden")||n.addClass("hidden"))},toggle_location_align:function(t){t.preventDefault();var i=this.$(t.target),s=i.closest("li"),n=s.find("input"),o=this.$(".wph-sshare--offset_"+n.val()),a=n.data("attribute");s.hasClass("current")||(s.addClass("current"),s.siblings().removeClass("current"),this.floating_view.model.set(a,n.val()),o.removeClass("hidden"),o.siblings('[class^="wph-sshare--offset_"]').each(function(){e(this).hasClass("hidden")||e(this).addClass("hidden")}))},ss_save:function(t){if(t.preventDefault(),this.validate()){var i=this,s=this.$(t.target).closest("button"),n=s.data("id"),o=s.parents(".row").find("button.wph-button"),a=this.services_view.model.toJSON(),l=this.appearance_view.model.toJSON(),r=this.floating_view.model.toJSON(),c=this._get_shortcode_id();return s.addClass("wph-button-save--loading"),o.each(function(){e(this).attr("disabled",!0)}),a=this._get_social_icons_data(a),e.ajax({url:ajaxurl,type:"POST",data:{action:"hustle_social_sharing_save",_ajax_nonce:s.data("nonce"),id:s.data("id"),services:a,appearance:l,floating_social:r,shortcode_id:c},complete:function(t){var a=t.responseJSON,l=i.$('button.wph-button[data-id="'+n+'"]');if(s.removeClass("wph-button-save--loading"),o.each(function(){e(this).attr("disabled",!1)}),Optin.hasChanges=!1,n==-1){l.attr("data-id",a.data);var r=window.location.pathname+window.location.search;r=r.replace("id=-1","id="+a.data),window.history.replaceState({},"",r)}}})}},ss_cancel:function(e){e.preventDefault(),window.onbeforeunload=null,window.location.replace("?page=inc_hustle_social_sharing")},ss_next_step:function(e){if(e.preventDefault(),this.validate()){var t=this.$(".wph-toggletabs.wph-toggletabs--open ~ .wph-toggletabs").first();this.ss_save(e).done(function(e){e.success&&t.find(".can-open span").click()})}},ss_back:function(e){e.preventDefault();var t=this.$(".wph-toggletabs.wph-toggletabs--open").prevAll(".wph-toggletabs").first();t.find(".can-open span").click()},ss_finish:function(e){if(e.preventDefault(),this.validate()){var t=this.$(e.target),i=parseInt(t.data("id"))==-1;this.ss_save(e).done(function(e){if(e.success){window.onbeforeunload=null;var t="?page=inc_hustle_social_sharing";t+=i?"&new_id="+e.data:"&updated_id="+e.data,window.location.replace(t)}})}},validate:function(){var t=!0,i=this.$('[data-attribute="optin_name"]'),s=i.attr("placeholder");if(!i.val()){if(t=!1,0===i.siblings("span.wph-icon.i-warning").length){var n=e('<span class="wph-icon i-warning" title="'+s+'"></span>');n.insertBefore(i)}i.focus()}return t&&e("span.dashicons.dashicons-warning").remove(),t},_set_social_icons:function(){Optin.hasChanges=!0;var e=this.services_view.model.toJSON();e=this._get_social_icons_data(e),this.services_view.model.set("social_icons",e.social_icons,{silent:!0}),window.services_model=this.services_view.model},_get_social_icons_data:function(t){var i=this.$(".wph-sshare--social_"+t.service_type),s={};return i.each(function(){var t=e(this),i=t.find("span.toggle input"),n=t.find(".wph-sshare--icon").data("id"),o=t.find(".wph-input--number input"),a=t.find(".wph-sshare--input_wrap input"),l=parseInt(o.val());l<0&&o.val(0),i.is(":checked")&&(s[n]={enabled:!0,counter:o.length?o.val():"0",link:a.length?a.val():""})}),t.social_icons=s,t},_get_shortcode_id:function(){return this.model.get("optin_name").trim().toLowerCase().replace(/\s+/g,"-")}})}),Hustle.define("Legacy_Popups.Listing",function(e){"use strict";return Backbone.View.extend({el:"#wph-ccontent--migration",events:{"click .custom-content-legacy-toggle-activity":"toggle_activity","click .wph-button-legacy-quickedit-btn":"toggle_quick_edit","click .custom-content-legacy-popup-save-quickedit":"save_quick_edit","click .wph-button-legacy-migrate-btn":"migrate"},initialize:function(){},toggle_activity:function(t){var i=this.$(t.target),s=i.data("id"),n=i.data("nonce"),o=i.is(":checked");i.prop("disabled",!0),e.ajax({url:ajaxurl,data:{action:"hustle_legacy_popup_toggle_activity",id:s,target_state:o,_ajax_nonce:n},complete:function(){i.prop("disabled",!1)},success:function(e){e.success||i.prop("checked",!o)},error:function(){i.prop("checked",!o)}})},toggle_quick_edit:function(e){var t=this.$(e.target),i=t.closest("li");t.toggleClass("wph-button--open wph-button--closed"),i.toggleClass("wph-accordion--open wph-accordion--closed")},save_quick_edit:function(t){var i=this,s=this.$(t.target),n=s.closest("li"),o={action:"hustle_custom_content_legacy_popup_quick_edit_save",content:n.find(".hustle-custom-content-legacy-popup-content").val(),heading:n.find(".hustle-custom-content-legacy-popup-heading").val(),subheading:n.find(".hustle-custom-content-legacy-popup-subheading").val(),id:s.data("id"),_ajax_nonce:s.data("nonce")},a=e("<span class='button-spinner'>"),l=n.find(".wph-button-legacy-quickedit-btn")[0],r=s.outerWidth();s.append(a).animate({width:r+.3*r}).attr("disabled",!0),e.ajax({url:ajaxurl,data:o,complete:function(){s.animate({width:r}).attr("disabled",!1).find(".button-spinner").remove()},success:function(e){e.success&&i.toggle_quick_edit({target:l})}})},migrate:function(t){var i=this.$(t.target),s=i.closest("li"),n=i.data("id"),o=i.data("nonce"),a=e("<span class='button-spinner'>"),l=i.outerWidth();i.append(a).animate({width:l+.3*l}).attr("disabled",!0),e.ajax({url:ajaxurl,data:{action:"hustle_custom_content_legacy_popup_migrate",id:n,_ajax_nonce:o},complete:function(){i.animate({width:l}).attr("disabled",!1).find(".button-spinner").remove()},success:function(e){s.slideUp(300,function(){s.remove()})}})}})}),Hustle.define("Custom_Content.Module",function(e){"use strict";!function(){if("hustle_page_inc_hustle_custom_content"===pagenow){var e=Hustle.get("Custom_Content.Listing"),t=(new e,Hustle.get("Legacy_Popups.Listing"));new t}}(),function(){if(_.indexOf(["hustle_page_inc_hustle_custom_content_new","hustle_page_inc_hustle_custom_content_edit"],pagenow)!==-1&&!parseInt(optin_vars.current.is_cc_limited)){var e=Hustle.get("Custom_Content.View"),t=Hustle.get("Custom_Content.Content_View"),i=Hustle.get("Custom_Content.Design_View"),s=Hustle.get("Custom_Content.After_Content_View"),n=Hustle.get("Custom_Content.Popup_View"),o=Hustle.get("Custom_Content.Slide_In_View"),a=Hustle.get("Settings.Display_Triggers_View"),l=Hustle.get("Settings.Conditions_View"),r=Hustle.get("Custom_Content.Models.Content"),c=Hustle.get("Custom_Content.Models.Design"),d=Hustle.get("Custom_Content.Models.AfterContent"),p=Hustle.get("Custom_Content.Models.Popup"),h=Hustle.get("Custom_Content.Models.Slide_In"),u=Hustle.get("Custom_Content.Models.Magic_Bar"),g=new r(optin_vars.current.content||{}),m=new d(optin_vars.current.after_content||{}),w=new c(optin_vars.current.design||{}),v=new p(optin_vars.current.popup||{}),f=new h(optin_vars.current.slide_in||{}),b=new u(optin_vars.current.magic_bar||{});return window.content_model=g,window.design_model=w,window.after_content_model=m,window.popup_model=v,window.slide_in_model=f,window.magic_bar_model=b,new e({model:g,content_view:new t({model:g,design_model:w}),design_view:new i({model:w}),after_content_view:new s({type:"after_content",model:m,display_triggers_view:new a({model:m.get("triggers"),type:"after_content"}),conditions_view:new l({model:m.get("conditions"),type:"after_content"})}),popup_view:new n({type:"popup",model:v,display_triggers_view:new a({model:v.get("triggers"),type:"popup"}),conditions_view:new l({model:v.get("conditions"),type:"popup"})}),slide_in:new o({type:"slide_in",model:f,display_triggers_view:new a({model:f.get("triggers"),type:"slide_in"}),conditions_view:new l({model:f.get("conditions"),type:"slide_in"})}),magic_bar:new Backbone.View({model:b})})}}()}),Hustle.define("Social_Sharing.Module",function(e){"use strict";!function(){if("hustle_page_inc_hustle_social_sharing"===pagenow){var e=Hustle.get("Social_Sharing.Listing");new e}}(),function(){if(_.indexOf(["hustle_page_inc_hustle_social_sharing_new","hustle_page_inc_hustle_social_sharing_edit"],pagenow)!==-1&&!parseInt(optin_vars.current.is_ss_limited)){var e=Hustle.get("Social_Sharing.View"),t=Hustle.get("Social_Sharing.Services_View"),i=Hustle.get("Social_Sharing.Appearance_View"),s=Hustle.get("Social_Sharing.Floating_View"),n=Hustle.get("Settings.Conditions_View"),o=Hustle.get("Social_Sharing.Models.Services"),a=Hustle.get("Social_Sharing.Models.Appearance"),l=Hustle.get("Social_Sharing.Models.Floating_Social"),r=new o(optin_vars.current.services||{}),c=new a(optin_vars.current.appearance||{}),d=new l(optin_vars.current.floating_social||{});return window.services_model=r,window.appearance_model=c,window.floating_social_model=d,new e({model:r,services_view:new t({model:r}),appearance_view:new i({model:c}),floating_view:new s({type:"floating_social",model:d,conditions_view:new n({model:d.get("conditions"),type:"floating_social"})})})}}()}),Hustle.define("Optin.Error_List_Modal",function(e){"use strict";var t=Backbone.View.extend({tagName:"tr",template:Optin.template("wpoi-error-list-tpl"),controller:!1,initialize:function(e){this.controller=e.controller,this.module_fields=e.module_fields,this.render()},render:function(){var e=this.template({model:this.model,module_fields:this.module_fields});this.$el.html(e),this.$el.appendTo(this.controller.$("#wpoi-error-list"))}});return Backbone.View.extend({id:"wpoi-error-list-modal",button:!1,list:[],template:Optin.template("wpoi-error-list-modal-tpl"),header_template:Optin.template("wpoi-error-header-list-tpl"),hasHeader:!1,events:{"click .inc-opt-close-error-list":"toggleErrorLog","click .button-clear-logs":"clearLogs","click .button-delete-logs":"_clean","click .button-cancel-delete-logs":"cancelDelete"},initialize:function(e){this.button=e.button,this.render()},render:function(){var i=this,s=this.template(this.model);this.$el.html(s),this.$el.appendTo("body"),this.clearLogButton=this.$(".button-clear-logs"),this.exportButton=this.$(".button-download-csv"),this.deleteConfirmation=this.$(".hustle-delete-logs-confirmation"),this.header=this.$(".wph-table-header"),this.button.addClass("loading"),e.getJSON(window.ajaxurl,{optin_id:this.model.optin_id,_wpnonce:optin_vars.error_log_nonce,action:"get_error_list"},function(e){e.success&&e.data&&e.data.logs&&(i.header.html(i.header_template({headers:e.data.module_fields})),_.each(e.data.logs,function(s){new t({module_fields:e.data.module_fields,model:s,controller:i})}),i.show())})},show:function(){this.$el.addClass("show")},toggleErrorLog:function(){this.$el.removeClass("show")},clearLogs:function(){this.deleteConfirmation.show(),this.clearLogButton.attr("disabled",!0),this.exportButton.attr("disabled",!0)},_clean:function(){var t=this;e.get(window.ajaxurl,{optin_id:this.model.optin_id,_wpnonce:optin_vars.clear_log_nonce,action:"clear_logs"},function(e){e.success&&(t.toggleErrorLog(),_.delay(function(){t.button.remove(),t.remove()},350))})},cancelDelete:function(){this.deleteConfirmation.hide(),this.clearLogButton.removeAttr("disabled"),this.exportButton.removeAttr("disabled")}})}),Hustle.define("Optin.Listing",function(e){"use strict";var t=Hustle.get("Delete_Confirmation");return Backbone.View.extend({el:"#hustle-optin-listing",logShown:!1,events:{"click .wph-accordions header":"toggle_optin_accordion","click .hustle-delete-optin":"delete_optin","click .optin-active-state":"toggle_optin_activity","click .button-view-email-list":"view_email_list","change .optin-type-active-state":"toggle_type_activity","change .wpoi-testmode-active-state":"toggle_type_mode_activity","change .optin-toggle-tracking-activity":"toggle_tracking_activity","click .button-view-log-list":"view_error_log_list"},initialize:function(){var t=this;this.$(".optin-type-active-state").each(function(){t.set_testmode_visibiliy(e(this),0)})},toggle_optin_accordion:function(t){if(_.indexOf(["wph-accordion--animate_buttons","wph-icon i-arrow"],t.target.className)!==-1){var i=e(t.target),s=i.find(".dev-icon"),n=i.closest("li");n.find("section");s.toggleClass("dev-icon-caret_down dev-icon-caret_up"),n.toggleClass("wph-accordion--closed wph-accordion--open"),n.siblings("li.wph-accordion--open").toggleClass("wph-accordion--closed wph-accordion--open")}},delete_optin:function(i){i.preventDefault(),i.stopPropagation();var s=this.$(i.target);if(!s.prev(".hustle-delete-module-confirmation").length){var n=(s.closest("li.wph-accordions--item"),s.data("id"),new t({id:s.data("id"),nonce:s.data("nonce"),action:"inc_opt_delete_optin",onSuccess:function(t){t.success&&s.closest("li").slideUp(300,function(){e(this).remove()})}}));s.before(n.$el)}},toggle_optin_activity:function(t){var i=this.$(t.target),s=i.data()||{},n=i.closest(".wph-accordions--item").find(".wph-accordion--disable"),o=i.closest("li");s.action="inc_opt_toggle_state",s._ajax_nonce=s.nonce,i.prop("disabled",!0),i.is(":checked")?(n.addClass("hidden"),o.removeClass("wph-accordion--closed").addClass("wph-accordion--open")):(n.removeClass("hidden"),o.addClass("wph-accordion--closed").removeClass("wph-accordion--open")),e.post(ajaxurl,s,function(e){i.prop("disabled",!1)})},view_email_list:function(t){t.preventDefault(),t.stopPropagation();var i=e(t.target),s=i.data("id"),n=i.data("name"),o=i.data("total"),a=Hustle.get("Optin.Subscription_List_Modal");new a({model:{id:s,total:o,name:n,module_fields:[]}})},set_testmode_visibiliy:function(e,t){"undefined"==typeof t&&(t=400);var i=e,s=i.data()||{},n=this.$('.wpoi-testmode-active-state[data-id="'+s.id+'"][data-type="'+s.type+'"]').closest(".test-mode");i.is(":checked")?n.fadeOut(t):n.fadeIn(t)},toggle_tracking_activity:function(t){t.stopPropagation();var i=e(t.target),s=i.data("id"),n=i.data("nonce"),o=i.data("type"),a=i.is(":checked");i.attr("disabled",!0),e.ajax({url:ajaxurl,type:"POST",data:{action:"inc_optin_toggle_tracking_activity",id:s,type:o,_ajax_nonce:n},complete:function(){i.attr("disabled",!1)},success:function(e){e.success||i.attr("checked",!a)},error:function(e){e.success||i.attr("checked",!a)}})},toggle_type_activity:function(t){var i=e(t.target),s=i.data()||{};this.set_testmode_visibiliy(i),e('.optin-type-active-state[data-id="'+s.id+'"][data-type="'+s.type+'"]').not(this).prop("checked",!!i.is(":checked")),s.action="inc_opt_toggle_optin_type_state",s._ajax_nonce=s.nonce,i.prop("disabled",!0),e.post(ajaxurl,s,function(e){i.prop("disabled",!1)})},toggle_type_mode_activity:function(t){var i=e(t.target),s=i.data()||{};s.action="inc_opt_toggle_type_test_mode",s._ajax_nonce=s.nonce,e('.wpoi-testmode-active-state[data-id="'+s.id+'"][data-type="'+s.type+'"]').not(this).prop("checked",!!i.is(":checked")),i.prop("disabled",!0),e.post(ajaxurl,s,function(e){i.prop("disabled",!1)})},view_error_log_list:function(t){var i=e(t.currentTarget),s=i.data(),n=s.id,o=s.name,a=Hustle.get("Optin.Error_List_Modal");this.logShown?this.logShown.show():this.logShown=new a({button:i,model:{name:o,optin_id:n,total:s.total}})}})}),Hustle.define("Optin.Preview",function(e){"use strict";return Backbone.View.extend({el:".wph-preview",preview_modal:!1,$preview_yield:!1,wrapper_class_tpl:Hustle.create_template("wph-preview--optin wph-preview--{{type}}"),events:{"click .wph-preview--mask":"hide","click .wph-preview--close":"hide","change #wph-preview-type-selector":"change_type"},initialize:function(){this.$preview_yield=this.$("#optin-preview-wrapper"),this.render(),this.listenTo(this.preview_modal.model,"change",this.render),this.$("#wph-preview-type-selector").val(this.model.get("type"))},get_tpl:function(e){var t=["optin-layout-one","optin-layout-two","optin-layout-three","optin-layout-four"];return Hustle.template(t[e])},render:function(){var e=Hustle.get("Modal");this.preview_modal=new e({model:this.model,template:this.get_tpl(this.model.get("form_location").toInt())}),this.$preview_yield.replaceWith(this.preview_modal.$el),this.$preview_yield=this.preview_modal.$el,this.preview_modal.show(),this.$("#wph-preview-type-selector").val(this.model.get("type")),Hustle.Events.trigger("view.rendered",this)},show:function(){this.$el.removeClass("wph-preview--closed").addClass("wph-preview--open"),this.$(".wph-preview--optin").attr("class",this.wrapper_class_tpl({type:this.model.get("type")})),Optin.Events.trigger("design:preview:render:finish",this.preview_modal)},hide:function(e){this.$el.removeClass("wph-preview--open").addClass("wph-preview--closed")},change_type:function(e){var t=this.$(e.target).val();this.preview_modal.model.set("type",t),this.$(".wph-preview--optin").attr("class",this.wrapper_class_tpl({type:t})),Optin.Events.trigger("design:preview:render:finish",this.preview_modal),Hustle.Events.trigger("Optin.preview.changed.type",this)}})}),Hustle.define("Optin.Subscription_List_Modal",function(e){"use strict";var t={};return Backbone.View.extend({id:"wpoi-emails-list-modal",template:Optin.template("wpoi-emails-list-modal-tpl"),list_header_template:Optin.template("wpoi-email-list-header-tpl"),list_template:Optin.template("wpoi-emails-list-tpl"),show_delay:350,events:{"click .inc-opt-close-emails-list":"close","click .wpoi-complete-mask":"close"},initialize:function(){return this.render()},render:function(){var i=this,s=this.template(this.model);return s=s.replace("__id",this.model.id),this.$el.html(s),t[this.model.id]||(t[this.model.id]=e.ajax({url:ajaxurl,type:"GET",data:{action:"inc_optin_get_email_lists",id:this.model.id,_ajax_nonce:e("#wpoi_get_emails_list_nonce").val()}}),this.delay_show=0),t[this.model.id].then(function(e){if(e.success){var t=e.data.module_fields,s=[];i.model.module_fields.length||(i.model.module_fields=t,i.$(".wpoi-emails-list-header").html(i.list_header_template({module_fields:t})),_.each(t,function(e){s.push({name:e.name,label:e.label})}));var n=i.list_template({subscriptions:e.data.subscriptions,module_fields:s});i.$("#wpoi-emails-list-content").html(n),i.show()}}),this.$el.appendTo("body"),this},show:function(){_.delay(function(){this.$el.addClass("show")}.bind(this),this.show_delay)},close:function(e){e.preventDefault(),this.$el.removeClass("show"),_.delay(function(){this.remove()}.bind(this),350)}})}),Hustle.define("Optin.Module",function(){"use strict";if("hustle_page_inc_optin_listing"===pagenow){var e=Hustle.get("Optin.Listing");new e}}),Hustle.define("Dashboard.View",function(e,t,i){"use strict";if("toplevel_page_inc_optins"===pagenow&&!_.isTrue(optin_vars.is_free)){var s=Backbone.View.extend({el:".wph-dashboard",conversions_chart:null,chart_data:null,chart_options:null,empty_chart:!0,default_dataset_options:{fill:!1,cubicInterpolationMode:"monotone",borderCapStyle:"butt",borderDash:[],borderWidth:1,borderDashOffset:0,borderJoinStyle:"miter",pointBackgroundColor:"#fff",pointBorderWidth:3,pointHoverRadius:5,pointHoverBorderColor:"rgba(220,220,220,1)",pointHoverBorderWidth:2,pointRadius:1,pointHitRadius:10,spanGaps:!1},events:{"click .wph-icon.i-close":"close"},initialize:function(t){for(var i=[],s=0;s<hustle_vars.conversion_chart_data.length;s++){hustle_vars.conversion_chart_data[s].data.length>=1&&(this.empty_chart=!1);var n={label:hustle_vars.conversion_chart_data[s].module_name,data:hustle_vars.conversion_chart_data[s].data,backgroundColor:hustle_vars.conversion_chart_data[s].color,borderColor:hustle_vars.conversion_chart_data[s].color,pointBorderColor:hustle_vars.conversion_chart_data[s].color,pointHoverBackgroundColor:hustle_vars.conversion_chart_data[s].color};i.push(e.extend(!0,{},this.default_dataset_options,n))}return this.chart_data={datasets:i},this.chart_options={responsive:!0,maintainAspectRatio:!1,legend:{display:!1},scales:{xAxes:[{type:"time",time:{unit:"week",unitStepSize:3,tooltipFormat:"D MMM",displayFormat:"D MMM",min:hustle_vars.previous_month,max:hustle_vars.today},gridLines:{display:!1}}],yAxes:[{ticks:{min:0},gridLines:{display:!1}}]},tooltips:{callbacks:{label:function(e,t){var i=[];return i.push(e.yLabel+" Conv"),i}},cornerRadius:3,displayColors:!1,backgroundColor:"rgba(11,47,63,1)"},hover:{mode:"nearest",intersect:!0}},this.render()},render:function(){e(".tabs-header li label").on("click",this.toggle_overview),e(".can-close .wph-icon.i-close").on("click",this.close),e("a#wph-sshare_stats_view_all").on("click",this.toggle_sshare_modal),e("a#wph-sshare_stats_close").on("click",this.toggle_sshare_modal),this.handle_sshare_modal_pagination();var t=e("#conversions_chart");if(t.length)if(this.empty_chart){t.parent().css("height","100%").css("width","100%").css("display","table");var i=e('<div class="graph-no-data">'+optin_vars.messages.dashboard.not_enough_data+"</div>");i.css("display","table-cell").css("text-align","center").css("vertical-align","middle"),t.replaceWith(i)}else{var s=t.closest("#wph-module-stats").find("table.wph-table.wph-module--stats"),n=s.outerHeight();n>230?t.attr("height",n):t.attr("height",230);for(var o in this.chart_data.datasets)this.chart_data.datasets[o].data&&(this.chart_data.datasets[o].data=_.sortBy(this.chart_data.datasets[o].data,"x"));this.conversions_chart=new Chart(t,{type:"line",data:this.chart_data,options:this.chart_options})}},close:function(t){t.preventDefault();var i=e(t.target).closest(".row"),s=e(t.target).closest("#wph-welcome"),n=s.data("nonce");i.slideToggle(300,function(){e.ajax({url:ajaxurl,type:"POST",data:{action:"persist_new_welcome_close",_ajax_nonce:n},complete:function(e){i.remove()}})})},toggle_overview:function(t){t.preventDefault();var i=e(t.target),s=i.find("input").val(),n=e("#wph-"+s+"-overview"),o=i.parent();e(".wph-modules-overview").not(n).removeClass("current"),n.addClass("current"),e(".tabs-header li").not(o).removeClass("current"),o.addClass("current")},toggle_sshare_modal:function(t){t.preventDefault();var i=e("#wpoi-sshare-stats-modal");i.toggleClass("show")},handle_sshare_modal_pagination:function(){e("li.wph-sshare--prev_page a").on("click",e.proxy(this.sshare_modal_prev,this)),e("li.wph-sshare--next_page a").on("click",e.proxy(this.sshare_modal_next,this)),e("li.wph-sshare--page_number a").on("click",e.proxy(this.sshare_modal_goto,this))},sshare_modal_prev:function(t){t.preventDefault(),t.stopImmediatePropagation();var i=e(t.target).closest("li"),s=i.parent(),n=s.data("nonce"),o=s.find("li.wph-sshare--current_page"),a=s.find("li.wph-sshare--page_number"),l=s.find("li.wph-sshare--next_page"),r=(parseInt(s.data("total")),parseInt(o.data("page"))),c=parseInt(i.data("page"));o.data("page",c);var d=l.find("i.wph-icon");if(l.data("page",r),d.length&&l.html('<a href="#">'+d[0].outerHTML+"</a>"),1==c){var p=i.find("i.wph-icon");p.length&&i.html("<span>"+p[0].outerHTML+"</span>")}if(a.length)a.data("page",r),a.find("a").text(r);else{var _='<li class="wph-link wph-sshare--page_number" data-page="'+r+'"><a href="#">'+r+"</a></li>";e(_).insertAfter(o)}o.find("span").text(c),i.data("page",c-1),this.handle_sshare_modal_pagination(),this.sshare_show_page_content(c,n)},sshare_modal_next:function(t){t.preventDefault(),t.stopImmediatePropagation();var i=e(t.target).closest("li"),s=i.parent(),n=s.data("nonce"),o=s.find("li.wph-sshare--current_page"),a=s.find("li.wph-sshare--page_number"),l=s.find("li.wph-sshare--prev_page"),r=parseInt(s.data("total")),c=parseInt(o.data("page")),d=parseInt(i.data("page"));o.data("page",d);var p=l.find("i.wph-icon");if(l.data("page",c),p.length&&l.html('<a href="#">'+p[0].outerHTML+"</a>"),d<r){if(a.length){var _=d+1;a.data("page",_),a.find("a").text(_),i.data("page",_)}}else{a.length&&a.remove();var h=i.find("i.wph-icon");h.length&&i.html("<span>"+h[0].outerHTML+"</span>");
|
5 |
+
}o.find("span").text(d),this.handle_sshare_modal_pagination(),this.sshare_show_page_content(d,n)},sshare_modal_goto:function(t){t.preventDefault(),t.stopImmediatePropagation();var i=e(t.target).closest("li"),s=i.parent();s.find("li.wph-sshare--next_page a").click()},sshare_show_page_content:function(t,i){var s=Optin.template("wpoi-sshare-stats-modal-tpl"),n=e("table#wph-sshare--stats_items");n.html('<div class="wph-sshare--loading_stats"><span class="on-action">Loading...</span></div>'),e.ajax({url:ajaxurl,type:"POST",data:{action:"sshare_show_page_content",page_id:t,_ajax_nonce:i},complete:function(e){var t=e.responseJSON.data,i=s(_.extend({},t));n.replaceWith(i)}})}});new s}}),function(e,t){"use strict";if("hustle_page_inc_hustle_settings"===pagenow){var i=Hustle.get("Settings.E_News"),s=Hustle.get("Settings.Modules_Activity"),n=Hustle.get("Settings.Services");new i,new s,new n}}(jQuery,document),function(e){"use strict";Optin.Provider=function(t){var i=this;return _.extend(this,{id:!1,provider_args:{},errors:{},render_in_previewr:_.noop,init:_.noop,add_args:function(){i.id===Optin.step.services.model.get("optin_provider")&&_.each(i.provider_args,function(t,i){var s=e(t);s.length&&(s=s.val().trim(),Optin.step.services.provider_args.set(i,s))})},clear_provider_args:function(){i.id===Optin.step.services.model.previousAttributes().optin_provider&&i.id!==Optin.step.services.model.get("optin_provider")&&Optin.step.services.provider_args.clear({silent:!0})},validate:function(){var t=[];return _.each(i.provider_args,function(s,n){var o=e(s),a=e("<span></span>");o.length>0&&""===o.val().trim()&&(t.push(i.errors[n]),a.attr("title",i.errors[n].message),o.addClass("wpoi-error"),o.after(a),_.defer(function(){a.addClass("dashicons dashicons-warning "+i.errors[n].iconClass)}))}),_(t)},check_module_field:function(t,i,s){e.getJSON(window.ajaxurl,{action:"add_module_field",provider:this.id,_wpnonce:optin_vars.get_module_field_nonce,optin_id:i,field:t},s).fail(function(){var e={error:!0};s&&s(e)})},validate_custom_field:function(t,i,s){i.$(".dashicons-warning").remove(),i.$("[name]").prop("disabled",!0),this.check_module_field(t,s,function(s){if(i.$("[name]").prop("disabled",!1),s.success)i.options=t,i._updateOptions();else{var n=e('<span class="dashicons dashicons-warning">'),o="custom"!==s.data.code?optin_vars.messages.module_fields[s.data.code]:s.data.message;n.attr("title",o),i.$('[name="label"]').before(n)}})},add_module_field:function(t,i,s){var n=i.$(".wph-add-new-field","#wpoi-module-field-maker");n.addClass("wp-button-save--loading"),n.prop("disabled",!0),this.check_module_field(t,s,function(s){if(n.prop("disabled",!1),s.success)t=s.data.field,i._add_module_field(t);else{var o=e('<span class="dashicons dashicons-warning">'),a="custom"!==s.data.code?optin_vars.messages.module_fields[s.data.code]:s.data.message;o.attr("title",a),n.before(o)}})}},t),this.init(),Optin.Events.on("services:validate:after",e.proxy(this,"add_args")),Optin.Events.on("design:preview:render:start",e.proxy(this,"clear_provider_args")),Optin.Events.on("optin:add_module_field_"+this.id,e.proxy(this,"add_module_field")),Optin.Events.on("optin:update_module_field_"+this.id,e.proxy(this,"validate_custom_field")),this}}(jQuery,document),function(e){"use strict";Optin.Mixins.add_services_mixin("activecampaign",function(){return new Optin.Provider({id:"activecampaign",provider_args:{url:"#optin_url"},errors:{url:{name:"optin_url",message:optin_vars.messages.activecampaign.enter_url,iconClass:"dashicons-warning-account_name"}}})})}(jQuery,document),function(e,t,i){"use strict";Optin.Mixins.add_services_mixin("constantcontact",function(){return new Optin.Provider({id:"constantcontact"})});var s=function(){var t,s,n=e(this),o=n.data("optin"),a=n.attr("href");if(!o){var l=e(".next-button button.wph-button-save","#wpoi-wizard-services");l.trigger("click"),t=setInterval(function(){o=Optin.step.services.model.get("optin_id"),parseInt(o)>0&&(clearInterval(t),s={optin_id:o,_wpnonce:window.optin_vars.constantcontact_nonce,action:"update_constantcontact_referrer"},e.get(ajaxurl,s),_.delay(function(){i.location=a},300))},100)}};e(t).on("click",".constantcontact-authorize",s)}(jQuery,document,window),function(e){"use strict";Optin.Mixins.add_services_mixin("convertkit",function(){return new Optin.Provider({id:"convertkit",provider_args:{api_secret:"#optin_api_secret"},errors:{api_secret:{name:"optin_api_secret",message:optin_vars.messages.convertkit.enter_api_secret,iconClass:"dashicons-warning-account_name"}}})})}(jQuery,document),function(e,t,i){"use strict";Optin.Mixins.add_services_mixin("hubspot",function(){return new Optin.Provider({id:"hubspot"})});var s=function(){var t,s,n=e(this),o=n.data("optin"),a=n.attr("href");if(!o){var l=e(".next-button button.wph-button-save","#wpoi-wizard-services");l.trigger("click"),t=setInterval(function(){o=Optin.step.services.model.get("optin_id"),parseInt(o)>0&&(clearInterval(t),s={optin_id:o,_wpnonce:window.optin_vars.hubspot_nonce,action:"update_hubspot_referrer"},e.get(ajaxurl,s),_.delay(function(){i.location=a},300))},100)}};e(t).on("click",".hubspot-authorize",s)}(jQuery,document,window),function(e){"use strict";Optin.Mixins.add_services_mixin("infusionsoft",function(){return new Optin.Provider({id:"infusionsoft",provider_args:{account_name:"#optin_account_name"},errors:{account_name:{name:"optin_account_name",message:optin_vars.messages.infusionsoft.enter_account_name,iconClass:"dashicons-warning-account_name"}}})})}(jQuery,document),function(e){"use strict";Optin.Mixins.add_services_mixin("mad_mimi",function(){return new Optin.Provider({id:"mad_mimi",provider_args:{username:"#optin_username"},errors:{username:{name:"optin_username",message:optin_vars.messages.sendy.enter_url,iconClass:"dashicons-warning-url"}}})})}(jQuery,document),function(e,t){"use strict";Optin.Mixins.add_services_mixin("mailchimp",function(i){return new Optin.Provider({id:"mailchimp",provider_args:{email_list:"#optin_email_list"},errors:{email_list:{name:"optin_email_list",message:optin_vars.messages.infusionsoft.enter_account_name,iconClass:"dashicons-warning-account_name"}},render_in_previewr:function(e){var t=e.$el?e.$el:e;if(!Optin.step.services.provider_args.isEmpty()&&"mailchimp"===Optin.step.services.model.get("optin_provider")){var i=Optin.template("optin-"+Optin.step.services.model.get("optin_provider")+"-args"),s=Optin.step.services.provider_args.toJSON();s.cta_button=Optin.step.design.model.get("cta_button"),t.find(".wpoi-provider-args").html(i(s))}},init:function(){var s=i,n=s.$("#hustle_service_details_form"),o=e("#wpoi-mailchimp-prev-group-args"),a=function(t){var i=e(t.target),s=e(".wpoi-list-groups"),a=e(".wpoi-list-group-interests-wrap"),l=_.reduce(n.serializeArray(),function(e,t){return e[t.name]=t.value,e},{});l.action="hustle_mailchimp_get_list_groups",l._ajax_nonce=i.data("nonce"),Optin.step.services.provider_args.clear({silent:!0}),a.empty(),o.empty(),e.get(ajaxurl,l).done(function(t){t&&(t.success?(s.html(t.data),s.find("select").wpmuiSelect(),e(".mailchimp_optin_load_more_lists").show()):(e(".mailchimp_optin_load_more_lists").hide(),s.empty()))})},l=function(t){var i=e(".wpoi-list-group-interests-wrap"),s=e(t.target),o=_.reduce(n.serializeArray(),function(e,t){return e[t.name]=t.value,e},{});return["-1","0"].indexOf(t.target.value)!==-1?void i.empty():(o._ajax_nonce=s.data("nonce"),o.action="hustle_mailchimp_get_group_interests",void e.get(ajaxurl,o).done(function(e){if(e&&e.success&&(i.html(e.data.html),Optin.step.services.provider_args.set("group",e.data.group),i.find("select").wpmuiSelect(),e.data.group&&e.data.group.groups&&_.isArray(e.data.group.groups))){Optin.step.services.provider_args.get("group")}e&&!e.success&&i.empty()}).fail(function(e){}))},r=function(t){var i,s=e(t.target);(s.is(":radio")||s.is("select"))&&(i=s.val()),s.is(":checkbox")&&(i=[],e("[name='"+t.target.name+"'").filter(":checked").each(function(){i.push(this.value)})),Optin.step.services.provider_args.set("group",_.extend({},Optin.step.services.provider_args.get("group"),{selected:i}))},c=function(t){t.preventDefault(),e("[name='mailchimp_groups_interests']").prop("checked",!1),Optin.step.services.provider_args.set("group",_.extend({},Optin.step.services.provider_args.get("group"),{selected:[]}))},d=function(t){var i=e(t.target),s=i.closest("form"),n=e(".wpoi-box"),o=s.serialize(),a=e("#optin_new_provider_account_options");e("#wpoi-mailchimp-prev-group-args").empty(),a.html(e("#wpoi_loading_indicator").html()),o+="&action=refresh_provider_account_details&load_more=true",o+="&optin=mailchimp",n.find("*").attr("disabled",!0),Optin.step.services.provider_args.clear({silent:!0}),Optin.step.services.model.set("optin_mail_list","none"),e.post(ajaxurl,o,function(t){n.find("*").attr("disabled",!1),t.success===!0?t.data.redirect_to?window.location.href=t.data.redirect_to:(t.data?a.html(t.data):a.html(optin_vars.messages.something_went_wrong),e(".mailchimp_optin_email_list").wpmuiSelect()):t.data?a.html(t.data):a.html(optin_vars.messages.something_went_wrong)}).fail(function(e){a.html(optin_vars.messages.something_went_wrong)})};e(t).on("change","#optin_email_list.mailchimp_optin_email_list",a),e(t).on("change","#mailchimp_groups",l),e(t).on("change","[name='mailchimp_groups_interests'], [name='mailchimp_groups_interests[]']",r),e(t).on("click",".wpoi-leave-group-intrests-blank-radios",c),e(t).on("click",".mailchimp_optin_load_more_lists",d),Optin.Events.on("design:preview:render:finish",e.proxy(this,"render_in_previewr"))}})})}(jQuery,document),function(e){"use strict";Optin.Mixins.add_services_mixin("mautic",function(){return new Optin.Provider({id:"mautic",provider_args:{url:"#optin_url",username:"#optin_username",password:"#optin_password"},errors:{url:{name:"optin_url",message:optin_vars.messages.mautic.enter_url,iconClass:"dashicons-warning-url"},username:{name:"optin_username",message:optin_vars.messages.mautic.username,iconClass:""},password:{name:"optin_password",message:optin_vars.messages.mautic.password,iconClass:""}}})})}(jQuery,document),function(e){"use strict";var t=["getresponse","campaignmonitor","aweber"];_.each(t,function(e){Optin.Mixins.add_services_mixin(e,function(){return new Optin.Provider({id:e})})})}(jQuery,document),function(e,t){"use strict";Optin.Mixins.add_services_mixin("sendinblue",function(i){return new Optin.Provider({id:"sendinblue",provider_args:{email_list:"#optin_email_list"},errors:{email_list:{name:"optin_email_list",message:optin_vars.messages.infusionsoft.enter_account_name,iconClass:"dashicons-warning-account_name"}},init:function(){var i=function(t){var i=e(t.target),s=i.closest("form"),n=e("#wpoi-wizard-services"),o=s.serialize(),a=e("#optin_new_provider_account_options");e("#wpoi-sendinblue-prev-group-args").empty(),a.html(e("#wpoi_loading_indicator").html()),o+="&action=refresh_provider_account_details&load_more=true",o+="&optin=sendinblue",n.find("input,select,button").attr("disabled",!0),Optin.step.services.provider_args.clear({silent:!0}),Optin.step.services.model.set("optin_mail_list","none"),e.post(ajaxurl,o,function(t){n.find("input,select,button").attr("disabled",!1),t.success===!0?t.data.redirect_to?window.location.href=t.data.redirect_to:(t.data?a.html(t.data):a.html(optin_vars.messages.something_went_wrong),e(".sendinblue_optin_email_list").wpmuiSelect()):t.data?a.html(t.data):a.html(optin_vars.messages.something_went_wrong)}).fail(function(e){a.html(optin_vars.messages.something_went_wrong)})};e(t).on("click",".sendinblue_optin_load_more_lists",i)}})})}(jQuery,document),function(e){"use strict";Optin.Mixins.add_services_mixin("sendy",function(){return new Optin.Provider({id:"sendy",provider_args:{installation_url:"#optin_sendy_installation_url"},errors:{installation_url:{name:"optin_sendy_installation_url",message:optin_vars.messages.sendy.enter_url,iconClass:"dashicons-warning-url"}}})})}(jQuery,document),Hustle.define("Optin.Wizard",function(e){"use strict";return Backbone.View.extend({el:"#wpoi-wizard",events:{"click .next-button button.wph-button-save":"save","click .next-button button.wph-button-next":"save","click .next-button button.wph-button-finish":"save","click .wph-toggletabs--title.can-open":"toggle_section","click .js-wph-optin-cancel":"cancel","click .js-wph-optin-back":"back"},toggle_section:function(t){var i=this.$(t.target),s=i.closest(".wph-toggletabs");e(".wph-toggletabs").not(s).removeClass("wph-toggletabs--open"),s.toggleClass("wph-toggletabs--closed wph-toggletabs--open")},validate:function(){var e=0;return this.$("#optin_new_name").val()||e++,this.$("#optin_new_provider_name").val()||this.$("#wpoi-test-mode-setup").is(":checked")||this.$("#wpoi-save-to-local").is(":checked")||e++,e},save:function(t){t.preventDefault(),Hustle.Events.trigger("Optin.save");var i=Optin.step.services.errors,s=this,n=this.$(t.target).closest("button"),o=n.data("nonce"),a=Optin.step.services.model.get("optin_id")||-1,l=a==-1;this.validate()>0||i>0||(n.attr("disabled",!0),n.hasClass("wph-button-next")||n.hasClass("wph-button-finish")?n.addClass("wph-button-next--loading"):n.addClass("wph-button-save--loading"),n.siblings().attr("disabled",!0),e.ajax({type:"POST",url:ajaxurl,data:{action:"inc_opt_save_new",id:a,_ajax_nonce:o,optin:Optin.step.services.model.toJSON(),design:Optin.step.design.model.toJSON(),settings:Optin.step.display.model.toJSON(),provider_args:Optin.step.services.provider_args.toJSON()},complete:function(){Optin.hasChanges=!1,n.attr("disabled",!1).removeClass("wph-button-next--loading").removeClass("wph-button-save--loading"),n.siblings().attr("disabled",!1),n.hasClass("wph-button-next")&&s.next(t),n.hasClass("wph-button-finish")&&s.finish_setup(t)},success:function(e){if(e.success){Optin.step.services.model.set("optin_id",e.data),Optin.hasChanges=!1;var t=window.location.pathname+window.location.search;l&&t.indexOf("&optin=")===-1&&(t+="&optin="+e.data,window.history.replaceState({},"",t))}}}))},next:function(t){var i=this.$(t.target),s=i.closest(".wph-toggletabs"),n=s.nextAll(".wph-toggletabs");if(n.length){var o=n.eq(0);return s.removeClass("wph-toggletabs--open").addClass("wph-toggletabs--closed"),o.addClass("wph-toggletabs--open"),void e("html, body").animate({scrollTop:o.offset().top},700)}},cancel:function(e){e.preventDefault(),window.onbeforeunload=null,window.location.replace("?page=inc_optin_listing")},finish_setup:function(e){e.preventDefault();var t=Optin.step.services.model.get("optin_id")||-1,i=t==-1;window.onbeforeunload=null;var s="?page=inc_optin_listing";s+=i?"&optin="+t:"&optin_updated="+t,window.location.replace(s)},back:function(t){t.preventDefault();var i=this.$(t.target),s=i.closest(".wph-toggletabs"),n=s.prevAll(".wph-toggletabs"),o=n.first();s.removeClass("wph-toggletabs--open"),o.addClass("wph-toggletabs--open"),e("html, body").animate({scrollTop:o.offset().top},700)}})}),Hustle.define("Optin.Email_Services_Tab",function(e){"use strict";return Hustle.View.extend(_.extend({},Hustle.get("Mixins.Model_Updater"),{template:Hustle.template("wpoi-wizard-services_template"),el:"#wpoi-wizard-services",events:{"click .next-button button":"validate","change #optin_new_provider_name":"provider_change","click .optin_refresh_provider_details":"refresh_provider_details"},fields:{name:"#optin_new_name",provider:"#optin_new_provider_name",api_key:"#optin_api_key",mail_list:"#optin_email_list",test_mode:"#wpoi-test-mode-setup",save_to_local:"#wpoi-save-to-local"},init:function(t){return this.render(),this.provider_args=t.provider_args,this.$details_placeholder=e("#optin_new_provider_account_details"),this.$options_placeholder=e("#optin_new_provider_account_options"),this.params=this.get_params(),"undefined"!=typeof this.params.code&&window.setTimeout(function(){e("#optin_new_provider_name").trigger("change")},750),_.each(Optin.Mixins.get_services_mixins(),function(e,t){e&&"function"==typeof e&&(this[t]=e(this))},this),this.listenTo(this.model,"change:test_mode",this.toggle_optin_provider_settings),this.listenTo(this.model,"change:optin_name",this.set_shortcode_id),this},render:function(){return this.$el.html(this.template(this.model.toJSON())),this.toggle_optin_provider_settings(),this},toggle_optin_provider_settings:function(){this.$(".wph-label--notice").toggleClass("hidden",_.isFalse(this.model.get("test_mode"))),this.$(".wph-label--notice").siblings().toggleClass("hidden",_.isTrue(this.model.get("test_mode"))),this.$("#optin_new_provider_name").prop("disabled",_.isTrue(this.model.get("test_mode")))},update_model:function(t){t&&t.preventDefault();e(".optwiz-container");Optin.step.model=Optin.step.model||new Optin.Model(optin_vars.current.data),Optin.step.model.set("optin_name",this.$(this.fields.name).val()),Optin.step.model.set("optin_provider",this.$(this.fields.provider).val()),this.$(this.fields.api_key)&&Optin.step.model.set("api_key",this.$(this.fields.api_key).val()),this.$(this.fields.mail_list).length&&Optin.step.model.set("optin_mail_list",this.$(this.fields.mail_list).val()),Optin.step.model.set("test_mode",this.$(this.fields.test_mode).is(":checked")?1:0),Optin.step.model.set("save_to_local",this.$(this.fields.save_to_local).is(":checked")?1:0),this.toggle_optin_provider_settings()},set_shortcode_id:function(){var e=_.isEmpty(Optin.step.model.get("optin_name"))?"":Optin.step.model.get("optin_name").toString().toLowerCase().trim().replace(/\s+/g,"-");Optin.step.display.model.set("shortcode_id",e)},validate:function(t){void 0!==t&&t.preventDefault(),Optin.Events.trigger("services:validate:before"),this.update_model(),Optin.step.services.errors=0;var i=Optin.step.model.validate_first_step(),s=this.$("#optin_new_provider_name").val();if(s&&this[s]&&"function"==typeof this[s].validate){var n=this[s].validate.call(this,i);i=_(i._wrapped.concat(n._wrapped))}if(!i.size()||this.$(this.fields.test_mode).is(":checked")&&!_.isEmpty(this.$(this.fields.name).val())||this.$(this.fields.save_to_local).is(":checked")&&!_.isEmpty(this.$(this.fields.name).val()))void 0!==t&&Optin.router.navigate("design",!0);else{var o=this;this.$el.find("span.dashicons-warning").remove(),i.each(function(t,i){var s=e('<span class="dashicons dashicons-warning"></span>'),n=o.$(o.fields[t.name]);n.length&&(s.attr("title",t.message),n.hasClass("wdev-styled")?n.closest(".select-container").addClass("wpoi-error"):n.addClass("wpoi-error"),n.closest(".select-container").length?n.closest(".select-container").before(s):n.after(s))})}Optin.Events.trigger("services:validate:after")},get_params:function(){var e=location.search,t="&";return _.chain(e.slice(1).split(t)).map(function(e){if(e)return e.split("=")}).compact().object().value()},provider_change:function(t){var i=this,s=e(t.currentTarget).val(),n=e("#wpoi-email-provider-details-container");return s?(n.show(),this.$details_placeholder.html(""),this.$options_placeholder.html(""),this.remove_prev_provider_args(),void e.ajax({url:ajaxurl,type:"get",async:!0,data:{action:"render_provider_account_options",provider_id:t.target.value,_ajax_nonce:e(t.target).data("nonce"),optin:i.model.get("optin_id")},success:function(s){if(s.success===!0)i.$details_placeholder.html(s.data),"constantcontact"==t.target.value&&"undefined"!=typeof i.params.code&&(e("#optin_api_key").val(i.params.code),e(".optin_refresh_provider_details").trigger("click")),i.delegateEvents(),Hustle.Events.trigger("view.rendered",i);else{var n="";s.data&&_.isArray(s.data)&&(n=s.data.join(", ")),i.$details_placeholder.html(n)}}})):void n.hide()},refresh_provider_details:function(t){var i=this,s=this.$(t.target),n=s.closest("form"),o=this.$(".wpoi-box"),a=n.serialize(),l=s.closest("#wpoi-get-lists").find("input"),r=this.$("#optin_new_provider_account_options");return _.isEmpty(l.val())?t.preventDefault():(this.remove_prev_provider_args(),r.html(this.$("#wpoi_loading_indicator").html()),a+="&action=refresh_provider_account_details","undefined"!=typeof i.model.attributes.optin_id&&(a+="&optin="+i.model.attributes.optin_id),o.find("input,select,button").attr("disabled",!0),Optin.step.services.provider_args.clear({silent:!0}),Optin.step.services.model.set("optin_mail_list","none"),void e.post(ajaxurl,a,function(e){o.find("input,select,button").attr("disabled",!1),e.success===!0?e.data.redirect_to?window.location.href=e.data.redirect_to:(e.data?r.html(e.data):r.html(optin_vars.messages.something_went_wrong),i.$("select").wpmuiSelect()):e.data?r.html(e.data):r.html(optin_vars.messages.something_went_wrong)}).fail(function(e){r.html(optin_vars.messages.something_went_wrong)}))},remove_prev_provider_args:function(){var t=e("#wpoi-mailchimp-prev-group-args");t.empty()}}))}),Hustle.define("Optin.Design_Tab",function(e){"use strict";var t=Hustle.View.extend({template:Hustle.template("wpoi-module-field"),tagName:"tr",options:{},controller:!1,events:{"change [name]":"updateOptions","click .wph-column-icon":"removeModule"},initialize:function(e){this.options=e.options,this.controller=e.controller,this.field_container=this.controller.$("tbody"),this.render()},render:function(){this.$el.html(this.template(this.options)).attr("data-index",this.options.index),this.$el.appendTo("#wpoi-module-fields");var e=this,t={items:"tr",containment:this.controller.$(".wph-table--module_fields table"),stop:function(t,i){e.reOrderFields()}};this.field_container.sortable(t).disableSelection()},reOrderFields:function(){var t=this,i=[];this.field_container.find("tr").each(function(s){var n=e(this),o=n.data("index"),a=t.controller.module_fields[o];a.index=s,i[s]=a,n.data("index",s)}),this.controller.module_fields=i,this.controller.model.set("module_fields",i)},updateOptions:function(t){var i=e(t.currentTarget),s=i.attr("name"),n=i.val(),o=Optin.step.services.model.get("optin_provider");return"required"===s&&(n=i.is(":checked")),this.options[s]=n,o&&optin_vars.providers[o]&&_.contains(["name","label"],s)?void Optin.Events.trigger("optin:update_module_field_"+o,this.options,this,this.controller.optin.toJSON().optin_id):void this._updateOptions()},_updateOptions:function(){this.controller.module_fields[this.options.index]=this.options,this.controller.model.set("module_fields",this.controller.module_fields)},removeModule:function(){var e=this,t=0;this.controller.module_fields=_.filter(this.controller.module_fields,function(i){if(i.name!=e.options.name)return i.index=t,t++,i}),this.controller.model.set("module_fields",this.controller.module_fields),this.remove()}});return Hustle.View.extend(_.extend({},Hustle.get("Mixins.Model_Updater"),{template:Hustle.template("wpoi-wizard-design_template"),message_editor:!1,success_editor:!1,structure_tpl:Hustle.template("wpoi-wizard-design_structure_template"),module_fields_tpl:Hustle.template("wpoi-wizard-design_module_fields_template"),shapes_tpl:Hustle.template("wpoi-wizard-design_shapes_template"),after_submit_tpl:Hustle.template("wpoi-wizard-design_after_submit_template"),color_pickers_tpl:Hustle.template("optin-color-pickers"),el:"#wpoi-wizard-design",preview:!1,preview_model:!1,defaults:{optin_input_icons:""},module_index:0,stylable_elements:{main_background:".wpoi-hustle .wpoi-optin",title_color:".wpoi-hustle h2.wpoi-title",link_color:".wpoi-hustle .wpoi-message p a",content_color:".wpoi-hustle .wpoi-message, .wpoi-hustle .wpoi-message p",link_hover_color:".wpoi-hustle .wpoi-message p a:hover",link_active_color:".wpoi-hustle .wpoi-message p a:active, .wpoi-hustle .wpoi-message p a:focus",form_background:".wpoi-hustle .wpoi-form",fields_background:".wpoi-hustle form .wpoi-element",fields_hover_background:".wpoi-hustle form .wpoi-element:hover",fields_active_background:".wpoi-hustle form .wpoi-element:active, .wpoi-hustle form .wpoi-element:focus",label_color:".wpoi-hustle form .wpoi-element label, .wpoi-hustle form .wpoi-element label span, .wpoi-hustle form .wpoi-element .wphi-font",button_background:".wpoi-hustle form button",button_label:".wpoi-hustle form button",fields_color:".wpoi-hustle form > .wpoi-element input",fields_hover_color:".wpoi-hustle form > .wpoi-element input:hover",fields_active_color:".wpoi-hustle form > .wpoi-element input:active, .wpoi-hustle form > .wpoi-element input:focus",error_color:".wpoi-hustle form .i-error, .wpoi-hustle form .i-error + span",button_hover_background:".wpoi-hustle form button:hover",button_active_background:".wpoi-hustle form button:active, .wpoi-hustle form button:focus",button_hover_label:".wpoi-hustle form button:hover",button_active_label:".wpoi-hustle form button:active, .wpoi-hustle form button:focus",checkmark_color:".wpoi-hustle .wpoi-success-message .wphi-font",success_color:".wpoi-hustle .wpoi-success-message .wpoi-content, .wpoi-hustle .wpoi-success-message .wpoi-content p",close_color:"a.inc-opt-close-btn, a.inc-opt-close-btn:visited",nsa_color:".wpoi-nsa > a, .wpoi-nsa > a.inc_opt_never_see_again",overlay_background:".wpoi-popup-overlay",close_hover_color:"a.inc-opt-close-btn:hover",nsa_hover_color:".wpoi-nsa > a:hover, .wpoi-nsa > a.inc_opt_never_see_again:hover",nsa_active_color:".wpoi-nsa > a:active, .wpoi-nsa > a.inc_opt_never_see_again:active, .wpoi-nsa > a:focus, .wpoi-nsa > a.inc_opt_never_see_again:focus",radio_background:'.wpoi-hustle form .wpoi-mcg-option input[type="radio"] + label:before',radio_checked_background:'.wpoi-hustle form .wpoi-mcg-option input[type="radio"]:checked + label:after',checkbox_background:'.wpoi-hustle form .wpoi-mcg-option input[type="checkbox"] + label:before',checkbox_checked_color:'.wpoi-hustle form .wpoi-mcg-option input[type="checkbox"]:checked + label:before',mcg_title_color:".wpoi-hustle form .wpoi-mcg-list-name, .wpoi-hustle .wpoi-submit-failure",mcg_label_color:'.wpoi-hustle form .wpoi-mcg-option input[type="checkbox"] + label, .wpoi-hustle form .wpoi-mcg-option input[type="radio"] + label',close_active_color:"a.inc-opt-close-btn:active, a.inc-opt-close-btn:focus"},events:{"click .wph-preview--eye":"open_preview","change #optin_color_palettes":"update_color_palette","submit form.wpoi-form-wrap":"cancel_dummy_optin_submit","change #optin-active-css":"toggleCustomCSS","click #optin_apply_custom_css":"apply_custom_css","click .wph-triggers--options label":"handle_triggers","mouseenter .wpoi-stylable-element":"highlight_stylable_element","mouseleave .wpoi-stylable-element":"highlight_stylable_element","click .wpoi-stylable-element":"insert_stylable_element","change #optin_fname":"update_optional_elements","change #optin_lname":"update_optional_elements","change #optin_customize_color_palette":"_toggleColorScheme",'change [name="on_success"]':"updateMeta",'change [name="on_success_time"]':"updateMeta",'change [name="on_success_unit"]':"updateMeta","change .wysiwyg-tab":"toggleSuccessMessageFields","click .add-new-module-field":"newModuleField","click .wph-cancel-add-field":"cancelAddField","click .wph-add-new-field":"addNewField",'keyup [data-name="label"]':"removeWarningIcons",'keyup [data-name="name"]':"removeWarningIcons"},stylables:{".wpoi-hustle .wpoi-optin ":"Opt-in Container",".wpoi-title ":"Title",".wpoi-message, .wpoi-message p ":"Content",".wpoi-form ":"Form Container",".wpoi-form .wpoi-subscribe-fname ":"First Name",".wpoi-form .wpoi-subscribe-lname ":"Last Name",".wpoi-form .wpoi-subscribe-email ":"Email",".wpoi-form .wpoi-subscribe-send ":"Form Button"},init:function(e){return this.optin=e.optin,this.listenTo(this.model,"change",this.render_structure),this.listenTo(this.model,"change:colors.customize",this.render_color_pickers),this.listenTo(this.model,"change:borders.fields_style",this.render_shapes),this.listenTo(this.model,"change:on_submit",this.render_on_submit),this.listenTo(this.model,"change:image_style",this.update_image_style),this.listenTo(this.model,"change:image_src",this.update_image_style),this.listenTo(this.model,"change:form_location",this.set_proper_image_location),this.listenTo(Hustle.Events,"Optin.save",this.sync_model_data),this.listenTo(Hustle.Events,"Optin.preview.changed.type",this.preview_type_changed),this.render()},render:function(){this.$el.html(this.template(_.extend({},{palettes:Palettes.toJSON()},{stylables:this.stylables},this.optin.toJSON(),this.model.toJSON()))),this.render_structure(),this.render_module_fields(),this.render_shapes(),this.render_on_submit(),this.create_editors(),this.update_styles(),this.update_borders_style(),this.render_color_pickers(),this.render_image_holder(),this.update_image_style(),this.apply_custom_css()},render_structure:function(){this.$("#wph-optin--structure").html(this.structure_tpl(this.model.toJSON()))},render_module_fields:function(){this.$("#wph-optin--module-fields").html(this.module_fields_tpl(this.model.toJSON())),this.module_fields=this.model.get("module_fields"),this.module_fields||(this.module_fields=optin_vars.module_fields),_.each(this.module_fields,function(e){e.index=this.module_index;new t({options:e,controller:this});this.module_index+=1},this)},handle_triggers:function(t){var i=e(t.target),s=i.closest("li"),n=s.siblings();n.removeClass("current"),s.addClass("current")},render_shapes:function(){var e=this.model.toJSON();e.wph_disabled="","joined"===this.model.get("borders.fields_style")&&(e.wph_disabled="disabled"),this.$("#wph-optin--shapes").html(this.shapes_tpl(e)),Hustle.Events.trigger("view.rendered",this.$("#wph-optin--shapes")),this.create_color_pickers()},render_on_submit:function(){"success_message"==this.model.get("on_submit")?this.$("label[for='wpoi-sm']").show():(this.$("label[for='wpoi-sm']").hide(),this.$("label[for='wpoi-om']").click())},update_image_style:function(){var e=this.model.get("image_src"),t=this.model.get("image_style"),i=this.$(".wph-media--holder .wph-media--preview");e.trim()&&i.length&&i.css("background-size",t)},create_color_pickers:function(){this.$(".optin_color_picker").not(".wp-color-picker").wpColorPicker({change:function(t,i){var s=e(this);s.val(i.color.toCSS()).trigger("change")}})},render_image_holder:function(){var e=Hustle.get("Media_Holder");this.media_holder=new e({model:this.model,attribute:"image_src"}),this.$(".wph-media--holder").html(this.media_holder.$el)},cancel_dummy_optin_submit:function(e){e.preventDefault()},update_color_palette:function(e){var t=Palettes.findWhere({_id:e.target.value}),i=(this.model.get("colors").toJSON(),Hustle.get("Models.M"));this.model.set("colors",new i(_.extend({},t.toJSON(),{palette:e.target.value}))),this.$("#optin_customize_color_palette").prop("checked",!1),this.render_color_pickers()},render_color_pickers:function(){var e=this.$("#optwiz-custom_color");_.isTrue(this.model.get("colors.customize"))?e.html(this.color_pickers_tpl(this.model.toJSON())).removeClass("hidden"):e.addClass("hidden"),this.create_color_pickers()},_fix_layout_3_sizes:function(){e(".wpoi-layout-three .wpoi-optin:not(.wpoi-small) .nocontent:not(.noimage)").each(function(){var t=e(this),i=t.find(".wpoi-aside-x").prev(".wpoi-element"),s=t.find(".wpoi-aside-x").prev(".wpoi-element").find(".wpoi-container.wpoi-col");s.css("height",i.height())}),e(".wpoi-layout-three .wpoi-optin:not(.wpoi-small) > .wpoi-container.noimage:not(.nocontent)").each(function(){var t=e(this),i=t.find(".wpoi-aside-x"),s=t.find(".wpoi-image").next(".wpoi-element"),n=i.prev(".wpoi-element"),o=t.find(".wpoi-content"),a=n.find(".wpoi-col"),l=t.find("form");l.height()>o.height()&&(a.css("height",i.height()+"px"),s.addClass("wpoi-align"),o.addClass("wpoi-align-element")),l.height()<o.height()&&(i.css("height",n.height()+"px"),i.addClass("wpoi-align"),l.addClass("wpoi-align-element"))}),e(".wpoi-layout-three .wpoi-optin:not(.wpoi-small) > .wpoi-container:not(.noimage):not(.nocontent)").each(function(){var t=e(this),i=t.find(".wpoi-aside-x"),s=i.prev(".wpoi-element"),n=t.find("form");n.height()<s.height()&&(i.css("height",s.height()),i.addClass("wpoi-align"),n.addClass("wpoi-align-element"))})},create_editors:function(){this._bind_to_message_editor(),this._create_css_editor()},highlight_stylable_element:function(t){var i=e(t.target),s=e(i.data("stylable"));s.toggleClass("optin_hovered_stylable_element");
|
6 |
+
},insert_stylable_element:function(t){t.preventDefault();var i=e(t.target),s=i.data("stylable")+"{}";this.css_editor.navigateFileEnd(),this.css_editor.insert(s),this.css_editor.navigateLeft(1),this.css_editor.focus()},apply_proper_preview_classes:function(){e(".wpoi-hustle").each(function(){e(this).width()<=405?e(this).find(".wpoi-optin").addClass("wpoi-small"):e(this).find(".wpoi-optin").removeClass("wpoi-small"),e(this).width()<=585&&e(this).width()>405?e(this).find(".wpoi-optin").addClass("wpoi-medium"):e(this).find(".wpoi-optin").removeClass("wpoi-medium")}),e(".wpoi-layout-three .wpoi-optin:not(.wpoi-small) .wpoi-form").each(function(){e(this).height()>168?(e(this).addClass("wpoi-align"),e(this).next("form").addClass("wpoi-align-element")):(e(this).removeClass("wpoi-align"),e(this).next("form").removeClass("wpoi-align-element"))}),e(".wpoi-mcg-select").each(function(){e(this).parent(".wpoi-provider-args > .wpoi-container > .wpoi-element:nth-child(2) > .wpoi-container > .wpoi-element").css({padding:"0",background:"transparent"})}),e(".wpoi-layout-three .wpoi-optin:not(.wpoi-small) .nocontent:not(.noimage)").each(function(){var t=e(this),i=t.find(".wpoi-aside-x").prev(".wpoi-element"),s=t.find(".wpoi-aside-x").prev(".wpoi-element").find(".wpoi-container.wpoi-col");s.css("height",i.height())}),e(".wpoi-layout-three .wpoi-optin:not(.wpoi-small) > .wpoi-container.noimage:not(.nocontent)").each(function(){var t=e(this),i=t.find(".wpoi-aside-x"),s=t.find(".wpoi-image").next(".wpoi-element"),n=i.prev(".wpoi-element"),o=t.find(".wpoi-content"),a=n.find(".wpoi-col"),l=t.find("form");l.height()>o.height()&&(a.css("height",i.height()+"px"),s.addClass("wpoi-align"),o.addClass("wpoi-align-element")),l.height()<o.height()&&(i.css("height",n.height()+"px"),i.addClass("wpoi-align"),l.addClass("wpoi-align-element"))}),e(".wpoi-layout-three .wpoi-optin:not(.wpoi-small) > .wpoi-container:not(.noimage):not(.nocontent)").each(function(){var t=e(this),i=t.find(".wpoi-aside-x"),s=i.prev(".wpoi-element"),n=t.find("form");n.height()<s.height()&&(i.css("height",s.height()),i.addClass("wpoi-align"),n.addClass("wpoi-align-element"))}),e(".wpoi-layout-three .wpoi-optin:not(.wpoi-small)").each(function(){for(var t=e(this),i=t.find("form > .wpoi-element:not(.wpoi-provider-args)"),s=0;s<i.length;s+=2)i.slice(s,s+2).wrapAll('<div class="wpoi-element" style="background-color: transparent;"><div class="wpoi-container"></div></div>')}),e(".wpoi-layout-four .wpoi-optin:not(.wpoi-small)").each(function(){for(var t=e(this),i=t.find("form > .wpoi-element:not(.wpoi-provider-args)"),s=0;s<i.length;s+=2)i.slice(s,s+2).wrapAll('<div class="wpoi-element" style="background-color: transparent;"><div class="wpoi-container"></div></div>')}),e(".wpoi-layout-four .wpoi-optin:not(.wpoi-small) > .wpoi-container.noimage:not(.nocontent)").each(function(){var t=e(this),i=t.find(".wpoi-aside-xl"),s=t.find(".wpoi-aside-xl > .wpoi-container"),n=i.find(".wpoi-form"),o=i.find("form"),a=i.next(".wpoi-element"),l=a.find(".wpoi-content");l.height()>o.height()&&(s.css("height",i.height()+"px"),n.addClass("wpoi-align"),o.addClass("wpoi-align-element")),l.height()<o.height()&&(a.css("height",s.height()+"px"),a.addClass("wpoi-align"),l.addClass("wpoi-align-element"))}),e(".wpoi-layout-four .wpoi-optin:not(.wpoi-small) > .wpoi-container:not(.noimage):not(.nocontent)").each(function(){var t=e(this),i=t.find(".wpoi-aside-xl"),s=t.find(".wpoi-aside-xl > .wpoi-container"),n=t.find(".wpoi-image"),o=i.find(".wpoi-form"),a=i.find("form"),l=i.next(".wpoi-element"),r=t.find(".wpoi-content");r.height()>s.height()&&(s.css("height",i.height()+"px"),o.css("height",s.height()-n.height()),o.addClass("wpoi-align"),a.addClass("wpoi-align-element")),r.height()<s.height()&&(l.css("height",i.height()+"px"),l.addClass("wpoi-align"),r.addClass("wpoi-align-element"))})},_bind_to_message_editor:function(){var e=this,t=setInterval(function(){"object"==typeof tinymce&&(clearInterval(t),tinymce.on("AddEditor",function(t){var i=function(){t&&"optin_message"===t.editor.getParam("id")&&e.optin.set("optin_message",this.getContent()),t&&"success_message"===t.editor.getParam("id")&&e.model.set("success_message",this.getContent()),e.apply_proper_preview_classes()};t&&"optin_message"===t.editor.getParam("id")&&(e.message_editor=t.editor),t&&"success_message"===t.editor.getParam("id")&&(e.success_editor=t.editor),t.editor.on("loadContent",function(e){this.dom.setStyle("tinymce","maxWidth","100%")}),Optin.Events.off("navigate",e.refresh_editor,e),Optin.Events.on("navigate",e.refresh_editor,e),e.on("rendered",e.refresh_editor,e),t.editor.on("change",i),t.editor.on("AddUndo",i),t.editor.on("keyup",i),e.apply_proper_preview_classes()}))},50)},refresh_editor:function(t,i){"design"===i&&_.isObject(this.message_editor)&&(this.message_editor.remove(),tinymce.init(this.message_editor.settings),e(this.message_editor.settings.selector+"_ifr").height(240),this.success_editor.remove(),tinymce.init(this.success_editor.settings),e(this.success_editor.settings.selector+"_ifr").height(240))},_create_css_editor:function(){this.css_editor=ace.edit("optin_custom_css"),this.css_editor.getSession().setMode("ace/mode/css"),this.css_editor.setTheme("ace/theme/solarized_light"),this.css_editor.getSession().setUseWrapMode(!0),this.css_editor.getSession().setUseWorker(!1),this.css_editor.setShowPrintMargin(!1),this.css_editor.renderer.setShowGutter(!0),this.css_editor.setHighlightActiveLine(!0),this.css_editor.on("blur",e.proxy(this.update_custom_css,this))},_create_color_pickers:function(){var e=this;this.$(".optin_color_picker").wpColorPicker({change:function(t,i){var s="update_"+this.id.replace("optin_","");"function"==typeof e[s]?e[s](t,i):console.warn("Method ",s," not found")}}),this.$(".ui-draggable-handle").click(function(e){e.preventDefault()})},update_custom_css:function(){this.model.set("css",this.css_editor.getValue())},_toggleColorScheme:function(){var t=e("#optin_color_palettes"),i=e("#optin_customize_color_palette");t.prop("disabled",i.is(":checked"))},toggleCustomCSS:function(t){var i=e(t.currentTarget),s=i.is(":checked"),n=this.$("#wph-css-holder");n[s?"removeClass":"addClass"]("hidden"),i.closest("label.wph-label--border").toggleClass("toggle-off")},apply_custom_css:function(t){t&&(t.preventDefault(),e(t.target).prop("disabled",!0)),this._toggleColorScheme(),this.update_custom_css();var i=e("#optin-custom-styles").length?e("#optin-custom-styles"):e('<style id="optin-custom-styles">').appendTo("body"),s=this.css_editor.getValue();e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"inc_opt_prepare_custom_css",css:s,_ajax_nonce:e("#optin_custom_css").data("nonce"),optin_id:optin_vars.current.data.optin_id},success:function(s){s&&s.success&&i.html(s.data),t&&e(t.target).prop("disabled",!1)},error:function(){t&&e(t.target).prop("disabled",!1)}})},get_layout_colors:function(){return _.isTrue(this.model.get("colors.customize"))?this.model.toJSON().colors:Palettes.findWhere({_id:this.model.get("colors.palette")}).toJSON()},update_styles:function(){var t=this.get_layout_colors(),i="",s=e("#optin-preview-styles").length?e("#optin-preview-styles"):e('<style id="optin-preview-styles">').appendTo("body");_.each(this.stylable_elements,function(e,s){var n=s.indexOf("background")!==-1?"background":"color",o=t[s];i+=e+"{ "+n+": "+o+";} "}),s.html(i)},update_borders_style:function(){var t=this.model.toJSON().borders,i=this.stylable_elements,s="",n=e("#optin-preview-styles-borders").length?e("#optin-preview-styles-borders"):e('<style id="optin-preview-styles-borders">').appendTo("body");s+=i.main_background+"{border-radius:"+t.corners_radius+"px;}","joined"===this.model.get("borders").get("fields_style")?(s+=i.fields_background+"{border-radius: 0px;}",s+=i.button_background+"{border-radius: 0px;}"):(s+=i.fields_background+"{border-radius:"+t.fields_corners_radius+"px;}",s+=i.button_background+"{border-radius:"+t.button_corners_radius+"px;}"),s+=i.main_background+"{box-shadow: 0 0 "+t.dropshadow_value+"px "+t.shadow_color+"}",n.html(s)},update_optional_elements:function(e){var t=this.model.get("elements");e.target.checked?(t.push(e.target.value),this.model.set("elements",t,{silent:!0})):this.model.set("elements",_.without(t,e.target.name),{silent:!0})},_show_args:function(){return"mailchimp"===Optin.step.services.model.get("optin_provider")&&!Optin.step.services.provider_args.isEmpty()&&"hidden"!==Optin.step.services.provider_args.get("group").form_field},set_proper_image_location:function(e){0!==e.get("form_location")&&e.set("image_location","left")},_set_preview_model:function(){var e=this.optin.toJSON(),t=function(){return!("mailchimp"!==e.optin_provider||!Optin.step.services.provider_args||!Optin.step.services.provider_args.get("group")||"hidden"===Optin.step.services.provider_args.get("group").form_field)},i=Optin.step.display.model.toJSON();return this.preview_model?void this.preview_model.set(_.extend({image_style:"",type:"popup"},this.model.toJSON(),this.model.get("borders").toJSON(),this.optin.toJSON(),{types:{after_content:i.after_content,popup:i.popup,slide_in:i.slide_in}},{has_args:t()})):void(this.preview_model=new Backbone.Model(_.extend({image_style:"",type:"popup"},this.model.toJSON(),this.model.get("borders").toJSON(),this.optin.toJSON(),{types:{after_content:i.after_content,popup:i.popup,slide_in:i.slide_in}},{has_args:t()})))},open_preview:function(e){if(Optin.Events.trigger("design:preview:render:start"),this.sync_model_data(),this._set_preview_model(),this.preview)this.preview.render(),this.preview.show();else{var t=Hustle.get("Optin.Preview");this.preview=new t({model:this.preview_model}),this.preview.show()}this._fix_layout_3_sizes(),this.update_styles(),this.update_borders_style(),this.apply_proper_preview_classes(),this.apply_custom_css()},preview_type_changed:function(){this._fix_layout_3_sizes(),this.update_styles(),this.update_borders_style(),this.apply_proper_preview_classes(),this.apply_custom_css()},sync_model_data:function(){var t=this.model.get("optin_title");t||(t=e("#optin_title").val()),this.optin.set("optin_title",t),"object"==typeof tinymce&&(this.message_editor||(this.message_editor=tinymce.get("optin_message")),this.optin.set("optin_message",this.message_editor.getContent()),this.success_editor||(this.success_editor=tinymce.get("success_message")),this.model.set("success_message",this.success_editor.getContent()))},updateMeta:function(t){var i=e(t.currentTarget),s=i.attr("name");this.model.set(s,i.val())},toggleSuccessMessageFields:function(t){var i=e(t.currentTarget),s="success_message"===i.val(),n=e("#wpoi-success-message-fields");n[s?"removeClass":"addClass"]("hidden")},newModuleField:function(t){var i=e(t.currentTarget);this.$("#wpoi-module-field-maker").removeClass("hidden");i.attr("disabled","disabled")},cancelAddField:function(){var t=this.$("#wpoi-module-field-maker").addClass("hidden");e(".dashicons-warning",t).remove(),e('[type="text"]',t).val(""),this.$(".add-new-module-field").attr("disabled",!1)},addNewField:function(){var t=this.$("[data-name]","#wpoi-module-field-maker").not(":disabled"),i={},s=0;if(_.each(t,function(t){t=e(t);var n=t.data("name"),o=t.val();if(_.contains(["label","name"],n)&&""===o.trim()){s++;var a=e('<span class="dashicons dashicons-warning"></span>');t.after(a),"label"===n&&a.attr("title",optin_vars.messages.module_fields.no_label),"name"===n&&a.attr("title",optin_vars.messages.module_fields.no_name)}"name"===n&&this.$('td.wph-column-name input[name="name"]').each(function(i){if(e(this).val()===o){s++;var n=e('<span class="dashicons dashicons-warning"></span>'),a=optin_vars.messages.module_fields.custom_field_already_exists.replace("{name}",o);t.after(n),n.attr("title",a)}}),"checkbox"===t.attr("type")?i[n]=t.is(":checked"):i[n]=t.val()},this),!(s>0)){this.removeWarningIcons();var n=Optin.step.services.model.get("optin_provider");return n&&optin_vars.providers[n]?(Optin.Events.trigger("optin:add_module_field_"+n,i,this,this.optin.toJSON().optin_id),!1):void this._add_module_field(i)}},_add_module_field:function(e){e.index=this.module_index++;new t({options:e,controller:this});this.module_fields.push(e),this.model.set("module_fields",this.module_fields),this.$(".wph-cancel-add-field").trigger("click")},removeWarningIcons:function(){this.$(".dashicons-warning","#wpoi-module-field-maker").remove()}}))}),function(e){"use strict";Optin.View.Display_Triggers=Backbone.View.extend(e.extend(!0,{},Optin.View.Template_Mixin,{template:Optin.template("wpoi-wizard-settings-triggers-template"),events:{"click .tabs-header label":"change_tab"},initialize:function(e){this.el=e.el,this.type=e.type,this.listenTo(this.model,"change:"+this.type+".trigger_on_adblock",this.hide_adblock_options_on_toggle),this.render()},render:function(){return this.$el.html(this.template(this.get_data())),this.hide_adblock_options_on_toggle(),this},get_data:function(){var e={};return e.type=this.type,e.shortcode_id=this.model.get("shortcode_id"),_.extend({},e,this.model.get(this.type).toJSON())},change_tab:function(e){e.preventDefault();var t=this.$(e.target),i=t.parent("li"),s=this.$(t.attr("href")),n=t.find("input[type='radio']");this.$(".tabs-header li").removeClass("current"),this.$(".tabs-content").removeClass("current"),i.addClass("current"),s.addClass("current"),n.prop("checked",!0),this.model.set(this.type+".appear_after",n.val())},hide_adblock_options_on_toggle:function(){_.isTrue(this.model.get(this.type+".trigger_on_adblock"))?this.$(".wpoi-popup-trigger-on-adblock-option").show():this.$(".wpoi-popup-trigger-on-adblock-option").hide()}}))}(jQuery),Hustle.define("Optin.Display_Tab",function(e){"use strict";return Hustle.View.extend(_.extend({},Hustle.get("Mixins.Model_Updater"),{template:Optin.template("wpoi-wizard-settings_template"),widget_message_tpl:Optin.template("wpoi-wizard-settings_widget_template"),el:"#wpoi-wizard-settings",events:{"click .next-button a.previous":"go_to_design","click .can-open.display-settings-icon span.open i.dev-icon":"toggle_boxes","change #wpoi-after-content-state-toggle":"optin_type_toggle","change #wpoi-popup-state-toggle":"optin_type_toggle","change #wpoi-slide-in-state-toggle":"optin_type_toggle"},init:function(){return this.listenTo(this.model,"change:after_content.animate",this.toggle_after_content_animation_select),this.listenTo(this.model,"change:popup.enabled",this.render),this.listenTo(this.model,"change:slide_in.enabled",this.render),this.listenTo(this.model,"change:after_content.enabled",this.render),this.listenTo(this.model,"change:slide_in.position",this.update_slide_in_position_label),this.listenTo(this.model,"change:shortcode_id",_.bind(this.render_widget_message,this)),this.render()},move_selects_under_selected_radio:function(e,t,i){var s=this.model.get(e),n="."+e.replace(".","_")+"_block",o=n+"_select_wrap",a=this.$(n).eq(1),l=this.$(o);a.length&&l.length&&(_.isTrue(s)?a.insertAfter(l):a.insertBefore(l))},render_widget_message:function(){var e=this.widget_message_tpl(this.model.toJSON());this.$("#wpoi-wizard-settings-widget-message").html(e)},render:function(){var t=Hustle.get("Settings.Conditions_View");this.popup_conditions_view=new t({model:this.model.get("popup.conditions"),type:"popup"}),this.slide_in_conditions_view=new t({model:this.model.get("slide_in.conditions"),type:"slide_in"}),this.after_content_conditions_view=new t({model:this.model.get("after_content.conditions"),type:"after_content"}),this.model.set("slide_in.position_label",optin_vars.messages.positions[this.model.get("slide_in.position")],{silent:!0}),this.$el.html(this.template(e.extend(!0,{},this.model.toJSON(),{popup:{condition_labels:this.popup_conditions_view.get_all_conditions_labels()},after_content:{condition_labels:this.after_content_conditions_view.get_all_conditions_labels()},slide_in:{condition_labels:this.slide_in_conditions_view.get_all_conditions_labels()}}))),this.render_widget_message(),this.popup_conditions_view.delegateEvents(),this.popup_conditions_view.on("toggle_condition",this.render_condition_labels),this.popup_conditions_view.on("change:update_view_label",this.render_condition_labels),this.$("#wph-optin--popup_conditions .wph-conditions").html(this.popup_conditions_view.$el),this.slide_in_conditions_view.delegateEvents(),this.slide_in_conditions_view.on("toggle_condition",this.render_condition_labels),this.slide_in_conditions_view.on("change:update_view_label",this.render_condition_labels),this.$("#wph-optin--slide_in_conditions .wph-conditions").html(this.slide_in_conditions_view.$el),this.after_content_conditions_view.delegateEvents(),this.after_content_conditions_view.on("toggle_condition",this.render_condition_labels),this.after_content_conditions_view.on("change:update_view_label",this.render_condition_labels),this.$("#wph-optin--after_content_conditions .wph-conditions").html(this.after_content_conditions_view.$el);new Optin.View.Display_Triggers({model:this.model,el:"#triggers-section-popup",type:"popup"}),new Optin.View.Display_Triggers({model:this.model,el:"#triggers-section-slide_in",type:"slide_in"});this.$el.find(".can-open.display-settings-icon span.open i.dev-icon").trigger("click")},optin_type_toggle:function(t){var i=e(t.target),s=i.closest(".wpoi-toggle-block"),n=s.find("p").first(),o=i.closest(".wpoi-listing-wrap").find("section");i.is(":checked")?(n.fadeOut(),s.removeClass("inactive")):(n.fadeIn(),s.addClass("inactive")),o.is(".closed")&&i.is(":checked")&&i.closest(".wpoi-toggle-mask").find("span.open i.dev-icon").trigger("click")},toggle_boxes:function(t){var i=e(t.target),s="dev-icon-caret_up",n="dev-icon-caret_down",o=i.hasClass(s)?s:n,a=o==s?n:s,l=i.closest(".wpoi-listing-wrap").find("section");i.switchClass(o,a),l.toggleClass("closed",o==n),l.toggle(a==n)},go_to_design:function(e){e.preventDefault(),Optin.router.navigate("design",!0)},toggle_after_content_animation_select:function(){_.isTrue(this.model.get("after_content.animate"))?this.$("#optin-afterc-animation-block").show(function(){e(this).removeClass("hidden")}):this.$("#optin-afterc-animation-block").hide(function(){e(this).addClass("hidden")})},update_slide_in_position_label:function(e){this.$("#wpoi-slide_in-position-label").text(optin_vars.messages.positions[this.model.get("slide_in.position")])},render_condition_labels:function(t){var i={after_content:e("#wph-after-content-condition-labels"),popup:e("#wph-popup-condition-labels"),slide_in:e("#wph-slide-in-condition-labels")};i[t.type]&&i[t.type].html(t.get_all_conditions_labels())}}))});var Inc_Opt_Router=Backbone.Router.extend({routes:{"":"services",services:"services",design:"design","display(/:optin_type)":"display"},route:function(e,t,i){var s=this;i||(i=this[t]);var n=function(){if(Optin.step.model||(Optin.step.model=new Optin.Model(optin_vars.current.data)),!parseInt(optin_vars.is_limited)){var e=Hustle.get("Optin.Email_Services_Tab");if(!Optin.step.services){var t=Hustle.get("Models.M");Optin.step.services=new e({model:Optin.step.model,provider_args:new t(optin_vars.current.provider_args)})}var n=Hustle.get("Optin.Design_Tab");Optin.step.design||(Optin.step.design=new n({model:new Optin.Models.Design_Model(optin_vars.current.design),optin:Optin.step.model}));var o=Hustle.get("Optin.Display_Tab");if(Optin.step.display||(Optin.step.display=new o({model:new Optin.Models.Settings_Model(optin_vars.current.settings)})),!Optin.step.wizard){var a=Hustle.get("Optin.Wizard");Optin.step.wizard=new a}}i.apply(s,arguments)};return Backbone.Router.prototype.route.call(this,e,t,n)},execute:function(e,t,i){var s=_.keys(this.routes).indexOf(i)-1;if(s==Optin.step.current)return Optin.router.navigate(_.keys(this.routes)[Optin.step.current+1],!1),!1;switch(Optin.step.current){case 0:var n=Optin.step.model.validate_first_step();if(n.size())return Optin.step.services.validate(),Optin.router.navigate(_.keys(this.routes)[Optin.step.current+1],!1),!1}Optin.Events.trigger("navigate",t,i),e&&e.apply(this,t)},services:function(){Optin.step.activate_step(0)},design:function(){Optin.step.activate_step(1)},display:function(e){Optin.step.activate_step(2),e=e||"",""!==e&&jQuery("#wpoi-listing-wrap-"+e).length&&jQuery("#wpoi-listing-wrap-"+e).find("i.dev-icon:not(.search-icon)").trigger("click")}});adminpage=adminpage.replace("hustle-pro","hustle"),"hustle_page_inc_optin"==adminpage&&(Optin.router=new Inc_Opt_Router,Backbone.history.start());
|
7 |
//# sourceMappingURL=maps/admin.min.js.map
|
assets/js/admin/providers/constantcontact.js
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Constant Contact email integration
|
3 |
+
*/
|
4 |
+
(function($,doc,win){
|
5 |
+
'use strict';
|
6 |
+
|
7 |
+
Optin.Mixins.add_services_mixin( 'constantcontact', function() {
|
8 |
+
return new Optin.Provider({id: 'constantcontact'});
|
9 |
+
});
|
10 |
+
|
11 |
+
var resetReferrer = function() {
|
12 |
+
var target = $(this),
|
13 |
+
optin_id = target.data('optin'),
|
14 |
+
location = target.attr('href'),
|
15 |
+
timer, data;
|
16 |
+
|
17 |
+
if ( ! optin_id ) {
|
18 |
+
var button = $('.next-button button.wph-button-save', '#wpoi-wizard-services');
|
19 |
+
button.trigger( 'click' );
|
20 |
+
|
21 |
+
timer = setInterval(function() {
|
22 |
+
optin_id = Optin.step.services.model.get('optin_id');
|
23 |
+
|
24 |
+
if ( parseInt( optin_id ) > 0 ) {
|
25 |
+
clearInterval(timer);
|
26 |
+
data = {optin_id: optin_id, _wpnonce: window.optin_vars.constantcontact_nonce, action: 'update_constantcontact_referrer' };
|
27 |
+
|
28 |
+
// Update referrer in the background
|
29 |
+
$.get(ajaxurl, data);
|
30 |
+
|
31 |
+
_.delay(function() {
|
32 |
+
win.location = location;
|
33 |
+
}, 300 );
|
34 |
+
}
|
35 |
+
}, 100 );
|
36 |
+
}
|
37 |
+
|
38 |
+
return;
|
39 |
+
};
|
40 |
+
|
41 |
+
$(doc).on( 'click', '.constantcontact-authorize', resetReferrer );
|
42 |
+
|
43 |
+
}(jQuery,document,window));
|
assets/js/admin/providers/others.js
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
(function($){
|
6 |
'use strict';
|
7 |
|
8 |
-
var providers = ['getresponse', 'campaignmonitor',
|
9 |
|
10 |
_.each( providers, function( provider ) {
|
11 |
Optin.Mixins.add_services_mixin( provider, function() {
|
5 |
(function($){
|
6 |
'use strict';
|
7 |
|
8 |
+
var providers = ['getresponse', 'campaignmonitor','aweber'];
|
9 |
|
10 |
_.each( providers, function( provider ) {
|
11 |
Optin.Mixins.add_services_mixin( provider, function() {
|
assets/js/front.min.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
!function(t){var e="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global;if("function"==typeof define&&define.amd)define(["underscore","jquery","exports"],function(i,n,s){e.Backbone=t(e,s,i,n)});else if("undefined"!=typeof exports){var i,n=require("underscore");try{i=require("jquery")}catch(s){}t(e,exports,n,i)}else e.Backbone=t(e,{},e._,e.jQuery||e.Zepto||e.ender||e.$)}(function(t,e,i,n){var s=t.Backbone,o=Array.prototype.slice;e.VERSION="1.3.3",e.$=n,e.noConflict=function(){return t.Backbone=s,this},e.emulateHTTP=!1,e.emulateJSON=!1;var a=function(t,e,n){switch(t){case 1:return function(){return i[e](this[n])};case 2:return function(t){return i[e](this[n],t)};case 3:return function(t,s){return i[e](this[n],l(t,this),s)};case 4:return function(t,s,o){return i[e](this[n],l(t,this),s,o)};default:return function(){var t=o.call(arguments);return t.unshift(this[n]),i[e].apply(i,t)}}},r=function(t,e,n){i.each(e,function(e,s){i[s]&&(t.prototype[s]=a(e,s,n))})},l=function(t,e){return i.isFunction(t)?t:i.isObject(t)&&!e._isModel(t)?c(t):i.isString(t)?function(e){return e.get(t)}:t},c=function(t){var e=i.matches(t);return function(t){return e(t.attributes)}},h=e.Events={},d=/\s+/,_=function(t,e,n,s,o){var a,r=0;if(n&&"object"==typeof n){void 0!==s&&"context"in o&&void 0===o.context&&(o.context=s);for(a=i.keys(n);r<a.length;r++)e=_(t,e,a[r],n[a[r]],o)}else if(n&&d.test(n))for(a=n.split(d);r<a.length;r++)e=t(e,a[r],s,o);else e=t(e,n,s,o);return e};h.on=function(t,e,i){return p(this,t,e,i)};var p=function(t,e,i,n,s){if(t._events=_(u,t._events||{},e,i,{context:n,ctx:t,listening:s}),s){var o=t._listeners||(t._listeners={});o[s.id]=s}return t};h.listenTo=function(t,e,n){if(!t)return this;var s=t._listenId||(t._listenId=i.uniqueId("l")),o=this._listeningTo||(this._listeningTo={}),a=o[s];if(!a){var r=this._listenId||(this._listenId=i.uniqueId("l"));a=o[s]={obj:t,objId:s,id:r,listeningTo:o,count:0}}return p(t,e,n,this,a),this};var u=function(t,e,i,n){if(i){var s=t[e]||(t[e]=[]),o=n.context,a=n.ctx,r=n.listening;r&&r.count++,s.push({callback:i,context:o,ctx:o||a,listening:r})}return t};h.off=function(t,e,i){return this._events?(this._events=_(g,this._events,t,e,{context:i,listeners:this._listeners}),this):this},h.stopListening=function(t,e,n){var s=this._listeningTo;if(!s)return this;for(var o=t?[t._listenId]:i.keys(s),a=0;a<o.length;a++){var r=s[o[a]];if(!r)break;r.obj.off(e,n,this)}return this};var g=function(t,e,n,s){if(t){var o,a=0,r=s.context,l=s.listeners;if(e||n||r){for(var c=e?[e]:i.keys(t);a<c.length;a++){e=c[a];var h=t[e];if(!h)break;for(var d=[],_=0;_<h.length;_++){var p=h[_];n&&n!==p.callback&&n!==p.callback._callback||r&&r!==p.context?d.push(p):(o=p.listening,o&&0===--o.count&&(delete l[o.id],delete o.listeningTo[o.objId]))}d.length?t[e]=d:delete t[e]}return t}for(var u=i.keys(l);a<u.length;a++)o=l[u[a]],delete l[o.id],delete o.listeningTo[o.objId]}};h.once=function(t,e,n){var s=_(f,{},t,e,i.bind(this.off,this));return"string"==typeof t&&null==n&&(e=void 0),this.on(s,e,n)},h.listenToOnce=function(t,e,n){var s=_(f,{},e,n,i.bind(this.stopListening,this,t));return this.listenTo(t,s)};var f=function(t,e,n,s){if(n){var o=t[e]=i.once(function(){s(e,o),n.apply(this,arguments)});o._callback=n}return t};h.trigger=function(t){if(!this._events)return this;for(var e=Math.max(0,arguments.length-1),i=Array(e),n=0;n<e;n++)i[n]=arguments[n+1];return _(m,this._events,t,void 0,i),this};var m=function(t,e,i,n){if(t){var s=t[e],o=t.all;s&&o&&(o=o.slice()),s&&v(s,n),o&&v(o,[e].concat(n))}return t},v=function(t,e){var i,n=-1,s=t.length,o=e[0],a=e[1],r=e[2];switch(e.length){case 0:for(;++n<s;)(i=t[n]).callback.call(i.ctx);return;case 1:for(;++n<s;)(i=t[n]).callback.call(i.ctx,o);return;case 2:for(;++n<s;)(i=t[n]).callback.call(i.ctx,o,a);return;case 3:for(;++n<s;)(i=t[n]).callback.call(i.ctx,o,a,r);return;default:for(;++n<s;)(i=t[n]).callback.apply(i.ctx,e);return}};h.bind=h.on,h.unbind=h.off,i.extend(e,h);var w=e.Model=function(t,e){var n=t||{};e||(e={}),this.cid=i.uniqueId(this.cidPrefix),this.attributes={},e.collection&&(this.collection=e.collection),e.parse&&(n=this.parse(n,e)||{});var s=i.result(this,"defaults");n=i.defaults(i.extend({},s,n),s),this.set(n,e),this.changed={},this.initialize.apply(this,arguments)};i.extend(w.prototype,h,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",initialize:function(){},toJSON:function(t){return i.clone(this.attributes)},sync:function(){return e.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return i.escape(this.get(t))},has:function(t){return null!=this.get(t)},matches:function(t){return!!i.iteratee(t,this)(this.attributes)},set:function(t,e,n){if(null==t)return this;var s;if("object"==typeof t?(s=t,n=e):(s={})[t]=e,n||(n={}),!this._validate(s,n))return!1;var o=n.unset,a=n.silent,r=[],l=this._changing;this._changing=!0,l||(this._previousAttributes=i.clone(this.attributes),this.changed={});var c=this.attributes,h=this.changed,d=this._previousAttributes;for(var _ in s)e=s[_],i.isEqual(c[_],e)||r.push(_),i.isEqual(d[_],e)?delete h[_]:h[_]=e,o?delete c[_]:c[_]=e;if(this.idAttribute in s&&(this.id=this.get(this.idAttribute)),!a){r.length&&(this._pending=n);for(var p=0;p<r.length;p++)this.trigger("change:"+r[p],this,c[r[p]],n)}if(l)return this;if(!a)for(;this._pending;)n=this._pending,this._pending=!1,this.trigger("change",this,n);return this._pending=!1,this._changing=!1,this},unset:function(t,e){return this.set(t,void 0,i.extend({},e,{unset:!0}))},clear:function(t){var e={};for(var n in this.attributes)e[n]=void 0;return this.set(e,i.extend({},t,{unset:!0}))},hasChanged:function(t){return null==t?!i.isEmpty(this.changed):i.has(this.changed,t)},changedAttributes:function(t){if(!t)return!!this.hasChanged()&&i.clone(this.changed);var e=this._changing?this._previousAttributes:this.attributes,n={};for(var s in t){var o=t[s];i.isEqual(e[s],o)||(n[s]=o)}return!!i.size(n)&&n},previous:function(t){return null!=t&&this._previousAttributes?this._previousAttributes[t]:null},previousAttributes:function(){return i.clone(this._previousAttributes)},fetch:function(t){t=i.extend({parse:!0},t);var e=this,n=t.success;return t.success=function(i){var s=t.parse?e.parse(i,t):i;return!!e.set(s,t)&&(n&&n.call(t.context,e,i,t),void e.trigger("sync",e,i,t))},F(this,t),this.sync("read",this,t)},save:function(t,e,n){var s;null==t||"object"==typeof t?(s=t,n=e):(s={})[t]=e,n=i.extend({validate:!0,parse:!0},n);var o=n.wait;if(s&&!o){if(!this.set(s,n))return!1}else if(!this._validate(s,n))return!1;var a=this,r=n.success,l=this.attributes;n.success=function(t){a.attributes=l;var e=n.parse?a.parse(t,n):t;return o&&(e=i.extend({},s,e)),!(e&&!a.set(e,n))&&(r&&r.call(n.context,a,t,n),void a.trigger("sync",a,t,n))},F(this,n),s&&o&&(this.attributes=i.extend({},l,s));var c=this.isNew()?"create":n.patch?"patch":"update";"patch"!==c||n.attrs||(n.attrs=s);var h=this.sync(c,this,n);return this.attributes=l,h},destroy:function(t){t=t?i.clone(t):{};var e=this,n=t.success,s=t.wait,o=function(){e.stopListening(),e.trigger("destroy",e,e.collection,t)};t.success=function(i){s&&o(),n&&n.call(t.context,e,i,t),e.isNew()||e.trigger("sync",e,i,t)};var a=!1;return this.isNew()?i.defer(t.success):(F(this,t),a=this.sync("delete",this,t)),s||o(),a},url:function(){var t=i.result(this,"urlRoot")||i.result(this.collection,"url")||M();if(this.isNew())return t;var e=this.get(this.idAttribute);return t.replace(/[^\/]$/,"$&/")+encodeURIComponent(e)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(t){return this._validate({},i.extend({},t,{validate:!0}))},_validate:function(t,e){if(!e.validate||!this.validate)return!0;t=i.extend({},this.attributes,t);var n=this.validationError=this.validate(t,e)||null;return!n||(this.trigger("invalid",this,n,i.extend(e,{validationError:n})),!1)}});var y={keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1};r(w,y,"attributes");var k=e.Collection=function(t,e){e||(e={}),e.model&&(this.model=e.model),void 0!==e.comparator&&(this.comparator=e.comparator),this._reset(),this.initialize.apply(this,arguments),t&&this.reset(t,i.extend({silent:!0},e))},b={add:!0,remove:!0,merge:!0},x={add:!0,remove:!1},C=function(t,e,i){i=Math.min(Math.max(i,0),t.length);var n,s=Array(t.length-i),o=e.length;for(n=0;n<s.length;n++)s[n]=t[n+i];for(n=0;n<o;n++)t[n+i]=e[n];for(n=0;n<s.length;n++)t[n+o+i]=s[n]};i.extend(k.prototype,h,{model:w,initialize:function(){},toJSON:function(t){return this.map(function(e){return e.toJSON(t)})},sync:function(){return e.sync.apply(this,arguments)},add:function(t,e){return this.set(t,i.extend({merge:!1},e,x))},remove:function(t,e){e=i.extend({},e);var n=!i.isArray(t);t=n?[t]:t.slice();var s=this._removeModels(t,e);return!e.silent&&s.length&&(e.changes={added:[],merged:[],removed:s},this.trigger("update",this,e)),n?s[0]:s},set:function(t,e){if(null!=t){e=i.extend({},b,e),e.parse&&!this._isModel(t)&&(t=this.parse(t,e)||[]);var n=!i.isArray(t);t=n?[t]:t.slice();var s=e.at;null!=s&&(s=+s),s>this.length&&(s=this.length),s<0&&(s+=this.length+1);var o,a,r=[],l=[],c=[],h=[],d={},_=e.add,p=e.merge,u=e.remove,g=!1,f=this.comparator&&null==s&&e.sort!==!1,m=i.isString(this.comparator)?this.comparator:null;for(a=0;a<t.length;a++){o=t[a];var v=this.get(o);if(v){if(p&&o!==v){var w=this._isModel(o)?o.attributes:o;e.parse&&(w=v.parse(w,e)),v.set(w,e),c.push(v),f&&!g&&(g=v.hasChanged(m))}d[v.cid]||(d[v.cid]=!0,r.push(v)),t[a]=v}else _&&(o=t[a]=this._prepareModel(o,e),o&&(l.push(o),this._addReference(o,e),d[o.cid]=!0,r.push(o)))}if(u){for(a=0;a<this.length;a++)o=this.models[a],d[o.cid]||h.push(o);h.length&&this._removeModels(h,e)}var y=!1,k=!f&&_&&u;if(r.length&&k?(y=this.length!==r.length||i.some(this.models,function(t,e){return t!==r[e]}),this.models.length=0,C(this.models,r,0),this.length=this.models.length):l.length&&(f&&(g=!0),C(this.models,l,null==s?this.length:s),this.length=this.models.length),g&&this.sort({silent:!0}),!e.silent){for(a=0;a<l.length;a++)null!=s&&(e.index=s+a),o=l[a],o.trigger("add",o,this,e);(g||y)&&this.trigger("sort",this,e),(l.length||h.length||c.length)&&(e.changes={added:l,removed:h,merged:c},this.trigger("update",this,e))}return n?t[0]:t}},reset:function(t,e){e=e?i.clone(e):{};for(var n=0;n<this.models.length;n++)this._removeReference(this.models[n],e);return e.previousModels=this.models,this._reset(),t=this.add(t,i.extend({silent:!0},e)),e.silent||this.trigger("reset",this,e),t},push:function(t,e){return this.add(t,i.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);return this.remove(e,t)},unshift:function(t,e){return this.add(t,i.extend({at:0},e))},shift:function(t){var e=this.at(0);return this.remove(e,t)},slice:function(){return o.apply(this.models,arguments)},get:function(t){if(null!=t)return this._byId[t]||this._byId[this.modelId(t.attributes||t)]||t.cid&&this._byId[t.cid]},has:function(t){return null!=this.get(t)},at:function(t){return t<0&&(t+=this.length),this.models[t]},where:function(t,e){return this[e?"find":"filter"](t)},findWhere:function(t){return this.where(t,!0)},sort:function(t){var e=this.comparator;if(!e)throw new Error("Cannot sort a set without a comparator");t||(t={});var n=e.length;return i.isFunction(e)&&(e=i.bind(e,this)),1===n||i.isString(e)?this.models=this.sortBy(e):this.models.sort(e),t.silent||this.trigger("sort",this,t),this},pluck:function(t){return this.map(t+"")},fetch:function(t){t=i.extend({parse:!0},t);var e=t.success,n=this;return t.success=function(i){var s=t.reset?"reset":"set";n[s](i,t),e&&e.call(t.context,n,i,t),n.trigger("sync",n,i,t)},F(this,t),this.sync("read",this,t)},create:function(t,e){e=e?i.clone(e):{};var n=e.wait;if(t=this._prepareModel(t,e),!t)return!1;n||this.add(t,e);var s=this,o=e.success;return e.success=function(t,e,i){n&&s.add(t,i),o&&o.call(i.context,t,e,i)},t.save(null,e),t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(t){return t[this.model.prototype.idAttribute||"id"]},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(t,e){if(this._isModel(t))return t.collection||(t.collection=this),t;e=e?i.clone(e):{},e.collection=this;var n=new this.model(t,e);return n.validationError?(this.trigger("invalid",this,n.validationError,e),!1):n},_removeModels:function(t,e){for(var i=[],n=0;n<t.length;n++){var s=this.get(t[n]);if(s){var o=this.indexOf(s);this.models.splice(o,1),this.length--,delete this._byId[s.cid];var a=this.modelId(s.attributes);null!=a&&delete this._byId[a],e.silent||(e.index=o,s.trigger("remove",s,this,e)),i.push(s),this._removeReference(s,e)}}return i},_isModel:function(t){return t instanceof w},_addReference:function(t,e){this._byId[t.cid]=t;var i=this.modelId(t.attributes);null!=i&&(this._byId[i]=t),t.on("all",this._onModelEvent,this)},_removeReference:function(t,e){delete this._byId[t.cid];var i=this.modelId(t.attributes);null!=i&&delete this._byId[i],this===t.collection&&delete t.collection,t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,i,n){if(e){if(("add"===t||"remove"===t)&&i!==this)return;if("destroy"===t&&this.remove(e,n),"change"===t){var s=this.modelId(e.previousAttributes()),o=this.modelId(e.attributes);s!==o&&(null!=s&&delete this._byId[s],null!=o&&(this._byId[o]=e))}}this.trigger.apply(this,arguments)}});var O={forEach:3,each:3,map:3,collect:3,reduce:0,foldl:0,inject:0,reduceRight:0,foldr:0,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3,groupBy:3,countBy:3,sortBy:3,indexBy:3,findIndex:3,findLastIndex:3};r(k,O,"models");var S=e.View=function(t){this.cid=i.uniqueId("view"),i.extend(this,i.pick(t,I)),this._ensureElement(),this.initialize.apply(this,arguments)},E=/^(\S+)\s*(.*)$/,I=["model","collection","el","id","attributes","className","tagName","events"];i.extend(S.prototype,h,{tagName:"div",$:function(t){return this.$el.find(t)},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(t){return this.undelegateEvents(),this._setElement(t),this.delegateEvents(),this},_setElement:function(t){this.$el=t instanceof e.$?t:e.$(t),this.el=this.$el[0]},delegateEvents:function(t){if(t||(t=i.result(this,"events")),!t)return this;this.undelegateEvents();for(var e in t){var n=t[e];if(i.isFunction(n)||(n=this[n]),n){var s=e.match(E);this.delegate(s[1],s[2],i.bind(n,this))}}return this},delegate:function(t,e,i){return this.$el.on(t+".delegateEvents"+this.cid,e,i),this},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(t,e,i){return this.$el.off(t+".delegateEvents"+this.cid,e,i),this},_createElement:function(t){return document.createElement(t)},_ensureElement:function(){if(this.el)this.setElement(i.result(this,"el"));else{var t=i.extend({},i.result(this,"attributes"));this.id&&(t.id=i.result(this,"id")),this.className&&(t["class"]=i.result(this,"className")),this.setElement(this._createElement(i.result(this,"tagName"))),this._setAttributes(t)}},_setAttributes:function(t){this.$el.attr(t)}}),e.sync=function(t,n,s){var o=T[t];i.defaults(s||(s={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var a={type:o,dataType:"json"};if(s.url||(a.url=i.result(n,"url")||M()),null!=s.data||!n||"create"!==t&&"update"!==t&&"patch"!==t||(a.contentType="application/json",a.data=JSON.stringify(s.attrs||n.toJSON(s))),s.emulateJSON&&(a.contentType="application/x-www-form-urlencoded",a.data=a.data?{model:a.data}:{}),s.emulateHTTP&&("PUT"===o||"DELETE"===o||"PATCH"===o)){a.type="POST",s.emulateJSON&&(a.data._method=o);var r=s.beforeSend;s.beforeSend=function(t){if(t.setRequestHeader("X-HTTP-Method-Override",o),r)return r.apply(this,arguments)}}"GET"===a.type||s.emulateJSON||(a.processData=!1);var l=s.error;s.error=function(t,e,i){s.textStatus=e,s.errorThrown=i,l&&l.call(s.context,t,e,i)};var c=s.xhr=e.ajax(i.extend(a,s));return n.trigger("request",n,c,s),c};var T={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var H=e.Router=function(t){t||(t={}),t.routes&&(this.routes=t.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},$=/\((.*?)\)/g,P=/(\(\?)?:\w+/g,j=/\*\w+/g,z=/[\-{}\[\]+?.,\\\^$|#\s]/g;i.extend(H.prototype,h,{initialize:function(){},route:function(t,n,s){i.isRegExp(t)||(t=this._routeToRegExp(t)),i.isFunction(n)&&(s=n,n=""),s||(s=this[n]);var o=this;return e.history.route(t,function(i){var a=o._extractParameters(t,i);o.execute(s,a,n)!==!1&&(o.trigger.apply(o,["route:"+n].concat(a)),o.trigger("route",n,a),e.history.trigger("route",o,n,a))}),this},execute:function(t,e,i){t&&t.apply(this,e)},navigate:function(t,i){return e.history.navigate(t,i),this},_bindRoutes:function(){if(this.routes){this.routes=i.result(this,"routes");for(var t,e=i.keys(this.routes);null!=(t=e.pop());)this.route(t,this.routes[t])}},_routeToRegExp:function(t){return t=t.replace(z,"\\$&").replace($,"(?:$1)?").replace(P,function(t,e){return e?t:"([^/?]+)"}).replace(j,"([^?]*?)"),new RegExp("^"+t+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(t,e){var n=t.exec(e).slice(1);return i.map(n,function(t,e){return e===n.length-1?t||null:t?decodeURIComponent(t):null})}});var N=e.History=function(){this.handlers=[],this.checkUrl=i.bind(this.checkUrl,this),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},A=/^[#\/]|\s+$/g,R=/^\/+|\/+$/g,U=/#.*$/;N.started=!1,i.extend(N.prototype,h,{interval:50,atRoot:function(){var t=this.location.pathname.replace(/[^\/]$/,"$&/");return t===this.root&&!this.getSearch()},matchRoot:function(){var t=this.decodeFragment(this.location.pathname),e=t.slice(0,this.root.length-1)+"/";return e===this.root},decodeFragment:function(t){return decodeURI(t.replace(/%25/g,"%2525"))},getSearch:function(){var t=this.location.href.replace(/#.*/,"").match(/\?.+/);return t?t[0]:""},getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getPath:function(){var t=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return"/"===t.charAt(0)?t.slice(1):t},getFragment:function(t){return null==t&&(t=this._usePushState||!this._wantsHashChange?this.getPath():this.getHash()),t.replace(A,"")},start:function(t){if(N.started)throw new Error("Backbone.history has already been started");if(N.started=!0,this.options=i.extend({root:"/"},this.options,t),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._hasHashChange="onhashchange"in window&&(void 0===document.documentMode||document.documentMode>7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(R,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||"/";return this.location.replace(e+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var n=document.body,s=n.insertBefore(this.iframe,n.firstChild).contentWindow;s.document.open(),s.document.close(),s.location.hash="#"+this.fragment}var o=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};if(this._usePushState?o("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?o("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};this._usePushState?t("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&t("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),N.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();return e===this.fragment&&this.iframe&&(e=this.getHash(this.iframe.contentWindow)),e!==this.fragment&&(this.iframe&&this.navigate(e),void this.loadUrl())},loadUrl:function(t){return!!this.matchRoot()&&(t=this.fragment=this.getFragment(t),i.some(this.handlers,function(e){if(e.route.test(t))return e.callback(t),!0}))},navigate:function(t,e){if(!N.started)return!1;e&&e!==!0||(e={trigger:!!e}),t=this.getFragment(t||"");var i=this.root;""!==t&&"?"!==t.charAt(0)||(i=i.slice(0,-1)||"/");var n=i+t;if(t=this.decodeFragment(t.replace(U,"")),this.fragment!==t){if(this.fragment=t,this._usePushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,n);else{if(!this._wantsHashChange)return this.location.assign(n);if(this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var s=this.iframe.contentWindow;e.replace||(s.document.open(),s.document.close()),this._updateHash(s.location,t,e.replace)}}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,i){if(i){var n=t.href.replace(/(javascript:|#).*$/,"");t.replace(n+"#"+e)}else t.hash="#"+e}}),e.history=new N;var L=function(t,e){var n,s=this;return n=t&&i.has(t,"constructor")?t.constructor:function(){return s.apply(this,arguments)},i.extend(n,s,e),n.prototype=i.create(s.prototype,t),n.prototype.constructor=n,n.__super__=s.prototype,n};w.extend=k.extend=H.extend=S.extend=N.extend=L;var M=function(){throw new Error('A "url" property or function must be specified')},F=function(t,e){var i=e.error;e.error=function(n){i&&i.call(e.context,t,n,e),t.trigger("error",t,n,e)}};return e}),function(t){"use strict";window.Hustle=function(t,e,i){var n={},s={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g},o=function(s,o){var a=s.split(".");if(a.length){var r=function(n,s){var a=n.split("."),l=a.splice(0,1)[0];if(l){if(a.length)s[l]=s[l]||{};else{var c=o.call(null,t,e,i);s[l]=_.isFunction(c)||"undefined"==typeof c?c:_.extend(s[l]||{},c)}a.length&&l&&r(a.join("."),s[l])}};r(s,n)}else{var l=n[s]||{};n[s]=_.extend(l,o.call(null,t,e,i))}},a=function(){return n},r=function(t){if(t.split(".").length){var e=!1,i=function(t,n){var s=t.split("."),o=s.splice(0,1)[0];e=n[o],s.length&&i(s.join("."),n[o])};return i(t,n),e}return n[t]||!1},l=_.extend({},Backbone.Events),c=Backbone.View.extend({__base_events:{"click .wph-tabs--wrap .wph-tabs--nav li label":"__base_toggle_tab"},initialize:function(){this.events=_.extend({},this.events,this.__base_events),_.isFunction(this.init_mix)&&this.init_mix.apply(this,arguments),this.render&&(this.render=_.wrap(this.render,function(t){this.trigger("before_render"),t.call(this),l.trigger("view.rendered",this),this.trigger("rendered")})),_.isFunction(this.init)&&this.init.apply(this,arguments)},__base_toggle_tab:function(t){var e=this.$(t.target),i=(e.attr("href")||"").replace(/^\#/,""),n=!!i&&this.$("#"+i),s=e.closest(".wph-tabs--wrap"),o=e.closest("li");n&&n.length&&(s.find(".wph-tabs--content").not(n).removeClass("current"),n.addClass("current"),o.addClass("current"),o.siblings().removeClass("current"))}}),h=_.memoize(function(t){var e;return function(i){return e=e||_.template(document.getElementById(t).innerHTML,null,s),e(i).replace("/*<![CDATA[*/","").replace("/*]]>*/","")}}),d=_.memoize(function(t){var e;return function(i){return(e=e||_.template(t,null,s))(i)}}),p=function(){return t.extend(!0,{},s)},u=function(){var e=function(t){var e,i,n,s=document.cookie.split(";");for(n=t+"=",e=0;e<s.length;e+=1){for(i=s[e];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(n)){var o=i.substring(n.length,i.length);return o?JSON.parse(o):o}}return null},i=function(e,i,n){var s,o;i=t.isArray(i)||t.isPlainObject(i)?JSON.stringify(i):i,isNaN(n)?o="":(s=new Date,s.setTime(s.getTime()+24*n*60*60*1e3),o="; expires="+s.toGMTString()),document.cookie=e+"="+i+o+"; path=/"};return{set:i,get:e}}(),g=function(){return{Never_See_Aagain_Prefix:"hustle_never_see_again-",Module_Show_Count:"hustle_module_show_count-",Slide_Cookie_Prefix:"hustle_slide_in_prefix-",Slide_Cookie_Hide_All:"hustle_slide_in_hide_all-",SS_Module_Show_Count:"hustle_ss_module_show_count-"}}();return{define:o,get_modules:a,get:r,Events:l,View:c,template:h,create_template:d,get_template_options:p,cookie:u,consts:g}}(jQuery,document,window)}(jQuery);var Optin=Optin||{};Optin.View={},Optin.Models={},Optin.Events={},"undefined"!=typeof Backbone&&_.extend(Optin.Events,Backbone.Events),function(t){"use strict";Optin.COOKIE_PREFIX="inc_optin_long_hidden-",Optin.POPUP_COOKIE_PREFIX="inc_optin_popup_long_hidden-",Optin.SLIDE_IN_COOKIE_PREFIX="inc_optin_slide_in_long_hidden-",Optin.SLIDE_IN_COOKIE_HIDE_ALL="inc_optin_slide_in_hide_all",Optin.global_mixin=function(){_.mixin({log:function(){console.log(arguments)},toBool:function(t){return _.isBoolean(t)?t:_.isString(t)&&["true","false","1"].indexOf(t.toLowerCase())!==-1?"true"===t.toLowerCase()||"1"===t.toLowerCase():_.isNumber(t)?!!t:!(_.isUndefined(t)||_.isNull(t)||_.isNaN(t))&&t},isTrue:function(t){return!(_.isUndefined(t)||_.isNull(t)||_.isNaN(t))&&(_.isNumber(t)?0!==t:(t=t.toString().toLowerCase(),["1","true","on"].indexOf(t)!==-1))},isFalse:function(t){return!_.isTrue(t)},control_base:function(t,e,i){return i=_.isUndefined(i)?"checked":i,t=_.toBool(t),e=_.isBoolean(t)?_.isTrue(e):e,_.isEqual(t,e)?i+"="+i:""},checked:function(t,e){return _.control_base(t,e,"checked")},selected:function(t,e){return _.control_base(t,e,"selected")},disabled:function(t,e){return _.control_base(t,e,"disabled")},"class":function(t,e,i){return _.isTrue(t)?e:"undefined"!=typeof i?i:""},add_class:function(t,e,i){return"class={class}".replace("{class}",_["class"](t,e,i))},toUpperCase:function(t){return _.isString(t)?t.toUpperCase():""}}),_.findKey||_.mixin({findKey:function(t,e,i){e=cb(e,i);for(var n,s=_.keys(t),o=0,a=s.length;o<a;o++)if(n=s[o],e(t[n],n,t))return n}})},Optin.global_mixin(),Backbone.Model.prototype.toJSON=function(){var t=_.clone(this.attributes);for(var e in t)(t[e]instanceof Backbone.Model||Backbone.Collection&&t[e]instanceof Backbone.Collection)&&(t[e]=t[e].toJSON());return t},String.prototype.toInt=function(){return parseInt(this,10)},String.prototype.isEmpty=function(){return 0===this.length||!this.trim()},Optin.template=_.memoize(function(e){var i,n={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g};return function(s){return i=i||_.template(t("#"+e).html(),null,n),i(s).replace("/*<![CDATA[*/","").replace("/*]]>*/","")}}),Optin.template_compat=_.memoize(function(e){var i;return function(n){return i=i||_.template(t("#"+e).html()),i(n).replace("/*<![CDATA[*/","").replace("/*]]>*/","")}}),Optin.cookie=Hustle.cookie,t(document).on("blur","input, textarea, select",function(){var e=t(this);e.is(":input[type=button], :input[type=submit], :input[type=reset]")||(e.val()&&e.val().trim&&""!==e.val().trim()?e.parent().addClass("wpoi-filled"):e.parent().removeClass("wpoi-filled"))}),Optin.Mixins={_mixins:{},_services_mixins:{},_desing_mixins:{},_display_mixins:{},add:function(t,e){this._mixins[t]=e},get_mixins:function(){return this._mixins},add_services_mixin:function(t,e){this._services_mixins[t]=e},get_services_mixins:function(){return this._services_mixins}}}(jQuery),Hustle.define("Modal",function(t){"use strict";return Backbone.View.extend({template:Optin.template("hustle-modal-tpl"),$mask:t('<div class="wph-modal--mask"></div>'),opts:{},data:{id:"",type:"popup",style:"",title:"",subtitle:"",content:"Content",animation_in:"",animation_out:"",position:""},events:{"click .wph-modal--close a":"hide","submit form":"fire_conversion_event","click .wph-modal--cta":"fire_conversion_event","click .wph-modal-never-see-again":"never_see_again"},initialize:function(t){return this.opts=_.extend({},this.opts,t),t.template&&(this.template=t.template),this.render(),this},render:function(){var t=_.extend({},this.data,this.model.toJSON());if(this.type_data=t.types[t.type],this.animation_in=t.animation_in=t.types[t.type].animation_in||t.animation_in,this.animation_out=t.animation_out=t.types[t.type].animation_out||t.animation_out,t.position=t.types[t.type].position||t.position,t=this.sanitize_cta_url(t),t=this.enable_fullscreen(t),t=this.handle_custom_size_cc(t),this.setElement(this.template(t)),this.$mask=this.$mask.clone(),this.$mask.on("click",_.bind(this.clicked_background,this)),this.$el.find("form").on("submit",_.bind(this.on_form_submit,this)),this.enable_body_scroll(t),window.hasOwnProperty("optin_vars")){var e=this.$el.find("a.wph-icon.i-close");e.length&&e.parent().hide()}return this},hide:function(e){var i=this;e&&e.preventDefault(),i.animation_in!==i.animation_out&&i.$el.removeClass(i.animation_in),_.delay(function(){i.animation_out&&!i.$el.hasClass(i.animation_out)&&i.$el.addClass(i.animation_out),_.delay(function(){i.$el.removeClass("wph-modal-show"),i.$el.prev(".wph-modal--mask").remove(),Hustle.Events.trigger("hide_modal",i),i.trigger("hidden"),_.isTrue(i.type_data.close_btn_as_never_see)&&e&&t(e.target).hasClass("wph-icon i-close")&&i.never_see_again(e)},550)},350),t("html").removeClass("no-scroll")},clicked_background:function(t){_.isTrue(this.type_data.not_close_on_background_click)||this.hide(t)},show:function(){var t=this;if(!window.hasOwnProperty("optin_vars")){var e=Hustle.consts.Module_Show_Count+this.model.get("type")+"-"+this.model.get("id"),i=Hustle.cookie.get(e);Hustle.cookie.set(e,i+1,90)}t.animation_in!==t.animation_out&&t.$el.removeClass(t.animation_out),_.delay(function(){t.$el.addClass("wph-modal-show"),t.trigger("shown",t,t.model.get("type")),Hustle.Events.trigger("show_modal",t,t.model.get("type")),_.delay(function(){t.animation_in&&!t.$el.hasClass(t.animation_in)&&t.$el.addClass(t.animation_in)},350)},550)},sanitize_cta_url:function(t){return t.cta_url&&(/^(f|ht)tps?:\/\//i.test(t.cta_url)||(t.cta_url="http://"+t.cta_url)),t},enable_fullscreen:function(t){if(t.fullscreen="",!t||"undefined"==typeof t.optin_provider||"undefined"==typeof t.type)return t;if("custom_content"==t.optin_provider&&"popup"==t.type){if("undefined"==typeof this.type_data.make_fullscreen)return t;_.isTrue(this.type_data.make_fullscreen)&&(t.fullscreen="wph-modal-popup-fullscreen")}return t},handle_custom_size_cc:function(t){return t.custom_size_attr="",t.custom_size_class="",t&&"undefined"!=typeof t.optin_provider?("custom_content"==t.optin_provider&&(_.isTrue(t.customize_size)&&(t.custom_size_class="wph-modal--custom",t.custom_size_attr+="data-custom_width="+t.custom_width+" data-custom_height="+t.custom_height),_.isTrue(t.border)&&(t.custom_size_attr+=" data-border="+t.border_weight)),t):t},enable_body_scroll:function(e){if(e&&"undefined"!=typeof e.optin_provider&&"undefined"!=typeof e.type&&"custom_content"==e.optin_provider&&"popup"==e.type){if("undefined"==typeof this.type_data.allow_scroll_page)return;_.isTrue(this.type_data.allow_scroll_page)?t("html").addClass("can-scroll"):t("html").addClass("no-scroll")}},fire_conversion_event:function(e){var i=t(e.target).hasClass("wph-modal--cta")?"cta":"form";Hustle.Events.trigger("cc_modal_converted",this,i),
|
2 |
-
this.trigger("converted",this,i)},never_see_again:function(e){e&&e.preventDefault(),window.hasOwnProperty("optin_vars")||Hustle.cookie.set(Hustle.consts.Never_See_Aagain_Prefix+this.model.get("type")+"-"+this.model.get("id"),this.model.get("id"),this.type_data.expiration_days),e&&!t(e.target).hasClass("wph-icon i-close")&&this.hide()},on_form_submit:function(e){var i=this,n=t(e.target),s=this.type_data.on_submit;switch(s){case"close":i.hide();break;case"redirect":window.location.replace(n.attr("action"));break;case"default":}}})}),function(t,e,i){var n=function(t,e,i){if("immediately"===e.trigger_on_time&&i.display(),"time"===e.trigger_on_time){var n;switch(e.appear_after_time_unit){case"minutes":n=60*parseInt(e.appear_after_time_val,10)*1e3;break;case"hours":n=60*parseInt(e.appear_after_time_val,10)*60*1e3;break;default:n=1e3*parseInt(e.appear_after_time_val,10)}_.delay(function(){i.display()},n)}},s=function(n,s,o){var a=!1;if("scrolled"===s.appear_after&&t(i).scroll(_.debounce(function(){a||100*i.pageYOffset/t(e).height()>=parseInt(s.appear_after_page_portion_val,10)&&(o.display(),a=!0)},50)),"selector"===s.appear_after){var r=t(s.appear_after_element_val);r.length&&t(i).scroll(_.debounce(function(){a||i.pageYOffset>=r.position().top&&(o.display(),a=!0)},50))}},o=function(i,n,s){if(""!==t.trim(n.trigger_on_element_click)){var o=t(t.trim(n.trigger_on_element_click));o.length&&t(e).on("click",t.trim(n.trigger_on_element_click),s.display)}t(e).on("click",".inc_opt_hustle_shortcode_trigger",function(e){e.preventDefault(),t(this).data("id")==i.data.optin_id&&s.display()})},a=function(i,n,s){_.isTrue(n.trigger_on_exit)&&(Optin.listen_to_exit_intend(),_.isTrue(n.on_exit_trigger_once_per_session)?t(e).one("wpoi:exit_intended",s.display):t(e).on("wpoi:exit_intended",s.display))},r=function(t,e,i){if(_.isTrue(e.trigger_on_adblock)){if(!Optin.is_adblock_enabled())return;if(_.isTrue(e.trigger_on_adblock_timed)){var n;switch(e.trigger_on_adblock_timed_unit){case"minutes":n=60*parseInt(e.trigger_on_adblock_timed_val,10)*1e3;break;case"hours":n=60*parseInt(e.trigger_on_adblock_timed_val,10)*60*1e3;break;default:n=1e3*parseInt(e.trigger_on_adblock_timed_val,10)}_.delay(function(){i.display()},n)}else i.display()}};Optin.Triggers={time:n,scroll:s,scrolled:s,click:o,exit_intent:a,adblock:r}}(jQuery,document,window),function(t){t(document).on("wpoi:display",function(e,i,n,s){var o="wpoi-optin-{type}-shown-count-".replace("{type}",i)+s.data.optin_id,a=Optin.cookie.get(o)||0;i&&s.settings[i].is_test;Optin.cookie.set(o,a+1,30),null!=s.data.tracking_types&&_.isTrue(s.data.tracking_types[i])&&t.ajax({type:"POST",url:inc_opt.ajaxurl,dataType:"json",data:{action:"inc_opt_optin_viewed",data:{optin_id:s.data.optin_id,page_type:inc_opt.page_type,page_id:inc_opt.page_id,type:i,uri:encodeURI(window.location.href)}},success:function(t){}})}),t(document).on("wpoi:cc_shortcode_or_widget_viewed",function(t,e,i){"undefined"!=typeof Optin.CC_log_view&&(Optin.CC_log_view.set("type",e),Optin.CC_log_view.set("id",i),Optin.CC_log_view.save())})}(jQuery),function(t){Optin=Optin||{},Optin.handle_scroll=function(e,i,n){var s=t(window),o=t(document);s.on("scroll",_.debounce(function(t){var a=e[0],r=a.getBoundingClientRect();r.top>=0&&r.left>=0&&r.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&r.right<=(window.innerWidth||document.documentElement.clientWidth)&&(s.off(t),e.addClass("wpoi-show"),o.trigger("wpoi:display",[i,e,n]))},5,!0))},Optin.handle_cc_scroll=function(e,i,n){var s=t(window),o=t(document);s.on("scroll",_.debounce(function(t){var a=e[0],r=a.getBoundingClientRect();if(r.top>=0&&r.left>=0&&r.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&r.right<=(window.innerWidth||document.documentElement.clientWidth)){s.off(t);var l=_.find(Hustle_Custom_Contents,function(t){return n==t.content.optin_id});if(!l)return;null!=l.tracking_types&&_.isTrue(l.tracking_types[i])&&o.trigger("wpoi:cc_shortcode_or_widget_viewed",[i,n])}},5,!0))}}(jQuery),function(t){function e(e,i){var n=e.find(".required"),s=(t('<i class="wphi-font wphi-error"></i>'),[]);return t(".wpoi-field-error").remove(),n.each(function(){var e=t(this),n=e.attr("name")+"_error";return i?(e.next("label").find("i.wphi-font").addClass("wphi-error"),s.push(e),s):void(_.isEmpty(this.value)||e.is("[type='email']")&&!this.value.trim().match(/^[\S]+\@[a-zA-Z0-9\-]+\.[\S]{2,}$/gi)?(e.next("label").find("i.wphi-font").addClass("wphi-error"),s.push(e)):t("."+n).remove())}),0===s.length}t(document).on("submit",".inc_optin form",function(i){i.preventDefault();var n=t(i.target),s=n.find("button"),o=n.closest(".inc_optin"),a=o.data("handle"),r=o.data("delay_id"),l=Optins[a],c=this,h=(t(this).closest(".wpoi-optin > .wpoi-container"),n.closest(".inc_optin").data("type")),d=h&&l.settings[h].is_test,p=t("<span class='wpoi-submit-failure'>"+inc_opt.l10n.submit_failure+"</span>");n.parent().find(".wpoi-submit-failure").remove(),_.isUndefined(r)||clearTimeout(r),!n.data("sending")&&e(n,d)&&(s.attr("disabled",!0),s.addClass("loading"),n.addClass("loading"),n.data("sending",!0),t.ajax({type:"POST",url:inc_opt.ajaxurl,dataType:"json",data:{action:"inc_opt_submit_opt_in",data:{form:n.serialize(),optin_id:l.data.optin_id,page_type:inc_opt.page_type,page_id:inc_opt.page_id,uri:encodeURI(window.location.href),type:h}},success:function(e){if(e&&e.success){var i=n.closest(".wpoi-hustle");if(l.design.hasOwnProperty("on_submit")&&"page_redirect"===l.design.on_submit)window.location.replace(l.design.page_redirect_url);else if("mailchimp"===l.data.optin_provider&&"undefined"!=typeof e.data.existing&&i.find(".wpoi-success-message .wpoi-content p").html(e.data.message),i.find(".wpoi-success-message").addClass("wpoi-show-message"),l.design.hasOwnProperty("on_success")&&"autoclose"===l.design.on_success){var s=parseInt(l.design.on_success_time),o=l.design.on_success_unit;"m"===o&&(s*=60),s*=1e3,_.delay(function(){var e=t(c).closest(".inc_optin").find(".inc-opt-close-popup");e.length>0?e.trigger("click"):i.find(".wpoi-success-message").removeClass("wpoi-show-message")},s)}}else{var a="";a=e.data?t.isArray(e.data)?e.data.pop():e.data:inc_opt.l10n.submit_failure,p.html(a?a:inc_opt.l10n.submit_failure),n.after(p)}},error:function(){n.after(p)},complete:function(){s.attr("disabled",!1),n.removeClass("loading"),s.removeClass("loading"),n.data("sending",!1)}}))});var i=function(){var e=t(this),i=e.parents(".wpoi-hustle"),n=(t("form",i),t(".wpoi-success-message",i));n.removeClass("wpoi-show-message")};t(document).on("click",".wpoi-success-close",i)}(jQuery);var Optin=Optin||{};!function(t,e){"use strict";function i(){var e=r.height(),i=r.scrollTop(),n=i+e;t.each(a,function(){var e=t(this),s=e.outerHeight(),o=e.offset().top,a=o+s;a>=i&&o<=n?e.addClass("in-view"):e.removeClass("in-view")})}function n(e,i,n,o){"mailchimp"===o.data.optin_provider&&s(o),"wpoi:display"!==e.type&&"wpoi:cc_display"!==e.type||"popup"!==i?(t(".wpoi-hustle").each(function(){var e=t("popup"===i?window:this),n=t(this);e.width()<=405?n.find(".wpoi-optin").addClass("wpoi-small"):n.find(".wpoi-optin").removeClass("wpoi-small"),e.width()<=585&&e.width()>405?n.find(".wpoi-optin").addClass("wpoi-medium"):n.find(".wpoi-optin").removeClass("wpoi-medium")}),t(".wph-modal").each(function(){var e=t(this).parent(),i=t(this);"widget"!==e.data("type")&&"shortcode"!==e.data("type")||(e.width()<=405?i.addClass("wph-modal--small"):i.removeClass("wph-modal--small"))})):!function(){var e=t("popup"===i?window:this),s=n.find(".wpoi-hustle");e.width()<=405?s.find(".wpoi-optin").addClass("wpoi-small"):s.find(".wpoi-optin").removeClass("wpoi-small"),e.width()<=585&&e.width()>405?s.find(".wpoi-optin").addClass("wpoi-medium"):s.find(".wpoi-optin").removeClass("wpoi-medium")}(),t(".wpoi-mcg-select").each(function(){t(this).parent(".wpoi-provider-args > .wpoi-container > .wpoi-element:nth-child(2) > .wpoi-container > .wpoi-element").css({padding:"0",background:"transparent"})}),t(".wpoi-layout-three .wpoi-optin:not(.wpoi-small) .nocontent:not(.noimage)").each(function(){var e=t(this),i=e.find(".wpoi-aside-x").prev(".wpoi-element"),n=e.find(".wpoi-aside-x").prev(".wpoi-element").find(".wpoi-container.wpoi-col");n.css("height",i.height())}),t(".wpoi-layout-three .wpoi-optin:not(.wpoi-small) > .wpoi-container.noimage:not(.nocontent)").each(function(){var e=t(this),i=e.find(".wpoi-aside-x"),n=e.find(".wpoi-image").next(".wpoi-element"),s=i.prev(".wpoi-element"),o=e.find(".wpoi-content"),a=s.find(".wpoi-col"),r=e.find("form");r.height()>o.height()&&(a.css("height",i.height()+"px"),n.addClass("wpoi-align"),o.addClass("wpoi-align-element")),r.height()<o.height()&&(i.css("height",s.height()+"px"),i.addClass("wpoi-align"),r.addClass("wpoi-align-element"))}),t(".wpoi-layout-three .wpoi-optin:not(.wpoi-small) > .wpoi-container:not(.noimage):not(.nocontent)").each(function(){var e=t(this),i=e.find(".wpoi-aside-x"),n=i.prev(".wpoi-element"),s=e.find("form");s.height()<n.height()&&(i.css("height",n.height()),i.addClass("wpoi-align"),s.addClass("wpoi-align-element"))}),t(".wpoi-layout-three .wpoi-optin:not(.wpoi-small)").each(function(){var e=t(this),i=e.find("form > .wpoi-element:not(.wpoi-provider-args,.wpoi-grouped-element)");i.addClass("wpoi-grouped-element");for(var n=0;n<i.length;n+=2)i.slice(n,n+2).wrapAll('<div class="wpoi-element wpoi-grouped-element" style="background-color: transparent;"><div class="wpoi-container"></div></div>')}),t(".wpoi-layout-four .wpoi-optin:not(.wpoi-small)").each(function(){var e=t(this),i=e.find("form > .wpoi-element:not(.wpoi-provider-args,.wpoi-grouped-element)");i.addClass("wpoi-grouped-element");for(var n=0;n<i.length;n+=2)i.slice(n,n+2).wrapAll('<div class="wpoi-element wpoi-grouped-element" style="background-color: transparent;"><div class="wpoi-container"></div></div>')}),t(".wpoi-layout-four .wpoi-optin:not(.wpoi-small) > .wpoi-container.noimage:not(.nocontent)").each(function(){var e=t(this),i=e.find(".wpoi-aside-xl"),n=e.find(".wpoi-aside-xl > .wpoi-container"),s=i.find(".wpoi-form"),o=i.find("form"),a=i.next(".wpoi-element"),r=a.find(".wpoi-content");r.height()>o.height()&&(n.css("height",i.height()+"px"),s.addClass("wpoi-align"),o.addClass("wpoi-align-element")),r.height()<o.height()&&(a.css("height",n.height()+"px"),a.addClass("wpoi-align"),r.addClass("wpoi-align-element"))}),t(".wpoi-layout-four .wpoi-optin:not(.wpoi-small) > .wpoi-container:not(.noimage):not(.nocontent)").each(function(){var e=t(this),i=e.find(".wpoi-aside-xl"),n=e.find(".wpoi-aside-xl > .wpoi-container"),s=e.find(".wpoi-image"),o=i.find(".wpoi-form"),a=i.find("form"),r=i.next(".wpoi-element"),l=e.find(".wpoi-content");l.height()>n.height()&&(n.css("height",i.height()+"px"),o.css("height",n.height()-s.height()),o.addClass("wpoi-align"),a.addClass("wpoi-align-element")),l.height()<n.height()&&(r.css("height",i.height()+"px"),r.addClass("wpoi-align"),l.addClass("wpoi-align-element"))}),t(".wph-modal").each(function(){var e=t(this),i=e.find(".wph-modal--content"),n=e.find(".wph-modal--content > section"),s=i.find("section > figure"),o=e.find(".wph-modal--content > figure"),a=s.find("img"),r=o.find("img"),l=e.hasClass("wph-modal--cabriolet")&&(s.hasClass("wph-modal--image_full")||s.hasClass("wph-modal--image")&&a.height()<s.height()),c=e.hasClass("wph-modal--simple")&&(o.hasClass("wph-modal--image_full")||o.hasClass("wph-modal--image")&&r.height()<o.height()),h=e.hasClass("wph-modal--minimal")&&(s.hasClass("wph-modal--image_full")||s.hasClass("wph-modal--image")&&a.height()<s.height());(l||h)&&a.css({height:n.height()+"px",width:n.width()+"px"}),c&&r.css({height:i.height()+"px",width:i.width()+"px"});var d=e.find(".wph-modal--content header"),_=e.find(".wph-modal--content footer"),p=e.find(".wph-modal--content"),u=e.find(".wph-modal--content .wph-modal--message"),g=e.find(".wph-modal--content section"),f=e.find(".wph-modal--content .wph-modal--image"),m=e.find(".wph-modal--content .wph-modal--image img"),v=parseInt(e.data("custom_width")),w=parseInt(e.data("custom_height")),y=2*parseInt(e.data("border"));y=isNaN(y)?0:y,v&&w&&(e.css("width",v+"px"),e.css("max-width","none"),e.hasClass("wph-modal--cabriolet")&&(u.outerHeight(w-d.outerHeight(!0)-y),f.outerHeight(u.outerHeight(!0)),m.outerHeight(u.outerHeight(!0))),e.hasClass("wph-modal--simple")&&(p.outerHeight(w),f.outerHeight(p.height()),m.outerHeight(p.height())),e.hasClass("wph-modal--minimal")&&(g.outerHeight(w-(d.outerHeight(!0)+_.outerHeight(!0))-y),f.outerHeight(g.outerHeight(!0)),m.outerHeight(g.outerHeight(!0))))}),t(".wph-cc-shortcode").each(function(){var e=t(this),i=e.find(".wph-cc-shortcode--content"),n=e.find(".wph-cc-shortcode--content > section"),s=i.find("section > figure"),o=e.find(".wph-cc-shortcode--content > figure"),a=s.find("img"),r=o.find("img"),l=e.hasClass("wph-cc-shortcode--cabriolet")&&(s.hasClass("wph-cc-shortcode--image_full")||s.hasClass("wph-cc-shortcode--image")&&a.height()<s.height()),c=e.hasClass("wph-cc-shortcode--simple")&&(o.hasClass("wph-cc-shortcode--image_full")||o.hasClass("wph-cc-shortcode--image")&&r.height()<o.height()),h=e.hasClass("wph-cc-shortcode--minimal")&&(s.hasClass("wph-cc-shortcode--image_full")||s.hasClass("wph-cc-shortcode--image")&&a.height()<s.height());(l||h)&&a.css({height:n.height()+"px",width:n.width()+"px"}),c&&r.css({height:i.height()+"px",width:i.width()+"px"})})}function s(e){"undefined"!=typeof e.provider_args&&"undefined"!=typeof e.provider_args.group||t(".inc_optin_"+e.data.optin_id+" .wpoi-element .wpoi-button").each(function(){var e=t(this),i=e.clone(),n=e.closest(".wpoi-element.wpoi-provider-args"),s=n.siblings(".wpoi-mcg-common-fields");s.find(".wpoi-container").append(i),n.remove()})}function o(t){var e={};return e.custom_size_attr="",e.custom_size_class="",t.customize_size&&_.isTrue(t.customize_size)&&(e.custom_size_class="wph-modal--custom",e.custom_size_attr+="data-custom_width="+t.custom_width+" data-custom_height="+t.custom_height),t.border&&_.isTrue(t.border)&&(e.custom_size_attr+=" data-border="+t.border_weight),e}t.each(["show","hide"],function(e,i){var n=t.fn[i];t.fn[i]=function(){return this.trigger(i),n.apply(this,arguments)}}),Optin.popup_overlay_delay=750,Optin.get_tpl=function(t,e){var i=["optin-layout-one","optin-layout-two","optin-layout-three","optin-layout-four"];return e?Optin.template_compat(i[t]):Optin.template(i[t])},Optin.popup={shown:[],hidden:[],long_hidden:[],is_already_shown:function(t){return-1!==this.shown.indexOf(t)},is_long_hidden:function(t){return!!Optin.cookie.get(Optin.POPUP_COOKIE_PREFIX+t.id)},show:function(t){return!this.is_long_hidden(t)&&(this.is_already_shown(t.id)?void 0:t.show())}};var a=t(".inc_opt_inline_wrap"),r=t(window);t(e).on("wpoi:display",_.debounce(n,100,!1)),t(e).on("wpoi:cc_display",_.debounce(n,100,!1)),t(window).on("resize",_.debounce(n,100,!1)),r.on("scroll resize",_.debounce(i,100,!1)),r.trigger("scroll"),t(document).on("blur","input, textarea, select",function(){var e=t(this);e.is(":input[type=button], :input[type=submit], :input[type=reset]")||(""!==e.val().trim()?e.parent().addClass("wpoi-filled"):e.parent().removeClass("wpoi-filled"))}),t(document).on("focus",".wpoi-optin input.required",function(){t(this).next("label").find("i.wphi-font").removeClass("i-error")}),Optin.render_provider_args=function(e){if(_.isEmpty(e.provider_args)||_.isEmpty(e.data.optin_provider))return"";var i=Optin.template("optin-"+e.data.optin_provider+"-args");return e.provider_args.cta_button=e.design.cta_button,t("#optin-"+e.data.optin_provider+"-args").length?i(e.provider_args):""},Optin.render_optin=function(i,n){var s=!("undefined"==typeof n||!n),o=_.templateSettings;s&&(Optin.global_mixin(),_.templateSettings={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g});var a=parseInt(i.design.form_location),r=Optin.get_tpl(a,s),l=function(){return!("mailchimp"!==i.data.optin_provider||!i.provider_args)},c=_.extend({image_style:"",has_args:l()},i.design,i.design.borders,i.data),h=r(c);return s&&(_.templateSettings=o),t(e).trigger("wpoi:layout:rendered"),h},Optin.render_cc_shortcode=function(i,n){var s=!("undefined"==typeof n||!n),a=[],r=_.templateSettings;a[i.type]={add_never_see_link:""},s&&(Optin.global_mixin(),_.templateSettings={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g});var l=s?Optin.template_compat("hustle-modal-tpl"):Optin.template("hustle-modal-tpl"),c=l(_.extend({type:i.type,id:i.content.optin_id,position:"",animation_in:"",fullscreen:"",types:a},i.content,i.design,o(i.design)));return s&&(_.templateSettings=r),t(e).trigger("wpoi:layout:rendered"),t(e).trigger("wpoi:cc_display",i.type),c};var l=!1;Optin.listen_to_exit_intend=function(){l||(t(e).on("mouseleave",_.debounce(function(i){t(e).trigger("wpoi:exit_intended",i)},100,!0)),l=!0)};var c=!1;Optin.is_adblock_enabled=function(){if(!c)return!t("#hustle_optin_adBlock_detector").length}}(jQuery,document),function(t,e,i){"use strict";inc_opt.is_upfront||(Optin.View=Backbone.View.extend({isCC:!1,display_id:"display",showClass:"wpoi-show",maskShowClass:"inc_optin_",optin_id:"",type:"",settings:{},data:{},add_never_see_again:!1,appear_after:"time",mask:!1,should_remove:!1,parent:"body",anim_in_time:Optin.popup_overlay_delay,anim_out_time:2e3,viewed:!1,events:{click:"click","click .inc-opt-close-btn":"closed","click .inc_opt_never_see_again":"closed"},click:_.noop,initialize:function(t){this.key=t.key,this.opt=Optins[this.key],this.settings=this.opt.settings[this.type],this.data=this.opt.data,this.optin_id=this.data.optin_id,this.maskClass="inc_optin_"+this.optin_id+" "+this.maskClass,this.add_never_see_again=_.isTrue(this.settings.add_never_see_this_message),this.appear_after=this.settings.appear_after,this.cookie_key=("popup"===this.type?Optin.POPUP_COOKIE_PREFIX:Optin.SLIDE_IN_COOKIE_PREFIX)+this.optin_id,this.expiration_days=parseInt(this.settings.never_see_expiry,10),this.triggers={on_time:this.settings.trigger_on_time,on_time_delay:this.settings.appear_after_time_val,on_time_unit:this.settings.appear_after_time_unit,on_scroll:this.settings.appear_after_scroll,on_scroll_page_percent:parseInt(this.settings.appear_after_page_portion_val),on_scroll_css_selector:this.settings.appear_after_element_val,on_click_element:this.settings.trigger_on_element_click,on_exit_intent:this.settings.trigger_on_exit,on_exit_intent_per_session:this.settings.on_exit_trigger_once_per_session,on_adblock:this.settings.trigger_on_adblock,on_adblock_delayed:this.settings.trigger_on_adblock_timed,on_adblock_delayed_time:this.settings.trigger_on_adblock_timed_val,on_adblock_delayed_unit:this.settings.trigger_on_adblock_timed_unit},this.should_display()&&((_.contains(["time","scrolled","adblock"],this.appear_after)||"exit_intent"===this.appear_after&&_.isTrue(this.settings.on_exit_trigger_once_per_session))&&(this.should_remove=!0),this.render())},should_display:function(){return _.isTrue(this.settings.display)&&!_.isTrue(Optin.cookie.get(this.cookie_key))},never_see_again:function(){Optin.cookie.set(this.cookie_key,this.optin_id,this.expiration_days)},fit:function(){var e=t(i).height(),n=e/100*65,s=this.$("header").outerHeight(),o=this.$(".wph-modal--message, .wph-modal--image"),a=n-s;if(this.$el.css("max-height",n),o.css("max-height",a),"popup"===this.type&&"cabriolet"!==this.settings.style){var r=(e-n)/2;r-=1.5*r,this.$el.css("margin-top",r+"px")}},render:function(){var e='<a href="#" aria-label="Close" class="inc-opt-close-btn inc-opt-close-'+this.type+'">×</a>';e+=Optin.render_optin(this.opt);var i={handle:this.key,type:this.type,popup:this.opt};this.add_never_see_again&&(e+='<div class="wpoi-nsa"><a class="inc_opt_never_see_again">%s</a></div>'.replace("%s",inc_opt.l10n.never_see_again)),this.settings.animation_in&&this.$el.addClass(this.settings.animation_in),this.$el.addClass(" inc_optin_"+this.optin_id),this.$el.html(e);var n=this.$(".wpoi-provider-args");return n.length&&n.html(Optin.render_provider_args(this.opt)),this.$el.appendTo(this.parent),this.$el.display=t.proxy(this,"display"),this.$el.on("show",t.proxy(this,"onShow")),this.$el.on("hide",t.proxy(this,"onHide")),this.$el.data(i),this.html=this.$el.html(),this[this.appear_after+"_trigger"](),this},display:function(){this.viewed=!0,this.$el.is("."+this.showClass)||(this.$el.html(this.html),this.$el.removeClass(this.settings.animation_out),this.add_mask(),this.animation_in(),this.$el.trigger("show",this))},add_mask:function(){var e=_.isFalse(this.settings.allow_scroll_page),i=_.isFalse(this.settings.not_close_on_background_click);_.delay(t.proxy(function(){e&&t("html").addClass("no-scroll"),this.mask?this.mask.addClass("wpoi-show"):(this.mask=t('<div class="'+this.maskClass+' wpoi-overlay-mask wpoi-animate fadein"><div class="wpoi-'+this.type+'-overlay"></div></div>'),this.mask.insertBefore(this.$el).addClass("wpoi-show"),i&&this.mask.on("click",t.proxy(this,"closed")))},this),Optin.popup_overlay_delay)},animation_in:function(){var t=this,e=_.isFalse(t.viewed);this.settings.animation_in&&this.$el.addClass(this.settings.animation_in),_.delay(function(){e||(t.$el.addClass(t.showClass),t.settings.animation_out?t.settings.animation_in?_.delay(function(){t.$el.removeClass(t.settings.animation_in),t.$el.addClass(t.settings.animation_out)},350):t.$el.addClass(t.settings.animation_out):t.settings.animation_in&&_.delay(function(){t.$el.removeClass(t.settings.animation_in)},350))},Optin.popup_overlay_delay)},time_trigger:function(){if("immediately"==this.triggers.on_time)this.display();else{var e=1e3*parseInt(this.triggers.on_time_delay,10);"minutes"===this.triggers.on_time_unit?e*=60:"hours"===this.triggers.on_time_unit&&(e*=3600),_.delay(t.proxy(this,"display"),e)}},click_trigger:function(){var i=this,n="";if(""!==(n=t.trim(this.triggers.on_click_element))){var s=t(n);s.length&&t(e).on("click",n,function(t){t.preventDefault(),i.display()})}t(e).on("click",".inc_opt_hustle_shortcode_trigger",function(e){e.preventDefault(),t(this).data("id")==i.data.optin_id&&t(this).data("type")==i.type&&i.display()})},scroll_trigger:function(){var n=this,s=!1;if("scrolled"===this.triggers.on_scroll&&t(i).scroll(_.debounce(function(){s||100*i.pageYOffset/t(e).height()>=parseFloat(n.triggers.on_scroll_page_percent)&&(n.display(),s=!0)},50)),"selector"===this.triggers.on_scroll){var o=t(this.triggers.on_scroll_css_selector);o.length&&t(i).scroll(_.debounce(function(){s||i.pageYOffset>=o.position().top&&(n.display(),s=!0)},50))}},scrolled_trigger:function(){return this.scroll_trigger()},exit_intent_trigger:function(){_.isTrue(this.triggers.on_exit_intent)&&(_.isTrue(this.triggers.on_exit_intent_per_session)?Hustle.Events.once("exit_intended",t.proxy(this,"display")):Hustle.Events.on("exit_intended",t.proxy(this,"display")))},adblock_trigger:function(){var e=!t("#hustle_optin_adBlock_detector").length;if(e&&_.isTrue(this.triggers.on_adblock))if(_.isFalse(this.triggers.on_adblock_delayed))this.display();else{var i=1e3*parseInt(this.triggers.on_adblock_delayed_time,10);"minutes"===this.triggers.on_adblock_delayed_unit?i*=60:"hours"===this.triggers.on_adblock_delayed_unit&&(i*=3600),_.delay(t.proxy(this,"display"),i)}},closed:function(i){var n=this,s=t(i.currentTarget),o=this.isCC?_.isTrue(this.settings.close_btn_as_never_see):_.isTrue(this.settings.close_button_acts_as_never_see_again);return this.viewed=!1,this.$el.removeClass("wpoi-show"),(s.is(".wph-modal--close .wph-icon, .inc-opt-close-"+this.type)&&o||s.is(".inc_opt_never_see_again,.wph-modal-never-see-again"))&&this.never_see_again(),_.delay(function(){n.viewed||(n.$el.removeClass(n.showClass),"undefined"!=typeof n.mask&&n.mask&&n.mask.removeClass("wpoi-show"))},Optin.popup_overlay_delay),this.settings.animation_in&&(this.settings.animation_out?_.delay(function(){n.viewed||(n.$el.removeClass(n.settings.animation_out),n.$el.addClass(n.settings.animation_in))},1e3):this.$el.addClass(this.settings.animation_in)),this.settings.animation_out||(this.$el.hide(),_.defer(function(){(n.$el[0].style||{}).display=""})),_.isTrue(this.settings.close_button_acts_as_never_see_again)&&_.isTrue(this.settings.trigger_on_exit)&&t(e).off("wpoi:exit_intended"),this.settings.animation_out?_.delay(function(){n.viewed||n.clean()},1100):n.clean(),_.isFalse(this.settings.allow_scroll_page)&&t("html").removeClass("no-scroll"),this.$el.trigger("hide",this),!1},clean:function(){this.$el.html(""),this.should_remove&&(this.$el.remove(),"undefined"!=typeof this.mask&&this.mask&&this.mask.remove())},onShow:function(){t(document).trigger("wpoi:"+this.display_id,[this.type,this.$el,this.opt])},onHide:function(){t(document).trigger("wpoi:hide",[this.type,this.$el,this.opt])}}))}(jQuery,document,window),function(t,e,i){"use strict";if(!inc_opt.is_upfront){var n=window.Optin||{},s=Backbone.Model.extend({url:inc_opt.ajaxurl+"?action=hustle_custom_content_viewed",defaults:{page_type:inc_opt.page_type,page_id:inc_opt.page_id,type:"",uri:encodeURI(window.location.href)},parse:function(t){t.success?console.log("Log success!"):console.log("Log failed!")}}),o=s.extend({url:inc_opt.ajaxurl+"?action=hustle_custom_content_converted"});s=new s,o=new o,n.CC_log_view=s,n.CC_log_conversion=o,n.CCPopUp=n.View.extend({isCC:!0,display_id:"cc_display",showClass:"wph-modal-show",maskClass:"wph-modal--mask",cookie_key:Hustle.consts.Never_See_Aagain_Prefix,events:{click:"click","click .wph-modal--close .wph-icon":"closed","click .wph-modal--cta":"fire_conversion_event","click .wph-modal-never-see-again":"closed","submit form":"on_form_submit"},initialize:function(t){this.opt=t,this.type=t.type,this.data=t.content,this.optin_id=this.data.optin_id,this.settings=t[this.type],this.triggers=this.settings.triggers,this.tracking_types=t.tracking_types,this.appear_after=this.triggers.trigger+"_trigger",this.cookie_key+=this.type+"-"+this.optin_id,this.expiration_days=this.settings.expiration_days?parseInt(this.settings.expiration_days):0,this.settings.display=this.opt.should_display[this.type],this.should_display()&&(this.model=_.extend(this.settings,t.design,this.data,{id:this.optin_id,type:this.type,position:this.settings.position,types:{popup:t.popup,slide_in:t.slide_in,after_content:t.after_content}}),(_.contains(["time","scrolled","adblock"],this.triggers.trigger)||"exit_intent_trigger"===this.appear_after&&_.isTrue(this.settings.on_exit_intent_per_session))&&(this.should_remove=!0),this.render())},render:function(){this.model=_.extend(this.model,this.handle_custom_size(this.model),this.enable_fullscreen(this.model),this.sanitize_cta_url(this.model));var e=n.template("hustle-modal-tpl");e=e(this.model),this.setElement(e),this.$el.appendTo(this.parent),this.$el.display=t.proxy(this,"display"),this.$el.on("show",t.proxy(this,"onShow")),this.$el.on("show",t.proxy(Hustle.Events,"trigger","cc_modal_shown",this,this.type)),this.$el.on("hide",t.proxy(this,"onHide")),this.html=this.$el.html(),null!=this.tracking_types&&_.isTrue(this.tracking_types[this.type])&&Hustle.Events.once("cc_modal_shown",this.logView,this),Hustle.Events.once("cc_modal_shown",this.update_view_count_cookie,this),Hustle.Events.on("cc_modal_shown",this.fit,this),Hustle.Events.on("hustle_resize",this.fit,this),this[this.appear_after](),this.caldera_form_compat()},caldera_form_compat:function(){inc_opt.is_caldera_active&&"undefined"!=typeof calders_forms_init_conditions&&(calders_forms_init_conditions(),t(".caldera_forms_form").find("[data-field]").first().trigger("change"))},logView:function(){s.set("type",this.type),s.set("id",this.optin_id),s.save()},update_view_count_cookie:function(){if(!window.hasOwnProperty("optin_vars")){var t=Hustle.consts.Module_Show_Count+this.model.type+"-"+this.model.id,e=Hustle.cookie.get(t);Hustle.cookie.set(t,e+1,90)}},sanitize_cta_url:function(t){return t.cta_url&&(/^(f|ht)tps?:\/\//i.test(t.cta_url)||(t.cta_url="http://"+t.cta_url)),t},fire_conversion_event:function(e){var i=t(e.currentTarget).hasClass("wph-modal--cta")?"cta":"form";null!=this.tracking_types&&_.isTrue(this.tracking_types[this.type])&&(Hustle.Events.trigger("cc_modal_converted",this,i),o.set("id",this.optin_id),o.set("type",this.type),o.set("source",i),o.save())},enable_fullscreen:function(t){return t.fullscreen="","popup"===this.type&&this.settings.make_fullscreen&&(t.fullscreen="wph-modal-popup-fullscreen"),t},handle_custom_size:function(t){return t.custom_size_attr="",t.custom_size_class="",t.customize_size&&_.isTrue(t.customize_size)&&(t.custom_size_class="wph-modal--custom",t.custom_size_attr+="data-custom_width="+t.custom_width+" data-custom_height="+t.custom_height),t.border&&_.isTrue(t.border)&&(t.custom_size_attr+=" data-border="+t.border_weight),t},on_form_submit:function(e){var i=t(e.target),n=this.settings.on_submit;window.setTimeout(t.proxy(function(){if(!i.hasClass("wpcf7-form")||!i.hasClass("invalid"))switch(n){default:case"refresh_or_close":this.closed(e);break;case"close":case"close_after_form_submit":this.closed(e);break;case"redirect":case"redirect_to_form_target":window.location.replace(i.attr("action"));break;case"refresh_or_nothing":}},this),1500)}}),n.CCSlideIn=n.CCPopUp.extend({key_prefix:"",hide_all_key:"",delay_time:0,should_display:function(){this.key_prefix=Hustle.consts.Slide_Cookie_Prefix+this.optin_id,this.hide_all_key=Hustle.consts.Slide_Cookie_Hide_All+this.optin_id,this.delay_time="minutes"===this.settings.hide_after_unit?60*parseInt(this.settings.hide_after_val,10)*1e3:1e3*parseInt(this.settings.hide_after_val,10);var t=n.cookie.get(this.cookie_key);return _.isFalse(t)&&(t=n.cookie.get(this.key_prefix)),_.isFalse(t)&&(t=n.cookie.get(this.hide_all_key)),"keep_showing"===this.settings.after_close&&t&&(t=!1,n.cookie.set(this.cookie_key,this.optin_id,0),n.cookie.set(this.key_prefix,this.optin_id,0),n.cookie.set(this.hide_all_key,this.optin_id,0)),this.add_mask=_.noop,this.opt.should_display[this.type]&&!_.isTrue(t)},onShow:function(){if(_.isTrue(this.settings.hide_after)){var t=this;_.delay(function(){t.prevent_hide_after||(t.$el.removeClass(t.showClass),t.mask&&t.mask.trigger("click"))},this.delay_time)}n.CCPopUp.prototype.onShow.apply(this,arguments)},onHide:function(){var t=!1;"hide_all"===this.settings.after_close&&(n.cookie.set(this.key_prefix,this.optin_id,30),t=!0),"no_show"===this.settings.after_close&&(n.cookie.set(this.hide_all_key,this.optin_id,30),t=!0),t&&(this.mask&&this.mask.remove(),this.remove())},click:function(){this.prevent_hide_after=!0}}),n.CCAfterContent=n.CCPopUp.extend({should_display:function(){return _.isFalse(this.settings.animate)?this.settings.animation_in=this.settings.animation_out=!1:this.settings.animation_in=this.settings.animation_out=this.settings.animation,this.add_mask=_.noop,this.parent="#cc-"+this.opt.uniq_id,!0}})}}(jQuery,document,window),function(t){"use strict";inc_opt.is_upfront||(Optin=window.Optin||{},Optin.AfterContent=function(){var e,i=t(this),n=i.data("id");e=_.find(Optins,function(t){return n==t.data.optin_id}),i.data("handle",_.findKey(Optins,e)),i.data("type","after_content"),i.html(Optin.render_optin(e)),e.settings.after_content.animate&&"true"==e.settings.after_content.animate&&(i.addClass(e.settings.after_content.animation),_.delay(function(){i.addClass("wpoi-show")},750)),i.find(".wpoi-provider-args").html(Optin.render_provider_args(e)),t(document).trigger("wpoi:display",["after_content",i,e])})}(jQuery),function(t,e,i){"use strict";inc_opt.is_upfront||(Optin=window.Optin||{},Optin.PopUp=Optin.View.extend({className:"inc_opt_popup wpoi-animate inc_optin",type:"popup"}))}(jQuery,document,window),function(t,e,i){"use strict";inc_opt.is_upfront||(Optin=window.Optin||{},Optin.SlideIn=Optin.View.extend({className:"inc_opt_slidein inc_optin wpoi-slide",type:"slide_in",prevent_hide_after:!1,delay_time:0,should_display:function(){var t="popup"===this.type?Optin.POPUP_COOKIE_PREFIX:Optin.SLIDE_IN_COOKIE_PREFIX;t+=this.optin_id;var e=Optin.cookie.get(t);return this.add_mask=_.noop,
|
3 |
-
e||(e=Optin.cookie.get(Optin.SLIDE_IN_COOKIE_PREFIX+this.optin_id)),e||(e=Optin.cookie.get(Optin.SLIDE_IN_COOKIE_HIDE_ALL+this.optin_id)),"keep_showing"===this.settings.after_close&&e&&(e=!1,Optin.cookie.set(Optin.SLIDE_IN_COOKIE_PREFIX+this.optin_id,this.optin_id,0),Optin.cookie.set(Optin.SLIDE_IN_COOKIE_HIDE_ALL+this.optin_id,this.optin_id,0),Optin.cookie.set(t,this.optin_id,0)),_.isTrue(this.settings.display)&&!_.isTrue(e)},render:function(){var t="inc_opt_slidein inc_opt_slidein_"+this.settings.position+" inc_optin wpoi-slide";this.delay_time="minutes"===this.settings.hide_after_unit?60*parseInt(this.settings.hide_after_val,10)*1e3:1e3*parseInt(this.settings.hide_after_val,10),this.$el.addClass(t),Optin.View.prototype.render.apply(this,arguments)},onShow:function(){if(this.mask&&this.mask.removeClass("wpoi-show"),_.isTrue(this.settings.hide_after)){var t=this;_.delay(function(){t.prevent_hide_after||(t.$el.removeClass("wpoi-show"),t.$el.trigger("hide"))},this.delay_time)}Optin.View.prototype.onShow.apply(this,arguments)},onHide:function(){var t=!1;"hide_all"===this.settings.after_close&&(Optin.cookie.set(Optin.SLIDE_IN_COOKIE_HIDE_ALL,this.optin_id,30),t=!0),"no_show"===this.settings.after_close&&(Optin.cookie.set(Optin.SLIDE_IN_COOKIE_PREFIX+this.optin_id,this.optin_id,30),t=!0),t&&(this.mask&&this.mask.remove(),this.remove())},click:function(){this.prevent_hide_after=!0}}))}(jQuery,document,window),function(t,e,i){"use strict";var n=window.Optin||{};n.SS_log_view=Backbone.Model.extend({url:inc_opt.ajaxurl+"?action=hustle_social_sharing_viewed",defaults:{page_type:inc_opt.page_type,page_id:inc_opt.page_id,type:"",uri:encodeURI(window.location.href)},parse:function(t){t.success?console.log("Log success!"):console.log("Log failed!")}}),n.SS_log_conversion=n.SS_log_view.extend({url:inc_opt.ajaxurl+"?action=hustle_social_sharing_converted"}),n.SS_native_share_enpoints={facebook:"https://www.facebook.com/sharer/sharer.php?u=",twitter:"https://twitter.com/intent/tweet?url=",google:"https://plus.google.com/share?url=",pinterest:"https://www.pinterest.com/pin/create/button/?url=",reddit:"https://www.reddit.com/submit?url=",linkedin:"https://www.linkedin.com/shareArticle?mini=true&url=",vkontakte:"https://vk.com/share.php?url="},n.Social_Sharing=Backbone.View.extend({template:n.template("hustle-social-tpl"),events:{"click a.native-social-share":"click_social_native","click a.linked-social-share":"click_social_linked"},initialize:function(t){this.opts=t,this.optin_id=t.optin_id,this.services=t.services,this.appearance=t.appearance,this.floating_social=t.floating_social,this.is_compat="undefined"!=typeof t.is_compat,"undefined"!=typeof t.parent&&(this.parent=t.parent),this.model_json=_.extend({id:this.optin_id,display_type:this.display_type},this.services,this.appearance,this.floating_social),this.render()},render:function(e){var i=this.parent,s=this.model_json.location_align_x,o=this.model_json.location_align_y,a=_.templateSettings;if(this.is_compat&&(n.global_mixin(),_.templateSettings={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g}),this.setElement(this.template(_.extend({},this.model_json))),"floating_social"==this.module_display_type&&(i=t("content"==this.model_json.location_type?"#content":"selector"==this.model_json.location_type?this.model_json.location_target:"body")),0!=i.length){this.$el.appendTo(i);var r=t(".inc_social_sharing_widget_wrap .wph-social-sharing, .inc_social_sharing_shortcode_wrap .wph-social-sharing"),l="floating_social"===this.module_display_type?t(i).find(".wph-social-sharing-"+this.model_json.id).not(r):t(i).find(".wph-social-sharing-"+this.model_json.id),c=l.find(".wph-sshare--container");this._handle_icons_order(),_.each(this.model_json.social_icons,t.proxy(function(t,e){var i="one"==this.model_json.icon_style?n.template("wpoi-sshare-"+e+"-one-svg-front"):n.template("wpoi-sshare-"+e+"-svg-front"),s="native"==this.model_json.service_type?"#":this.sanitize_url(t.link),o="native"==this.model_json.service_type?"":'target="_blank"',a="linked-social-share",r=i();"native"==this.model_json.service_type&&(a="native-social-share",_.isTrue(this.model_json.click_counter)&&(r+='<div class="wph-sshare_social_counter"><span>'+t.counter+"</span></div>"));var l='<a data-social="'+e+'" class="'+a+'" href="'+s+'" '+o+" >"+r+"</a>";c.append(l)},this)),"floating_social"==this.module_display_type&&(l.addClass("wph-social-sharing-float"),"left"==s?l.css("left",this.model_json.location_left+"px"):l.css("right",this.model_json.location_right+"px"),"top"==o?l.css("top",this.model_json.location_top+"px"):l.css("bottom",this.model_json.location_bottom+"px")),"native"==this.model_json.service_type&&("floating_social"==this.module_display_type?"1"==this.model_json.floating_inline_count?c.addClass("wph-sshare--count_inline"):c.addClass("wph-sshare--count_block"):"1"==this.model_json.widget_inline_count?c.addClass("wph-sshare--count_inline"):c.addClass("wph-sshare--count_block")),this.is_compat&&(_.templateSettings=a),this.html=this.$el.html(),this.log_view(this.module_display_type,this.opts)}},_handle_icons_order:function(){var t={},e=this.model_json.social_icons,i=this.model_json.icons_order,n=i.split(",");i&&n.length&&(_.each(n,function(i,n){"undefined"!=typeof e[i]&&(t[i]=e[i],e=_.pick(e,function(t,e){if(i!==e)return e=t}))}),Object.keys(e).length&&(t=_.extend(t,_.pick(e,function(t,e){if("undefined"!=typeof t)return e=t}))),this.model_json.social_icons=t)},sanitize_url:function(t){return t&&(/^(f|ht)tps?:\/\//i.test(t)||(t="http://"+t)),t},click_social_native:function(e){e.preventDefault();var i=this,s=this.$(e.target),o=s.closest("a.native-social-share"),a=o.data("social");this._update_social_counter(o),t('a[data-social="'+a+'"]').not(o).each(function(){i._update_social_counter(t(this))}),this.log_conversion(this.module_display_type,this.opts,a,"native"),a&&"undefined"!=typeof n.SS_native_share_enpoints[a]&&window.open(n.SS_native_share_enpoints[a]+hustle_vars.current_url,"MsgWindow","menubar=no,toolbar=no,resizable=yes,scrollbars=yes")},click_social_linked:function(t){var e=this.$(t.target),i=e.closest("a.linked-social-share"),n=i.data("social");null!=this.opts.tracking_types&&_.isTrue(this.opts.tracking_types[this.module_display_type])&&this.log_conversion(this.module_display_type,this.opts,n,"linked")},_update_social_counter:function(t){_.delay(function(){var e=t.find(".wph-sshare_social_counter span");if(e.length){var i=parseInt(e.text())+1;e.text(i)}},5e3)},log_view:function(t,e){if(null!=e.tracking_types&&_.isTrue(e.tracking_types[t])&&"undefined"!=typeof n.SS_log_view){var i=new n.SS_log_view;i.set("type",t),i.set("id",e.optin_id),i.save()}if(!window.hasOwnProperty("optin_vars")){var s=Hustle.consts.SS_Module_Show_Count+t+"-"+e.optin_id,o=Hustle.cookie.get(s);Hustle.cookie.set(s,o+1,90)}},log_conversion:function(t,e,i,s){var o=!(null==e.tracking_types||!_.isTrue(e.tracking_types[t]));if("undefined"!=typeof n.SS_log_conversion){var a=new n.SS_log_conversion;a.set("type",t),a.set("id",e.optin_id),a.set("source",i+"_icon"),a.set("track",o),a.set("service_type",s),a.save()}}}),n.SS_floating=n.Social_Sharing.extend({module_display_type:"floating_social",display_type:"column"}),n.SS_widget=n.Social_Sharing.extend({module_display_type:"widget",display_type:"row"}),n.SS_shortcode=n.Social_Sharing.extend({module_display_type:"shortcode",display_type:"row"})}(jQuery,document,window),function(t){"use strict";Optin=Optin||{},Optin.handle_cc_shortcode_conversion=function(e,i){var n=(t(window),t(document));t(n).on("click","a.wph-cc-shortcode--cta",function(t){"undefined"!=typeof Optin.CC_log_conversion&&(Optin.CC_log_conversion.set("id",e),Optin.CC_log_conversion.set("type",i),Optin.CC_log_conversion.set("source","cta"),Optin.CC_log_conversion.save())})},Optin.inc_opt_render_widgets=function(e){t(".inc_cc_widget_wrap, .inc_cc_shortcode_wrap").each(function(){var i=t(this),n=i.data("id"),s=i.is(".inc_cc_widget_wrap")?"widget":"shortcode";if(n){var o=_.find(Hustle_Custom_Contents,function(t){return n==t.content.optin_id});if(o){var a=t.parseJSON(o.settings);if(null!==a&&_.isTrue(a[s].enabled)){i.data("handle",_.findKey(Hustle_Custom_Contents,o)),i.data("type",s),o.design.cta_url&&(/^(f|ht)tps?:\/\//i.test(o.design.cta_url)||(o.design.cta_url="http://"+o.design.cta_url)),o.type=s;var r=Optin.render_cc_shortcode(o,e);i.html(r),null!==o.tracking_types&&_.isTrue(o.tracking_types[s])&&(_.delay(function(){t(document).trigger("wpoi:cc_shortcode_or_widget_viewed",[s,n])},_.random(0,300)),Optin.handle_cc_shortcode_conversion(n,s))}}}}),t(".inc_opt_widget_wrap, .inc_opt_shortcode_wrap").each(function(){var i=t(this),n=i.data("id"),s=i.is(".inc_opt_widget_wrap")?"widget":"shortcode";if(n){var o=_.find(Optins,function(t){return n==t.data.optin_id});if(o){i.data("handle",_.findKey(Optins,o)),i.data("type",s);var a=Optin.render_optin(o,e);i.html(a),i.find(".wpoi-provider-args").html(Optin.render_provider_args(o)),_.delay(function(){t(document).trigger("wpoi:display",[s,i,o])},_.random(0,300))}}}),t(".inc_social_sharing_widget_wrap, .inc_social_sharing_shortcode_wrap").each(function(){var i=t(this),n=i.data("id"),s=i.is(".inc_social_sharing_widget_wrap")?"widget":"shortcode";if(n){var o=_.find(Hustle_SS_Modules,function(t){return n==t.optin_id});if(o){var a=t.parseJSON(o.settings);null!==a&&_.isTrue(a[s].enabled)&&(o.parent=i,"undefined"!=typeof e&&e&&(o.is_compat=!0),i.html(""),"widget"==s?new Optin.SS_widget(o):new Optin.SS_shortcode(o))}}})},Optin.inc_opt_render_widgets(!1),Hustle.Events.on("upfront:editor:widget:render",function(t){Optin.inc_opt_render_widgets(!0)}),Hustle.Events.on("upfront:editor:shortcode:render",function(t){Optin.inc_opt_render_widgets(!0)})}(jQuery),function(t,e,i){"use strict";inc_opt.is_upfront||(t(e).on("mouseleave",t.proxy(Hustle.Events,"trigger","exit_intended")),t(window).on("resize",t.proxy(Hustle.Events,"trigger","hustle_resize")),t.each(_.keys(Optins),function(e,i){var n=Optins[i],s=n.settings,o=n.data.optin_id,a={key:i};if(s.popup&&s.popup.enabled&&!_.isTrue(Optin.cookie.get(Optin.POPUP_COOKIE_PREFIX+o))&&new Optin.PopUp(a),s.slide_in&&s.slide_in.enabled&&!_.isTrue(Optin.cookie.get(Optin.SLIDE_IN_COOKIE_HIDE_ALL))&&new Optin.SlideIn(a),s.after_content&&s.after_content.enabled){var r=t('[data-id="'+o+'"]').filter(function(){return t(this).is(".inc_opt_after_content_wrap")});r.length&&r.each(Optin.AfterContent)}}),t.each(Hustle_Custom_Contents,function(t,e){e.id=t,e.should_display&&(_.isTrue(e.should_display.popup)&&_.isTrue(e.popup.enabled)&&(e.type="popup",new Optin.CCPopUp(e)),_.isTrue(e.should_display.slide_in)&&_.isTrue(e.slide_in.enabled)&&(e.type="slide_in",new Optin.CCSlideIn(e)),e.after_content&&_.isTrue(e.should_display.after_content)&&_.isTrue(e.after_content.enabled)&&(e.type="after_content",e.uniq_id=t,new Optin.CCAfterContent(e)))}),_.each(Hustle_SS_Modules,function(t,e){_.isTrue(t.floating_social.enabled)&&_.isTrue(t.is_floating_social_allowed)&&new Optin.SS_floating(t)}))}(jQuery,document,window);
|
4 |
//# sourceMappingURL=maps/front.min.js.map
|
1 |
!function(t){var e="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global;if("function"==typeof define&&define.amd)define(["underscore","jquery","exports"],function(i,n,s){e.Backbone=t(e,s,i,n)});else if("undefined"!=typeof exports){var i,n=require("underscore");try{i=require("jquery")}catch(s){}t(e,exports,n,i)}else e.Backbone=t(e,{},e._,e.jQuery||e.Zepto||e.ender||e.$)}(function(t,e,i,n){var s=t.Backbone,o=Array.prototype.slice;e.VERSION="1.3.3",e.$=n,e.noConflict=function(){return t.Backbone=s,this},e.emulateHTTP=!1,e.emulateJSON=!1;var a=function(t,e,n){switch(t){case 1:return function(){return i[e](this[n])};case 2:return function(t){return i[e](this[n],t)};case 3:return function(t,s){return i[e](this[n],l(t,this),s)};case 4:return function(t,s,o){return i[e](this[n],l(t,this),s,o)};default:return function(){var t=o.call(arguments);return t.unshift(this[n]),i[e].apply(i,t)}}},r=function(t,e,n){i.each(e,function(e,s){i[s]&&(t.prototype[s]=a(e,s,n))})},l=function(t,e){return i.isFunction(t)?t:i.isObject(t)&&!e._isModel(t)?c(t):i.isString(t)?function(e){return e.get(t)}:t},c=function(t){var e=i.matches(t);return function(t){return e(t.attributes)}},h=e.Events={},d=/\s+/,_=function(t,e,n,s,o){var a,r=0;if(n&&"object"==typeof n){void 0!==s&&"context"in o&&void 0===o.context&&(o.context=s);for(a=i.keys(n);r<a.length;r++)e=_(t,e,a[r],n[a[r]],o)}else if(n&&d.test(n))for(a=n.split(d);r<a.length;r++)e=t(e,a[r],s,o);else e=t(e,n,s,o);return e};h.on=function(t,e,i){return p(this,t,e,i)};var p=function(t,e,i,n,s){if(t._events=_(u,t._events||{},e,i,{context:n,ctx:t,listening:s}),s){var o=t._listeners||(t._listeners={});o[s.id]=s}return t};h.listenTo=function(t,e,n){if(!t)return this;var s=t._listenId||(t._listenId=i.uniqueId("l")),o=this._listeningTo||(this._listeningTo={}),a=o[s];if(!a){var r=this._listenId||(this._listenId=i.uniqueId("l"));a=o[s]={obj:t,objId:s,id:r,listeningTo:o,count:0}}return p(t,e,n,this,a),this};var u=function(t,e,i,n){if(i){var s=t[e]||(t[e]=[]),o=n.context,a=n.ctx,r=n.listening;r&&r.count++,s.push({callback:i,context:o,ctx:o||a,listening:r})}return t};h.off=function(t,e,i){return this._events?(this._events=_(g,this._events,t,e,{context:i,listeners:this._listeners}),this):this},h.stopListening=function(t,e,n){var s=this._listeningTo;if(!s)return this;for(var o=t?[t._listenId]:i.keys(s),a=0;a<o.length;a++){var r=s[o[a]];if(!r)break;r.obj.off(e,n,this)}return this};var g=function(t,e,n,s){if(t){var o,a=0,r=s.context,l=s.listeners;if(e||n||r){for(var c=e?[e]:i.keys(t);a<c.length;a++){e=c[a];var h=t[e];if(!h)break;for(var d=[],_=0;_<h.length;_++){var p=h[_];n&&n!==p.callback&&n!==p.callback._callback||r&&r!==p.context?d.push(p):(o=p.listening,o&&0===--o.count&&(delete l[o.id],delete o.listeningTo[o.objId]))}d.length?t[e]=d:delete t[e]}return t}for(var u=i.keys(l);a<u.length;a++)o=l[u[a]],delete l[o.id],delete o.listeningTo[o.objId]}};h.once=function(t,e,n){var s=_(f,{},t,e,i.bind(this.off,this));return"string"==typeof t&&null==n&&(e=void 0),this.on(s,e,n)},h.listenToOnce=function(t,e,n){var s=_(f,{},e,n,i.bind(this.stopListening,this,t));return this.listenTo(t,s)};var f=function(t,e,n,s){if(n){var o=t[e]=i.once(function(){s(e,o),n.apply(this,arguments)});o._callback=n}return t};h.trigger=function(t){if(!this._events)return this;for(var e=Math.max(0,arguments.length-1),i=Array(e),n=0;n<e;n++)i[n]=arguments[n+1];return _(m,this._events,t,void 0,i),this};var m=function(t,e,i,n){if(t){var s=t[e],o=t.all;s&&o&&(o=o.slice()),s&&v(s,n),o&&v(o,[e].concat(n))}return t},v=function(t,e){var i,n=-1,s=t.length,o=e[0],a=e[1],r=e[2];switch(e.length){case 0:for(;++n<s;)(i=t[n]).callback.call(i.ctx);return;case 1:for(;++n<s;)(i=t[n]).callback.call(i.ctx,o);return;case 2:for(;++n<s;)(i=t[n]).callback.call(i.ctx,o,a);return;case 3:for(;++n<s;)(i=t[n]).callback.call(i.ctx,o,a,r);return;default:for(;++n<s;)(i=t[n]).callback.apply(i.ctx,e);return}};h.bind=h.on,h.unbind=h.off,i.extend(e,h);var w=e.Model=function(t,e){var n=t||{};e||(e={}),this.cid=i.uniqueId(this.cidPrefix),this.attributes={},e.collection&&(this.collection=e.collection),e.parse&&(n=this.parse(n,e)||{});var s=i.result(this,"defaults");n=i.defaults(i.extend({},s,n),s),this.set(n,e),this.changed={},this.initialize.apply(this,arguments)};i.extend(w.prototype,h,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",initialize:function(){},toJSON:function(t){return i.clone(this.attributes)},sync:function(){return e.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return i.escape(this.get(t))},has:function(t){return null!=this.get(t)},matches:function(t){return!!i.iteratee(t,this)(this.attributes)},set:function(t,e,n){if(null==t)return this;var s;if("object"==typeof t?(s=t,n=e):(s={})[t]=e,n||(n={}),!this._validate(s,n))return!1;var o=n.unset,a=n.silent,r=[],l=this._changing;this._changing=!0,l||(this._previousAttributes=i.clone(this.attributes),this.changed={});var c=this.attributes,h=this.changed,d=this._previousAttributes;for(var _ in s)e=s[_],i.isEqual(c[_],e)||r.push(_),i.isEqual(d[_],e)?delete h[_]:h[_]=e,o?delete c[_]:c[_]=e;if(this.idAttribute in s&&(this.id=this.get(this.idAttribute)),!a){r.length&&(this._pending=n);for(var p=0;p<r.length;p++)this.trigger("change:"+r[p],this,c[r[p]],n)}if(l)return this;if(!a)for(;this._pending;)n=this._pending,this._pending=!1,this.trigger("change",this,n);return this._pending=!1,this._changing=!1,this},unset:function(t,e){return this.set(t,void 0,i.extend({},e,{unset:!0}))},clear:function(t){var e={};for(var n in this.attributes)e[n]=void 0;return this.set(e,i.extend({},t,{unset:!0}))},hasChanged:function(t){return null==t?!i.isEmpty(this.changed):i.has(this.changed,t)},changedAttributes:function(t){if(!t)return!!this.hasChanged()&&i.clone(this.changed);var e=this._changing?this._previousAttributes:this.attributes,n={};for(var s in t){var o=t[s];i.isEqual(e[s],o)||(n[s]=o)}return!!i.size(n)&&n},previous:function(t){return null!=t&&this._previousAttributes?this._previousAttributes[t]:null},previousAttributes:function(){return i.clone(this._previousAttributes)},fetch:function(t){t=i.extend({parse:!0},t);var e=this,n=t.success;return t.success=function(i){var s=t.parse?e.parse(i,t):i;return!!e.set(s,t)&&(n&&n.call(t.context,e,i,t),void e.trigger("sync",e,i,t))},F(this,t),this.sync("read",this,t)},save:function(t,e,n){var s;null==t||"object"==typeof t?(s=t,n=e):(s={})[t]=e,n=i.extend({validate:!0,parse:!0},n);var o=n.wait;if(s&&!o){if(!this.set(s,n))return!1}else if(!this._validate(s,n))return!1;var a=this,r=n.success,l=this.attributes;n.success=function(t){a.attributes=l;var e=n.parse?a.parse(t,n):t;return o&&(e=i.extend({},s,e)),!(e&&!a.set(e,n))&&(r&&r.call(n.context,a,t,n),void a.trigger("sync",a,t,n))},F(this,n),s&&o&&(this.attributes=i.extend({},l,s));var c=this.isNew()?"create":n.patch?"patch":"update";"patch"!==c||n.attrs||(n.attrs=s);var h=this.sync(c,this,n);return this.attributes=l,h},destroy:function(t){t=t?i.clone(t):{};var e=this,n=t.success,s=t.wait,o=function(){e.stopListening(),e.trigger("destroy",e,e.collection,t)};t.success=function(i){s&&o(),n&&n.call(t.context,e,i,t),e.isNew()||e.trigger("sync",e,i,t)};var a=!1;return this.isNew()?i.defer(t.success):(F(this,t),a=this.sync("delete",this,t)),s||o(),a},url:function(){var t=i.result(this,"urlRoot")||i.result(this.collection,"url")||M();if(this.isNew())return t;var e=this.get(this.idAttribute);return t.replace(/[^\/]$/,"$&/")+encodeURIComponent(e)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(t){return this._validate({},i.extend({},t,{validate:!0}))},_validate:function(t,e){if(!e.validate||!this.validate)return!0;t=i.extend({},this.attributes,t);var n=this.validationError=this.validate(t,e)||null;return!n||(this.trigger("invalid",this,n,i.extend(e,{validationError:n})),!1)}});var y={keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1};r(w,y,"attributes");var k=e.Collection=function(t,e){e||(e={}),e.model&&(this.model=e.model),void 0!==e.comparator&&(this.comparator=e.comparator),this._reset(),this.initialize.apply(this,arguments),t&&this.reset(t,i.extend({silent:!0},e))},b={add:!0,remove:!0,merge:!0},x={add:!0,remove:!1},C=function(t,e,i){i=Math.min(Math.max(i,0),t.length);var n,s=Array(t.length-i),o=e.length;for(n=0;n<s.length;n++)s[n]=t[n+i];for(n=0;n<o;n++)t[n+i]=e[n];for(n=0;n<s.length;n++)t[n+o+i]=s[n]};i.extend(k.prototype,h,{model:w,initialize:function(){},toJSON:function(t){return this.map(function(e){return e.toJSON(t)})},sync:function(){return e.sync.apply(this,arguments)},add:function(t,e){return this.set(t,i.extend({merge:!1},e,x))},remove:function(t,e){e=i.extend({},e);var n=!i.isArray(t);t=n?[t]:t.slice();var s=this._removeModels(t,e);return!e.silent&&s.length&&(e.changes={added:[],merged:[],removed:s},this.trigger("update",this,e)),n?s[0]:s},set:function(t,e){if(null!=t){e=i.extend({},b,e),e.parse&&!this._isModel(t)&&(t=this.parse(t,e)||[]);var n=!i.isArray(t);t=n?[t]:t.slice();var s=e.at;null!=s&&(s=+s),s>this.length&&(s=this.length),s<0&&(s+=this.length+1);var o,a,r=[],l=[],c=[],h=[],d={},_=e.add,p=e.merge,u=e.remove,g=!1,f=this.comparator&&null==s&&e.sort!==!1,m=i.isString(this.comparator)?this.comparator:null;for(a=0;a<t.length;a++){o=t[a];var v=this.get(o);if(v){if(p&&o!==v){var w=this._isModel(o)?o.attributes:o;e.parse&&(w=v.parse(w,e)),v.set(w,e),c.push(v),f&&!g&&(g=v.hasChanged(m))}d[v.cid]||(d[v.cid]=!0,r.push(v)),t[a]=v}else _&&(o=t[a]=this._prepareModel(o,e),o&&(l.push(o),this._addReference(o,e),d[o.cid]=!0,r.push(o)))}if(u){for(a=0;a<this.length;a++)o=this.models[a],d[o.cid]||h.push(o);h.length&&this._removeModels(h,e)}var y=!1,k=!f&&_&&u;if(r.length&&k?(y=this.length!==r.length||i.some(this.models,function(t,e){return t!==r[e]}),this.models.length=0,C(this.models,r,0),this.length=this.models.length):l.length&&(f&&(g=!0),C(this.models,l,null==s?this.length:s),this.length=this.models.length),g&&this.sort({silent:!0}),!e.silent){for(a=0;a<l.length;a++)null!=s&&(e.index=s+a),o=l[a],o.trigger("add",o,this,e);(g||y)&&this.trigger("sort",this,e),(l.length||h.length||c.length)&&(e.changes={added:l,removed:h,merged:c},this.trigger("update",this,e))}return n?t[0]:t}},reset:function(t,e){e=e?i.clone(e):{};for(var n=0;n<this.models.length;n++)this._removeReference(this.models[n],e);return e.previousModels=this.models,this._reset(),t=this.add(t,i.extend({silent:!0},e)),e.silent||this.trigger("reset",this,e),t},push:function(t,e){return this.add(t,i.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);return this.remove(e,t)},unshift:function(t,e){return this.add(t,i.extend({at:0},e))},shift:function(t){var e=this.at(0);return this.remove(e,t)},slice:function(){return o.apply(this.models,arguments)},get:function(t){if(null!=t)return this._byId[t]||this._byId[this.modelId(t.attributes||t)]||t.cid&&this._byId[t.cid]},has:function(t){return null!=this.get(t)},at:function(t){return t<0&&(t+=this.length),this.models[t]},where:function(t,e){return this[e?"find":"filter"](t)},findWhere:function(t){return this.where(t,!0)},sort:function(t){var e=this.comparator;if(!e)throw new Error("Cannot sort a set without a comparator");t||(t={});var n=e.length;return i.isFunction(e)&&(e=i.bind(e,this)),1===n||i.isString(e)?this.models=this.sortBy(e):this.models.sort(e),t.silent||this.trigger("sort",this,t),this},pluck:function(t){return this.map(t+"")},fetch:function(t){t=i.extend({parse:!0},t);var e=t.success,n=this;return t.success=function(i){var s=t.reset?"reset":"set";n[s](i,t),e&&e.call(t.context,n,i,t),n.trigger("sync",n,i,t)},F(this,t),this.sync("read",this,t)},create:function(t,e){e=e?i.clone(e):{};var n=e.wait;if(t=this._prepareModel(t,e),!t)return!1;n||this.add(t,e);var s=this,o=e.success;return e.success=function(t,e,i){n&&s.add(t,i),o&&o.call(i.context,t,e,i)},t.save(null,e),t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(t){return t[this.model.prototype.idAttribute||"id"]},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(t,e){if(this._isModel(t))return t.collection||(t.collection=this),t;e=e?i.clone(e):{},e.collection=this;var n=new this.model(t,e);return n.validationError?(this.trigger("invalid",this,n.validationError,e),!1):n},_removeModels:function(t,e){for(var i=[],n=0;n<t.length;n++){var s=this.get(t[n]);if(s){var o=this.indexOf(s);this.models.splice(o,1),this.length--,delete this._byId[s.cid];var a=this.modelId(s.attributes);null!=a&&delete this._byId[a],e.silent||(e.index=o,s.trigger("remove",s,this,e)),i.push(s),this._removeReference(s,e)}}return i},_isModel:function(t){return t instanceof w},_addReference:function(t,e){this._byId[t.cid]=t;var i=this.modelId(t.attributes);null!=i&&(this._byId[i]=t),t.on("all",this._onModelEvent,this)},_removeReference:function(t,e){delete this._byId[t.cid];var i=this.modelId(t.attributes);null!=i&&delete this._byId[i],this===t.collection&&delete t.collection,t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,i,n){if(e){if(("add"===t||"remove"===t)&&i!==this)return;if("destroy"===t&&this.remove(e,n),"change"===t){var s=this.modelId(e.previousAttributes()),o=this.modelId(e.attributes);s!==o&&(null!=s&&delete this._byId[s],null!=o&&(this._byId[o]=e))}}this.trigger.apply(this,arguments)}});var O={forEach:3,each:3,map:3,collect:3,reduce:0,foldl:0,inject:0,reduceRight:0,foldr:0,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3,groupBy:3,countBy:3,sortBy:3,indexBy:3,findIndex:3,findLastIndex:3};r(k,O,"models");var S=e.View=function(t){this.cid=i.uniqueId("view"),i.extend(this,i.pick(t,I)),this._ensureElement(),this.initialize.apply(this,arguments)},E=/^(\S+)\s*(.*)$/,I=["model","collection","el","id","attributes","className","tagName","events"];i.extend(S.prototype,h,{tagName:"div",$:function(t){return this.$el.find(t)},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(t){return this.undelegateEvents(),this._setElement(t),this.delegateEvents(),this},_setElement:function(t){this.$el=t instanceof e.$?t:e.$(t),this.el=this.$el[0]},delegateEvents:function(t){if(t||(t=i.result(this,"events")),!t)return this;this.undelegateEvents();for(var e in t){var n=t[e];if(i.isFunction(n)||(n=this[n]),n){var s=e.match(E);this.delegate(s[1],s[2],i.bind(n,this))}}return this},delegate:function(t,e,i){return this.$el.on(t+".delegateEvents"+this.cid,e,i),this},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(t,e,i){return this.$el.off(t+".delegateEvents"+this.cid,e,i),this},_createElement:function(t){return document.createElement(t)},_ensureElement:function(){if(this.el)this.setElement(i.result(this,"el"));else{var t=i.extend({},i.result(this,"attributes"));this.id&&(t.id=i.result(this,"id")),this.className&&(t["class"]=i.result(this,"className")),this.setElement(this._createElement(i.result(this,"tagName"))),this._setAttributes(t)}},_setAttributes:function(t){this.$el.attr(t)}}),e.sync=function(t,n,s){var o=T[t];i.defaults(s||(s={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var a={type:o,dataType:"json"};if(s.url||(a.url=i.result(n,"url")||M()),null!=s.data||!n||"create"!==t&&"update"!==t&&"patch"!==t||(a.contentType="application/json",a.data=JSON.stringify(s.attrs||n.toJSON(s))),s.emulateJSON&&(a.contentType="application/x-www-form-urlencoded",a.data=a.data?{model:a.data}:{}),s.emulateHTTP&&("PUT"===o||"DELETE"===o||"PATCH"===o)){a.type="POST",s.emulateJSON&&(a.data._method=o);var r=s.beforeSend;s.beforeSend=function(t){if(t.setRequestHeader("X-HTTP-Method-Override",o),r)return r.apply(this,arguments)}}"GET"===a.type||s.emulateJSON||(a.processData=!1);var l=s.error;s.error=function(t,e,i){s.textStatus=e,s.errorThrown=i,l&&l.call(s.context,t,e,i)};var c=s.xhr=e.ajax(i.extend(a,s));return n.trigger("request",n,c,s),c};var T={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var H=e.Router=function(t){t||(t={}),t.routes&&(this.routes=t.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},$=/\((.*?)\)/g,P=/(\(\?)?:\w+/g,j=/\*\w+/g,z=/[\-{}\[\]+?.,\\\^$|#\s]/g;i.extend(H.prototype,h,{initialize:function(){},route:function(t,n,s){i.isRegExp(t)||(t=this._routeToRegExp(t)),i.isFunction(n)&&(s=n,n=""),s||(s=this[n]);var o=this;return e.history.route(t,function(i){var a=o._extractParameters(t,i);o.execute(s,a,n)!==!1&&(o.trigger.apply(o,["route:"+n].concat(a)),o.trigger("route",n,a),e.history.trigger("route",o,n,a))}),this},execute:function(t,e,i){t&&t.apply(this,e)},navigate:function(t,i){return e.history.navigate(t,i),this},_bindRoutes:function(){if(this.routes){this.routes=i.result(this,"routes");for(var t,e=i.keys(this.routes);null!=(t=e.pop());)this.route(t,this.routes[t])}},_routeToRegExp:function(t){return t=t.replace(z,"\\$&").replace($,"(?:$1)?").replace(P,function(t,e){return e?t:"([^/?]+)"}).replace(j,"([^?]*?)"),new RegExp("^"+t+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(t,e){var n=t.exec(e).slice(1);return i.map(n,function(t,e){return e===n.length-1?t||null:t?decodeURIComponent(t):null})}});var N=e.History=function(){this.handlers=[],this.checkUrl=i.bind(this.checkUrl,this),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},A=/^[#\/]|\s+$/g,R=/^\/+|\/+$/g,U=/#.*$/;N.started=!1,i.extend(N.prototype,h,{interval:50,atRoot:function(){var t=this.location.pathname.replace(/[^\/]$/,"$&/");return t===this.root&&!this.getSearch()},matchRoot:function(){var t=this.decodeFragment(this.location.pathname),e=t.slice(0,this.root.length-1)+"/";return e===this.root},decodeFragment:function(t){return decodeURI(t.replace(/%25/g,"%2525"))},getSearch:function(){var t=this.location.href.replace(/#.*/,"").match(/\?.+/);return t?t[0]:""},getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getPath:function(){var t=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return"/"===t.charAt(0)?t.slice(1):t},getFragment:function(t){return null==t&&(t=this._usePushState||!this._wantsHashChange?this.getPath():this.getHash()),t.replace(A,"")},start:function(t){if(N.started)throw new Error("Backbone.history has already been started");if(N.started=!0,this.options=i.extend({root:"/"},this.options,t),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._hasHashChange="onhashchange"in window&&(void 0===document.documentMode||document.documentMode>7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(R,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||"/";return this.location.replace(e+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var n=document.body,s=n.insertBefore(this.iframe,n.firstChild).contentWindow;s.document.open(),s.document.close(),s.location.hash="#"+this.fragment}var o=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};if(this._usePushState?o("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?o("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};this._usePushState?t("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&t("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),N.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();return e===this.fragment&&this.iframe&&(e=this.getHash(this.iframe.contentWindow)),e!==this.fragment&&(this.iframe&&this.navigate(e),void this.loadUrl())},loadUrl:function(t){return!!this.matchRoot()&&(t=this.fragment=this.getFragment(t),i.some(this.handlers,function(e){if(e.route.test(t))return e.callback(t),!0}))},navigate:function(t,e){if(!N.started)return!1;e&&e!==!0||(e={trigger:!!e}),t=this.getFragment(t||"");var i=this.root;""!==t&&"?"!==t.charAt(0)||(i=i.slice(0,-1)||"/");var n=i+t;if(t=this.decodeFragment(t.replace(U,"")),this.fragment!==t){if(this.fragment=t,this._usePushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,n);else{if(!this._wantsHashChange)return this.location.assign(n);if(this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var s=this.iframe.contentWindow;e.replace||(s.document.open(),s.document.close()),this._updateHash(s.location,t,e.replace)}}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,i){if(i){var n=t.href.replace(/(javascript:|#).*$/,"");t.replace(n+"#"+e)}else t.hash="#"+e}}),e.history=new N;var L=function(t,e){var n,s=this;return n=t&&i.has(t,"constructor")?t.constructor:function(){return s.apply(this,arguments)},i.extend(n,s,e),n.prototype=i.create(s.prototype,t),n.prototype.constructor=n,n.__super__=s.prototype,n};w.extend=k.extend=H.extend=S.extend=N.extend=L;var M=function(){throw new Error('A "url" property or function must be specified')},F=function(t,e){var i=e.error;e.error=function(n){i&&i.call(e.context,t,n,e),t.trigger("error",t,n,e)}};return e}),function(t){"use strict";window.Hustle=function(t,e,i){var n={},s={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g},o=function(s,o){var a=s.split(".");if(a.length){var r=function(n,s){var a=n.split("."),l=a.splice(0,1)[0];if(l){if(a.length)s[l]=s[l]||{};else{var c=o.call(null,t,e,i);s[l]=_.isFunction(c)||"undefined"==typeof c?c:_.extend(s[l]||{},c)}a.length&&l&&r(a.join("."),s[l])}};r(s,n)}else{var l=n[s]||{};n[s]=_.extend(l,o.call(null,t,e,i))}},a=function(){return n},r=function(t){if(t.split(".").length){var e=!1,i=function(t,n){var s=t.split("."),o=s.splice(0,1)[0];e=n[o],s.length&&i(s.join("."),n[o])};return i(t,n),e}return n[t]||!1},l=_.extend({},Backbone.Events),c=Backbone.View.extend({__base_events:{"click .wph-tabs--wrap .wph-tabs--nav li label":"__base_toggle_tab"},initialize:function(){this.events=_.extend({},this.events,this.__base_events),_.isFunction(this.init_mix)&&this.init_mix.apply(this,arguments),this.render&&(this.render=_.wrap(this.render,function(t){this.trigger("before_render"),t.call(this),l.trigger("view.rendered",this),this.trigger("rendered")})),_.isFunction(this.init)&&this.init.apply(this,arguments)},__base_toggle_tab:function(t){var e=this.$(t.target),i=(e.attr("href")||"").replace(/^\#/,""),n=!!i&&this.$("#"+i),s=e.closest(".wph-tabs--wrap"),o=e.closest("li");n&&n.length&&(s.find(".wph-tabs--content").not(n).removeClass("current"),n.addClass("current"),o.addClass("current"),o.siblings().removeClass("current"))}}),h=_.memoize(function(t){var e;return function(i){return e=e||_.template(document.getElementById(t).innerHTML,null,s),e(i).replace("/*<![CDATA[*/","").replace("/*]]>*/","")}}),d=_.memoize(function(t){var e;return function(i){return(e=e||_.template(t,null,s))(i)}}),p=function(){return t.extend(!0,{},s)},u=function(){var e=function(t){var e,i,n,s=document.cookie.split(";");for(n=t+"=",e=0;e<s.length;e+=1){for(i=s[e];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(n)){var o=i.substring(n.length,i.length);return o?JSON.parse(o):o}}return null},i=function(e,i,n){var s,o;i=t.isArray(i)||t.isPlainObject(i)?JSON.stringify(i):i,isNaN(n)?o="":(s=new Date,s.setTime(s.getTime()+24*n*60*60*1e3),o="; expires="+s.toGMTString()),document.cookie=e+"="+i+o+"; path=/"};return{set:i,get:e}}(),g=function(){return{Never_See_Aagain_Prefix:"hustle_never_see_again-",Module_Show_Count:"hustle_module_show_count-",Slide_Cookie_Prefix:"hustle_slide_in_prefix-",Slide_Cookie_Hide_All:"hustle_slide_in_hide_all-",SS_Module_Show_Count:"hustle_ss_module_show_count-"}}();return{define:o,get_modules:a,get:r,Events:l,View:c,template:h,create_template:d,get_template_options:p,cookie:u,consts:g}}(jQuery,document,window)}(jQuery);var Optin=Optin||{};Optin.View={},Optin.Models={},Optin.Events={},"undefined"!=typeof Backbone&&_.extend(Optin.Events,Backbone.Events),function(t){"use strict";Optin.COOKIE_PREFIX="inc_optin_long_hidden-",Optin.POPUP_COOKIE_PREFIX="inc_optin_popup_long_hidden-",Optin.SLIDE_IN_COOKIE_PREFIX="inc_optin_slide_in_long_hidden-",Optin.SLIDE_IN_COOKIE_HIDE_ALL="inc_optin_slide_in_hide_all",Optin.global_mixin=function(){_.mixin({log:function(){console.log(arguments)},toBool:function(t){return _.isBoolean(t)?t:_.isString(t)&&["true","false","1"].indexOf(t.toLowerCase())!==-1?"true"===t.toLowerCase()||"1"===t.toLowerCase():_.isNumber(t)?!!t:!(_.isUndefined(t)||_.isNull(t)||_.isNaN(t))&&t},isTrue:function(t){return!(_.isUndefined(t)||_.isNull(t)||_.isNaN(t))&&(_.isNumber(t)?0!==t:(t=t.toString().toLowerCase(),["1","true","on"].indexOf(t)!==-1))},isFalse:function(t){return!_.isTrue(t)},control_base:function(t,e,i){return i=_.isUndefined(i)?"checked":i,t=_.toBool(t),e=_.isBoolean(t)?_.isTrue(e):e,_.isEqual(t,e)?i+"="+i:""},checked:function(t,e){return _.control_base(t,e,"checked")},selected:function(t,e){return _.control_base(t,e,"selected")},disabled:function(t,e){return _.control_base(t,e,"disabled")},"class":function(t,e,i){return _.isTrue(t)?e:"undefined"!=typeof i?i:""},add_class:function(t,e,i){return"class={class}".replace("{class}",_["class"](t,e,i))},toUpperCase:function(t){return _.isString(t)?t.toUpperCase():""}}),_.findKey||_.mixin({findKey:function(t,e,i){e=cb(e,i);for(var n,s=_.keys(t),o=0,a=s.length;o<a;o++)if(n=s[o],e(t[n],n,t))return n}})},Optin.global_mixin(),Backbone.Model.prototype.toJSON=function(){var t=_.clone(this.attributes);for(var e in t)(t[e]instanceof Backbone.Model||Backbone.Collection&&t[e]instanceof Backbone.Collection)&&(t[e]=t[e].toJSON());return t},String.prototype.toInt=function(){return parseInt(this,10)},String.prototype.isEmpty=function(){return 0===this.length||!this.trim()},Optin.template=_.memoize(function(e){var i,n={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g};return function(s){return i=i||_.template(t("#"+e).html(),null,n),i(s).replace("/*<![CDATA[*/","").replace("/*]]>*/","")}}),Optin.template_compat=_.memoize(function(e){var i;return function(n){return i=i||_.template(t("#"+e).html()),i(n).replace("/*<![CDATA[*/","").replace("/*]]>*/","")}}),Optin.cookie=Hustle.cookie,t(document).on("blur","input, textarea, select",function(){var e=t(this);e.is(":input[type=button], :input[type=submit], :input[type=reset]")||(e.val()&&e.val().trim&&""!==e.val().trim()?e.parent().addClass("wpoi-filled"):e.parent().removeClass("wpoi-filled"))}),Optin.Mixins={_mixins:{},_services_mixins:{},_desing_mixins:{},_display_mixins:{},add:function(t,e){this._mixins[t]=e},get_mixins:function(){return this._mixins},add_services_mixin:function(t,e){this._services_mixins[t]=e},get_services_mixins:function(){return this._services_mixins}}}(jQuery),Hustle.define("Modal",function(t){"use strict";return Backbone.View.extend({template:Optin.template("hustle-modal-tpl"),$mask:t('<div class="wph-modal--mask"></div>'),opts:{},data:{id:"",type:"popup",style:"",title:"",subtitle:"",content:"Content",animation_in:"",animation_out:"",position:""},events:{"click .wph-modal--close a":"hide","submit form":"fire_conversion_event","click .wph-modal--cta":"fire_conversion_event","click .wph-modal-never-see-again":"never_see_again"},initialize:function(t){return this.opts=_.extend({},this.opts,t),t.template&&(this.template=t.template),this.render(),this},render:function(){var t=_.extend({},this.data,this.model.toJSON());if(this.type_data=t.types[t.type],this.animation_in=t.animation_in=t.types[t.type].animation_in||t.animation_in,this.animation_out=t.animation_out=t.types[t.type].animation_out||t.animation_out,t.position=t.types[t.type].position||t.position,t=this.sanitize_cta_url(t),t=this.enable_fullscreen(t),t=this.handle_custom_size_cc(t),this.setElement(this.template(t)),this.$mask=this.$mask.clone(),this.$mask.on("click",_.bind(this.clicked_background,this)),this.$el.find("form").on("submit",_.bind(this.on_form_submit,this)),this.enable_body_scroll(t),window.hasOwnProperty("optin_vars")){var e=this.$el.find("a.wph-icon.i-close");e.length&&e.parent().hide()}return this},hide:function(e){var i=this;e&&e.preventDefault(),i.animation_in!==i.animation_out&&i.$el.removeClass(i.animation_in),_.delay(function(){i.animation_out&&!i.$el.hasClass(i.animation_out)&&i.$el.addClass(i.animation_out),_.delay(function(){i.$el.removeClass("wph-modal-show"),i.$el.prev(".wph-modal--mask").remove(),Hustle.Events.trigger("hide_modal",i),i.trigger("hidden"),_.isTrue(i.type_data.close_btn_as_never_see)&&e&&t(e.target).hasClass("wph-icon i-close")&&i.never_see_again(e)},550)},350),t("html").removeClass("no-scroll")},clicked_background:function(t){_.isTrue(this.type_data.not_close_on_background_click)||this.hide(t)},show:function(){var t=this;if(!window.hasOwnProperty("optin_vars")){var e=Hustle.consts.Module_Show_Count+this.model.get("type")+"-"+this.model.get("id"),i=Hustle.cookie.get(e);Hustle.cookie.set(e,i+1,90)}t.animation_in!==t.animation_out&&t.$el.removeClass(t.animation_out),_.delay(function(){t.$el.addClass("wph-modal-show"),t.trigger("shown",t,t.model.get("type")),Hustle.Events.trigger("show_modal",t,t.model.get("type")),_.delay(function(){t.animation_in&&!t.$el.hasClass(t.animation_in)&&t.$el.addClass(t.animation_in)},350)},550)},sanitize_cta_url:function(t){return t.cta_url&&(/^(f|ht)tps?:\/\//i.test(t.cta_url)||(t.cta_url="http://"+t.cta_url)),t},enable_fullscreen:function(t){if(t.fullscreen="",!t||"undefined"==typeof t.optin_provider||"undefined"==typeof t.type)return t;if("custom_content"==t.optin_provider&&"popup"==t.type){if("undefined"==typeof this.type_data.make_fullscreen)return t;_.isTrue(this.type_data.make_fullscreen)&&(t.fullscreen="wph-modal-popup-fullscreen")}return t},handle_custom_size_cc:function(t){return t.custom_size_attr="",t.custom_size_class="",t&&"undefined"!=typeof t.optin_provider?("custom_content"==t.optin_provider&&(_.isTrue(t.customize_size)&&(t.custom_size_class="wph-modal--custom",t.custom_size_attr+="data-custom_width="+t.custom_width+" data-custom_height="+t.custom_height),_.isTrue(t.border)&&(t.custom_size_attr+=" data-border="+t.border_weight)),t):t},enable_body_scroll:function(e){if(e&&"undefined"!=typeof e.optin_provider&&"undefined"!=typeof e.type&&"custom_content"==e.optin_provider&&"popup"==e.type){if("undefined"==typeof this.type_data.allow_scroll_page)return;_.isTrue(this.type_data.allow_scroll_page)?t("html").addClass("can-scroll"):t("html").addClass("no-scroll")}},fire_conversion_event:function(e){var i=t(e.target).hasClass("wph-modal--cta")?"cta":"form";Hustle.Events.trigger("cc_modal_converted",this,i),
|
2 |
+
this.trigger("converted",this,i)},never_see_again:function(e){e&&e.preventDefault(),window.hasOwnProperty("optin_vars")||Hustle.cookie.set(Hustle.consts.Never_See_Aagain_Prefix+this.model.get("type")+"-"+this.model.get("id"),this.model.get("id"),this.type_data.expiration_days),e&&!t(e.target).hasClass("wph-icon i-close")&&this.hide()},on_form_submit:function(e){var i=this,n=t(e.target),s=this.type_data.on_submit;switch(s){case"close":i.hide();break;case"redirect":window.location.replace(n.attr("action"));break;case"default":}}})}),function(t,e,i){var n=function(t,e,i){if("immediately"===e.trigger_on_time&&i.display(),"time"===e.trigger_on_time){var n;switch(e.appear_after_time_unit){case"minutes":n=60*parseInt(e.appear_after_time_val,10)*1e3;break;case"hours":n=60*parseInt(e.appear_after_time_val,10)*60*1e3;break;default:n=1e3*parseInt(e.appear_after_time_val,10)}_.delay(function(){i.display()},n)}},s=function(n,s,o){var a=!1;if("scrolled"===s.appear_after&&t(i).scroll(_.debounce(function(){a||100*i.pageYOffset/t(e).height()>=parseInt(s.appear_after_page_portion_val,10)&&(o.display(),a=!0)},50)),"selector"===s.appear_after){var r=t(s.appear_after_element_val);r.length&&t(i).scroll(_.debounce(function(){a||i.pageYOffset>=r.position().top&&(o.display(),a=!0)},50))}},o=function(i,n,s){if(""!==t.trim(n.trigger_on_element_click)){var o=t(t.trim(n.trigger_on_element_click));o.length&&t(e).on("click",t.trim(n.trigger_on_element_click),s.display)}t(e).on("click",".inc_opt_hustle_shortcode_trigger",function(e){e.preventDefault(),t(this).data("id")==i.data.optin_id&&s.display()})},a=function(i,n,s){_.isTrue(n.trigger_on_exit)&&(Optin.listen_to_exit_intend(),_.isTrue(n.on_exit_trigger_once_per_session)?t(e).one("wpoi:exit_intended",s.display):t(e).on("wpoi:exit_intended",s.display))},r=function(t,e,i){if(_.isTrue(e.trigger_on_adblock)){if(!Optin.is_adblock_enabled())return;if(_.isTrue(e.trigger_on_adblock_timed)){var n;switch(e.trigger_on_adblock_timed_unit){case"minutes":n=60*parseInt(e.trigger_on_adblock_timed_val,10)*1e3;break;case"hours":n=60*parseInt(e.trigger_on_adblock_timed_val,10)*60*1e3;break;default:n=1e3*parseInt(e.trigger_on_adblock_timed_val,10)}_.delay(function(){i.display()},n)}else i.display()}};Optin.Triggers={time:n,scroll:s,scrolled:s,click:o,exit_intent:a,adblock:r}}(jQuery,document,window),function(t){t(document).on("wpoi:display",function(e,i,n,s){var o="wpoi-optin-{type}-shown-count-".replace("{type}",i)+s.data.optin_id,a=Optin.cookie.get(o)||0;i&&s.settings[i].is_test;Optin.cookie.set(o,a+1,30),null!=s.data.tracking_types&&_.isTrue(s.data.tracking_types[i])&&t.ajax({type:"POST",url:inc_opt.ajaxurl,dataType:"json",data:{action:"inc_opt_optin_viewed",data:{optin_id:s.data.optin_id,page_type:inc_opt.page_type,page_id:inc_opt.page_id,type:i,uri:encodeURI(window.location.href)}},success:function(t){}})}),t(document).on("wpoi:cc_shortcode_or_widget_viewed",function(t,e,i){"undefined"!=typeof Optin.CC_log_view&&(Optin.CC_log_view.set("type",e),Optin.CC_log_view.set("id",i),Optin.CC_log_view.save())})}(jQuery),function(t){Optin=Optin||{},Optin.handle_scroll=function(e,i,n){var s=t(window),o=t(document);s.on("scroll",_.debounce(function(t){var a=e[0],r=a.getBoundingClientRect();r.top>=0&&r.left>=0&&r.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&r.right<=(window.innerWidth||document.documentElement.clientWidth)&&(s.off(t),e.addClass("wpoi-show"),o.trigger("wpoi:display",[i,e,n]))},5,!0))},Optin.handle_cc_scroll=function(e,i,n){var s=t(window),o=t(document);s.on("scroll",_.debounce(function(t){var a=e[0],r=a.getBoundingClientRect();if(r.top>=0&&r.left>=0&&r.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&r.right<=(window.innerWidth||document.documentElement.clientWidth)){s.off(t);var l=_.find(Hustle_Custom_Contents,function(t){return n==t.content.optin_id});if(!l)return;null!=l.tracking_types&&_.isTrue(l.tracking_types[i])&&o.trigger("wpoi:cc_shortcode_or_widget_viewed",[i,n])}},5,!0))}}(jQuery),function(t){function e(e,i){var n=e.find(".required"),s=(t('<i class="wphi-font wphi-error"></i>'),[]);return t(".wpoi-field-error").remove(),n.each(function(){var e=t(this),n=e.attr("name")+"_error";return i?(e.next("label").find("i.wphi-font").addClass("wphi-error"),s.push(e),s):void(_.isEmpty(this.value)||e.is("[type='email']")&&!this.value.trim().match(/^[\S]+\@[a-zA-Z0-9\-]+\.[\S]{2,}$/gi)?(e.next("label").find("i.wphi-font").addClass("wphi-error"),s.push(e)):t("."+n).remove())}),0===s.length}t(document).on("submit",".inc_optin form",function(i){i.preventDefault();var n=t(i.target),s=n.find("button"),o=n.closest(".inc_optin"),a=o.data("handle"),r=o.data("delay_id"),l=Optins[a],c=this,h=(t(this).closest(".wpoi-optin > .wpoi-container"),n.closest(".inc_optin").data("type")),d=h&&l.settings[h].is_test,p=t("<span class='wpoi-submit-failure'>"+inc_opt.l10n.submit_failure+"</span>");n.parent().find(".wpoi-submit-failure").remove(),_.isUndefined(r)||clearTimeout(r),!n.data("sending")&&e(n,d)&&(s.attr("disabled",!0),s.addClass("loading"),n.addClass("loading"),n.data("sending",!0),t.ajax({type:"POST",url:inc_opt.ajaxurl,dataType:"json",data:{action:"inc_opt_submit_opt_in",data:{form:n.serialize(),optin_id:l.data.optin_id,page_type:inc_opt.page_type,page_id:inc_opt.page_id,uri:encodeURI(window.location.href),type:h}},success:function(e){if(e&&e.success){var i=n.closest(".wpoi-hustle");if(l.design.hasOwnProperty("on_submit")&&"page_redirect"===l.design.on_submit)window.location.replace(l.design.page_redirect_url);else if("mailchimp"===l.data.optin_provider&&"undefined"!=typeof e.data.existing&&i.find(".wpoi-success-message .wpoi-content p").html(e.data.message),i.find(".wpoi-success-message").addClass("wpoi-show-message"),l.design.hasOwnProperty("on_success")&&"autoclose"===l.design.on_success){var s=parseInt(l.design.on_success_time),o=l.design.on_success_unit;"m"===o&&(s*=60),s*=1e3,_.delay(function(){var e=t(c).closest(".inc_optin").find(".inc-opt-close-popup");e.length>0?e.trigger("click"):i.find(".wpoi-success-message").removeClass("wpoi-show-message")},s)}}else{var a="";a=e.data?t.isArray(e.data)?e.data.pop():e.data:inc_opt.l10n.submit_failure,p.html(a?a:inc_opt.l10n.submit_failure),n.after(p)}},error:function(){n.after(p)},complete:function(){s.attr("disabled",!1),n.removeClass("loading"),s.removeClass("loading"),n.data("sending",!1)}}))});var i=function(){var e=t(this),i=e.parents(".wpoi-hustle"),n=(t("form",i),t(".wpoi-success-message",i));n.removeClass("wpoi-show-message")};t(document).on("click",".wpoi-success-close",i)}(jQuery);var Optin=Optin||{};!function(t,e){"use strict";function i(){var e=r.height(),i=r.scrollTop(),n=i+e;t.each(a,function(){var e=t(this),s=e.outerHeight(),o=e.offset().top,a=o+s;a>=i&&o<=n?e.addClass("in-view"):e.removeClass("in-view")})}function n(e,i,n,o){"undefined"!=typeof o&&"mailchimp"===o.data.optin_provider&&s(o),"wpoi:display"!==e.type&&"wpoi:cc_display"!==e.type||"popup"!==i?(t(".wpoi-hustle").each(function(){var e=t("popup"===i?window:this),n=t(this);e.width()<=405?n.find(".wpoi-optin").addClass("wpoi-small"):n.find(".wpoi-optin").removeClass("wpoi-small"),e.width()<=585&&e.width()>405?n.find(".wpoi-optin").addClass("wpoi-medium"):n.find(".wpoi-optin").removeClass("wpoi-medium")}),t(".wph-modal").each(function(){var e=t(this).parent(),i=t(this);"widget"!==e.data("type")&&"shortcode"!==e.data("type")||(e.width()<=405?i.addClass("wph-modal--small"):i.removeClass("wph-modal--small"))})):!function(){var e=t("popup"===i?window:this),s=n.find(".wpoi-hustle");e.width()<=405?s.find(".wpoi-optin").addClass("wpoi-small"):s.find(".wpoi-optin").removeClass("wpoi-small"),e.width()<=585&&e.width()>405?s.find(".wpoi-optin").addClass("wpoi-medium"):s.find(".wpoi-optin").removeClass("wpoi-medium")}(),t(".wpoi-mcg-select").each(function(){t(this).parent(".wpoi-provider-args > .wpoi-container > .wpoi-element:nth-child(2) > .wpoi-container > .wpoi-element").css({padding:"0",background:"transparent"})}),t(".wpoi-layout-three .wpoi-optin:not(.wpoi-small) .nocontent:not(.noimage)").each(function(){var e=t(this),i=e.find(".wpoi-aside-x").prev(".wpoi-element"),n=e.find(".wpoi-aside-x").prev(".wpoi-element").find(".wpoi-container.wpoi-col");n.css("height",i.height())}),t(".wpoi-layout-three .wpoi-optin:not(.wpoi-small) > .wpoi-container.noimage:not(.nocontent)").each(function(){var e=t(this),i=e.find(".wpoi-aside-x"),n=e.find(".wpoi-image").next(".wpoi-element"),s=i.prev(".wpoi-element"),o=e.find(".wpoi-content"),a=s.find(".wpoi-col"),r=e.find("form");r.height()>o.height()&&(a.css("height",i.height()+"px"),n.addClass("wpoi-align"),o.addClass("wpoi-align-element")),r.height()<o.height()&&(i.css("height",s.height()+"px"),i.addClass("wpoi-align"),r.addClass("wpoi-align-element"))}),t(".wpoi-layout-three .wpoi-optin:not(.wpoi-small) > .wpoi-container:not(.noimage):not(.nocontent)").each(function(){var e=t(this),i=e.find(".wpoi-aside-x"),n=i.prev(".wpoi-element"),s=e.find("form");s.height()<n.height()&&(i.css("height",n.height()),i.addClass("wpoi-align"),s.addClass("wpoi-align-element"))}),t(".wpoi-layout-three .wpoi-optin:not(.wpoi-small)").each(function(){var e=t(this),i=e.find("form > .wpoi-element:not(.wpoi-provider-args,.wpoi-grouped-element)");i.addClass("wpoi-grouped-element");for(var n=0;n<i.length;n+=2)i.slice(n,n+2).wrapAll('<div class="wpoi-element wpoi-grouped-element" style="background-color: transparent;"><div class="wpoi-container"></div></div>')}),t(".wpoi-layout-four .wpoi-optin:not(.wpoi-small)").each(function(){var e=t(this),i=e.find("form > .wpoi-element:not(.wpoi-provider-args,.wpoi-grouped-element)");i.addClass("wpoi-grouped-element");for(var n=0;n<i.length;n+=2)i.slice(n,n+2).wrapAll('<div class="wpoi-element wpoi-grouped-element" style="background-color: transparent;"><div class="wpoi-container"></div></div>')}),t(".wpoi-layout-four .wpoi-optin:not(.wpoi-small) > .wpoi-container.noimage:not(.nocontent)").each(function(){var e=t(this),i=e.find(".wpoi-aside-xl"),n=e.find(".wpoi-aside-xl > .wpoi-container"),s=i.find(".wpoi-form"),o=i.find("form"),a=i.next(".wpoi-element"),r=a.find(".wpoi-content");r.height()>o.height()&&(n.css("height",i.height()+"px"),s.addClass("wpoi-align"),o.addClass("wpoi-align-element")),r.height()<o.height()&&(a.css("height",n.height()+"px"),a.addClass("wpoi-align"),r.addClass("wpoi-align-element"))}),t(".wpoi-layout-four .wpoi-optin:not(.wpoi-small) > .wpoi-container:not(.noimage):not(.nocontent)").each(function(){var e=t(this),i=e.find(".wpoi-aside-xl"),n=e.find(".wpoi-aside-xl > .wpoi-container"),s=e.find(".wpoi-image"),o=i.find(".wpoi-form"),a=i.find("form"),r=i.next(".wpoi-element"),l=e.find(".wpoi-content");l.height()>n.height()&&(n.css("height",i.height()+"px"),o.css("height",n.height()-s.height()),o.addClass("wpoi-align"),a.addClass("wpoi-align-element")),l.height()<n.height()&&(r.css("height",i.height()+"px"),r.addClass("wpoi-align"),l.addClass("wpoi-align-element"))}),t(".wph-modal").each(function(){var e=t(this),i=e.find(".wph-modal--content"),n=e.find(".wph-modal--content > section"),s=i.find("section > figure"),o=e.find(".wph-modal--content > figure"),a=s.find("img"),r=o.find("img"),l=e.hasClass("wph-modal--cabriolet")&&(s.hasClass("wph-modal--image_full")||s.hasClass("wph-modal--image")&&a.height()<s.height()),c=e.hasClass("wph-modal--simple")&&(o.hasClass("wph-modal--image_full")||o.hasClass("wph-modal--image")&&r.height()<o.height()),h=e.hasClass("wph-modal--minimal")&&(s.hasClass("wph-modal--image_full")||s.hasClass("wph-modal--image")&&a.height()<s.height());(l||h)&&a.css({height:n.height()+"px",width:n.width()+"px"}),c&&r.css({height:i.height()+"px",width:i.width()+"px"});var d=e.find(".wph-modal--content header"),_=e.find(".wph-modal--content footer"),p=e.find(".wph-modal--content"),u=e.find(".wph-modal--content .wph-modal--message"),g=e.find(".wph-modal--content section"),f=e.find(".wph-modal--content .wph-modal--image"),m=e.find(".wph-modal--content .wph-modal--image img"),v=parseInt(e.data("custom_width")),w=parseInt(e.data("custom_height")),y=2*parseInt(e.data("border"));y=isNaN(y)?0:y,v&&w&&(e.css("width",v+"px"),e.css("max-width","none"),e.hasClass("wph-modal--cabriolet")&&(u.outerHeight(w-d.outerHeight(!0)-y),f.outerHeight(u.outerHeight(!0)),m.outerHeight(u.outerHeight(!0))),e.hasClass("wph-modal--simple")&&(p.outerHeight(w),f.outerHeight(p.height()),m.outerHeight(p.height())),e.hasClass("wph-modal--minimal")&&(g.outerHeight(w-(d.outerHeight(!0)+_.outerHeight(!0))-y),f.outerHeight(g.outerHeight(!0)),m.outerHeight(g.outerHeight(!0))))}),t(".wph-cc-shortcode").each(function(){var e=t(this),i=e.find(".wph-cc-shortcode--content"),n=e.find(".wph-cc-shortcode--content > section"),s=i.find("section > figure"),o=e.find(".wph-cc-shortcode--content > figure"),a=s.find("img"),r=o.find("img"),l=e.hasClass("wph-cc-shortcode--cabriolet")&&(s.hasClass("wph-cc-shortcode--image_full")||s.hasClass("wph-cc-shortcode--image")&&a.height()<s.height()),c=e.hasClass("wph-cc-shortcode--simple")&&(o.hasClass("wph-cc-shortcode--image_full")||o.hasClass("wph-cc-shortcode--image")&&r.height()<o.height()),h=e.hasClass("wph-cc-shortcode--minimal")&&(s.hasClass("wph-cc-shortcode--image_full")||s.hasClass("wph-cc-shortcode--image")&&a.height()<s.height());(l||h)&&a.css({height:n.height()+"px",width:n.width()+"px"}),c&&r.css({height:i.height()+"px",width:i.width()+"px"})})}function s(e){"undefined"!=typeof e.provider_args&&"undefined"!=typeof e.provider_args.group||t(".inc_optin_"+e.data.optin_id+" .wpoi-element .wpoi-button").each(function(){var e=t(this),i=e.clone(),n=e.closest(".wpoi-element.wpoi-provider-args"),s=n.siblings(".wpoi-mcg-common-fields");s.find(".wpoi-container").append(i),n.remove()})}function o(t){var e={};return e.custom_size_attr="",e.custom_size_class="",t.customize_size&&_.isTrue(t.customize_size)&&(e.custom_size_class="wph-modal--custom",e.custom_size_attr+="data-custom_width="+t.custom_width+" data-custom_height="+t.custom_height),t.border&&_.isTrue(t.border)&&(e.custom_size_attr+=" data-border="+t.border_weight),e}t.each(["show","hide"],function(e,i){var n=t.fn[i];t.fn[i]=function(){return this.trigger(i),n.apply(this,arguments)}}),Optin.popup_overlay_delay=750,Optin.get_tpl=function(t,e){var i=["optin-layout-one","optin-layout-two","optin-layout-three","optin-layout-four"];return e?Optin.template_compat(i[t]):Optin.template(i[t])},Optin.popup={shown:[],hidden:[],long_hidden:[],is_already_shown:function(t){return-1!==this.shown.indexOf(t)},is_long_hidden:function(t){return!!Optin.cookie.get(Optin.POPUP_COOKIE_PREFIX+t.id)},show:function(t){return!this.is_long_hidden(t)&&(this.is_already_shown(t.id)?void 0:t.show())}};var a=t(".inc_opt_inline_wrap"),r=t(window);t(e).on("wpoi:display",_.debounce(n,100,!1)),t(e).on("wpoi:cc_display",_.debounce(n,100,!1)),t(window).on("resize",_.debounce(n,100,!1)),r.on("scroll resize",_.debounce(i,100,!1)),r.trigger("scroll"),t(document).on("blur","input, textarea, select",function(){var e=t(this);e.is(":input[type=button], :input[type=submit], :input[type=reset]")||(""!==e.val().trim()?e.parent().addClass("wpoi-filled"):e.parent().removeClass("wpoi-filled"))}),t(document).on("focus",".wpoi-optin input.required",function(){t(this).next("label").find("i.wphi-font").removeClass("i-error")}),Optin.render_provider_args=function(e){if(_.isEmpty(e.provider_args)||_.isEmpty(e.data.optin_provider))return"";var i=Optin.template("optin-"+e.data.optin_provider+"-args");return e.provider_args.cta_button=e.design.cta_button,t("#optin-"+e.data.optin_provider+"-args").length?i(e.provider_args):""},Optin.render_optin=function(i,n){var s=!("undefined"==typeof n||!n),o=_.templateSettings;s&&(Optin.global_mixin(),_.templateSettings={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g});var a=parseInt(i.design.form_location),r=Optin.get_tpl(a,s),l=function(){return!("mailchimp"!==i.data.optin_provider||!i.provider_args||"undefined"==typeof i.provider_args.group)},c=_.extend({image_style:"",has_args:l()},i.design,i.design.borders,i.data),h=r(c);return s&&(_.templateSettings=o),t(e).trigger("wpoi:layout:rendered"),h},Optin.render_cc_shortcode=function(i,n){var s=!("undefined"==typeof n||!n),a=[],r=_.templateSettings;a[i.type]={add_never_see_link:""},s&&(Optin.global_mixin(),_.templateSettings={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g});var l=s?Optin.template_compat("hustle-modal-tpl"):Optin.template("hustle-modal-tpl"),c=l(_.extend({type:i.type,id:i.content.optin_id,position:"",animation_in:"",fullscreen:"",types:a},i.content,i.design,o(i.design)));return s&&(_.templateSettings=r),t(e).trigger("wpoi:layout:rendered"),t(e).trigger("wpoi:cc_display",i.type),c};var l=!1;Optin.listen_to_exit_intend=function(){l||(t(e).on("mouseleave",_.debounce(function(i){t(e).trigger("wpoi:exit_intended",i)},100,!0)),l=!0)};var c=!1;Optin.is_adblock_enabled=function(){if(!c)return!t("#hustle_optin_adBlock_detector").length}}(jQuery,document),function(t,e,i){"use strict";inc_opt.is_upfront||(Optin.View=Backbone.View.extend({isCC:!1,display_id:"display",showClass:"wpoi-show",maskShowClass:"inc_optin_",optin_id:"",type:"",settings:{},data:{},add_never_see_again:!1,appear_after:"time",mask:!1,should_remove:!1,parent:"body",anim_in_time:Optin.popup_overlay_delay,anim_out_time:2e3,viewed:!1,events:{click:"click","click .inc-opt-close-btn":"closed","click .inc_opt_never_see_again":"closed"},click:_.noop,initialize:function(t){this.key=t.key,this.opt=Optins[this.key],this.settings=this.opt.settings[this.type],this.data=this.opt.data,this.optin_id=this.data.optin_id,this.maskClass="inc_optin_"+this.optin_id+" "+this.maskClass,this.add_never_see_again=_.isTrue(this.settings.add_never_see_this_message),this.appear_after=this.settings.appear_after,this.cookie_key=("popup"===this.type?Optin.POPUP_COOKIE_PREFIX:Optin.SLIDE_IN_COOKIE_PREFIX)+this.optin_id,this.expiration_days=parseInt(this.settings.never_see_expiry,10),this.triggers={on_time:this.settings.trigger_on_time,on_time_delay:this.settings.appear_after_time_val,on_time_unit:this.settings.appear_after_time_unit,on_scroll:this.settings.appear_after_scroll,on_scroll_page_percent:parseInt(this.settings.appear_after_page_portion_val),on_scroll_css_selector:this.settings.appear_after_element_val,on_click_element:this.settings.trigger_on_element_click,on_exit_intent:this.settings.trigger_on_exit,on_exit_intent_per_session:this.settings.on_exit_trigger_once_per_session,on_adblock:this.settings.trigger_on_adblock,on_adblock_delayed:this.settings.trigger_on_adblock_timed,on_adblock_delayed_time:this.settings.trigger_on_adblock_timed_val,on_adblock_delayed_unit:this.settings.trigger_on_adblock_timed_unit},this.should_display()&&((_.contains(["time","scrolled","adblock"],this.appear_after)||"exit_intent"===this.appear_after&&_.isTrue(this.settings.on_exit_trigger_once_per_session))&&(this.should_remove=!0),this.render())},should_display:function(){return _.isTrue(this.settings.display)&&!_.isTrue(Optin.cookie.get(this.cookie_key))},never_see_again:function(){Optin.cookie.set(this.cookie_key,this.optin_id,this.expiration_days)},fit:function(){var e=t(i).height(),n=e/100*65,s=this.$("header").outerHeight(),o=this.$(".wph-modal--message, .wph-modal--image"),a=n-s;if(this.$el.css("max-height",n),o.css("max-height",a),"popup"===this.type&&"cabriolet"!==this.settings.style){var r=(e-n)/2;r-=1.5*r,this.$el.css("margin-top",r+"px")}},render:function(){var e='<a href="#" aria-label="Close" class="inc-opt-close-btn inc-opt-close-'+this.type+'">×</a>';e+=Optin.render_optin(this.opt);var i={handle:this.key,type:this.type,popup:this.opt};this.add_never_see_again&&(e+='<div class="wpoi-nsa"><a class="inc_opt_never_see_again">%s</a></div>'.replace("%s",inc_opt.l10n.never_see_again)),this.settings.animation_in&&this.$el.addClass(this.settings.animation_in),this.$el.addClass(" inc_optin_"+this.optin_id),this.$el.html(e);var n=this.$(".wpoi-provider-args");return n.length&&n.html(Optin.render_provider_args(this.opt)),this.$el.appendTo(this.parent),this.$el.display=t.proxy(this,"display"),this.$el.on("show",t.proxy(this,"onShow")),this.$el.on("hide",t.proxy(this,"onHide")),this.$el.data(i),this.html=this.$el.html(),this[this.appear_after+"_trigger"](),this},display:function(){this.viewed=!0,this.$el.is("."+this.showClass)||(this.$el.html(this.html),this.$el.removeClass(this.settings.animation_out),this.add_mask(),this.animation_in(),this.$el.trigger("show",this))},add_mask:function(){var e=_.isFalse(this.settings.allow_scroll_page),i=_.isFalse(this.settings.not_close_on_background_click);_.delay(t.proxy(function(){e&&t("html").addClass("no-scroll"),this.mask?this.mask.addClass("wpoi-show"):(this.mask=t('<div class="'+this.maskClass+' wpoi-overlay-mask wpoi-animate fadein"><div class="wpoi-'+this.type+'-overlay"></div></div>'),this.mask.insertBefore(this.$el).addClass("wpoi-show"),i&&this.mask.on("click",t.proxy(this,"closed")))},this),Optin.popup_overlay_delay)},animation_in:function(){var t=this,e=_.isFalse(t.viewed);this.settings.animation_in&&this.$el.addClass(this.settings.animation_in),_.delay(function(){e||(t.$el.addClass(t.showClass),t.settings.animation_out?t.settings.animation_in?_.delay(function(){t.$el.removeClass(t.settings.animation_in),t.$el.addClass(t.settings.animation_out)},350):t.$el.addClass(t.settings.animation_out):t.settings.animation_in&&_.delay(function(){t.$el.removeClass(t.settings.animation_in)},350))},Optin.popup_overlay_delay)},time_trigger:function(){if("immediately"==this.triggers.on_time)this.display();else{var e=1e3*parseInt(this.triggers.on_time_delay,10);"minutes"===this.triggers.on_time_unit?e*=60:"hours"===this.triggers.on_time_unit&&(e*=3600),_.delay(t.proxy(this,"display"),e)}},click_trigger:function(){var i=this,n="";if(""!==(n=t.trim(this.triggers.on_click_element))){var s=t(n);s.length&&t(e).on("click",n,function(t){t.preventDefault(),i.display()})}t(e).on("click",".inc_opt_hustle_shortcode_trigger",function(e){e.preventDefault(),t(this).data("id")==i.data.optin_id&&t(this).data("type")==i.type&&i.display()})},scroll_trigger:function(){var n=this,s=!1;if("scrolled"===this.triggers.on_scroll&&t(i).scroll(_.debounce(function(){s||100*i.pageYOffset/t(e).height()>=parseFloat(n.triggers.on_scroll_page_percent)&&(n.display(),s=!0)},50)),"selector"===this.triggers.on_scroll){var o=t(this.triggers.on_scroll_css_selector);o.length&&t(i).scroll(_.debounce(function(){s||i.pageYOffset>=o.position().top&&(n.display(),s=!0)},50))}},scrolled_trigger:function(){return this.scroll_trigger()},exit_intent_trigger:function(){_.isTrue(this.triggers.on_exit_intent)&&(_.isTrue(this.triggers.on_exit_intent_per_session)?Hustle.Events.once("exit_intended",t.proxy(this,"display")):Hustle.Events.on("exit_intended",t.proxy(this,"display")))},adblock_trigger:function(){var e=!t("#hustle_optin_adBlock_detector").length;if(e&&_.isTrue(this.triggers.on_adblock))if(_.isFalse(this.triggers.on_adblock_delayed))this.display();else{var i=1e3*parseInt(this.triggers.on_adblock_delayed_time,10);"minutes"===this.triggers.on_adblock_delayed_unit?i*=60:"hours"===this.triggers.on_adblock_delayed_unit&&(i*=3600),_.delay(t.proxy(this,"display"),i)}},closed:function(i){var n=this,s=t(i.currentTarget),o=this.isCC?_.isTrue(this.settings.close_btn_as_never_see):_.isTrue(this.settings.close_button_acts_as_never_see_again);return this.viewed=!1,this.$el.removeClass("wpoi-show"),(s.is(".wph-modal--close .wph-icon, .inc-opt-close-"+this.type)&&o||s.is(".inc_opt_never_see_again,.wph-modal-never-see-again"))&&this.never_see_again(),_.delay(function(){n.viewed||(n.$el.removeClass(n.showClass),"undefined"!=typeof n.mask&&n.mask&&n.mask.removeClass("wpoi-show"))},Optin.popup_overlay_delay),this.settings.animation_in&&(this.settings.animation_out?_.delay(function(){n.viewed||(n.$el.removeClass(n.settings.animation_out),n.$el.addClass(n.settings.animation_in))},1e3):this.$el.addClass(this.settings.animation_in)),this.settings.animation_out||(this.$el.hide(),_.defer(function(){(n.$el[0].style||{}).display=""})),_.isTrue(this.settings.close_button_acts_as_never_see_again)&&_.isTrue(this.settings.trigger_on_exit)&&t(e).off("wpoi:exit_intended"),this.settings.animation_out?_.delay(function(){n.viewed||n.clean()},1100):n.clean(),_.isFalse(this.settings.allow_scroll_page)&&t("html").removeClass("no-scroll"),this.$el.trigger("hide",this),!1},clean:function(){this.$el.html(""),this.should_remove&&(this.$el.remove(),"undefined"!=typeof this.mask&&this.mask&&this.mask.remove())},onShow:function(){t(document).trigger("wpoi:"+this.display_id,[this.type,this.$el,this.opt])},onHide:function(){t(document).trigger("wpoi:hide",[this.type,this.$el,this.opt])}}))}(jQuery,document,window),function(t,e,i){"use strict";if(!inc_opt.is_upfront){var n=window.Optin||{},s=Backbone.Model.extend({url:inc_opt.ajaxurl+"?action=hustle_custom_content_viewed",defaults:{page_type:inc_opt.page_type,page_id:inc_opt.page_id,type:"",uri:encodeURI(window.location.href)},parse:function(t){t.success?console.log("Log success!"):console.log("Log failed!")}}),o=s.extend({url:inc_opt.ajaxurl+"?action=hustle_custom_content_converted"});s=new s,o=new o,n.CC_log_view=s,n.CC_log_conversion=o,n.CCPopUp=n.View.extend({isCC:!0,display_id:"cc_display",showClass:"wph-modal-show",maskClass:"wph-modal--mask",cookie_key:Hustle.consts.Never_See_Aagain_Prefix,events:{click:"click","click .wph-modal--close .wph-icon":"closed","click .wph-modal--cta":"fire_conversion_event","click .wph-modal-never-see-again":"closed","submit form":"on_form_submit"},initialize:function(t){this.opt=t,this.type=t.type,this.data=t.content,this.optin_id=this.data.optin_id,this.settings=t[this.type],this.triggers=this.settings.triggers,this.tracking_types=t.tracking_types,this.appear_after=this.triggers.trigger+"_trigger",this.cookie_key+=this.type+"-"+this.optin_id,this.expiration_days=this.settings.expiration_days?parseInt(this.settings.expiration_days):0,this.settings.display=this.opt.should_display[this.type],this.should_display()&&(this.model=_.extend(this.settings,t.design,this.data,{id:this.optin_id,type:this.type,position:this.settings.position,types:{popup:t.popup,slide_in:t.slide_in,after_content:t.after_content}}),(_.contains(["time","scrolled","adblock"],this.triggers.trigger)||"exit_intent_trigger"===this.appear_after&&_.isTrue(this.settings.on_exit_intent_per_session))&&(this.should_remove=!0),this.render())},render:function(){this.model=_.extend(this.model,this.handle_custom_size(this.model),this.enable_fullscreen(this.model),this.sanitize_cta_url(this.model));var e=n.template("hustle-modal-tpl");e=e(this.model),this.setElement(e),this.$el.appendTo(this.parent),this.$el.display=t.proxy(this,"display"),this.$el.on("show",t.proxy(this,"onShow")),this.$el.on("show",t.proxy(Hustle.Events,"trigger","cc_modal_shown",this,this.type)),this.$el.on("hide",t.proxy(this,"onHide")),this.html=this.$el.html(),null!=this.tracking_types&&_.isTrue(this.tracking_types[this.type])&&Hustle.Events.once("cc_modal_shown",this.logView,this),Hustle.Events.once("cc_modal_shown",this.update_view_count_cookie,this),Hustle.Events.on("cc_modal_shown",this.fit,this),Hustle.Events.on("hustle_resize",this.fit,this),this[this.appear_after](),this.caldera_form_compat()},caldera_form_compat:function(){inc_opt.is_caldera_active&&"undefined"!=typeof calders_forms_init_conditions&&(calders_forms_init_conditions(),t(".caldera_forms_form").find("[data-field]").first().trigger("change"))},logView:function(){s.set("type",this.type),s.set("id",this.optin_id),s.save()},update_view_count_cookie:function(){if(!window.hasOwnProperty("optin_vars")){var t=Hustle.consts.Module_Show_Count+this.model.type+"-"+this.model.id,e=Hustle.cookie.get(t);Hustle.cookie.set(t,e+1,90)}},sanitize_cta_url:function(t){return t.cta_url&&(/^(f|ht)tps?:\/\//i.test(t.cta_url)||(t.cta_url="http://"+t.cta_url)),t},fire_conversion_event:function(e){var i=t(e.currentTarget).hasClass("wph-modal--cta")?"cta":"form";null!=this.tracking_types&&_.isTrue(this.tracking_types[this.type])&&(Hustle.Events.trigger("cc_modal_converted",this,i),o.set("id",this.optin_id),o.set("type",this.type),o.set("source",i),o.save())},enable_fullscreen:function(t){return t.fullscreen="","popup"===this.type&&this.settings.make_fullscreen&&(t.fullscreen="wph-modal-popup-fullscreen"),t},handle_custom_size:function(t){return t.custom_size_attr="",t.custom_size_class="",t.customize_size&&_.isTrue(t.customize_size)&&(t.custom_size_class="wph-modal--custom",t.custom_size_attr+="data-custom_width="+t.custom_width+" data-custom_height="+t.custom_height),t.border&&_.isTrue(t.border)&&(t.custom_size_attr+=" data-border="+t.border_weight),t},on_form_submit:function(e){var i=t(e.target),n=this.settings.on_submit;window.setTimeout(t.proxy(function(){if(!i.hasClass("wpcf7-form")||!i.hasClass("invalid"))switch(n){default:case"refresh_or_close":this.closed(e);break;case"close":case"close_after_form_submit":this.closed(e);break;case"redirect":case"redirect_to_form_target":window.location.replace(i.attr("action"));break;case"refresh_or_nothing":}},this),1500)}}),n.CCSlideIn=n.CCPopUp.extend({key_prefix:"",hide_all_key:"",delay_time:0,should_display:function(){this.key_prefix=Hustle.consts.Slide_Cookie_Prefix+this.optin_id,this.hide_all_key=Hustle.consts.Slide_Cookie_Hide_All+this.optin_id,this.delay_time="minutes"===this.settings.hide_after_unit?60*parseInt(this.settings.hide_after_val,10)*1e3:1e3*parseInt(this.settings.hide_after_val,10);var t=n.cookie.get(this.cookie_key);return _.isFalse(t)&&(t=n.cookie.get(this.key_prefix)),_.isFalse(t)&&(t=n.cookie.get(this.hide_all_key)),"keep_showing"===this.settings.after_close&&t&&(t=!1,n.cookie.set(this.cookie_key,this.optin_id,0),n.cookie.set(this.key_prefix,this.optin_id,0),n.cookie.set(this.hide_all_key,this.optin_id,0)),this.add_mask=_.noop,this.opt.should_display[this.type]&&!_.isTrue(t)},onShow:function(){if(_.isTrue(this.settings.hide_after)){var t=this;_.delay(function(){t.prevent_hide_after||(t.$el.removeClass(t.showClass),t.mask&&t.mask.trigger("click"))},this.delay_time)}n.CCPopUp.prototype.onShow.apply(this,arguments)},onHide:function(){var t=!1;"hide_all"===this.settings.after_close&&(n.cookie.set(this.key_prefix,this.optin_id,30),t=!0),"no_show"===this.settings.after_close&&(n.cookie.set(this.hide_all_key,this.optin_id,30),t=!0),t&&(this.mask&&this.mask.remove(),this.remove())},click:function(){this.prevent_hide_after=!0}}),n.CCAfterContent=n.CCPopUp.extend({should_display:function(){return _.isFalse(this.settings.animate)?this.settings.animation_in=this.settings.animation_out=!1:this.settings.animation_in=this.settings.animation_out=this.settings.animation,this.add_mask=_.noop,this.parent="#cc-"+this.opt.uniq_id,!0}})}}(jQuery,document,window),function(t){"use strict";inc_opt.is_upfront||(Optin=window.Optin||{},Optin.AfterContent=function(){var e,i=t(this),n=i.data("id");e=_.find(Optins,function(t){return n==t.data.optin_id}),i.data("handle",_.findKey(Optins,e)),i.data("type","after_content"),i.html(Optin.render_optin(e)),e.settings.after_content.animate&&"true"==e.settings.after_content.animate&&(i.addClass(e.settings.after_content.animation),_.delay(function(){i.addClass("wpoi-show")},750)),i.find(".wpoi-provider-args").html(Optin.render_provider_args(e)),t(document).trigger("wpoi:display",["after_content",i,e])})}(jQuery),function(t,e,i){"use strict";inc_opt.is_upfront||(Optin=window.Optin||{},Optin.PopUp=Optin.View.extend({className:"inc_opt_popup wpoi-animate inc_optin",type:"popup"}))}(jQuery,document,window),function(t,e,i){"use strict";inc_opt.is_upfront||(Optin=window.Optin||{},Optin.SlideIn=Optin.View.extend({className:"inc_opt_slidein inc_optin wpoi-slide",type:"slide_in",prevent_hide_after:!1,delay_time:0,should_display:function(){var t="popup"===this.type?Optin.POPUP_COOKIE_PREFIX:Optin.SLIDE_IN_COOKIE_PREFIX;
|
3 |
+
t+=this.optin_id;var e=Optin.cookie.get(t);return this.add_mask=_.noop,e||(e=Optin.cookie.get(Optin.SLIDE_IN_COOKIE_PREFIX+this.optin_id)),e||(e=Optin.cookie.get(Optin.SLIDE_IN_COOKIE_HIDE_ALL+this.optin_id)),"keep_showing"===this.settings.after_close&&e&&(e=!1,Optin.cookie.set(Optin.SLIDE_IN_COOKIE_PREFIX+this.optin_id,this.optin_id,0),Optin.cookie.set(Optin.SLIDE_IN_COOKIE_HIDE_ALL+this.optin_id,this.optin_id,0),Optin.cookie.set(t,this.optin_id,0)),_.isTrue(this.settings.display)&&!_.isTrue(e)},render:function(){var t="inc_opt_slidein inc_opt_slidein_"+this.settings.position+" inc_optin wpoi-slide";this.delay_time="minutes"===this.settings.hide_after_unit?60*parseInt(this.settings.hide_after_val,10)*1e3:1e3*parseInt(this.settings.hide_after_val,10),this.$el.addClass(t),Optin.View.prototype.render.apply(this,arguments)},onShow:function(){if(this.mask&&this.mask.removeClass("wpoi-show"),_.isTrue(this.settings.hide_after)){var t=this;_.delay(function(){t.prevent_hide_after||(t.$el.removeClass("wpoi-show"),t.$el.trigger("hide"))},this.delay_time)}Optin.View.prototype.onShow.apply(this,arguments)},onHide:function(){var t=!1;"hide_all"===this.settings.after_close&&(Optin.cookie.set(Optin.SLIDE_IN_COOKIE_HIDE_ALL,this.optin_id,30),t=!0),"no_show"===this.settings.after_close&&(Optin.cookie.set(Optin.SLIDE_IN_COOKIE_PREFIX+this.optin_id,this.optin_id,30),t=!0),t&&(this.mask&&this.mask.remove(),this.remove())},click:function(){this.prevent_hide_after=!0}}))}(jQuery,document,window),function(t,e,i){"use strict";var n=window.Optin||{};n.SS_log_view=Backbone.Model.extend({url:inc_opt.ajaxurl+"?action=hustle_social_sharing_viewed",defaults:{page_type:inc_opt.page_type,page_id:inc_opt.page_id,type:"",uri:encodeURI(window.location.href)},parse:function(t){t.success?console.log("Log success!"):console.log("Log failed!")}}),n.SS_log_conversion=n.SS_log_view.extend({url:inc_opt.ajaxurl+"?action=hustle_social_sharing_converted"}),n.SS_native_share_enpoints={facebook:"https://www.facebook.com/sharer/sharer.php?u=",twitter:"https://twitter.com/intent/tweet?url=",google:"https://plus.google.com/share?url=",pinterest:"https://www.pinterest.com/pin/create/button/?url=",reddit:"https://www.reddit.com/submit?url=",linkedin:"https://www.linkedin.com/shareArticle?mini=true&url=",vkontakte:"https://vk.com/share.php?url="},n.Social_Sharing=Backbone.View.extend({template:n.template("hustle-social-tpl"),events:{"click a.native-social-share":"click_social_native","click a.linked-social-share":"click_social_linked"},initialize:function(t){this.opts=t,this.optin_id=t.optin_id,this.services=t.services,this.appearance=t.appearance,this.floating_social=t.floating_social,this.is_compat="undefined"!=typeof t.is_compat,"undefined"!=typeof t.parent&&(this.parent=t.parent),this.model_json=_.extend({id:this.optin_id,display_type:this.display_type},this.services,this.appearance,this.floating_social),this.render()},render:function(e){var i=this.parent,s=this.model_json.location_align_x,o=this.model_json.location_align_y,a=_.templateSettings;if(this.is_compat&&(n.global_mixin(),_.templateSettings={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g}),this.setElement(this.template(_.extend({},this.model_json))),"floating_social"==this.module_display_type&&(i=t("content"==this.model_json.location_type?"#content":"selector"==this.model_json.location_type?this.model_json.location_target:"body")),0!=i.length){this.$el.appendTo(i);var r=t(".inc_social_sharing_widget_wrap .wph-social-sharing, .inc_social_sharing_shortcode_wrap .wph-social-sharing"),l="floating_social"===this.module_display_type?t(i).find(".wph-social-sharing-"+this.model_json.id).not(r):t(i).find(".wph-social-sharing-"+this.model_json.id),c=l.find(".wph-sshare--container");this._handle_icons_order(),_.each(this.model_json.social_icons,t.proxy(function(t,e){var i="one"==this.model_json.icon_style?n.template("wpoi-sshare-"+e+"-one-svg-front"):n.template("wpoi-sshare-"+e+"-svg-front"),s="native"==this.model_json.service_type?"#":this.sanitize_url(t.link),o="native"==this.model_json.service_type?"":'target="_blank"',a="linked-social-share",r=i();"native"==this.model_json.service_type&&(a="native-social-share",_.isTrue(this.model_json.click_counter)&&(r+='<div class="wph-sshare_social_counter"><span>'+t.counter+"</span></div>"));var l='<a data-social="'+e+'" class="'+a+'" href="'+s+'" '+o+" >"+r+"</a>";c.append(l)},this)),"floating_social"==this.module_display_type&&(l.addClass("wph-social-sharing-float"),"left"==s?l.css("left",this.model_json.location_left+"px"):l.css("right",this.model_json.location_right+"px"),"top"==o?l.css("top",this.model_json.location_top+"px"):l.css("bottom",this.model_json.location_bottom+"px")),"native"==this.model_json.service_type&&("floating_social"==this.module_display_type?"1"==this.model_json.floating_inline_count?c.addClass("wph-sshare--count_inline"):c.addClass("wph-sshare--count_block"):"1"==this.model_json.widget_inline_count?c.addClass("wph-sshare--count_inline"):c.addClass("wph-sshare--count_block")),this.is_compat&&(_.templateSettings=a),this.html=this.$el.html(),this.log_view(this.module_display_type,this.opts)}},_handle_icons_order:function(){var t={},e=this.model_json.social_icons,i=this.model_json.icons_order,n=i.split(",");i&&n.length&&(_.each(n,function(i,n){"undefined"!=typeof e[i]&&(t[i]=e[i],e=_.pick(e,function(t,e){if(i!==e)return e=t}))}),Object.keys(e).length&&(t=_.extend(t,_.pick(e,function(t,e){if("undefined"!=typeof t)return e=t}))),this.model_json.social_icons=t)},sanitize_url:function(t){return t&&(/^(f|ht)tps?:\/\//i.test(t)||(t="http://"+t)),t},click_social_native:function(e){e.preventDefault();var i=this,s=this.$(e.target),o=s.closest("a.native-social-share"),a=o.data("social");this._update_social_counter(o),t('a[data-social="'+a+'"]').not(o).each(function(){i._update_social_counter(t(this))}),this.log_conversion(this.module_display_type,this.opts,a,"native"),a&&"undefined"!=typeof n.SS_native_share_enpoints[a]&&window.open(n.SS_native_share_enpoints[a]+hustle_vars.current_url,"MsgWindow","menubar=no,toolbar=no,resizable=yes,scrollbars=yes")},click_social_linked:function(t){var e=this.$(t.target),i=e.closest("a.linked-social-share"),n=i.data("social");null!=this.opts.tracking_types&&_.isTrue(this.opts.tracking_types[this.module_display_type])&&this.log_conversion(this.module_display_type,this.opts,n,"linked")},_update_social_counter:function(t){_.delay(function(){var e=t.find(".wph-sshare_social_counter span");if(e.length){var i=parseInt(e.text())+1;e.text(i)}},5e3)},log_view:function(t,e){if(null!=e.tracking_types&&_.isTrue(e.tracking_types[t])&&"undefined"!=typeof n.SS_log_view){var i=new n.SS_log_view;i.set("type",t),i.set("id",e.optin_id),i.save()}if(!window.hasOwnProperty("optin_vars")){var s=Hustle.consts.SS_Module_Show_Count+t+"-"+e.optin_id,o=Hustle.cookie.get(s);Hustle.cookie.set(s,o+1,90)}},log_conversion:function(t,e,i,s){var o=!(null==e.tracking_types||!_.isTrue(e.tracking_types[t]));if("undefined"!=typeof n.SS_log_conversion){var a=new n.SS_log_conversion;a.set("type",t),a.set("id",e.optin_id),a.set("source",i+"_icon"),a.set("track",o),a.set("service_type",s),a.save()}}}),n.SS_floating=n.Social_Sharing.extend({module_display_type:"floating_social",display_type:"column"}),n.SS_widget=n.Social_Sharing.extend({module_display_type:"widget",display_type:"row"}),n.SS_shortcode=n.Social_Sharing.extend({module_display_type:"shortcode",display_type:"row"})}(jQuery,document,window),function(t){"use strict";Optin=Optin||{},Optin.handle_cc_shortcode_conversion=function(e,i){var n=(t(window),t(document));t(n).on("click","a.wph-cc-shortcode--cta",function(t){"undefined"!=typeof Optin.CC_log_conversion&&(Optin.CC_log_conversion.set("id",e),Optin.CC_log_conversion.set("type",i),Optin.CC_log_conversion.set("source","cta"),Optin.CC_log_conversion.save())})},Optin.inc_opt_render_widgets=function(e){t(".inc_cc_widget_wrap, .inc_cc_shortcode_wrap").each(function(){var i=t(this),n=i.data("id"),s=i.is(".inc_cc_widget_wrap")?"widget":"shortcode";if(n){var o=_.find(Hustle_Custom_Contents,function(t){return n==t.content.optin_id});if(o){var a=t.parseJSON(o.settings);if(null!==a&&_.isTrue(a[s].enabled)){i.data("handle",_.findKey(Hustle_Custom_Contents,o)),i.data("type",s),o.design.cta_url&&(/^(f|ht)tps?:\/\//i.test(o.design.cta_url)||(o.design.cta_url="http://"+o.design.cta_url)),o.type=s;var r=Optin.render_cc_shortcode(o,e);i.html(r),null!==o.tracking_types&&_.isTrue(o.tracking_types[s])&&(_.delay(function(){t(document).trigger("wpoi:cc_shortcode_or_widget_viewed",[s,n])},_.random(0,300)),Optin.handle_cc_shortcode_conversion(n,s))}}}}),t(".inc_opt_widget_wrap, .inc_opt_shortcode_wrap").each(function(){var i=t(this),n=i.data("id"),s=i.is(".inc_opt_widget_wrap")?"widget":"shortcode";if(n){var o=_.find(Optins,function(t){return n==t.data.optin_id});if(o){i.data("handle",_.findKey(Optins,o)),i.data("type",s);var a=Optin.render_optin(o,e);i.html(a),i.find(".wpoi-provider-args").html(Optin.render_provider_args(o)),_.delay(function(){t(document).trigger("wpoi:display",[s,i,o])},_.random(0,300))}}}),t(".inc_social_sharing_widget_wrap, .inc_social_sharing_shortcode_wrap").each(function(){var i=t(this),n=i.data("id"),s=i.is(".inc_social_sharing_widget_wrap")?"widget":"shortcode";if(n){var o=_.find(Hustle_SS_Modules,function(t){return n==t.optin_id});if(o){var a=t.parseJSON(o.settings);null!==a&&_.isTrue(a[s].enabled)&&(o.parent=i,"undefined"!=typeof e&&e&&(o.is_compat=!0),i.html(""),"widget"==s?new Optin.SS_widget(o):new Optin.SS_shortcode(o))}}})},Optin.inc_opt_render_widgets(!1),Hustle.Events.on("upfront:editor:widget:render",function(t){Optin.inc_opt_render_widgets(!0)}),Hustle.Events.on("upfront:editor:shortcode:render",function(t){Optin.inc_opt_render_widgets(!0)})}(jQuery),function(t,e,i){"use strict";inc_opt.is_upfront||(t(e).on("mouseleave",t.proxy(Hustle.Events,"trigger","exit_intended")),t(window).on("resize",t.proxy(Hustle.Events,"trigger","hustle_resize")),t.each(_.keys(Optins),function(e,i){var n=Optins[i],s=n.settings,o=n.data.optin_id,a={key:i};if(s.popup&&s.popup.enabled&&!_.isTrue(Optin.cookie.get(Optin.POPUP_COOKIE_PREFIX+o))&&new Optin.PopUp(a),s.slide_in&&s.slide_in.enabled&&!_.isTrue(Optin.cookie.get(Optin.SLIDE_IN_COOKIE_HIDE_ALL))&&new Optin.SlideIn(a),s.after_content&&s.after_content.enabled){var r=t('[data-id="'+o+'"]').filter(function(){return t(this).is(".inc_opt_after_content_wrap")});r.length&&r.each(Optin.AfterContent)}}),t.each(Hustle_Custom_Contents,function(t,e){e.id=t,e.should_display&&(_.isTrue(e.should_display.popup)&&_.isTrue(e.popup.enabled)&&(e.type="popup",new Optin.CCPopUp(e)),_.isTrue(e.should_display.slide_in)&&_.isTrue(e.slide_in.enabled)&&(e.type="slide_in",new Optin.CCSlideIn(e)),e.after_content&&_.isTrue(e.should_display.after_content)&&_.isTrue(e.after_content.enabled)&&(e.type="after_content",e.uniq_id=t,new Optin.CCAfterContent(e)))}),_.each(Hustle_SS_Modules,function(t,e){_.isTrue(t.floating_social.enabled)&&_.isTrue(t.is_floating_social_allowed)&&new Optin.SS_floating(t)}))}(jQuery,document,window);
|
4 |
//# sourceMappingURL=maps/front.min.js.map
|
assets/js/front/front_utils.js
CHANGED
@@ -71,7 +71,7 @@ var Optin = Optin || {};
|
|
71 |
function add_proper_classes(e, type, $popup, data){
|
72 |
|
73 |
// relocate mailchimp submit button if no groups
|
74 |
-
if ( data.data.optin_provider === 'mailchimp' ) {
|
75 |
relocate_mailchimp_button(data);
|
76 |
}
|
77 |
|
@@ -436,6 +436,7 @@ var Optin = Optin || {};
|
|
436 |
//Mailchimp might not always have groups
|
437 |
if( "mailchimp" === optin_data.data.optin_provider
|
438 |
&& optin_data.provider_args
|
|
|
439 |
)
|
440 |
return true;
|
441 |
|
71 |
function add_proper_classes(e, type, $popup, data){
|
72 |
|
73 |
// relocate mailchimp submit button if no groups
|
74 |
+
if ( typeof data !== 'undefined' && data.data.optin_provider === 'mailchimp' ) {
|
75 |
relocate_mailchimp_button(data);
|
76 |
}
|
77 |
|
436 |
//Mailchimp might not always have groups
|
437 |
if( "mailchimp" === optin_data.data.optin_provider
|
438 |
&& optin_data.provider_args
|
439 |
+
&& ( typeof optin_data.provider_args.group !== 'undefined' )
|
440 |
)
|
441 |
return true;
|
442 |
|
assets/js/maps/admin.min.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["hustle.js","utils.js","admin_utils.js","modal.js","commons.js","delete-confirmation.js","media-holder.js","model-updater.js","conditions-view.js","conditions.js","display-triggers.js","e-newsletter.js","modules-activity.js","services-edit-modal.js","services.js","pure-jquery.js","models.js","views.js","after-content-view.js","content-view.js","design-view.js","listing.js","popup-view.js","preview.js","slide_in-view.js","view.js","appearance-view.js","floating-social-view.js","services-view.js","custom-content.js","social-sharing.js","error-list.js","subscription-list-modal.js","optin.js","dashboard.js","settings.js","abcprovider.js","activecampaign.js","convertkit.js","hubspot.js","infusion_soft.js","mad_mimi.js","mailchimp.js","mautic.js","others.js","sendinblue.js","sendy.js","wizard.js","services-tab.js","design-tab.js","display-tab.js","router.js"],"names":["$","window","Hustle","doc","win","_modules","_template_options","evaluate","interpolate","escape","define","module_name","module","splits","split","length","recursive","modules","arr","_module_name","splice","invoked","call","_","isFunction","extend","join","m","get_modules","get","Events","Backbone","View","__base_events","click .wph-tabs--wrap .wph-tabs--nav li label","initialize","this","events","init_mix","apply","arguments","render","wrap","trigger","init","__base_toggle_tab","e","$this","target","href","attr","replace","$content","$wrap","closest","$li","find","not","removeClass","addClass","siblings","template","memoize","id","compiled","data","document","getElementById","innerHTML","create_template","str","cache","get_template_options","cookie","name","i","c","cookie_name","ca","charAt","substring","indexOf","_val","JSON","parse","set","value","days","date","expires","isArray","isPlainObject","stringify","isNaN","Date","setTime","getTime","toGMTString","consts","Never_See_Aagain_Prefix","Module_Show_Count","Slide_Cookie_Prefix","Slide_Cookie_Hide_All","SS_Module_Show_Count","jQuery","Optin","Models","COOKIE_PREFIX","POPUP_COOKIE_PREFIX","SLIDE_IN_COOKIE_PREFIX","SLIDE_IN_COOKIE_HIDE_ALL","global_mixin","mixin","log","console","toBool","val","isBoolean","isString","toLowerCase","isNumber","isUndefined","isNull","isTrue","toString","isFalse","control_base","checked","current","attribute","isEqual","selected","disabled","class","conditon","cls","negating_cls","add_class","toUpperCase","findKey","obj","predicate","context","cb","key","keys","Model","prototype","toJSON","json","clone","attributes","Collection","String","toInt","parseInt","isEmpty","trim","options","html","template_compat","on","is","parent","Mixins","_mixins","_services_mixins","_desing_mixins","_display_mixins","add","get_mixins","add_services_mixin","get_services_mixins","Template_Mixin","change input[type=text]","keyup .wpoi_contenteditable","change input[type=radio]","change select","change input[type=checkbox]","blur input[type=text]","blur input[type=number]","set_model_texts","$el","model","set_model_contenteditables","text","set_model_radios","set_model_selects","set_model_checkboxes","$mask","opts","type","style","title","subtitle","content","animation_in","animation_out","position","click .wph-modal--close a","submit form","click .wph-modal--cta","click .wph-modal-never-see-again","type_data","types","sanitize_cta_url","enable_fullscreen","handle_custom_size_cc","setElement","bind","clicked_background","on_form_submit","enable_body_scroll","hasOwnProperty","$close_btn","hide","self","preventDefault","delay","hasClass","prev","remove","close_btn_as_never_see","never_see_again","not_close_on_background_click","show","show_count_key","current_show_count","cta_url","test","fullscreen","optin_provider","make_fullscreen","custom_size_attr","custom_size_class","customize_size","custom_width","custom_height","border","border_weight","allow_scroll_page","fire_conversion_event","source","expiration_days","$form","on_submit","location","view","wpmuiSelect","className","tagName","nonce","action","url","ajaxurl","click .hustle-delete-module-confirm","click .hustle-delete-module-cancel","confirm","stopPropagation","$spinner","button_width","outerWidth","append","animate","width","ajax","_ajax_nonce","complete","success","res","onSuccess","cancel","media_frame","optin_vars","messages","media_uploader","select_or_upload","button_text","use_this_image","multiple","click .wph-media--add","click .wph-button--dots","click .i-close","click .wpoi-swap-image-button","click .wpoi-delete-image-button","Error","close_media_options","image","define_media_frame","$preview","$holder","$options","wp","media","button","state","first","css","open","toggle_options","toggleClass","$target","$media","$list","$items","$svg","swap_image","delete_image","_events","delegateEvents","change input[type='text']","change input[type='number']","change input[type='checkbox']","_update_text","silent","_update_checkbox","_update_radios","_update_select","handle_tpl","click .wph-conditions--side .wph-conditions--item:not(.disabled)","click .wph-conditions--side .wph-conditions--item:not(.disabled) span","click .wph-conditions--item header","active_conditions","listenTo","toggle_empty_message","conditions","type_name","each","Conditions","condition","handle","label","get_label","cid","get_condition_cid","active_class","icon_class","add_condition_panel","settings","take_care_of_connected_conditions","this_condition","disable","disable_id","index","$disable_handle","add_condition","$handle","get_configs","remove_condition","off","unset","me","toggle_condition","toggle_panel","debounce","$panel","$section","slideToggle","get_conditions_labels","labels","pluck","tpl","map","condition_labels","everywhere","get_all_conditions_labels","default_conditions","posts","all_posts","pages","all_pages","categories","all_categories","tags","all_tags","default_labels","push","concat","Condition_Base","condition_id","_template","_defaults","condition_name","change input","change textarea","cpt","get_data","on_init","defaults","get_title","get_body","body","get_header","header","rendered","update_attribute","get_attribute","change_input","el","getAttribute","search_results","parents","reanable_scroll","either_all_or_others","params","args","Toggle_Button_Toggler_Mixin","change input[type='radio']","set_current_li","filter_type","update_label","contains","no_posts","only_on_these_posts","except_these_posts","number_posts","createTag","no_pages","only_on_these_pages","except_these_pages","number_pages","post_types","cpt_details","cpt_name","selected_cpts","post_type","post_type_label","all","no","no_categories","only_on_these_categories","except_these_categories","number_categories","no_tags","only_on_these_tags","except_these_tags","number_tags","visitor_logged_in","conditions_body","visitor_not_logged_in","shown_less_than","less_than","only_on_mobile","not_on_mobile","from_specific_ref","refs","not_from_specific_ref","not_from_internal_link","from_search_engine","on_specific_url","urls","not_on_specific_url","visitor_has_commented","visitor_has_never_commented","in_a_country","countries","not_in_a_country","click .tabs-header label","hide_adblock_options_on_toggle","change_tab","event","$this_tab","$this_content","$radio","prop","back_tpl","initial_html","click .optin-enews-sync-setup","click .optin-enews-sync-cancel","click .optin-enews-sync-save","click .optin-enews-sync-toggle","click .optin-enews-sync-edit","setup","error","save","groups","checkbox","toggle","change .hustle-for-admin-user-toggle","change .hustle-for-logged-in-user-toggle","toggle_for_user","user","user_type","res_status","click .js-wph-button-cancel","change #wph-provider-edit-modal-provider","click #wph-edit-service-save","provider_options_nonce","appendTo","get_provider_options","$details_placeholder","$options_placeholder","empty","provider_id","optin","close","save_settings","$selector","form","serialize","Modal_View","modal","click .wph-providers-edit","open_edit_modal","transition","mouseenter","stop","fadeIn","mouseleave","removeProp","fadeOut","tab","router","navigate","optin_id","optin_type","_for","$for","$others","$other_sections","slideUp","decorate_number_inputs","elem","disabled_class","after","newVal","$input","oldValue","parseFloat","max","min","sticky_relocate","window_top","scrollTop","div_top","offset","top","height","outerHeight","scroll","user_has_change","hasChanges","child","parent_model","optin_name","optin_title","optin_message","api_key","mail_list","active","test_mode","save_to_local","service_source","validate_first_step","attrs","errors","message","provider","optin_mail_list","Color_Palette","_id","main_background","form_background","button_background","button_label_color","title_color","content_color","fields_background","fields_color","Color_Palette_Collection","Palettes","palettes","item","RegExp","Colors_Model","customize","palette","at","button_label","Borders_Model","rounded_corners","corners_radius","fields_corners_radius","button_corners_radius","drop_shadow","dropshadow_value","shadow_color","fields_style","rounded_form_fields","rounded_form_button","Design_Model","success_message","form_location","elements","image_location","image_style","image_src","preview_image","colors","borders","opening_animation","closing_animation","on_submit_page_id","input_icons","on_success","on_success_time","on_success_unit","customize_css","cta_button","module_fields","old_conditions","Settings_After_Content","enabled","animation","Settings_Popup_Model","appear_after","on_exit_trigger_once_per_session","appear_after_scroll","appear_after_time_val","appear_after_time_unit","appear_after_page_portion_val","appear_after_page_portion_unit","appear_after_element_val","add_never_see_this_message","close_button_acts_as_never_see_again","never_see_expiry","show_on_all_posts","excluded_posts","selected_posts","show_on_all_pages","excluded_pages","selected_pages","show_on_all_cats","show_on_these_cats","show_on_all_tags","show_on_these_tags","trigger_on_time","trigger_on_element_click","trigger_on_exit","trigger_on_adblock","trigger_on_adblock_timed","trigger_on_adblock_timed_val","trigger_on_adblock_timed_unit","Settings_Slide_In_Model","hide_after","hide_after_val","hide_after_unit","after_close","Settings_Model","shortcode_id","after_content","popup","slide_in","on_time","on_time_delay","on_time_unit","on_scroll","on_scroll_page_percent","on_scroll_css_selector","on_click_element","on_exit_intent","on_exit_intent_per_session","on_adblock","on_adblock_delayed","on_adblock_delayed_time","on_adblock_delayed_unit","get_tpl","layout_id","templates","Alert","click .inc-opt-alert-modal-close","click .inc-opt-alert-modal","click .inc-opt-alert-modal-close-btn","click .inc-opt-alert-modal-inner-container","close_text","ok","prevent_close","user_change","onbeforeunload","dont_navigate_away","step","activate_step","eq","slice","get_current_step","get_current","services","design","display","message_editor","change [name=\"animate\"]","conditions_view","update_conditions_label","replaceWith","toggle_animation","input","isOff","animation_list","skip_tinyMCE_sync","design_model","sync_message","sync_model_message","Media_Holder","media_holder","throttle","update_content","waitForTinyMCE","setInterval","tinyMCE","clearInterval","getContent","css_editor","stylables",".wph-modal.wph-modal-container .wph-modal--content ",".wph-modal.wph-modal-container.wph-customize-css h2.wph-modal--title ",".wph-modal.wph-modal-container.wph-customize-css .wph-modal--content h4.wph-modal--subtitle ",".wph-modal .wph-modal--content .wph-modal--message ",".wph-modal .wph-modal--content .wph-modal--image ",".wph-modal.wph-modal-container.wph-customize-css .wph-modal--content .wph-modal--image img ",".wph-modal .wph-modal--cta ",".wph-modal .wph-modal-never-see-again ","stylable_elements","main_bg_color","subtitle_color","link_static_color","link_hover_color","link_active_color","cta_static_background","cta_hover_background","cta_active_background","cta_static_color","cta_hover_color","cta_active_color","border_static_color","border_radius","border_type","drop_shadow_color","drop_shadow_x","drop_shadow_y","drop_shadow_blur","drop_shadow_spread","click .wph-stylable-element","create_color_pickers","apply_styles","create_css_editor","wpColorPicker","change","ui","color","toCSS","get_layout_colors","reduce","styles","$styles_el","color_type","selector","result","border_tpl","border_radius_tpl","weight","radius","drop_shadow_tpl","x","y","blur","spread","custom_css","ace","edit","getSession","setMode","setTheme","setUseWrapMode","setUseWorker","setShowPrintMargin","renderer","setShowGutter","setHighlightActiveLine","proxy","update_custom_css","getValue","insert_stylable_element","stylable","navigateFileEnd","insert","navigateLeft","focus","Delete_Confirmation","click .wph-accordions header","change .custom-content-toggle-activity","change .custom-content-toggle-tracking-activity","change .custom-content-toggle-type-activity","change .custom-content-toggle-test-activity","click .custom-content-edit","click .custom-content-delete","delete_confirmations","dismiss_legacy_popup_notice","toggle_accordion","$icon","toggle_activity","new_state","toggle_tracking_activity","toggle_type_activity","toggle_test_activity","delete","confirmation","before","Content","Design","customize_colors","border_hover_color","border_active_color","hide_image_on_mobile","image_position","cta_label","cta_target","Triggers","TypeBase","triggers","add_never_see_link","hModel","AfterContent","Popup","Slide_In","Magic_Bar","display_triggers_view","preview_modal","$preview_yield","click .wph-preview--mask","click .wph-preview--close","change #wph-preview-type-selector","Modal","change_type","update_slide_in_position_label","positions","message_box_tpl","preview","preview_model","initial_data","magic_bar","click .wph-toggletabs .can-open","click #save-and-next","click #next-step","click #save-and-finish","click #finish-setup","click .wph-preview--eye.wph-button","click .wph-js-cancel-design-changes","click .wph-js-back","click .wph-triggers--options label","click button#optin_message-tmce","change textarea#optin_message","keyup [data-attribute='optin_name']","content_view","design_view","after_content_view","popup_view","update_initial_state","render_message_box","enable_cancel","_set_preview_model","apply_proper_preview_styles","tinyMCE_toggled","text_area_update","handle_triggers","$selected_li","$siblings","after_content_contaner_classes","popup_contaner_classes","slide_in_contaner_classes","magic_bar_container_classes","_get_shortcode_id","$all","$togglable","$caret","_save","$btn","next","d","currUrl","pathname","search","responseJSON","history","replaceState","save_and_next","validate","done","next_step","click","save_and_finish","finish_setup","is_new","remove_error","$error_icon","opt_name","custom_content","no_name","open_preview","Preview","apply_custom_css","setTimeout","cancel_changes","go_back","$figure","$figtwo","$image","$imgtwo","$cabriolet","$simple","$minimal","design_model_data","$header","$footer","$modal_content","$modal_message","$modal_message_section","$modal_image","$modal_img","css_string","dataType","ready","service_model_json","services_model","_handle_icons_order","social_icons","$reorder_box","icon_style","$preview_box","$preview_container","$widget_preview_box","$widget_preview_container","icon_template","icon_template_html","icon_html","preview_icon_html","native_class","service_type","click_counter","counter","floating_preview_icon_html","widget_preview_icon_html","make_icons_sortable","sortArgs","items","revert","axis","containment","_reorder_icons","sortable","disableSelection","reordered","icons_order","icons_order_arr","pick","Object","order","change .social-sharing-toggle-activity","change .social-sharing-toggle-tracking-activity","change .social-sharing-toggle-type-activity","change .social-sharing-toggle-test-activity","click .social-sharing-edit","click .social-sharing-delete","Services","Appearance","icon_bg_color","icon_color","floating_social_bg","floating_inline_count","counter_border","counter_text","customize_widget_colors","widget_icon_bg_color","widget_icon_color","widget_bg_color","widget_drop_shadow","widget_drop_shadow_x","widget_drop_shadow_y","widget_drop_shadow_blur","widget_drop_shadow_spread","widget_drop_shadow_color","widget_inline_count","widget_counter_text","location_type","location_target","location_align_x","location_align_y","location_top","location_bottom","location_right","location_left","Floating_Social","click ul.wph-ss-service-type li label","click .wph-button.ss-save-changes","click .wph-button.ss-cancel","click .wph-button.ss-next-step","click .wph-button.ss-back","click .wph-button.ss-finish","change .wph-sshare--pick_social_icons input.wph-share-icon-enable","change .wph-sshare--pick_social_icons .wph-input--number input","change .wph-sshare--pick_social_icons .wph-sshare--input_wrap input","click ul.wph-share-icon_style [name=\"wph-sshare-type_icons_design\"]","click ul.wph-share-customize-color li > label","click ul.wph-share-widget-customize-color li > label","click ul.wph-sshare--pick_location_type li > label","click ul.wph-sshare--select_location_align_x li > label","click ul.wph-sshare--select_location_align_y li > label","services_view","appearance_view","floating_view","services_view_changes","icons_order_updated","appearance_view_changes","render_preview","render_service_view","render_appearance_view","$floating_container","floating_container_classes","_set_social_icons","appearance_data","box_shadow","widget_box_shadow","toggle_service_type","toggle_icon","is_checked","$parent_container","icon_counter_updated","icon_link_updated","toggle_icon_style","toggle_floating_custom_color","toggle_widget_custom_color","toggle_location_type","$selector_info","toggle_location_align","$additional_settings","data_field","ss_save","ss_id","$buttons","appearance","floating_social","_get_social_icons_data","resp","response","$save_buttons","ss_cancel","ss_next_step","$next_tab","ss_back","$prev_tab","prevAll","ss_finish","$opt_name","opt_name_placeholder","$warning","insertBefore","$social_containers","$sc","$toggle_input","icon","$counter","$link","counter_val","link","click .custom-content-legacy-toggle-activity","click .wph-button-legacy-quickedit-btn","click .custom-content-legacy-popup-save-quickedit","click .wph-button-legacy-migrate-btn","target_state","toggle_quick_edit","save_quick_edit","heading","subheading","quick_edit_btn","migrate","pagenow","Listing","Legacy_Listing","is_cc_limited","Content_View","Design_View","AfterContent_View","Popup_View","Slide_In_View","Display_Triggers_View","Conditions_View","Content_Model","AfterContent_Model","Popup_Model","Slide_In_Model","Magic_Bar_Model","content_model","after_content_model","popup_model","slide_in_model","magic_bar_model","is_ss_limited","Services_View","Appearance_View","Floating_View","Services_Model","Appearance_Model","Floating_Social_Model","appearance_model","floating_social_model","ErrorLog","controller","list","header_template","hasHeader","click .inc-opt-close-error-list","click .button-clear-logs","click .button-delete-logs","click .button-cancel-delete-logs","clearLogButton","exportButton","deleteConfirmation","getJSON","_wpnonce","error_log_nonce","logs","headers","toggleErrorLog","clearLogs","_clean","clear_log_nonce","cancelDelete","removeAttr","logShown","click .hustle-delete-optin","click .optin-active-state","click .button-view-email-list","change .optin-type-active-state","change .wpoi-testmode-active-state","change .optin-toggle-tracking-activity","click .button-view-log-list","set_testmode_visibiliy","toggle_optin_accordion","delete_optin","toggle_optin_activity","$overlay","$row","post","view_email_list","total","Subscription_List_Modal","active_toggle","speed","$test_mode_toggle","toggle_type_mode_activity","view_error_log_list","currentTarget","ErrorList","wrapper_class_tpl","view_email_list_cache","list_header_template","list_template","show_delay","click .inc-opt-close-emails-list","click .wpoi-complete-mask","delay_show","then","fields","field","subscriptions","is_free","dashboard_view","conversions_chart","chart_data","chart_options","empty_chart","default_dataset_options","fill","cubicInterpolationMode","borderCapStyle","borderDash","borderWidth","borderDashOffset","borderJoinStyle","pointBackgroundColor","pointBorderWidth","pointHoverRadius","pointHoverBorderColor","pointHoverBorderWidth","pointRadius","pointHitRadius","spanGaps","click .wph-icon.i-close","datasets","hustle_vars","conversion_chart_data","newds","backgroundColor","borderColor","pointBorderColor","pointHoverBackgroundColor","responsive","maintainAspectRatio","legend","scales","xAxes","time","unit","unitStepSize","tooltipFormat","displayFormat","previous_month","today","gridLines","yAxes","ticks","tooltips","callbacks","tooltipItem","returnArray","yLabel","cornerRadius","displayColors","hover","mode","intersect","toggle_overview","toggle_sshare_modal","handle_sshare_modal_pagination","canvas","$no_data","dashboard","not_enough_data","$module_table","module_table_height","sortBy","Chart","$parent_section","$stats_modal","sshare_modal_prev","sshare_modal_next","sshare_modal_goto","stopImmediatePropagation","$ul","$current","$page_number","$next","current_page","prev_target","$new_next_html","outerHTML","$new_html","page_number_html","insertAfter","sshare_show_page_content","$prev","next_target","$new_prev_html","next_next_page","page","ss_modal_template","$table_items","page_id","items_html","E_News","Modules_Activity","Provider","provider_args","render_in_previewr","noop","add_args","clear_provider_args","previousAttributes","clear","defer","iconClass","check_module_field","callback","get_module_field_nonce","fail","validate_custom_field","module_view","_updateOptions","$title","code","add_module_field","addbutton","_add_module_field","activecampaign","enter_url","api_secret","convertkit","enter_api_secret","resetReferrer","timer","hubspot_nonce","account_name","infusionsoft","enter_account_name","username","sendy","service_tab_view","email_list","$_preview","provider_args_template","provider_args_data","$prev_args","update_list_groups","$wrapper","$interests_wrapper","serializeArray","update_group_interests","group","update_selected_group_interests","filter","unselect_radio_interest","load_more_lists","$box","$placeholder","redirect_to","something_went_wrong","password","mautic","providers","installation_url","click .next-button button.wph-button-save","click .next-button button.wph-button-next","click .next-button button.wph-button-finish","click .wph-toggletabs--title.can-open","click .js-wph-optin-cancel","click .js-wph-optin-back","toggle_section","$current_panel","$next_panels","nextAll","$_next","back","$next_panel","$_prev_panel","click .next-button button","change #optin_new_provider_name","click .optin_refresh_provider_details","get_params","mix","toggle_optin_provider_settings","set_shortcode_id","update_model","undefined","validation","provider_name","provider_validation","_wrapped","size","_this","$field","ampersand","chain","compact","object","provider_change","serviceId","detailsContainer","remove_prev_provider_args","async","refresh_provider_details","$prev_provider_args","ModuleField","change [name]","click .wph-column-icon","field_container","reOrderFields","newSet","tr","_index","module_field","updateOptions","input_name","input_val","removeModule","field_key","success_editor","structure_tpl","module_fields_tpl","shapes_tpl","after_submit_tpl","color_pickers_tpl","optin_input_icons","module_index","link_color","fields_hover_background","fields_active_background","label_color","fields_hover_color","fields_active_color","error_color","button_hover_background","button_active_background","button_hover_label","button_active_label","checkmark_color","success_color","close_color","nsa_color","overlay_background","close_hover_color","nsa_hover_color","nsa_active_color","radio_background","radio_checked_background","checkbox_background","checkbox_checked_color","mcg_title_color","mcg_label_color","close_active_color","click .wph-preview--eye","change #optin_color_palettes","submit form.wpoi-form-wrap","change #optin-active-css","click #optin_apply_custom_css","mouseenter .wpoi-stylable-element","mouseleave .wpoi-stylable-element","click .wpoi-stylable-element","change #optin_fname","change #optin_lname","change #optin_customize_color_palette","change [name=\"on_success\"]","change [name=\"on_success_time\"]","change [name=\"on_success_unit\"]","change .wysiwyg-tab","click .add-new-module-field","click .wph-cancel-add-field","click .wph-add-new-field","keyup [data-name=\"label\"]","keyup [data-name=\"name\"]",".wpoi-hustle .wpoi-optin ",".wpoi-title ",".wpoi-message, .wpoi-message p ",".wpoi-form ",".wpoi-form .wpoi-subscribe-fname ",".wpoi-form .wpoi-subscribe-lname ",".wpoi-form .wpoi-subscribe-email ",".wpoi-form .wpoi-subscribe-send ","render_structure","render_color_pickers","render_shapes","render_on_submit","update_image_style","set_proper_image_location","sync_model_data","preview_type_changed","render_module_fields","create_editors","update_styles","update_borders_style","render_image_holder","json_data","wph_disabled","img_src","img_style","$img","cancel_dummy_optin_submit","update_color_palette","findWhere","_fix_layout_3_sizes","$parent","$child","$aside","$div","$element","$col","$sidebar","_bind_to_message_editor","_create_css_editor","highlight_stylable_element","$stylable","apply_proper_preview_classes","padding","background","$elements","wrapAll","tinymce","on_content_change","editor","getParam","dom","setStyle","refresh_editor","isObject","_create_color_pickers","method_name","warn","_toggleColorScheme","colorSelector","customColor","toggleCustomCSS","isOn","holder","update_optional_elements","vals","without","_show_args","form_field","has_args","updateMeta","toggleSuccessMessageFields","is_visible","container","newModuleField","cancelAddField","makerContainer","addNewField","datas","no_label","n","error_label","custom_field_already_exists","removeWarningIcons","Display_Triggers","widget_message_tpl","click .next-button a.previous","click .can-open.display-settings-icon span.open i.dev-icon","change #wpoi-after-content-state-toggle","change #wpoi-popup-state-toggle","change #wpoi-slide-in-state-toggle","toggle_after_content_animation_select","render_widget_message","move_selects_under_selected_radio","block_class","select_wrap","$second_radio","$tags_select","popup_conditions_view","slide_in_conditions_view","after_content_conditions_view","render_condition_labels","optin_type_toggle","$block","$p","toggle_boxes","classOpen","classClosed","currentClass","newClass","switchClass","go_to_design","condition_view","$els","Inc_Opt_Router","Router","routes","","display(/:optin_type)","route","f","is_limited","Email_Services_Tab","Provider_Args","Design_Tab","Display_Tab","wizard","Wizard","execute","routeIndex","adminpage","start"],"mappings":"CAAA,SAAAA,GACA,YAOAC,QAAAC,OAAA,SAAAF,EAAAG,EAAAC,GACA,GAAAC,MACAC,GACAC,SAAA,kBACAC,YAAA,0BACAC,OAAA,4BAGAC,EAAA,SAAAC,EAAAC,GACA,GAAAC,GAAAF,EAAAG,MAAA,IACA,IAAAD,EAAAE,OAAA,CACA,GAAAC,GAAA,SAAAL,EAAAM,GACA,GAAAC,GAAAP,EAAAG,MAAA,KACAK,EAAAD,EAAAE,OAAA,EAAA,GAAA,EAEA,IAAAD,EAAA,CAGA,GAAAD,EAAAH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AA,WACArkB,MAAA+jB,KAAAC,cAAA,IAGAM,OAAA,WAGAtkB,MAAA+jB,KAAAC,cAAA,IAGAO,QAAA,SAAAjf,GAEAtF,MAAA+jB,KAAAC,cAAA,GAGA1e,EAAAA,GAAA,GACA,KAAAA,GAAAvF,OAAA,sBAAAuF,GAAAhL,QAEAyF,OAAA,sBAAAuF,GAAAvI,KAAA,gCAAAb,QAAA,WAsBA0+C,WAAAA,UAAAl+C,QAAA,aAAA,UACA,yBAAAk+C,YACA56C,MAAAuZ,OAAA,GAAAqgC,gBACAt+C,SAAAm1B,QAAAoqB","file":"../admin.min.js","sourcesContent":["(function( $ ) {\r\n \"use strict\";\r\n\r\n /**\r\n * Defines the Hustle Object\r\n *\r\n * @type {{define, get_modules, get, modules}}\r\n */\r\n window.Hustle = (function ($, doc, win) {\r\n var _modules = {},\r\n _template_options = {\r\n evaluate: /<#([\\s\\S]+?)#>/g,\r\n interpolate: /\\{\\{\\{([\\s\\S]+?)\\}\\}\\}/g,\r\n escape: /\\{\\{([^\\}]+?)\\}\\}(?!\\})/g\r\n };\r\n\r\n var define = function (module_name, module) {\r\n var splits = module_name.split(\".\");\r\n if (splits.length) { // if module_name has more than one object name, then add the module definition recursively\r\n var recursive = function (module_name, modules) {\r\n var arr = module_name.split(\".\"),\r\n _module_name = arr.splice(0, 1)[0];\r\n\r\n if (!_module_name) return;\r\n\r\n\r\n if (!arr.length) {\r\n var invoked = module.call(null, $, doc, win);\r\n modules[_module_name] = _.isFunction(invoked) || typeof invoked === \"undefined\" ? invoked : _.extend(modules[_module_name] || {}, invoked);\r\n } else {\r\n modules[_module_name] = modules[_module_name] || {};\r\n }\r\n\r\n if (arr.length && _module_name)\r\n recursive(arr.join(\".\"), modules[_module_name]);\r\n };\r\n\r\n recursive(module_name, _modules);\r\n } else {\r\n var m = _modules[module_name] || {};\r\n _modules[module_name] = _.extend(m, module.call(null, $, doc, win));\r\n }\r\n },\r\n get_modules = function () {\r\n return _modules;\r\n },\r\n get = function (module_name) {\r\n if (module_name.split(\".\").length) { // recursively fetch the module\r\n var module = false,\r\n recursive = function (module_name, modules) {\r\n var arr = module_name.split(\".\"),\r\n _module_name = arr.splice(0, 1)[0];\r\n\r\n module = modules[_module_name];\r\n\r\n if (arr.length)\r\n recursive(arr.join(\".\"), modules[_module_name]);\r\n };\r\n\r\n recursive(module_name, _modules);\r\n return module;\r\n }\r\n\r\n return _modules[module_name] || false;\r\n },\r\n Events = _.extend({}, Backbone.Events),\r\n View = Backbone.View.extend({\r\n __base_events:{\r\n \"click .wph-tabs--wrap .wph-tabs--nav li label\": \"__base_toggle_tab\"\r\n },\r\n initialize: function () {\r\n this.events = _.extend({}, this.events, this.__base_events);\r\n\r\n if (_.isFunction(this.init_mix))\r\n this.init_mix.apply(this, arguments);\r\n\r\n\r\n\r\n if (this.render) {\r\n this.render = _.wrap(this.render, function (render) {\r\n this.trigger(\"before_render\");\r\n render.call(this);\r\n Events.trigger(\"view.rendered\", this);\r\n this.trigger(\"rendered\");\r\n });\r\n }\r\n\r\n if (_.isFunction(this.init))\r\n this.init.apply(this, arguments);\r\n },\r\n __base_toggle_tab: function(e){\r\n var $this = this.$( e.target ),\r\n href = ( $this.attr(\"href\") || \"\" ).replace(/^\\#/, \"\"),\r\n $content = href ? this.$( \"#\" + href ) : false,\r\n $wrap = $this.closest(\".wph-tabs--wrap\"),\r\n $li = $this.closest(\"li\");\r\n\r\n if( $content && $content.length ){\r\n $wrap.find( \".wph-tabs--content\" ).not( $content ).removeClass(\"current\");\r\n $content.addClass(\"current\");\r\n $li.addClass(\"current\");\r\n $li.siblings().removeClass(\"current\");\r\n }\r\n }\r\n }),\r\n template = _.memoize(function ( id ) {\r\n var compiled;\r\n return function ( data ) {\r\n compiled = compiled || _.template( document.getElementById( id ).innerHTML, null, _template_options );\r\n return compiled( data ).replace(\"/*<![CDATA[*/\", \"\").replace(\"/*]]>*/\", \"\");\r\n };\r\n }),\r\n create_template = _.memoize(function( str ){\r\n var cache;\r\n return function(data){\r\n cache = cache || _.template( str, null, _template_options );\r\n return cache( data );\r\n };\r\n }),\r\n get_template_options = function(){\r\n return $.extend( true, {}, _template_options );\r\n },\r\n cookie = (function(){\r\n // Get a cookie value.\r\n var get = function (name) {\r\n var i, c, cookie_name, value,\r\n ca = document.cookie.split(';');\r\n\r\n\r\n cookie_name = name + \"=\";\r\n\r\n for (i = 0; i < ca.length; i += 1) {\r\n c = ca[i];\r\n while (c.charAt(0) === ' ') {\r\n c = c.substring(1, c.length);\r\n }\r\n if (c.indexOf(cookie_name) === 0) {\r\n var _val = c.substring(cookie_name.length, c.length);\r\n return !_val ? _val : JSON.parse(_val);\r\n }\r\n }\r\n return null;\r\n };\r\n\r\n // Saves the value into a cookie.\r\n var set = function (name, value, days) {\r\n var date, expires;\r\n\r\n value = $.isArray(value) || $.isPlainObject(value) ? JSON.stringify(value) : value;\r\n\r\n if (!isNaN(days)) {\r\n date = new Date();\r\n date.setTime(date.getTime() + ( days * 24 * 60 * 60 * 1000 ));\r\n expires = \"; expires=\" + date.toGMTString();\r\n } else {\r\n expires = \"\";\r\n }\r\n\r\n document.cookie = name + \"=\" + value + expires + \"; path=/\";\r\n };\r\n return {\r\n set: set,\r\n get: get\r\n };\r\n }()),\r\n consts = (function(){\r\n return {\r\n Never_See_Aagain_Prefix: \"hustle_never_see_again-\",\r\n Module_Show_Count: \"hustle_module_show_count-\",\r\n\t\t\t\t\tSlide_Cookie_Prefix: 'hustle_slide_in_prefix-',\r\n\t\t\t\t\tSlide_Cookie_Hide_All: 'hustle_slide_in_hide_all-',\r\n\t\t\t\t\tSS_Module_Show_Count: 'hustle_ss_module_show_count-'\r\n };\r\n }());\r\n\r\n return {\r\n define: define,\r\n get_modules: get_modules,\r\n get: get,\r\n Events: Events,\r\n View: View,\r\n template: template,\r\n create_template: create_template,\r\n get_template_options: get_template_options,\r\n cookie: cookie,\r\n consts: consts\r\n };\r\n }(jQuery, document, window) );\r\n\r\n}(jQuery));","var Optin = Optin || {};\r\n\r\nOptin.View = {};\r\nOptin.Models = {};\r\nOptin.Events = {};\r\n\r\nif( typeof Backbone !== \"undefined\")\r\n _.extend(Optin.Events, Backbone.Events);\r\n(function( $ ) {\r\n \"use strict\";\r\n Optin.COOKIE_PREFIX = \"inc_optin_long_hidden-\";\r\n Optin.POPUP_COOKIE_PREFIX = \"inc_optin_popup_long_hidden-\";\r\n Optin.SLIDE_IN_COOKIE_PREFIX = \"inc_optin_slide_in_long_hidden-\";\r\n Optin.SLIDE_IN_COOKIE_HIDE_ALL = \"inc_optin_slide_in_hide_all\";\r\n \r\n Optin.global_mixin = function() {\r\n _.mixin({\r\n /**\r\n * Logs to console\r\n */\r\n log: function(){\r\n console.log( arguments );\r\n },\r\n /**\r\n * Converts val to boolian\r\n *\r\n * @param val\r\n * @returns {*}\r\n */\r\n toBool: function(val){\r\n if( _.isBoolean(val) )\r\n return val;\r\n\r\n if( _.isString( val ) && [\"true\", \"false\", \"1\"].indexOf( val.toLowerCase() ) !== -1 ){\r\n return val.toLowerCase() === \"true\" || val.toLowerCase() === \"1\" ? true : false;\r\n }\r\n\r\n if( _.isNumber( val ) )\r\n return !!val;\r\n\r\n if(_.isUndefined( val ) || _.isNull(val) || _.isNaN( val ) )\r\n return false;\r\n\r\n return val;\r\n },\r\n /**\r\n * Checks if val is truthy\r\n *\r\n * @param val\r\n * @returns {boolean}\r\n */\r\n isTrue: function(val) {\r\n if( _.isUndefined( val ) || _.isNull( val ) || _.isNaN( val ) )\r\n return false;\r\n\r\n if( _.isNumber( val ) )\r\n return val !== 0;\r\n\r\n val = val.toString().toLowerCase();\r\n return ['1', \"true\", \"on\"].indexOf( val ) !== -1;\r\n },\r\n isFalse: function(val){\r\n return !_.isTrue( val );\r\n },\r\n control_base: function(checked, current, attribute){\r\n attribute = _.isUndefined( attribute ) ? \"checked\" : attribute;\r\n checked = _.toBool(checked);\r\n current = _.isBoolean( checked ) ? _.isTrue( current ) : current;\r\n\r\n if(_.isEqual(checked, current )){\r\n return attribute + '=' + attribute;\r\n }\r\n return \"\";\r\n },\r\n /**\r\n * Returns checked=check if checked variable is equal to current state\r\n *\r\n *\r\n * @param checked checked state\r\n * @param current current state\r\n * @returns {*}\r\n */\r\n checked: function(checked, current){\r\n return _.control_base( checked, current, \"checked\" );\r\n },\r\n /**\r\n * Adds selected attribute\r\n *\r\n * @param selected\r\n * @param current\r\n * @returns {*}\r\n */\r\n selected: function(selected, current){\r\n return _.control_base( selected, current, \"selected\" );\r\n },\r\n /**\r\n * Adds disabled attribute\r\n *\r\n * @param disabled\r\n * @param current\r\n * @returns {*}\r\n */\r\n disabled: function( disabled, current ){\r\n return _.control_base( disabled, current, \"disabled\" );\r\n },\r\n /**\r\n * Returns css class based on the passed in condition\r\n *\r\n * @param conditon\r\n * @param cls\r\n * @param negating_cls\r\n * @returns {*}\r\n */\r\n class: function( conditon, cls, negating_cls ){\r\n\r\n if( _.isTrue( conditon ) )\r\n return cls;\r\n\r\n return typeof negating_cls !== \"undefined\" ? negating_cls : \"\";\r\n },\r\n /**\r\n * Returns class attribute with relevant class name\r\n *\r\n * @param conditon\r\n * @param cls\r\n * @param negating_cls\r\n * @returns {string}\r\n */\r\n add_class: function( conditon, cls, negating_cls ){\r\n return 'class={class}'.replace( \"{class}\", _.class( conditon, cls, negating_cls ) );\r\n },\r\n toUpperCase: function(str){\r\n return _.isString( str ) ? str.toUpperCase() : \"\";\r\n }\r\n });\r\n\r\n if( !_.findKey ) {\r\n _.mixin({\r\n findKey: function(obj, predicate, context) {\r\n predicate = cb(predicate, context);\r\n var keys = _.keys(obj), key;\r\n for (var i = 0, length = keys.length; i < length; i++) {\r\n key = keys[i];\r\n if (predicate(obj[key], key, obj)) return key;\r\n }\r\n }\r\n });\r\n }\r\n };\r\n \r\n Optin.global_mixin();\r\n \r\n \r\n /**\r\n * Recursive toJSON\r\n *\r\n * @returns {*}\r\n */\r\n Backbone.Model.prototype.toJSON = function() {\r\n var json = _.clone(this.attributes);\r\n for(var attr in json) {\r\n if((json[attr] instanceof Backbone.Model) || (Backbone.Collection && json[attr] instanceof Backbone.Collection)) {\r\n json[attr] = json[attr].toJSON();\r\n }\r\n }\r\n return json;\r\n };\r\n\r\n\r\n String.prototype.toInt = function(){\r\n return parseInt(this, 10);\r\n };\r\n\r\n String.prototype.isEmpty = function() {\r\n return (this.length === 0 || !this.trim());\r\n };\r\n\r\n Optin.template = _.memoize(function ( id ) {\r\n var compiled,\r\n\r\n options = {\r\n evaluate: /<#([\\s\\S]+?)#>/g,\r\n interpolate: /\\{\\{\\{([\\s\\S]+?)\\}\\}\\}/g,\r\n escape: /\\{\\{([^\\}]+?)\\}\\}(?!\\})/g\r\n };\r\n\r\n return function ( data ) {\r\n compiled = compiled || _.template( $( '#' + id ).html(), null, options );\r\n return compiled( data ).replace(\"/*<![CDATA[*/\", \"\").replace(\"/*]]>*/\", \"\");\r\n };\r\n });\r\n \r\n /**\r\n * Compatibility with other plugin/theme e.g. upfront\r\n *\r\n */\r\n Optin.template_compat = _.memoize(function ( id ) {\r\n var compiled;\r\n\r\n return function ( data ) {\r\n compiled = compiled || _.template( $( '#' + id ).html() );\r\n return compiled( data ).replace(\"/*<![CDATA[*/\", \"\").replace(\"/*]]>*/\", \"\");\r\n };\r\n });\r\n\r\n Optin.cookie = Hustle.cookie;\r\n\r\n $(document).on('blur', 'input, textarea, select', function(){\r\n\t var $this = $(this);\r\n\t if($this.is(':input[type=button], :input[type=submit], :input[type=reset]')) return;\r\n\t if( $this.val() && $this.val().trim && $this.val().trim() !== '' ) {\r\n\t\t $this.parent().addClass('wpoi-filled');\r\n\t\t} else{\r\n $this.parent().removeClass('wpoi-filled');\r\n }\r\n });\r\n\r\n Optin.Mixins = {\r\n _mixins: {},\r\n _services_mixins: {},\r\n _desing_mixins: {},\r\n _display_mixins: {},\r\n add: function(id, obj){\r\n this._mixins[id] = obj;\r\n },\r\n get_mixins: function(){\r\n return this._mixins;\r\n },\r\n add_services_mixin: function( id, obj ){\r\n this._services_mixins[id] = obj;\r\n },\r\n get_services_mixins: function(){\r\n return this._services_mixins;\r\n }\r\n };\r\n\r\n\r\n})( jQuery );\r\n","(function( $ ) {\r\n \"use strict\";\r\n\r\n Hustle.Optin = Optin;\r\n\r\n Optin.View.Template_Mixin = {\r\n events: {\r\n \"change input[type=text]\": \"set_model_texts\",\r\n \"keyup .wpoi_contenteditable\": \"set_model_contenteditables\",\r\n \"change input[type=radio]\": \"set_model_radios\",\r\n \"change select\": \"set_model_selects\",\r\n \"change input[type=checkbox]\": \"set_model_checkboxes\",\r\n \"blur input[type=text]\": \"set_model_selects\",\r\n \"blur input[type=number]\": \"set_model_selects\"\r\n },\r\n set_model_texts:function(e){\r\n var $el = $(e.target),\r\n attribute = $el.data('attribute');\r\n console.log( attribute, e.target.value );\r\n this.model.set(attribute, e.target.value );\r\n },\r\n set_model_contenteditables:function(e){\r\n var $el = $(e.target),\r\n attribute = $el.data('attribute');\r\n this.model.set(attribute, $el.text() );\r\n },\r\n set_model_radios: function(e){\r\n var $el = $(e.target),\r\n attribute = $el.data('attribute');\r\n this.model.set(attribute, e.target.value );\r\n },\r\n set_model_selects: function(e){\r\n var $el = $(e.target),\r\n attribute = $el.data('attribute');\r\n this.model.set(attribute, e.target.value );\r\n },\r\n set_model_checkboxes: function(e){\r\n var $el = $(e.target),\r\n attribute = $el.data('attribute');\r\n this.model.set(attribute, $el.is(\":checked\") );\r\n }\r\n };\r\n}(jQuery));","Hustle.define(\"Modal\", function($){\r\n \"use strict\";\r\n\r\n return Backbone.View.extend({\r\n template: Optin.template(\"hustle-modal-tpl\"),\r\n $mask: $('<div class=\"wph-modal--mask\"></div>'),\r\n opts: {\r\n\r\n },\r\n data:{\r\n id: \"\",\r\n type: \"popup\",\r\n style: \"\",\r\n title: \"\",\r\n subtitle: \"\",\r\n content: \"Content\",\r\n animation_in: \"\",\r\n animation_out: \"\",\r\n position: \"\"\r\n },\r\n events:{\r\n \"click .wph-modal--close a\": \"hide\",\r\n \"submit form\": \"fire_conversion_event\",\r\n \"click .wph-modal--cta\": \"fire_conversion_event\",\r\n \"click .wph-modal-never-see-again\": \"never_see_again\"\r\n },\r\n initialize: function( options ){\r\n this.opts = _.extend( {}, this.opts, options );\r\n if( options.template )\r\n this.template = options.template;\r\n\r\n this.render();\r\n return this;\r\n },\r\n render: function(){\r\n var data = _.extend( {}, this.data, this.model.toJSON() );\r\n\r\n this.type_data = data.types[ data.type ];\r\n\r\n this.animation_in = data.animation_in = data.types[ data.type ].animation_in || data.animation_in;\r\n this.animation_out = data.animation_out = data.types[ data.type ].animation_out || data.animation_out;\r\n\r\n data.position = data.types[ data.type ].position || data.position;\r\n\t\t\t\r\n\t\t\t// check cta_url if preceeds http\r\n\t\t\tdata = this.sanitize_cta_url(data);\r\n\t\t\t\r\n\t\t\t// enable fullscreen\r\n\t\t\tdata = this.enable_fullscreen(data);\r\n\t\t\t\r\n\t\t\t// handle custom size for custom content\r\n\t\t\tdata = this.handle_custom_size_cc(data);\r\n\t\t\t\r\n this.setElement( this.template( data ) );\r\n\r\n this.$mask = this.$mask.clone();\r\n this.$mask.on(\"click\", _.bind( this.clicked_background, this ) );\r\n\r\n this.$el.find( \"form\" ).on(\"submit\", _.bind( this.on_form_submit, this ) );\r\n\t\t\t\r\n\t\t\t// check if CC and scroll enabled\r\n\t\t\tthis.enable_body_scroll(data);\r\n\t\t\t\r\n\t\t\t// hide close button if on admin\r\n\t\t\tif( window.hasOwnProperty( \"optin_vars\" ) ) {\r\n\t\t\t\tvar $close_btn = this.$el.find('a.wph-icon.i-close');\r\n\t\t\t\tif ( $close_btn.length ) $close_btn.parent().hide();\r\n\t\t\t}\r\n\t\t\t\r\n return this;\r\n },\r\n hide: function(e){\r\n var self = this;\r\n if( e )\r\n e.preventDefault();\r\n\t\t\t\r\n if ( self.animation_in !== self.animation_out ) self.$el.removeClass( self.animation_in );\r\n _.delay(function(){\r\n\t\t\t\tif ( self.animation_out && !self.$el.hasClass(self.animation_out) ) {\r\n\t\t\t\t\tself.$el.addClass( self.animation_out );\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t_.delay( function(){\r\n\t\t\t\t\tself.$el.removeClass(\"wph-modal-show\");\r\n\t\t\t\t\tself.$el.prev(\".wph-modal--mask\").remove();\r\n\t\t\t\t\tHustle.Events.trigger(\"hide_modal\", self );\r\n\t\t\t\t\tself.trigger(\"hidden\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t// only for close button\r\n\t\t\t\t\tif( _.isTrue( self.type_data.close_btn_as_never_see ) && e && $(e.target).hasClass('wph-icon i-close') )\r\n\t\t\t\t\t\tself.never_see_again( e );\r\n }, 550 );\r\n\r\n }, 350);\r\n\t\t\t\r\n\t\t\t// remove any no-scroll class on html\r\n\t\t\t$('html').removeClass('no-scroll');\r\n },\r\n\t\tclicked_background: function(e){\r\n\t\t\tif ( !_.isTrue( this.type_data.not_close_on_background_click ) ) {\r\n\t\t\t\tthis.hide(e);\r\n\t\t\t}\r\n\t\t},\r\n show:function(){\r\n var self = this;\r\n if( !window.hasOwnProperty( \"optin_vars\" ) ){ // don't set cookie in admin\r\n var show_count_key = Hustle.consts.Module_Show_Count + this.model.get(\"type\") + \"-\" + this.model.get(\"id\"),\r\n current_show_count = Hustle.cookie.get( show_count_key );\r\n\r\n Hustle.cookie.set( show_count_key, current_show_count + 1, 90 );\r\n }\r\n\t\t\t\r\n if ( self.animation_in !== self.animation_out ) self.$el.removeClass( self.animation_out );\r\n _.delay( function(){\r\n self.$el.addClass(\"wph-modal-show\");\r\n self.trigger(\"shown\", self, self.model.get(\"type\"));\r\n Hustle.Events.trigger(\"show_modal\", self, self.model.get(\"type\") );\r\n\r\n _.delay( function(){\r\n\t\t\t\t\tif ( self.animation_in && !self.$el.hasClass(self.animation_in) ) {\r\n\t\t\t\t\t\tself.$el.addClass( self.animation_in );\r\n\t\t\t\t\t}\r\n }, 350 );\r\n\r\n }, 550 );\r\n\r\n },\r\n\t\tsanitize_cta_url: function( data ) {\r\n\t\t\tif ( data.cta_url ) {\r\n\t\t\t\tif (!/^(f|ht)tps?:\\/\\//i.test(data.cta_url)) {\r\n\t\t\t\t\tdata.cta_url = \"http://\" + data.cta_url;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn data;\r\n\t\t},\r\n\t\tenable_fullscreen: function( data ) {\r\n\t\t\tdata.fullscreen = '';\r\n\t\t\t// only for custom content popup\r\n\t\t\tif ( !data || typeof data.optin_provider === 'undefined' || typeof data.type === 'undefined' ) {\r\n\t\t\t\treturn data;\r\n\t\t\t}\r\n\t\t\tif ( data.optin_provider == 'custom_content' && data.type == 'popup' ) {\r\n\t\t\t\tif ( typeof this.type_data.make_fullscreen === 'undefined' ) {\r\n\t\t\t\t\treturn data;\r\n\t\t\t\t}\r\n\t\t\t\tif ( _.isTrue( this.type_data.make_fullscreen ) ) {\r\n\t\t\t\t\tdata.fullscreen = 'wph-modal-popup-fullscreen';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn data;\r\n\t\t},\r\n\t\thandle_custom_size_cc: function( data ){\r\n\t\t\tdata.custom_size_attr = '';\r\n\t\t\tdata.custom_size_class = '';\r\n\t\t\t// only for custom content\r\n\t\t\tif ( !data || typeof data.optin_provider === 'undefined' ) {\r\n\t\t\t\treturn data;\r\n\t\t\t}\r\n\t\t\tif ( data.optin_provider == 'custom_content' ) {\r\n\t\t\t\tif ( _.isTrue( data.customize_size ) ) {\r\n\t\t\t\t\tdata.custom_size_class = 'wph-modal--custom';\r\n\t\t\t\t\tdata.custom_size_attr += 'data-custom_width='+ data.custom_width +' data-custom_height='+ data.custom_height +'';\r\n\t\t\t\t}\r\n\t\t\t\tif ( _.isTrue( data.border ) ) {\r\n\t\t\t\t\tdata.custom_size_attr += ' data-border='+ data.border_weight;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn data;\r\n\t\t},\r\n\t\tenable_body_scroll: function( data ) {\r\n\t\t\t// only for custom content popup\r\n\t\t\tif ( !data || typeof data.optin_provider === 'undefined' || typeof data.type === 'undefined' ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif ( data.optin_provider == 'custom_content' && data.type == 'popup' ) {\r\n\t\t\t\tif ( typeof this.type_data.allow_scroll_page === 'undefined' ) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tif ( _.isTrue( this.type_data.allow_scroll_page ) ) {\r\n\t\t\t\t\t$('html').addClass('can-scroll');\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$('html').addClass('no-scroll');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n fire_conversion_event: function( e ){\r\n var source = $(e.target).hasClass( \"wph-modal--cta\" ) ? \"cta\" : \"form\";\r\n Hustle.Events.trigger(\"cc_modal_converted\", this, source);\r\n this.trigger(\"converted\", this, source);\r\n },\r\n never_see_again: function(e){\r\n if( e )\r\n e.preventDefault();\r\n\r\n if( !window.hasOwnProperty( \"optin_vars\" ) ) // don't set cookie in admin\r\n Hustle.cookie.set( Hustle.consts.Never_See_Aagain_Prefix + this.model.get(\"type\") + \"-\" + this.model.get(\"id\") , this.model.get(\"id\"), this.type_data.expiration_days );\r\n\r\n // do not hide if close button to avoid infinite loop\r\n\t\t\tif ( e && !$(e.target).hasClass('wph-icon i-close') ) {\r\n\t\t\t\tthis.hide();\r\n\t\t\t}\r\n },\r\n on_form_submit: function(e){\r\n var self = this,\r\n $form = $(e.target),\r\n on_submit = this.type_data.on_submit;\r\n\r\n switch ( on_submit ){\r\n case \"close\":\r\n self.hide();\r\n break;\r\n case \"redirect\":\r\n window.location.replace( $form.attr(\"action\") );\r\n break;\r\n case \"default\":\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n }\r\n });\r\n});","(function($){\r\n \"use strict\";\r\n Hustle.Events.on(\"view.rendered\", function(view){\r\n if( view instanceof Backbone.View)\r\n view.$(\".wpmuiSelect\").wpmuiSelect();\r\n });\r\n}(jQuery));","Hustle.define(\"Delete_Confirmation\", function($){\r\n \"use strict\";\r\n return Backbone.View.extend({\r\n template: Optin.template(\"hustle-delete-module-confirmation-tpl\"),\r\n className: \"hustle-delete-module-confirmation\",\r\n tagName: \"span\",\r\n opts:{\r\n id: \"\",\r\n nonce: \"\",\r\n action: \"\",\r\n url: ajaxurl\r\n },\r\n events: {\r\n \"click .hustle-delete-module-confirm\": \"confirm\",\r\n \"click .hustle-delete-module-cancel\": \"cancel\"\r\n },\r\n initialize: function( options ){\r\n this.opts = _.extend({}, this.opts, options);\r\n return this.render();\r\n },\r\n render: function(){\r\n this.$el.html( this.template() );\r\n return this;\r\n },\r\n confirm: function(e){\r\n e.preventDefault();\r\n e.stopPropagation();\r\n\r\n var self = this,\r\n $this = this.$( e.target ),\r\n $spinner = $(\"<span class='button-spinner'>\"),\r\n button_width = $this.outerWidth();\r\n\r\n $this.append( $spinner )\r\n .animate( { width: button_width + ( button_width * 0.2 ) })\r\n .attr(\"disabled\", true);\r\n\r\n\r\n $.ajax({\r\n url: this.opts.url,\r\n type: \"POST\",\r\n data: {\r\n action: this.opts.action,\r\n _ajax_nonce: this.opts.nonce,\r\n id: this.opts.id\r\n },\r\n complete: function(){\r\n $this.animate({ width: button_width })\r\n .attr( \"disabled\", false )\r\n .find( \".button-spinner\" ).remove();\r\n },\r\n success: function(res){\r\n if( self.opts.onSuccess && _.isFunction( self.opts.onSuccess ) )\r\n self.opts.onSuccess.call(this, res, self);\r\n }\r\n });\r\n },\r\n cancel: function(e){\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.remove();\r\n }\r\n });\r\n});","Hustle.define(\"Media_Holder\", function(){\r\n \"use strict\";\r\n return Backbone.View.extend({\r\n template: Optin.template(\"hustle-media-holder-tpl\"),\r\n media_frame: false,\r\n options: {\r\n attribute: \"image\",\r\n title: optin_vars.messages.media_uploader.select_or_upload,\r\n button_text: optin_vars.messages.media_uploader.use_this_image,\r\n multiple: false\r\n },\r\n events: {\r\n \"click .wph-media--add\": \"open\",\r\n \"click .wph-button--dots\": \"toggle_options\",\r\n \"click .i-close\": \"toggle_options\",\r\n \"click .wpoi-swap-image-button\": \"swap_image\",\r\n \"click .wpoi-delete-image-button\": \"delete_image\"\r\n },\r\n initialize: function( options ){\r\n this.options = _.extend( {}, this.options, options );\r\n if( !this.model || !this.options.attribute )\r\n throw new Error(\"Undefined model or attribute\");\r\n\t\t\t\r\n\t\t\tjQuery(document).on('click', this.close_media_options);\r\n\t\t\t\r\n this.render();\r\n },\r\n render: function(){\r\n var html = this.template({\r\n image: this.model.get( this.options.attribute )\r\n });\r\n this.setElement( html );\r\n this.define_media_frame();\r\n return this;\r\n },\r\n define_media_frame: function(){\r\n var self = this,\r\n $preview = this.$(\".wph-media--preview\"),\r\n $holder = this.$(\".wph-media--holder\"),\r\n $options = this.$(\".wph-media--options\");\r\n\r\n this.media_frame = wp.media({\r\n title: self.options.title,\r\n button: {\r\n text: self.options.button_text\r\n },\r\n multiple: self.options.multiple\r\n }).on( 'select', function() {\r\n\r\n var media = self.media_frame.state().get('selection').first().toJSON();\r\n\r\n if( media && media.url ){\r\n $preview.css( \"background-image\", \"url({url})\".replace(\"{url}\", media.url ));\r\n $holder.addClass(\"has-image\");\r\n self.model.set( self.options.attribute , media.url);\r\n $options.removeClass(\"hidden\");\r\n self.$(\".wph-media--add\").addClass(\"hidden\");\r\n }\r\n\r\n });\r\n },\r\n open: function(e){\r\n e.preventDefault();\r\n var $holder = this.$(\".wph-media--holder\");\r\n $holder.removeClass(\"has-image\");\r\n this.media_frame.open();\r\n },\r\n toggle_options: function(){\r\n this.$(\"wph-media--list\").toggleClass(\"wph-open\");\r\n this.$(\".wph-media--items\").toggleClass(\"hidden\");\r\n this.$(\".svg-triangle\").toggleClass(\"hidden\");\r\n },\r\n\t\tclose_media_options: function(e){\r\n\t\t\tvar $target = jQuery(e.target),\r\n\t\t\t\t$media = $target.closest('.wph-media--list');\r\n\t\t\t\r\n\t\t\tif ( $media.length === 0 && !$target.hasClass(\"wph-button wph-button--dots\") ) {\r\n\t\t\t\tvar $list = jQuery('.wph-media--list'),\r\n\t\t\t\t\t$items = $list.find(\".wph-media--items\"),\r\n\t\t\t\t\t$svg = $list.find(\".svg-triangle\")\r\n\t\t\t\t;\r\n\t\t\t\tif ( !$items.hasClass(\"hidden\") ) $items.addClass(\"hidden\");\r\n\t\t\t\tif ( !$svg.hasClass(\"hidden\") ) $svg.addClass(\"hidden\");\r\n\t\t\t}\r\n\t\t},\r\n swap_image: function(e){\r\n e.preventDefault();\r\n if( !this.media_frame ) return;\r\n\r\n this.media_frame.open();\r\n this.toggle_options();\r\n\r\n },\r\n delete_image: function(e){\r\n e.preventDefault();\r\n var $preview = this.$(\".wph-media--preview\");\r\n this.model.set( this.options.attribute, \"\" );\r\n $preview.css( \"background-image\", \"url('')\");\r\n this.toggle_options();\r\n this.$(\".wph-media--add\").removeClass(\"hidden\");\r\n this.$(\".wph-media--options\").addClass(\"hidden\");\r\n }\r\n });\r\n});","Hustle.define(\"Mixins.Model_Updater\", function($, doc, win) {\r\n \"use strict\";\r\n return {\r\n init_mix: function(){\r\n this.events = _.extend({}, this.events, this._events);\r\n this.delegateEvents();\r\n },\r\n _events:{\r\n \"change input[type='text']\" : \"_update_text\",\r\n \"change input[type='number']\" : \"_update_text\",\r\n \"change input[type='checkbox']\" : \"_update_checkbox\",\r\n \"change input[type=radio]\": \"_update_radios\",\r\n \"change select\": \"_update_select\"\r\n },\r\n _update_text: function(e){\r\n var $this = $(e.target),\r\n attr = $this.data(\"attribute\"),\r\n model = this[$this.data(\"model\") || \"model\"],\r\n opts = _.isTrue( $this.data(\"silent\") ) ? {silent: true} : {};\r\n\r\n if( model && attr ){\r\n e.stopPropagation();\r\n model.set.call( model, attr, e.target.value, opts );\r\n }\r\n\r\n },\r\n _update_checkbox: function(e){\r\n var $this = $(e.target),\r\n attr = $this.data(\"attribute\"),\r\n model = this[$this.data(\"model\") || \"model\"],\r\n opts = _.isTrue( $this.data(\"silent\") ) ? {silent: true} : {};\r\n\r\n\r\n if( model && attr ){\r\n e.stopPropagation();\r\n model.set.call( model, attr, $this.is(\":checked\") ? 1 : 0, opts );\r\n }\r\n\r\n },\r\n _update_radios: function(e){\r\n var $this = $(e.target),\r\n attribute = $this.data('attribute'),\r\n model = this[$this.data(\"model\") || \"model\"],\r\n opts = _.isTrue( $this.data(\"silent\") ) ? {silent: true} : {};\r\n\r\n\r\n if( model && attribute ){\r\n e.stopPropagation();\r\n model.set.call( model, attribute, e.target.value, opts );\r\n }\r\n\r\n\r\n },\r\n _update_select: function(e){\r\n var $this = $(e.target),\r\n attr = $this.data(\"attribute\"),\r\n model = this[$this.data(\"model\") || \"model\"],\r\n opts = _.isTrue( $this.data(\"silent\") ) ? {silent: true} : {};\r\n\r\n\r\n if( model && attr ){\r\n e.stopPropagation();\r\n model.set.call( model, attr, $this.val(), opts );\r\n }\r\n\r\n }\r\n };\r\n});\r\n","Hustle.define(\"Settings.Conditions_View\", function( $ ) {\r\n \"use strict\";\r\n return Hustle.View.extend({\r\n template: Optin.template(\"wpoi-wizard-popup-conditions\"),\r\n handle_tpl: Optin.template(\"wpoi-wizard-popup-conditions-handle\"),\r\n className: \"wph-conditions\",\r\n events: {\r\n 'click .wph-conditions--side .wph-conditions--item:not(.disabled)': 'toggle_condition',\r\n 'click .wph-conditions--side .wph-conditions--item:not(.disabled) span': 'toggle_condition',\r\n 'click .wph-conditions--item header': \"toggle_panel\"\r\n },\r\n init: function (opts) {\r\n this.type = opts.type;\r\n this.active_conditions = {};\r\n\r\n this.listenTo( this.model, \"change\", this.toggle_empty_message );\r\n\r\n this.render();\r\n },\r\n render: function () {\r\n var conditions = this.model.toJSON();\r\n this.$el.html( this.template( { type_name: this.type } ) );\r\n _.each(Optin.View.Conditions, function (condition, id) {\r\n var handle = this.handle_tpl({\r\n label: this.get_label(id),\r\n id: id,\r\n cid: this.get_condition_cid(id),\r\n active_class: conditions[id] ? \"added\" : '',\r\n icon_class: conditions[id] ? \"wpoi-remove\" : \"wpoi-add\"\r\n });\r\n\r\n // add handle\r\n this.$(\".wph-conditions--side .wph-conditions--items\").append(handle);\r\n }, this);\r\n\r\n _.each(conditions, function (condition, id) {\r\n this.add_condition_panel(id);\r\n }, this);\r\n\r\n this.toggle_empty_message();\r\n },\r\n get_condition_cid: function (id) {\r\n return this.type + \"_\" + id;\r\n },\r\n get_label: function (id) {\r\n var type_name = optin_vars.messages.settings[this.type] ? optin_vars.messages.settings[this.type] : this.type;\r\n return optin_vars.messages.conditions[id] ? optin_vars.messages.conditions[id].replace(\"{type_name}\", type_name) : id;\r\n },\r\n take_care_of_connected_conditions: function (this_condition) {\r\n /**\r\n * Disable those conditions which can't go with this condition\r\n */\r\n if (this_condition.disable && this_condition.disable.length) {\r\n _.each(this_condition.disable, function (disable_id, index) {\r\n var $disable_handle = this.$(\"#\" + this.get_condition_cid(disable_id));\r\n $disable_handle.toggleClass(\"disabled\");\r\n }, this);\r\n }\r\n },\r\n /**\r\n * Adds condition to optin type\r\n *\r\n * @param id\r\n * @param this_condition\r\n * @returns {*|{}}\r\n */\r\n add_condition: function (id, $handle) {\r\n var this_condition = this.add_condition_panel(id);\r\n /**\r\n * Add condition element\r\n */\r\n $handle.addClass(\"added\");\r\n $handle.find(\"span\").addClass(\"wpoi-remove\");\r\n $handle.find(\"span\").removeClass(\"wpoi-add\");\r\n\r\n this.model.set( id, this_condition.get_configs());\r\n return this.model.toJSON();\r\n\r\n },\r\n /**\r\n * Removes conditon from optin type\r\n * @param id\r\n */\r\n remove_condition: function (id, this_condition, $handle) {\r\n this.take_care_of_connected_conditions(this_condition);\r\n\t\t\t\r\n\t\t\tthis_condition.off(\"change:update_label\");\r\n this_condition.remove();\r\n\t\t\t\r\n delete this.active_conditions[id];\r\n $handle.removeClass(\"added\");\r\n $handle.find(\"span\").removeClass(\"wpoi-remove\");\r\n $handle.find(\"span\").addClass(\"wpoi-add\");\r\n\r\n this.model.unset(id);\r\n },\r\n /**\r\n * Add condition pannel\r\n *\r\n * @param id\r\n * @returns {*}\r\n */\r\n add_condition_panel: function (id) {\r\n\t\t\tif ( typeof Optin.View.Conditions[id] === 'undefined' ) return;\r\n\t\t\t\r\n var this_condition = this.active_conditions[id] = new Optin.View.Conditions[id]({\r\n model: this.model,\r\n type: this.type\r\n });\r\n\r\n if(_.isEmpty( this.active_conditions ) )\r\n this.$(\".wph-conditions--box .wph-conditions--items\").html(\"\");\r\n\r\n this.take_care_of_connected_conditions(this_condition);\r\n\r\n /**\r\n * Append condition panel\r\n */\r\n var me = this;\r\n this_condition.on(\"change:update_label\", function() {\r\n\t\t\t\tme.trigger(\"change:update_view_label\", me);\r\n\t\t\t});\r\n this.$(\".wph-conditions--box .wph-conditions--items\").append(this_condition.$el);\r\n return this_condition;\r\n },\r\n /**\r\n * Toggles each of the conditions\r\n *\r\n * @param e\r\n */\r\n toggle_condition: function (e) {\r\n e.stopPropagation();\r\n\r\n var id = this.$(e.target).data(\"id\") || this.$(e.target).closest(\".wph-conditions--item\").data(\"id\"),\r\n $handle = this.$('#' + this.get_condition_cid(id)),\r\n this_condition = this.active_conditions[id];\r\n\r\n if (this_condition) {\r\n this.remove_condition(id, this_condition, $handle);\r\n this.trigger(\"condition_removed\", this, id, this_condition);\r\n } else {\r\n this.add_condition(id, $handle);\r\n this.trigger(\"condition_added\", this, id, this_condition);\r\n }\r\n\r\n this.trigger(\"toggle_condition\", this, id, this_condition);\r\n },\r\n toggle_empty_message: function(){\r\n\r\n if( this.model.isEmpty() )\r\n this.$(\".wph-conditions--empty\").show();\r\n else\r\n this.$(\".wph-conditions--empty\").hide();\r\n\r\n },\r\n\t\ttoggle_panel: _.debounce( function(e) {\r\n\t\t\tvar $this = $(e.target),\r\n\t\t\t\t$panel = $this.closest(\".wph-conditions--item\"),\r\n\t\t\t\t$section = $panel.find( \"section\");\r\n\r\n\t\t\t$section.slideToggle(300, function(){\r\n\t\t\t\t$panel.toggleClass(\"wph-conditions--closed wph-conditions--open\");\r\n\t\t\t});\r\n\t\t}, 300),\r\n /**\r\n * Returns labels of aggregate conditions\r\n *\r\n * @returns {string}\r\n */\r\n get_conditions_labels: function(){\r\n var labels = _.pluck( this.active_conditions, \"label\" ),\r\n tpl = Hustle.create_template(\"<span>{{label}}</span>\");\r\n return labels.length\r\n ? labels.map( function(label) { return tpl( {label: label} ); } ).join( \", \" )\r\n : optin_vars.messages.condition_labels.everywhere;\r\n },\r\n\t\t/**\r\n * Returns labels of aggregate conditions and default conditions\r\n *\r\n * @returns {string}\r\n */\r\n get_all_conditions_labels: function(){\r\n var conditions = this.active_conditions;\r\n\t\t\tvar default_conditions = {\r\n\t\t\t\t'posts': {\r\n\t\t\t\t\t'label' : optin_vars.messages.condition_labels.all_posts\r\n\t\t\t\t},\r\n\t\t\t\t'pages': {\r\n\t\t\t\t\t'label' : optin_vars.messages.condition_labels.all_pages\r\n\t\t\t\t},\r\n\t\t\t\t'categories': {\r\n\t\t\t\t\t'label' : optin_vars.messages.condition_labels.all_categories\r\n\t\t\t\t},\r\n\t\t\t\t'tags': {\r\n\t\t\t\t\t'label' : optin_vars.messages.condition_labels.all_tags\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\tvar default_labels = [];\r\n\t\t\t\r\n\t\t\t// append defaults\r\n\t\t\tfor ( var key in default_conditions ) {\r\n\t\t\t\tif ( typeof conditions[key] === 'undefined' ) {\r\n\t\t\t\t\tdefault_labels.push(default_conditions[key]['label']);\r\n\t\t\t\t}\r\n\t\t\t}\r\n var labels = _.pluck( conditions, \"label\" ),\r\n tpl = Hustle.create_template(\"<span>{{label}}</span>\");\r\n\t\t\tlabels = labels.concat(default_labels);\r\n\t\t\t\r\n return labels.length\r\n ? labels.map( function(label) { return tpl( {label: label} ); } ).join( \", \" )\r\n : optin_vars.messages.condition_labels.everywhere;\r\n }\r\n });\r\n});","(function( $ ) {\r\n \"use strict\";\r\n Optin.View.Conditions = Optin.View.Conditions || {};\r\n\r\n var Condition_Base = Hustle.View.extend({\r\n condition_id: \"\",\r\n className: \"wph-conditions--item wph-conditions--open\",\r\n _template: Optin.template('wpoi-wizard-popup-conditions-item'),\r\n template: false,\r\n _defaults: {\r\n type_name: \"\",\r\n condition_name: \"\",\r\n label: \"\"\r\n },\r\n _events:{\r\n 'change input': 'change_input',\r\n 'change textarea': 'change_input',\r\n 'change select': 'change_input'\r\n },\r\n init: function( opts ){\r\n this.type = opts.type;\r\n this.id = this.type + \"-\" + this.condition_id;\r\n this.template = ( typeof this.cpt !== 'undefined' )\r\n\t\t\t\t? Optin.template('wpoi-condition-post_type')\r\n\t\t\t\t: Optin.template('wpoi-condition-' + this.condition_id );\r\n\r\n /**\r\n * Defines type_name and condition_name based on type and id so that it can be used in the template later on\r\n *\r\n * @type {Object}\r\n * @private\r\n */\r\n this._defaults = {\r\n type_name: optin_vars.messages.settings[ this.type ] ? optin_vars.messages.settings[ this.type ] : this.type,\r\n condition_name: optin_vars.messages.conditions[ this.condition_id ] ? optin_vars.messages.conditions[ this.condition_id ] : this.condition_id\r\n };\r\n\r\n this.data = this.get_data();\r\n\r\n this.render();\r\n this.events = $.extend( true, {}, this.events, this._events );\r\n this.delegateEvents();\r\n if( this.on_init && _.isFunction( this.on_init ) )\r\n this.on_init.apply( this, arguments );\r\n return this;\r\n },\r\n get_data: function(){\r\n return _.extend( {}, this._defaults, this.defaults, this.model.get( this.condition_id ), {type: this.type } );\r\n },\r\n get_title: function(){\r\n return this.title.replace(\"{type_name}\", this.data.type_name);\r\n },\r\n get_body: function(){\r\n return typeof this.body === \"function\" ? this.body.apply(this, arguments ) : this.body.replace(\"{type_name}\", this.data.type_name );\r\n },\r\n get_header: function(){\r\n return \"\";\r\n },\r\n render: function(){\r\n var html = this._template(_.extend({}, {\r\n title: this.get_title(),\r\n body: this.get_body(),\r\n header: this.get_header()\r\n },\r\n this._defaults,\r\n {type: this.type}\r\n ) );\r\n\r\n this.$el.html( html );\r\n\r\n if( this.rendered && typeof this.rendered === \"function\")\r\n this.rendered.apply(this, arguments);\r\n\r\n return this;\r\n },\r\n /**\r\n * Updates attribute value into the condition hash\r\n *\r\n * @param attribute\r\n * @param val\r\n */\r\n update_attribute: function(attribute, val){\r\n this.data = this.model.get( this.condition_id );\r\n this.data[ attribute ] = val;\r\n\t\t\tthis.model.set(this.condition_id , this.data );\r\n this.model.trigger(\"change\", val);\r\n \r\n },\r\n get_attribute: function(attribute){\r\n var data = this.model.get( this.condition_id );\r\n return data && data[ attribute ] ? data[ attribute ] : false;\r\n },\r\n /**\r\n * Triggered on input change\r\n *\r\n * @param e\r\n * @returns {*}\r\n */\r\n change_input: function(e){\r\n var el = e.target,\r\n attribute = el.getAttribute(\"data-attribute\"),\r\n $el = $(el),\r\n val = $el.is(\".js-wpoi-select\") ? $el.val() : e.target.value;\r\n\t\t\t\t\r\n\t\t\t// skip for input search\r\n\t\t\tif ( $el.is(\".select2-search__field\") ) return false;\r\n \r\n // clean leaking old search results\r\n _.delay(function(){\r\n var search_results = $('.select2-results').parents('.select2-container');\r\n if ( search_results.length ) {\r\n search_results.remove();\r\n }\r\n }, 500);\r\n\t\t\t\r\n return this.update_attribute( attribute, val );\r\n },\r\n /**\r\n * Returns configs of condition\r\n *\r\n * @returns bool true\r\n */\r\n get_configs: function(){\r\n return this.defaults || true;\r\n }\r\n });\r\n\r\n var reanable_scroll = function(){\r\n\t\t/**\r\n\t\t * Reanable scrolling for the container\r\n\t\t * select2 disables scrolling after select so we reanable it\r\n\t\t */\r\n\t\t$(\".wph-conditions--items\").data(\"select2ScrollPosition\", {});\r\n\t},\r\n\teither_all_or_others = function(e){\r\n var val = [\"all\"];\r\n if( e.params && e.params.args && e.params.args.data && e.params.args.data.id && \"all\" === e.params.args.data.id ){\r\n\r\n }else{\r\n val = $(this).val();\r\n if( val && -1 !== val.indexOf( \"all\" ) )\r\n val.splice( val.indexOf( \"all\" ), 1 );\r\n else\r\n val = ( val || [] ).concat( [e.params.args.data.id ] );\r\n\t\t\t\r\n if( !val || !val.length )\r\n val = [ e.params.args.data.id ];\r\n }\r\n\r\n $(this).val(val).trigger(\"change\");\r\n },\r\n Toggle_Button_Toggler_Mixin = {\r\n events: {\r\n \"change input[type='radio']\": \"set_current_li\"\r\n },\r\n set_current_li: function(e){\r\n var $this = $(e.target),\r\n $li = $this.closest(\"li\");\r\n\r\n $li.siblings().removeClass(\"current\");\r\n $li.toggleClass( \"current\", $this.is(\":checked\") );\r\n }\r\n };\r\n\r\n /**\r\n * Posts\r\n */\r\n Optin.View.Conditions.posts = Condition_Base.extend(_.extend( {}, Toggle_Button_Toggler_Mixin, {\r\n condition_id: \"posts\",\r\n title: optin_vars.messages.conditions.posts,\r\n label: optin_vars.messages.condition_labels.posts,\r\n defaults: {\r\n filter_type: \"only\", // except | only\r\n posts: []\r\n },\r\n on_init: function(){\r\n\t\t\tthis.listenTo(this.model, \"change\", this.render );\r\n\t\t\tthis.update_label();\r\n },\r\n get_header: function(){\r\n\t\t\tthis.update_label();\r\n\t\t\tthis.trigger(\"change:update_label\", this);\r\n if( _.contains( this.get_attribute( \"posts\" ), \"all\" ) )\r\n return this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.all_posts : optin_vars.messages.condition_labels.no_posts;\r\n\r\n if( this.get_attribute( \"posts\" ).length ) {\r\n\t\t\t\treturn ( this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.only_on_these_posts : optin_vars.messages.condition_labels.except_these_posts ).replace(\"{number}\", this.get_attribute( \"posts\" ).length );\r\n\t\t\t} else {\r\n\t\t\t\treturn ( this.get_attribute(\"filter_type\") === \"only\" ) ? optin_vars.messages.condition_labels.no_posts : optin_vars.messages.condition_labels.all_posts;\r\n\t\t\t}\r\n },\r\n\t\tupdate_label: function(){\r\n\t\t\tif ( this.get_attribute( \"posts\" ).length && !_.contains( this.get_attribute( \"posts\" ), \"all\" ) ) {\r\n\t\t\t\tthis.label = ( this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.number_posts : optin_vars.messages.condition_labels.except_these_posts ).replace(\"{number}\", this.get_attribute( \"posts\" ).length ? this.get_attribute( \"posts\" ).length : 0 );\r\n\t\t\t} else {\r\n\t\t\t\tif( _.contains( this.get_attribute( \"posts\" ), \"all\" ) ) {\r\n\t\t\t\t\tthis.label = this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.all_posts : optin_vars.messages.condition_labels.no_posts;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.label = this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.no_posts : optin_vars.messages.condition_labels.all_posts;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n body: function(){\r\n return this.template( this.get_data() );\r\n },\r\n rendered: function(){\r\n this.$('.js-wpoi-select').wpmuiSelect({\r\n tags: \"true\",\r\n width : \"100%\",\r\n\t\t\t\tcreateTag: function(){ return false; }\r\n })\r\n .on('select2:selecting', either_all_or_others )\r\n .on('select2:selecting', reanable_scroll )\r\n .on('select2:unselect', reanable_scroll);\r\n \r\n }\r\n }) );\r\n\r\n /**\r\n * Pages\r\n */\r\n Optin.View.Conditions.pages = Condition_Base.extend(_.extend( {}, Toggle_Button_Toggler_Mixin, {\r\n condition_id: \"pages\",\r\n title: optin_vars.messages.conditions.pages,\r\n label: optin_vars.messages.condition_labels.pages,\r\n defaults: {\r\n filter_type: \"only\", // except | only\r\n pages: []\r\n },\r\n on_init: function(){\r\n this.listenTo(this.model, \"change\", this.render );\r\n\t\t\tthis.update_label();\r\n },\r\n get_header: function(){\r\n\t\t\tthis.update_label();\r\n\t\t\tthis.trigger(\"change:update_label\", this);\r\n\t\t\tif( _.contains( this.get_attribute( \"pages\" ), \"all\" ) )\r\n return this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.all_pages : optin_vars.messages.condition_labels.no_pages;\r\n\r\n if( this.get_attribute( \"pages\" ).length ) {\r\n\t\t\t\treturn ( this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.only_on_these_pages : optin_vars.messages.condition_labels.except_these_pages ).replace(\"{number}\", this.get_attribute( \"pages\" ).length );\r\n\t\t\t} else {\r\n\t\t\t\treturn ( this.get_attribute(\"filter_type\") === \"only\" ) ? optin_vars.messages.condition_labels.no_pages : optin_vars.messages.condition_labels.all_pages;\r\n\t\t\t}\r\n },\r\n\t\tupdate_label: function(){\r\n\t\t\tif ( this.get_attribute( \"pages\" ).length && !_.contains( this.get_attribute( \"pages\" ), \"all\" ) ) {\r\n\t\t\t\tthis.label = ( this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.number_pages : optin_vars.messages.condition_labels.except_these_pages ).replace(\"{number}\", this.get_attribute( \"pages\" ).length ? this.get_attribute( \"pages\" ).length : 0 );\r\n\t\t\t} else {\r\n\t\t\t\tif( _.contains( this.get_attribute( \"pages\" ), \"all\" ) ) {\r\n\t\t\t\t\tthis.label = this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.all_pages : optin_vars.messages.condition_labels.no_pages;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.label = this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.no_pages : optin_vars.messages.condition_labels.all_pages;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n body: function(){\r\n return this.template( this.get_data() );\r\n },\r\n rendered: function(){\r\n this.$('.js-wpoi-select').wpmuiSelect({\r\n tags: \"true\",\r\n width : \"100%\",\r\n\t\t\t\t\tcreateTag: function(){ return false; }\r\n })\r\n .on('select2:selecting', either_all_or_others )\r\n .on('select2:selecting', reanable_scroll )\r\n .on('select2:unselect', reanable_scroll);\r\n\r\n }\r\n }));\r\n\t\r\n\t/**\r\n * Custom Post Types\r\n */\r\n\t_.each( optin_vars.post_types, function( cpt_details, cpt ) {\r\n\t\tvar cpt_name = cpt_details.label.toLowerCase();\r\n\t\tOptin.View.Conditions[cpt_details.label] = Condition_Base.extend(_.extend( {}, Toggle_Button_Toggler_Mixin, {\r\n\t\t\tcondition_id: cpt_details.label,\r\n\t\t\ttitle: cpt_details.label,\r\n\t\t\tlabel: optin_vars.messages.condition_labels.posts,\r\n\t\t\tcpt: true,\r\n\t\t\tdefaults: {\r\n\t\t\t\tfilter_type: \"only\", // except | only\r\n\t\t\t\tselected_cpts: [],\r\n\t\t\t\tpost_type: cpt,\r\n\t\t\t\tpost_type_label: cpt_details.label,\r\n\t\t\t},\r\n\t\t\ton_init: function(){\r\n\t\t\t\tthis.listenTo(this.model, \"change\", this.render );\r\n\t\t\t\tthis.update_label();\r\n\t\t\t},\r\n\t\t\tget_header: function(){\r\n\t\t\t\tthis.update_label();\r\n\t\t\t\tthis.trigger(\"change:update_label\", this);\r\n\t\t\t\tif( _.contains( this.get_attribute( \"selected_cpts\" ), \"all\" ) )\r\n\t\t\t\t\treturn this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.all + \" \" + cpt_name : optin_vars.messages.condition_labels.no + \" \" + cpt_name;\r\n\r\n\t\t\t\tif( this.get_attribute( \"selected_cpts\" ).length ) {\r\n\t\t\t\t\treturn ( this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.only_on_these_posts : optin_vars.messages.condition_labels.except_these_posts ).replace(\"{number}\", this.get_attribute( \"selected_cpts\" ).length ).replace(\"posts\", cpt_name);\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn ( this.get_attribute(\"filter_type\") === \"only\" ) ? optin_vars.messages.condition_labels.no + \" \" + cpt_name : optin_vars.messages.condition_labels.all + \" \" + cpt_name;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tupdate_label: function(){\r\n\t\t\t\tif ( this.get_attribute( \"selected_cpts\" ).length && !_.contains( this.get_attribute( \"selected_cpts\" ), \"all\" ) ) {\r\n\t\t\t\t\tthis.label = ( this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.number_posts : optin_vars.messages.condition_labels.except_these_posts ).replace(\"{number}\", this.get_attribute( \"selected_cpts\" ).length ? this.get_attribute( \"selected_cpts\" ).length : 0 ).replace(\"posts\", cpt_name);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif( _.contains( this.get_attribute( \"selected_cpts\" ), \"all\" ) ) {\r\n\t\t\t\t\t\tthis.label = this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.all + \" \" + cpt_name : optin_vars.messages.condition_labels.no + \" \" + cpt_name;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.label = this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.no + \" \" + cpt_name : optin_vars.messages.condition_labels.all + \" \" + cpt_name;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tbody: function(){\r\n\t\t\t\treturn this.template( this.get_data() );\r\n\t\t\t},\r\n\t\t\trendered: function(){\r\n\t\t\t\tthis.$('.js-wpoi-select').wpmuiSelect({\r\n\t\t\t\t\ttags: \"true\",\r\n\t\t\t\t\twidth : \"100%\",\r\n\t\t\t\t\tcreateTag: function(){ return false; }\r\n\t\t\t\t})\r\n\t\t\t\t.on('select2:selecting', either_all_or_others )\r\n\t\t\t\t.on('select2:selecting', reanable_scroll )\r\n\t\t\t\t.on('select2:unselect', reanable_scroll);\r\n\t\t\t}\r\n\t\t}) );\r\n\t});\r\n\r\n /**\r\n * Categories\r\n */\r\n Optin.View.Conditions.categories = Condition_Base.extend(_.extend( {}, Toggle_Button_Toggler_Mixin, {\r\n condition_id: \"categories\",\r\n title: optin_vars.messages.conditions.categories,\r\n label: optin_vars.messages.condition_labels.categories,\r\n defaults: {\r\n filter_type: \"only\", // except | only\r\n categories: []\r\n },\r\n on_init: function(){\r\n this.listenTo(this.model, \"change\", this.render );\r\n\t\t\tthis.update_label();\r\n },\r\n get_header: function(){\r\n\t\t\tthis.update_label();\r\n\t\t\tthis.trigger(\"change:update_label\", this);\r\n\t\t\t\r\n\t\t\tif( _.contains( this.get_attribute( \"categories\" ), \"all\" ) )\r\n return this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.all_categories : optin_vars.messages.condition_labels.no_categories;\r\n\r\n if( this.get_attribute( \"categories\" ).length ) {\r\n\t\t\t\treturn ( this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.only_on_these_categories : optin_vars.messages.condition_labels.except_these_categories ).replace(\"{number}\", this.get_attribute( \"categories\" ).length );\r\n\t\t\t} else {\r\n\t\t\t\treturn ( this.get_attribute(\"filter_type\") === \"only\" ) ? optin_vars.messages.condition_labels.no_categories : optin_vars.messages.condition_labels.all_categories;\r\n\t\t\t}\r\n },\r\n\t\tupdate_label: function(){\r\n\t\t\tif ( this.get_attribute( \"categories\" ).length && !_.contains( this.get_attribute( \"categories\" ), \"all\" ) ) {\r\n\t\t\t\tthis.label = ( this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.number_categories : optin_vars.messages.condition_labels.except_these_categories ).replace(\"{number}\", this.get_attribute( \"categories\" ).length ? this.get_attribute( \"categories\" ).length : 0 );\r\n\t\t\t} else {\r\n\t\t\t\tif( _.contains( this.get_attribute( \"categories\" ), \"all\" ) ) {\r\n\t\t\t\t\tthis.label = this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.all_categories : optin_vars.messages.condition_labels.no_categories;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.label = this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.no_categories : optin_vars.messages.condition_labels.all_categories;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n body: function(){\r\n return this.template( this.get_data() );\r\n },\r\n rendered: function(){\r\n this.$('.js-wpoi-select').wpmuiSelect({\r\n tags: \"true\",\r\n width : \"100%\",\r\n\t\t\t\t\tcreateTag: function(){ return false; }\r\n })\r\n\t\t\t.on('select2:selecting', reanable_scroll )\r\n .on('select2:unselect', reanable_scroll);\r\n }\r\n }));\r\n\r\n /**\r\n * Tags\r\n */\r\n Optin.View.Conditions.tags = Condition_Base.extend(_.extend( {}, Toggle_Button_Toggler_Mixin, {\r\n condition_id: \"tags\",\r\n title: optin_vars.messages.conditions.tags,\r\n label: optin_vars.messages.condition_labels.tags,\r\n defaults: {\r\n filter_type: \"only\", // except | only\r\n tags: []\r\n },\r\n on_init: function(){\r\n this.listenTo(this.model, \"change\", this.render );\r\n\t\t\tthis.update_label();\r\n },\r\n get_header: function(){\r\n\t\t\tthis.update_label();\r\n\t\t\tthis.trigger(\"change:update_label\", this);\r\n\t\t\tif( _.contains( this.get_attribute( \"tags\" ), \"all\" ) )\r\n return this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.all_tags : optin_vars.messages.condition_labels.no_tags;\r\n\r\n if( this.get_attribute( \"tags\" ).length ) {\r\n\t\t\t\treturn ( this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.only_on_these_tags : optin_vars.messages.condition_labels.except_these_tags ).replace(\"{number}\", this.get_attribute( \"tags\" ).length );\r\n\t\t\t} else {\r\n\t\t\t\treturn ( this.get_attribute(\"filter_type\") === \"only\" ) ? optin_vars.messages.condition_labels.no_tags : optin_vars.messages.condition_labels.all_tags;\r\n\t\t\t}\r\n },\r\n\t\tupdate_label: function(){\r\n\t\t\tif ( this.get_attribute( \"tags\" ).length && !_.contains( this.get_attribute( \"tags\" ), \"all\" ) ) {\r\n\t\t\t\tthis.label = ( this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.number_tags : optin_vars.messages.condition_labels.except_these_tags ).replace(\"{number}\", this.get_attribute( \"tags\" ).length ? this.get_attribute( \"tags\" ).length : 0 );\r\n\t\t\t} else {\r\n\t\t\t\tif( _.contains( this.get_attribute( \"tags\" ), \"all\" ) ) {\r\n\t\t\t\t\tthis.label = this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.all_tags : optin_vars.messages.condition_labels.no_tags;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.label = this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.no_tags : optin_vars.messages.condition_labels.all_tags;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n body: function(){\r\n return this.template( this.get_data() );\r\n },\r\n rendered: function(){\r\n this.$('.js-wpoi-select').wpmuiSelect({\r\n tags: \"true\",\r\n width : \"100%\",\r\n\t\t\t\t\tcreateTag: function(){ return false; }\r\n })\r\n\t\t\t.on('select2:selecting', reanable_scroll )\r\n .on('select2:unselect', reanable_scroll);\r\n }\r\n }));\r\n\r\n Optin.View.Conditions.visitor_logged_in = Condition_Base.extend({\r\n condition_id: \"visitor_logged_in\",\r\n disable: ['visitor_not_logged_in'],\r\n title: optin_vars.messages.conditions.visitor_logged_in,\r\n label: optin_vars.messages.condition_labels.visitor_logged_in,\r\n body: optin_vars.messages.conditions_body.visitor_logged_in\r\n });\r\n\r\n Optin.View.Conditions.visitor_not_logged_in = Condition_Base.extend({\r\n condition_id: \"visitor_not_logged_in\",\r\n disable: ['visitor_logged_in'],\r\n title: optin_vars.messages.conditions.visitor_not_logged_in,\r\n label: optin_vars.messages.condition_labels.visitor_not_logged_in,\r\n body: optin_vars.messages.conditions_body.visitor_not_logged_in\r\n });\r\n\r\n Optin.View.Conditions.shown_less_than = Condition_Base.extend({\r\n condition_id: \"shown_less_than\",\r\n title: optin_vars.messages.conditions.shown_less_than,\r\n label: optin_vars.messages.condition_labels.shown_less_than,\r\n defaults: {\r\n less_than: 1\r\n },\r\n body: function(){\r\n return this.template( this.get_data() );\r\n }\r\n });\r\n\r\n Optin.View.Conditions.only_on_mobile = Condition_Base.extend({\r\n condition_id: \"only_on_mobile\",\r\n disable: ['not_on_mobile'],\r\n title: optin_vars.messages.conditions.only_on_mobile,\r\n label: optin_vars.messages.condition_labels.only_on_mobile,\r\n body: optin_vars.messages.conditions_body.only_on_mobile\r\n });\r\n\r\n Optin.View.Conditions.not_on_mobile = Condition_Base.extend({\r\n condition_id: \"not_on_mobile\",\r\n disable: ['only_on_mobile'],\r\n title: optin_vars.messages.conditions.not_on_mobile,\r\n label: optin_vars.messages.condition_labels.not_on_mobile,\r\n body: optin_vars.messages.conditions_body.not_on_mobile\r\n });\r\n\r\n /**\r\n * From a specific referrer\r\n */\r\n Optin.View.Conditions.from_specific_ref = Condition_Base.extend({\r\n condition_id: \"from_specific_ref\",\r\n disable: ['not_from_specific_ref'],\r\n title: optin_vars.messages.conditions.from_specific_ref,\r\n label: optin_vars.messages.condition_labels.from_specific_ref,\r\n defaults: {\r\n refs: \"\"\r\n },\r\n body: function(){\r\n return this.template( this.get_data() );\r\n }\r\n });\r\n\r\n /**\r\n * Not from a specific referrer\r\n */\r\n Optin.View.Conditions.not_from_specific_ref = Condition_Base.extend({\r\n condition_id: \"not_from_specific_ref\",\r\n disable: ['from_specific_ref'],\r\n title: optin_vars.messages.conditions.not_from_specific_ref,\r\n label: optin_vars.messages.condition_labels.not_from_specific_ref,\r\n defaults: {\r\n refs: \"\"\r\n },\r\n body: function(){\r\n return this.template( this.get_data() );\r\n }\r\n });\r\n\r\n /**\r\n * Not from an internal link\r\n */\r\n Optin.View.Conditions.not_from_internal_link = Condition_Base.extend({\r\n condition_id: \"not_from_internal_link\",\r\n title: optin_vars.messages.conditions.not_from_internal_link,\r\n label: optin_vars.messages.condition_labels.not_from_internal_link,\r\n body: optin_vars.messages.conditions_body.not_from_internal_link\r\n });\r\n\r\n /**\r\n * From a search engine\r\n */\r\n Optin.View.Conditions.from_search_engine = Condition_Base.extend({\r\n condition_id: \"from_search_engine\",\r\n title: optin_vars.messages.conditions.from_search_engine,\r\n label: optin_vars.messages.condition_labels.from_search_engine,\r\n body: optin_vars.messages.conditions_body.from_search_engine\r\n });\r\n\r\n /**\r\n * Site is not a Pro Site\r\n */\r\n //Optin.View.Conditions.not_a_pro_site = Condition_Base.extend({\r\n // condition_id: \"not_a_pro_site\",\r\n // title: \"Site is not a Pro Site\",\r\n // body: \"Shows the Pop Up if the site is not a Pro Site.\"\r\n //});\r\n\r\n /**\r\n * On specific URL\r\n */\r\n Optin.View.Conditions.on_specific_url = Condition_Base.extend({\r\n condition_id: \"on_specific_url\",\r\n disable: ['not_on_specific_url'],\r\n title: optin_vars.messages.conditions.on_specific_url,\r\n label: optin_vars.messages.condition_labels.on_specific_url,\r\n defaults: {\r\n urls: \"\"\r\n },\r\n body: function(){\r\n return this.template( this.get_data() );\r\n }\r\n });\r\n\r\n /**\r\n * Not on specific URL\r\n */\r\n Optin.View.Conditions.not_on_specific_url = Condition_Base.extend({\r\n condition_id: \"not_on_specific_url\",\r\n disable: ['on_specific_url'],\r\n title: optin_vars.messages.conditions.not_on_specific_url,\r\n label: optin_vars.messages.condition_labels.not_on_specific_url,\r\n defaults: {\r\n urls: \"\"\r\n },\r\n body: function(){\r\n return this.template( this.get_data() );\r\n }\r\n });\r\n\r\n /**\r\n * Visitor has commented before\r\n */\r\n Optin.View.Conditions.visitor_has_commented = Condition_Base.extend({\r\n condition_id: \"visitor_has_commented\",\r\n disable: ['visitor_has_never_commented'],\r\n title: optin_vars.messages.conditions.visitor_has_commented,\r\n label: optin_vars.messages.condition_labels.visitor_has_commented,\r\n body: optin_vars.messages.conditions_body.visitor_has_commented\r\n });\r\n\r\n /**\r\n * Visitor has never commented\r\n */\r\n Optin.View.Conditions.visitor_has_never_commented = Condition_Base.extend({\r\n condition_id: \"visitor_has_never_commented\",\r\n disable: ['visitor_has_commented'],\r\n title: optin_vars.messages.conditions.visitor_has_never_commented,\r\n label: optin_vars.messages.condition_labels.visitor_has_never_commented,\r\n body: optin_vars.messages.conditions_body.visitor_has_never_commented\r\n });\r\n\r\n /**\r\n * In a specific Country\r\n */\r\n Optin.View.Conditions.in_a_country = Condition_Base.extend({\r\n condition_id: \"in_a_country\",\r\n disable: ['not_in_a_country'],\r\n title: optin_vars.messages.conditions.in_a_country,\r\n label: optin_vars.messages.condition_labels.in_a_country,\r\n defaults: {\r\n countries: \"\"\r\n },\r\n body: function(){\r\n return this.template( this.get_data() );\r\n },\r\n rendered: function(){\r\n this.$('.js-wpoi-select')\r\n .val( this.get_attribute( \"countries\" ) )\r\n .wpmuiSelect()\r\n\t\t\t\t.on('select2:selecting', reanable_scroll )\r\n\t\t\t\t.on('select2:unselect', reanable_scroll);\r\n }\r\n });\r\n\r\n /**\r\n * Not in a specific Country\r\n */\r\n Optin.View.Conditions.not_in_a_country = Condition_Base.extend({\r\n condition_id: \"not_in_a_country\",\r\n disable: ['in_a_country'],\r\n title: optin_vars.messages.conditions.not_in_a_country,\r\n label: optin_vars.messages.condition_labels.not_in_a_country,\r\n defaults: {\r\n countries: \"\"\r\n },\r\n body: function(){\r\n return this.template( this.get_data() );\r\n },\r\n rendered: function(){\r\n this.$('.js-wpoi-select')\r\n .val( this.get_attribute( \"countries\" ) )\r\n .wpmuiSelect()\r\n\t\t\t\t.on('select2:selecting', reanable_scroll )\r\n\t\t\t\t.on('select2:unselect', reanable_scroll);\r\n }\r\n });\r\n\r\n\r\n}( jQuery ));","(function( $ ) {\r\n \"use strict\";\r\n\r\n Optin.View.Display_Triggers = Backbone.View.extend($.extend( true, {}, Optin.View.Template_Mixin, {\r\n template: Optin.template(\"wpoi-wizard-settings-triggers-template\"),\r\n events: {\r\n 'click .tabs-header label': \"change_tab\"\r\n },\r\n initialize: function( opts ){\r\n this.el = opts.el;\r\n this.type = opts.type;\r\n\r\n this.listenTo( this.model, \"change:\" + this.type + \".trigger_on_adblock\", this.hide_adblock_options_on_toggle);\r\n this.render();\r\n },\r\n render: function(){\r\n this.$el.html( this.template( this.get_data() ) );\r\n this.hide_adblock_options_on_toggle();\r\n return this;\r\n },\r\n get_data: function(){\r\n var data = {};\r\n data.type = this.type;\r\n data.shortcode_id = this.model.get(\"shortcode_id\");\r\n return _.extend( {}, data, this.model.get( this.type).toJSON() );\r\n },\r\n change_tab: function(event){\r\n event.preventDefault();\r\n var $this = this.$(event.target),\r\n $this_tab = $this.parent(\"li\"),\r\n $this_content = this.$( $this.attr(\"href\")),\r\n $radio = $this.find(\"input[type='radio']\");\r\n this.$(\".tabs-header li\").removeClass(\"current\");\r\n this.$(\".tabs-content\").removeClass(\"current\");\r\n\r\n $this_tab.addClass(\"current\");\r\n $this_content.addClass(\"current\");\r\n $radio.prop(\"checked\", true);\r\n\r\n this.model.set( this.type +\".appear_after\", $radio.val() );\r\n },\r\n hide_adblock_options_on_toggle: function(){\r\n if( _.isTrue( this.model.get( this.type + \".trigger_on_adblock\" ) ) ){\r\n this.$(\".wpoi-popup-trigger-on-adblock-option\").show();\r\n }else{\r\n this.$(\".wpoi-popup-trigger-on-adblock-option\").hide();\r\n }\r\n }\r\n }) );\r\n}(jQuery));","Hustle.define(\"Settings.E_News\", function($){\r\n \"use strict\";\r\n return Backbone.View.extend({\r\n el: \"#enews-sync-box\",\r\n back_tpl: Optin.template(\"wpoi-e-newsletter-box-back\"),\r\n initial_html: \"\",\r\n events: {\r\n \"click .optin-enews-sync-setup\" : \"setup\",\r\n \"click .optin-enews-sync-cancel\" : \"cancel\",\r\n \"click .optin-enews-sync-save\" : \"save\",\r\n \"click .optin-enews-sync-toggle\" : \"toggle\",\r\n \"click .optin-enews-sync-edit\" : \"setup\"\r\n },\r\n initialize: function(){\r\n this.initial_html = this.$el.html();\r\n },\r\n setup: function(e){\r\n e.preventDefault();\r\n var self = this,\r\n $this = $(e.target),\r\n id = $this.data(\"id\"),\r\n nonce = $this.data(\"nonce\"),\r\n is_edit = $this.hasClass(\"optin-enews-sync-edit\");\r\n\r\n $.ajax({\r\n url: ajaxurl,\r\n type: \"GET\",\r\n data: {\r\n action: \"inc_opt_get_enews_sync_setup\",\r\n _ajax_nonce: nonce,\r\n id: id\r\n },\r\n success: function( res ){\r\n if( res.success ){\r\n self.$el.html( self.back_tpl( res.data ) );\r\n }\r\n },\r\n error: function(res){\r\n\r\n }\r\n });\r\n },\r\n cancel: function(e){\r\n e.preventDefault();\r\n this.$el.html( this.initial_html );\r\n },\r\n save: function(e){\r\n e.preventDefault();\r\n var self = this,\r\n $this = $(e.target),\r\n id = $this.data(\"id\"),\r\n groups = [],\r\n nonce = $this.data(\"nonce\");\r\n\r\n this.$(\".wpoi-e-newsletter-group\").each(function( index, checkbox ){\r\n if( checkbox.checked )\r\n groups.push( checkbox.value );\r\n });\r\n\r\n $.ajax({\r\n url: ajaxurl,\r\n type: \"POST\",\r\n data: {\r\n action: \"inc_opt_save_enews_sync_setup\",\r\n _ajax_nonce: nonce,\r\n id: id,\r\n groups: groups\r\n },\r\n success: function( res ){\r\n if( res.success ){\r\n self.$el.html( res.data.html );\r\n }\r\n },\r\n error: function(res){\r\n\r\n }\r\n });\r\n },\r\n toggle: function(e){\r\n var self = this,\r\n $this = $(e.target),\r\n id = $this.data(\"id\"),\r\n nonce = $this.data(\"nonce\"),\r\n state = $this.is(\":checked\");\r\n\r\n $.ajax({\r\n url: ajaxurl,\r\n type: \"POST\",\r\n data: {\r\n action: \"inc_opt_toggle_enews_sync\",\r\n _ajax_nonce: nonce,\r\n id: id,\r\n state: state\r\n },\r\n success: function( res ){\r\n if( res.success ){\r\n $this.attr(\"checked\", state);\r\n self.initial_html = self.$el.html();\r\n }\r\n\r\n }\r\n });\r\n }\r\n });\r\n\r\n});\r\n","Hustle.define(\"Settings.Modules_Activity\", function($){\r\n \"use strict\";\r\n return Backbone.View.extend({\r\n el: \"#modules-activity\",\r\n events: {\r\n \"change .hustle-for-admin-user-toggle\": \"toggle_for_user\",\r\n \"change .hustle-for-logged-in-user-toggle\": \"toggle_for_user\"\r\n },\r\n initialize: function(){\r\n\r\n },\r\n toggle_for_user: function(e){\r\n var $this = this.$( e.target ),\r\n id = $this.data(\"id\"),\r\n nonce = $this.data(\"nonce\"),\r\n user = $this.data(\"user\");\r\n\r\n $this.attr(\"disabled\", true);\r\n $.ajax( {\r\n url: ajaxurl,\r\n type: \"POST\",\r\n data: {\r\n action: \"hustle_toggle_module_for_user\",\r\n id: id,\r\n _ajax_nonce: nonce,\r\n user_type: user\r\n },\r\n complete: function( res, res_status ){\r\n $this.attr(\"disabled\", false);\r\n },\r\n success: function(res){\r\n if( !res.success )\r\n $this.prop(\"checked\", !$this.is(\":checked\") );\r\n },\r\n error: function(){\r\n $this.prop(\"checked\", !$this.is(\":checked\") );\r\n }\r\n\r\n });\r\n\r\n }\r\n });\r\n\r\n});\r\n","Hustle.define(\"Settings.Services_Edit_Modal\", function($){\r\n \"use strict\";\r\n return Backbone.View.extend({\r\n template: Hustle.template(\"wph-edit-provider-modal-tpl\"),\r\n id: \"wph-edit-provider-modal\",\r\n events: {\r\n \"click .i-close\": \"close\",\r\n \"click .js-wph-button-cancel\": \"close\",\r\n \"change #wph-provider-edit-modal-provider\": \"get_provider_options\",\r\n \"click #wph-edit-service-save\": \"save_settings\",\r\n \"submit form\": \"save_settings\"\r\n },\r\n provider_options_nonce: false,\r\n initialize: function(){\r\n\r\n this.render();\r\n },\r\n render: function(){\r\n var self = this;\r\n this.$el.html( this.template() ).appendTo(\"body\");\r\n\r\n $.ajax({\r\n url: ajaxurl,\r\n type: \"get\",\r\n data: {\r\n action: \"hustle_get_providers_edit_modal_content\",\r\n id: self.model.get(\"id\"),\r\n source: self.model.get(\"source\"),\r\n _ajax_nonce: self.model.get(\"nonce\")\r\n },\r\n success: function(res){\r\n if( res.success ){\r\n self.$(\".wph-edit-provider-modal-content\").html( res.data.html );\r\n self.provider_options_nonce = res.data.provider_options_nonce;\r\n //self.delegateEvents();\r\n Hustle.Events.trigger(\"view.rendered\", self);\r\n }\r\n }\r\n });\r\n\r\n },\r\n get_provider_options: function(e){\r\n var self = this,\r\n $this = this.$(e.target),\r\n $details_placeholder = this.$(\"#optin_new_provider_account_details\"),\r\n $options_placeholder = this.$(\"#optin_new_provider_account_options\");\r\n\r\n $details_placeholder.empty();\r\n $options_placeholder.empty();\r\n $.ajax({\r\n url: ajaxurl,\r\n type: \"get\",\r\n data:{\r\n action: \"render_provider_account_options\",\r\n provider_id: $this.val(),\r\n _ajax_nonce: self.provider_options_nonce,\r\n optin: self.model.get(\"id\")\r\n },\r\n success: function(res){\r\n if( res.success ){\r\n $details_placeholder.html( res.data );\r\n\t\t\t\t\tHustle.Events.trigger(\"view.rendered\", self);\r\n }\r\n\r\n }\r\n });\r\n },\r\n close: function(e){\r\n e.preventDefault();\r\n this.remove();\r\n },\r\n hide: function(){\r\n },\r\n show: function(){\r\n },\r\n save_settings: function(e){\r\n e.preventDefault();\r\n var $this = this.$(e.target),\r\n nonce = $this.data(\"nonce\"),\r\n $selector = this.$(\"#wph-provider-edit-modal-provider\"),\r\n $form = $this.closest(\"form\");\r\n\r\n $.ajax({\r\n url: ajaxurl,\r\n type: \"post\",\r\n data:{\r\n action: \"hustle_save_providers_edit_modal\",\r\n provider_id: $selector.val(),\r\n _ajax_nonce: nonce,\r\n id: this.model.get(\"id\"),\r\n source: this.model.get(\"source\"),\r\n form: $form.serialize()\r\n },\r\n success: function(res){\r\n }\r\n });\r\n }\r\n });\r\n});","Hustle.define(\"Settings.Services\", function($){\r\n \"use strict\";\r\n return Backbone.View.extend({\r\n el: \"#providers-edit-box\",\r\n Modal_View: Hustle.get( \"Settings.Services_Edit_Modal\" ),\r\n modal: false,\r\n events: {\r\n \"click .wph-providers-edit\": \"open_edit_modal\"\r\n },\r\n open_edit_modal: function( e ){\r\n var $this = this.$(e.target),\r\n id = $this.data(\"id\"),\r\n source = $this.data(\"source\"),\r\n nonce = $this.data(\"nonce\");\r\n\r\n this.modal = new this.Modal_View({ model: new Backbone.Model( {id: id, nonce: nonce, source: source} ) });\r\n\r\n\r\n }\r\n\r\n });\r\n});","(function( $, doc ) {\r\n \"use strict\";\r\n\r\n $(document).on(\"click\", '.wpoi-listing-wrap header.can-open .toggle, .wpoi-listing-wrap header.can-open .toggle-label', function(e){\r\n e.stopPropagation();\r\n });\r\n\r\n\r\n $(\".accordion header .optin-delete-optin, .accordion header .edit-optin, .wpoi-optin-details tr .button-edit\").hide().css({\r\n transition : 'none'\r\n });\r\n\r\n $(document).on({\r\n mouseenter: function () {\r\n var $this = $(this);\r\n $this.find(\".optin-delete-optin, .edit-optin\").stop().fadeIn(\"fast\");\r\n },\r\n mouseleave: function () {\r\n var $this = $(this);\r\n $this.find(\".toggle-checkbox\").removeProp(\"disabled\");\r\n $this.find(\".edit-optin\").removeProp(\"disabled\");\r\n $this.removeClass(\"disabled\");\r\n $this.find(\".optin-delete-optin, .edit-optin, .delete-optin-confirmation\").stop().fadeOut(\"fast\");\r\n }\r\n }, \".accordion header\");\r\n\r\n $(document).on({\r\n mouseenter: function () {\r\n var $this = $(this);\r\n $this.find(\".button-edit\").stop().fadeIn(\"fast\");\r\n },\r\n mouseleave: function () {\r\n var $this = $(this);\r\n $this.find(\".button-edit\").stop().fadeOut(\"fast\");\r\n }\r\n }, \".wpoi-optin-details tr\");\r\n\r\n $(document).on(\"click\", \".wpoi-tabs-menu a\", function(event){\r\n event.preventDefault();\r\n var tab = $(this).attr(\"tab\");\r\n Optin.router.navigate(tab, true);\r\n });\r\n\r\n $(document).on(\"click\", \".edit-optin\", function(event){\r\n event.stopPropagation();\r\n event.preventDefault();\r\n window.location.href = $(this).attr(\"href\");\r\n });\r\n\r\n $(document).on(\"click\", \".wpoi-type-edit-button\", function(event){\r\n event.preventDefault();\r\n var optin_id = $(this).data(\"id\");\r\n var optin_type = $(this).data(\"type\");\r\n window.location.href = \"admin.php?page=inc_optin&optin=\" + optin_id + \"#display/\" + optin_type;\r\n });\r\n\r\n /**\r\n * Make \"for\" attribute work on tags that don't support \"for\" by default\r\n *\r\n */\r\n $(document).on(\"click\", '*[for]', function(e){\r\n var $this = $(this),\r\n _for = $this.attr( 'for'),\r\n $for = $(\"#\" + _for);\r\n\r\n if( $this.is(\"label\") || !$for.length ) return;\r\n\r\n $for.trigger(\"change\");\r\n $for.trigger(\"click\");\r\n });\r\n\r\n $(\"#wpoi-complete-message\").fadeIn();\r\n\r\n $(document).on(\"click\", '#wpoi-complete-message .next-button button', function(e){\r\n $(\"#wpoi-complete-message\").fadeOut();\r\n });\r\n\r\n $(document).on(\"click\", \".wpoi-listing-page .wpoi-listing-wrap header.can-open\", function(e){\r\n $(this).find(\".open\").trigger(\"click\");\r\n });\r\n\r\n /**\r\n * On click of arrow of any optin in the listing page\r\n *\r\n */\r\n $(document).on(\"click\", \".wpoi-listing-page .wpoi-listing-wrap .can-open .open\", function(e){\r\n e.stopPropagation();\r\n var $this = $(this),\r\n $panel = $this.closest(\".wpoi-listing-wrap\"),\r\n $section = $panel.find(\"section\"),\r\n $others = $(\".wpoi-listing-wrap\").not( $panel ),\r\n $other_sections = $(\".wpoi-listing-wrap section\").not( $section );\r\n\r\n $other_sections.slideUp(300, function(){\r\n $other_sections.removeClass(\"open\");\r\n });\r\n $others.find(\".dev-icon\").removeClass(\"dev-icon-caret_up\").addClass(\"dev-icon-caret_down\");\r\n\r\n $section.slideToggle(300, function(){\r\n $panel.toggleClass(\"open\");\r\n $panel.find(\".dev-icon\").toggleClass( \"dev-icon-caret_up dev-icon-caret_down\" );\r\n });\r\n\r\n });\r\n\r\n\r\n\r\n Optin.decorate_number_inputs = function( elem ){\r\n var $items = elem && elem.$el ? elem.$el.find( '.wph-input--number input' ) : $('.wph-input--number input'),\r\n tpl = Hustle.create_template('<div class=\"wph-nbr--nav\"><div class=\"wph-nbr--button wph-nbr--up {{disabled}}\">+</div><div class=\"wph-nbr--button wph-nbr--down {{disabled}}\">-</div></div>')\r\n ;\r\n $items.each(function(){\r\n var $this = $(this),\r\n disabled_class = $this.is(\":disabled\") ? \"disabled\" : \"\";\r\n\r\n if( !$this.siblings( \".wph-nbr--nav\").length ) // Add + and - buttons only if it's not already added\r\n $this.after(tpl( {disabled: disabled_class } ));\r\n\r\n });\r\n\r\n\t};\r\n\r\n Hustle.Events.on(\"view.rendered\", Optin.decorate_number_inputs);\r\n\r\n // Listen to number input + and - click events\r\n (function (){\r\n $(document).on( \"click\", '.wph-nbr--up:not(.disabled)', function(e){\r\n var $this = $(this),\r\n $wrap = $this.closest( \".wph-input--number\"),\r\n $input = $wrap.find( \"input\"),\r\n oldValue = parseFloat( $input.val() ),\r\n min = $input.attr('min'),\r\n max = $input.attr('max'),\r\n newVal;\r\n\r\n if (oldValue >= max){\r\n newVal = oldValue;\r\n } else {\r\n newVal = oldValue + 1;\r\n }\r\n\r\n if( newVal !== oldValue ){\r\n $input.val(newVal)\r\n .trigger('change');\r\n }\r\n });\r\n\r\n $(document).on( \"click\", '.wph-nbr--down:not(.disabled)', function(e){\r\n var $this = $(this),\r\n $wrap = $this.closest( \".wph-input--number\"),\r\n $input = $wrap.find( \"input\"),\r\n oldValue = parseFloat( $input.val() ),\r\n min = $input.attr('min'),\r\n max = $input.attr('max'),\r\n newVal;\r\n\r\n\r\n if (oldValue <= min){\r\n newVal = oldValue;\r\n } else {\r\n newVal = oldValue - 1;\r\n }\r\n\r\n if( newVal !== oldValue ){\r\n $input.val(newVal)\r\n .trigger('change');\r\n }\r\n });\r\n }());\r\n\r\n // Sticky eye icon\r\n (function (){\r\n\t function sticky_relocate(){\r\n\t\t var window_top = $(window).scrollTop();\r\n\t\t var div_top = $(\".wph-sticky--anchor\");\r\n\r\n\t\t if ( ! div_top.length ) return;\r\n\r\n\t\t\tdiv_top = div_top.offset().top;\r\n\t\t if (window_top > div_top) {\r\n\t\t\t $(\".wph-preview--eye\").addClass(\"wph-sticky--element\");\r\n\t\t\t $(\".wph-sticky--anchor\").height($(\".wph-preview--eye\").outerHeight());\r\n\t\t } else {\r\n\t\t\t $(\".wph-preview--eye\").removeClass(\"wph-sticky--element\");\r\n\t\t\t $(\".wph-sticky--anchor\").height(0);\r\n\t\t }\r\n\t }\r\n\t $(function(){\r\n\t\t $(window).scroll(sticky_relocate);\r\n\t\t sticky_relocate();\r\n\t });\r\n }());\r\n\r\n}( jQuery, document ));\r\n","Hustle.define( \"Social_Sharing.Models\", function(){\r\n \"use strict\";\r\n var Services = Hustle.get(\"Models.M\").extend({\r\n defaults: {\r\n optin_name: '',\r\n optin_title: '',\r\n optin_provider: 'social_sharing',\r\n active: 1,\r\n test_mode: 0,\r\n service_type: 'native',\r\n click_counter: 1,\r\n social_icons: ''\r\n }\r\n });\r\n \r\n var Appearance = Hustle.get(\"Models.M\").extend({\r\n defaults: {\r\n icon_style: 'four',\r\n icons_order: '',\r\n customize_colors: 0,\r\n icon_bg_color: 'rgba(146, 158, 170, 1)',\r\n icon_color: 'rgba(255, 255, 255, 1)',\r\n floating_social_bg: 'rgba(4, 48, 69, 1)',\r\n drop_shadow: 0,\r\n drop_shadow_x: 0,\r\n drop_shadow_y: 0,\r\n drop_shadow_blur: 0,\r\n drop_shadow_spread: 0,\r\n drop_shadow_color: 'rgba(0,0,0,0)',\r\n floating_inline_count: 0,\r\n counter_border: 'rgba(146, 158, 170, 1)',\r\n counter_text: 'rgba(255, 255, 255, 1)',\r\n customize_widget_colors: 0,\r\n widget_icon_bg_color: 'rgba(146, 158, 170, 1)',\r\n widget_icon_color: 'rgba(255, 255, 255, 1)',\r\n widget_bg_color: 'rgba(146, 158, 170, 1)',\r\n widget_drop_shadow: 0,\r\n widget_drop_shadow_x: 0,\r\n widget_drop_shadow_y: 0,\r\n widget_drop_shadow_blur: 0,\r\n widget_drop_shadow_spread: 0,\r\n widget_drop_shadow_color: 'rgba(0,0,0,0)',\r\n widget_inline_count: 0,\r\n widget_counter_text: 'rgba(255, 255, 255, 1)'\r\n }\r\n });\r\n\r\n var TypeBase = Hustle.get(\"Models.M\").extend({\r\n defaults:{\r\n enabled: false,\r\n conditions: '',\r\n location_type: 'screen',\r\n location_target: '',\r\n location_align_x: 'left',\r\n location_align_y: 'top',\r\n location_top: 0,\r\n location_bottom: 0,\r\n location_right: 0,\r\n location_left: 0\r\n },\r\n initialize: function(data){\r\n _.extend( this, data );\r\n if( ! ( this.get('conditions') instanceof Backbone.Model ) ){\r\n /**\r\n * Make sure conditions is not an array\r\n */\r\n if( _.isEmpty( this.get('conditions') ) && _.isArray( this.get('conditions') ) )\r\n this.conditions = {};\r\n\r\n\t\t\t\tvar hModel = Hustle.get(\"Model\");\r\n this.set( 'conditions', new hModel( this.conditions ) );\r\n }\r\n\t\t\tthis.on( 'change', this.user_has_change, this );\r\n\r\n }\r\n });\r\n var Floating_Social = TypeBase.extend();\r\n\r\n return {\r\n Services: Services,\r\n Appearance: Appearance,\r\n TypeBase: TypeBase,\r\n\t\tFloating_Social: Floating_Social\r\n };\r\n});\r\n\r\n\r\n","(function( $ ) {\r\n \"use strict\";\r\n /**\r\n * Set optin id from the html template\r\n */\r\n\r\n Optin.get_tpl = function( layout_id ){\r\n var templates = [\"optin-layout-one\", \"optin-layout-two\", \"optin-layout-three\", \"optin-layout-four\"];\r\n\r\n return Optin.template( templates[ layout_id ] );\r\n };\r\n\r\n Optin.View.Alert = Backbone.View.extend({\r\n template: Optin.template(\"optin-alert-modal\"),\r\n //el: \".inc-opt-alert-modal\",\r\n events: {\r\n \"click .inc-opt-alert-modal-close\": \"close\",\r\n \"click .inc-opt-alert-modal\": \"close\",\r\n \"click .inc-opt-alert-modal-close-btn\": \"close\",\r\n \"click .inc-opt-alert-modal-inner-container\": \"prevent_close\"\r\n },\r\n initialize: function(options){\r\n this.options = options;\r\n return this.render();\r\n },\r\n render: function(){\r\n this.$el.html( this.template(_.extend({\r\n close_text: optin_vars.messages.ok\r\n }, this.options) ) );\r\n this.$el.appendTo(\"body\");\r\n },\r\n close: function(e){\r\n this.$el.hide();\r\n this.remove();\r\n },\r\n prevent_close: function(e){\r\n e.preventDefault();\r\n e.stopPropagation();\r\n }\r\n });\r\n\r\n\t/**\r\n\t * Key var to listen user changes before triggering\r\n\t * navigate away message.\r\n\t **/\r\n\tOptin.hasChanges = false;\r\n\tOptin.user_change = function() {\r\n\t\tOptin.hasChanges = true;\r\n\t};\r\n\r\n\twindow.onbeforeunload = function() {\r\n\t\tif ( Optin.hasChanges ) {\r\n\t\t\treturn optin_vars.messages.dont_navigate_away;\r\n\t\t}\r\n\t};\r\n\r\n /**\r\n * Pure object to store each step's template\r\n * @type {{}|*}\r\n */\r\n Optin.step = Optin.step || {};\r\n\r\n Optin.step.activate_step = function(step){\r\n\r\n $(\".wpoi-tabs-menu li\").removeClass(\"active\");\r\n $(\".wpoi-tabs-menu li\").removeClass(\"before\");\r\n $(\".wpoi-tabs-menu li\").eq(step).addClass(\"active\");\r\n $(\".wpoi-tabs-menu li\").slice(0, step).addClass( \"before\" );\r\n //$(\".wpoi-flexbox li\").eq(step).find(\"button\").addClass(\"wpoi-current-step\");\r\n\r\n $(\".wpoi-tabs-wrap > div\").hide();\r\n $(\".wpoi-tabs-wrap > div\").eq(step).show();\r\n\r\n Optin.step.current = step;\r\n };\r\n\r\n Optin.step.get_current_step = function(){\r\n return parseInt( Optin.step.current || 0, 10 );\r\n };\r\n\r\n\r\n Optin.step.get_current = function(){\r\n return parseInt( Optin.step.current || 0, 10 );\r\n };\r\n\r\n Optin.step.get_current_step = function(){\r\n switch ( this.get_current ){\r\n case 0:\r\n return Optin.step.services;\r\n break;\r\n case 1:\r\n return Optin.step.design;\r\n break;\r\n case 2:\r\n return Optin.step.display;\r\n break;\r\n\r\n }\r\n };\r\n\r\n})( jQuery );","Hustle.define( 'Custom_Content.After_Content_View', function( $, doc, win ) {\r\n\t'use strict';\r\n\r\n\treturn Hustle.View.extend(_.extend({}, Hustle.get(\"Mixins.Model_Updater\"), {\r\n\t\ttemplate: Hustle.template(\"wpoi-custom-content-after-content-tpl\"),\r\n\t\tmessage_editor: false,\r\n\t\tevents: {\r\n\t\t\t'change [name=\"animate\"]': 'toggle_animation'\r\n\t\t},\r\n\t\tinit: function( options ){\r\n\t\t\t this.type = options.type;\r\n\r\n\t\t\t this.conditions_view = options.conditions_view;\r\n\t\t\t this.listenTo( this.model, \"change:enabled\", this.toggle_panel );\r\n\t\t\t this.conditions_view.on(\"toggle_condition\", this.update_conditions_label);\r\n\t\t\t this.conditions_view.on(\"change:update_view_label\", this.update_conditions_label);\r\n\t\t\t return this.render();\r\n\t\t },\r\n\t\t render: function(){\r\n\t\t\t this.$el.html( this.template( _.extend({}, {\r\n\t\t\t\t type: this.type,\r\n\t\t\t\t type_name: optin_vars.messages.settings[ this.type ],\r\n\t\t\t\t condition_labels: this.conditions_view.get_all_conditions_labels()\r\n\t\t\t }, this.model.toJSON() ) ) );\r\n \r\n\t\t\t this.$(\".wph-conditions\").replaceWith( this.conditions_view.$el );\r\n\t\t\t if ( _.isFalse(this.model.enabled) ) this.$el.find(\"#wph-after-content-condition-labels\").hide();\r\n\r\n\t\t\t this.toggle_animation();\r\n\r\n\t\t\t return this;\r\n\t\t },\r\n\t\t toggle_panel: function( model ){\r\n\t\t\t this.$(\".switch-wrap\").toggleClass(\"open closed\");\r\n\t\t\t this.$el.find(\"#wph-after-content-condition-labels\").toggle();\r\n\t\t },\r\n\t\t update_conditions_label: function( conditions_view ){\r\n\t\t\t$('#wph-after-content-condition-labels').html( conditions_view.get_all_conditions_labels() );\r\n\t\t },\r\n\t\t toggle_animation: function() {\r\n\t\t\tvar input = this.$('[name=\"animate\"]:checked'),\r\n\t\t\t\tisOff = 'false' === input.val(),\r\n\t\t\t\tanimation_list = this.$('#optin-afterc-animation-block');\r\n\r\n\t\t\tanimation_list[ isOff ? 'hide' : 'show']();\r\n\t\t }\r\n\t } ) );\r\n});","Hustle.define(\"Custom_Content.Content_View\", function($, doc, win){\r\n \"use strict\";\r\n return Hustle.View.extend(_.extend({}, Hustle.get(\"Mixins.Model_Updater\"), {\r\n template: Optin.template(\"wpoi-custom-content-content-tpl\"),\r\n message_editor: false,\r\n skip_tinyMCE_sync: false,\r\n init: function( opts ){\r\n this.design_model = opts.design_model;\r\n this.sync_message();\r\n this.listenTo( Hustle.Events, \"CC.save_changes\", this.sync_model_message );\r\n this.listenTo( Hustle.Events, \"CC.opening_preview\", this.sync_model_message );\r\n return this.render();\r\n },\r\n render: function(args){\r\n this.setElement( this.template( _.extend( {}, this.model.toJSON(), this.design_model.toJSON() ) ) );\r\n var Media_Holder = Hustle.get(\"Media_Holder\");\r\n this.media_holder = new Media_Holder({\r\n model: this.design_model,\r\n attribute: \"image\"\r\n });\r\n\r\n this.$(\".wph-media--holder\").html( this.media_holder.$el );\r\n this.listenTo( this.model, \"change:optin_message\", _.throttle( this.update_content, 50 ) );\r\n return this;\r\n },\r\n /**\r\n * Keep model editor in sync with tinyMCE message\r\n */\r\n sync_message: function() {\r\n var self = this,\r\n waitForTinyMCE = setInterval(function () {\r\n if (typeof tinyMCE !== \"object\") return;\r\n\r\n clearInterval(waitForTinyMCE);\r\n tinyMCE.on(\"AddEditor\", function(args){\r\n self.message_editor = tinyMCE.get(\"optin_message\");\r\n\r\n self.message_editor.on(\"change\", function (e) {\r\n self.model.set(\"optin_message\", self.message_editor.getContent());\r\n });\r\n });\r\n\r\n });\r\n },\r\n sync_model_message: function(){\r\n if ( this.skip_tinyMCE_sync ) return;\r\n\t\t\t\r\n if (typeof tinyMCE !== \"object\") return;\r\n\t\t\t\r\n if( !this.message_editor ) this.message_editor = tinyMCE.get(\"optin_message\");\r\n\t\t\t\r\n\t\t\tthis.model.set(\"optin_message\", this.message_editor.getContent());\r\n },\r\n /**\r\n * Sents optin_message to server via ajax and sets content from the parsed result\r\n */\r\n update_content: function(){\r\n var self = this;\r\n\r\n $.ajax({\r\n url: ajaxurl,\r\n type: \"get\",\r\n data: {\r\n action: \"hustle_CC_parse_content\",\r\n html: self.model.get(\"optin_message\")\r\n },\r\n success: function(res){\r\n if( res.success )\r\n self.model.set(\"content\", res.data );\r\n }\r\n });\r\n }\r\n } ) );\r\n\r\n});","Hustle.define(\"Custom_Content.Design_View\", function($, doc, win){\r\n \"use strict\";\r\n return Hustle.View.extend( _.extend({}, Hustle.get(\"Mixins.Model_Updater\"), {\r\n template: Optin.template(\"wpoi-custom-content-design-tpl\"),\r\n media_frame: false,\r\n css_editor: false,\r\n /* stylables: {\r\n \".wph-modal.wph-modal-container .wph-modal--content, .wph-cc-shortcode .wph-cc-shortcode--content \": \"Container\",\r\n \".wph-modal.wph-modal-container.wph-customize-css h2.wph-modal--title, .wph-cc-shortcode h2.wph-cc-shortcode--title \": \"Title\",\r\n \".wph-modal.wph-modal-container.wph-customize-css .wph-modal--content h4.wph-modal--subtitle, .wph-cc-shortcode h4.wph-cc-shortcode--subtitle \": \"Subtitle\",\r\n \".wph-modal .wph-modal--content .wph-modal--message , .wph-cc-shortcode .wph-cc-shortcode--content .wph-cc-shortcode--message \": \"Content\",\r\n \".wph-modal .wph-modal--content .wph-modal--image, .wph-cc-shortcode .wph-cc-shortcode--content .wph-cc-shortcode--image \": \"Image Container\",\r\n \".wph-modal.wph-modal-container.wph-customize-css .wph-modal--content .wph-modal--image img, .wph-cc-shortcode .wph-cc-shortcode--content .wph-cc-shortcode--image img \": \"Image\",\r\n \".wph-modal .wph-modal--cta, .wph-cc-shortcode .wph-cc-shortcode--cta \": \"CTA Button\",\r\n \".wph-modal .wph-modal-never-see-again \": \"Never See Again\"\r\n }, */\r\n stylables: {\r\n \".wph-modal.wph-modal-container .wph-modal--content \": \"Container\",\r\n \".wph-modal.wph-modal-container.wph-customize-css h2.wph-modal--title \": \"Title\",\r\n \".wph-modal.wph-modal-container.wph-customize-css .wph-modal--content h4.wph-modal--subtitle \": \"Subtitle\",\r\n \".wph-modal .wph-modal--content .wph-modal--message \": \"Content\",\r\n \".wph-modal .wph-modal--content .wph-modal--image \": \"Image Container\",\r\n \".wph-modal.wph-modal-container.wph-customize-css .wph-modal--content .wph-modal--image img \": \"Image\",\r\n \".wph-modal .wph-modal--cta \": \"CTA Button\",\r\n \".wph-modal .wph-modal-never-see-again \": \"Never See Again\"\r\n },\r\n stylable_elements: _({\r\n main_bg_color: \".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content\",\r\n title_color: \".wph-modal.wph-modal--cabriolet .wph-modal--content h2.wph-modal--title, .wph-modal.wph-modal--simple .wph-modal--content header h2.wph-modal--title, .wph-modal.wph-modal--minimal .wph-modal--content h2.wph-modal--title\",\r\n subtitle_color: \".wph-modal.wph-modal--cabriolet .wph-modal--content h4.wph-modal--subtitle, .wph-modal.wph-modal--simple .wph-modal--content header h4.wph-modal--subtitle, .wph-modal.wph-modal--minimal .wph-modal--content header h4.wph-modal--subtitle\",\r\n link_static_color: \".wph-modal .wph-modal--message a, .wph-modal.wph-modal--cabriolet .wph-modal--content .wph-modal--message a:not(.wph-modal--cta), .wph-modal.wph-modal--simple .wph-modal--content .wph-modal--message a:not(.wph-modal--cta), .wph-modal.wph-modal--minimal .wph-modal--content .wph-modal--message a:not(.wph-modal--cta)\",\r\n link_hover_color: \".wph-modal .wph-modal--message a:hover, .wph-modal.wph-modal--cabriolet section .wph-modal--message a:not(.wph-modal--cta):hover, .wph-modal.wph-modal--simple .wph-modal--content .wph-modal--message a:not(.wph-modal--cta):hover, .wph-modal.wph-modal--minimal .wph-modal--content a:not(.wph-modal--cta):hover\",\r\n link_active_color: \".wph-modal .wph-modal--message a:active, .wph-modal.wph-modal--cabriolet section .wph-modal--message a:not(.wph-modal--cta):active, .wph-modal.wph-modal--simple .wph-modal--content .wph-modal--message a:not(.wph-modal--cta):active, .wph-modal.wph-modal--minimal .wph-modal--content a:not(.wph-modal--cta):active\",\r\n cta_static_background: \".wph-modal .wph-modal--cta, .wph-modal .wph-modal--message a.wph-modal--cta\",\r\n cta_hover_background: \".wph-modal .wph-modal--cta:hover, .wph-modal .wph-modal--message a.wph-modal--cta:hover\",\r\n cta_active_background: \".wph-modal .wph-modal--cta:active, .wph-modal .wph-modal--message a.wph-modal--cta:active\",\r\n cta_static_color: \".wph-modal .wph-modal--cta, .wph-modal .wph-modal--message a.wph-modal--cta\",\r\n cta_hover_color: \".wph-modal .wph-modal--cta:hover, .wph-modal .wph-modal--message a.wph-modal--cta:hover\",\r\n cta_active_color: \".wph-modal .wph-modal--cta:active, .wph-modal .wph-modal--message a.wph-modal--cta:active\",\r\n border_static_color: \".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content\",\r\n //border_hover_color: \".wph-modal.wph-modal--cabriolet section:hover, .wph-modal.wph-modal--simple .wph-modal--content:hover, .wph-modal.wph-modal--minimal .wph-modal--content:hover\",\r\n //border_active_color: \".wph-modal.wph-modal--cabriolet section:active, .wph-modal.wph-modal--simple .wph-modal--content:active, .wph-modal.wph-modal--minimal .wph-modal--content:active\",\r\n border_radius: \".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content\",\r\n border_weight: \".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content\",\r\n border_type: \".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content\",\r\n drop_shadow_color: \".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content\",\r\n drop_shadow_x: \".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content\",\r\n drop_shadow_y: \".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content\",\r\n drop_shadow_blur: \".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content\",\r\n drop_shadow_spread: \".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content\",\r\n custom_height: \".wph-modal.wph-modal--popup, .wph-modal.wph-modal--popup .wph-modal--content\",\r\n custom_width: \".wph-modal.wph-modal--popup, .wph-modal.wph-modal--popup .wph-modal--content\"\r\n }),\r\n events: {\r\n \"click .wph-stylable-element\": \"insert_stylable_element\"\r\n },\r\n init: function(){\r\n this.on(\"rendered\", this.create_color_pickers );\r\n this.listenTo(this.model, \"change:customize_colors\", this.render );\r\n this.listenTo(this.model, \"change:customize_css\", this.render );\r\n this.listenTo(this.model, \"change:customize_size\", this.render );\r\n this.listenTo(this.model, \"change:border\", this.render );\r\n this.listenTo(this.model, \"change:drop_shadow\", this.render );\r\n this.listenTo(this.model, \"change:style\", this.render );\r\n\r\n this.listenTo( this.model, \"change\", this.apply_styles );\r\n\r\n return this.render();\r\n },\r\n render: function(){\r\n this.$el.html( this.template( _.extend( {}, this.model.toJSON(), {stylables: this.stylables } ) ) );\r\n this.apply_styles();\r\n this.create_css_editor();\r\n return this;\r\n },\r\n create_color_pickers: function(){\r\n this.$(\".wph-color-picker\").wpColorPicker({\r\n change: function(event, ui){\r\n var $this = $(this);\r\n $this.val( ui.color.toCSS()).trigger(\"change\");\r\n }\r\n });\r\n },\r\n get_layout_colors: function(){\r\n if( _.isTrue( this.model.get(\"customize_colors\") ) )\r\n return _( this.model.toJSON() ).reduce(function( obj, value, attribute ){\r\n\r\n if( _.indexOf( [\"drop_shadow_color\"], attribute ) !== -1 || /^border_/.test( attribute ) || /^drop_/.test(attribute) ) return obj; // excludes\r\n\r\n if( /_background$/.test( attribute ) || /_color$/.test( attribute ) || /_background_color$/.test( attribute ) )\r\n obj[ attribute ] = value;\r\n return obj;\r\n }, {} );\r\n\r\n return false;\r\n },\r\n apply_styles: _.debounce(function(){\r\n var self = this,\r\n data = this.model.toJSON(),\r\n colors = this.get_layout_colors(),\r\n styles = \"\",\r\n $styles_el = $(\"#hustle-css-preview-styles\").length ? $(\"#hustle-css-preview-styles\") : $('<style id=\"hustle-css-preview-styles\">').appendTo(\"body\");\r\n\r\n\r\n if( !_.isEmpty( colors ) ){\r\n _.each(colors, function(color, key){\r\n var color_type = /_background$/.test( key ) || /_background_color$/.test( key ) || /_bg_color/.test( key ) ? 'background' : 'color',\r\n selector = self.stylable_elements.result( key );\r\n\r\n if( selector )\r\n styles += ( selector + \"{ \" + color_type + \": \" + color +\";} \" );\r\n });\r\n }\r\n\r\n /**\r\n * Apply border styles\r\n */\r\n if( _.isTrue( data.border ) ){\r\n var border_tpl = Hustle.create_template( \" {{el}} {border:{{weight}}px {{type}} {{color}}; }\" ),\r\n border_radius_tpl = Hustle.create_template( \" {{el}} {border-radius:{{radius}}px; }\" ) ;\r\n _(['border_static_color']).each(function(key, i){\r\n styles += border_tpl({\r\n el: this.stylable_elements.result( key ),\r\n weight: data.border_weight,\r\n type: data.border_type,\r\n color: data[ key ]\r\n });\r\n }.bind(this) );\r\n\r\n /**\r\n * Apply border radius style\r\n */\r\n styles += border_radius_tpl( {\r\n el: this.stylable_elements.result( \"border_radius\" ),\r\n radius: data.border_radius\r\n } );\r\n\r\n }\r\n\r\n\r\n /***\r\n * Apply dropshadow styles\r\n */\r\n if( _.isTrue( data.drop_shadow ) ){\r\n var drop_shadow_tpl = Hustle.create_template( \" {{el}} {box-shadow:{{x}}px {{y}}px {{blur}}px {{spread}}px {{color}}; }\" );\r\n\r\n styles += drop_shadow_tpl( {\r\n el: this.stylable_elements.result( \"drop_shadow_color\" ),\r\n x: data.drop_shadow_x,\r\n y: data.drop_shadow_y,\r\n blur: data.drop_shadow_blur,\r\n spread: data.drop_shadow_spread,\r\n color: data.drop_shadow_color\r\n } );\r\n }\r\n\r\n /**\r\n * Apply custom size is being applied now on \"custom_content/view.js\"\r\n */\r\n /* if( _.isTrue( data.customize_size ) ){\r\n var custom_size_tpl = Hustle.create_template( \" {{el}} {width: {{width}}px; height: {{height}}px; }\" );\r\n\r\n styles += custom_size_tpl({\r\n el: this.stylable_elements.result( \"custom_height\" ),\r\n height: data.custom_height,\r\n width: data.custom_width\r\n });\r\n } */\r\n\r\n if( _.isTrue( data.customize_css ) )\r\n styles += data.custom_css;\r\n\r\n $styles_el.html( styles );\r\n }, 10),\r\n create_css_editor: _.debounce(function(){\r\n if( _.isFalse( this.model.get(\"customize_css\") ) ) return;\r\n\r\n this.css_editor = ace.edit(\"hustle_custom_css\");\r\n\r\n this.css_editor.getSession().setMode(\"ace/mode/css\");\r\n this.css_editor.setTheme(\"ace/theme/solarized_light\");\r\n this.css_editor.getSession().setUseWrapMode(true);\r\n this.css_editor.getSession().setUseWorker(false);\r\n this.css_editor.setShowPrintMargin(false);\r\n this.css_editor.renderer.setShowGutter(true);\r\n this.css_editor.setHighlightActiveLine(true);\r\n this.css_editor.on(\"blur\", $.proxy(this.update_custom_css, this));\r\n\r\n }, 0),\r\n update_custom_css: function(){\r\n if( this.css_editor )\r\n this.model.set(\"custom_css\", this.css_editor.getValue() );\r\n },\r\n insert_stylable_element: function(e){\r\n e.preventDefault();\r\n var $el = $(e.target),\r\n stylable = $el.data(\"stylable\") + \"{}\";\r\n\r\n this.css_editor.navigateFileEnd();\r\n this.css_editor.insert(stylable);\r\n this.css_editor.navigateLeft(1);\r\n this.css_editor.focus();\r\n\r\n }\r\n }));\r\n\r\n});","Hustle.define(\"Optin.Listing\", function($){\r\n \"use strict\";\r\n var Delete_Confirmation = Hustle.get(\"Delete_Confirmation\");\r\n\r\n return Backbone.View.extend({\r\n el: \"#hustle-optin-listing\",\r\n\t\tlogShown: false,\r\n events: {\r\n\t \"click .wph-accordions header\" : \"toggle_optin_accordion\",\r\n \"click .hustle-delete-optin\": \"delete_optin\",\r\n \"click .optin-active-state\": \"toggle_optin_activity\",\r\n \"click .button-view-email-list\": \"view_email_list\",\r\n \"change .optin-type-active-state\": \"toggle_type_activity\",\r\n \"change .wpoi-testmode-active-state\": \"toggle_type_mode_activity\",\r\n \"change .optin-toggle-tracking-activity\": \"toggle_tracking_activity\",\r\n\t\t\t\"click .button-view-log-list\": \"view_error_log_list\"\r\n },\r\n initialize: function(){\r\n var self = this;\r\n // Set visibility for test mode toggles at view load, with no animation\r\n this.$('.optin-type-active-state').each(function(){\r\n self.set_testmode_visibiliy( $(this), 0 );\r\n });\r\n },\r\n toggle_optin_accordion: function(e){\r\n\r\n if( _.indexOf( ['wph-accordion--animate_buttons', 'wph-icon i-arrow'], e.target.className ) === -1 ) return;\r\n\r\n var $this = $(e.target),\r\n $icon = $this.find(\".dev-icon\"),\r\n $li = $this.closest(\"li\"),\r\n $section = $li.find(\"section\");\r\n\r\n $icon.toggleClass(\"dev-icon-caret_down dev-icon-caret_up\");\r\n\t\t\t$li.toggleClass(\"wph-accordion--closed wph-accordion--open\");\r\n\t\t\t$li.siblings('li.wph-accordion--open').toggleClass(\"wph-accordion--closed wph-accordion--open\");\r\n\r\n },\r\n delete_optin: function(e){\r\n e.preventDefault();\r\n\r\n e.stopPropagation();\r\n var $this = this.$( e.target );\r\n\r\n if( $this.prev( \".hustle-delete-module-confirmation\" ).length ) return;\r\n\r\n var $li = $this.closest(\"li.wph-accordions--item\"),\r\n id = $this.data(\"id\"),\r\n confirmation = new Delete_Confirmation({\r\n id: $this.data(\"id\"),\r\n nonce: $this.data(\"nonce\"),\r\n action: \"inc_opt_delete_optin\",\r\n onSuccess: function(res){\r\n if( res.success ){\r\n $this.closest(\"li\").slideUp(300, function(){\r\n $(this).remove();\r\n });\r\n }\r\n\r\n }\r\n });\r\n\r\n $this.before( confirmation.$el );\r\n\r\n },\r\n toggle_optin_activity: function(e){\r\n var $this = this.$(e.target),\r\n data = $this.data() || {},\r\n $overlay = $this.closest(\".wph-accordions--item\").find(\".wph-accordion--disable\"),\r\n $row = $this.closest(\"li\");\r\n\r\n data.action = \"inc_opt_toggle_state\";\r\n data._ajax_nonce = data.nonce;\r\n $this.prop(\"disabled\", true);\r\n if( $this.is(\":checked\") ){\r\n $overlay.addClass(\"hidden\");\r\n $row.removeClass(\"wph-accordion--closed\")\r\n .addClass(\"wph-accordion--open\");\r\n }else{\r\n $overlay.removeClass(\"hidden\");\r\n $row.addClass(\"wph-accordion--closed\")\r\n .removeClass(\"wph-accordion--open\");\r\n }\r\n\r\n $.post(ajaxurl, data,function(response){\r\n $this.prop(\"disabled\", false);\r\n\r\n });\r\n },\r\n view_email_list: function(e){\r\n e.preventDefault();\r\n e.stopPropagation();\r\n var $this = $(e.target),\r\n id = $this.data(\"id\"),\r\n name = $this.data(\"name\"),\r\n total = $this.data(\"total\"),\r\n Subscription_List_Modal = Hustle.get(\"Optin.Subscription_List_Modal\");\r\n \r\n\r\n var subscription_list = new Subscription_List_Modal({\r\n model: {\r\n id: id,\r\n total: total,\r\n name: name,\r\n\t\t\t\t\tmodule_fields: []\r\n }\r\n });\r\n\r\n },\r\n set_testmode_visibiliy: function( active_toggle, speed ) {\r\n if( typeof speed === 'undefined' ) speed = 400;\r\n var $this = active_toggle,\r\n data = $this.data() || {};\r\n\r\n var $test_mode_toggle = this.$('.wpoi-testmode-active-state[data-id=\"' + data.id + '\"][data-type=\"' + data.type + '\"]').closest(\".test-mode\");\r\n if( $this.is( \":checked\" ) ){\r\n $test_mode_toggle.fadeOut( speed );\r\n } else {\r\n $test_mode_toggle.fadeIn( speed );\r\n }\r\n\r\n },\r\n toggle_tracking_activity: function(e){\r\n e.stopPropagation();\r\n var $this = $(e.target),\r\n id = $this.data(\"id\"),\r\n nonce = $this.data(\"nonce\"),\r\n type = $this.data(\"type\"),\r\n new_state = $this.is(\":checked\");\r\n\r\n $this.attr(\"disabled\", true);\r\n\r\n $.ajax({\r\n url: ajaxurl,\r\n type: \"POST\",\r\n data: {\r\n action: \"inc_optin_toggle_tracking_activity\",\r\n id: id,\r\n type: type,\r\n _ajax_nonce: nonce\r\n },\r\n complete: function(){\r\n $this.attr(\"disabled\", false);\r\n },\r\n success: function( res ){\r\n if( !res.success )\r\n $this.attr(\"checked\", !new_state);\r\n },\r\n error: function(res){\r\n if( !res.success )\r\n $this.attr(\"checked\", !new_state);\r\n }\r\n });\r\n },\r\n toggle_type_activity: function(e){\r\n var $this = $(e.target),\r\n data = $this.data() || {};\r\n\r\n // Set visibility for test mode toggles when the active toggle changes, as specified in indesign\r\n this.set_testmode_visibiliy( $this );\r\n\r\n $('.optin-type-active-state[data-id=\"' + data.id + '\"][data-type=\"' + data.type + '\"]').not(this).prop(\"checked\", $this.is(\":checked\") ? true : false);\r\n\r\n data.action = \"inc_opt_toggle_optin_type_state\";\r\n data._ajax_nonce = data.nonce;\r\n\r\n $this.prop(\"disabled\", true);\r\n $.post(ajaxurl, data,function(response){\r\n $this.prop(\"disabled\", false);\r\n });\r\n },\r\n toggle_type_mode_activity: function(e){\r\n var $this = $(e.target),\r\n data = $this.data() || {};\r\n\r\n data.action = \"inc_opt_toggle_type_test_mode\";\r\n data._ajax_nonce = data.nonce;\r\n\r\n $('.wpoi-testmode-active-state[data-id=\"' + data.id + '\"][data-type=\"' + data.type + '\"]').not(this).prop(\"checked\", $this.is(\":checked\") ? true : false);\r\n\r\n $this.prop(\"disabled\", true);\r\n $.post(ajaxurl, data,function(response){\r\n $this.prop(\"disabled\", false);\r\n });\r\n },\r\n\t\tview_error_log_list: function(e){\r\n\t\t\tvar target = $(e.currentTarget),\r\n\t\t\t\tdata = target.data(),\r\n\t\t\t\toptin_id = data.id,\r\n\t\t\t\tname = data.name,\r\n\t\t\t\tErrorList = Hustle.get( 'Optin.Error_List_Modal' );\r\n\r\n\t\t\tif ( ! this.logShown ) {\r\n\t\t\t\tthis.logShown = new ErrorList({\r\n\t\t\t\t\tbutton: target,\r\n\t\t\t\t\tmodel: {\r\n\t\t\t\t\t\tname: name,\r\n\t\t\t\t\t\toptin_id: optin_id,\r\n\t\t\t\t\t\ttotal: data.total\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t} else {\r\n\t\t\t\tthis.logShown.show();\r\n\t\t\t}\r\n\r\n/*\r\n\t\t\t$.getJSON( window.ajax, {\r\n\t\t\t\t_wpnonce: optin_vars.error_log_nonce,\r\n\t\t\t\toptin_id: optin_id\r\n\t\t\t}, function( res ) {\r\n\t\t\t\talert(res);\r\n\t\t\t});\r\n*/\r\n\t\t}\r\n });\r\n});","Hustle.define(\"Custom_Content.Popup_View\", function($, doc, win){\r\n \"use strict\";\r\n return Hustle.View.extend(_.extend({}, Hustle.get(\"Mixins.Model_Updater\"), {\r\n template: Hustle.template(\"wpoi-custom-content-popup-tpl\"),\r\n message_editor: false,\r\n init: function( options ){\r\n this.type = options.type;\r\n this.display_triggers_view = options.display_triggers_view;\r\n this.conditions_view = options.conditions_view;\r\n this.listenTo( this.model, \"change:enabled\", this.toggle_panel );\r\n this.conditions_view.on(\"toggle_condition\", this.update_conditions_label);\r\n this.conditions_view.on(\"change:update_view_label\", this.update_conditions_label);\r\n return this.render();\r\n },\r\n render: function(){\r\n this.$el.html( this.template( _.extend({}, {\r\n type: this.type,\r\n type_name: optin_vars.messages.settings[ this.type ],\r\n condition_labels: this.conditions_view.get_all_conditions_labels()\r\n }, this.model.toJSON() ) ) );\r\n\r\n this.$(\".wph-trigger\").html( this.display_triggers_view.$el );\r\n this.$(\".wph-conditions\").replaceWith( this.conditions_view.$el );\r\n\t\t\tif ( _.isFalse(this.model.enabled) ) this.$el.find(\"#wph-popup-condition-labels\").hide();\r\n return this;\r\n },\r\n toggle_panel: function( model ){\r\n this.$(\".switch-wrap\").toggleClass(\"open closed\");\r\n\t\t\tthis.$el.find(\"#wph-popup-condition-labels\").toggle();\r\n },\r\n update_conditions_label: function( conditions_view ){\r\n $('#wph-popup-condition-labels').html( conditions_view.get_all_conditions_labels() );\r\n }\r\n } ) );\r\n\r\n});","Hustle.define(\"Optin.Preview\", function($){\r\n \"use strict\";\r\n return Backbone.View.extend({\r\n el: \".wph-preview\",\r\n preview_modal: false,\r\n $preview_yield: false,\r\n wrapper_class_tpl: Hustle.create_template(\"wph-preview--optin wph-preview--{{type}}\"),\r\n events: {\r\n \"click .wph-preview--mask\": \"hide\",\r\n \"click .wph-preview--close\": \"hide\",\r\n \"change #wph-preview-type-selector\": \"change_type\"\r\n },\r\n initialize: function(){\r\n this.$preview_yield = this.$(\"#optin-preview-wrapper\");\r\n this.render();\r\n this.listenTo( this.preview_modal.model, \"change\", this.render );\r\n this.$(\"#wph-preview-type-selector\").val( this.model.get(\"type\") );\r\n },\r\n get_tpl: function( layout_id ){\r\n var templates = [\"optin-layout-one\", \"optin-layout-two\", \"optin-layout-three\", \"optin-layout-four\"];\r\n return Hustle.template( templates[ layout_id ] );\r\n },\r\n render: function(){\r\n var Modal = Hustle.get(\"Modal\");\r\n this.preview_modal = new Modal( { model: this.model, template: this.get_tpl( this.model.get(\"form_location\").toInt() ) } );\r\n this.$preview_yield.replaceWith( this.preview_modal.$el );\r\n this.$preview_yield = this.preview_modal.$el;\r\n this.preview_modal.show();\r\n this.$(\"#wph-preview-type-selector\").val( this.model.get(\"type\") );\r\n Hustle.Events.trigger(\"view.rendered\", this);\r\n },\r\n show: function(){\r\n this.$el\r\n .removeClass(\"wph-preview--closed\")\r\n .addClass(\"wph-preview--open\");\r\n this.$(\".wph-preview--optin\").attr(\"class\", this.wrapper_class_tpl({type: this.model.get(\"type\") }));\r\n Optin.Events.trigger(\"design:preview:render:finish\", this.preview_modal);\r\n },\r\n hide: function(e){\r\n this.$el\r\n .removeClass(\"wph-preview--open\")\r\n .addClass(\"wph-preview--closed\");\r\n },\r\n change_type: function(e){\r\n var type = this.$(e.target).val();\r\n\r\n this.preview_modal.model.set(\"type\", type);\r\n this.$(\".wph-preview--optin\").attr(\"class\", this.wrapper_class_tpl({type: type}));\r\n Optin.Events.trigger(\"design:preview:render:finish\", this.preview_modal);\r\n Hustle.Events.trigger(\"Optin.preview.changed.type\", this);\r\n }\r\n });\r\n});","Hustle.define(\"Custom_Content.Slide_In_View\", function($, doc, win){\r\n \"use strict\";\r\n\r\n return Hustle.View.extend(_.extend({}, Hustle.get(\"Mixins.Model_Updater\"), {\r\n template: Hustle.template(\"wpoi-custom-content-slide_in-tpl\"),\r\n message_editor: false,\r\n init: function( options ){\r\n this.type = options.type;\r\n this.display_triggers_view = options.display_triggers_view;\r\n this.conditions_view = options.conditions_view;\r\n this.listenTo( this.model, \"change:enabled\", this.toggle_panel );\r\n this.listenTo( this.model, \"change:position\", this.update_slide_in_position_label );\r\n this.conditions_view.on(\"toggle_condition\", this.update_conditions_label);\r\n this.conditions_view.on(\"change:update_view_label\", this.update_conditions_label);\r\n return this.render();\r\n },\r\n render: function(){\r\n this.model.set('position_label', optin_vars.messages.positions[this.model.get('position')], { silent:true } );\r\n this.$el.html( this.template( _.extend({}, {\r\n type: this.type,\r\n type_name: optin_vars.messages.settings[ this.type ],\r\n condition_labels: this.conditions_view.get_all_conditions_labels()\r\n }, this.model.toJSON() ) ) );\r\n\r\n this.$(\".wph-trigger\").html( this.display_triggers_view.$el );\r\n\t\t\tthis.$(\".wph-conditions\").replaceWith( this.conditions_view.$el );\r\n\t\t\tif ( _.isFalse(this.model.enabled) ) this.$el.find(\"#wph-slide-in-condition-labels\").hide();\r\n return this;\r\n },\r\n toggle_panel: function( model ){\r\n this.$(\".switch-wrap\").toggleClass(\"open closed\");\r\n\t\t\tthis.$el.find(\"#wph-slide-in-condition-labels\").toggle();\r\n },\r\n update_slide_in_position_label: function(e){\r\n this.$(\"#wpoi-slide_in-position-label\").text( optin_vars.messages.positions[this.model.get('position')] );\r\n },\r\n update_conditions_label: function( conditions_view ){\r\n $('#wph-slide-in-condition-labels').html( conditions_view.get_all_conditions_labels() );\r\n }\r\n } ) );\r\n\r\n});","Hustle.define(\"Social_Sharing.View\", function($, doc, win){\r\n \"use strict\";\r\n\r\n return Hustle.View.extend({\r\n el: '.wph-sshare-wizard-view',\r\n message_box_tpl: Optin.template('wpoi-social-sharing-message-box-tpl'),\r\n preview: false,\r\n preview_model: false,\r\n initial_data: new Backbone.Model({\r\n content: '',\r\n }),\r\n events: {\r\n 'click .wph-toggletabs .can-open': 'toggle_accordion',\r\n 'click ul.wph-ss-service-type li label': 'toggle_service_type',\r\n 'click .wph-button.ss-save-changes': 'ss_save',\r\n 'click .wph-button.ss-cancel': 'ss_cancel',\r\n 'click .wph-button.ss-next-step': 'ss_next_step',\r\n 'click .wph-button.ss-back': 'ss_back',\r\n 'click .wph-button.ss-finish': 'ss_finish',\r\n 'change .wph-sshare--pick_social_icons input.wph-share-icon-enable': 'toggle_icon',\r\n 'change .wph-sshare--pick_social_icons .wph-input--number input': 'icon_counter_updated',\r\n 'change .wph-sshare--pick_social_icons .wph-sshare--input_wrap input': 'icon_link_updated',\r\n 'click ul.wph-share-icon_style [name=\"wph-sshare-type_icons_design\"]': 'toggle_icon_style',\r\n 'click ul.wph-share-customize-color li > label': 'toggle_floating_custom_color',\r\n 'click ul.wph-share-widget-customize-color li > label': 'toggle_widget_custom_color',\r\n 'click ul.wph-sshare--pick_location_type li > label': 'toggle_location_type',\r\n 'click ul.wph-sshare--select_location_align_x li > label': 'toggle_location_align',\r\n 'click ul.wph-sshare--select_location_align_y li > label': 'toggle_location_align'\r\n },\r\n init: function( opts ){\r\n this.services_view = opts.services_view;\r\n this.appearance_view = opts.appearance_view;\r\n this.floating_view = opts.floating_view;\r\n \r\n this.listenTo( this.model, 'change', this.render_message_box );\r\n this.listenTo( this.services_view.model, 'change:service_type', this.services_view_changes );\r\n this.listenTo( this.services_view.model, 'change:click_counter', this.services_view_changes );\r\n this.listenTo( this.appearance_view.model, 'change:icons_order', this.icons_order_updated );\r\n this.listenTo( this.appearance_view.model, 'change:drop_shadow', this.appearance_view_changes );\r\n this.listenTo( this.appearance_view.model, 'change:customize_colors', this.appearance_view_changes );\r\n this.listenTo( this.appearance_view.model, 'change:customize_widget_colors', this.appearance_view_changes );\r\n this.listenTo( this.appearance_view.model, 'change:widget_drop_shadow', this.appearance_view_changes );\r\n this.listenTo( this.appearance_view.model, 'change:floating_inline_count', this.appearance_view_changes );\r\n this.listenTo( this.appearance_view.model, 'change:widget_inline_count', this.appearance_view_changes );\r\n this.listenTo( this.appearance_view.model, 'change', _.debounce( this.render_preview, 100 ) );\r\n \r\n this.render_message_box();\r\n return this.render();\r\n },\r\n render: function(){\r\n \r\n // Names & Services\r\n this.render_service_view();\r\n \r\n // Appearance\r\n this.render_appearance_view();\r\n \r\n var $floating_container = this.$('#wph-social-sharing--floating-social-container'),\r\n floating_container_classes = $floating_container.attr('class');\r\n \r\n $floating_container.replaceWith( this.floating_view.$el.addClass( floating_container_classes ).attr('id', 'wph-social-sharing--floating-social-container') );\r\n },\r\n render_service_view: function() {\r\n // Names & Services\r\n this.$('#wph-social-sharing--services_tab .wph-toggletabs--content').html('');\r\n this.services_view.delegateEvents();\r\n this.$('#wph-social-sharing--services_tab .wph-toggletabs--content')\r\n .append( this.services_view.$el );\r\n },\r\n render_appearance_view: function() {\r\n \r\n // Appearance\r\n this.$('#wph-social-sharing--appearance_tab .wph-toggletabs--content').html('');\r\n this.appearance_view.delegateEvents();\r\n this.$('#wph-social-sharing--appearance_tab .wph-toggletabs--content')\r\n .append( this.appearance_view.$el );\r\n \r\n Hustle.Events.trigger('SS.appearance_view_ready');\r\n \r\n // Preview\r\n this.render_preview();\r\n },\r\n services_view_changes: function() {\r\n Optin.hasChanges = true;\r\n this.services_view.render();\r\n this.render_service_view();\r\n this.appearance_view_changes();\r\n },\r\n appearance_view_changes: function() {\r\n Optin.hasChanges = true;\r\n this._set_social_icons();\r\n this.appearance_view.render();\r\n this.render_appearance_view();\r\n },\r\n render_message_box: function(){\r\n var shortcode_id = this._get_shortcode_id();\r\n this.$('#wph-social-sharing--messagebox').html( this.message_box_tpl( {shortcode_id: shortcode_id } ) );\r\n },\r\n render_preview: function() {\r\n var $preview_box = this.$('#wph-sshare--floating_social .wph-sshare--preview_box .wph-sshare--container'),\r\n $widget_preview_box = this.$('#wph-sshare--widget_shortcode .wph-sshare--preview_box .wph-sshare--container'),\r\n appearance_data = this.appearance_view.model.toJSON();\r\n \r\n // floating_social_bg\r\n $preview_box.css( 'background', appearance_data.floating_social_bg );\r\n // counter text\r\n if ( appearance_data.counter_text ) {\r\n $preview_box.find('.wph-sshare_social_counter span')\r\n .css( 'color', appearance_data.counter_text );\r\n }\r\n \r\n // custom icon bg color and icon color for each icon_style\r\n if ( appearance_data.customize_colors == '1' ) {\r\n \r\n if ( appearance_data.icon_style == 'one' ) {\r\n $preview_box.find('a').css( 'background', appearance_data.icon_bg_color );\r\n $preview_box.find('.wph-social-path .wph-social-icon').css( 'fill', appearance_data.icon_color );\r\n } \r\n \r\n if ( appearance_data.icon_style == 'two' ) {\r\n $preview_box.find('.wph-social').css( 'border-color', appearance_data.icon_bg_color );\r\n $preview_box.find('.wph-social .wph-social-icon').css( 'fill', appearance_data.icon_color );\r\n }\r\n \r\n if ( appearance_data.icon_style == 'three' || appearance_data.icon_style == 'four' ) {\r\n $preview_box.find('.wph-social').css( 'background', appearance_data.icon_bg_color );\r\n $preview_box.find('.wph-social .wph-social-icon').css( 'fill', appearance_data.icon_color );\r\n }\r\n \r\n if ( appearance_data.counter_border ) {\r\n $preview_box.find('a')\r\n .css( 'border', '1px solid ' + appearance_data.counter_border );\r\n }\r\n }\r\n \r\n // drop_shadow\r\n if ( appearance_data.drop_shadow == '1' ) {\r\n var box_shadow = '' + \r\n appearance_data.drop_shadow_x + 'px ' +\r\n appearance_data.drop_shadow_y + 'px ' +\r\n appearance_data.drop_shadow_blur + 'px ' +\r\n appearance_data.drop_shadow_spread + 'px ' +\r\n appearance_data.drop_shadow_color;\r\n \r\n $preview_box.css( 'box-shadow', box_shadow );\r\n }\r\n \r\n //widget_bg_color\r\n $widget_preview_box.css( 'background', appearance_data.widget_bg_color );\r\n $widget_preview_box\r\n .find('.wph-sshare_social_counter span')\r\n .css( 'color', appearance_data.widget_counter_text );\r\n \r\n // widget icon bg color and icon color for each icon_style\r\n if ( appearance_data.customize_widget_colors == '1' ) {\r\n \r\n if ( appearance_data.icon_style == 'one' ) {\r\n $widget_preview_box.find('a').css( 'background', appearance_data.widget_icon_bg_color );\r\n $widget_preview_box.find('.wph-social-path .wph-social-icon').css( 'fill', appearance_data.widget_icon_color );\r\n } \r\n \r\n if ( appearance_data.icon_style == 'two' ) {\r\n $widget_preview_box.find('.wph-social').css( 'border-color', appearance_data.widget_icon_bg_color );\r\n $widget_preview_box.find('.wph-social .wph-social-icon').css( 'fill', appearance_data.widget_icon_color );\r\n }\r\n \r\n if ( appearance_data.icon_style == 'three' || appearance_data.icon_style == 'four' ) {\r\n $widget_preview_box.find('.wph-social').css( 'background', appearance_data.widget_icon_bg_color );\r\n $widget_preview_box.find('.wph-social .wph-social-icon').css( 'fill', appearance_data.widget_icon_color );\r\n }\r\n \r\n }\r\n \r\n // widget_drop_shadow\r\n if ( appearance_data.widget_drop_shadow == '1' ) {\r\n var widget_box_shadow = '' + \r\n appearance_data.widget_drop_shadow_x + 'px ' +\r\n appearance_data.widget_drop_shadow_y + 'px ' +\r\n appearance_data.widget_drop_shadow_blur + 'px ' +\r\n appearance_data.widget_drop_shadow_spread + 'px ' +\r\n appearance_data.widget_drop_shadow_color;\r\n \r\n $widget_preview_box.css( 'box-shadow', widget_box_shadow );\r\n }\r\n },\r\n toggle_accordion: function(e) {\r\n e.preventDefault();\r\n var $this = $(e.target),\r\n $all = $('.wph-toggletabs'),\r\n $togglable = $this.closest('.wph-toggletabs'),\r\n $others = $all.not( $togglable ),\r\n $caret = $togglable.find('.dev-icon-caret_down, .dev-icon-caret_up');\r\n\r\n $others.removeClass('wph-toggletabs--open');\r\n $others.find('.dev-icon-caret_up')\r\n .removeClass('dev-icon-caret_up')\r\n .addClass('dev-icon-caret_down');\r\n\r\n $togglable.toggleClass('wph-toggletabs--open wph-toggletabs--closed');\r\n $caret.toggleClass('dev-icon-caret_down dev-icon-caret_up');\r\n\r\n },\r\n toggle_service_type: function(e){\r\n e.preventDefault();\r\n \r\n Optin.hasChanges = true;\r\n \r\n var $this = this.$(e.target);\r\n \r\n if ( $this.closest('li').hasClass('current') ) return;\r\n \r\n this.model.set( 'service_type', $(e.target).find('input').val() );\r\n },\r\n toggle_icon: function(e) {\r\n var $this = this.$(e.target),\r\n is_checked = $this.is(':checked'),\r\n service_type = this.services_view.model.get('service_type'),\r\n $parent_container = $this.parents('.wph-sshare--social_' + service_type );\r\n \r\n if( is_checked ) {\r\n $parent_container.find('.disabled').removeClass('disabled');\r\n } else {\r\n $parent_container.find('.wph-sshare--icon').addClass('disabled');\r\n if ( service_type == 'native' ) {\r\n $parent_container.find('.wph-input--number').addClass('disabled');\r\n } else {\r\n $parent_container.find('.wph-sshare--input_wrap').addClass('disabled');\r\n }\r\n }\r\n \r\n // this._set_social_icons();\r\n // trigger changes on Appearance view to reflect changes on selected icons\r\n this.appearance_view_changes();\r\n \r\n },\r\n icons_order_updated: _.debounce(\r\n function() {\r\n // this._set_social_icons();\r\n this.appearance_view_changes();\r\n }, \r\n 500\r\n ),\r\n icon_counter_updated: _.debounce(\r\n function() {\r\n // this._set_social_icons();\r\n this.appearance_view_changes();\r\n }, \r\n 500\r\n ),\r\n icon_link_updated: function(e) {\r\n this._set_social_icons();\r\n },\r\n toggle_icon_style: function(e) {\r\n e.preventDefault();\r\n var $this = this.$(e.target);\r\n \r\n if ( $this.closest('li').hasClass('current') ) return;\r\n \r\n this.appearance_view.model.set('icon_style', $this.val(), {silent:true});\r\n this.appearance_view.render();\r\n this.render_appearance_view();\r\n },\r\n toggle_floating_custom_color: function(e) {\r\n e.preventDefault();\r\n var $this = this.$(e.target),\r\n $li = $this.closest('li'),\r\n $input = $li.find('input');\r\n \r\n if ( $li.hasClass('current') ) return;\r\n \r\n $li.addClass('current');\r\n $li.siblings().removeClass('current');\r\n this.appearance_view.model.set( 'customize_colors', $input.val() );\r\n \r\n },\r\n toggle_widget_custom_color: function(e) {\r\n e.preventDefault();\r\n var $this = this.$(e.target),\r\n $li = $this.closest('li'),\r\n $input = $li.find('input');\r\n \r\n if ( $li.hasClass('current') ) return;\r\n \r\n $li.addClass('current');\r\n $li.siblings().removeClass('current');\r\n this.appearance_view.model.set( 'customize_widget_colors', $input.val() );\r\n \r\n },\r\n toggle_location_type: function(e) {\r\n e.preventDefault();\r\n var $this = this.$(e.target),\r\n $li = $this.closest('li'),\r\n $input = $li.find('input'),\r\n $selector_info = this.$('.wph-sshare--selector');\r\n \r\n if ( $li.hasClass('current') ) return;\r\n \r\n $li.addClass('current');\r\n $li.siblings().removeClass('current');\r\n this.floating_view.model.set( 'location_type', $input.val() );\r\n \r\n if ( $input.val() == 'selector' ) {\r\n $selector_info.removeClass('hidden');\r\n } else {\r\n if ( !$selector_info.hasClass('hidden') ) $selector_info.addClass('hidden');\r\n }\r\n \r\n },\r\n toggle_location_align: function(e) {\r\n e.preventDefault();\r\n var $this = this.$(e.target),\r\n $li = $this.closest('li'),\r\n $input = $li.find('input'),\r\n $additional_settings = this.$('.wph-sshare--offset_' + $input.val() ),\r\n data_field = $input.data('attribute');\r\n \r\n if ( $li.hasClass('current') ) return;\r\n \r\n $li.addClass('current');\r\n $li.siblings().removeClass('current');\r\n this.floating_view.model.set( data_field, $input.val() );\r\n \r\n $additional_settings.removeClass('hidden');\r\n $additional_settings.siblings('[class^=\"wph-sshare--offset_\"]').each( function() {\r\n if ( !$(this).hasClass('hidden') ) $(this).addClass('hidden');\r\n });\r\n },\r\n ss_save: function(e) {\r\n e.preventDefault();\r\n \r\n if ( !this.validate() ) return;\r\n \r\n var me = this,\r\n $this = this.$(e.target).closest('button'),\r\n ss_id = $this.data('id'),\r\n $buttons = $this.parents('.row').find('button.wph-button'),\r\n services = this.services_view.model.toJSON(),\r\n appearance = this.appearance_view.model.toJSON(),\r\n floating_social = this.floating_view.model.toJSON(),\r\n shortcode_id = this._get_shortcode_id();\r\n \r\n $this.addClass('wph-button-save--loading');\r\n \r\n // disable all buttons\r\n $buttons.each( function() {\r\n $(this).attr('disabled', true);\r\n } );\r\n \r\n services = this._get_social_icons_data(services);\r\n \r\n // saving the SS module\r\n return $.ajax({\r\n url: ajaxurl,\r\n type: 'POST',\r\n data: {\r\n action: 'hustle_social_sharing_save',\r\n _ajax_nonce: $this.data('nonce'),\r\n id: $this.data('id'),\r\n services: services,\r\n appearance: appearance,\r\n floating_social: floating_social,\r\n shortcode_id: shortcode_id\r\n },\r\n complete: function(resp) {\r\n var response = resp.responseJSON,\r\n $save_buttons = me.$('button.wph-button[data-id=\"'+ ss_id +'\"]');\r\n \r\n $this.removeClass('wph-button-save--loading');\r\n // enable back the buttons\r\n $buttons.each( function(){\r\n $(this).attr('disabled', false);\r\n } );\r\n \r\n Optin.hasChanges = false;\r\n \r\n if ( ss_id == -1 ) {\r\n // update all data-id on buttons\r\n $save_buttons.attr( 'data-id', response.data );\r\n // update url\r\n var currUrl = window.location.pathname + window.location.search;\r\n currUrl = currUrl.replace('id=-1', 'id=' + response.data);\r\n window.history.replaceState( {} , '', currUrl );\r\n }\r\n }\r\n });\r\n },\r\n ss_cancel: function(e) {\r\n e.preventDefault();\r\n window.onbeforeunload = null;\r\n window.location.replace( '?page=inc_hustle_social_sharing' );\r\n return;\r\n },\r\n ss_next_step: function(e) {\r\n e.preventDefault();\r\n if ( !this.validate() ) return;\r\n \r\n var me = this,\r\n $next_tab = this.$('.wph-toggletabs.wph-toggletabs--open ~ .wph-toggletabs').first();\r\n \r\n this.ss_save(e).done( function(resp){\r\n if ( resp.success ) {\r\n $next_tab.find('.can-open span').click();\r\n }\r\n } );\r\n },\r\n ss_back: function(e) {\r\n e.preventDefault();\r\n var $prev_tab = this.$('.wph-toggletabs.wph-toggletabs--open').prevAll('.wph-toggletabs').first();\r\n $prev_tab.find('.can-open span').click();\r\n },\r\n ss_finish: function(e) {\r\n e.preventDefault();\r\n if ( !this.validate() ) return;\r\n \r\n var me = this,\r\n $this = this.$(e.target),\r\n is_new = ( parseInt($this.data('id')) ) == -1 ? true : false;\r\n \r\n this.ss_save(e).done( function(resp){\r\n if ( resp.success ) {\r\n window.onbeforeunload = null;\r\n var url = \"?page=inc_hustle_social_sharing\";\r\n if( is_new ) {\r\n url += \"&new_id=\" + resp.data;\r\n } else{\r\n url += \"&updated_id=\" + resp.data;\r\n }\r\n window.location.replace( url );\r\n }\r\n } );\r\n },\r\n validate: function() {\r\n var success = true,\r\n $opt_name = this.$('[data-attribute=\"optin_name\"]'),\r\n opt_name_placeholder = $opt_name.attr('placeholder');\r\n \r\n // validating opt_name\r\n if ( !$opt_name.val() ) {\r\n success = false;\r\n if ( $opt_name.siblings('span.wph-icon.i-warning').length === 0 ) {\r\n var $warning = $('<span class=\"wph-icon i-warning\" title=\"'+ opt_name_placeholder +'\"></span>');\r\n $warning.insertBefore($opt_name);\r\n }\r\n $opt_name.focus();\r\n }\r\n \r\n if ( success ) {\r\n $('span.dashicons.dashicons-warning').remove();\r\n }\r\n \r\n return success;\r\n },\r\n _set_social_icons: function() {\r\n Optin.hasChanges = true;\r\n var services = this.services_view.model.toJSON();\r\n services = this._get_social_icons_data(services);\r\n this.services_view.model.set( 'social_icons', services.social_icons, {silent:true} );\r\n window.services_model = this.services_view.model;\r\n },\r\n _get_social_icons_data: function( services ) {\r\n \r\n var $social_containers = this.$( '.wph-sshare--social_' + services['service_type'] ),\r\n social_icons = {};\r\n \r\n $social_containers.each( function() {\r\n var $sc = $(this),\r\n $toggle_input = $sc.find('span.toggle input'),\r\n icon = $sc.find('.wph-sshare--icon').data('id'),\r\n $counter = $sc.find('.wph-input--number input'),\r\n $link = $sc.find('.wph-sshare--input_wrap input');\r\n \r\n // check if counter have negative values\r\n var counter_val = parseInt($counter.val());\r\n if ( counter_val < 0 ) {\r\n $counter.val(0);\r\n }\r\n \r\n if ( $toggle_input.is(':checked') ) {\r\n social_icons[icon] = {\r\n 'enabled': true,\r\n 'counter': ( $counter.length ) ? $counter.val() : '0',\r\n 'link': ( $link.length ) ? $link.val() : ''\r\n };\r\n }\r\n \r\n } );\r\n \r\n services['social_icons'] = social_icons;\r\n \r\n return services;\r\n },\r\n _get_shortcode_id: function() {\r\n return this.model.get('optin_name').trim().toLowerCase().replace(/\\s+/g, '-');\r\n }\r\n });\r\n\r\n});","Hustle.define(\"Social_Sharing.Appearance_View\", function($, doc, win){\r\n \"use strict\";\r\n return Hustle.View.extend(_.extend({}, Hustle.get(\"Mixins.Model_Updater\"), {\r\n template: Optin.template(\"wpoi-social-sharing-appreance-tpl\"),\r\n init: function( opts ){\r\n this.on( 'rendered', this.create_color_pickers );\r\n // this.on( 'rendered', this.make_icons_sortable );\r\n \r\n this.listenTo( Hustle.Events, 'SS.appearance_view_ready', this.ready );\r\n \r\n return this.render();\r\n },\r\n render: function(args){\r\n \r\n this.service_model_json = window.services_model.toJSON();\r\n this._handle_icons_order();\r\n \r\n this.setElement( this.template( _.extend( {}, this.model.toJSON(), this.service_model_json ) ) );\r\n \r\n return this;\r\n },\r\n create_color_pickers: function() {\r\n this.$('.wph-color-picker').wpColorPicker({\r\n change: function( event, ui ) {\r\n var $this = $(this);\r\n $this.val( ui.color.toCSS() ).trigger('change');\r\n }\r\n });\r\n },\r\n ready: function() {\r\n var social_icons = this.service_model_json.social_icons,\r\n $reorder_box = this.$('.wph-sshare-reorder_box'),\r\n icon_style = this.model.get('icon_style'),\r\n $preview_box = this.$('.wph-sshare-floating-social--preview_box'),\r\n $preview_container = $preview_box.find('.wph-sshare--container'),\r\n $widget_preview_box = this.$('.wph-sshare-widget--preview_box'),\r\n $widget_preview_container = $widget_preview_box.find('.wph-sshare--container');\r\n \r\n _.each( social_icons, $.proxy(function( data, key ) {\r\n var icon_template = ( icon_style == 'one' )\r\n ? Optin.template('wpoi-sshare-'+ key +'-one-svg')\r\n : Optin.template('wpoi-sshare-'+ key +'-svg');\r\n \r\n var icon_template_html = icon_template(); \r\n \r\n // append social icons into Reorder box\r\n var icon_html = '<div class=\"wph-sshare-reorder_item\" data-id=\"'+ key +'\">'+ icon_template_html +'</div>';\r\n $reorder_box.append(icon_html);\r\n \r\n // append icons on floating social preview\r\n var preview_icon_html = icon_template_html,\r\n native_class = ''; \r\n if ( this.service_model_json.service_type == 'native' ) {\r\n if ( _.isTrue( this.service_model_json.click_counter ) ) {\r\n preview_icon_html += '<div class=\"wph-sshare_social_counter\"><span>'+ data.counter +'</span></div>';\r\n }\r\n native_class = 'native-social-share';\r\n }\r\n var floating_preview_icon_html = '<a data-social=\"'+ key +'\" href=\"#\" class=\"'+ native_class +'\" target=\"_blank\">'+ preview_icon_html +'</a>';\r\n $preview_container.append(floating_preview_icon_html);\r\n \r\n // append icons on widget preview\r\n var widget_preview_icon_html = '<a data-social=\"'+ key +'\" href=\"#\" class=\"'+ native_class +'\" target=\"_blank\">'+ preview_icon_html +'</a>';\r\n $widget_preview_container.append(widget_preview_icon_html);\r\n \r\n }, this) );\r\n \r\n this.make_icons_sortable();\r\n \r\n // social counter display\r\n if ( this.service_model_json.service_type == 'native' ) {\r\n if ( this.model.get('floating_inline_count') == '1' ) {\r\n $preview_container.addClass('wph-sshare--count_inline');\r\n } else {\r\n $preview_container.addClass('wph-sshare--count_block');\r\n }\r\n if ( this.model.get('widget_inline_count') == '1' ) {\r\n $widget_preview_container.addClass('wph-sshare--count_inline');\r\n } else {\r\n $widget_preview_container.addClass('wph-sshare--count_block');\r\n }\r\n }\r\n \r\n },\r\n make_icons_sortable: function() {\r\n var me = this,\r\n sortArgs = {\r\n items: '.wph-sshare-reorder_item',\r\n revert: true,\r\n axis: 'x',\r\n containment: this.$('#wph-sshare-icons_reorder'),\r\n stop: function(e, ui) {\r\n me._reorder_icons();\r\n }\r\n };\r\n \r\n this.$('.wph-sshare-reorder_box').sortable(sortArgs).disableSelection();\r\n },\r\n _handle_icons_order: function() {\r\n var reordered = {},\r\n social_icons = this.service_model_json.social_icons,\r\n icons_order = this.model.get('icons_order'),\r\n icons_order_arr = icons_order.split(',');\r\n \r\n if ( icons_order && icons_order_arr.length ) {\r\n _.each(icons_order_arr, function( data, key ) {\r\n if ( typeof social_icons[data] !== 'undefined' ) {\r\n reordered[data] = social_icons[data];\r\n social_icons = _.pick(social_icons, function(val, index){\r\n if ( data !== index ) {\r\n return index = val;\r\n }\r\n });\r\n }\r\n });\r\n \r\n // if still have some, append those\r\n if ( Object.keys(social_icons).length ) {\r\n reordered = _.extend( reordered, _.pick(social_icons, function(val, index) {\r\n if ( typeof val !== 'undefined' ) {\r\n return index = val;\r\n }\r\n }) );\r\n }\r\n \r\n this.service_model_json.social_icons = reordered;\r\n }\r\n },\r\n _reorder_icons: function() {\r\n var order = [];\r\n this.$('.wph-sshare-reorder_box').find('.wph-sshare-reorder_item').each( function() {\r\n order.push($(this).data('id'));\r\n } );\r\n this.model.set( 'icons_order', order.join() );\r\n }\r\n } ) );\r\n\r\n});","Hustle.define( 'Social_Sharing.Floating_View', function( $, doc, win ) {\r\n\t'use strict';\r\n\r\n\treturn Hustle.View.extend(_.extend({}, Hustle.get(\"Mixins.Model_Updater\"), {\r\n\t\ttemplate: Hustle.template(\"wpoi-social-sharing-floating-tpl\"),\r\n\t\tmessage_editor: false,\r\n\t\tevents: {\r\n\t\t\t'change [name=\"animate\"]': 'toggle_animation'\r\n\t\t},\r\n\t\tinit: function( options ){\r\n\t\t\t this.type = options.type;\r\n\r\n\t\t\t this.conditions_view = options.conditions_view;\r\n\t\t\t this.listenTo( this.model, \"change:enabled\", this.toggle_panel );\r\n\t\t\t this.conditions_view.on(\"toggle_condition\", this.update_conditions_label);\r\n\t\t\t this.conditions_view.on(\"change:update_view_label\", this.update_conditions_label);\r\n\t\t\t return this.render();\r\n\t\t },\r\n\t\t render: function(){\r\n\t\t\t this.$el.html( this.template( _.extend({}, {\r\n\t\t\t\t type: this.type,\r\n\t\t\t\t type_name: optin_vars.messages.settings[ this.type ],\r\n\t\t\t\t condition_labels: this.conditions_view.get_all_conditions_labels()\r\n\t\t\t }, this.model.toJSON() ) ) );\r\n \r\n\t\t\t this.$(\".wph-conditions\").replaceWith( this.conditions_view.$el );\r\n\t\t\t if ( _.isFalse(this.model.enabled) ) this.$el.find(\"#wph-floating-social-condition-labels\").hide();\r\n\r\n\t\t\t this.toggle_animation();\r\n\r\n\t\t\t return this;\r\n\t\t },\r\n\t\t toggle_panel: function( model ){\r\n\t\t\t this.$(\".switch-wrap\").toggleClass(\"open closed\");\r\n\t\t\t this.$el.find(\"#wph-floating-social-condition-labels\").toggle();\r\n\t\t },\r\n\t\t update_conditions_label: function( conditions_view ){\r\n\t\t\t$('#wph-floating-social-condition-labels').html( conditions_view.get_all_conditions_labels() );\r\n\t\t },\r\n\t\t toggle_animation: function() {\r\n\t\t\tvar input = this.$('[name=\"animate\"]:checked'),\r\n\t\t\t\tisOff = 'false' === input.val(),\r\n\t\t\t\tanimation_list = this.$('#optin-afterc-animation-block');\r\n\r\n\t\t\tanimation_list[ isOff ? 'hide' : 'show']();\r\n\t\t }\r\n } ) );\r\n});","Hustle.define(\"Social_Sharing.Services_View\", function($, doc, win){\r\n \"use strict\";\r\n return Hustle.View.extend(_.extend({}, Hustle.get(\"Mixins.Model_Updater\"), {\r\n template: Optin.template(\"wpoi-social-sharing-services-tpl\"),\r\n init: function( opts ){\r\n return this.render();\r\n },\r\n render: function(args){\r\n this.setElement( this.template( _.extend( {}, this.model.toJSON() ) ) );\r\n // var Media_Holder = Hustle.get(\"Media_Holder\");\r\n // this.media_holder = new Media_Holder({\r\n // model: this.design_model,\r\n // attribute: \"image\"\r\n // });\r\n\r\n // this.$(\".wph-media--holder\").html( this.media_holder.$el );\r\n return this;\r\n }\r\n } ) );\r\n\r\n});","Hustle.define(\"Custom_Content.Module\", function($){\r\n \"use strict\";\r\n\r\n /**\r\n * Listing Page\r\n */\r\n (function(){\r\n if( \"hustle_page_inc_hustle_custom_content\" !== pagenow ) return;\r\n\r\n var Listing = Hustle.get(\"Custom_Content.Listing\");\r\n var cc_listing = new Listing();\r\n\r\n var Legacy_Listing = Hustle.get(\"Legacy_Popups.Listing\");\r\n var cc_legacy_listing = new Legacy_Listing();\r\n\r\n }());\r\n\r\n\r\n /**\r\n * Edit or New page\r\n */\r\n (function(){\r\n\r\n if( _.indexOf( ['hustle_page_inc_hustle_custom_content_new', 'hustle_page_inc_hustle_custom_content_edit'], pagenow ) === -1 ) return;\r\n\t\t\r\n\t\tif ( parseInt(optin_vars.current.is_cc_limited) ) return;\r\n\r\n var View = Hustle.get(\"Custom_Content.View\"),\r\n Content_View = Hustle.get(\"Custom_Content.Content_View\"),\r\n Design_View = Hustle.get(\"Custom_Content.Design_View\"),\r\n\t\t\tAfterContent_View = Hustle.get( \"Custom_Content.After_Content_View\" ),\r\n Popup_View = Hustle.get(\"Custom_Content.Popup_View\"),\r\n Slide_In_View = Hustle.get(\"Custom_Content.Slide_In_View\"),\r\n Display_Triggers_View = Hustle.get(\"Settings.Display_Triggers_View\"),\r\n Conditions_View = Hustle.get(\"Settings.Conditions_View\"),\r\n Content_Model = Hustle.get(\"Custom_Content.Models.Content\"),\r\n Design_Model = Hustle.get(\"Custom_Content.Models.Design\"),\r\n\t\t\tAfterContent_Model = Hustle.get(\"Custom_Content.Models.AfterContent\"),\r\n Popup_Model = Hustle.get(\"Custom_Content.Models.Popup\"),\r\n Slide_In_Model = Hustle.get(\"Custom_Content.Models.Slide_In\"),\r\n Magic_Bar_Model = Hustle.get(\"Custom_Content.Models.Magic_Bar\")\r\n ;\r\n\r\n var content_model = new Content_Model( optin_vars.current.content || {} );\r\n\t\tvar after_content_model = new AfterContent_Model( optin_vars.current.after_content || {} );\r\n var design_model = new Design_Model( optin_vars.current.design || {} );\r\n var popup_model = new Popup_Model( optin_vars.current.popup || {} );\r\n var slide_in_model = new Slide_In_Model( optin_vars.current.slide_in || {} );\r\n var magic_bar_model = new Magic_Bar_Model( optin_vars.current.magic_bar || {} );\r\n\r\n window.content_model = content_model;\r\n window.design_model = design_model;\r\n\t\twindow.after_content_model = after_content_model;\r\n window.popup_model = popup_model;\r\n window.slide_in_model = slide_in_model;\r\n window.magic_bar_model = magic_bar_model;\r\n\t\t\r\n return new View({\r\n model: content_model,\r\n content_view: new Content_View({ model: content_model, design_model: design_model }),\r\n design_view: new Design_View( { model: design_model } ),\r\n\t\t\tafter_content_view: new AfterContent_View({\r\n\t\t\t\ttype: 'after_content',\r\n\t\t\t\tmodel: after_content_model,\r\n\t\t\t\tdisplay_triggers_view: new Display_Triggers_View( {\r\n\t\t\t\t\tmodel: after_content_model.get('triggers'),\r\n\t\t\t\t\ttype: 'after_content'\r\n\t\t\t\t}),\r\n\t\t\t\tconditions_view: new Conditions_View({\r\n\t\t\t\t\tmodel: after_content_model.get('conditions'),\r\n\t\t\t\t\ttype: 'after_content'\r\n\t\t\t\t})\r\n\t\t\t}),\r\n popup_view: new Popup_View( {\r\n type: \"popup\",\r\n model: popup_model,\r\n display_triggers_view: new Display_Triggers_View( {\r\n model: popup_model.get(\"triggers\"),\r\n type: \"popup\"\r\n }),\r\n conditions_view: new Conditions_View({\r\n model: popup_model.get(\"conditions\"),\r\n type: \"popup\"\r\n })\r\n }\r\n ),\r\n slide_in: new Slide_In_View( {\r\n type: \"slide_in\",\r\n model: slide_in_model,\r\n display_triggers_view: new Display_Triggers_View( {\r\n model: slide_in_model.get(\"triggers\"),\r\n type: \"slide_in\"\r\n }),\r\n conditions_view: new Conditions_View({\r\n model: slide_in_model.get(\"conditions\"),\r\n type: \"slide_in\"\r\n })\r\n }\r\n ),\r\n magic_bar: new Backbone.View({model: magic_bar_model})\r\n //magic_bar: new Popup_View( {\r\n // type: \"magic_bar\",\r\n // model: magic_bar_model,\r\n // display_triggers_view: new Display_Triggers_View( {\r\n // model: magic_bar_model.get(\"triggers\"),\r\n // type: \"magic_bar\"\r\n // }),\r\n // conditions_view: new Conditions_View({\r\n // model: magic_bar_model.get(\"conditions\"),\r\n // type: \"magic_bar\"\r\n // })\r\n // }\r\n //)\r\n\r\n });\r\n\r\n }());\r\n});\r\n\r\n","Hustle.define(\"Social_Sharing.Module\", function($){\r\n \"use strict\";\r\n\r\n /**\r\n * Listing Page\r\n */\r\n (function(){\r\n if( \"hustle_page_inc_hustle_social_sharing\" !== pagenow ) return;\r\n\r\n var Listing = Hustle.get(\"Social_Sharing.Listing\");\r\n var ss_listing = new Listing();\r\n }());\r\n\r\n\r\n /**\r\n * Edit or New page\r\n */\r\n (function(){\r\n\r\n if( _.indexOf( ['hustle_page_inc_hustle_social_sharing_new', 'hustle_page_inc_hustle_social_sharing_edit'], pagenow ) === -1 ) return;\r\n\t\t\r\n\t\tif ( parseInt(optin_vars.current.is_ss_limited) ) return;\r\n \r\n var View = Hustle.get(\"Social_Sharing.View\"),\r\n Services_View = Hustle.get(\"Social_Sharing.Services_View\"),\r\n Appearance_View = Hustle.get(\"Social_Sharing.Appearance_View\"),\r\n Floating_View = Hustle.get( \"Social_Sharing.Floating_View\" ),\r\n Conditions_View = Hustle.get(\"Settings.Conditions_View\"),\r\n Services_Model = Hustle.get(\"Social_Sharing.Models.Services\"),\r\n Appearance_Model = Hustle.get(\"Social_Sharing.Models.Appearance\"),\r\n Floating_Social_Model = Hustle.get(\"Social_Sharing.Models.Floating_Social\")\r\n ;\r\n \r\n var services_model = new Services_Model( optin_vars.current.services || {} );\r\n var appearance_model = new Appearance_Model( optin_vars.current.appearance || {} );\r\n var floating_social_model = new Floating_Social_Model( optin_vars.current.floating_social || {} );\r\n\r\n window.services_model = services_model;\r\n window.appearance_model = appearance_model;\r\n window.floating_social_model = floating_social_model;\r\n\t\t\r\n return new View({\r\n model: services_model,\r\n services_view: new Services_View({ model: services_model }),\r\n appearance_view: new Appearance_View({ model: appearance_model }),\r\n floating_view: new Floating_View({\r\n\t\t\t\ttype: 'floating_social',\r\n\t\t\t\tmodel: floating_social_model,\r\n\t\t\t\tconditions_view: new Conditions_View({\r\n\t\t\t\t\tmodel: floating_social_model.get('conditions'),\r\n\t\t\t\t\ttype: 'floating_social'\r\n\t\t\t\t})\r\n\t\t\t})\r\n });\r\n\r\n }());\r\n});\r\n\r\n","Hustle.define( 'Optin.Error_List_Modal', function($) {\r\n\t'use strict';\r\n\r\n\tvar ErrorLog = Backbone.View.extend({\r\n\t\ttagName: 'tr',\r\n\t\ttemplate: Optin.template( 'wpoi-error-list-tpl' ),\r\n\t\tcontroller: false,\r\n\t\tinitialize: function(opts) {\r\n\t\t\tthis.controller = opts.controller;\r\n\t\t\tthis.module_fields = opts.module_fields;\r\n\t\t\tthis.render();\r\n\t\t},\r\n\t\trender: function() {\r\n\t\t\tvar me = this,\r\n\t\t\t\thtml = this.template( {model: this.model, module_fields: this.module_fields} );\r\n\r\n\t\t\tthis.$el.html( html );\r\n\t\t\tthis.$el.appendTo( this.controller.$('#wpoi-error-list') );\r\n\t\t}\r\n\t});\r\n\r\n\treturn Backbone.View.extend({\r\n\t\tid: 'wpoi-error-list-modal',\r\n\t\tbutton: false,\r\n\t\tlist: [],\r\n\t\ttemplate: Optin.template( 'wpoi-error-list-modal-tpl' ),\r\n\t\theader_template: Optin.template( 'wpoi-error-header-list-tpl' ),\r\n\t\thasHeader: false,\r\n\t\tevents: {\r\n\t\t\t'click .inc-opt-close-error-list': 'toggleErrorLog',\r\n\t\t\t'click .button-clear-logs': 'clearLogs',\r\n\t\t\t'click .button-delete-logs': '_clean',\r\n\t\t\t'click .button-cancel-delete-logs': 'cancelDelete',\r\n\t\t},\r\n\r\n\t\tinitialize: function(opts) {\r\n\t\t\tthis.button = opts.button;\r\n\t\t\tthis.render();\r\n\t\t},\r\n\r\n\t\trender: function() {\r\n\t\t\tvar me = this,\r\n\t\t\t\thtml = this.template( this.model );\r\n\r\n\t\t\tthis.$el.html( html );\r\n\t\t\tthis.$el.appendTo('body');\r\n\t\t\tthis.clearLogButton = this.$('.button-clear-logs');\r\n\t\t\tthis.exportButton = this.$('.button-download-csv');\r\n\t\t\tthis.deleteConfirmation = this.$('.hustle-delete-logs-confirmation');\r\n\t\t\tthis.header = this.$('.wph-table-header');\r\n\t\t\tthis.button.addClass('loading');\r\n\r\n\t\t\t$.getJSON( window.ajaxurl, {\r\n\t\t\t\toptin_id: this.model.optin_id,\r\n\t\t\t\t_wpnonce: optin_vars.error_log_nonce,\r\n\t\t\t\taction: 'get_error_list'\r\n\t\t\t}, function( res ) {\r\n\t\t\t\tif ( res.success && res.data && res.data.logs ) {\r\n\t\t\t\t\tme.header.html( me.header_template( {headers: res.data.module_fields} ) );\r\n\r\n\t\t\t\t\t_.each( res.data.logs, function( log ) {\r\n\t\t\t\t\t\tvar error = new ErrorLog({\r\n\t\t\t\t\t\t\tmodule_fields: res.data.module_fields,\r\n\t\t\t\t\t\t\tmodel: log,\r\n\t\t\t\t\t\t\tcontroller: me\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t});\r\n\t\t\t\t\tme.show();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\tshow: function() {\r\n\t\t\tthis.$el.addClass('show');\r\n\t\t},\r\n\r\n\t\ttoggleErrorLog: function() {\r\n\t\t\tthis.$el.removeClass('show');\r\n\t\t},\r\n\r\n\t\tclearLogs: function() {\r\n\t\t\tthis.deleteConfirmation.show();\r\n\t\t\tthis.clearLogButton.attr('disabled', true);\r\n\t\t\tthis.exportButton.attr('disabled', true);\r\n\t\t},\r\n\r\n\t\t_clean: function() {\r\n\t\t\tvar me = this;\r\n\r\n\t\t\t$.get(window.ajaxurl, {\r\n\t\t\t\toptin_id: this.model.optin_id,\r\n\t\t\t\t_wpnonce: optin_vars.clear_log_nonce,\r\n\t\t\t\taction: 'clear_logs'\r\n\t\t\t}, function( res ) {\r\n\t\t\t\tif ( res.success ) {\r\n\t\t\t\t\tme.toggleErrorLog();\r\n\t\t\t\t\t_.delay(function() {\r\n\t\t\t\t\t\tme.button.remove();\r\n\t\t\t\t\t\tme.remove();\r\n\t\t\t\t\t}, 350 );\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\tcancelDelete: function() {\r\n\t\t\tthis.deleteConfirmation.hide();\r\n\t\t\tthis.clearLogButton.removeAttr('disabled');\r\n\t\t\tthis.exportButton.removeAttr('disabled');\r\n\t\t}\r\n\t});\r\n});","Hustle.define(\"Optin.Subscription_List_Modal\", function($){\r\n \"use strict\";\r\n\r\n var view_email_list_cache = {};\r\n\r\n return Backbone.View.extend({\r\n id: \"wpoi-emails-list-modal\",\r\n template: Optin.template(\"wpoi-emails-list-modal-tpl\"),\r\n\t\tlist_header_template: Optin.template( 'wpoi-email-list-header-tpl' ),\r\n list_template: Optin.template(\"wpoi-emails-list-tpl\"),\r\n show_delay: 350,\r\n events: {\r\n \"click .inc-opt-close-emails-list\": \"close\",\r\n \"click .wpoi-complete-mask\": \"close\"\r\n },\r\n initialize: function(){\r\n\r\n return this.render();\r\n },\r\n render: function(){\r\n var self = this,\r\n html = this.template(this.model);\r\n\r\n html = html.replace(\"__id\", this.model.id); // add the id to the export csv link\r\n this.$el.html( html );\r\n\r\n if( !view_email_list_cache[this.model.id] ){\r\n view_email_list_cache[this.model.id] = $.ajax({\r\n url: ajaxurl,\r\n type: \"GET\",\r\n data: {\r\n action: \"inc_optin_get_email_lists\",\r\n id: this.model.id,\r\n _ajax_nonce: $(\"#wpoi_get_emails_list_nonce\").val()\r\n }\r\n });\r\n this.delay_show = 0;\r\n }\r\n\r\n view_email_list_cache[this.model.id].then(function(res){\r\n if( res.success ){\r\n\t\t\t\t\tvar module_fields = res.data.module_fields,\r\n\t\t\t\t\t\tfields = [];\r\n\r\n\t\t\t\t\tif ( ! self.model.module_fields.length ) {\r\n\t\t\t\t\t\tself.model.module_fields = module_fields;\r\n\t\t\t\t\t\tself.$('.wpoi-emails-list-header').html( self.list_header_template({ module_fields: module_fields }));\r\n\r\n\t\t\t\t\t\t// We only need the name and label in listing template\r\n\t\t\t\t\t\t_.each( module_fields, function( field ) {\r\n\t\t\t\t\t\t\tfields.push( {name: field.name, label: field.label} );\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n \r\n var content = self.list_template( { subscriptions: res.data.subscriptions, module_fields: fields });\r\n\r\n self.$(\"#wpoi-emails-list-content\").html( content );\r\n self.show();\r\n }\r\n\r\n });\r\n\r\n this.$el.appendTo( \"body\" );\r\n return this;\r\n },\r\n show: function(){\r\n _.delay( function(){\r\n this.$el.addClass(\"show\");\r\n }.bind(this), this.show_delay);\r\n },\r\n close: function(e){\r\n e.preventDefault();\r\n this.$el.removeClass(\"show\");\r\n _.delay( function(){\r\n this.remove();\r\n }.bind(this), 350);\r\n }\r\n });\r\n\r\n});","Hustle.define(\"Optin.Module\", function() {\r\n \"use strict\";\r\n\r\n if( 'hustle_page_inc_optin_listing' === pagenow ){\r\n var Listing = Hustle.get(\"Optin.Listing\");\r\n var optin_listing = new Listing();\r\n }\r\n\r\n\r\n});","Hustle.define(\"Dashboard.View\", function($, doc, win){\r\n \"use strict\";\r\n\r\n if( pagenow !== 'toplevel_page_inc_optins' || _.isTrue( optin_vars.is_free ) ) return;\r\n\r\n var dashboard_view = Backbone.View.extend({\r\n el: \".wph-dashboard\",\r\n conversions_chart: null,\r\n chart_data: null,\r\n chart_options : null,\r\n empty_chart: true,\r\n default_dataset_options: {\r\n fill: false,\r\n cubicInterpolationMode: 'monotone',\r\n borderCapStyle: 'butt',\r\n borderDash: [],\r\n borderWidth: 1,\r\n borderDashOffset: 0.0,\r\n borderJoinStyle: 'miter',\r\n pointBackgroundColor: \"#fff\",\r\n pointBorderWidth: 3,\r\n pointHoverRadius: 5,\r\n pointHoverBorderColor: \"rgba(220,220,220,1)\",\r\n pointHoverBorderWidth: 2,\r\n pointRadius: 1,\r\n pointHitRadius: 10,\r\n spanGaps: false\r\n },\r\n events: {\r\n \"click .wph-icon.i-close\": \"close\"\r\n },\r\n initialize: function( opts ){\r\n var datasets = [];\r\n for (var i = 0; i < hustle_vars.conversion_chart_data.length; i++){\r\n if( hustle_vars.conversion_chart_data[i].data.length >= 1 )\r\n this.empty_chart = false;\r\n var newds = {\r\n label: hustle_vars.conversion_chart_data[i].module_name,\r\n data: hustle_vars.conversion_chart_data[i].data,\r\n backgroundColor: hustle_vars.conversion_chart_data[i].color,\r\n borderColor: hustle_vars.conversion_chart_data[i].color,\r\n pointBorderColor: hustle_vars.conversion_chart_data[i].color,\r\n pointHoverBackgroundColor: hustle_vars.conversion_chart_data[i].color\r\n };\r\n datasets.push( $.extend(true, {}, this.default_dataset_options, newds) );\r\n }\r\n this.chart_data = {\r\n datasets: datasets\r\n };\r\n this.chart_options = {\r\n responsive: true,\r\n maintainAspectRatio: false,\r\n legend: {\r\n display:false\r\n },\r\n scales: {\r\n xAxes:[{\r\n type: 'time',\r\n time: {\r\n unit: 'week',\r\n unitStepSize: 3,\r\n\t\t\t\t\t\t\ttooltipFormat: 'D MMM',\r\n\t\t\t\t\t\t\tdisplayFormat: 'D MMM',\r\n\t\t\t\t\t\t\tmin: hustle_vars.previous_month,\r\n\t\t\t\t\t\t\tmax: hustle_vars.today\r\n },\r\n gridLines: {\r\n display: false\r\n }\r\n }],\r\n yAxes:[{\r\n ticks: {\r\n min: 0\r\n },\r\n gridLines: {\r\n display: false\r\n }\r\n\r\n }]\r\n },\r\n tooltips: {\r\n callbacks: {\r\n label: function(tooltipItem, data){\r\n var returnArray = [];\r\n\t\t\t\t\t\t\treturnArray.push( tooltipItem.yLabel + \" Conv\" );\r\n return returnArray;\r\n }\r\n },\r\n\t\t\t\t\tcornerRadius: 3,\r\n\t\t\t\t\tdisplayColors: false,\r\n\t\t\t\t\tbackgroundColor: \"rgba(11,47,63,1)\",\r\n },\r\n\t\t\t\thover: {\r\n\t\t\t\t\tmode: 'nearest',\r\n\t\t\t\t\tintersect: true\r\n\t\t\t\t}\r\n\r\n };\r\n return this.render();\r\n },\r\n render: function(){\r\n $(\".tabs-header li label\").on('click', this.toggle_overview);\r\n $(\".can-close .wph-icon.i-close\").on('click', this.close);\r\n $(\"a#wph-sshare_stats_view_all\").on('click', this.toggle_sshare_modal);\r\n $(\"a#wph-sshare_stats_close\").on('click', this.toggle_sshare_modal);\r\n this.handle_sshare_modal_pagination();\r\n \r\n var canvas = $(\"#conversions_chart\");\r\n if( !canvas.length ) return;\r\n\r\n if(!this.empty_chart){\r\n\t\t\t\t// setting canvas height\r\n\t\t\t\tvar $module_table = canvas.closest('#wph-module-stats').find('table.wph-table.wph-module--stats'),\r\n\t\t\t\t\tmodule_table_height = $module_table.outerHeight();\r\n\t\t\t\t\r\n\t\t\t\tif ( module_table_height > 230 ) {\r\n\t\t\t\t\tcanvas.attr('height', module_table_height);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcanvas.attr('height', 230);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// sort the dates properly\r\n for( var key in this.chart_data.datasets ) {\r\n\t\t\t\t\tif ( this.chart_data.datasets[key].data ) {\r\n this.chart_data.datasets[key].data = _.sortBy(this.chart_data.datasets[key].data, \"x\");\r\n\t\t\t\t\t}\r\n }\r\n\t\t\t\t\r\n\t\t\t\t// rendering the chart\r\n this.conversions_chart = new Chart(canvas, {\r\n\t\t\t\t\ttype: 'line',\r\n data: this.chart_data,\r\n options: this.chart_options\r\n });\r\n\t\t\t\t\r\n } else {\r\n canvas.parent()\r\n\t\t\t\t\t.css('height', '100%')\r\n\t\t\t\t\t.css('width', '100%')\r\n\t\t\t\t\t.css('display', 'table')\r\n\t\t\t\t;\r\n\t\t\t\t\r\n\t\t\t\tvar $no_data = $('<div class=\"graph-no-data\">' + optin_vars.messages.dashboard.not_enough_data + '</div>');\r\n\t\t\t\t$no_data\r\n\t\t\t\t\t.css('display', 'table-cell')\r\n\t\t\t\t\t.css('text-align', 'center')\r\n\t\t\t\t\t.css('vertical-align', 'middle')\r\n\t\t\t\t;\r\n\t\t\t\tcanvas.replaceWith($no_data);\r\n }\r\n\r\n },\r\n\t\tclose: function(e){\r\n\t\t\te.preventDefault();\r\n\t\t\t// var $parent_section = $(e.target).closest('.content-box').remove();\r\n\t\t\tvar $parent_container = $(e.target).closest('.row'),\r\n\t\t\t\t$parent_section = $(e.target).closest('#wph-welcome'),\r\n\t\t\t\tnonce = $parent_section.data(\"nonce\")\r\n\t\t\t;\r\n\t\t\t$parent_container.slideToggle(300, function(){\r\n\t\t\t\t$.ajax({\r\n\t\t\t\t\turl: ajaxurl,\r\n\t\t\t\t\ttype: \"POST\",\r\n\t\t\t\t\tdata: {\r\n\t\t\t\t\t\taction: \"persist_new_welcome_close\",\r\n\t\t\t\t\t\t_ajax_nonce: nonce\r\n\t\t\t\t\t},\r\n\t\t\t\t\tcomplete: function(d){\r\n\t\t\t\t\t\t$parent_container.remove();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t},\r\n\t\ttoggle_overview: function(e){\r\n\t\t\te.preventDefault();\r\n\t\t\tvar $this = $(e.target),\r\n\t\t\t\tvalue = $this.find('input').val(),\r\n\t\t\t\t$target = $(\"#wph-\"+ value +\"-overview\"),\r\n\t\t\t\t$li = $this.parent();\r\n\t\t\t\r\n\t\t\t$(\".wph-modules-overview\").not($target).removeClass(\"current\");\r\n\t\t\t$target.addClass(\"current\");\r\n\t\t\t$(\".tabs-header li\").not($li).removeClass(\"current\");\r\n\t\t\t$li.addClass(\"current\");\r\n\t\t},\r\n toggle_sshare_modal: function(e) {\r\n e.preventDefault();\r\n var $stats_modal = $('#wpoi-sshare-stats-modal');\r\n $stats_modal.toggleClass('show');\r\n },\r\n handle_sshare_modal_pagination: function(){\r\n $(\"li.wph-sshare--prev_page a\").on('click', $.proxy(this.sshare_modal_prev, this));\r\n $(\"li.wph-sshare--next_page a\").on('click', $.proxy(this.sshare_modal_next, this));\r\n $(\"li.wph-sshare--page_number a\").on('click', $.proxy(this.sshare_modal_goto, this));\r\n },\r\n sshare_modal_prev: function(e) {\r\n e.preventDefault();\r\n e.stopImmediatePropagation();\r\n \r\n var $li = $(e.target).closest('li'),\r\n $ul = $li.parent(),\r\n nonce = $ul.data('nonce'),\r\n $current = $ul.find('li.wph-sshare--current_page'),\r\n $page_number = $ul.find('li.wph-sshare--page_number'),\r\n $next = $ul.find('li.wph-sshare--next_page'),\r\n total = parseInt($ul.data('total')),\r\n current_page = parseInt($current.data('page')),\r\n prev_target = parseInt($li.data('page'));\r\n \r\n // update current page\r\n $current.data('page', prev_target);\r\n \r\n // update next link\r\n var $new_next_html = $next.find('i.wph-icon');\r\n $next.data( 'page', current_page );\r\n if ( $new_next_html.length ) {\r\n $next.html('<a href=\"#\">'+ $new_next_html[0].outerHTML +'</a>');\r\n }\r\n \r\n if ( prev_target == 1 ) {\r\n // disable prev button\r\n var $new_html = $li.find('i.wph-icon');\r\n if ( $new_html.length ) {\r\n $li.html('<span>' + $new_html[0].outerHTML + '</span>');\r\n }\r\n }\r\n\r\n // update page number\r\n if ( $page_number.length ) {\r\n $page_number.data('page', current_page);\r\n $page_number.find('a').text(current_page);\r\n } else {\r\n var page_number_html = '<li class=\"wph-link wph-sshare--page_number\" data-page=\"'+ current_page +'\"><a href=\"#\">'+ current_page +'</a></li>';\r\n $(page_number_html).insertAfter($current);\r\n }\r\n \r\n $current.find('span').text(prev_target);\r\n $li.data('page', prev_target - 1);\r\n this.handle_sshare_modal_pagination();\r\n this.sshare_show_page_content(prev_target, nonce);\r\n },\r\n sshare_modal_next: function(e) {\r\n e.preventDefault();\r\n e.stopImmediatePropagation();\r\n \r\n var $li = $(e.target).closest('li'),\r\n $ul = $li.parent(),\r\n nonce = $ul.data('nonce'),\r\n $current = $ul.find('li.wph-sshare--current_page'),\r\n $page_number = $ul.find('li.wph-sshare--page_number'),\r\n $prev = $ul.find('li.wph-sshare--prev_page'),\r\n total = parseInt($ul.data('total')),\r\n current_page = parseInt($current.data('page')),\r\n next_target = parseInt($li.data('page'));\r\n \r\n // update current page\r\n $current.data('page', next_target);\r\n \r\n // update prev link\r\n var $new_prev_html = $prev.find('i.wph-icon');\r\n $prev.data( 'page', current_page );\r\n if ( $new_prev_html.length ) {\r\n $prev.html('<a href=\"#\">'+ $new_prev_html[0].outerHTML +'</a>');\r\n }\r\n \r\n if ( next_target < total ) {\r\n // update page number\r\n if ( $page_number.length ) {\r\n var next_next_page = next_target + 1;\r\n $page_number.data('page', next_next_page);\r\n $page_number.find('a').text(next_next_page);\r\n $li.data('page', next_next_page);\r\n }\r\n } else {\r\n // remove page number and disable next button\r\n if ( $page_number.length ) $page_number.remove();\r\n var $new_html = $li.find('i.wph-icon');\r\n if ( $new_html.length ) {\r\n $li.html('<span>' + $new_html[0].outerHTML + '</span>');\r\n }\r\n }\r\n \r\n $current.find('span').text(next_target);\r\n this.handle_sshare_modal_pagination();\r\n this.sshare_show_page_content(next_target, nonce);\r\n },\r\n sshare_modal_goto: function(e) {\r\n e.preventDefault();\r\n e.stopImmediatePropagation();\r\n \r\n var $li = $(e.target).closest('li'),\r\n $ul = $li.parent();\r\n \r\n // fire the next button click event\r\n $ul.find(\"li.wph-sshare--next_page a\").click();\r\n },\r\n sshare_show_page_content: function(page, nonce){\r\n var ss_modal_template = Optin.template('wpoi-sshare-stats-modal-tpl'),\r\n $table_items = $('table#wph-sshare--stats_items');\r\n \r\n $table_items.html('<div class=\"wph-sshare--loading_stats\"><span class=\"on-action\">Loading...</span></div>');\r\n \r\n $.ajax({\r\n url: ajaxurl,\r\n type: \"POST\",\r\n data: {\r\n action: \"sshare_show_page_content\",\r\n page_id: page,\r\n _ajax_nonce: nonce\r\n },\r\n complete: function(resp){\r\n var data = resp.responseJSON.data,\r\n items_html = ss_modal_template( _.extend( {}, data ) );\r\n \r\n $table_items.replaceWith(items_html);\r\n }\r\n });\r\n }\r\n });\r\n\r\n var dash_view = new dashboard_view();\r\n});","(function ($, doc){\r\n \"use strict\";\r\n if( pagenow !== 'hustle_page_inc_hustle_settings' ) return;\r\n\r\n var E_News = Hustle.get(\"Settings.E_News\"),\r\n Modules_Activity = Hustle.get(\"Settings.Modules_Activity\"),\r\n Services = Hustle.get(\"Settings.Services\");\r\n\r\n var e_new = new E_News();\r\n var m_activity = new Modules_Activity();\r\n var service = new Services();\r\n}(jQuery, document));","(function($){\r\n\t'use strict';\r\n\r\n\tOptin.Provider = function( options ) {\r\n\t\tvar me = this;\r\n\t\r\n\t\t_.extend( this, {\r\n\t\t\t/**\r\n\t\t\t * @var (string)\r\n\t\t\t * Provider ID.\r\n\t\t\t * Must be the same as the value in provider selection options.\r\n\t\t\t **/\r\n\t\t\tid: false,\r\n\r\n\t\t\t/**\r\n\t\t\t * @var (object)\r\n\t\t\t * An object name:value pattern where `name` is the meta name use and `value` is\r\n\t\t\t * the corresponding selector i.e. #optin_api_key.\r\n\t\t\t **/\r\n\t\t\tprovider_args: {},\r\n\r\n\t\t\t/**\r\n\t\t\t * @var (object)\r\n\t\t\t * An error object pattern.\r\n\t\t\t * `[META NAME]` {\r\n\t\t\t * \t\t`name`: The field name\r\n\t\t\t * \t\t`message`: The unique error message for the field\r\n\t\t\t * \t\t`iconClass`: An additional icon classes added in error icon.\r\n\t\t\t * }\r\n\t\t\t **/\r\n\t\t\terrors: {},\r\n\r\n\t\t\trender_in_previewr: _.noop,\r\n\t\t\tinit: _.noop,\r\n\r\n\t\t\tadd_args: function() {\r\n\t\t\t\tif ( me.id === Optin.step.services.model.get('optin_provider') ) {\r\n\t\t\t\t\t_.each( me.provider_args, function(selector,key) {\r\n\t\t\t\t\t\tvar value = $(selector);\r\n\r\n\t\t\t\t\t\tif ( value.length ) {\r\n\t\t\t\t\t\t\tvalue = value.val().trim();\r\n\t\t\t\t\t\t\tOptin.step.services.provider_args.set( key, value );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Clear provider_args if previous provider was me.id but then user changes to another provider\r\n\t\t\t * @on design:preview:render:start\r\n\t\t\t */\r\n\t\t\tclear_provider_args: function() {\r\n\t\t\t\tif ( me.id === Optin.step.services.model.previousAttributes().optin_provider &&\r\n me.id !== Optin.step.services.model.get('optin_provider') ) {\r\n\t\t\t\t\tOptin.step.services.provider_args.clear( {silent: true} );\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Validates provider args fields.\r\n\t\t\t **/\r\n\t\t\tvalidate: function() {\r\n\t\t\t\tvar errors = [];\r\n\r\n\t\t\t\t_.each( me.provider_args, function( selector, key ) {\r\n\t\t\t\t\tvar input = $( selector ),\r\n\t\t\t\t\t\t$icon = $('<span></span>');\r\n\r\n\t\t\t\t\tif ( input.length > 0 && '' === input.val().trim() ){\r\n\t\t\t\t\t\terrors.push( me.errors[ key ] );\r\n\t\t\t\t\t\t$icon.attr( 'title', me.errors[ key ].message );\r\n\t\t\t\t\t\tinput.addClass( 'wpoi-error' );\r\n\t\t\t\t\t\tinput.after( $icon );\r\n\t\t\t\t\t\t_.defer( function(){\r\n\t\t\t\t\t\t\t$icon.addClass( 'dashicons dashicons-warning ' + me.errors[ key ].iconClass );\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\treturn _( errors );\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Helper method to check module field per provider.\r\n\t\t\t *\r\n\t\t\t * @param (object) field\t\tThe field object [name,label]\r\n\t\t\t * @param (int) optin_id\t\tThe current Opt_In ID created/updated.\r\n\t\t\t * @param (function) callback\tThe callback function to execute after successful checking.\r\n\t\t\t **/\r\n\t\t\tcheck_module_field: function( field, optin_id, callback ) {\r\n\t\t\t\t$.getJSON( window.ajaxurl, {\r\n\t\t\t\t\taction: 'add_module_field',\r\n\t\t\t\t\tprovider: this.id,\r\n\t\t\t\t\t_wpnonce: optin_vars.get_module_field_nonce,\r\n\t\t\t\t\toptin_id: optin_id,\r\n\t\t\t\t\tfield: field\r\n\t\t\t\t}, callback ).fail(function() {\r\n\t\t\t\t\tvar error = {error:true};\r\n\t\t\t\t\tif ( callback ) {\r\n\t\t\t\t\t\tcallback(error);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Validate if custom field name/label is valid\r\n\t\t\t *\r\n\t\t\t * @on optin:update_module_field\r\n\t\t\t **/\r\n\t\t\tvalidate_custom_field: function( field, module_view, optin_id ) {\r\n\t\t\t\tmodule_view.$('.dashicons-warning').remove();\r\n\t\t\t\tmodule_view.$( '[name]' ).prop( 'disabled', true );\r\n\r\n\t\t\t\tthis.check_module_field( field, optin_id, function( res ) {\r\n\t\t\t\t\tmodule_view.$( '[name]' ).prop( 'disabled', false );\r\n\r\n\t\t\t\t\tif ( res.success ) {\r\n\t\t\t\t\t\tmodule_view.options = field;\r\n\t\t\t\t\t\tmodule_view._updateOptions();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar $icon = $('<span class=\"dashicons dashicons-warning\">'),\r\n\t\t\t\t\t\t\t$title = 'custom' !== res.data.code ? optin_vars.messages.module_fields[ res.data.code ] : res.data.message;\r\n\r\n\t\t\t\t\t\t$icon.attr( 'title', $title );\r\n\t\t\t\t\t\tmodule_view.$('[name=\"label\"]').before( $icon );\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Validate if custom field can be created\r\n\t\t\t *\r\n\t\t\t * @on optin:add_module_field_infusionsoft\r\n\t\t\t * @param (object)\t\t\tThe field object [name,label]\r\n\t\t\t * @param (object)\t\t\tDesign view object instance.\r\n\t\t\t * @param (int)\t\t\t\tCurrent Opt_In ID created/updated.\r\n\t\t\t **/\r\n\t\t\tadd_module_field: function( field, design_view, optin_id ) {\r\n\t\t\t\tvar addbutton = design_view.$( '.wph-add-new-field', '#wpoi-module-field-maker' );\r\n\r\n\t\t\t\taddbutton.addClass( 'wp-button-save--loading' );\r\n\t\t\t\taddbutton.prop('disabled', true );\r\n\r\n\t\t\t\tthis.check_module_field( field, optin_id, function( res ) {\r\n\t\t\t\t\taddbutton.prop( 'disabled', false );\r\n\r\n\t\t\t\t\tif ( res.success ) {\r\n\t\t\t\t\t\tfield = res.data.field;\r\n\t\t\t\t\t\tdesign_view._add_module_field( field );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar $icon = $('<span class=\"dashicons dashicons-warning\">'),\r\n\t\t\t\t\t\t$title = 'custom' !== res.data.code ? optin_vars.messages.module_fields[ res.data.code ] : res.data.message;\r\n\r\n\t\t\t\t\t\t$icon.attr( 'title', $title );\r\n\r\n\t\t\t\t\t\taddbutton.before( $icon );\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}, options );\r\n\r\n\t\tthis.init();\r\n\t\tOptin.Events.on(\"services:validate:after\", $.proxy( this, 'add_args' ) );\r\n\t\tOptin.Events.on(\"design:preview:render:start\", $.proxy( this, 'clear_provider_args' ) );\r\n\t\tOptin.Events.on(\"optin:add_module_field_\" + this.id, $.proxy( this, 'add_module_field' ) );\r\n\t\tOptin.Events.on(\"optin:update_module_field_\" + this.id, $.proxy( this, 'validate_custom_field' ) );\r\n\r\n\t\treturn this;\r\n\t};\r\n}(jQuery,document));","(function($){\r\n\t'use strict';\r\n\r\n\tOptin.Mixins.add_services_mixin( 'activecampaign', function() {\r\n\t\treturn new Optin.Provider({\r\n\t\t\tid: 'activecampaign',\r\n\t\t\tprovider_args: {url: '#optin_url'},\r\n\t\t\terrors: {\r\n\t\t\t\turl: {\r\n\t\t\t\t\tname: 'optin_url',\r\n\t\t\t\t\tmessage: optin_vars.messages.activecampaign.enter_url,\r\n\t\t\t\t\ticonClass: 'dashicons-warning-account_name'\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t});\r\n}(jQuery,document));","(function($){\r\n\t'use strict';\r\n\r\n\tOptin.Mixins.add_services_mixin( 'convertkit', function() {\r\n\t\treturn new Optin.Provider({\r\n\t\t\tid: 'convertkit',\r\n\t\t\tprovider_args: {api_secret: '#optin_api_secret'},\r\n\t\t\terrors: {\r\n\t\t\t\tapi_secret: {\r\n\t\t\t\t\tname: 'optin_api_secret',\r\n\t\t\t\t\tmessage: optin_vars.messages.convertkit.enter_api_secret,\r\n\t\t\t\t\ticonClass: 'dashicons-warning-account_name'\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t});\r\n}(jQuery,document));","/**\r\n * Hubspot email integration\r\n */\r\n(function($,doc,win){\r\n 'use strict';\r\n\r\n Optin.Mixins.add_services_mixin( 'hubspot', function() {\r\n return new Optin.Provider({id: 'hubspot'});\r\n });\r\n\r\n var resetReferrer = function() {\r\n var target = $(this),\r\n optin_id = target.data('optin'),\r\n location = target.attr('href'),\r\n timer, data;\r\n\r\n if ( ! optin_id ) {\r\n var button = $('.next-button button.wph-button-save', '#wpoi-wizard-services');\r\n button.trigger( 'click' );\r\n\r\n timer = setInterval(function() {\r\n optin_id = Optin.step.services.model.get('optin_id');\r\n\r\n if ( parseInt( optin_id ) > 0 ) {\r\n clearInterval(timer);\r\n data = {optin_id: optin_id, _wpnonce: window.optin_vars.hubspot_nonce, action: 'update_hubspot_referrer' };\r\n\r\n // Update referrer in the background\r\n $.get(ajaxurl, data);\r\n\r\n _.delay(function() {\r\n win.location = location;\r\n }, 300 );\r\n }\r\n }, 100 );\r\n }\r\n\r\n return;\r\n };\r\n\r\n $(doc).on( 'click', '.hubspot-authorize', resetReferrer );\r\n\r\n}(jQuery,document,window));\r\n","(function($){\r\n\t'use strict';\r\n\r\n\tOptin.Mixins.add_services_mixin( 'infusionsoft', function() {\r\n\t\treturn new Optin.Provider({\r\n\t\t\tid: 'infusionsoft',\r\n\t\t\tprovider_args: {account_name: '#optin_account_name'},\r\n\t\t\terrors: {\r\n\t\t\t\taccount_name: {\r\n\t\t\t\t\tname: 'optin_account_name',\r\n\t\t\t\t\tmessage: optin_vars.messages.infusionsoft.enter_account_name,\r\n\t\t\t\t\ticonClass: 'dashicons-warning-account_name'\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t});\r\n}(jQuery,document));","(function($){\r\n\t'use strict';\r\n\r\n\tOptin.Mixins.add_services_mixin( 'mad_mimi', function() {\r\n\t\treturn new Optin.Provider({\r\n\t\t\tid: 'mad_mimi',\r\n\t\t\tprovider_args: {username: '#optin_username'},\r\n\t\t\terrors: {\r\n\t\t\t\tusername: {\r\n\t\t\t\t\tname: 'optin_username',\r\n\t\t\t\t\tmessage: optin_vars.messages.sendy.enter_url,\r\n\t\t\t\t\ticonClass: 'dashicons-warning-url'\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t});\r\n\r\n}(jQuery,document));","(function($,doc){\r\n\t'use strict';\r\n\r\n\tOptin.Mixins.add_services_mixin( 'mailchimp', function( service_tab_view ) {\r\n\t\treturn new Optin.Provider({\r\n\t\t\tid: 'mailchimp',\r\n\t\t\tprovider_args: {email_list: '#optin_email_list'},\r\n\t\t\terrors: {\r\n\t\t\t\temail_list: {\r\n\t\t\t\t\tname: 'optin_email_list',\r\n\t\t\t\t\tmessage: optin_vars.messages.infusionsoft.enter_account_name,\r\n\t\t\t\t\ticonClass: 'dashicons-warning-account_name'\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\trender_in_previewr: function($preview){\r\n\t\t\t\tvar $_preview = $preview.$el ? $preview.$el : $preview;\r\n\t\t\t\tif( !Optin.step.services.provider_args.isEmpty() && \"mailchimp\" === Optin.step.services.model.get(\"optin_provider\") ){\r\n\t\t\t\t\tvar provider_args_template = Optin.template( \"optin-\" + Optin.step.services.model.get(\"optin_provider\") + \"-args\" );\r\n var provider_args_data = Optin.step.services.provider_args.toJSON();\r\n provider_args_data.cta_button = Optin.step.design.model.get('cta_button');\r\n\t\t\t\t\t$_preview.find(\".wpoi-provider-args\").html( provider_args_template( provider_args_data ) );\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tinit: function() {\r\n\t\t\t\tvar tab = service_tab_view,\r\n\t\t\t\t$form = tab.$(\"#hustle_service_details_form\"),\r\n\t\t\t\t$prev_args = $(\"#wpoi-mailchimp-prev-group-args\"),\r\n\t\t\t\t$_preview = false;\r\n\r\n\t\t\t\t/**\r\n\t\t\t\t* Updates list groups on list change\r\n\t\t\t\t*\r\n\t\t\t\t**/\r\n\t\t\t var update_list_groups = function(e){\r\n\t\t\t\t var $this = $(e.target),\r\n\t\t\t\t\t $wrapper = $('.wpoi-list-groups'),\r\n\t\t\t\t\t $interests_wrapper = $(\".wpoi-list-group-interests-wrap\"),\r\n\t\t\t\t\t data = _.reduce( $form.serializeArray(), function(obj, item){\r\n\t\t\t\t\t\t obj[ item['name'] ] = item['value'];\r\n\t\t\t\t\t\t return obj;\r\n\t\t\t\t\t }, {});\r\n\t \r\n\t\t\t\t data.action = 'hustle_mailchimp_get_list_groups';\r\n\t \r\n\t\t\t\t data._ajax_nonce = $this.data(\"nonce\");\r\n\t \r\n\t\t\t\t //clear provider model\r\n\t\t\t\t Optin.step.services.provider_args.clear({silent: true});\r\n\t\t\t\t $interests_wrapper.empty();\r\n\t\t\t\t $prev_args.empty();\r\n\t \r\n\t\t\t\t $.get( ajaxurl, data)\r\n\t\t\t\t\t .done(function(res){\r\n if( res ){\r\n\t\t\t\t\t\t\t if ( res.success ) {\r\n\t\t\t\t\t\t\t\t\t$wrapper.html( res.data );\r\n\t\t\t\t\t\t\t \t\t$wrapper.find(\"select\").wpmuiSelect();\r\n\t\t\t\t\t\t\t \t\t$('.mailchimp_optin_load_more_lists').show();\r\n\t\t\t\t\t\t\t } else {\r\n\t\t\t\t\t\t\t\t \t$('.mailchimp_optin_load_more_lists').hide();\r\n\t\t\t\t\t\t\t \t\t$wrapper.empty();\r\n\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t });\r\n\t \r\n\t\t\t };\r\n\r\n\t\t\t /**\r\n\t\t\t\t* Updates group interests on group change\r\n\t\t\t\t*\r\n\t\t\t\t**/\r\n\t\t\t var update_group_interests = function(e){\r\n\t \r\n\t\t\t\t var $wrapper = $(\".wpoi-list-group-interests-wrap\"),\r\n\t\t\t\t\t $this = $(e.target),\r\n\t\t\t\t\t data = _.reduce( $form.serializeArray(), function(obj, item){\r\n\t\t\t\t\t\t obj[ item['name'] ] = item['value'];\r\n\t\t\t\t\t\t return obj;\r\n\t\t\t\t\t }, {});\r\n\t \r\n\t\t\t\t if( [\"-1\", \"0\"].indexOf(e.target.value) !== -1 ){ // return if selection is not meaningful\r\n\t\t\t\t\t $wrapper.empty();\r\n\t\t\t\t\t return;\r\n\t\t\t\t }\r\n\t \r\n\t\t\t\t data._ajax_nonce = $this.data(\"nonce\");\r\n\t\t\t\t data.action = 'hustle_mailchimp_get_group_interests';\r\n\t \r\n\t\t\t\t $.get( ajaxurl, data )\r\n\t\t\t\t\t .done(function(res){\r\n\t\t\t\t\t\t if( res && res.success ){\r\n\t \r\n\t\t\t\t\t\t\t $wrapper.html( res.data.html );\r\n\t \r\n\t\t\t\t\t\t\t Optin.step.services.provider_args.set( \"group\", res.data.group );\r\n\t \r\n\t\t\t\t\t\t\t $wrapper.find(\"select\").wpmuiSelect();\r\n\t\t\t\t\t\t\t /**\r\n\t\t\t\t\t\t\t\t* Select all interests\r\n\t\t\t\t\t\t\t\t**/\r\n\t\t\t\t\t\t\t if( res.data.group && res.data.group.groups && _.isArray( res.data.group.groups ) ) {\r\n\t\t\t\t\t\t\t\t var group = Optin.step.services.provider_args.get(\"group\");\r\n\t\t\t\t\t\t\t }\r\n\t \r\n\t\t\t\t\t\t }\r\n\t \r\n\t\t\t\t\t\t if( res && !res.success )\r\n\t\t\t\t\t\t\t $wrapper.empty();\r\n\t\t\t\t\t })\r\n\t\t\t\t\t .fail(function(res){\r\n\t \r\n\t\t\t\t\t });\r\n\t\t\t };\r\n\t \r\n\t\t\t var update_selected_group_interests = function(e){\r\n\t\t\t\t var $this = $(e.target),\r\n\t\t\t\t\t val;\r\n\t \r\n\t\t\t\t if( $this.is(\":radio\") || $this.is(\"select\") )\r\n\t\t\t\t\t val = $this.val();\r\n\t \r\n\t\t\t\t if( $this.is(\":checkbox\") ){\r\n\t\t\t\t\t val = [];\r\n\t\t\t\t\t $( \"[name='\" + e.target.name + \"'\" ).filter( \":checked\" ).each(function(){\r\n\t\t\t\t\t\t val.push( this.value );\r\n\t\t\t\t\t });\r\n\t \r\n\t\t\t\t }\r\n \r\n\t\t\t\t Optin.step.services.provider_args.set( \"group\", _.extend( {}, Optin.step.services.provider_args.get(\"group\"), {\r\n\t\t\t\t\t selected: val\r\n\t\t\t\t }) );\r\n\t\t\t };\r\n\t\t\t \r\n\t\t\t\tvar unselect_radio_interest = function(e){\r\n\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t$(\"[name='mailchimp_groups_interests']\").prop(\"checked\", false);\r\n\t\t\t\t\tOptin.step.services.provider_args.set( \"group\", _.extend( {}, Optin.step.services.provider_args.get(\"group\"), {\r\n\t\t\t\t\t\tselected: []\r\n\t\t\t\t\t}) );\r\n\t\t\t\t};\r\n \r\n /**\r\n\t\t\t\t * Load more lists\r\n\t\t\t\t * @param {*} e \r\n\t\t\t\t */\r\n\t\t\t\tvar load_more_lists = function(e){\r\n\t\t\t\t\tvar $this = $(e.target),\r\n\t\t\t\t\t\t$form = $this.closest(\"form\"),\r\n\t\t\t\t\t\t$box = $(\".wpoi-box\"),\r\n\t\t\t\t\t\tdata = $form.serialize(),\r\n\t\t\t\t\t\t$placeholder = $(\"#optin_new_provider_account_options\");\r\n\r\n\r\n\t\t\t\t\t$(\"#wpoi-mailchimp-prev-group-args\").empty();\r\n\r\n\t\t\t\t\t$placeholder.html( $( \"#wpoi_loading_indicator\" ).html() );\r\n\r\n\t\t\t\t\tdata += \"&action=refresh_provider_account_details&load_more=true\";\r\n\t\t\t\t\tdata += \"&optin=mailchimp\";\r\n\t\t\t\t\t$box.find(\"*\").attr(\"disabled\", true);\r\n\r\n\t\t\t\t\t/**\r\n\t\t\t\t\t * Silently clear the args untill they are filled again\r\n\t\t\t\t\t */\r\n\t\t\t\t\tOptin.step.services.provider_args.clear({silent: true});\r\n\t\t\t\t\tOptin.step.services.model.set( \"optin_mail_list\", \"none\" );\r\n\r\n\t\t\t\t\t$.post(ajaxurl, data, function( response ){\r\n\r\n\t\t\t\t\t\t$box.find(\"*\").attr(\"disabled\", false);\r\n\r\n\t\t\t\t\t\tif( response.success === true ){\r\n\r\n\t\t\t\t\t\t\tif( response.data.redirect_to ){\r\n\t\t\t\t\t\t\t\twindow.location.href = response.data.redirect_to;\r\n\t\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\t\tif ( ! response.data ) {\r\n\t\t\t\t\t\t\t\t\t$placeholder.html( optin_vars.messages.something_went_wrong );\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t$placeholder.html( response.data );\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t$(\".mailchimp_optin_email_list\").wpmuiSelect();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif ( ! response.data ) {\r\n\t\t\t\t\t\t\t\t$placeholder.html( optin_vars.messages.something_went_wrong );\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$placeholder.html( response.data );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}).fail(function( response ) {\r\n\t\t\t\t\t\t$placeholder.html( optin_vars.messages.something_went_wrong );\r\n\t\t\t\t\t});\r\n\t\t\t\t};\r\n\r\n\t\t\t\t$(doc).on(\"change\", \"#optin_email_list.mailchimp_optin_email_list\", update_list_groups );\r\n\t\t\t\t$(doc).on(\"change\", \"#mailchimp_groups\", update_group_interests );\r\n\t\t\t\t$(doc).on(\"change\", \"[name='mailchimp_groups_interests'], [name='mailchimp_groups_interests[]']\", update_selected_group_interests );\r\n\t\t\t\t$(doc).on(\"click\", \".wpoi-leave-group-intrests-blank-radios\", unselect_radio_interest);\r\n $(doc).on(\"click\", \".mailchimp_optin_load_more_lists\", load_more_lists);\r\n\t\t\t\tOptin.Events.on(\"design:preview:render:finish\", $.proxy( this, 'render_in_previewr' ) );\r\n\t\t\t}\r\n\t\t});\r\n\t});\r\n}(jQuery,document));","(function($){\r\n\t'use strict';\r\n\r\n\tOptin.Mixins.add_services_mixin( 'mautic', function() {\r\n\t\treturn new Optin.Provider({\r\n\t\t\tid: 'mautic',\r\n\t\t\tprovider_args: {\r\n\t\t\t\turl: '#optin_url',\r\n\t\t\t\tusername: '#optin_username',\r\n\t\t\t\tpassword: '#optin_password'\r\n\t\t\t},\r\n\t\t\terrors: {\r\n\t\t\t\turl: {\r\n\t\t\t\t\tname: 'optin_url',\r\n\t\t\t\t\tmessage: optin_vars.messages.mautic.enter_url,\r\n\t\t\t\t\ticonClass: 'dashicons-warning-url'\r\n\t\t\t\t},\r\n\t\t\t\tusername: {\r\n\t\t\t\t\tname: 'optin_username',\r\n\t\t\t\t\tmessage: optin_vars.messages.mautic.username,\r\n\t\t\t\t\ticonClass: ''\r\n\t\t\t\t},\r\n\t\t\t\tpassword: {\r\n\t\t\t\t\tname: 'optin_password',\r\n\t\t\t\t\tmessage: optin_vars.messages.mautic.password,\r\n\t\t\t\t\ticonClass: ''\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t});\r\n}(jQuery,document));","/**\r\n * Integration of none-too-complicated providers.\r\n **/\r\n\r\n(function($){\r\n\t'use strict';\r\n\r\n\tvar providers = ['getresponse', 'campaignmonitor', 'constantcontact', 'aweber'];\r\n\r\n\t_.each( providers, function( provider ) {\r\n\t\tOptin.Mixins.add_services_mixin( provider, function() {\r\n\t\t\treturn new Optin.Provider({id: provider});\r\n\t\t});\r\n\t});\r\n}(jQuery,document));","(function($,doc){\r\n\t'use strict';\r\n\r\n Optin.Mixins.add_services_mixin( 'sendinblue', function( service_tab_view ) {\r\n return new Optin.Provider({\r\n\t\t\tid: 'sendinblue',\r\n\t\t\tprovider_args: {email_list: '#optin_email_list'},\r\n\t\t\terrors: {\r\n\t\t\t\temail_list: {\r\n\t\t\t\t\tname: 'optin_email_list',\r\n\t\t\t\t\tmessage: optin_vars.messages.infusionsoft.enter_account_name,\r\n\t\t\t\t\ticonClass: 'dashicons-warning-account_name'\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\r\n init: function() {\r\n\r\n\t\t\t\t/**\r\n\t\t\t\t * Load more lists\r\n\t\t\t\t * @param {*} e \r\n\t\t\t\t */\r\n\t\t\t\tvar load_more_lists = function(e){\r\n\t\t\t\t\tvar $this = $(e.target),\r\n\t\t\t\t\t\t$form = $this.closest(\"form\"),\r\n\t\t\t\t\t\t$box = $(\"#wpoi-wizard-services\"),\r\n\t\t\t\t\t\tdata = $form.serialize(),\r\n\t\t\t\t\t\t$placeholder = $(\"#optin_new_provider_account_options\");\r\n\r\n\r\n\t\t\t\t\t$(\"#wpoi-sendinblue-prev-group-args\").empty();\r\n\r\n\t\t\t\t\t$placeholder.html( $( \"#wpoi_loading_indicator\" ).html() );\r\n\r\n\t\t\t\t\tdata += \"&action=refresh_provider_account_details&load_more=true\";\r\n\t\t\t\t\tdata += \"&optin=sendinblue\";\r\n\t\t\t\t\t$box.find(\"input,select,button\").attr(\"disabled\", true);\r\n\r\n\t\t\t\t\t/**\r\n\t\t\t\t\t * Silently clear the args untill they are filled again\r\n\t\t\t\t\t */\r\n\t\t\t\t\tOptin.step.services.provider_args.clear({silent: true});\r\n\t\t\t\t\tOptin.step.services.model.set( \"optin_mail_list\", \"none\" );\r\n\r\n\t\t\t\t\t$.post(ajaxurl, data, function( response ){\r\n\r\n\t\t\t\t\t\t$box.find(\"input,select,button\").attr(\"disabled\", false);\r\n\r\n\t\t\t\t\t\tif( response.success === true ){\r\n\r\n\t\t\t\t\t\t\tif( response.data.redirect_to ){\r\n\t\t\t\t\t\t\t\twindow.location.href = response.data.redirect_to;\r\n\t\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\t\tif ( ! response.data ) {\r\n\t\t\t\t\t\t\t\t\t$placeholder.html( optin_vars.messages.something_went_wrong );\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t$placeholder.html( response.data );\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t$(\".sendinblue_optin_email_list\").wpmuiSelect();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif ( ! response.data ) {\r\n\t\t\t\t\t\t\t\t$placeholder.html( optin_vars.messages.something_went_wrong );\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$placeholder.html( response.data );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}).fail(function( response ) {\r\n\t\t\t\t\t\t$placeholder.html( optin_vars.messages.something_went_wrong );\r\n\t\t\t\t\t});\r\n\t\t\t\t};\r\n\r\n\t\t\t\t$(doc).on(\"click\", \".sendinblue_optin_load_more_lists\", load_more_lists);\r\n }\r\n\t\t});\r\n });\r\n}(jQuery,document));","(function($){\r\n\t'use strict';\r\n\r\n\tOptin.Mixins.add_services_mixin( 'sendy', function() {\r\n\t\treturn new Optin.Provider({\r\n\t\t\tid: 'sendy',\r\n\t\t\tprovider_args: {installation_url: '#optin_sendy_installation_url'},\r\n\t\t\terrors: {\r\n\t\t\t\tinstallation_url: {\r\n\t\t\t\t\tname: 'optin_sendy_installation_url',\r\n\t\t\t\t\tmessage: optin_vars.messages.sendy.enter_url,\r\n\t\t\t\t\ticonClass: 'dashicons-warning-url'\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t});\r\n}(jQuery,document));","Hustle.define(\"Optin.Wizard\", function($){\r\n \"use strict\";\r\n\r\n return Backbone.View.extend({\r\n el: \"#wpoi-wizard\",\r\n events: {\r\n \"click .next-button button.wph-button-save\": \"save\",\r\n \"click .next-button button.wph-button-next\": \"save\",\r\n \"click .next-button button.wph-button-finish\": \"save\",\r\n \"click .wph-toggletabs--title.can-open\": \"toggle_section\",\r\n \"click .js-wph-optin-cancel\": \"cancel\",\r\n \"click .js-wph-optin-back\": \"back\",\r\n },\r\n toggle_section: function(e){\r\n var $this = this.$(e.target),\r\n $panel = $this.closest(\".wph-toggletabs\");\r\n\t\t\t\r\n\t\t\t$('.wph-toggletabs').not($panel).removeClass('wph-toggletabs--open');\r\n $panel.toggleClass(\"wph-toggletabs--closed wph-toggletabs--open\");\r\n },\r\n\t\tvalidate: function() {\r\n\t\t\tvar errors = 0;\r\n\r\n\t\t\t\r\n\t\t\tif ( ! this.$('#optin_new_name' ).val() ) {\r\n\t\t\t\terrors++;\r\n\t\t\t}\r\n\t\t\tif ( ! this.$('#optin_new_provider_name').val()\r\n\t\t\t\t&& ( ! this.$('#wpoi-test-mode-setup').is(':checked')\r\n\t\t\t\t\t&& ! this.$('#wpoi-save-to-local').is(':checked') ) ) {\r\n\t\t\t\terrors++;\r\n\t\t\t}\r\n\r\n\t\t\treturn errors;\r\n\t\t},\r\n save: function(e){\r\n e.preventDefault();\r\n\t\t\tHustle.Events.trigger(\"Optin.save\");\r\n \r\n var errors = Optin.step.services.errors,\r\n\t\t\t\tme = this,\r\n $this = this.$(e.target).closest(\"button\"),\r\n nonce = $this.data(\"nonce\"),\r\n id = Optin.step.services.model.get(\"optin_id\") || -1,\r\n is_new = id == -1 ? true: false;\r\n\r\n\t\t\tif ( this.validate() > 0 || errors > 0 ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t$this.attr(\"disabled\", true);\r\n\t\t\tif ( $this.hasClass(\"wph-button-next\") || $this.hasClass(\"wph-button-finish\") ) {\r\n\t\t\t\t$this.addClass(\"wph-button-next--loading\");\r\n\t\t\t} else {\r\n\t\t\t\t$this.addClass(\"wph-button-save--loading\");\r\n\t\t\t}\r\n\t\t\t$this.siblings().attr(\"disabled\", true);\r\n\r\n $.ajax({\r\n type: \"POST\",\r\n url: ajaxurl,\r\n data: {\r\n action: 'inc_opt_save_new',\r\n id: id,\r\n _ajax_nonce: nonce,\r\n optin: Optin.step.services.model.toJSON(),\r\n design: Optin.step.design.model.toJSON(),\r\n settings: Optin.step.display.model.toJSON(),\r\n provider_args: Optin.step.services.provider_args.toJSON()\r\n },\r\n complete: function(){\r\n\t\t\t\t\tOptin.hasChanges = false;\r\n\r\n $this.attr( \"disabled\", false )\r\n .removeClass( \"wph-button-next--loading\" )\r\n .removeClass( \"wph-button-save--loading\" );\r\n\t\t\t\t\t$this.siblings().attr(\"disabled\", false);\r\n if ( $this.hasClass(\"wph-button-next\") ) me.next(e);\r\n if ( $this.hasClass(\"wph-button-finish\") ) me.finish_setup(e);\r\n },\r\n success: function(res){\r\n\r\n if( !res.success ) return;\r\n\r\n Optin.step.services.model.set(\"optin_id\", res.data );\r\n\t\t\t\t\tOptin.hasChanges = false;\r\n \r\n var currUrl = window.location.pathname + window.location.search;\r\n if ( is_new && currUrl.indexOf('&optin=') === -1 ) {\r\n currUrl += '&optin=' + res.data;\r\n window.history.replaceState( {} , '', currUrl );\r\n }\r\n }\r\n });\r\n },\r\n\t\tnext: function(e){\r\n\t\t\tvar $this = this.$(e.target),\r\n $current_panel = $this.closest(\".wph-toggletabs\"),\r\n $next_panels = $current_panel.nextAll(\".wph-toggletabs\")\r\n\t\t\t;\r\n\t\t\tif( $next_panels.length ) {\r\n\t\t\t\tvar $_next = $next_panels.eq(0);\r\n\r\n\t\t\t\t$current_panel\r\n\t\t\t\t\t.removeClass( \"wph-toggletabs--open\" )\r\n\t\t\t\t\t.addClass(\"wph-toggletabs--closed\");\r\n\r\n\t\t\t\t$_next\r\n\t\t\t\t\t.addClass(\"wph-toggletabs--open\");\r\n\r\n\r\n\t\t\t\t$('html, body').animate({\r\n\t\t\t\t\tscrollTop: $_next.offset().top\r\n\t\t\t\t}, 700);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t},\r\n cancel: function(e){\r\n e.preventDefault();\r\n window.onbeforeunload = null;\r\n window.location.replace( \"?page=inc_optin_listing\" );\r\n },\r\n\t\tfinish_setup: function(e){\r\n\t\t\te.preventDefault();\r\n\t\t\tvar id = Optin.step.services.model.get(\"optin_id\") || -1,\r\n is_new = id == -1 ? true: false\r\n\t\t\t;\r\n\t\t\t\r\n\t\t\twindow.onbeforeunload = null;\r\n\t\t\tvar url = \"?page=inc_optin_listing\";\r\n\t\t\tif(is_new) {\r\n\t\t\t\turl += \"&optin=\" + id;\r\n\t\t\t}else{\r\n\t\t\t\turl += \"&optin_updated=\" + id;\r\n\t\t\t}\r\n\t\t\twindow.location.replace( url );\r\n\t\t},\r\n back: function(e){\r\n e.preventDefault();\r\n var $this = this.$(e.target),\r\n $current_panel = $this.closest(\".wph-toggletabs\"),\r\n $next_panel = $current_panel.prevAll(\".wph-toggletabs\"),\r\n $_prev_panel = $next_panel.first();\r\n\t\t\t\t\r\n $current_panel.removeClass(\"wph-toggletabs--open\");\r\n $_prev_panel.addClass(\"wph-toggletabs--open\");\r\n $('html, body').animate({\r\n scrollTop: $_prev_panel.offset().top\r\n }, 700);\r\n }\r\n });\r\n\r\n});","Hustle.define(\"Optin.Email_Services_Tab\", function( $ ) {\r\n \"use strict\";\r\n return Hustle.View.extend( _.extend({}, Hustle.get(\"Mixins.Model_Updater\"), {\r\n template: Hustle.template(\"wpoi-wizard-services_template\"),\r\n el: \"#wpoi-wizard-services\",\r\n events: {\r\n \"click .next-button button\": \"validate\",\r\n 'change #optin_new_provider_name': 'provider_change',\r\n 'click .optin_refresh_provider_details': 'refresh_provider_details'\r\n },\r\n fields : {\r\n name: \"#optin_new_name\",\r\n provider: \"#optin_new_provider_name\",\r\n api_key: \"#optin_api_key\",\r\n mail_list: \"#optin_email_list\",\r\n test_mode: '#wpoi-test-mode-setup',\r\n save_to_local: '#wpoi-save-to-local'\r\n },\r\n init: function(opts){\r\n this.render();\r\n this.provider_args = opts.provider_args;\r\n this.$details_placeholder = $(\"#optin_new_provider_account_details\");\r\n this.$options_placeholder = $(\"#optin_new_provider_account_options\");\r\n this.params = this.get_params();\r\n if( typeof this.params.code != 'undefined' ){\r\n window.setTimeout(function(){\r\n $('#optin_new_provider_name').trigger('change');\r\n }, 750);\r\n\r\n }\r\n\r\n _.each( Optin.Mixins.get_services_mixins(), function(mix, id){\r\n if( mix && typeof mix === \"function\")\r\n this[id] = mix( this );\r\n\r\n }, this );\r\n\r\n //this.listenTo( this.model, \"change\", this.render );\r\n this.listenTo( this.model, \"change:test_mode\", this.toggle_optin_provider_settings );\r\n this.listenTo( this.model, \"change:optin_name\", this.set_shortcode_id );\r\n\r\n return this;\r\n },\r\n render: function(){\r\n\r\n this.$el.html( this.template( this.model.toJSON() ) );\r\n this.toggle_optin_provider_settings();\r\n return this;\r\n },\r\n toggle_optin_provider_settings: function(){\r\n this.$(\".wph-label--notice\").toggleClass( \"hidden\", _.isFalse( this.model.get(\"test_mode\") ) );\r\n this.$(\".wph-label--notice\").siblings().toggleClass( \"hidden\", _.isTrue( this.model.get(\"test_mode\") ) );\r\n this.$(\"#optin_new_provider_name\").prop(\"disabled\", _.isTrue( this.model.get(\"test_mode\") ) );\r\n },\r\n update_model: function(e){\r\n if( e )\r\n e.preventDefault();\r\n\r\n var $container = $('.optwiz-container'),\r\n self = this;\r\n\r\n Optin.step.model = Optin.step.model || new Optin.Model( optin_vars.current.data );\r\n\r\n Optin.step.model.set(\"optin_name\", this.$( this.fields.name ).val() );\r\n\r\n Optin.step.model.set(\"optin_provider\", this.$( this.fields.provider ).val() ) ;\r\n if( this.$(this.fields.api_key) )\r\n Optin.step.model.set(\"api_key\", this.$(this.fields.api_key).val() );\r\n if( this.$( this.fields.mail_list).length )\r\n Optin.step.model.set(\"optin_mail_list\", this.$( this.fields.mail_list ).val() ) ;\r\n Optin.step.model.set(\"test_mode\", this.$( this.fields.test_mode ).is(\":checked\") ? 1 : 0 ) ;\r\n\r\n Optin.step.model.set(\"save_to_local\", this.$( this.fields.save_to_local ).is(\":checked\") ? 1 : 0 ) ;\r\n \r\n this.toggle_optin_provider_settings();\r\n\r\n },\r\n set_shortcode_id: function(){\r\n var shortcode_id = _.isEmpty( Optin.step.model.get(\"optin_name\") ) ? \"\" : Optin.step.model.get(\"optin_name\").toString().toLowerCase().trim().replace(/\\s+/g, \"-\");\r\n Optin.step.display.model.set(\"shortcode_id\", shortcode_id );\r\n },\r\n validate: function(e){\r\n if( e !== undefined ) e.preventDefault();\r\n\r\n Optin.Events.trigger(\"services:validate:before\");\r\n\r\n this.update_model();\r\n\t\t\tOptin.step.services.errors = 0;\r\n\r\n var validation = Optin.step.model.validate_first_step();\r\n\r\n var provider_name = this.$(\"#optin_new_provider_name\").val();\r\n if( provider_name && this[ provider_name ] && typeof this[ provider_name].validate === \"function\" ){\r\n var provider_validation = this[ provider_name].validate.call(this, validation);\r\n validation = _( validation._wrapped.concat( provider_validation._wrapped ) );\r\n\r\n }\r\n\r\n if( !validation.size()\r\n || ( this.$( this.fields.test_mode ).is(\":checked\") && !_.isEmpty( this.$(this.fields.name).val() ) )\r\n || ( this.$( this.fields.save_to_local ).is(\":checked\") && !_.isEmpty( this.$(this.fields.name).val() ) )\r\n ){\r\n // Only perform navigation if a tab was actually clicked. The validate() function may also be called from somewhere else\r\n if( e !== undefined ) {\r\n Optin.router.navigate(\"design\", true);\r\n }\r\n }else{\r\n var _this = this;\r\n this.$el.find( \"span.dashicons-warning\" ).remove();\r\n validation.each(function(error, index){\r\n var $icon = $('<span class=\"dashicons dashicons-warning\"></span>'),\r\n $field = _this.$( _this.fields[error.name] );\r\n \r\n\t\t\t\t\tif ( ! $field.length ) {\r\n\t\t\t\t\t\t// If field element is not found, return\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\r\n $icon.attr(\"title\", error.message);\r\n\r\n if( $field.hasClass('wdev-styled') )\r\n $field.closest('.select-container').addClass( \"wpoi-error\" );\r\n else\r\n $field.addClass( \"wpoi-error\" );\r\n\r\n if( $field.closest(\".select-container\").length )\r\n $field.closest(\".select-container\").before( $icon );\r\n else\r\n $field.after( $icon );\r\n\r\n });\r\n }\r\n\r\n Optin.Events.trigger(\"services:validate:after\");\r\n },\r\n get_params: function( ) {\r\n var url = location.search;\r\n var ampersand = \"&\";\r\n return _.chain(url.slice(1).split( ampersand ))\r\n .map(function (item) { if (item) { return item.split('='); } })\r\n .compact()\r\n .object()\r\n .value();\r\n },\r\n provider_change: function(e){\r\n\r\n var self = this,\r\n\t\t\t\tserviceId = $(e.currentTarget).val(),\r\n\t\t\t\tdetailsContainer = $( '#wpoi-email-provider-details-container' );\r\n\r\n\t\t\tif ( ! serviceId ) {\r\n\t\t\t\tdetailsContainer.hide();\r\n\t\t\t\treturn;\r\n\t\t\t} else {\r\n\t\t\t\tdetailsContainer.show();\r\n\t\t\t}\r\n\r\n this.$details_placeholder.html(\"\");\r\n this.$options_placeholder.html(\"\");\r\n this.remove_prev_provider_args();\r\n\r\n $.ajax({\r\n url: ajaxurl,\r\n type: \"get\",\r\n async: true,\r\n data: {\r\n action: \"render_provider_account_options\",\r\n provider_id: e.target.value,\r\n _ajax_nonce: $(e.target).data(\"nonce\"),\r\n optin: self.model.get(\"optin_id\")\r\n },\r\n success: function(response){\r\n if( response.success === true ){\r\n\r\n self.$details_placeholder.html( response.data );\r\n\r\n if( e.target.value == 'constantcontact' && typeof self.params.code != 'undefined' ) {\r\n $('#optin_api_key').val(self.params.code);\r\n $('.optin_refresh_provider_details').trigger('click');\r\n }\r\n self.delegateEvents();\r\n\t\t\t\t\t\tHustle.Events.trigger(\"view.rendered\", self);\r\n\r\n }else{\r\n var html = \"\";\r\n if( response.data && _.isArray( response.data ) )\r\n html = response.data.join(\", \");\r\n\r\n self.$details_placeholder.html( html );\r\n }\r\n\r\n }\r\n\r\n });\r\n },\r\n /**\r\n * Gets provider account option details, eg api key and etc and update #optin_new_provider_account_options content\r\n */\r\n refresh_provider_details: function(e){\r\n var self = this,\r\n $this = this.$(e.target),\r\n $form = $this.closest(\"form\"),\r\n $box = this.$(\".wpoi-box\"),\r\n data = $form.serialize(),\r\n $input = $this.closest(\"#wpoi-get-lists\").find(\"input\"),\r\n $placeholder = this.$(\"#optin_new_provider_account_options\");\r\n\r\n if(_.isEmpty( $input.val() ) ){\r\n return e.preventDefault();\r\n }\r\n\r\n this.remove_prev_provider_args();\r\n\r\n $placeholder.html( this.$( \"#wpoi_loading_indicator\" ).html() );\r\n\r\n data += \"&action=refresh_provider_account_details\";\r\n if( typeof self.model.attributes.optin_id !== 'undefined') data += \"&optin=\" + self.model.attributes.optin_id;\r\n\r\n $box.find(\"input,select,button\").attr(\"disabled\", true);\r\n\r\n /**\r\n * Silently clear the args untill they are filled again\r\n */\r\n Optin.step.services.provider_args.clear({silent: true});\r\n Optin.step.services.model.set( \"optin_mail_list\", \"none\" );\r\n\r\n $.post(ajaxurl, data, function( response ){\r\n\r\n $box.find(\"input,select,button\").attr(\"disabled\", false);\r\n\r\n if( response.success === true ){\r\n\r\n if( response.data.redirect_to ){\r\n window.location.href = response.data.redirect_to;\r\n }else {\r\n\t\t\t\t\t\tif ( ! response.data ) {\r\n\t\t\t\t\t\t\t$placeholder.html( optin_vars.messages.something_went_wrong );\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$placeholder.html( response.data );\r\n\t\t\t\t\t\t}\r\n self.$(\"select\").wpmuiSelect();\r\n }\r\n }else{\r\n\t\t\t\t\tif ( ! response.data ) {\r\n\t\t\t\t\t\t$placeholder.html( optin_vars.messages.something_went_wrong );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$placeholder.html( response.data );\r\n\t\t\t\t\t}\r\n }\r\n\r\n }).fail(function( response ) {\r\n $placeholder.html( optin_vars.messages.something_went_wrong );\r\n });\r\n },\r\n remove_prev_provider_args: function(){\r\n var $prev_provider_args = $(\"#wpoi-mailchimp-prev-group-args\");\r\n $prev_provider_args.empty();\r\n }\r\n })\r\n );\r\n});\r\n","\r\nHustle.define(\"Optin.Design_Tab\", function( $ ) {\r\n \"use strict\";\r\n\r\n\tvar ModuleField = Hustle.View.extend({\r\n\t\ttemplate: Hustle.template( 'wpoi-module-field' ),\r\n\t\ttagName: 'tr',\r\n\t\toptions: {},\r\n\t\tcontroller: false,\r\n\t\tevents: {\r\n\t\t\t'change [name]': 'updateOptions',\r\n\t\t\t'click .wph-column-icon': 'removeModule'\r\n\t\t},\r\n\t\tinitialize: function( data ) {\r\n\t\t\tthis.options = data.options;\r\n\t\t\tthis.controller = data.controller;\r\n\t\t\tthis.field_container = this.controller.$('tbody');\r\n\r\n\t\t\tthis.render();\r\n\t\t},\r\n\t\trender: function() {\r\n\t\t\tthis.$el.html( this.template( this.options ) ).attr('data-index', this.options.index);\r\n\t\t\tthis.$el.appendTo( '#wpoi-module-fields' );\r\n\r\n\t\t\tvar me = this,\r\n\t\t\t\toldList = [],\r\n\t\t\t\tsortArgs = {\r\n\t\t\t\titems: 'tr',\r\n\t\t\t\tcontainment: this.controller.$('.wph-table--module_fields table'),\r\n\t\t\t\tstop: function(e, ui) {\r\n\t\t\t\t\tme.reOrderFields();\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\tthis.field_container.sortable(sortArgs).disableSelection();\r\n\t\t},\r\n\t\treOrderFields: function() {\r\n\t\t\tvar me = this, newSet = [];\r\n\r\n\t\t\tthis.field_container.find('tr')\r\n\t\t\t.each(function(i){\r\n\t\t\t\tvar tr = $(this),\r\n\t\t\t\t\t_index = tr.data('index'),\r\n\t\t\t\t\tmodule_field = me.controller.module_fields[_index];\r\n\t\t\t\tmodule_field.index = i;\r\n\t\t\t\tnewSet[i] = module_field;\r\n\t\t\t\ttr.data('index', i);\r\n\t\t\t});\r\n\r\n\t\t\tthis.controller.module_fields = newSet;\r\n\t\t\tthis.controller.model.set('module_fields', newSet);\r\n\t\t},\r\n\t\tupdateOptions: function( e ) {\r\n\t\t\tvar input = $(e.currentTarget),\r\n\t\t\t\tinput_name = input.attr( 'name' ),\r\n\t\t\t\tinput_val = input.val(),\r\n\t\t\t\tprovider = Optin.step.services.model.get('optin_provider');\r\n\r\n\t\t\tif ( 'required' === input_name ) {\r\n\t\t\t\tinput_val = input.is(':checked');\r\n\t\t\t}\r\n\t\t\tthis.options[ input_name ] = input_val;\r\n\r\n\t\t\tif ( provider && optin_vars.providers[ provider ] &&\r\n _.contains( ['name', 'label'], input_name ) ) {\r\n\t\t\t\tOptin.Events.trigger( 'optin:update_module_field_' + provider, this.options, this, this.controller.optin.toJSON().optin_id );\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tthis._updateOptions();\r\n\t\t},\r\n\t\t_updateOptions: function() {\r\n\t\t\tthis.controller.module_fields[ this.options.index ] = this.options;\r\n\t\t\tthis.controller.model.set( 'module_fields', this.controller.module_fields );\r\n\t\t},\r\n\t\tremoveModule: function() {\r\n\t\t\tvar me = this,\r\n\t\t\t\tfield_key = 0\r\n\t\t\t;\r\n\t\t\tthis.controller.module_fields = _.filter(this.controller.module_fields, function(field){\r\n\t\t\t\tif ( field.name != me.options.name ) {\r\n\t\t\t\t\tfield.index = field_key;\r\n\t\t\t\t\tfield_key++;\r\n\t\t\t\t\treturn field;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tthis.controller.model.set( 'module_fields', this.controller.module_fields );\r\n\t\t\tthis.remove();\r\n\t\t}\r\n\t});\r\n\r\n return Hustle.View.extend( _.extend({}, Hustle.get(\"Mixins.Model_Updater\"), {\r\n template: Hustle.template(\"wpoi-wizard-design_template\"),\r\n\t\tmessage_editor: false,\r\n\t\tsuccess_editor: false,\r\n structure_tpl: Hustle.template(\"wpoi-wizard-design_structure_template\"),\r\n\t\tmodule_fields_tpl: Hustle.template(\"wpoi-wizard-design_module_fields_template\"),\r\n shapes_tpl: Hustle.template(\"wpoi-wizard-design_shapes_template\"),\r\n after_submit_tpl: Hustle.template(\"wpoi-wizard-design_after_submit_template\"),\r\n color_pickers_tpl: Hustle.template(\"optin-color-pickers\"),\r\n el: \"#wpoi-wizard-design\",\r\n preview: false,\r\n preview_model: false,\r\n defaults: {\r\n optin_input_icons: \"\"\r\n },\r\n\t\tmodule_index: 0,\r\n stylable_elements:{\r\n main_background: '.wpoi-hustle .wpoi-optin',\r\n title_color: '.wpoi-hustle h2.wpoi-title',\r\n link_color: '.wpoi-hustle .wpoi-message p a',\r\n content_color: '.wpoi-hustle .wpoi-message, .wpoi-hustle .wpoi-message p',\r\n link_hover_color: '.wpoi-hustle .wpoi-message p a:hover',\r\n link_active_color: '.wpoi-hustle .wpoi-message p a:active, .wpoi-hustle .wpoi-message p a:focus',\r\n form_background: '.wpoi-hustle .wpoi-form',\r\n fields_background: '.wpoi-hustle form .wpoi-element',\r\n fields_hover_background: '.wpoi-hustle form .wpoi-element:hover',\r\n fields_active_background: '.wpoi-hustle form .wpoi-element:active, .wpoi-hustle form .wpoi-element:focus',\r\n label_color: '.wpoi-hustle form .wpoi-element label, .wpoi-hustle form .wpoi-element label span, .wpoi-hustle form .wpoi-element .wphi-font',\r\n button_background: '.wpoi-hustle form button',\r\n button_label: '.wpoi-hustle form button',\r\n fields_color: '.wpoi-hustle form > .wpoi-element input',\r\n fields_hover_color: '.wpoi-hustle form > .wpoi-element input:hover',\r\n fields_active_color: '.wpoi-hustle form > .wpoi-element input:active, .wpoi-hustle form > .wpoi-element input:focus',\r\n error_color: '.wpoi-hustle form .i-error, .wpoi-hustle form .i-error + span',\r\n button_hover_background: '.wpoi-hustle form button:hover',\r\n button_active_background: '.wpoi-hustle form button:active, .wpoi-hustle form button:focus',\r\n button_hover_label: '.wpoi-hustle form button:hover',\r\n button_active_label: '.wpoi-hustle form button:active, .wpoi-hustle form button:focus',\r\n checkmark_color: '.wpoi-hustle .wpoi-success-message .wphi-font',\r\n success_color: '.wpoi-hustle .wpoi-success-message .wpoi-content, .wpoi-hustle .wpoi-success-message .wpoi-content p',\r\n close_color: 'a.inc-opt-close-btn, a.inc-opt-close-btn:visited',\r\n nsa_color: '.wpoi-nsa > a, .wpoi-nsa > a.inc_opt_never_see_again',\r\n overlay_background: '.wpoi-popup-overlay',\r\n close_hover_color: 'a.inc-opt-close-btn:hover',\r\n nsa_hover_color: '.wpoi-nsa > a:hover, .wpoi-nsa > a.inc_opt_never_see_again:hover',\r\n nsa_active_color: '.wpoi-nsa > a:active, .wpoi-nsa > a.inc_opt_never_see_again:active, .wpoi-nsa > a:focus, .wpoi-nsa > a.inc_opt_never_see_again:focus',\r\n radio_background: '.wpoi-hustle form .wpoi-mcg-option input[type=\"radio\"] + label:before',\r\n radio_checked_background: '.wpoi-hustle form .wpoi-mcg-option input[type=\"radio\"]:checked + label:after',\r\n checkbox_background: '.wpoi-hustle form .wpoi-mcg-option input[type=\"checkbox\"] + label:before',\r\n checkbox_checked_color: '.wpoi-hustle form .wpoi-mcg-option input[type=\"checkbox\"]:checked + label:before',\r\n mcg_title_color: '.wpoi-hustle form .wpoi-mcg-list-name, .wpoi-hustle .wpoi-submit-failure',\r\n mcg_label_color: '.wpoi-hustle form .wpoi-mcg-option input[type=\"checkbox\"] + label, .wpoi-hustle form .wpoi-mcg-option input[type=\"radio\"] + label',\r\n close_active_color: 'a.inc-opt-close-btn:active, a.inc-opt-close-btn:focus',\r\n },\r\n events: {\r\n 'click .wph-preview--eye': \"open_preview\",\r\n \"change #optin_color_palettes\": \"update_color_palette\",\r\n \"submit form.wpoi-form-wrap\": \"cancel_dummy_optin_submit\",\r\n\t\t\t\"change #optin-active-css\": \"toggleCustomCSS\",\r\n \"click #optin_apply_custom_css\": 'apply_custom_css',\r\n \"click .wph-triggers--options label\": 'handle_triggers',\r\n \"mouseenter .wpoi-stylable-element\": \"highlight_stylable_element\",\r\n \"mouseleave .wpoi-stylable-element\": \"highlight_stylable_element\",\r\n \"click .wpoi-stylable-element\": \"insert_stylable_element\",\r\n \"change #optin_fname\": \"update_optional_elements\",\r\n \"change #optin_lname\": \"update_optional_elements\",\r\n\t\t\t'change #optin_customize_color_palette': '_toggleColorScheme',\r\n\t\t\t'change [name=\"on_success\"]': 'updateMeta',\r\n\t\t\t'change [name=\"on_success_time\"]': 'updateMeta',\r\n\t\t\t'change [name=\"on_success_unit\"]': 'updateMeta',\r\n\t\t\t'change .wysiwyg-tab': 'toggleSuccessMessageFields',\r\n\t\t\t'click .add-new-module-field': 'newModuleField',\r\n\t\t\t'click .wph-cancel-add-field': 'cancelAddField',\r\n\t\t\t'click .wph-add-new-field': 'addNewField',\r\n\t\t\t'keyup [data-name=\"label\"]': 'removeWarningIcons',\r\n\t\t\t'keyup [data-name=\"name\"]': 'removeWarningIcons'\r\n },\r\n stylables: {\r\n \".wpoi-hustle .wpoi-optin \": \"Opt-in Container\",\r\n \".wpoi-title \": \"Title\",\r\n \".wpoi-message, .wpoi-message p \": \"Content\",\r\n \".wpoi-form \": \"Form Container\",\r\n \".wpoi-form .wpoi-subscribe-fname \": \"First Name\",\r\n \".wpoi-form .wpoi-subscribe-lname \": \"Last Name\",\r\n \".wpoi-form .wpoi-subscribe-email \": \"Email\",\r\n \".wpoi-form .wpoi-subscribe-send \": \"Form Button\"\r\n },\r\n init: function( options ){\r\n this.optin = options.optin;\r\n\r\n this.listenTo(this.model, \"change\", this.render_structure);\r\n this.listenTo(this.model, \"change:colors.customize\", this.render_color_pickers);\r\n this.listenTo(this.model, \"change:borders.fields_style\", this.render_shapes );\r\n this.listenTo( this.model, \"change:on_submit\", this.render_on_submit );\r\n this.listenTo( this.model, \"change:image_style\", this.update_image_style );\r\n this.listenTo( this.model, \"change:image_src\", this.update_image_style );\r\n\r\n this.listenTo( this.model, \"change:form_location\", this.set_proper_image_location );\r\n\t\t\tthis.listenTo( Hustle.Events, \"Optin.save\", this.sync_model_data );\r\n\t\t\tthis.listenTo( Hustle.Events, \"Optin.preview.changed.type\", this.preview_type_changed );\r\n\r\n return this.render();\r\n },\r\n render: function(){\r\n this.$el.html( this.template( _.extend({}, { palettes: Palettes.toJSON() }, { stylables: this.stylables }, this.optin.toJSON(), this.model.toJSON() ) ) );\r\n\r\n this.render_structure();\r\n\t\t\tthis.render_module_fields();\r\n this.render_shapes();\r\n this.render_on_submit();\r\n\r\n this.create_editors();\r\n this.update_styles();\r\n this.update_borders_style();\r\n this.render_color_pickers();\r\n this.render_image_holder();\r\n this.update_image_style();\r\n this.apply_custom_css();\r\n\r\n },\r\n render_structure: function(){\r\n this.$(\"#wph-optin--structure\").html( this.structure_tpl( this.model.toJSON() ) );\r\n },\r\n\t\trender_module_fields: function() {\r\n\t\t\tthis.$('#wph-optin--module-fields').html( this.module_fields_tpl( this.model.toJSON() ) );\r\n\r\n\t\t\t// Iterate module fields\r\n\t\t\tthis.module_fields = this.model.get( 'module_fields' );\r\n\r\n\t\t\tif ( ! this.module_fields ) {\r\n\t\t\t\tthis.module_fields = optin_vars.module_fields;\r\n\t\t\t}\r\n\r\n\t\t\t_.each( this.module_fields, function( field ) {\r\n\t\t\t\tfield.index = this.module_index;\r\n\t\t\t\tvar m_field = new ModuleField({\r\n\t\t\t\t\toptions: field,\r\n\t\t\t\t\tcontroller: this\r\n\t\t\t\t});\r\n\t\t\t\tthis.module_index += 1;\r\n\t\t\t}, this );\r\n\t\t},\r\n\t\thandle_triggers: function(e){\r\n\t\t\tvar $this = $(e.target),\r\n\t\t\t\t$selected_li = $this.closest('li'),\r\n\t\t\t\t$siblings = $selected_li.siblings()\r\n\t\t\t;\r\n\t\t\t$siblings.removeClass('current');\r\n\t\t\t$selected_li.addClass('current');\r\n\t\t},\r\n render_shapes: function(){\r\n\t\t\tvar json_data = this.model.toJSON();\r\n\t\t\tjson_data.wph_disabled = '';\r\n\t\t\tif ( this.model.get('borders.fields_style') === 'joined' ) {\r\n\t\t\t\tjson_data.wph_disabled = 'disabled';\r\n\t\t\t}\r\n this.$(\"#wph-optin--shapes\").html( this.shapes_tpl( json_data ) );\r\n\t\t\tHustle.Events.trigger(\"view.rendered\", this.$(\"#wph-optin--shapes\"));\r\n this.create_color_pickers();\r\n },\r\n render_on_submit: function(){\r\n // this.$(\"#wph-optin--after_submitting\").html( this.after_submit_tpl( this.model.toJSON() ) );\r\n if( \"success_message\" == this.model.get(\"on_submit\") ){\r\n this.$(\"label[for='wpoi-sm']\").show();\r\n }else{\r\n this.$(\"label[for='wpoi-sm']\").hide();\r\n this.$(\"label[for='wpoi-om']\").click();\r\n }\r\n },\r\n update_image_style: function() {\r\n var img_src = this.model.get('image_src'),\r\n img_style = this.model.get('image_style'),\r\n $img = this.$(\".wph-media--holder .wph-media--preview\");\r\n \r\n if ( img_src.trim() && $img.length ) {\r\n $img.css( 'background-size', img_style );\r\n }\r\n },\r\n create_color_pickers: function(){\r\n this.$(\".optin_color_picker\").not(\".wp-color-picker\").wpColorPicker({\r\n change: function(event, ui){\r\n var $this = $(this);\r\n $this.val( ui.color.toCSS()).trigger(\"change\");\r\n }\r\n });\r\n },\r\n render_image_holder: function(){\r\n var Media_Holder = Hustle.get(\"Media_Holder\");\r\n this.media_holder = new Media_Holder({\r\n model: this.model,\r\n attribute: \"image_src\"\r\n });\r\n\r\n this.$(\".wph-media--holder\").html( this.media_holder.$el );\r\n },\r\n cancel_dummy_optin_submit: function(e){\r\n e.preventDefault();\r\n },\r\n update_color_palette: function(e){\r\n var palette = Palettes.findWhere({ \"_id\": e.target.value }),\r\n prev_val = this.model.get(\"colors\").toJSON(),\r\n Model = Hustle.get(\"Models.M\");\r\n this.model.set(\"colors\", new Model( _.extend({}, palette.toJSON(), {palette: e.target.value } ) ) );\r\n this.$(\"#optin_customize_color_palette\").prop(\"checked\", false);\r\n this.render_color_pickers();\r\n },\r\n //reset_color_pickers: function(){\r\n // var self = this;\r\n // this.$('#optwiz-custom_color .optin_color_picker').each(function(){\r\n // var $this = $(this),\r\n // id = this.id,\r\n // field_name = id.replace(\"optin_\", \"\"),\r\n // colors = self.model.get(\"colors\");\r\n //\r\n // if($this.data(\"wpColorPicker\") || $this.data(\"wpWpColorPicker\") )\r\n // $this.wpColorPicker(\"color\", colors.get(field_name));\r\n //\r\n // });\r\n //},\r\n render_color_pickers: function(){\r\n var $el = this.$('#optwiz-custom_color');\r\n if( _.isTrue( this.model.get(\"colors.customize\") ) ){\r\n $el.html( this.color_pickers_tpl( this.model.toJSON() ) )\r\n .removeClass(\"hidden\");\r\n }else{\r\n $el.addClass(\"hidden\");\r\n }\r\n\r\n this.create_color_pickers();\r\n },\r\n // Layout #3\r\n // Set height of image container same to parent div\r\n // This to avoid Safari conflicts with [ height: 100% ]\r\n _fix_layout_3_sizes: function(){\r\n $(\".wpoi-layout-three .wpoi-optin:not(.wpoi-small) .nocontent:not(.noimage)\").each(function(){\r\n var $this = $(this),\r\n $parent = $this.find(\".wpoi-aside-x\").prev(\".wpoi-element\"),\r\n $child = $this.find(\".wpoi-aside-x\").prev(\".wpoi-element\").find(\".wpoi-container.wpoi-col\");\r\n $child.css(\"height\", $parent.height());\r\n });\r\n\r\n // Vertical align content\r\n $(\".wpoi-layout-three .wpoi-optin:not(.wpoi-small) > .wpoi-container.noimage:not(.nocontent)\").each(function(){\r\n var $this = $(this),\r\n $aside = $this.find(\".wpoi-aside-x\"),\r\n $div = $this.find(\".wpoi-image\").next(\".wpoi-element\"),\r\n $element = $aside.prev(\".wpoi-element\"),\r\n $content = $this.find(\".wpoi-content\"),\r\n $col = $element.find(\".wpoi-col\"),\r\n $form = $this.find(\"form\");\r\n\r\n if ( $form.height() > $content.height() ){\r\n $col.css(\"height\", $aside.height() + 'px' );\r\n $div.addClass(\"wpoi-align\");\r\n $content.addClass(\"wpoi-align-element\");\r\n }\r\n if ( $form.height() < $content.height() ){\r\n $aside.css(\"height\", $element.height() + 'px');\r\n $aside.addClass(\"wpoi-align\");\r\n $form.addClass(\"wpoi-align-element\");\r\n }\r\n });\r\n $(\".wpoi-layout-three .wpoi-optin:not(.wpoi-small) > .wpoi-container:not(.noimage):not(.nocontent)\").each(function(){\r\n var $this = $(this),\r\n $sidebar = $this.find(\".wpoi-aside-x\"),\r\n $element = $sidebar.prev(\".wpoi-element\"),\r\n $form = $this.find(\"form\");\r\n\r\n if ( $form.height() < $element.height() ){\r\n $sidebar.css(\"height\", $element.height());\r\n $sidebar.addClass(\"wpoi-align\");\r\n $form.addClass(\"wpoi-align-element\");\r\n }\r\n });\r\n },\r\n create_editors: function(){\r\n this._bind_to_message_editor();\r\n this._create_css_editor();\r\n },\r\n highlight_stylable_element: function(e){\r\n var $el = $(e.target),\r\n $stylable = $( $el.data(\"stylable\") );\r\n\r\n $stylable.toggleClass(\"optin_hovered_stylable_element\");\r\n },\r\n insert_stylable_element: function(e){\r\n e.preventDefault();\r\n var $el = $(e.target),\r\n stylable = $el.data(\"stylable\") + \"{}\";\r\n\r\n this.css_editor.navigateFileEnd();\r\n this.css_editor.insert(stylable);\r\n this.css_editor.navigateLeft(1);\r\n this.css_editor.focus();\r\n\r\n },\r\n apply_proper_preview_classes: function(){\t\t\t\r\n $(\".wpoi-hustle\").each(function(){\r\n if ($(this).width() <= 405){\r\n $(this).find(\".wpoi-optin\").addClass(\"wpoi-small\");\r\n } else {\r\n $(this).find(\".wpoi-optin\").removeClass(\"wpoi-small\");\r\n }\r\n\r\n if ( ($(this).width() <= 585) && ($(this).width() > 405) ){\r\n $(this).find(\".wpoi-optin\").addClass(\"wpoi-medium\");\r\n } else {\r\n $(this).find(\".wpoi-optin\").removeClass(\"wpoi-medium\");\r\n }\r\n });\r\n\r\n $(\".wpoi-layout-three .wpoi-optin:not(.wpoi-small) .wpoi-form\").each(function(){\r\n if ($(this).height() > 168){\r\n $(this).addClass(\"wpoi-align\");\r\n $(this).next(\"form\").addClass(\"wpoi-align-element\");\r\n } else {\r\n $(this).removeClass(\"wpoi-align\");\r\n $(this).next(\"form\").removeClass(\"wpoi-align-element\");\r\n }\r\n });\r\n\r\n $(\".wpoi-mcg-select\").each(function(){\r\n $(this).parent(\".wpoi-provider-args > .wpoi-container > .wpoi-element:nth-child(2) > .wpoi-container > .wpoi-element\").css({\"padding\":\"0\",\"background\":\"transparent\"});\r\n });\r\n\r\n // Layout #3\r\n // Set height of image container same to parent div\r\n // This to avoid Safari conflicts with [ height: 100% ]\r\n $(\".wpoi-layout-three .wpoi-optin:not(.wpoi-small) .nocontent:not(.noimage)\").each(function(){\r\n var $this = $(this),\r\n $parent = $this.find(\".wpoi-aside-x\").prev(\".wpoi-element\"),\r\n $child = $this.find(\".wpoi-aside-x\").prev(\".wpoi-element\").find(\".wpoi-container.wpoi-col\");\r\n $child.css(\"height\", $parent.height());\r\n });\r\n\r\n // Layout #3\r\n // Vertical align content\r\n $(\".wpoi-layout-three .wpoi-optin:not(.wpoi-small) > .wpoi-container.noimage:not(.nocontent)\").each(function(){\r\n var $this = $(this),\r\n $aside = $this.find(\".wpoi-aside-x\"),\r\n $div = $this.find(\".wpoi-image\").next(\".wpoi-element\"),\r\n $element = $aside.prev(\".wpoi-element\"),\r\n $content = $this.find(\".wpoi-content\"),\r\n $col = $element.find(\".wpoi-col\"),\r\n $form = $this.find(\"form\");\r\n\r\n if ( $form.height() > $content.height() ){\r\n $col.css(\"height\", $aside.height() + 'px' );\r\n $div.addClass(\"wpoi-align\");\r\n $content.addClass(\"wpoi-align-element\");\r\n }\r\n if ( $form.height() < $content.height() ){\r\n $aside.css(\"height\", $element.height() + 'px');\r\n $aside.addClass(\"wpoi-align\");\r\n $form.addClass(\"wpoi-align-element\");\r\n }\r\n });\r\n $(\".wpoi-layout-three .wpoi-optin:not(.wpoi-small) > .wpoi-container:not(.noimage):not(.nocontent)\").each(function(){\r\n var $this = $(this),\r\n $sidebar = $this.find(\".wpoi-aside-x\"),\r\n $element = $sidebar.prev(\".wpoi-element\"),\r\n $form = $this.find(\"form\");\r\n\r\n if ( $form.height() < $element.height() ){\r\n $sidebar.css(\"height\", $element.height());\r\n $sidebar.addClass(\"wpoi-align\");\r\n $form.addClass(\"wpoi-align-element\");\r\n }\r\n });\r\n \r\n // Layout #3\r\n // Group module fields\r\n $(\".wpoi-layout-three .wpoi-optin:not(.wpoi-small)\").each(function(){\r\n\t var $this = $(this),\r\n\t \t$elements = $this.find('form > .wpoi-element:not(.wpoi-provider-args)');\r\n\t \r\n\t for (var i = 0; i < $elements.length; i+=2) {\r\n\t\t $elements.slice(i, i+2).wrapAll('<div class=\"wpoi-element\" style=\"background-color: transparent;\"><div class=\"wpoi-container\"></div></div>');\r\n\t\t }\r\n });\r\n \r\n // Layout #4\r\n // Group module fields\r\n $(\".wpoi-layout-four .wpoi-optin:not(.wpoi-small)\").each(function(){\r\n\t var $this = $(this),\r\n\t \t$elements = $this.find('form > .wpoi-element:not(.wpoi-provider-args)');\r\n\t \r\n\t for (var i = 0; i < $elements.length; i+=2) {\r\n\t\t $elements.slice(i, i+2).wrapAll('<div class=\"wpoi-element\" style=\"background-color: transparent;\"><div class=\"wpoi-container\"></div></div>');\r\n\t\t }\r\n });\r\n \r\n // Layout #4\r\n // Vertical align content\r\n $(\".wpoi-layout-four .wpoi-optin:not(.wpoi-small) > .wpoi-container.noimage:not(.nocontent)\").each(function(){\r\n var $this = $(this),\r\n $aside = $this.find(\".wpoi-aside-xl\"),\r\n $col = $this.find(\".wpoi-aside-xl > .wpoi-container\"),\r\n $parent = $aside.find(\".wpoi-form\"),\r\n $form = $aside.find(\"form\"),\r\n $element = $aside.next(\".wpoi-element\"),\r\n $content = $element.find(\".wpoi-content\");\r\n\t\t\t\t\r\n if ( $content.height() > $form.height() ){\r\n $col.css(\"height\", $aside.height() + 'px');\r\n $parent.addClass(\"wpoi-align\");\r\n $form.addClass(\"wpoi-align-element\");\r\n }\r\n if ( $content.height() < $form.height() ) {\r\n $element.css(\"height\", $col.height() + 'px');\r\n $element.addClass(\"wpoi-align\");\r\n $content.addClass(\"wpoi-align-element\");\r\n }\r\n });\r\n $(\".wpoi-layout-four .wpoi-optin:not(.wpoi-small) > .wpoi-container:not(.noimage):not(.nocontent)\").each(function(){\r\n var $this = $(this),\r\n $aside = $this.find(\".wpoi-aside-xl\"),\r\n $col = $this.find(\".wpoi-aside-xl > .wpoi-container\"),\r\n $image = $this.find(\".wpoi-image\"),\r\n $parent = $aside.find(\".wpoi-form\"),\r\n $form = $aside.find(\"form\"),\r\n $element = $aside.next(\".wpoi-element\"),\r\n $content = $this.find(\".wpoi-content\");\r\n\r\n if ( $content.height() > $col.height() ){\r\n $col.css(\"height\", $aside.height() + 'px');\r\n $parent.css(\"height\", $col.height() - $image.height() );\r\n $parent.addClass(\"wpoi-align\");\r\n $form.addClass(\"wpoi-align-element\");\r\n }\r\n if ( $content.height() < $col.height() ) {\r\n $element.css(\"height\", $aside.height() + 'px');\r\n $element.addClass(\"wpoi-align\");\r\n $content.addClass(\"wpoi-align-element\");\r\n }\r\n });\r\n },\r\n _bind_to_message_editor: function(){\r\n var self = this;\r\n var waitForTinyMCE = setInterval(function() {\r\n\t\t\t\tif (typeof tinymce !== \"object\") return;\r\n\t\t\t\t\r\n\t\t\t\tclearInterval(waitForTinyMCE);\r\n\t\t\t\t\r\n\t\t\t\ttinymce.on(\"AddEditor\", function(args){\r\n\t\t\t\t\tvar on_content_change = function() {\r\n\t\t\t\t\t\tif( args && 'optin_message' === args.editor.getParam(\"id\") )\r\n\t\t\t\t\t\t\tself.optin.set(\"optin_message\", this.getContent() );\r\n\r\n\t\t\t\t\t\tif( args && 'success_message' === args.editor.getParam(\"id\") )\r\n\t\t\t\t\t\t\tself.model.set(\"success_message\", this.getContent() );\r\n\r\n\t\t\t\t\t\tself.apply_proper_preview_classes();\r\n\r\n\t\t\t\t\t};\r\n\t\t\t\t\tif( args && 'optin_message' === args.editor.getParam(\"id\") )\r\n\t\t\t\t\t\tself.message_editor = args.editor;\r\n\r\n\t\t\t\t\tif( args && 'success_message' === args.editor.getParam(\"id\") )\r\n\t\t\t\t\t\tself.success_editor = args.editor;\r\n\r\n\t\t\t\t\t\targs.editor.on(\"loadContent\", function(e){ // set max width of body element inside iframe to 100%\r\n\t\t\t\t\t\tthis.dom.setStyle(\"tinymce\", \"maxWidth\", \"100%\");\r\n\t\t\t\t\t});\r\n\t\t\t\t\tOptin.Events.off(\"navigate\", self.refresh_editor, self );\r\n\t\t\t\t\tOptin.Events.on(\"navigate\", self.refresh_editor, self );\r\n\t\t\t\t\tself.on(\"rendered\", self.refresh_editor, self);\r\n\t\t\t\t\targs.editor.on('change', on_content_change);\r\n\t\t\t\t\targs.editor.on('AddUndo', on_content_change);\r\n\t\t\t\t\targs.editor.on('keyup', on_content_change);\r\n\t\t\t\t\tself.apply_proper_preview_classes();\r\n\t\t\t\t\t\r\n\t\t\t\t});\r\n\t\t\t\t\r\n }, 50);\r\n\r\n },\r\n refresh_editor: function(args, name){\r\n if( 'design' !== name || !_.isObject( this.message_editor ) ) return;\r\n this.message_editor.remove();\r\n tinymce.init(this.message_editor.settings);\r\n $(this.message_editor.settings.selector + \"_ifr\").height(240);\r\n\r\n this.success_editor.remove();\r\n tinymce.init(this.success_editor.settings);\r\n $(this.success_editor.settings.selector + \"_ifr\").height(240);\r\n\r\n },\r\n _create_css_editor: function(){\r\n this.css_editor = ace.edit(\"optin_custom_css\");\r\n\r\n this.css_editor.getSession().setMode(\"ace/mode/css\");\r\n this.css_editor.setTheme(\"ace/theme/solarized_light\");\r\n this.css_editor.getSession().setUseWrapMode(true);\r\n this.css_editor.getSession().setUseWorker(false);\r\n this.css_editor.setShowPrintMargin(false);\r\n this.css_editor.renderer.setShowGutter(true);\r\n this.css_editor.setHighlightActiveLine(true);\r\n this.css_editor.on(\"blur\", $.proxy(this.update_custom_css, this));\r\n\r\n },\r\n _create_color_pickers: function(){\r\n var self = this;\r\n this.$(\".optin_color_picker\").wpColorPicker({\r\n change: function(event, ui){\r\n var method_name = \"update_\" + this.id.replace(\"optin_\", \"\");\r\n if( typeof self[method_name] === \"function\"){\r\n self[method_name](event, ui);\r\n }else{\r\n console.warn(\"Method \", method_name, \" not found\");\r\n }\r\n }\r\n });\r\n\r\n this.$(\".ui-draggable-handle\").click(function(e){e.preventDefault();});\r\n },\r\n update_custom_css: function(){\r\n this.model.set(\"css\", this.css_editor.getValue() );\r\n },\r\n\t\t_toggleColorScheme: function() {\r\n\t\t\tvar colorSelector = $('#optin_color_palettes' ),\r\n\t\t\t\tcustomColor = $('#optin_customize_color_palette');\r\n\t\t\tcolorSelector.prop('disabled', customColor.is( ':checked' ) );\r\n\t\t},\r\n\t\ttoggleCustomCSS: function(e) {\r\n\t\t\tvar input = $(e.currentTarget),\r\n\t\t\t\tisOn = input.is(':checked'),\r\n\t\t\t\tholder =this.$('#wph-css-holder');\r\n\t\t\tholder[ isOn ? 'removeClass' : 'addClass']('hidden');\r\n\t\t\tinput.closest('label.wph-label--border').toggleClass('toggle-off');\r\n\t\t},\r\n apply_custom_css: function(e){\r\n if( e ) {\r\n e.preventDefault();\r\n\t\t\t\t$(e.target).prop(\"disabled\", true);\r\n }\r\n\t\t\tthis._toggleColorScheme();\r\n\r\n this.update_custom_css();\r\n var $styles_el = $(\"#optin-custom-styles\").length ? $(\"#optin-custom-styles\") : $('<style id=\"optin-custom-styles\">').appendTo(\"body\"),\r\n css_string = this.css_editor.getValue();\r\n\r\n $.ajax({\r\n type: \"POST\",\r\n url: ajaxurl,\r\n dataType: \"json\",\r\n data: {\r\n action: 'inc_opt_prepare_custom_css',\r\n css: css_string,\r\n _ajax_nonce: $(\"#optin_custom_css\").data(\"nonce\"),\r\n optin_id: optin_vars.current.data.optin_id\r\n },\r\n success: function(res){\r\n if( res && res.success ){\r\n $styles_el.html( res.data );\r\n }\r\n\r\n if( e ) $(e.target).prop(\"disabled\", false);\r\n },\r\n error: function() {\r\n if( e ) $(e.target).prop(\"disabled\", false);\r\n }\r\n });\r\n },\r\n get_layout_colors: function(){\r\n if( !_.isTrue( this.model.get(\"colors.customize\") ) )\r\n return Palettes.findWhere({_id: this.model.get(\"colors.palette\")}).toJSON();\r\n else\r\n return this.model.toJSON().colors;\r\n },\r\n update_styles: function(){\r\n var colors = this.get_layout_colors(),\r\n styles = \"\",\r\n $styles_el = $(\"#optin-preview-styles\").length ? $(\"#optin-preview-styles\") : $('<style id=\"optin-preview-styles\">').appendTo(\"body\");\r\n\r\n _.each(this.stylable_elements, function(el, index){\r\n var color_type = index.indexOf(\"background\") !== -1 ? 'background' : 'color',\r\n color = colors[index];\r\n styles += ( el + \"{ \" + color_type + \": \" + color +\";} \" );\r\n });\r\n\r\n $styles_el.html( styles );\r\n },\r\n update_borders_style: function(){\r\n var borders = this.model.toJSON().borders,\r\n elements = this.stylable_elements,\r\n styles = \"\",\r\n $styles_el = $(\"#optin-preview-styles-borders\").length ? $(\"#optin-preview-styles-borders\") : $('<style id=\"optin-preview-styles-borders\">').appendTo(\"body\");\r\n\r\n //main container border\r\n styles += ( elements.main_background + \"{border-radius:\" + borders.corners_radius + \"px;}\" );\r\n\r\n if( 'joined' === this.model.get(\"borders\").get('fields_style') ){ // set border to 0 if input and button are joined\r\n styles += ( elements.fields_background + \"{border-radius: 0px;}\" );\r\n styles += ( elements.button_background + \"{border-radius: 0px;}\" );\r\n }else{\r\n styles += ( elements.fields_background + \"{border-radius:\" + borders.fields_corners_radius + \"px;}\" );\r\n styles += ( elements.button_background + \"{border-radius:\" + borders.button_corners_radius + \"px;}\" );\r\n }\r\n\r\n // main container dropshadow\r\n\t\t\t// check not needed for optin\r\n // if(_.isTrue( borders.drop_shadow ) )\r\n styles += ( elements.main_background + \"{box-shadow: 0 0 \" + borders.dropshadow_value +\"px \" + borders.shadow_color + \"}\" );\r\n\r\n\r\n $styles_el.html( styles );\r\n },\r\n update_optional_elements: function(e){\r\n var vals = this.model.get(\"elements\");\r\n if( e.target.checked ){\r\n vals.push( e.target.value );\r\n this.model.set(\"elements\", vals, {silent: true} ) ;\r\n }else{\r\n this.model.set(\"elements\", _.without( vals, e.target.name ), {silent: true} );\r\n }\r\n },\r\n _show_args: function(){\r\n if( \"mailchimp\" === Optin.step.services.model.get(\"optin_provider\")\r\n && !Optin.step.services.provider_args.isEmpty()\r\n && \"hidden\" !== Optin.step.services.provider_args.get(\"group\").form_field\r\n )\r\n return true;\r\n\r\n return false;\r\n },\r\n /**\r\n * Set proper image location based on selected form_location\r\n *\r\n * If form location is not 0, set image locatio to left\r\n *\r\n * @param model\r\n */\r\n set_proper_image_location: function(model){\r\n if( model.get(\"form_location\") !== 0 ){\r\n model.set(\"image_location\", \"left\");\r\n }\r\n },\r\n _set_preview_model: function(){\r\n var data = this.optin.toJSON(),\r\n _show_args = function(){\r\n\t\t\t\t\tif( \"mailchimp\" === data.optin_provider\r\n\t\t\t\t\t\t&& Optin.step.services.provider_args\r\n\t\t\t\t\t\t&& Optin.step.services.provider_args.get(\"group\")\r\n\t\t\t\t\t\t&& \"hidden\" !== Optin.step.services.provider_args.get(\"group\").form_field\r\n\t\t\t\t\t)\r\n\t\t\t\t\t\treturn true;\r\n\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t},\r\n display = Optin.step.display.model.toJSON();\r\n\t\t\t\r\n if( this.preview_model ){\r\n this.preview_model.set( _.extend(\r\n {\r\n image_style: \"\",\r\n type: \"popup\"\r\n },\r\n this.model.toJSON(),\r\n this.model.get(\"borders\").toJSON(),\r\n this.optin.toJSON(),\r\n {\r\n types:{\r\n after_content: display.after_content,\r\n popup: display.popup,\r\n slide_in: display.slide_in\r\n }\r\n },\r\n {\r\n has_args: _show_args()\r\n }\r\n ) );\r\n return;\r\n }\r\n\r\n this.preview_model = new Backbone.Model( _.extend(\r\n {\r\n image_style: \"\",\r\n type: \"popup\"\r\n },\r\n this.model.toJSON(),\r\n this.model.get(\"borders\").toJSON(),\r\n this.optin.toJSON(),\r\n {\r\n types:{\r\n after_content: display.after_content,\r\n popup: display.popup,\r\n slide_in: display.slide_in\r\n }\r\n },\r\n {\r\n has_args: _show_args()\r\n }\r\n ) );\r\n },\r\n open_preview: function(e) {\r\n Optin.Events.trigger(\"design:preview:render:start\");\r\n\t\t\tthis.sync_model_data();\r\n this._set_preview_model();\r\n\t\t\t\r\n if( this.preview ) {\r\n this.preview.render();\r\n this.preview.show();\r\n } else {\r\n\t\t\t\tvar Preview = Hustle.get(\"Optin.Preview\");\r\n\t\t\t\tthis.preview = new Preview({model: this.preview_model });\r\n\t\t\t\tthis.preview.show();\r\n\t\t\t}\r\n\r\n\t\t\tthis._fix_layout_3_sizes();\r\n this.update_styles();\r\n this.update_borders_style();\r\n this.apply_proper_preview_classes();\r\n this.apply_custom_css();\r\n },\r\n preview_type_changed: function() {\r\n this._fix_layout_3_sizes();\r\n this.update_styles();\r\n this.update_borders_style();\r\n this.apply_proper_preview_classes();\r\n this.apply_custom_css();\r\n },\r\n\t\tsync_model_data: function() {\r\n\t\t\tvar optin_title = this.model.get( 'optin_title' );\r\n\t\t\tif ( ! optin_title ) {\r\n\t\t\t\t// Try the title field\r\n\t\t\t\toptin_title = $( '#optin_title' ).val();\r\n\t\t\t}\r\n\t\t\tthis.optin.set(\"optin_title\", optin_title );\r\n\t\t\t\r\n\t\t\tif ( typeof tinymce !== \"object\" ) return;\r\n\t\t\tif ( !this.message_editor ) this.message_editor = tinymce.get(\"optin_message\"); \r\n\t\t\tthis.optin.set(\"optin_message\", this.message_editor.getContent());\r\n\t\t\t\r\n\t\t\tif ( !this.success_editor ) this.success_editor = tinymce.get(\"success_message\");\r\n\t\t\tthis.model.set(\"success_message\", this.success_editor.getContent());\r\n\t\t},\r\n\t\tupdateMeta: function( e ) {\r\n\t\t\tvar input = $( e.currentTarget ),\r\n\t\t\t\tinput_name = input.attr( 'name' );\r\n\t\t\tthis.model.set( input_name, input.val() );\r\n\t\t},\r\n\t\ttoggleSuccessMessageFields: function( e ) {\r\n\t\t\tvar tab = $( e.currentTarget ),\r\n\t\t\t\tis_visible = 'success_message' === tab.val(),\r\n\t\t\t\tcontainer = $( '#wpoi-success-message-fields');\r\n\r\n\t\t\tcontainer[ is_visible ? 'removeClass' : 'addClass']('hidden');\r\n\t\t},\r\n\t\tnewModuleField: function(e) {\r\n\t\t\tvar addbutton = $(e.currentTarget);\r\n\t\t\tvar module_maker_container = this.$( '#wpoi-module-field-maker' ).removeClass( 'hidden' );\r\n\t\t\taddbutton.attr( 'disabled', 'disabled' );\r\n\t\t},\r\n\t\tcancelAddField: function() {\r\n\t\t\tvar makerContainer = this.$( '#wpoi-module-field-maker' ).addClass( 'hidden' );\r\n\r\n\t\t\t// Remove warning icons\r\n\t\t\t$('.dashicons-warning', makerContainer).remove();\r\n\r\n\t\t\t$( '[type=\"text\"]', makerContainer).val('');\r\n\t\t\tthis.$( '.add-new-module-field' ).attr( 'disabled', false );\r\n\t\t},\r\n\t\taddNewField: function () {\r\n\t\t\tvar datas = this.$( '[data-name]', '#wpoi-module-field-maker' ).not(':disabled'),\r\n\t\t\t\tfield = {},\r\n\t\t\t\terrors = 0;\r\n\r\n\t\t\t_.each( datas, function( input ) {\r\n\t\t\t\tinput = $(input);\r\n\t\t\t\tvar input_name = input.data( 'name' ),\r\n\t\t\t\t\tinput_val = input.val();\r\n\r\n\t\t\t\tif ( _.contains( ['label', 'name'], input_name ) && '' === input_val.trim() ) {\r\n\t\t\t\t\terrors++;\r\n\r\n\t\t\t\t\tvar $icon = $('<span class=\"dashicons dashicons-warning\"></span>');\r\n\t\t\t\t\tinput.after( $icon );\r\n\r\n\t\t\t\t\tif ( 'label' === input_name ) {\r\n\t\t\t\t\t\t$icon.attr( 'title', optin_vars.messages.module_fields.no_label );\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( 'name' === input_name ) {\r\n\t\t\t\t\t\t$icon.attr( 'title', optin_vars.messages.module_fields.no_name );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n \r\n // check for double fields\r\n if ( 'name' === input_name ) {\r\n this.$('td.wph-column-name input[name=\"name\"]').each( function(n){\r\n if ( $(this).val() === input_val ) {\r\n errors++;\r\n var $icon = $('<span class=\"dashicons dashicons-warning\"></span>'),\r\n error_label = optin_vars.messages.module_fields.custom_field_already_exists.replace( '{name}', input_val );\r\n \r\n input.after( $icon );\r\n $icon.attr( 'title', error_label );\r\n }\r\n } );\r\n }\r\n\r\n\t\t\t\tif ( 'checkbox' === input.attr( 'type' ) ) {\r\n\t\t\t\t\tfield[ input_name ] = input.is(':checked');\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfield[ input_name ] = input.val();\r\n\t\t\t\t}\r\n\t\t\t}, this );\r\n\r\n\t\t\tif ( errors > 0 ) {\r\n\t\t\t\t// Don't add if there are errors\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t// Remove any existing warning icons\r\n\t\t\tthis.removeWarningIcons();\r\n\r\n\t\t\tvar provider = Optin.step.services.model.get(\"optin_provider\");\r\n\r\n\t\t\tif ( provider && optin_vars.providers[ provider ] ) {\r\n\t\t\t\tOptin.Events.trigger( 'optin:add_module_field_' + provider, field, this, this.optin.toJSON().optin_id );\r\n\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t// If no provider, add module field\r\n\t\t\tthis._add_module_field( field );\r\n\t\t},\r\n\t\t_add_module_field: function( field ) {\r\n\t\t\tfield.index = this.module_index++;\r\n\t\t\tvar m_field = new ModuleField({ options: field, controller: this });\r\n\t\t\tthis.module_fields.push( field );\r\n\t\t\tthis.model.set( 'module_fields', this.module_fields );\r\n\t\t\tthis.$( '.wph-cancel-add-field' ).trigger( 'click' );\r\n\t\t},\r\n\t\tremoveWarningIcons: function() {\r\n\t\t\tthis.$( '.dashicons-warning', '#wpoi-module-field-maker' ).remove();\r\n\t\t}\r\n }));\r\n\r\n});\r\n","Hustle.define(\"Optin.Display_Tab\", function( $ ) {\r\n \"use strict\";\r\n return Hustle.View.extend( _.extend({}, Hustle.get(\"Mixins.Model_Updater\"), {\r\n template: Optin.template(\"wpoi-wizard-settings_template\"),\r\n widget_message_tpl: Optin.template(\"wpoi-wizard-settings_widget_template\"),\r\n el: \"#wpoi-wizard-settings\",\r\n events: {\r\n \"click .next-button a.previous\": \"go_to_design\",\r\n \"click .can-open.display-settings-icon span.open i.dev-icon\": \"toggle_boxes\",\r\n \"change #wpoi-after-content-state-toggle\": \"optin_type_toggle\",\r\n \"change #wpoi-popup-state-toggle\": \"optin_type_toggle\",\r\n \"change #wpoi-slide-in-state-toggle\": \"optin_type_toggle\"\r\n },\r\n init: function(){\r\n this.listenTo( this.model, \"change:after_content.animate\", this.toggle_after_content_animation_select );\r\n\r\n this.listenTo( this.model, \"change:popup.enabled\", this.render );\r\n this.listenTo( this.model, \"change:slide_in.enabled\", this.render );\r\n this.listenTo( this.model, \"change:after_content.enabled\", this.render );\r\n this.listenTo( this.model, \"change:slide_in.position\", this.update_slide_in_position_label );\r\n this.listenTo( this.model, \"change:shortcode_id\", _.bind(this.render_widget_message, this) );\r\n\r\n return this.render();\r\n },\r\n move_selects_under_selected_radio: function( key, val, options ){\r\n var value = this.model.get( key ),\r\n block_class = \".\" + key.replace(\".\", \"_\") + \"_block\",\r\n select_wrap = block_class + '_select_wrap',\r\n $second_radio = this.$( block_class ).eq(1),\r\n $tags_select = this.$( select_wrap );\r\n\r\n if( !$second_radio.length || !$tags_select.length ) return;\r\n\r\n if( _.isTrue( value ) )\r\n $second_radio.insertAfter( $tags_select );\r\n else\r\n $second_radio.insertBefore( $tags_select );\r\n },\r\n /**\r\n * Renders widget message\r\n */\r\n render_widget_message: function (){\r\n var html = this.widget_message_tpl( this.model.toJSON() );\r\n this.$(\"#wpoi-wizard-settings-widget-message\").html( html );\r\n },\r\n render: function(){\r\n\t\t\t\r\n\t\t\tvar Conditions_View = Hustle.get(\"Settings.Conditions_View\");\r\n this.popup_conditions_view = new Conditions_View({\r\n model: this.model.get(\"popup.conditions\"),\r\n type: \"popup\"\r\n });\r\n\r\n this.slide_in_conditions_view = new Conditions_View({\r\n model: this.model.get(\"slide_in.conditions\"),\r\n type: \"slide_in\"\r\n });\r\n\r\n this.after_content_conditions_view = new Conditions_View({\r\n model: this.model.get(\"after_content.conditions\"),\r\n type: \"after_content\"\r\n });\r\n\r\n\r\n this.model.set('slide_in.position_label', optin_vars.messages.positions[this.model.get('slide_in.position')], { silent:true } );\r\n\t\t\t\r\n this.$el.html( this.template( $.extend( true, {}, this.model.toJSON(), {\r\n popup:{condition_labels: this.popup_conditions_view.get_all_conditions_labels() },\r\n after_content:{condition_labels: this.after_content_conditions_view.get_all_conditions_labels() },\r\n slide_in:{condition_labels: this.slide_in_conditions_view.get_all_conditions_labels() }\r\n } ) ) );\r\n\r\n this.render_widget_message();\r\n\r\n\t\t\tthis.popup_conditions_view.delegateEvents(); \r\n\t\t\tthis.popup_conditions_view.on(\"toggle_condition\", this.render_condition_labels);\t\t\t\t\r\n\t\t\tthis.popup_conditions_view.on(\"change:update_view_label\", this.render_condition_labels);\t\t\t\t\r\n\t\t\tthis.$(\"#wph-optin--popup_conditions .wph-conditions\").html( this.popup_conditions_view.$el );\r\n\t\t\t\r\n\t\t\tthis.slide_in_conditions_view.delegateEvents();\r\n\t\t\tthis.slide_in_conditions_view.on(\"toggle_condition\", this.render_condition_labels);\t\r\n\t\t\tthis.slide_in_conditions_view.on(\"change:update_view_label\", this.render_condition_labels);\t\r\n this.$(\"#wph-optin--slide_in_conditions .wph-conditions\").html( this.slide_in_conditions_view.$el );\r\n\r\n\t\t\tthis.after_content_conditions_view.delegateEvents();\r\n\t\t\tthis.after_content_conditions_view.on(\"toggle_condition\", this.render_condition_labels);\t\r\n\t\t\tthis.after_content_conditions_view.on(\"change:update_view_label\", this.render_condition_labels);\t\r\n this.$(\"#wph-optin--after_content_conditions .wph-conditions\").html( this.after_content_conditions_view.$el );\r\n\r\n var optin_popup_d_triggers = new Optin.View.Display_Triggers({\r\n model: this.model,\r\n el: \"#triggers-section-popup\",\r\n type: \"popup\"\r\n });\r\n\r\n var optin_slidein_d_triggers = new Optin.View.Display_Triggers({\r\n model: this.model,\r\n el: \"#triggers-section-slide_in\",\r\n type: \"slide_in\"\r\n });\r\n\r\n this.$el.find(\".can-open.display-settings-icon span.open i.dev-icon\").trigger(\"click\");\r\n\r\n },\r\n optin_type_toggle: function(e){\r\n var $this = $(e.target),\r\n $block = $this.closest(\".wpoi-toggle-block\"),\r\n $p = $block.find(\"p\").first(),\r\n $section = $this.closest(\".wpoi-listing-wrap\").find(\"section\");\r\n\t\t\t\r\n if( $this.is(\":checked\") ) {\r\n $p.fadeOut();\r\n $block.removeClass(\"inactive\");\r\n\r\n } else {\r\n $p.fadeIn();\r\n $block.addClass(\"inactive\");\r\n }\r\n\r\n if( $section.is(\".closed\") && $this.is(\":checked\") )\r\n $this.closest(\".wpoi-toggle-mask\").find(\"span.open i.dev-icon\").trigger(\"click\");\r\n },\r\n toggle_boxes: function(e){\r\n var $this = $(e.target);\r\n var classOpen = \"dev-icon-caret_up\";\r\n var classClosed = \"dev-icon-caret_down\";\r\n var currentClass = $this.hasClass(classOpen) ? classOpen : classClosed;\r\n var newClass = currentClass == classOpen ? classClosed : classOpen;\r\n var $section = $this.closest(\".wpoi-listing-wrap\").find(\"section\");\r\n //if($section.hasClass(\"closed\") && !$this.closest(\".wpoi-toggle-mask\").find(\".toggle-checkbox\").is(\":checked\") ) return;\r\n $this.switchClass(currentClass, newClass);\r\n $section.toggleClass(\"closed\", currentClass == classClosed);\r\n $section.toggle(newClass == classClosed);\r\n },\r\n go_to_design: function(e){\r\n e.preventDefault();\r\n Optin.router.navigate(\"design\", true);\r\n },\r\n /**\r\n * Toggles after content animation dropdowns if \"No Animation, Optin is always visible\" is selected or deselected\r\n *\r\n *\r\n */\r\n toggle_after_content_animation_select: function(){\r\n if( _.isTrue( this.model.get(\"after_content.animate\") ) ) {\r\n this.$(\"#optin-afterc-animation-block\").show(function () {\r\n $(this).removeClass(\"hidden\");\r\n });\r\n }else{\r\n this.$(\"#optin-afterc-animation-block\").hide( function(){\r\n $(this).addClass(\"hidden\");\r\n } );\r\n }\r\n },\r\n update_slide_in_position_label: function(e){\r\n this.$(\"#wpoi-slide_in-position-label\").text( optin_vars.messages.positions[this.model.get('slide_in.position')] );\r\n },\r\n render_condition_labels: function( condition_view ){\r\n var $els = {\r\n after_content: $(\"#wph-after-content-condition-labels\"),\r\n popup: $(\"#wph-popup-condition-labels\"),\r\n slide_in: $(\"#wph-slide-in-condition-labels\")\r\n };\r\n\r\n if( $els[ condition_view.type ] )\r\n $els[ condition_view.type ].html( condition_view.get_all_conditions_labels() );\r\n }\r\n }\r\n ));\r\n});\r\n","var Inc_Opt_Router = Backbone.Router.extend({\r\n\r\n routes: {\r\n \"\": \"services\",\r\n \"services\": \"services\",\r\n \"design\": \"design\",\r\n \"display(/:optin_type)\": \"display\"\r\n },\r\n\r\n route: function(route, name, callback) {\r\n var router = this;\r\n if (!callback) callback = this[name];\r\n\r\n var f = function() {\r\n if( !Optin.step.model )\r\n Optin.step.model = new Optin.Model( optin_vars.current.data );\r\n\t\t\t\r\n\t\t\tif ( ! parseInt(optin_vars.is_limited) ) {\r\n\t\t\t\tvar Email_Services_Tab = Hustle.get(\"Optin.Email_Services_Tab\");\r\n\t\t\t\tif( !Optin.step.services ){\r\n\t\t\t\t\tvar Provider_Args = Hustle.get(\"Models.M\");\r\n\t\t\t\t\tOptin.step.services = new Email_Services_Tab({ model: Optin.step.model, provider_args: new Provider_Args( optin_vars.current.provider_args ) });\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar Design_Tab = Hustle.get(\"Optin.Design_Tab\");\r\n\t\t\t\tif( !Optin.step.design )\r\n\t\t\t\t\tOptin.step.design = new Design_Tab({ model: new Optin.Models.Design_Model( optin_vars.current.design ), optin: Optin.step.model });\r\n\r\n\t\t\t\tvar Display_Tab = Hustle.get(\"Optin.Display_Tab\");\r\n\t\t\t\tif( !Optin.step.display )\r\n\t\t\t\t\tOptin.step.display = new Display_Tab({ model: new Optin.Models.Settings_Model( optin_vars.current.settings ) });\r\n\r\n\t\t\t\tif( !Optin.step.wizard ){\r\n\t\t\t\t\tvar Wizard = Hustle.get(\"Optin.Wizard\");\r\n\t\t\t\t\tOptin.step.wizard = new Wizard();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n callback.apply(router, arguments);\r\n };\r\n\r\n\r\n return Backbone.Router.prototype.route.call(this, route, name, f);\r\n },\r\n execute: function(callback, args, name) {\r\n // Prevent changing tab if current tab does not validate\r\n var routeIndex = _.keys(this.routes).indexOf(name) - 1;\r\n if( routeIndex != Optin.step.current ) {\r\n switch ( Optin.step.current ) {\r\n case 0:\r\n var validate = Optin.step.model.validate_first_step();\r\n if ( validate.size() ) {\r\n Optin.step.services.validate();\r\n // Set the URL back to the original route and dont execute the route callback\r\n Optin.router.navigate(_.keys(this.routes)[Optin.step.current +1], false);\r\n // Current tab did not validate, don't route\r\n return false;\r\n }\r\n break;\r\n }\r\n } else {\r\n // Set the URL back to the original route and dont execute the route callback\r\n Optin.router.navigate(_.keys(this.routes)[Optin.step.current +1], false);\r\n // don't route if same route as before\r\n return false;\r\n }\r\n\r\n Optin.Events.trigger(\"navigate\", args, name);\r\n if (callback) callback.apply(this, args);\r\n },\r\n\r\n services: function() {\r\n Optin.step.activate_step( 0 );\r\n },\r\n\r\n design: function() {\r\n\r\n\r\n Optin.step.activate_step( 1 );\r\n },\r\n\r\n display: function( type ) {\r\n\r\n Optin.step.activate_step( 2 );\r\n\r\n // If optin type set in URL, scroll to it\r\n type = type || \"\";\r\n if( type !== \"\" && jQuery('#wpoi-listing-wrap-' + type).length ) {\r\n\r\n jQuery('#wpoi-listing-wrap-' + type ).find(\"i.dev-icon:not(.search-icon)\").trigger(\"click\");\r\n\r\n //Wait for the elements to render\r\n /*\r\n window.setTimeout(function(){\r\n jQuery('html, body').animate({\r\n scrollTop: jQuery('#wpoi-listing-wrap-' + type ).offset().top - 50\r\n }, 2000);\r\n\r\n }, 500);\r\n */\r\n\r\n } \r\n \r\n }\r\n\r\n});\r\n\r\n/**\r\n * Init the routing if it's optin creation page\r\n */\r\n // have to remove \"-pro\" that came from the menu which causes template not to work\r\nadminpage = adminpage.replace('hustle-pro', 'hustle');\r\nif( 'hustle_page_inc_optin' == adminpage ){\r\n Optin.router = new Inc_Opt_Router();\r\n Backbone.history.start();\r\n}"]}
|
1 |
+
{"version":3,"sources":["hustle.js","utils.js","admin_utils.js","modal.js","commons.js","delete-confirmation.js","media-holder.js","model-updater.js","conditions-view.js","conditions.js","display-triggers.js","e-newsletter.js","modules-activity.js","services-edit-modal.js","services.js","pure-jquery.js","models.js","views.js","after-content-view.js","content-view.js","design-view.js","listing.js","popup-view.js","preview.js","slide_in-view.js","view.js","appearance-view.js","floating-social-view.js","services-view.js","custom-content.js","social-sharing.js","error-list.js","subscription-list-modal.js","optin.js","dashboard.js","settings.js","abcprovider.js","activecampaign.js","constantcontact.js","convertkit.js","hubspot.js","infusion_soft.js","mad_mimi.js","mailchimp.js","mautic.js","others.js","sendinblue.js","sendy.js","wizard.js","services-tab.js","design-tab.js","display-tab.js","router.js"],"names":["$","window","Hustle","doc","win","_modules","_template_options","evaluate","interpolate","escape","define","module_name","module","splits","split","length","recursive","modules","arr","_module_name","splice","invoked","call","_","isFunction","extend","join","m","get_modules","get","Events","Backbone","View","__base_events","click .wph-tabs--wrap .wph-tabs--nav li label","initialize","this","events","init_mix","apply","arguments","render","wrap","trigger","init","__base_toggle_tab","e","$this","target","href","attr","replace","$content","$wrap","closest","$li","find","not","removeClass","addClass","siblings","template","memoize","id","compiled","data","document","getElementById","innerHTML","create_template","str","cache","get_template_options","cookie","name","i","c","cookie_name","ca","charAt","substring","indexOf","_val","JSON","parse","set","value","days","date","expires","isArray","isPlainObject","stringify","isNaN","Date","setTime","getTime","toGMTString","consts","Never_See_Aagain_Prefix","Module_Show_Count","Slide_Cookie_Prefix","Slide_Cookie_Hide_All","SS_Module_Show_Count","jQuery","Optin","Models","COOKIE_PREFIX","POPUP_COOKIE_PREFIX","SLIDE_IN_COOKIE_PREFIX","SLIDE_IN_COOKIE_HIDE_ALL","global_mixin","mixin","log","console","toBool","val","isBoolean","isString","toLowerCase","isNumber","isUndefined","isNull","isTrue","toString","isFalse","control_base","checked","current","attribute","isEqual","selected","disabled","class","conditon","cls","negating_cls","add_class","toUpperCase","findKey","obj","predicate","context","cb","key","keys","Model","prototype","toJSON","json","clone","attributes","Collection","String","toInt","parseInt","isEmpty","trim","options","html","template_compat","on","is","parent","Mixins","_mixins","_services_mixins","_desing_mixins","_display_mixins","add","get_mixins","add_services_mixin","get_services_mixins","Template_Mixin","change input[type=text]","keyup .wpoi_contenteditable","change input[type=radio]","change select","change input[type=checkbox]","blur input[type=text]","blur input[type=number]","set_model_texts","$el","model","set_model_contenteditables","text","set_model_radios","set_model_selects","set_model_checkboxes","$mask","opts","type","style","title","subtitle","content","animation_in","animation_out","position","click .wph-modal--close a","submit form","click .wph-modal--cta","click .wph-modal-never-see-again","type_data","types","sanitize_cta_url","enable_fullscreen","handle_custom_size_cc","setElement","bind","clicked_background","on_form_submit","enable_body_scroll","hasOwnProperty","$close_btn","hide","self","preventDefault","delay","hasClass","prev","remove","close_btn_as_never_see","never_see_again","not_close_on_background_click","show","show_count_key","current_show_count","cta_url","test","fullscreen","optin_provider","make_fullscreen","custom_size_attr","custom_size_class","customize_size","custom_width","custom_height","border","border_weight","allow_scroll_page","fire_conversion_event","source","expiration_days","$form","on_submit","location","view","wpmuiSelect","className","tagName","nonce","action","url","ajaxurl","click .hustle-delete-module-confirm","click .hustle-delete-module-cancel","confirm","stopPropagation","$spinner","button_width","outerWidth","append","animate","width","ajax","_ajax_nonce","complete","success","res","onSuccess","cancel","media_frame","optin_vars","messages","media_uploader","select_or_upload","button_text","use_this_image","multiple","click .wph-media--add","click .wph-button--dots","click .i-close","click .wpoi-swap-image-button","click .wpoi-delete-image-button","Error","close_media_options","image","define_media_frame","$preview","$holder","$options","wp","media","button","state","first","css","open","toggle_options","toggleClass","$target","$media","$list","$items","$svg","swap_image","delete_image","_events","delegateEvents","change input[type='text']","change input[type='number']","change input[type='checkbox']","_update_text","silent","_update_checkbox","_update_radios","_update_select","handle_tpl","click .wph-conditions--side .wph-conditions--item:not(.disabled)","click .wph-conditions--side .wph-conditions--item:not(.disabled) span","click .wph-conditions--item header","active_conditions","listenTo","toggle_empty_message","conditions","type_name","each","Conditions","condition","handle","label","get_label","cid","get_condition_cid","active_class","icon_class","add_condition_panel","settings","take_care_of_connected_conditions","this_condition","disable","disable_id","index","$disable_handle","add_condition","$handle","get_configs","remove_condition","off","unset","me","toggle_condition","toggle_panel","debounce","$panel","$section","slideToggle","get_conditions_labels","labels","pluck","tpl","map","condition_labels","everywhere","get_all_conditions_labels","default_conditions","posts","all_posts","pages","all_pages","categories","all_categories","tags","all_tags","default_labels","push","concat","Condition_Base","condition_id","_template","_defaults","condition_name","change input","change textarea","cpt","get_data","on_init","defaults","get_title","get_body","body","get_header","header","rendered","update_attribute","get_attribute","change_input","el","getAttribute","search_results","parents","reanable_scroll","either_all_or_others","params","args","Toggle_Button_Toggler_Mixin","change input[type='radio']","set_current_li","filter_type","update_label","contains","no_posts","only_on_these_posts","except_these_posts","number_posts","createTag","no_pages","only_on_these_pages","except_these_pages","number_pages","post_types","cpt_details","cpt_name","selected_cpts","post_type","post_type_label","all","no","no_categories","only_on_these_categories","except_these_categories","number_categories","no_tags","only_on_these_tags","except_these_tags","number_tags","visitor_logged_in","conditions_body","visitor_not_logged_in","shown_less_than","less_than","only_on_mobile","not_on_mobile","from_specific_ref","refs","not_from_specific_ref","not_from_internal_link","from_search_engine","on_specific_url","urls","not_on_specific_url","visitor_has_commented","visitor_has_never_commented","in_a_country","countries","not_in_a_country","click .tabs-header label","hide_adblock_options_on_toggle","change_tab","event","$this_tab","$this_content","$radio","prop","back_tpl","initial_html","click .optin-enews-sync-setup","click .optin-enews-sync-cancel","click .optin-enews-sync-save","click .optin-enews-sync-toggle","click .optin-enews-sync-edit","setup","error","save","groups","checkbox","toggle","change .hustle-for-admin-user-toggle","change .hustle-for-logged-in-user-toggle","toggle_for_user","user","user_type","res_status","click .js-wph-button-cancel","change #wph-provider-edit-modal-provider","click #wph-edit-service-save","provider_options_nonce","appendTo","get_provider_options","$details_placeholder","$options_placeholder","empty","provider_id","optin","close","save_settings","$selector","form","serialize","Modal_View","modal","click .wph-providers-edit","open_edit_modal","transition","mouseenter","stop","fadeIn","mouseleave","removeProp","fadeOut","tab","router","navigate","optin_id","optin_type","_for","$for","$others","$other_sections","slideUp","decorate_number_inputs","elem","disabled_class","after","newVal","$input","oldValue","parseFloat","max","min","sticky_relocate","window_top","scrollTop","div_top","offset","top","height","outerHeight","scroll","user_has_change","hasChanges","child","parent_model","optin_name","optin_title","optin_message","api_key","mail_list","active","test_mode","save_to_local","service_source","validate_first_step","attrs","errors","message","provider","optin_mail_list","Color_Palette","_id","main_background","form_background","button_background","button_label_color","title_color","content_color","fields_background","fields_color","Color_Palette_Collection","Palettes","palettes","item","RegExp","Colors_Model","customize","palette","at","button_label","Borders_Model","rounded_corners","corners_radius","fields_corners_radius","button_corners_radius","drop_shadow","dropshadow_value","shadow_color","fields_style","rounded_form_fields","rounded_form_button","Design_Model","success_message","form_location","elements","image_location","image_style","image_src","preview_image","colors","borders","opening_animation","closing_animation","on_submit_page_id","input_icons","on_success","on_success_time","on_success_unit","customize_css","cta_button","module_fields","old_conditions","Settings_After_Content","enabled","animation","Settings_Popup_Model","appear_after","on_exit_trigger_once_per_session","appear_after_scroll","appear_after_time_val","appear_after_time_unit","appear_after_page_portion_val","appear_after_page_portion_unit","appear_after_element_val","add_never_see_this_message","close_button_acts_as_never_see_again","never_see_expiry","show_on_all_posts","excluded_posts","selected_posts","show_on_all_pages","excluded_pages","selected_pages","show_on_all_cats","show_on_these_cats","show_on_all_tags","show_on_these_tags","trigger_on_time","trigger_on_element_click","trigger_on_exit","trigger_on_adblock","trigger_on_adblock_timed","trigger_on_adblock_timed_val","trigger_on_adblock_timed_unit","Settings_Slide_In_Model","hide_after","hide_after_val","hide_after_unit","after_close","Settings_Model","shortcode_id","after_content","popup","slide_in","on_time","on_time_delay","on_time_unit","on_scroll","on_scroll_page_percent","on_scroll_css_selector","on_click_element","on_exit_intent","on_exit_intent_per_session","on_adblock","on_adblock_delayed","on_adblock_delayed_time","on_adblock_delayed_unit","get_tpl","layout_id","templates","Alert","click .inc-opt-alert-modal-close","click .inc-opt-alert-modal","click .inc-opt-alert-modal-close-btn","click .inc-opt-alert-modal-inner-container","close_text","ok","prevent_close","user_change","onbeforeunload","dont_navigate_away","step","activate_step","eq","slice","get_current_step","get_current","services","design","display","message_editor","change [name=\"animate\"]","conditions_view","update_conditions_label","replaceWith","toggle_animation","input","isOff","animation_list","skip_tinyMCE_sync","design_model","sync_message","sync_model_message","Media_Holder","media_holder","throttle","update_content","waitForTinyMCE","setInterval","tinyMCE","clearInterval","getContent","css_editor","stylables",".wph-modal.wph-modal-container .wph-modal--content ",".wph-modal.wph-modal-container.wph-customize-css h2.wph-modal--title ",".wph-modal.wph-modal-container.wph-customize-css .wph-modal--content h4.wph-modal--subtitle ",".wph-modal .wph-modal--content .wph-modal--message ",".wph-modal .wph-modal--content .wph-modal--image ",".wph-modal.wph-modal-container.wph-customize-css .wph-modal--content .wph-modal--image img ",".wph-modal .wph-modal--cta ",".wph-modal .wph-modal-never-see-again ","stylable_elements","main_bg_color","subtitle_color","link_static_color","link_hover_color","link_active_color","cta_static_background","cta_hover_background","cta_active_background","cta_static_color","cta_hover_color","cta_active_color","border_static_color","border_radius","border_type","drop_shadow_color","drop_shadow_x","drop_shadow_y","drop_shadow_blur","drop_shadow_spread","click .wph-stylable-element","create_color_pickers","apply_styles","create_css_editor","wpColorPicker","change","ui","color","toCSS","get_layout_colors","reduce","styles","$styles_el","color_type","selector","result","border_tpl","border_radius_tpl","weight","radius","drop_shadow_tpl","x","y","blur","spread","custom_css","ace","edit","getSession","setMode","setTheme","setUseWrapMode","setUseWorker","setShowPrintMargin","renderer","setShowGutter","setHighlightActiveLine","proxy","update_custom_css","getValue","insert_stylable_element","stylable","navigateFileEnd","insert","navigateLeft","focus","Delete_Confirmation","click .wph-accordions header","change .custom-content-toggle-activity","change .custom-content-toggle-tracking-activity","change .custom-content-toggle-type-activity","change .custom-content-toggle-test-activity","click .custom-content-edit","click .custom-content-delete","delete_confirmations","dismiss_legacy_popup_notice","toggle_accordion","$icon","toggle_activity","new_state","toggle_tracking_activity","toggle_type_activity","toggle_test_activity","delete","confirmation","before","Content","Design","customize_colors","border_hover_color","border_active_color","hide_image_on_mobile","image_position","cta_label","cta_target","Triggers","TypeBase","triggers","add_never_see_link","hModel","AfterContent","Popup","Slide_In","Magic_Bar","display_triggers_view","preview_modal","$preview_yield","click .wph-preview--mask","click .wph-preview--close","change #wph-preview-type-selector","Modal","change_type","update_slide_in_position_label","positions","message_box_tpl","preview","preview_model","initial_data","magic_bar","click .wph-toggletabs .can-open","click #save-and-next","click #next-step","click #save-and-finish","click #finish-setup","click .wph-preview--eye.wph-button","click .wph-js-cancel-design-changes","click .wph-js-back","click .wph-triggers--options label","click button#optin_message-tmce","change textarea#optin_message","keyup [data-attribute='optin_name']","content_view","design_view","after_content_view","popup_view","update_initial_state","render_message_box","enable_cancel","_set_preview_model","apply_proper_preview_styles","tinyMCE_toggled","text_area_update","handle_triggers","$selected_li","$siblings","after_content_contaner_classes","popup_contaner_classes","slide_in_contaner_classes","magic_bar_container_classes","_get_shortcode_id","$all","$togglable","$caret","_save","$btn","next","d","currUrl","pathname","search","responseJSON","history","replaceState","save_and_next","validate","done","next_step","click","save_and_finish","finish_setup","is_new","remove_error","$error_icon","opt_name","custom_content","no_name","open_preview","Preview","apply_custom_css","setTimeout","cancel_changes","go_back","$figure","$figtwo","$image","$imgtwo","$cabriolet","$simple","$minimal","design_model_data","$header","$footer","$modal_content","$modal_message","$modal_message_section","$modal_image","$modal_img","css_string","dataType","ready","service_model_json","services_model","_handle_icons_order","social_icons","$reorder_box","icon_style","$preview_box","$preview_container","$widget_preview_box","$widget_preview_container","icon_template","icon_template_html","icon_html","preview_icon_html","native_class","service_type","click_counter","counter","floating_preview_icon_html","widget_preview_icon_html","make_icons_sortable","sortArgs","items","revert","axis","containment","_reorder_icons","sortable","disableSelection","reordered","icons_order","icons_order_arr","pick","Object","order","change .social-sharing-toggle-activity","change .social-sharing-toggle-tracking-activity","change .social-sharing-toggle-type-activity","change .social-sharing-toggle-test-activity","click .social-sharing-edit","click .social-sharing-delete","Services","Appearance","icon_bg_color","icon_color","floating_social_bg","floating_inline_count","counter_border","counter_text","customize_widget_colors","widget_icon_bg_color","widget_icon_color","widget_bg_color","widget_drop_shadow","widget_drop_shadow_x","widget_drop_shadow_y","widget_drop_shadow_blur","widget_drop_shadow_spread","widget_drop_shadow_color","widget_inline_count","widget_counter_text","location_type","location_target","location_align_x","location_align_y","location_top","location_bottom","location_right","location_left","Floating_Social","click ul.wph-ss-service-type li label","click .wph-button.ss-save-changes","click .wph-button.ss-cancel","click .wph-button.ss-next-step","click .wph-button.ss-back","click .wph-button.ss-finish","change .wph-sshare--pick_social_icons input.wph-share-icon-enable","change .wph-sshare--pick_social_icons .wph-input--number input","change .wph-sshare--pick_social_icons .wph-sshare--input_wrap input","click ul.wph-share-icon_style [name=\"wph-sshare-type_icons_design\"]","click ul.wph-share-customize-color li > label","click ul.wph-share-widget-customize-color li > label","click ul.wph-sshare--pick_location_type li > label","click ul.wph-sshare--select_location_align_x li > label","click ul.wph-sshare--select_location_align_y li > label","services_view","appearance_view","floating_view","services_view_changes","icons_order_updated","appearance_view_changes","render_preview","render_service_view","render_appearance_view","$floating_container","floating_container_classes","_set_social_icons","appearance_data","box_shadow","widget_box_shadow","toggle_service_type","toggle_icon","is_checked","$parent_container","icon_counter_updated","icon_link_updated","toggle_icon_style","toggle_floating_custom_color","toggle_widget_custom_color","toggle_location_type","$selector_info","toggle_location_align","$additional_settings","data_field","ss_save","ss_id","$buttons","appearance","floating_social","_get_social_icons_data","resp","response","$save_buttons","ss_cancel","ss_next_step","$next_tab","ss_back","$prev_tab","prevAll","ss_finish","$opt_name","opt_name_placeholder","$warning","insertBefore","$social_containers","$sc","$toggle_input","icon","$counter","$link","counter_val","link","click .custom-content-legacy-toggle-activity","click .wph-button-legacy-quickedit-btn","click .custom-content-legacy-popup-save-quickedit","click .wph-button-legacy-migrate-btn","target_state","toggle_quick_edit","save_quick_edit","heading","subheading","quick_edit_btn","migrate","pagenow","Listing","Legacy_Listing","is_cc_limited","Content_View","Design_View","AfterContent_View","Popup_View","Slide_In_View","Display_Triggers_View","Conditions_View","Content_Model","AfterContent_Model","Popup_Model","Slide_In_Model","Magic_Bar_Model","content_model","after_content_model","popup_model","slide_in_model","magic_bar_model","is_ss_limited","Services_View","Appearance_View","Floating_View","Services_Model","Appearance_Model","Floating_Social_Model","appearance_model","floating_social_model","ErrorLog","controller","list","header_template","hasHeader","click .inc-opt-close-error-list","click .button-clear-logs","click .button-delete-logs","click .button-cancel-delete-logs","clearLogButton","exportButton","deleteConfirmation","getJSON","_wpnonce","error_log_nonce","logs","headers","toggleErrorLog","clearLogs","_clean","clear_log_nonce","cancelDelete","removeAttr","logShown","click .hustle-delete-optin","click .optin-active-state","click .button-view-email-list","change .optin-type-active-state","change .wpoi-testmode-active-state","change .optin-toggle-tracking-activity","click .button-view-log-list","set_testmode_visibiliy","toggle_optin_accordion","delete_optin","toggle_optin_activity","$overlay","$row","post","view_email_list","total","Subscription_List_Modal","active_toggle","speed","$test_mode_toggle","toggle_type_mode_activity","view_error_log_list","currentTarget","ErrorList","wrapper_class_tpl","view_email_list_cache","list_header_template","list_template","show_delay","click .inc-opt-close-emails-list","click .wpoi-complete-mask","delay_show","then","fields","field","subscriptions","is_free","dashboard_view","conversions_chart","chart_data","chart_options","empty_chart","default_dataset_options","fill","cubicInterpolationMode","borderCapStyle","borderDash","borderWidth","borderDashOffset","borderJoinStyle","pointBackgroundColor","pointBorderWidth","pointHoverRadius","pointHoverBorderColor","pointHoverBorderWidth","pointRadius","pointHitRadius","spanGaps","click .wph-icon.i-close","datasets","hustle_vars","conversion_chart_data","newds","backgroundColor","borderColor","pointBorderColor","pointHoverBackgroundColor","responsive","maintainAspectRatio","legend","scales","xAxes","time","unit","unitStepSize","tooltipFormat","displayFormat","previous_month","today","gridLines","yAxes","ticks","tooltips","callbacks","tooltipItem","returnArray","yLabel","cornerRadius","displayColors","hover","mode","intersect","toggle_overview","toggle_sshare_modal","handle_sshare_modal_pagination","canvas","$no_data","dashboard","not_enough_data","$module_table","module_table_height","sortBy","Chart","$parent_section","$stats_modal","sshare_modal_prev","sshare_modal_next","sshare_modal_goto","stopImmediatePropagation","$ul","$current","$page_number","$next","current_page","prev_target","$new_next_html","outerHTML","$new_html","page_number_html","insertAfter","sshare_show_page_content","$prev","next_target","$new_prev_html","next_next_page","page","ss_modal_template","$table_items","page_id","items_html","E_News","Modules_Activity","Provider","provider_args","render_in_previewr","noop","add_args","clear_provider_args","previousAttributes","clear","defer","iconClass","check_module_field","callback","get_module_field_nonce","fail","validate_custom_field","module_view","_updateOptions","$title","code","add_module_field","addbutton","_add_module_field","activecampaign","enter_url","resetReferrer","timer","constantcontact_nonce","api_secret","convertkit","enter_api_secret","hubspot_nonce","account_name","infusionsoft","enter_account_name","username","sendy","service_tab_view","email_list","$_preview","provider_args_template","provider_args_data","$prev_args","update_list_groups","$wrapper","$interests_wrapper","serializeArray","update_group_interests","group","update_selected_group_interests","filter","unselect_radio_interest","load_more_lists","$box","$placeholder","redirect_to","something_went_wrong","password","mautic","providers","installation_url","click .next-button button.wph-button-save","click .next-button button.wph-button-next","click .next-button button.wph-button-finish","click .wph-toggletabs--title.can-open","click .js-wph-optin-cancel","click .js-wph-optin-back","toggle_section","$current_panel","$next_panels","nextAll","$_next","back","$next_panel","$_prev_panel","click .next-button button","change #optin_new_provider_name","click .optin_refresh_provider_details","get_params","mix","toggle_optin_provider_settings","set_shortcode_id","update_model","undefined","validation","provider_name","provider_validation","_wrapped","size","_this","$field","ampersand","chain","compact","object","provider_change","serviceId","detailsContainer","remove_prev_provider_args","async","refresh_provider_details","$prev_provider_args","ModuleField","change [name]","click .wph-column-icon","field_container","reOrderFields","newSet","tr","_index","module_field","updateOptions","input_name","input_val","removeModule","field_key","success_editor","structure_tpl","module_fields_tpl","shapes_tpl","after_submit_tpl","color_pickers_tpl","optin_input_icons","module_index","link_color","fields_hover_background","fields_active_background","label_color","fields_hover_color","fields_active_color","error_color","button_hover_background","button_active_background","button_hover_label","button_active_label","checkmark_color","success_color","close_color","nsa_color","overlay_background","close_hover_color","nsa_hover_color","nsa_active_color","radio_background","radio_checked_background","checkbox_background","checkbox_checked_color","mcg_title_color","mcg_label_color","close_active_color","click .wph-preview--eye","change #optin_color_palettes","submit form.wpoi-form-wrap","change #optin-active-css","click #optin_apply_custom_css","mouseenter .wpoi-stylable-element","mouseleave .wpoi-stylable-element","click .wpoi-stylable-element","change #optin_fname","change #optin_lname","change #optin_customize_color_palette","change [name=\"on_success\"]","change [name=\"on_success_time\"]","change [name=\"on_success_unit\"]","change .wysiwyg-tab","click .add-new-module-field","click .wph-cancel-add-field","click .wph-add-new-field","keyup [data-name=\"label\"]","keyup [data-name=\"name\"]",".wpoi-hustle .wpoi-optin ",".wpoi-title ",".wpoi-message, .wpoi-message p ",".wpoi-form ",".wpoi-form .wpoi-subscribe-fname ",".wpoi-form .wpoi-subscribe-lname ",".wpoi-form .wpoi-subscribe-email ",".wpoi-form .wpoi-subscribe-send ","render_structure","render_color_pickers","render_shapes","render_on_submit","update_image_style","set_proper_image_location","sync_model_data","preview_type_changed","render_module_fields","create_editors","update_styles","update_borders_style","render_image_holder","json_data","wph_disabled","img_src","img_style","$img","cancel_dummy_optin_submit","update_color_palette","findWhere","_fix_layout_3_sizes","$parent","$child","$aside","$div","$element","$col","$sidebar","_bind_to_message_editor","_create_css_editor","highlight_stylable_element","$stylable","apply_proper_preview_classes","padding","background","$elements","wrapAll","tinymce","on_content_change","editor","getParam","dom","setStyle","refresh_editor","isObject","_create_color_pickers","method_name","warn","_toggleColorScheme","colorSelector","customColor","toggleCustomCSS","isOn","holder","update_optional_elements","vals","without","_show_args","form_field","has_args","updateMeta","toggleSuccessMessageFields","is_visible","container","newModuleField","cancelAddField","makerContainer","addNewField","datas","no_label","n","error_label","custom_field_already_exists","removeWarningIcons","Display_Triggers","widget_message_tpl","click .next-button a.previous","click .can-open.display-settings-icon span.open i.dev-icon","change #wpoi-after-content-state-toggle","change #wpoi-popup-state-toggle","change #wpoi-slide-in-state-toggle","toggle_after_content_animation_select","render_widget_message","move_selects_under_selected_radio","block_class","select_wrap","$second_radio","$tags_select","popup_conditions_view","slide_in_conditions_view","after_content_conditions_view","render_condition_labels","optin_type_toggle","$block","$p","toggle_boxes","classOpen","classClosed","currentClass","newClass","switchClass","go_to_design","condition_view","$els","Inc_Opt_Router","Router","routes","","display(/:optin_type)","route","f","is_limited","Email_Services_Tab","Provider_Args","Design_Tab","Display_Tab","wizard","Wizard","execute","routeIndex","adminpage","start"],"mappings":"CAAA,SAAAA,GACA,YAOAC,QAAAC,OAAA,SAAAF,EAAAG,EAAAC,GACA,GAAAC,MACAC,GACAC,SAAA,kBACAC,YAAA,0BACAC,OAAA,4BAGAC,EAAA,SAAAC,EAAAC,GACA,GAAAC,GAAAF,EAAAG,MAAA,IACA,IAAAD,EAAAE,OAAA,CACA,GAAAC,GAAA,SAAAL,EAAAM,GACA,GAAAC,GAAAP,EAAAG,MAAA,KACAK,EAAAD,EAAAE,OAAA,EAAA,GAAA,EAEA,IAAAD,EAAA,CAGA,GAAAD,EAAAH,OAIAE,EAAAE,GAAAF,EAAAE,WAJA,CACA,GAAAE,GA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EAAA3U,GAEA,GAAA28C,GAAA9/C,EAAA0H,KAAA7G,KAAAo+C,QAAAv7C,QAAAP,GAAA,CACA,IAAA28C,GAAA56C,MAAA+jB,KAAAxiB,QAiBA,MAFAvB,OAAAuZ,OAAAC,SAAA1e,EAAA0H,KAAA7G,KAAAo+C,QAAA/5C,MAAA+jB,KAAAxiB,QAAA,IAAA,IAEA,CAhBA,QAAAvB,MAAA+jB,KAAAxiB,SACA,IAAA,GACA,GAAAqvB,GAAA5wB,MAAA+jB,KAAAjf,MAAAkX,qBACA,IAAA4U,EAAA8c,OAKA,MAJA1tC,OAAA+jB,KAAAM,SAAAuM,WAEA5wB,MAAAuZ,OAAAC,SAAA1e,EAAA0H,KAAA7G,KAAAo+C,QAAA/5C,MAAA+jB,KAAAxiB,QAAA,IAAA,IAEA,EAWAvB,MAAA3E,OAAAa,QAAA,WAAA0W,EAAA3U,GACA6qC,GAAAA,EAAAhtC,MAAAH,KAAAiX,IAGAyR,SAAA,WACArkB,MAAA+jB,KAAAC,cAAA,IAGAM,OAAA,WAGAtkB,MAAA+jB,KAAAC,cAAA,IAGAO,QAAA,SAAAjf,GAEAtF,MAAA+jB,KAAAC,cAAA,GAGA1e,EAAAA,GAAA,GACA,KAAAA,GAAAvF,OAAA,sBAAAuF,GAAAhL,QAEAyF,OAAA,sBAAAuF,GAAAvI,KAAA,gCAAAb,QAAA,WAsBA2+C,WAAAA,UAAAn+C,QAAA,aAAA,UACA,yBAAAm+C,YACA76C,MAAAuZ,OAAA,GAAAsgC,gBACAv+C,SAAAm1B,QAAAqqB","file":"../admin.min.js","sourcesContent":["(function( $ ) {\r\n \"use strict\";\r\n\r\n /**\r\n * Defines the Hustle Object\r\n *\r\n * @type {{define, get_modules, get, modules}}\r\n */\r\n window.Hustle = (function ($, doc, win) {\r\n var _modules = {},\r\n _template_options = {\r\n evaluate: /<#([\\s\\S]+?)#>/g,\r\n interpolate: /\\{\\{\\{([\\s\\S]+?)\\}\\}\\}/g,\r\n escape: /\\{\\{([^\\}]+?)\\}\\}(?!\\})/g\r\n };\r\n\r\n var define = function (module_name, module) {\r\n var splits = module_name.split(\".\");\r\n if (splits.length) { // if module_name has more than one object name, then add the module definition recursively\r\n var recursive = function (module_name, modules) {\r\n var arr = module_name.split(\".\"),\r\n _module_name = arr.splice(0, 1)[0];\r\n\r\n if (!_module_name) return;\r\n\r\n\r\n if (!arr.length) {\r\n var invoked = module.call(null, $, doc, win);\r\n modules[_module_name] = _.isFunction(invoked) || typeof invoked === \"undefined\" ? invoked : _.extend(modules[_module_name] || {}, invoked);\r\n } else {\r\n modules[_module_name] = modules[_module_name] || {};\r\n }\r\n\r\n if (arr.length && _module_name)\r\n recursive(arr.join(\".\"), modules[_module_name]);\r\n };\r\n\r\n recursive(module_name, _modules);\r\n } else {\r\n var m = _modules[module_name] || {};\r\n _modules[module_name] = _.extend(m, module.call(null, $, doc, win));\r\n }\r\n },\r\n get_modules = function () {\r\n return _modules;\r\n },\r\n get = function (module_name) {\r\n if (module_name.split(\".\").length) { // recursively fetch the module\r\n var module = false,\r\n recursive = function (module_name, modules) {\r\n var arr = module_name.split(\".\"),\r\n _module_name = arr.splice(0, 1)[0];\r\n\r\n module = modules[_module_name];\r\n\r\n if (arr.length)\r\n recursive(arr.join(\".\"), modules[_module_name]);\r\n };\r\n\r\n recursive(module_name, _modules);\r\n return module;\r\n }\r\n\r\n return _modules[module_name] || false;\r\n },\r\n Events = _.extend({}, Backbone.Events),\r\n View = Backbone.View.extend({\r\n __base_events:{\r\n \"click .wph-tabs--wrap .wph-tabs--nav li label\": \"__base_toggle_tab\"\r\n },\r\n initialize: function () {\r\n this.events = _.extend({}, this.events, this.__base_events);\r\n\r\n if (_.isFunction(this.init_mix))\r\n this.init_mix.apply(this, arguments);\r\n\r\n\r\n\r\n if (this.render) {\r\n this.render = _.wrap(this.render, function (render) {\r\n this.trigger(\"before_render\");\r\n render.call(this);\r\n Events.trigger(\"view.rendered\", this);\r\n this.trigger(\"rendered\");\r\n });\r\n }\r\n\r\n if (_.isFunction(this.init))\r\n this.init.apply(this, arguments);\r\n },\r\n __base_toggle_tab: function(e){\r\n var $this = this.$( e.target ),\r\n href = ( $this.attr(\"href\") || \"\" ).replace(/^\\#/, \"\"),\r\n $content = href ? this.$( \"#\" + href ) : false,\r\n $wrap = $this.closest(\".wph-tabs--wrap\"),\r\n $li = $this.closest(\"li\");\r\n\r\n if( $content && $content.length ){\r\n $wrap.find( \".wph-tabs--content\" ).not( $content ).removeClass(\"current\");\r\n $content.addClass(\"current\");\r\n $li.addClass(\"current\");\r\n $li.siblings().removeClass(\"current\");\r\n }\r\n }\r\n }),\r\n template = _.memoize(function ( id ) {\r\n var compiled;\r\n return function ( data ) {\r\n compiled = compiled || _.template( document.getElementById( id ).innerHTML, null, _template_options );\r\n return compiled( data ).replace(\"/*<![CDATA[*/\", \"\").replace(\"/*]]>*/\", \"\");\r\n };\r\n }),\r\n create_template = _.memoize(function( str ){\r\n var cache;\r\n return function(data){\r\n cache = cache || _.template( str, null, _template_options );\r\n return cache( data );\r\n };\r\n }),\r\n get_template_options = function(){\r\n return $.extend( true, {}, _template_options );\r\n },\r\n cookie = (function(){\r\n // Get a cookie value.\r\n var get = function (name) {\r\n var i, c, cookie_name, value,\r\n ca = document.cookie.split(';');\r\n\r\n\r\n cookie_name = name + \"=\";\r\n\r\n for (i = 0; i < ca.length; i += 1) {\r\n c = ca[i];\r\n while (c.charAt(0) === ' ') {\r\n c = c.substring(1, c.length);\r\n }\r\n if (c.indexOf(cookie_name) === 0) {\r\n var _val = c.substring(cookie_name.length, c.length);\r\n return !_val ? _val : JSON.parse(_val);\r\n }\r\n }\r\n return null;\r\n };\r\n\r\n // Saves the value into a cookie.\r\n var set = function (name, value, days) {\r\n var date, expires;\r\n\r\n value = $.isArray(value) || $.isPlainObject(value) ? JSON.stringify(value) : value;\r\n\r\n if (!isNaN(days)) {\r\n date = new Date();\r\n date.setTime(date.getTime() + ( days * 24 * 60 * 60 * 1000 ));\r\n expires = \"; expires=\" + date.toGMTString();\r\n } else {\r\n expires = \"\";\r\n }\r\n\r\n document.cookie = name + \"=\" + value + expires + \"; path=/\";\r\n };\r\n return {\r\n set: set,\r\n get: get\r\n };\r\n }()),\r\n consts = (function(){\r\n return {\r\n Never_See_Aagain_Prefix: \"hustle_never_see_again-\",\r\n Module_Show_Count: \"hustle_module_show_count-\",\r\n\t\t\t\t\tSlide_Cookie_Prefix: 'hustle_slide_in_prefix-',\r\n\t\t\t\t\tSlide_Cookie_Hide_All: 'hustle_slide_in_hide_all-',\r\n\t\t\t\t\tSS_Module_Show_Count: 'hustle_ss_module_show_count-'\r\n };\r\n }());\r\n\r\n return {\r\n define: define,\r\n get_modules: get_modules,\r\n get: get,\r\n Events: Events,\r\n View: View,\r\n template: template,\r\n create_template: create_template,\r\n get_template_options: get_template_options,\r\n cookie: cookie,\r\n consts: consts\r\n };\r\n }(jQuery, document, window) );\r\n\r\n}(jQuery));","var Optin = Optin || {};\r\n\r\nOptin.View = {};\r\nOptin.Models = {};\r\nOptin.Events = {};\r\n\r\nif( typeof Backbone !== \"undefined\")\r\n _.extend(Optin.Events, Backbone.Events);\r\n(function( $ ) {\r\n \"use strict\";\r\n Optin.COOKIE_PREFIX = \"inc_optin_long_hidden-\";\r\n Optin.POPUP_COOKIE_PREFIX = \"inc_optin_popup_long_hidden-\";\r\n Optin.SLIDE_IN_COOKIE_PREFIX = \"inc_optin_slide_in_long_hidden-\";\r\n Optin.SLIDE_IN_COOKIE_HIDE_ALL = \"inc_optin_slide_in_hide_all\";\r\n \r\n Optin.global_mixin = function() {\r\n _.mixin({\r\n /**\r\n * Logs to console\r\n */\r\n log: function(){\r\n console.log( arguments );\r\n },\r\n /**\r\n * Converts val to boolian\r\n *\r\n * @param val\r\n * @returns {*}\r\n */\r\n toBool: function(val){\r\n if( _.isBoolean(val) )\r\n return val;\r\n\r\n if( _.isString( val ) && [\"true\", \"false\", \"1\"].indexOf( val.toLowerCase() ) !== -1 ){\r\n return val.toLowerCase() === \"true\" || val.toLowerCase() === \"1\" ? true : false;\r\n }\r\n\r\n if( _.isNumber( val ) )\r\n return !!val;\r\n\r\n if(_.isUndefined( val ) || _.isNull(val) || _.isNaN( val ) )\r\n return false;\r\n\r\n return val;\r\n },\r\n /**\r\n * Checks if val is truthy\r\n *\r\n * @param val\r\n * @returns {boolean}\r\n */\r\n isTrue: function(val) {\r\n if( _.isUndefined( val ) || _.isNull( val ) || _.isNaN( val ) )\r\n return false;\r\n\r\n if( _.isNumber( val ) )\r\n return val !== 0;\r\n\r\n val = val.toString().toLowerCase();\r\n return ['1', \"true\", \"on\"].indexOf( val ) !== -1;\r\n },\r\n isFalse: function(val){\r\n return !_.isTrue( val );\r\n },\r\n control_base: function(checked, current, attribute){\r\n attribute = _.isUndefined( attribute ) ? \"checked\" : attribute;\r\n checked = _.toBool(checked);\r\n current = _.isBoolean( checked ) ? _.isTrue( current ) : current;\r\n\r\n if(_.isEqual(checked, current )){\r\n return attribute + '=' + attribute;\r\n }\r\n return \"\";\r\n },\r\n /**\r\n * Returns checked=check if checked variable is equal to current state\r\n *\r\n *\r\n * @param checked checked state\r\n * @param current current state\r\n * @returns {*}\r\n */\r\n checked: function(checked, current){\r\n return _.control_base( checked, current, \"checked\" );\r\n },\r\n /**\r\n * Adds selected attribute\r\n *\r\n * @param selected\r\n * @param current\r\n * @returns {*}\r\n */\r\n selected: function(selected, current){\r\n return _.control_base( selected, current, \"selected\" );\r\n },\r\n /**\r\n * Adds disabled attribute\r\n *\r\n * @param disabled\r\n * @param current\r\n * @returns {*}\r\n */\r\n disabled: function( disabled, current ){\r\n return _.control_base( disabled, current, \"disabled\" );\r\n },\r\n /**\r\n * Returns css class based on the passed in condition\r\n *\r\n * @param conditon\r\n * @param cls\r\n * @param negating_cls\r\n * @returns {*}\r\n */\r\n class: function( conditon, cls, negating_cls ){\r\n\r\n if( _.isTrue( conditon ) )\r\n return cls;\r\n\r\n return typeof negating_cls !== \"undefined\" ? negating_cls : \"\";\r\n },\r\n /**\r\n * Returns class attribute with relevant class name\r\n *\r\n * @param conditon\r\n * @param cls\r\n * @param negating_cls\r\n * @returns {string}\r\n */\r\n add_class: function( conditon, cls, negating_cls ){\r\n return 'class={class}'.replace( \"{class}\", _.class( conditon, cls, negating_cls ) );\r\n },\r\n toUpperCase: function(str){\r\n return _.isString( str ) ? str.toUpperCase() : \"\";\r\n }\r\n });\r\n\r\n if( !_.findKey ) {\r\n _.mixin({\r\n findKey: function(obj, predicate, context) {\r\n predicate = cb(predicate, context);\r\n var keys = _.keys(obj), key;\r\n for (var i = 0, length = keys.length; i < length; i++) {\r\n key = keys[i];\r\n if (predicate(obj[key], key, obj)) return key;\r\n }\r\n }\r\n });\r\n }\r\n };\r\n \r\n Optin.global_mixin();\r\n \r\n \r\n /**\r\n * Recursive toJSON\r\n *\r\n * @returns {*}\r\n */\r\n Backbone.Model.prototype.toJSON = function() {\r\n var json = _.clone(this.attributes);\r\n for(var attr in json) {\r\n if((json[attr] instanceof Backbone.Model) || (Backbone.Collection && json[attr] instanceof Backbone.Collection)) {\r\n json[attr] = json[attr].toJSON();\r\n }\r\n }\r\n return json;\r\n };\r\n\r\n\r\n String.prototype.toInt = function(){\r\n return parseInt(this, 10);\r\n };\r\n\r\n String.prototype.isEmpty = function() {\r\n return (this.length === 0 || !this.trim());\r\n };\r\n\r\n Optin.template = _.memoize(function ( id ) {\r\n var compiled,\r\n\r\n options = {\r\n evaluate: /<#([\\s\\S]+?)#>/g,\r\n interpolate: /\\{\\{\\{([\\s\\S]+?)\\}\\}\\}/g,\r\n escape: /\\{\\{([^\\}]+?)\\}\\}(?!\\})/g\r\n };\r\n\r\n return function ( data ) {\r\n compiled = compiled || _.template( $( '#' + id ).html(), null, options );\r\n return compiled( data ).replace(\"/*<![CDATA[*/\", \"\").replace(\"/*]]>*/\", \"\");\r\n };\r\n });\r\n \r\n /**\r\n * Compatibility with other plugin/theme e.g. upfront\r\n *\r\n */\r\n Optin.template_compat = _.memoize(function ( id ) {\r\n var compiled;\r\n\r\n return function ( data ) {\r\n compiled = compiled || _.template( $( '#' + id ).html() );\r\n return compiled( data ).replace(\"/*<![CDATA[*/\", \"\").replace(\"/*]]>*/\", \"\");\r\n };\r\n });\r\n\r\n Optin.cookie = Hustle.cookie;\r\n\r\n $(document).on('blur', 'input, textarea, select', function(){\r\n\t var $this = $(this);\r\n\t if($this.is(':input[type=button], :input[type=submit], :input[type=reset]')) return;\r\n\t if( $this.val() && $this.val().trim && $this.val().trim() !== '' ) {\r\n\t\t $this.parent().addClass('wpoi-filled');\r\n\t\t} else{\r\n $this.parent().removeClass('wpoi-filled');\r\n }\r\n });\r\n\r\n Optin.Mixins = {\r\n _mixins: {},\r\n _services_mixins: {},\r\n _desing_mixins: {},\r\n _display_mixins: {},\r\n add: function(id, obj){\r\n this._mixins[id] = obj;\r\n },\r\n get_mixins: function(){\r\n return this._mixins;\r\n },\r\n add_services_mixin: function( id, obj ){\r\n this._services_mixins[id] = obj;\r\n },\r\n get_services_mixins: function(){\r\n return this._services_mixins;\r\n }\r\n };\r\n\r\n\r\n})( jQuery );\r\n","(function( $ ) {\r\n \"use strict\";\r\n\r\n Hustle.Optin = Optin;\r\n\r\n Optin.View.Template_Mixin = {\r\n events: {\r\n \"change input[type=text]\": \"set_model_texts\",\r\n \"keyup .wpoi_contenteditable\": \"set_model_contenteditables\",\r\n \"change input[type=radio]\": \"set_model_radios\",\r\n \"change select\": \"set_model_selects\",\r\n \"change input[type=checkbox]\": \"set_model_checkboxes\",\r\n \"blur input[type=text]\": \"set_model_selects\",\r\n \"blur input[type=number]\": \"set_model_selects\"\r\n },\r\n set_model_texts:function(e){\r\n var $el = $(e.target),\r\n attribute = $el.data('attribute');\r\n console.log( attribute, e.target.value );\r\n this.model.set(attribute, e.target.value );\r\n },\r\n set_model_contenteditables:function(e){\r\n var $el = $(e.target),\r\n attribute = $el.data('attribute');\r\n this.model.set(attribute, $el.text() );\r\n },\r\n set_model_radios: function(e){\r\n var $el = $(e.target),\r\n attribute = $el.data('attribute');\r\n this.model.set(attribute, e.target.value );\r\n },\r\n set_model_selects: function(e){\r\n var $el = $(e.target),\r\n attribute = $el.data('attribute');\r\n this.model.set(attribute, e.target.value );\r\n },\r\n set_model_checkboxes: function(e){\r\n var $el = $(e.target),\r\n attribute = $el.data('attribute');\r\n this.model.set(attribute, $el.is(\":checked\") );\r\n }\r\n };\r\n}(jQuery));","Hustle.define(\"Modal\", function($){\r\n \"use strict\";\r\n\r\n return Backbone.View.extend({\r\n template: Optin.template(\"hustle-modal-tpl\"),\r\n $mask: $('<div class=\"wph-modal--mask\"></div>'),\r\n opts: {\r\n\r\n },\r\n data:{\r\n id: \"\",\r\n type: \"popup\",\r\n style: \"\",\r\n title: \"\",\r\n subtitle: \"\",\r\n content: \"Content\",\r\n animation_in: \"\",\r\n animation_out: \"\",\r\n position: \"\"\r\n },\r\n events:{\r\n \"click .wph-modal--close a\": \"hide\",\r\n \"submit form\": \"fire_conversion_event\",\r\n \"click .wph-modal--cta\": \"fire_conversion_event\",\r\n \"click .wph-modal-never-see-again\": \"never_see_again\"\r\n },\r\n initialize: function( options ){\r\n this.opts = _.extend( {}, this.opts, options );\r\n if( options.template )\r\n this.template = options.template;\r\n\r\n this.render();\r\n return this;\r\n },\r\n render: function(){\r\n var data = _.extend( {}, this.data, this.model.toJSON() );\r\n\r\n this.type_data = data.types[ data.type ];\r\n\r\n this.animation_in = data.animation_in = data.types[ data.type ].animation_in || data.animation_in;\r\n this.animation_out = data.animation_out = data.types[ data.type ].animation_out || data.animation_out;\r\n\r\n data.position = data.types[ data.type ].position || data.position;\r\n\t\t\t\r\n\t\t\t// check cta_url if preceeds http\r\n\t\t\tdata = this.sanitize_cta_url(data);\r\n\t\t\t\r\n\t\t\t// enable fullscreen\r\n\t\t\tdata = this.enable_fullscreen(data);\r\n\t\t\t\r\n\t\t\t// handle custom size for custom content\r\n\t\t\tdata = this.handle_custom_size_cc(data);\r\n\t\t\t\r\n this.setElement( this.template( data ) );\r\n\r\n this.$mask = this.$mask.clone();\r\n this.$mask.on(\"click\", _.bind( this.clicked_background, this ) );\r\n\r\n this.$el.find( \"form\" ).on(\"submit\", _.bind( this.on_form_submit, this ) );\r\n\t\t\t\r\n\t\t\t// check if CC and scroll enabled\r\n\t\t\tthis.enable_body_scroll(data);\r\n\t\t\t\r\n\t\t\t// hide close button if on admin\r\n\t\t\tif( window.hasOwnProperty( \"optin_vars\" ) ) {\r\n\t\t\t\tvar $close_btn = this.$el.find('a.wph-icon.i-close');\r\n\t\t\t\tif ( $close_btn.length ) $close_btn.parent().hide();\r\n\t\t\t}\r\n\t\t\t\r\n return this;\r\n },\r\n hide: function(e){\r\n var self = this;\r\n if( e )\r\n e.preventDefault();\r\n\t\t\t\r\n if ( self.animation_in !== self.animation_out ) self.$el.removeClass( self.animation_in );\r\n _.delay(function(){\r\n\t\t\t\tif ( self.animation_out && !self.$el.hasClass(self.animation_out) ) {\r\n\t\t\t\t\tself.$el.addClass( self.animation_out );\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t_.delay( function(){\r\n\t\t\t\t\tself.$el.removeClass(\"wph-modal-show\");\r\n\t\t\t\t\tself.$el.prev(\".wph-modal--mask\").remove();\r\n\t\t\t\t\tHustle.Events.trigger(\"hide_modal\", self );\r\n\t\t\t\t\tself.trigger(\"hidden\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t// only for close button\r\n\t\t\t\t\tif( _.isTrue( self.type_data.close_btn_as_never_see ) && e && $(e.target).hasClass('wph-icon i-close') )\r\n\t\t\t\t\t\tself.never_see_again( e );\r\n }, 550 );\r\n\r\n }, 350);\r\n\t\t\t\r\n\t\t\t// remove any no-scroll class on html\r\n\t\t\t$('html').removeClass('no-scroll');\r\n },\r\n\t\tclicked_background: function(e){\r\n\t\t\tif ( !_.isTrue( this.type_data.not_close_on_background_click ) ) {\r\n\t\t\t\tthis.hide(e);\r\n\t\t\t}\r\n\t\t},\r\n show:function(){\r\n var self = this;\r\n if( !window.hasOwnProperty( \"optin_vars\" ) ){ // don't set cookie in admin\r\n var show_count_key = Hustle.consts.Module_Show_Count + this.model.get(\"type\") + \"-\" + this.model.get(\"id\"),\r\n current_show_count = Hustle.cookie.get( show_count_key );\r\n\r\n Hustle.cookie.set( show_count_key, current_show_count + 1, 90 );\r\n }\r\n\t\t\t\r\n if ( self.animation_in !== self.animation_out ) self.$el.removeClass( self.animation_out );\r\n _.delay( function(){\r\n self.$el.addClass(\"wph-modal-show\");\r\n self.trigger(\"shown\", self, self.model.get(\"type\"));\r\n Hustle.Events.trigger(\"show_modal\", self, self.model.get(\"type\") );\r\n\r\n _.delay( function(){\r\n\t\t\t\t\tif ( self.animation_in && !self.$el.hasClass(self.animation_in) ) {\r\n\t\t\t\t\t\tself.$el.addClass( self.animation_in );\r\n\t\t\t\t\t}\r\n }, 350 );\r\n\r\n }, 550 );\r\n\r\n },\r\n\t\tsanitize_cta_url: function( data ) {\r\n\t\t\tif ( data.cta_url ) {\r\n\t\t\t\tif (!/^(f|ht)tps?:\\/\\//i.test(data.cta_url)) {\r\n\t\t\t\t\tdata.cta_url = \"http://\" + data.cta_url;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn data;\r\n\t\t},\r\n\t\tenable_fullscreen: function( data ) {\r\n\t\t\tdata.fullscreen = '';\r\n\t\t\t// only for custom content popup\r\n\t\t\tif ( !data || typeof data.optin_provider === 'undefined' || typeof data.type === 'undefined' ) {\r\n\t\t\t\treturn data;\r\n\t\t\t}\r\n\t\t\tif ( data.optin_provider == 'custom_content' && data.type == 'popup' ) {\r\n\t\t\t\tif ( typeof this.type_data.make_fullscreen === 'undefined' ) {\r\n\t\t\t\t\treturn data;\r\n\t\t\t\t}\r\n\t\t\t\tif ( _.isTrue( this.type_data.make_fullscreen ) ) {\r\n\t\t\t\t\tdata.fullscreen = 'wph-modal-popup-fullscreen';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn data;\r\n\t\t},\r\n\t\thandle_custom_size_cc: function( data ){\r\n\t\t\tdata.custom_size_attr = '';\r\n\t\t\tdata.custom_size_class = '';\r\n\t\t\t// only for custom content\r\n\t\t\tif ( !data || typeof data.optin_provider === 'undefined' ) {\r\n\t\t\t\treturn data;\r\n\t\t\t}\r\n\t\t\tif ( data.optin_provider == 'custom_content' ) {\r\n\t\t\t\tif ( _.isTrue( data.customize_size ) ) {\r\n\t\t\t\t\tdata.custom_size_class = 'wph-modal--custom';\r\n\t\t\t\t\tdata.custom_size_attr += 'data-custom_width='+ data.custom_width +' data-custom_height='+ data.custom_height +'';\r\n\t\t\t\t}\r\n\t\t\t\tif ( _.isTrue( data.border ) ) {\r\n\t\t\t\t\tdata.custom_size_attr += ' data-border='+ data.border_weight;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn data;\r\n\t\t},\r\n\t\tenable_body_scroll: function( data ) {\r\n\t\t\t// only for custom content popup\r\n\t\t\tif ( !data || typeof data.optin_provider === 'undefined' || typeof data.type === 'undefined' ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif ( data.optin_provider == 'custom_content' && data.type == 'popup' ) {\r\n\t\t\t\tif ( typeof this.type_data.allow_scroll_page === 'undefined' ) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tif ( _.isTrue( this.type_data.allow_scroll_page ) ) {\r\n\t\t\t\t\t$('html').addClass('can-scroll');\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$('html').addClass('no-scroll');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n fire_conversion_event: function( e ){\r\n var source = $(e.target).hasClass( \"wph-modal--cta\" ) ? \"cta\" : \"form\";\r\n Hustle.Events.trigger(\"cc_modal_converted\", this, source);\r\n this.trigger(\"converted\", this, source);\r\n },\r\n never_see_again: function(e){\r\n if( e )\r\n e.preventDefault();\r\n\r\n if( !window.hasOwnProperty( \"optin_vars\" ) ) // don't set cookie in admin\r\n Hustle.cookie.set( Hustle.consts.Never_See_Aagain_Prefix + this.model.get(\"type\") + \"-\" + this.model.get(\"id\") , this.model.get(\"id\"), this.type_data.expiration_days );\r\n\r\n // do not hide if close button to avoid infinite loop\r\n\t\t\tif ( e && !$(e.target).hasClass('wph-icon i-close') ) {\r\n\t\t\t\tthis.hide();\r\n\t\t\t}\r\n },\r\n on_form_submit: function(e){\r\n var self = this,\r\n $form = $(e.target),\r\n on_submit = this.type_data.on_submit;\r\n\r\n switch ( on_submit ){\r\n case \"close\":\r\n self.hide();\r\n break;\r\n case \"redirect\":\r\n window.location.replace( $form.attr(\"action\") );\r\n break;\r\n case \"default\":\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n }\r\n });\r\n});","(function($){\r\n \"use strict\";\r\n Hustle.Events.on(\"view.rendered\", function(view){\r\n if( view instanceof Backbone.View)\r\n view.$(\".wpmuiSelect\").wpmuiSelect();\r\n });\r\n}(jQuery));","Hustle.define(\"Delete_Confirmation\", function($){\r\n \"use strict\";\r\n return Backbone.View.extend({\r\n template: Optin.template(\"hustle-delete-module-confirmation-tpl\"),\r\n className: \"hustle-delete-module-confirmation\",\r\n tagName: \"span\",\r\n opts:{\r\n id: \"\",\r\n nonce: \"\",\r\n action: \"\",\r\n url: ajaxurl\r\n },\r\n events: {\r\n \"click .hustle-delete-module-confirm\": \"confirm\",\r\n \"click .hustle-delete-module-cancel\": \"cancel\"\r\n },\r\n initialize: function( options ){\r\n this.opts = _.extend({}, this.opts, options);\r\n return this.render();\r\n },\r\n render: function(){\r\n this.$el.html( this.template() );\r\n return this;\r\n },\r\n confirm: function(e){\r\n e.preventDefault();\r\n e.stopPropagation();\r\n\r\n var self = this,\r\n $this = this.$( e.target ),\r\n $spinner = $(\"<span class='button-spinner'>\"),\r\n button_width = $this.outerWidth();\r\n\r\n $this.append( $spinner )\r\n .animate( { width: button_width + ( button_width * 0.2 ) })\r\n .attr(\"disabled\", true);\r\n\r\n\r\n $.ajax({\r\n url: this.opts.url,\r\n type: \"POST\",\r\n data: {\r\n action: this.opts.action,\r\n _ajax_nonce: this.opts.nonce,\r\n id: this.opts.id\r\n },\r\n complete: function(){\r\n $this.animate({ width: button_width })\r\n .attr( \"disabled\", false )\r\n .find( \".button-spinner\" ).remove();\r\n },\r\n success: function(res){\r\n if( self.opts.onSuccess && _.isFunction( self.opts.onSuccess ) )\r\n self.opts.onSuccess.call(this, res, self);\r\n }\r\n });\r\n },\r\n cancel: function(e){\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.remove();\r\n }\r\n });\r\n});","Hustle.define(\"Media_Holder\", function(){\r\n \"use strict\";\r\n return Backbone.View.extend({\r\n template: Optin.template(\"hustle-media-holder-tpl\"),\r\n media_frame: false,\r\n options: {\r\n attribute: \"image\",\r\n title: optin_vars.messages.media_uploader.select_or_upload,\r\n button_text: optin_vars.messages.media_uploader.use_this_image,\r\n multiple: false\r\n },\r\n events: {\r\n \"click .wph-media--add\": \"open\",\r\n \"click .wph-button--dots\": \"toggle_options\",\r\n \"click .i-close\": \"toggle_options\",\r\n \"click .wpoi-swap-image-button\": \"swap_image\",\r\n \"click .wpoi-delete-image-button\": \"delete_image\"\r\n },\r\n initialize: function( options ){\r\n this.options = _.extend( {}, this.options, options );\r\n if( !this.model || !this.options.attribute )\r\n throw new Error(\"Undefined model or attribute\");\r\n\t\t\t\r\n\t\t\tjQuery(document).on('click', this.close_media_options);\r\n\t\t\t\r\n this.render();\r\n },\r\n render: function(){\r\n var html = this.template({\r\n image: this.model.get( this.options.attribute )\r\n });\r\n this.setElement( html );\r\n this.define_media_frame();\r\n return this;\r\n },\r\n define_media_frame: function(){\r\n var self = this,\r\n $preview = this.$(\".wph-media--preview\"),\r\n $holder = this.$(\".wph-media--holder\"),\r\n $options = this.$(\".wph-media--options\");\r\n\r\n this.media_frame = wp.media({\r\n title: self.options.title,\r\n button: {\r\n text: self.options.button_text\r\n },\r\n multiple: self.options.multiple\r\n }).on( 'select', function() {\r\n\r\n var media = self.media_frame.state().get('selection').first().toJSON();\r\n\r\n if( media && media.url ){\r\n $preview.css( \"background-image\", \"url({url})\".replace(\"{url}\", media.url ));\r\n $holder.addClass(\"has-image\");\r\n self.model.set( self.options.attribute , media.url);\r\n $options.removeClass(\"hidden\");\r\n self.$(\".wph-media--add\").addClass(\"hidden\");\r\n }\r\n\r\n });\r\n },\r\n open: function(e){\r\n e.preventDefault();\r\n var $holder = this.$(\".wph-media--holder\");\r\n $holder.removeClass(\"has-image\");\r\n this.media_frame.open();\r\n },\r\n toggle_options: function(){\r\n this.$(\"wph-media--list\").toggleClass(\"wph-open\");\r\n this.$(\".wph-media--items\").toggleClass(\"hidden\");\r\n this.$(\".svg-triangle\").toggleClass(\"hidden\");\r\n },\r\n\t\tclose_media_options: function(e){\r\n\t\t\tvar $target = jQuery(e.target),\r\n\t\t\t\t$media = $target.closest('.wph-media--list');\r\n\t\t\t\r\n\t\t\tif ( $media.length === 0 && !$target.hasClass(\"wph-button wph-button--dots\") ) {\r\n\t\t\t\tvar $list = jQuery('.wph-media--list'),\r\n\t\t\t\t\t$items = $list.find(\".wph-media--items\"),\r\n\t\t\t\t\t$svg = $list.find(\".svg-triangle\")\r\n\t\t\t\t;\r\n\t\t\t\tif ( !$items.hasClass(\"hidden\") ) $items.addClass(\"hidden\");\r\n\t\t\t\tif ( !$svg.hasClass(\"hidden\") ) $svg.addClass(\"hidden\");\r\n\t\t\t}\r\n\t\t},\r\n swap_image: function(e){\r\n e.preventDefault();\r\n if( !this.media_frame ) return;\r\n\r\n this.media_frame.open();\r\n this.toggle_options();\r\n\r\n },\r\n delete_image: function(e){\r\n e.preventDefault();\r\n var $preview = this.$(\".wph-media--preview\");\r\n this.model.set( this.options.attribute, \"\" );\r\n $preview.css( \"background-image\", \"url('')\");\r\n this.toggle_options();\r\n this.$(\".wph-media--add\").removeClass(\"hidden\");\r\n this.$(\".wph-media--options\").addClass(\"hidden\");\r\n }\r\n });\r\n});","Hustle.define(\"Mixins.Model_Updater\", function($, doc, win) {\r\n \"use strict\";\r\n return {\r\n init_mix: function(){\r\n this.events = _.extend({}, this.events, this._events);\r\n this.delegateEvents();\r\n },\r\n _events:{\r\n \"change input[type='text']\" : \"_update_text\",\r\n \"change input[type='number']\" : \"_update_text\",\r\n \"change input[type='checkbox']\" : \"_update_checkbox\",\r\n \"change input[type=radio]\": \"_update_radios\",\r\n \"change select\": \"_update_select\"\r\n },\r\n _update_text: function(e){\r\n var $this = $(e.target),\r\n attr = $this.data(\"attribute\"),\r\n model = this[$this.data(\"model\") || \"model\"],\r\n opts = _.isTrue( $this.data(\"silent\") ) ? {silent: true} : {};\r\n\r\n if( model && attr ){\r\n e.stopPropagation();\r\n model.set.call( model, attr, e.target.value, opts );\r\n }\r\n\r\n },\r\n _update_checkbox: function(e){\r\n var $this = $(e.target),\r\n attr = $this.data(\"attribute\"),\r\n model = this[$this.data(\"model\") || \"model\"],\r\n opts = _.isTrue( $this.data(\"silent\") ) ? {silent: true} : {};\r\n\r\n\r\n if( model && attr ){\r\n e.stopPropagation();\r\n model.set.call( model, attr, $this.is(\":checked\") ? 1 : 0, opts );\r\n }\r\n\r\n },\r\n _update_radios: function(e){\r\n var $this = $(e.target),\r\n attribute = $this.data('attribute'),\r\n model = this[$this.data(\"model\") || \"model\"],\r\n opts = _.isTrue( $this.data(\"silent\") ) ? {silent: true} : {};\r\n\r\n\r\n if( model && attribute ){\r\n e.stopPropagation();\r\n model.set.call( model, attribute, e.target.value, opts );\r\n }\r\n\r\n\r\n },\r\n _update_select: function(e){\r\n var $this = $(e.target),\r\n attr = $this.data(\"attribute\"),\r\n model = this[$this.data(\"model\") || \"model\"],\r\n opts = _.isTrue( $this.data(\"silent\") ) ? {silent: true} : {};\r\n\r\n\r\n if( model && attr ){\r\n e.stopPropagation();\r\n model.set.call( model, attr, $this.val(), opts );\r\n }\r\n\r\n }\r\n };\r\n});\r\n","Hustle.define(\"Settings.Conditions_View\", function( $ ) {\r\n \"use strict\";\r\n return Hustle.View.extend({\r\n template: Optin.template(\"wpoi-wizard-popup-conditions\"),\r\n handle_tpl: Optin.template(\"wpoi-wizard-popup-conditions-handle\"),\r\n className: \"wph-conditions\",\r\n events: {\r\n 'click .wph-conditions--side .wph-conditions--item:not(.disabled)': 'toggle_condition',\r\n 'click .wph-conditions--side .wph-conditions--item:not(.disabled) span': 'toggle_condition',\r\n 'click .wph-conditions--item header': \"toggle_panel\"\r\n },\r\n init: function (opts) {\r\n this.type = opts.type;\r\n this.active_conditions = {};\r\n\r\n this.listenTo( this.model, \"change\", this.toggle_empty_message );\r\n\r\n this.render();\r\n },\r\n render: function () {\r\n var conditions = this.model.toJSON();\r\n this.$el.html( this.template( { type_name: this.type } ) );\r\n _.each(Optin.View.Conditions, function (condition, id) {\r\n var handle = this.handle_tpl({\r\n label: this.get_label(id),\r\n id: id,\r\n cid: this.get_condition_cid(id),\r\n active_class: conditions[id] ? \"added\" : '',\r\n icon_class: conditions[id] ? \"wpoi-remove\" : \"wpoi-add\"\r\n });\r\n\r\n // add handle\r\n this.$(\".wph-conditions--side .wph-conditions--items\").append(handle);\r\n }, this);\r\n\r\n _.each(conditions, function (condition, id) {\r\n this.add_condition_panel(id);\r\n }, this);\r\n\r\n this.toggle_empty_message();\r\n },\r\n get_condition_cid: function (id) {\r\n return this.type + \"_\" + id;\r\n },\r\n get_label: function (id) {\r\n var type_name = optin_vars.messages.settings[this.type] ? optin_vars.messages.settings[this.type] : this.type;\r\n return optin_vars.messages.conditions[id] ? optin_vars.messages.conditions[id].replace(\"{type_name}\", type_name) : id;\r\n },\r\n take_care_of_connected_conditions: function (this_condition) {\r\n /**\r\n * Disable those conditions which can't go with this condition\r\n */\r\n if (this_condition.disable && this_condition.disable.length) {\r\n _.each(this_condition.disable, function (disable_id, index) {\r\n var $disable_handle = this.$(\"#\" + this.get_condition_cid(disable_id));\r\n $disable_handle.toggleClass(\"disabled\");\r\n }, this);\r\n }\r\n },\r\n /**\r\n * Adds condition to optin type\r\n *\r\n * @param id\r\n * @param this_condition\r\n * @returns {*|{}}\r\n */\r\n add_condition: function (id, $handle) {\r\n var this_condition = this.add_condition_panel(id);\r\n /**\r\n * Add condition element\r\n */\r\n $handle.addClass(\"added\");\r\n $handle.find(\"span\").addClass(\"wpoi-remove\");\r\n $handle.find(\"span\").removeClass(\"wpoi-add\");\r\n\r\n this.model.set( id, this_condition.get_configs());\r\n return this.model.toJSON();\r\n\r\n },\r\n /**\r\n * Removes conditon from optin type\r\n * @param id\r\n */\r\n remove_condition: function (id, this_condition, $handle) {\r\n this.take_care_of_connected_conditions(this_condition);\r\n\t\t\t\r\n\t\t\tthis_condition.off(\"change:update_label\");\r\n this_condition.remove();\r\n\t\t\t\r\n delete this.active_conditions[id];\r\n $handle.removeClass(\"added\");\r\n $handle.find(\"span\").removeClass(\"wpoi-remove\");\r\n $handle.find(\"span\").addClass(\"wpoi-add\");\r\n\r\n this.model.unset(id);\r\n },\r\n /**\r\n * Add condition pannel\r\n *\r\n * @param id\r\n * @returns {*}\r\n */\r\n add_condition_panel: function (id) {\r\n\t\t\tif ( typeof Optin.View.Conditions[id] === 'undefined' ) return;\r\n\t\t\t\r\n var this_condition = this.active_conditions[id] = new Optin.View.Conditions[id]({\r\n model: this.model,\r\n type: this.type\r\n });\r\n\r\n if(_.isEmpty( this.active_conditions ) )\r\n this.$(\".wph-conditions--box .wph-conditions--items\").html(\"\");\r\n\r\n this.take_care_of_connected_conditions(this_condition);\r\n\r\n /**\r\n * Append condition panel\r\n */\r\n var me = this;\r\n this_condition.on(\"change:update_label\", function() {\r\n\t\t\t\tme.trigger(\"change:update_view_label\", me);\r\n\t\t\t});\r\n this.$(\".wph-conditions--box .wph-conditions--items\").append(this_condition.$el);\r\n return this_condition;\r\n },\r\n /**\r\n * Toggles each of the conditions\r\n *\r\n * @param e\r\n */\r\n toggle_condition: function (e) {\r\n e.stopPropagation();\r\n\r\n var id = this.$(e.target).data(\"id\") || this.$(e.target).closest(\".wph-conditions--item\").data(\"id\"),\r\n $handle = this.$('#' + this.get_condition_cid(id)),\r\n this_condition = this.active_conditions[id];\r\n\r\n if (this_condition) {\r\n this.remove_condition(id, this_condition, $handle);\r\n this.trigger(\"condition_removed\", this, id, this_condition);\r\n } else {\r\n this.add_condition(id, $handle);\r\n this.trigger(\"condition_added\", this, id, this_condition);\r\n }\r\n\r\n this.trigger(\"toggle_condition\", this, id, this_condition);\r\n },\r\n toggle_empty_message: function(){\r\n\r\n if( this.model.isEmpty() )\r\n this.$(\".wph-conditions--empty\").show();\r\n else\r\n this.$(\".wph-conditions--empty\").hide();\r\n\r\n },\r\n\t\ttoggle_panel: _.debounce( function(e) {\r\n\t\t\tvar $this = $(e.target),\r\n\t\t\t\t$panel = $this.closest(\".wph-conditions--item\"),\r\n\t\t\t\t$section = $panel.find( \"section\");\r\n\r\n\t\t\t$section.slideToggle(300, function(){\r\n\t\t\t\t$panel.toggleClass(\"wph-conditions--closed wph-conditions--open\");\r\n\t\t\t});\r\n\t\t}, 300),\r\n /**\r\n * Returns labels of aggregate conditions\r\n *\r\n * @returns {string}\r\n */\r\n get_conditions_labels: function(){\r\n var labels = _.pluck( this.active_conditions, \"label\" ),\r\n tpl = Hustle.create_template(\"<span>{{label}}</span>\");\r\n return labels.length\r\n ? labels.map( function(label) { return tpl( {label: label} ); } ).join( \", \" )\r\n : optin_vars.messages.condition_labels.everywhere;\r\n },\r\n\t\t/**\r\n * Returns labels of aggregate conditions and default conditions\r\n *\r\n * @returns {string}\r\n */\r\n get_all_conditions_labels: function(){\r\n var conditions = this.active_conditions;\r\n\t\t\tvar default_conditions = {\r\n\t\t\t\t'posts': {\r\n\t\t\t\t\t'label' : optin_vars.messages.condition_labels.all_posts\r\n\t\t\t\t},\r\n\t\t\t\t'pages': {\r\n\t\t\t\t\t'label' : optin_vars.messages.condition_labels.all_pages\r\n\t\t\t\t},\r\n\t\t\t\t'categories': {\r\n\t\t\t\t\t'label' : optin_vars.messages.condition_labels.all_categories\r\n\t\t\t\t},\r\n\t\t\t\t'tags': {\r\n\t\t\t\t\t'label' : optin_vars.messages.condition_labels.all_tags\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\tvar default_labels = [];\r\n\t\t\t\r\n\t\t\t// append defaults\r\n\t\t\tfor ( var key in default_conditions ) {\r\n\t\t\t\tif ( typeof conditions[key] === 'undefined' ) {\r\n\t\t\t\t\tdefault_labels.push(default_conditions[key]['label']);\r\n\t\t\t\t}\r\n\t\t\t}\r\n var labels = _.pluck( conditions, \"label\" ),\r\n tpl = Hustle.create_template(\"<span>{{label}}</span>\");\r\n\t\t\tlabels = labels.concat(default_labels);\r\n\t\t\t\r\n return labels.length\r\n ? labels.map( function(label) { return tpl( {label: label} ); } ).join( \", \" )\r\n : optin_vars.messages.condition_labels.everywhere;\r\n }\r\n });\r\n});","(function( $ ) {\r\n \"use strict\";\r\n Optin.View.Conditions = Optin.View.Conditions || {};\r\n\r\n var Condition_Base = Hustle.View.extend({\r\n condition_id: \"\",\r\n className: \"wph-conditions--item wph-conditions--open\",\r\n _template: Optin.template('wpoi-wizard-popup-conditions-item'),\r\n template: false,\r\n _defaults: {\r\n type_name: \"\",\r\n condition_name: \"\",\r\n label: \"\"\r\n },\r\n _events:{\r\n 'change input': 'change_input',\r\n 'change textarea': 'change_input',\r\n 'change select': 'change_input'\r\n },\r\n init: function( opts ){\r\n this.type = opts.type;\r\n this.id = this.type + \"-\" + this.condition_id;\r\n this.template = ( typeof this.cpt !== 'undefined' )\r\n\t\t\t\t? Optin.template('wpoi-condition-post_type')\r\n\t\t\t\t: Optin.template('wpoi-condition-' + this.condition_id );\r\n\r\n /**\r\n * Defines type_name and condition_name based on type and id so that it can be used in the template later on\r\n *\r\n * @type {Object}\r\n * @private\r\n */\r\n this._defaults = {\r\n type_name: optin_vars.messages.settings[ this.type ] ? optin_vars.messages.settings[ this.type ] : this.type,\r\n condition_name: optin_vars.messages.conditions[ this.condition_id ] ? optin_vars.messages.conditions[ this.condition_id ] : this.condition_id\r\n };\r\n\r\n this.data = this.get_data();\r\n\r\n this.render();\r\n this.events = $.extend( true, {}, this.events, this._events );\r\n this.delegateEvents();\r\n if( this.on_init && _.isFunction( this.on_init ) )\r\n this.on_init.apply( this, arguments );\r\n return this;\r\n },\r\n get_data: function(){\r\n return _.extend( {}, this._defaults, this.defaults, this.model.get( this.condition_id ), {type: this.type } );\r\n },\r\n get_title: function(){\r\n return this.title.replace(\"{type_name}\", this.data.type_name);\r\n },\r\n get_body: function(){\r\n return typeof this.body === \"function\" ? this.body.apply(this, arguments ) : this.body.replace(\"{type_name}\", this.data.type_name );\r\n },\r\n get_header: function(){\r\n return \"\";\r\n },\r\n render: function(){\r\n var html = this._template(_.extend({}, {\r\n title: this.get_title(),\r\n body: this.get_body(),\r\n header: this.get_header()\r\n },\r\n this._defaults,\r\n {type: this.type}\r\n ) );\r\n\r\n this.$el.html( html );\r\n\r\n if( this.rendered && typeof this.rendered === \"function\")\r\n this.rendered.apply(this, arguments);\r\n\r\n return this;\r\n },\r\n /**\r\n * Updates attribute value into the condition hash\r\n *\r\n * @param attribute\r\n * @param val\r\n */\r\n update_attribute: function(attribute, val){\r\n this.data = this.model.get( this.condition_id );\r\n this.data[ attribute ] = val;\r\n\t\t\tthis.model.set(this.condition_id , this.data );\r\n this.model.trigger(\"change\", val);\r\n \r\n },\r\n get_attribute: function(attribute){\r\n var data = this.model.get( this.condition_id );\r\n return data && data[ attribute ] ? data[ attribute ] : false;\r\n },\r\n /**\r\n * Triggered on input change\r\n *\r\n * @param e\r\n * @returns {*}\r\n */\r\n change_input: function(e){\r\n var el = e.target,\r\n attribute = el.getAttribute(\"data-attribute\"),\r\n $el = $(el),\r\n val = $el.is(\".js-wpoi-select\") ? $el.val() : e.target.value;\r\n\t\t\t\t\r\n\t\t\t// skip for input search\r\n\t\t\tif ( $el.is(\".select2-search__field\") ) return false;\r\n \r\n // clean leaking old search results\r\n _.delay(function(){\r\n var search_results = $('.select2-results').parents('.select2-container');\r\n if ( search_results.length ) {\r\n search_results.remove();\r\n }\r\n }, 500);\r\n\t\t\t\r\n return this.update_attribute( attribute, val );\r\n },\r\n /**\r\n * Returns configs of condition\r\n *\r\n * @returns bool true\r\n */\r\n get_configs: function(){\r\n return this.defaults || true;\r\n }\r\n });\r\n\r\n var reanable_scroll = function(){\r\n\t\t/**\r\n\t\t * Reanable scrolling for the container\r\n\t\t * select2 disables scrolling after select so we reanable it\r\n\t\t */\r\n\t\t$(\".wph-conditions--items\").data(\"select2ScrollPosition\", {});\r\n\t},\r\n\teither_all_or_others = function(e){\r\n var val = [\"all\"];\r\n if( e.params && e.params.args && e.params.args.data && e.params.args.data.id && \"all\" === e.params.args.data.id ){\r\n\r\n }else{\r\n val = $(this).val();\r\n if( val && -1 !== val.indexOf( \"all\" ) )\r\n val.splice( val.indexOf( \"all\" ), 1 );\r\n else\r\n val = ( val || [] ).concat( [e.params.args.data.id ] );\r\n\t\t\t\r\n if( !val || !val.length )\r\n val = [ e.params.args.data.id ];\r\n }\r\n\r\n $(this).val(val).trigger(\"change\");\r\n },\r\n Toggle_Button_Toggler_Mixin = {\r\n events: {\r\n \"change input[type='radio']\": \"set_current_li\"\r\n },\r\n set_current_li: function(e){\r\n var $this = $(e.target),\r\n $li = $this.closest(\"li\");\r\n\r\n $li.siblings().removeClass(\"current\");\r\n $li.toggleClass( \"current\", $this.is(\":checked\") );\r\n }\r\n };\r\n\r\n /**\r\n * Posts\r\n */\r\n Optin.View.Conditions.posts = Condition_Base.extend(_.extend( {}, Toggle_Button_Toggler_Mixin, {\r\n condition_id: \"posts\",\r\n title: optin_vars.messages.conditions.posts,\r\n label: optin_vars.messages.condition_labels.posts,\r\n defaults: {\r\n filter_type: \"only\", // except | only\r\n posts: []\r\n },\r\n on_init: function(){\r\n\t\t\tthis.listenTo(this.model, \"change\", this.render );\r\n\t\t\tthis.update_label();\r\n },\r\n get_header: function(){\r\n\t\t\tthis.update_label();\r\n\t\t\tthis.trigger(\"change:update_label\", this);\r\n if( _.contains( this.get_attribute( \"posts\" ), \"all\" ) )\r\n return this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.all_posts : optin_vars.messages.condition_labels.no_posts;\r\n\r\n if( this.get_attribute( \"posts\" ).length ) {\r\n\t\t\t\treturn ( this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.only_on_these_posts : optin_vars.messages.condition_labels.except_these_posts ).replace(\"{number}\", this.get_attribute( \"posts\" ).length );\r\n\t\t\t} else {\r\n\t\t\t\treturn ( this.get_attribute(\"filter_type\") === \"only\" ) ? optin_vars.messages.condition_labels.no_posts : optin_vars.messages.condition_labels.all_posts;\r\n\t\t\t}\r\n },\r\n\t\tupdate_label: function(){\r\n\t\t\tif ( this.get_attribute( \"posts\" ).length && !_.contains( this.get_attribute( \"posts\" ), \"all\" ) ) {\r\n\t\t\t\tthis.label = ( this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.number_posts : optin_vars.messages.condition_labels.except_these_posts ).replace(\"{number}\", this.get_attribute( \"posts\" ).length ? this.get_attribute( \"posts\" ).length : 0 );\r\n\t\t\t} else {\r\n\t\t\t\tif( _.contains( this.get_attribute( \"posts\" ), \"all\" ) ) {\r\n\t\t\t\t\tthis.label = this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.all_posts : optin_vars.messages.condition_labels.no_posts;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.label = this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.no_posts : optin_vars.messages.condition_labels.all_posts;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n body: function(){\r\n return this.template( this.get_data() );\r\n },\r\n rendered: function(){\r\n this.$('.js-wpoi-select').wpmuiSelect({\r\n tags: \"true\",\r\n width : \"100%\",\r\n\t\t\t\tcreateTag: function(){ return false; }\r\n })\r\n .on('select2:selecting', either_all_or_others )\r\n .on('select2:selecting', reanable_scroll )\r\n .on('select2:unselect', reanable_scroll);\r\n \r\n }\r\n }) );\r\n\r\n /**\r\n * Pages\r\n */\r\n Optin.View.Conditions.pages = Condition_Base.extend(_.extend( {}, Toggle_Button_Toggler_Mixin, {\r\n condition_id: \"pages\",\r\n title: optin_vars.messages.conditions.pages,\r\n label: optin_vars.messages.condition_labels.pages,\r\n defaults: {\r\n filter_type: \"only\", // except | only\r\n pages: []\r\n },\r\n on_init: function(){\r\n this.listenTo(this.model, \"change\", this.render );\r\n\t\t\tthis.update_label();\r\n },\r\n get_header: function(){\r\n\t\t\tthis.update_label();\r\n\t\t\tthis.trigger(\"change:update_label\", this);\r\n\t\t\tif( _.contains( this.get_attribute( \"pages\" ), \"all\" ) )\r\n return this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.all_pages : optin_vars.messages.condition_labels.no_pages;\r\n\r\n if( this.get_attribute( \"pages\" ).length ) {\r\n\t\t\t\treturn ( this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.only_on_these_pages : optin_vars.messages.condition_labels.except_these_pages ).replace(\"{number}\", this.get_attribute( \"pages\" ).length );\r\n\t\t\t} else {\r\n\t\t\t\treturn ( this.get_attribute(\"filter_type\") === \"only\" ) ? optin_vars.messages.condition_labels.no_pages : optin_vars.messages.condition_labels.all_pages;\r\n\t\t\t}\r\n },\r\n\t\tupdate_label: function(){\r\n\t\t\tif ( this.get_attribute( \"pages\" ).length && !_.contains( this.get_attribute( \"pages\" ), \"all\" ) ) {\r\n\t\t\t\tthis.label = ( this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.number_pages : optin_vars.messages.condition_labels.except_these_pages ).replace(\"{number}\", this.get_attribute( \"pages\" ).length ? this.get_attribute( \"pages\" ).length : 0 );\r\n\t\t\t} else {\r\n\t\t\t\tif( _.contains( this.get_attribute( \"pages\" ), \"all\" ) ) {\r\n\t\t\t\t\tthis.label = this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.all_pages : optin_vars.messages.condition_labels.no_pages;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.label = this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.no_pages : optin_vars.messages.condition_labels.all_pages;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n body: function(){\r\n return this.template( this.get_data() );\r\n },\r\n rendered: function(){\r\n this.$('.js-wpoi-select').wpmuiSelect({\r\n tags: \"true\",\r\n width : \"100%\",\r\n\t\t\t\t\tcreateTag: function(){ return false; }\r\n })\r\n .on('select2:selecting', either_all_or_others )\r\n .on('select2:selecting', reanable_scroll )\r\n .on('select2:unselect', reanable_scroll);\r\n\r\n }\r\n }));\r\n\t\r\n\t/**\r\n * Custom Post Types\r\n */\r\n\t_.each( optin_vars.post_types, function( cpt_details, cpt ) {\r\n\t\tvar cpt_name = cpt_details.label.toLowerCase();\r\n\t\tOptin.View.Conditions[cpt_details.label] = Condition_Base.extend(_.extend( {}, Toggle_Button_Toggler_Mixin, {\r\n\t\t\tcondition_id: cpt_details.label,\r\n\t\t\ttitle: cpt_details.label,\r\n\t\t\tlabel: optin_vars.messages.condition_labels.posts,\r\n\t\t\tcpt: true,\r\n\t\t\tdefaults: {\r\n\t\t\t\tfilter_type: \"only\", // except | only\r\n\t\t\t\tselected_cpts: [],\r\n\t\t\t\tpost_type: cpt,\r\n\t\t\t\tpost_type_label: cpt_details.label,\r\n\t\t\t},\r\n\t\t\ton_init: function(){\r\n\t\t\t\tthis.listenTo(this.model, \"change\", this.render );\r\n\t\t\t\tthis.update_label();\r\n\t\t\t},\r\n\t\t\tget_header: function(){\r\n\t\t\t\tthis.update_label();\r\n\t\t\t\tthis.trigger(\"change:update_label\", this);\r\n\t\t\t\tif( _.contains( this.get_attribute( \"selected_cpts\" ), \"all\" ) )\r\n\t\t\t\t\treturn this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.all + \" \" + cpt_name : optin_vars.messages.condition_labels.no + \" \" + cpt_name;\r\n\r\n\t\t\t\tif( this.get_attribute( \"selected_cpts\" ).length ) {\r\n\t\t\t\t\treturn ( this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.only_on_these_posts : optin_vars.messages.condition_labels.except_these_posts ).replace(\"{number}\", this.get_attribute( \"selected_cpts\" ).length ).replace(\"posts\", cpt_name);\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn ( this.get_attribute(\"filter_type\") === \"only\" ) ? optin_vars.messages.condition_labels.no + \" \" + cpt_name : optin_vars.messages.condition_labels.all + \" \" + cpt_name;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tupdate_label: function(){\r\n\t\t\t\tif ( this.get_attribute( \"selected_cpts\" ).length && !_.contains( this.get_attribute( \"selected_cpts\" ), \"all\" ) ) {\r\n\t\t\t\t\tthis.label = ( this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.number_posts : optin_vars.messages.condition_labels.except_these_posts ).replace(\"{number}\", this.get_attribute( \"selected_cpts\" ).length ? this.get_attribute( \"selected_cpts\" ).length : 0 ).replace(\"posts\", cpt_name);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif( _.contains( this.get_attribute( \"selected_cpts\" ), \"all\" ) ) {\r\n\t\t\t\t\t\tthis.label = this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.all + \" \" + cpt_name : optin_vars.messages.condition_labels.no + \" \" + cpt_name;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.label = this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.no + \" \" + cpt_name : optin_vars.messages.condition_labels.all + \" \" + cpt_name;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tbody: function(){\r\n\t\t\t\treturn this.template( this.get_data() );\r\n\t\t\t},\r\n\t\t\trendered: function(){\r\n\t\t\t\tthis.$('.js-wpoi-select').wpmuiSelect({\r\n\t\t\t\t\ttags: \"true\",\r\n\t\t\t\t\twidth : \"100%\",\r\n\t\t\t\t\tcreateTag: function(){ return false; }\r\n\t\t\t\t})\r\n\t\t\t\t.on('select2:selecting', either_all_or_others )\r\n\t\t\t\t.on('select2:selecting', reanable_scroll )\r\n\t\t\t\t.on('select2:unselect', reanable_scroll);\r\n\t\t\t}\r\n\t\t}) );\r\n\t});\r\n\r\n /**\r\n * Categories\r\n */\r\n Optin.View.Conditions.categories = Condition_Base.extend(_.extend( {}, Toggle_Button_Toggler_Mixin, {\r\n condition_id: \"categories\",\r\n title: optin_vars.messages.conditions.categories,\r\n label: optin_vars.messages.condition_labels.categories,\r\n defaults: {\r\n filter_type: \"only\", // except | only\r\n categories: []\r\n },\r\n on_init: function(){\r\n this.listenTo(this.model, \"change\", this.render );\r\n\t\t\tthis.update_label();\r\n },\r\n get_header: function(){\r\n\t\t\tthis.update_label();\r\n\t\t\tthis.trigger(\"change:update_label\", this);\r\n\t\t\t\r\n\t\t\tif( _.contains( this.get_attribute( \"categories\" ), \"all\" ) )\r\n return this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.all_categories : optin_vars.messages.condition_labels.no_categories;\r\n\r\n if( this.get_attribute( \"categories\" ).length ) {\r\n\t\t\t\treturn ( this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.only_on_these_categories : optin_vars.messages.condition_labels.except_these_categories ).replace(\"{number}\", this.get_attribute( \"categories\" ).length );\r\n\t\t\t} else {\r\n\t\t\t\treturn ( this.get_attribute(\"filter_type\") === \"only\" ) ? optin_vars.messages.condition_labels.no_categories : optin_vars.messages.condition_labels.all_categories;\r\n\t\t\t}\r\n },\r\n\t\tupdate_label: function(){\r\n\t\t\tif ( this.get_attribute( \"categories\" ).length && !_.contains( this.get_attribute( \"categories\" ), \"all\" ) ) {\r\n\t\t\t\tthis.label = ( this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.number_categories : optin_vars.messages.condition_labels.except_these_categories ).replace(\"{number}\", this.get_attribute( \"categories\" ).length ? this.get_attribute( \"categories\" ).length : 0 );\r\n\t\t\t} else {\r\n\t\t\t\tif( _.contains( this.get_attribute( \"categories\" ), \"all\" ) ) {\r\n\t\t\t\t\tthis.label = this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.all_categories : optin_vars.messages.condition_labels.no_categories;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.label = this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.no_categories : optin_vars.messages.condition_labels.all_categories;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n body: function(){\r\n return this.template( this.get_data() );\r\n },\r\n rendered: function(){\r\n this.$('.js-wpoi-select').wpmuiSelect({\r\n tags: \"true\",\r\n width : \"100%\",\r\n\t\t\t\t\tcreateTag: function(){ return false; }\r\n })\r\n\t\t\t.on('select2:selecting', reanable_scroll )\r\n .on('select2:unselect', reanable_scroll);\r\n }\r\n }));\r\n\r\n /**\r\n * Tags\r\n */\r\n Optin.View.Conditions.tags = Condition_Base.extend(_.extend( {}, Toggle_Button_Toggler_Mixin, {\r\n condition_id: \"tags\",\r\n title: optin_vars.messages.conditions.tags,\r\n label: optin_vars.messages.condition_labels.tags,\r\n defaults: {\r\n filter_type: \"only\", // except | only\r\n tags: []\r\n },\r\n on_init: function(){\r\n this.listenTo(this.model, \"change\", this.render );\r\n\t\t\tthis.update_label();\r\n },\r\n get_header: function(){\r\n\t\t\tthis.update_label();\r\n\t\t\tthis.trigger(\"change:update_label\", this);\r\n\t\t\tif( _.contains( this.get_attribute( \"tags\" ), \"all\" ) )\r\n return this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.all_tags : optin_vars.messages.condition_labels.no_tags;\r\n\r\n if( this.get_attribute( \"tags\" ).length ) {\r\n\t\t\t\treturn ( this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.only_on_these_tags : optin_vars.messages.condition_labels.except_these_tags ).replace(\"{number}\", this.get_attribute( \"tags\" ).length );\r\n\t\t\t} else {\r\n\t\t\t\treturn ( this.get_attribute(\"filter_type\") === \"only\" ) ? optin_vars.messages.condition_labels.no_tags : optin_vars.messages.condition_labels.all_tags;\r\n\t\t\t}\r\n },\r\n\t\tupdate_label: function(){\r\n\t\t\tif ( this.get_attribute( \"tags\" ).length && !_.contains( this.get_attribute( \"tags\" ), \"all\" ) ) {\r\n\t\t\t\tthis.label = ( this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.number_tags : optin_vars.messages.condition_labels.except_these_tags ).replace(\"{number}\", this.get_attribute( \"tags\" ).length ? this.get_attribute( \"tags\" ).length : 0 );\r\n\t\t\t} else {\r\n\t\t\t\tif( _.contains( this.get_attribute( \"tags\" ), \"all\" ) ) {\r\n\t\t\t\t\tthis.label = this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.all_tags : optin_vars.messages.condition_labels.no_tags;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.label = this.get_attribute(\"filter_type\") === \"only\" ? optin_vars.messages.condition_labels.no_tags : optin_vars.messages.condition_labels.all_tags;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n body: function(){\r\n return this.template( this.get_data() );\r\n },\r\n rendered: function(){\r\n this.$('.js-wpoi-select').wpmuiSelect({\r\n tags: \"true\",\r\n width : \"100%\",\r\n\t\t\t\t\tcreateTag: function(){ return false; }\r\n })\r\n\t\t\t.on('select2:selecting', reanable_scroll )\r\n .on('select2:unselect', reanable_scroll);\r\n }\r\n }));\r\n\r\n Optin.View.Conditions.visitor_logged_in = Condition_Base.extend({\r\n condition_id: \"visitor_logged_in\",\r\n disable: ['visitor_not_logged_in'],\r\n title: optin_vars.messages.conditions.visitor_logged_in,\r\n label: optin_vars.messages.condition_labels.visitor_logged_in,\r\n body: optin_vars.messages.conditions_body.visitor_logged_in\r\n });\r\n\r\n Optin.View.Conditions.visitor_not_logged_in = Condition_Base.extend({\r\n condition_id: \"visitor_not_logged_in\",\r\n disable: ['visitor_logged_in'],\r\n title: optin_vars.messages.conditions.visitor_not_logged_in,\r\n label: optin_vars.messages.condition_labels.visitor_not_logged_in,\r\n body: optin_vars.messages.conditions_body.visitor_not_logged_in\r\n });\r\n\r\n Optin.View.Conditions.shown_less_than = Condition_Base.extend({\r\n condition_id: \"shown_less_than\",\r\n title: optin_vars.messages.conditions.shown_less_than,\r\n label: optin_vars.messages.condition_labels.shown_less_than,\r\n defaults: {\r\n less_than: 1\r\n },\r\n body: function(){\r\n return this.template( this.get_data() );\r\n }\r\n });\r\n\r\n Optin.View.Conditions.only_on_mobile = Condition_Base.extend({\r\n condition_id: \"only_on_mobile\",\r\n disable: ['not_on_mobile'],\r\n title: optin_vars.messages.conditions.only_on_mobile,\r\n label: optin_vars.messages.condition_labels.only_on_mobile,\r\n body: optin_vars.messages.conditions_body.only_on_mobile\r\n });\r\n\r\n Optin.View.Conditions.not_on_mobile = Condition_Base.extend({\r\n condition_id: \"not_on_mobile\",\r\n disable: ['only_on_mobile'],\r\n title: optin_vars.messages.conditions.not_on_mobile,\r\n label: optin_vars.messages.condition_labels.not_on_mobile,\r\n body: optin_vars.messages.conditions_body.not_on_mobile\r\n });\r\n\r\n /**\r\n * From a specific referrer\r\n */\r\n Optin.View.Conditions.from_specific_ref = Condition_Base.extend({\r\n condition_id: \"from_specific_ref\",\r\n disable: ['not_from_specific_ref'],\r\n title: optin_vars.messages.conditions.from_specific_ref,\r\n label: optin_vars.messages.condition_labels.from_specific_ref,\r\n defaults: {\r\n refs: \"\"\r\n },\r\n body: function(){\r\n return this.template( this.get_data() );\r\n }\r\n });\r\n\r\n /**\r\n * Not from a specific referrer\r\n */\r\n Optin.View.Conditions.not_from_specific_ref = Condition_Base.extend({\r\n condition_id: \"not_from_specific_ref\",\r\n disable: ['from_specific_ref'],\r\n title: optin_vars.messages.conditions.not_from_specific_ref,\r\n label: optin_vars.messages.condition_labels.not_from_specific_ref,\r\n defaults: {\r\n refs: \"\"\r\n },\r\n body: function(){\r\n return this.template( this.get_data() );\r\n }\r\n });\r\n\r\n /**\r\n * Not from an internal link\r\n */\r\n Optin.View.Conditions.not_from_internal_link = Condition_Base.extend({\r\n condition_id: \"not_from_internal_link\",\r\n title: optin_vars.messages.conditions.not_from_internal_link,\r\n label: optin_vars.messages.condition_labels.not_from_internal_link,\r\n body: optin_vars.messages.conditions_body.not_from_internal_link\r\n });\r\n\r\n /**\r\n * From a search engine\r\n */\r\n Optin.View.Conditions.from_search_engine = Condition_Base.extend({\r\n condition_id: \"from_search_engine\",\r\n title: optin_vars.messages.conditions.from_search_engine,\r\n label: optin_vars.messages.condition_labels.from_search_engine,\r\n body: optin_vars.messages.conditions_body.from_search_engine\r\n });\r\n\r\n /**\r\n * Site is not a Pro Site\r\n */\r\n //Optin.View.Conditions.not_a_pro_site = Condition_Base.extend({\r\n // condition_id: \"not_a_pro_site\",\r\n // title: \"Site is not a Pro Site\",\r\n // body: \"Shows the Pop Up if the site is not a Pro Site.\"\r\n //});\r\n\r\n /**\r\n * On specific URL\r\n */\r\n Optin.View.Conditions.on_specific_url = Condition_Base.extend({\r\n condition_id: \"on_specific_url\",\r\n disable: ['not_on_specific_url'],\r\n title: optin_vars.messages.conditions.on_specific_url,\r\n label: optin_vars.messages.condition_labels.on_specific_url,\r\n defaults: {\r\n urls: \"\"\r\n },\r\n body: function(){\r\n return this.template( this.get_data() );\r\n }\r\n });\r\n\r\n /**\r\n * Not on specific URL\r\n */\r\n Optin.View.Conditions.not_on_specific_url = Condition_Base.extend({\r\n condition_id: \"not_on_specific_url\",\r\n disable: ['on_specific_url'],\r\n title: optin_vars.messages.conditions.not_on_specific_url,\r\n label: optin_vars.messages.condition_labels.not_on_specific_url,\r\n defaults: {\r\n urls: \"\"\r\n },\r\n body: function(){\r\n return this.template( this.get_data() );\r\n }\r\n });\r\n\r\n /**\r\n * Visitor has commented before\r\n */\r\n Optin.View.Conditions.visitor_has_commented = Condition_Base.extend({\r\n condition_id: \"visitor_has_commented\",\r\n disable: ['visitor_has_never_commented'],\r\n title: optin_vars.messages.conditions.visitor_has_commented,\r\n label: optin_vars.messages.condition_labels.visitor_has_commented,\r\n body: optin_vars.messages.conditions_body.visitor_has_commented\r\n });\r\n\r\n /**\r\n * Visitor has never commented\r\n */\r\n Optin.View.Conditions.visitor_has_never_commented = Condition_Base.extend({\r\n condition_id: \"visitor_has_never_commented\",\r\n disable: ['visitor_has_commented'],\r\n title: optin_vars.messages.conditions.visitor_has_never_commented,\r\n label: optin_vars.messages.condition_labels.visitor_has_never_commented,\r\n body: optin_vars.messages.conditions_body.visitor_has_never_commented\r\n });\r\n\r\n /**\r\n * In a specific Country\r\n */\r\n Optin.View.Conditions.in_a_country = Condition_Base.extend({\r\n condition_id: \"in_a_country\",\r\n disable: ['not_in_a_country'],\r\n title: optin_vars.messages.conditions.in_a_country,\r\n label: optin_vars.messages.condition_labels.in_a_country,\r\n defaults: {\r\n countries: \"\"\r\n },\r\n body: function(){\r\n return this.template( this.get_data() );\r\n },\r\n rendered: function(){\r\n this.$('.js-wpoi-select')\r\n .val( this.get_attribute( \"countries\" ) )\r\n .wpmuiSelect()\r\n\t\t\t\t.on('select2:selecting', reanable_scroll )\r\n\t\t\t\t.on('select2:unselect', reanable_scroll);\r\n }\r\n });\r\n\r\n /**\r\n * Not in a specific Country\r\n */\r\n Optin.View.Conditions.not_in_a_country = Condition_Base.extend({\r\n condition_id: \"not_in_a_country\",\r\n disable: ['in_a_country'],\r\n title: optin_vars.messages.conditions.not_in_a_country,\r\n label: optin_vars.messages.condition_labels.not_in_a_country,\r\n defaults: {\r\n countries: \"\"\r\n },\r\n body: function(){\r\n return this.template( this.get_data() );\r\n },\r\n rendered: function(){\r\n this.$('.js-wpoi-select')\r\n .val( this.get_attribute( \"countries\" ) )\r\n .wpmuiSelect()\r\n\t\t\t\t.on('select2:selecting', reanable_scroll )\r\n\t\t\t\t.on('select2:unselect', reanable_scroll);\r\n }\r\n });\r\n\r\n\r\n}( jQuery ));","(function( $ ) {\r\n \"use strict\";\r\n\r\n Optin.View.Display_Triggers = Backbone.View.extend($.extend( true, {}, Optin.View.Template_Mixin, {\r\n template: Optin.template(\"wpoi-wizard-settings-triggers-template\"),\r\n events: {\r\n 'click .tabs-header label': \"change_tab\"\r\n },\r\n initialize: function( opts ){\r\n this.el = opts.el;\r\n this.type = opts.type;\r\n\r\n this.listenTo( this.model, \"change:\" + this.type + \".trigger_on_adblock\", this.hide_adblock_options_on_toggle);\r\n this.render();\r\n },\r\n render: function(){\r\n this.$el.html( this.template( this.get_data() ) );\r\n this.hide_adblock_options_on_toggle();\r\n return this;\r\n },\r\n get_data: function(){\r\n var data = {};\r\n data.type = this.type;\r\n data.shortcode_id = this.model.get(\"shortcode_id\");\r\n return _.extend( {}, data, this.model.get( this.type).toJSON() );\r\n },\r\n change_tab: function(event){\r\n event.preventDefault();\r\n var $this = this.$(event.target),\r\n $this_tab = $this.parent(\"li\"),\r\n $this_content = this.$( $this.attr(\"href\")),\r\n $radio = $this.find(\"input[type='radio']\");\r\n this.$(\".tabs-header li\").removeClass(\"current\");\r\n this.$(\".tabs-content\").removeClass(\"current\");\r\n\r\n $this_tab.addClass(\"current\");\r\n $this_content.addClass(\"current\");\r\n $radio.prop(\"checked\", true);\r\n\r\n this.model.set( this.type +\".appear_after\", $radio.val() );\r\n },\r\n hide_adblock_options_on_toggle: function(){\r\n if( _.isTrue( this.model.get( this.type + \".trigger_on_adblock\" ) ) ){\r\n this.$(\".wpoi-popup-trigger-on-adblock-option\").show();\r\n }else{\r\n this.$(\".wpoi-popup-trigger-on-adblock-option\").hide();\r\n }\r\n }\r\n }) );\r\n}(jQuery));","Hustle.define(\"Settings.E_News\", function($){\r\n \"use strict\";\r\n return Backbone.View.extend({\r\n el: \"#enews-sync-box\",\r\n back_tpl: Optin.template(\"wpoi-e-newsletter-box-back\"),\r\n initial_html: \"\",\r\n events: {\r\n \"click .optin-enews-sync-setup\" : \"setup\",\r\n \"click .optin-enews-sync-cancel\" : \"cancel\",\r\n \"click .optin-enews-sync-save\" : \"save\",\r\n \"click .optin-enews-sync-toggle\" : \"toggle\",\r\n \"click .optin-enews-sync-edit\" : \"setup\"\r\n },\r\n initialize: function(){\r\n this.initial_html = this.$el.html();\r\n },\r\n setup: function(e){\r\n e.preventDefault();\r\n var self = this,\r\n $this = $(e.target),\r\n id = $this.data(\"id\"),\r\n nonce = $this.data(\"nonce\"),\r\n is_edit = $this.hasClass(\"optin-enews-sync-edit\");\r\n\r\n $.ajax({\r\n url: ajaxurl,\r\n type: \"GET\",\r\n data: {\r\n action: \"inc_opt_get_enews_sync_setup\",\r\n _ajax_nonce: nonce,\r\n id: id\r\n },\r\n success: function( res ){\r\n if( res.success ){\r\n self.$el.html( self.back_tpl( res.data ) );\r\n }\r\n },\r\n error: function(res){\r\n\r\n }\r\n });\r\n },\r\n cancel: function(e){\r\n e.preventDefault();\r\n this.$el.html( this.initial_html );\r\n },\r\n save: function(e){\r\n e.preventDefault();\r\n var self = this,\r\n $this = $(e.target),\r\n id = $this.data(\"id\"),\r\n groups = [],\r\n nonce = $this.data(\"nonce\");\r\n\r\n this.$(\".wpoi-e-newsletter-group\").each(function( index, checkbox ){\r\n if( checkbox.checked )\r\n groups.push( checkbox.value );\r\n });\r\n\r\n $.ajax({\r\n url: ajaxurl,\r\n type: \"POST\",\r\n data: {\r\n action: \"inc_opt_save_enews_sync_setup\",\r\n _ajax_nonce: nonce,\r\n id: id,\r\n groups: groups\r\n },\r\n success: function( res ){\r\n if( res.success ){\r\n self.$el.html( res.data.html );\r\n }\r\n },\r\n error: function(res){\r\n\r\n }\r\n });\r\n },\r\n toggle: function(e){\r\n var self = this,\r\n $this = $(e.target),\r\n id = $this.data(\"id\"),\r\n nonce = $this.data(\"nonce\"),\r\n state = $this.is(\":checked\");\r\n\r\n $.ajax({\r\n url: ajaxurl,\r\n type: \"POST\",\r\n data: {\r\n action: \"inc_opt_toggle_enews_sync\",\r\n _ajax_nonce: nonce,\r\n id: id,\r\n state: state\r\n },\r\n success: function( res ){\r\n if( res.success ){\r\n $this.attr(\"checked\", state);\r\n self.initial_html = self.$el.html();\r\n }\r\n\r\n }\r\n });\r\n }\r\n });\r\n\r\n});\r\n","Hustle.define(\"Settings.Modules_Activity\", function($){\r\n \"use strict\";\r\n return Backbone.View.extend({\r\n el: \"#modules-activity\",\r\n events: {\r\n \"change .hustle-for-admin-user-toggle\": \"toggle_for_user\",\r\n \"change .hustle-for-logged-in-user-toggle\": \"toggle_for_user\"\r\n },\r\n initialize: function(){\r\n\r\n },\r\n toggle_for_user: function(e){\r\n var $this = this.$( e.target ),\r\n id = $this.data(\"id\"),\r\n nonce = $this.data(\"nonce\"),\r\n user = $this.data(\"user\");\r\n\r\n $this.attr(\"disabled\", true);\r\n $.ajax( {\r\n url: ajaxurl,\r\n type: \"POST\",\r\n data: {\r\n action: \"hustle_toggle_module_for_user\",\r\n id: id,\r\n _ajax_nonce: nonce,\r\n user_type: user\r\n },\r\n complete: function( res, res_status ){\r\n $this.attr(\"disabled\", false);\r\n },\r\n success: function(res){\r\n if( !res.success )\r\n $this.prop(\"checked\", !$this.is(\":checked\") );\r\n },\r\n error: function(){\r\n $this.prop(\"checked\", !$this.is(\":checked\") );\r\n }\r\n\r\n });\r\n\r\n }\r\n });\r\n\r\n});\r\n","Hustle.define(\"Settings.Services_Edit_Modal\", function($){\r\n \"use strict\";\r\n return Backbone.View.extend({\r\n template: Hustle.template(\"wph-edit-provider-modal-tpl\"),\r\n id: \"wph-edit-provider-modal\",\r\n events: {\r\n \"click .i-close\": \"close\",\r\n \"click .js-wph-button-cancel\": \"close\",\r\n \"change #wph-provider-edit-modal-provider\": \"get_provider_options\",\r\n \"click #wph-edit-service-save\": \"save_settings\",\r\n \"submit form\": \"save_settings\"\r\n },\r\n provider_options_nonce: false,\r\n initialize: function(){\r\n\r\n this.render();\r\n },\r\n render: function(){\r\n var self = this;\r\n this.$el.html( this.template() ).appendTo(\"body\");\r\n\r\n $.ajax({\r\n url: ajaxurl,\r\n type: \"get\",\r\n data: {\r\n action: \"hustle_get_providers_edit_modal_content\",\r\n id: self.model.get(\"id\"),\r\n source: self.model.get(\"source\"),\r\n _ajax_nonce: self.model.get(\"nonce\")\r\n },\r\n success: function(res){\r\n if( res.success ){\r\n self.$(\".wph-edit-provider-modal-content\").html( res.data.html );\r\n self.provider_options_nonce = res.data.provider_options_nonce;\r\n //self.delegateEvents();\r\n Hustle.Events.trigger(\"view.rendered\", self);\r\n }\r\n }\r\n });\r\n\r\n },\r\n get_provider_options: function(e){\r\n var self = this,\r\n $this = this.$(e.target),\r\n $details_placeholder = this.$(\"#optin_new_provider_account_details\"),\r\n $options_placeholder = this.$(\"#optin_new_provider_account_options\");\r\n\r\n $details_placeholder.empty();\r\n $options_placeholder.empty();\r\n $.ajax({\r\n url: ajaxurl,\r\n type: \"get\",\r\n data:{\r\n action: \"render_provider_account_options\",\r\n provider_id: $this.val(),\r\n _ajax_nonce: self.provider_options_nonce,\r\n optin: self.model.get(\"id\")\r\n },\r\n success: function(res){\r\n if( res.success ){\r\n $details_placeholder.html( res.data );\r\n\t\t\t\t\tHustle.Events.trigger(\"view.rendered\", self);\r\n }\r\n\r\n }\r\n });\r\n },\r\n close: function(e){\r\n e.preventDefault();\r\n this.remove();\r\n },\r\n hide: function(){\r\n },\r\n show: function(){\r\n },\r\n save_settings: function(e){\r\n e.preventDefault();\r\n var $this = this.$(e.target),\r\n nonce = $this.data(\"nonce\"),\r\n $selector = this.$(\"#wph-provider-edit-modal-provider\"),\r\n $form = $this.closest(\"form\");\r\n\r\n $.ajax({\r\n url: ajaxurl,\r\n type: \"post\",\r\n data:{\r\n action: \"hustle_save_providers_edit_modal\",\r\n provider_id: $selector.val(),\r\n _ajax_nonce: nonce,\r\n id: this.model.get(\"id\"),\r\n source: this.model.get(\"source\"),\r\n form: $form.serialize()\r\n },\r\n success: function(res){\r\n }\r\n });\r\n }\r\n });\r\n});","Hustle.define(\"Settings.Services\", function($){\r\n \"use strict\";\r\n return Backbone.View.extend({\r\n el: \"#providers-edit-box\",\r\n Modal_View: Hustle.get( \"Settings.Services_Edit_Modal\" ),\r\n modal: false,\r\n events: {\r\n \"click .wph-providers-edit\": \"open_edit_modal\"\r\n },\r\n open_edit_modal: function( e ){\r\n var $this = this.$(e.target),\r\n id = $this.data(\"id\"),\r\n source = $this.data(\"source\"),\r\n nonce = $this.data(\"nonce\");\r\n\r\n this.modal = new this.Modal_View({ model: new Backbone.Model( {id: id, nonce: nonce, source: source} ) });\r\n\r\n\r\n }\r\n\r\n });\r\n});","(function( $, doc ) {\r\n \"use strict\";\r\n\r\n $(document).on(\"click\", '.wpoi-listing-wrap header.can-open .toggle, .wpoi-listing-wrap header.can-open .toggle-label', function(e){\r\n e.stopPropagation();\r\n });\r\n\r\n\r\n $(\".accordion header .optin-delete-optin, .accordion header .edit-optin, .wpoi-optin-details tr .button-edit\").hide().css({\r\n transition : 'none'\r\n });\r\n\r\n $(document).on({\r\n mouseenter: function () {\r\n var $this = $(this);\r\n $this.find(\".optin-delete-optin, .edit-optin\").stop().fadeIn(\"fast\");\r\n },\r\n mouseleave: function () {\r\n var $this = $(this);\r\n $this.find(\".toggle-checkbox\").removeProp(\"disabled\");\r\n $this.find(\".edit-optin\").removeProp(\"disabled\");\r\n $this.removeClass(\"disabled\");\r\n $this.find(\".optin-delete-optin, .edit-optin, .delete-optin-confirmation\").stop().fadeOut(\"fast\");\r\n }\r\n }, \".accordion header\");\r\n\r\n $(document).on({\r\n mouseenter: function () {\r\n var $this = $(this);\r\n $this.find(\".button-edit\").stop().fadeIn(\"fast\");\r\n },\r\n mouseleave: function () {\r\n var $this = $(this);\r\n $this.find(\".button-edit\").stop().fadeOut(\"fast\");\r\n }\r\n }, \".wpoi-optin-details tr\");\r\n\r\n $(document).on(\"click\", \".wpoi-tabs-menu a\", function(event){\r\n event.preventDefault();\r\n var tab = $(this).attr(\"tab\");\r\n Optin.router.navigate(tab, true);\r\n });\r\n\r\n $(document).on(\"click\", \".edit-optin\", function(event){\r\n event.stopPropagation();\r\n event.preventDefault();\r\n window.location.href = $(this).attr(\"href\");\r\n });\r\n\r\n $(document).on(\"click\", \".wpoi-type-edit-button\", function(event){\r\n event.preventDefault();\r\n var optin_id = $(this).data(\"id\");\r\n var optin_type = $(this).data(\"type\");\r\n window.location.href = \"admin.php?page=inc_optin&optin=\" + optin_id + \"#display/\" + optin_type;\r\n });\r\n\r\n /**\r\n * Make \"for\" attribute work on tags that don't support \"for\" by default\r\n *\r\n */\r\n $(document).on(\"click\", '*[for]', function(e){\r\n var $this = $(this),\r\n _for = $this.attr( 'for'),\r\n $for = $(\"#\" + _for);\r\n\r\n if( $this.is(\"label\") || !$for.length ) return;\r\n\r\n $for.trigger(\"change\");\r\n $for.trigger(\"click\");\r\n });\r\n\r\n $(\"#wpoi-complete-message\").fadeIn();\r\n\r\n $(document).on(\"click\", '#wpoi-complete-message .next-button button', function(e){\r\n $(\"#wpoi-complete-message\").fadeOut();\r\n });\r\n\r\n $(document).on(\"click\", \".wpoi-listing-page .wpoi-listing-wrap header.can-open\", function(e){\r\n $(this).find(\".open\").trigger(\"click\");\r\n });\r\n\r\n /**\r\n * On click of arrow of any optin in the listing page\r\n *\r\n */\r\n $(document).on(\"click\", \".wpoi-listing-page .wpoi-listing-wrap .can-open .open\", function(e){\r\n e.stopPropagation();\r\n var $this = $(this),\r\n $panel = $this.closest(\".wpoi-listing-wrap\"),\r\n $section = $panel.find(\"section\"),\r\n $others = $(\".wpoi-listing-wrap\").not( $panel ),\r\n $other_sections = $(\".wpoi-listing-wrap section\").not( $section );\r\n\r\n $other_sections.slideUp(300, function(){\r\n $other_sections.removeClass(\"open\");\r\n });\r\n $others.find(\".dev-icon\").removeClass(\"dev-icon-caret_up\").addClass(\"dev-icon-caret_down\");\r\n\r\n $section.slideToggle(300, function(){\r\n $panel.toggleClass(\"open\");\r\n $panel.find(\".dev-icon\").toggleClass( \"dev-icon-caret_up dev-icon-caret_down\" );\r\n });\r\n\r\n });\r\n\r\n\r\n\r\n Optin.decorate_number_inputs = function( elem ){\r\n var $items = elem && elem.$el ? elem.$el.find( '.wph-input--number input' ) : $('.wph-input--number input'),\r\n tpl = Hustle.create_template('<div class=\"wph-nbr--nav\"><div class=\"wph-nbr--button wph-nbr--up {{disabled}}\">+</div><div class=\"wph-nbr--button wph-nbr--down {{disabled}}\">-</div></div>')\r\n ;\r\n $items.each(function(){\r\n var $this = $(this),\r\n disabled_class = $this.is(\":disabled\") ? \"disabled\" : \"\";\r\n\r\n if( !$this.siblings( \".wph-nbr--nav\").length ) // Add + and - buttons only if it's not already added\r\n $this.after(tpl( {disabled: disabled_class } ));\r\n\r\n });\r\n\r\n\t};\r\n\r\n Hustle.Events.on(\"view.rendered\", Optin.decorate_number_inputs);\r\n\r\n // Listen to number input + and - click events\r\n (function (){\r\n $(document).on( \"click\", '.wph-nbr--up:not(.disabled)', function(e){\r\n var $this = $(this),\r\n $wrap = $this.closest( \".wph-input--number\"),\r\n $input = $wrap.find( \"input\"),\r\n oldValue = parseFloat( $input.val() ),\r\n min = $input.attr('min'),\r\n max = $input.attr('max'),\r\n newVal;\r\n\r\n if (oldValue >= max){\r\n newVal = oldValue;\r\n } else {\r\n newVal = oldValue + 1;\r\n }\r\n\r\n if( newVal !== oldValue ){\r\n $input.val(newVal)\r\n .trigger('change');\r\n }\r\n });\r\n\r\n $(document).on( \"click\", '.wph-nbr--down:not(.disabled)', function(e){\r\n var $this = $(this),\r\n $wrap = $this.closest( \".wph-input--number\"),\r\n $input = $wrap.find( \"input\"),\r\n oldValue = parseFloat( $input.val() ),\r\n min = $input.attr('min'),\r\n max = $input.attr('max'),\r\n newVal;\r\n\r\n\r\n if (oldValue <= min){\r\n newVal = oldValue;\r\n } else {\r\n newVal = oldValue - 1;\r\n }\r\n\r\n if( newVal !== oldValue ){\r\n $input.val(newVal)\r\n .trigger('change');\r\n }\r\n });\r\n }());\r\n\r\n // Sticky eye icon\r\n (function (){\r\n\t function sticky_relocate(){\r\n\t\t var window_top = $(window).scrollTop();\r\n\t\t var div_top = $(\".wph-sticky--anchor\");\r\n\r\n\t\t if ( ! div_top.length ) return;\r\n\r\n\t\t\tdiv_top = div_top.offset().top;\r\n\t\t if (window_top > div_top) {\r\n\t\t\t $(\".wph-preview--eye\").addClass(\"wph-sticky--element\");\r\n\t\t\t $(\".wph-sticky--anchor\").height($(\".wph-preview--eye\").outerHeight());\r\n\t\t } else {\r\n\t\t\t $(\".wph-preview--eye\").removeClass(\"wph-sticky--element\");\r\n\t\t\t $(\".wph-sticky--anchor\").height(0);\r\n\t\t }\r\n\t }\r\n\t $(function(){\r\n\t\t $(window).scroll(sticky_relocate);\r\n\t\t sticky_relocate();\r\n\t });\r\n }());\r\n\r\n}( jQuery, document ));\r\n","Hustle.define( \"Social_Sharing.Models\", function(){\r\n \"use strict\";\r\n var Services = Hustle.get(\"Models.M\").extend({\r\n defaults: {\r\n optin_name: '',\r\n optin_title: '',\r\n optin_provider: 'social_sharing',\r\n active: 1,\r\n test_mode: 0,\r\n service_type: 'native',\r\n click_counter: 1,\r\n social_icons: ''\r\n }\r\n });\r\n \r\n var Appearance = Hustle.get(\"Models.M\").extend({\r\n defaults: {\r\n icon_style: 'four',\r\n icons_order: '',\r\n customize_colors: 0,\r\n icon_bg_color: 'rgba(146, 158, 170, 1)',\r\n icon_color: 'rgba(255, 255, 255, 1)',\r\n floating_social_bg: 'rgba(4, 48, 69, 1)',\r\n drop_shadow: 0,\r\n drop_shadow_x: 0,\r\n drop_shadow_y: 0,\r\n drop_shadow_blur: 0,\r\n drop_shadow_spread: 0,\r\n drop_shadow_color: 'rgba(0,0,0,0)',\r\n floating_inline_count: 0,\r\n counter_border: 'rgba(146, 158, 170, 1)',\r\n counter_text: 'rgba(255, 255, 255, 1)',\r\n customize_widget_colors: 0,\r\n widget_icon_bg_color: 'rgba(146, 158, 170, 1)',\r\n widget_icon_color: 'rgba(255, 255, 255, 1)',\r\n widget_bg_color: 'rgba(146, 158, 170, 1)',\r\n widget_drop_shadow: 0,\r\n widget_drop_shadow_x: 0,\r\n widget_drop_shadow_y: 0,\r\n widget_drop_shadow_blur: 0,\r\n widget_drop_shadow_spread: 0,\r\n widget_drop_shadow_color: 'rgba(0,0,0,0)',\r\n widget_inline_count: 0,\r\n widget_counter_text: 'rgba(255, 255, 255, 1)'\r\n }\r\n });\r\n\r\n var TypeBase = Hustle.get(\"Models.M\").extend({\r\n defaults:{\r\n enabled: false,\r\n conditions: '',\r\n location_type: 'screen',\r\n location_target: '',\r\n location_align_x: 'left',\r\n location_align_y: 'top',\r\n location_top: 0,\r\n location_bottom: 0,\r\n location_right: 0,\r\n location_left: 0\r\n },\r\n initialize: function(data){\r\n _.extend( this, data );\r\n if( ! ( this.get('conditions') instanceof Backbone.Model ) ){\r\n /**\r\n * Make sure conditions is not an array\r\n */\r\n if( _.isEmpty( this.get('conditions') ) && _.isArray( this.get('conditions') ) )\r\n this.conditions = {};\r\n\r\n\t\t\t\tvar hModel = Hustle.get(\"Model\");\r\n this.set( 'conditions', new hModel( this.conditions ) );\r\n }\r\n\t\t\tthis.on( 'change', this.user_has_change, this );\r\n\r\n }\r\n });\r\n var Floating_Social = TypeBase.extend();\r\n\r\n return {\r\n Services: Services,\r\n Appearance: Appearance,\r\n TypeBase: TypeBase,\r\n\t\tFloating_Social: Floating_Social\r\n };\r\n});\r\n\r\n\r\n","(function( $ ) {\r\n \"use strict\";\r\n /**\r\n * Set optin id from the html template\r\n */\r\n\r\n Optin.get_tpl = function( layout_id ){\r\n var templates = [\"optin-layout-one\", \"optin-layout-two\", \"optin-layout-three\", \"optin-layout-four\"];\r\n\r\n return Optin.template( templates[ layout_id ] );\r\n };\r\n\r\n Optin.View.Alert = Backbone.View.extend({\r\n template: Optin.template(\"optin-alert-modal\"),\r\n //el: \".inc-opt-alert-modal\",\r\n events: {\r\n \"click .inc-opt-alert-modal-close\": \"close\",\r\n \"click .inc-opt-alert-modal\": \"close\",\r\n \"click .inc-opt-alert-modal-close-btn\": \"close\",\r\n \"click .inc-opt-alert-modal-inner-container\": \"prevent_close\"\r\n },\r\n initialize: function(options){\r\n this.options = options;\r\n return this.render();\r\n },\r\n render: function(){\r\n this.$el.html( this.template(_.extend({\r\n close_text: optin_vars.messages.ok\r\n }, this.options) ) );\r\n this.$el.appendTo(\"body\");\r\n },\r\n close: function(e){\r\n this.$el.hide();\r\n this.remove();\r\n },\r\n prevent_close: function(e){\r\n e.preventDefault();\r\n e.stopPropagation();\r\n }\r\n });\r\n\r\n\t/**\r\n\t * Key var to listen user changes before triggering\r\n\t * navigate away message.\r\n\t **/\r\n\tOptin.hasChanges = false;\r\n\tOptin.user_change = function() {\r\n\t\tOptin.hasChanges = true;\r\n\t};\r\n\r\n\twindow.onbeforeunload = function() {\r\n\t\tif ( Optin.hasChanges ) {\r\n\t\t\treturn optin_vars.messages.dont_navigate_away;\r\n\t\t}\r\n\t};\r\n\r\n /**\r\n * Pure object to store each step's template\r\n * @type {{}|*}\r\n */\r\n Optin.step = Optin.step || {};\r\n\r\n Optin.step.activate_step = function(step){\r\n\r\n $(\".wpoi-tabs-menu li\").removeClass(\"active\");\r\n $(\".wpoi-tabs-menu li\").removeClass(\"before\");\r\n $(\".wpoi-tabs-menu li\").eq(step).addClass(\"active\");\r\n $(\".wpoi-tabs-menu li\").slice(0, step).addClass( \"before\" );\r\n //$(\".wpoi-flexbox li\").eq(step).find(\"button\").addClass(\"wpoi-current-step\");\r\n\r\n $(\".wpoi-tabs-wrap > div\").hide();\r\n $(\".wpoi-tabs-wrap > div\").eq(step).show();\r\n\r\n Optin.step.current = step;\r\n };\r\n\r\n Optin.step.get_current_step = function(){\r\n return parseInt( Optin.step.current || 0, 10 );\r\n };\r\n\r\n\r\n Optin.step.get_current = function(){\r\n return parseInt( Optin.step.current || 0, 10 );\r\n };\r\n\r\n Optin.step.get_current_step = function(){\r\n switch ( this.get_current ){\r\n case 0:\r\n return Optin.step.services;\r\n break;\r\n case 1:\r\n return Optin.step.design;\r\n break;\r\n case 2:\r\n return Optin.step.display;\r\n break;\r\n\r\n }\r\n };\r\n\r\n})( jQuery );","Hustle.define( 'Custom_Content.After_Content_View', function( $, doc, win ) {\r\n\t'use strict';\r\n\r\n\treturn Hustle.View.extend(_.extend({}, Hustle.get(\"Mixins.Model_Updater\"), {\r\n\t\ttemplate: Hustle.template(\"wpoi-custom-content-after-content-tpl\"),\r\n\t\tmessage_editor: false,\r\n\t\tevents: {\r\n\t\t\t'change [name=\"animate\"]': 'toggle_animation'\r\n\t\t},\r\n\t\tinit: function( options ){\r\n\t\t\t this.type = options.type;\r\n\r\n\t\t\t this.conditions_view = options.conditions_view;\r\n\t\t\t this.listenTo( this.model, \"change:enabled\", this.toggle_panel );\r\n\t\t\t this.conditions_view.on(\"toggle_condition\", this.update_conditions_label);\r\n\t\t\t this.conditions_view.on(\"change:update_view_label\", this.update_conditions_label);\r\n\t\t\t return this.render();\r\n\t\t },\r\n\t\t render: function(){\r\n\t\t\t this.$el.html( this.template( _.extend({}, {\r\n\t\t\t\t type: this.type,\r\n\t\t\t\t type_name: optin_vars.messages.settings[ this.type ],\r\n\t\t\t\t condition_labels: this.conditions_view.get_all_conditions_labels()\r\n\t\t\t }, this.model.toJSON() ) ) );\r\n \r\n\t\t\t this.$(\".wph-conditions\").replaceWith( this.conditions_view.$el );\r\n\t\t\t if ( _.isFalse(this.model.enabled) ) this.$el.find(\"#wph-after-content-condition-labels\").hide();\r\n\r\n\t\t\t this.toggle_animation();\r\n\r\n\t\t\t return this;\r\n\t\t },\r\n\t\t toggle_panel: function( model ){\r\n\t\t\t this.$(\".switch-wrap\").toggleClass(\"open closed\");\r\n\t\t\t this.$el.find(\"#wph-after-content-condition-labels\").toggle();\r\n\t\t },\r\n\t\t update_conditions_label: function( conditions_view ){\r\n\t\t\t$('#wph-after-content-condition-labels').html( conditions_view.get_all_conditions_labels() );\r\n\t\t },\r\n\t\t toggle_animation: function() {\r\n\t\t\tvar input = this.$('[name=\"animate\"]:checked'),\r\n\t\t\t\tisOff = 'false' === input.val(),\r\n\t\t\t\tanimation_list = this.$('#optin-afterc-animation-block');\r\n\r\n\t\t\tanimation_list[ isOff ? 'hide' : 'show']();\r\n\t\t }\r\n\t } ) );\r\n});","Hustle.define(\"Custom_Content.Content_View\", function($, doc, win){\r\n \"use strict\";\r\n return Hustle.View.extend(_.extend({}, Hustle.get(\"Mixins.Model_Updater\"), {\r\n template: Optin.template(\"wpoi-custom-content-content-tpl\"),\r\n message_editor: false,\r\n skip_tinyMCE_sync: false,\r\n init: function( opts ){\r\n this.design_model = opts.design_model;\r\n this.sync_message();\r\n this.listenTo( Hustle.Events, \"CC.save_changes\", this.sync_model_message );\r\n this.listenTo( Hustle.Events, \"CC.opening_preview\", this.sync_model_message );\r\n return this.render();\r\n },\r\n render: function(args){\r\n this.setElement( this.template( _.extend( {}, this.model.toJSON(), this.design_model.toJSON() ) ) );\r\n var Media_Holder = Hustle.get(\"Media_Holder\");\r\n this.media_holder = new Media_Holder({\r\n model: this.design_model,\r\n attribute: \"image\"\r\n });\r\n\r\n this.$(\".wph-media--holder\").html( this.media_holder.$el );\r\n this.listenTo( this.model, \"change:optin_message\", _.throttle( this.update_content, 50 ) );\r\n return this;\r\n },\r\n /**\r\n * Keep model editor in sync with tinyMCE message\r\n */\r\n sync_message: function() {\r\n var self = this,\r\n waitForTinyMCE = setInterval(function () {\r\n if (typeof tinyMCE !== \"object\") return;\r\n\r\n clearInterval(waitForTinyMCE);\r\n tinyMCE.on(\"AddEditor\", function(args){\r\n self.message_editor = tinyMCE.get(\"optin_message\");\r\n\r\n self.message_editor.on(\"change\", function (e) {\r\n self.model.set(\"optin_message\", self.message_editor.getContent());\r\n });\r\n });\r\n\r\n });\r\n },\r\n sync_model_message: function(){\r\n if ( this.skip_tinyMCE_sync ) return;\r\n\t\t\t\r\n if (typeof tinyMCE !== \"object\") return;\r\n\t\t\t\r\n if( !this.message_editor ) this.message_editor = tinyMCE.get(\"optin_message\");\r\n\t\t\t\r\n\t\t\tthis.model.set(\"optin_message\", this.message_editor.getContent());\r\n },\r\n /**\r\n * Sents optin_message to server via ajax and sets content from the parsed result\r\n */\r\n update_content: function(){\r\n var self = this;\r\n\r\n $.ajax({\r\n url: ajaxurl,\r\n type: \"get\",\r\n data: {\r\n action: \"hustle_CC_parse_content\",\r\n html: self.model.get(\"optin_message\")\r\n },\r\n success: function(res){\r\n if( res.success )\r\n self.model.set(\"content\", res.data );\r\n }\r\n });\r\n }\r\n } ) );\r\n\r\n});","Hustle.define(\"Custom_Content.Design_View\", function($, doc, win){\r\n \"use strict\";\r\n return Hustle.View.extend( _.extend({}, Hustle.get(\"Mixins.Model_Updater\"), {\r\n template: Optin.template(\"wpoi-custom-content-design-tpl\"),\r\n media_frame: false,\r\n css_editor: false,\r\n /* stylables: {\r\n \".wph-modal.wph-modal-container .wph-modal--content, .wph-cc-shortcode .wph-cc-shortcode--content \": \"Container\",\r\n \".wph-modal.wph-modal-container.wph-customize-css h2.wph-modal--title, .wph-cc-shortcode h2.wph-cc-shortcode--title \": \"Title\",\r\n \".wph-modal.wph-modal-container.wph-customize-css .wph-modal--content h4.wph-modal--subtitle, .wph-cc-shortcode h4.wph-cc-shortcode--subtitle \": \"Subtitle\",\r\n \".wph-modal .wph-modal--content .wph-modal--message , .wph-cc-shortcode .wph-cc-shortcode--content .wph-cc-shortcode--message \": \"Content\",\r\n \".wph-modal .wph-modal--content .wph-modal--image, .wph-cc-shortcode .wph-cc-shortcode--content .wph-cc-shortcode--image \": \"Image Container\",\r\n \".wph-modal.wph-modal-container.wph-customize-css .wph-modal--content .wph-modal--image img, .wph-cc-shortcode .wph-cc-shortcode--content .wph-cc-shortcode--image img \": \"Image\",\r\n \".wph-modal .wph-modal--cta, .wph-cc-shortcode .wph-cc-shortcode--cta \": \"CTA Button\",\r\n \".wph-modal .wph-modal-never-see-again \": \"Never See Again\"\r\n }, */\r\n stylables: {\r\n \".wph-modal.wph-modal-container .wph-modal--content \": \"Container\",\r\n \".wph-modal.wph-modal-container.wph-customize-css h2.wph-modal--title \": \"Title\",\r\n \".wph-modal.wph-modal-container.wph-customize-css .wph-modal--content h4.wph-modal--subtitle \": \"Subtitle\",\r\n \".wph-modal .wph-modal--content .wph-modal--message \": \"Content\",\r\n \".wph-modal .wph-modal--content .wph-modal--image \": \"Image Container\",\r\n \".wph-modal.wph-modal-container.wph-customize-css .wph-modal--content .wph-modal--image img \": \"Image\",\r\n \".wph-modal .wph-modal--cta \": \"CTA Button\",\r\n \".wph-modal .wph-modal-never-see-again \": \"Never See Again\"\r\n },\r\n stylable_elements: _({\r\n main_bg_color: \".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content\",\r\n title_color: \".wph-modal.wph-modal--cabriolet .wph-modal--content h2.wph-modal--title, .wph-modal.wph-modal--simple .wph-modal--content header h2.wph-modal--title, .wph-modal.wph-modal--minimal .wph-modal--content h2.wph-modal--title\",\r\n subtitle_color: \".wph-modal.wph-modal--cabriolet .wph-modal--content h4.wph-modal--subtitle, .wph-modal.wph-modal--simple .wph-modal--content header h4.wph-modal--subtitle, .wph-modal.wph-modal--minimal .wph-modal--content header h4.wph-modal--subtitle\",\r\n link_static_color: \".wph-modal .wph-modal--message a, .wph-modal.wph-modal--cabriolet .wph-modal--content .wph-modal--message a:not(.wph-modal--cta), .wph-modal.wph-modal--simple .wph-modal--content .wph-modal--message a:not(.wph-modal--cta), .wph-modal.wph-modal--minimal .wph-modal--content .wph-modal--message a:not(.wph-modal--cta)\",\r\n link_hover_color: \".wph-modal .wph-modal--message a:hover, .wph-modal.wph-modal--cabriolet section .wph-modal--message a:not(.wph-modal--cta):hover, .wph-modal.wph-modal--simple .wph-modal--content .wph-modal--message a:not(.wph-modal--cta):hover, .wph-modal.wph-modal--minimal .wph-modal--content a:not(.wph-modal--cta):hover\",\r\n link_active_color: \".wph-modal .wph-modal--message a:active, .wph-modal.wph-modal--cabriolet section .wph-modal--message a:not(.wph-modal--cta):active, .wph-modal.wph-modal--simple .wph-modal--content .wph-modal--message a:not(.wph-modal--cta):active, .wph-modal.wph-modal--minimal .wph-modal--content a:not(.wph-modal--cta):active\",\r\n cta_static_background: \".wph-modal .wph-modal--cta, .wph-modal .wph-modal--message a.wph-modal--cta\",\r\n cta_hover_background: \".wph-modal .wph-modal--cta:hover, .wph-modal .wph-modal--message a.wph-modal--cta:hover\",\r\n cta_active_background: \".wph-modal .wph-modal--cta:active, .wph-modal .wph-modal--message a.wph-modal--cta:active\",\r\n cta_static_color: \".wph-modal .wph-modal--cta, .wph-modal .wph-modal--message a.wph-modal--cta\",\r\n cta_hover_color: \".wph-modal .wph-modal--cta:hover, .wph-modal .wph-modal--message a.wph-modal--cta:hover\",\r\n cta_active_color: \".wph-modal .wph-modal--cta:active, .wph-modal .wph-modal--message a.wph-modal--cta:active\",\r\n border_static_color: \".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content\",\r\n //border_hover_color: \".wph-modal.wph-modal--cabriolet section:hover, .wph-modal.wph-modal--simple .wph-modal--content:hover, .wph-modal.wph-modal--minimal .wph-modal--content:hover\",\r\n //border_active_color: \".wph-modal.wph-modal--cabriolet section:active, .wph-modal.wph-modal--simple .wph-modal--content:active, .wph-modal.wph-modal--minimal .wph-modal--content:active\",\r\n border_radius: \".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content\",\r\n border_weight: \".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content\",\r\n border_type: \".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content\",\r\n drop_shadow_color: \".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content\",\r\n drop_shadow_x: \".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content\",\r\n drop_shadow_y: \".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content\",\r\n drop_shadow_blur: \".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content\",\r\n drop_shadow_spread: \".wph-modal.wph-modal--cabriolet section, .wph-modal.wph-modal--simple .wph-modal--content, .wph-modal.wph-modal--minimal .wph-modal--content\",\r\n custom_height: \".wph-modal.wph-modal--popup, .wph-modal.wph-modal--popup .wph-modal--content\",\r\n custom_width: \".wph-modal.wph-modal--popup, .wph-modal.wph-modal--popup .wph-modal--content\"\r\n }),\r\n events: {\r\n \"click .wph-stylable-element\": \"insert_stylable_element\"\r\n },\r\n init: function(){\r\n this.on(\"rendered\", this.create_color_pickers );\r\n this.listenTo(this.model, \"change:customize_colors\", this.render );\r\n this.listenTo(this.model, \"change:customize_css\", this.render );\r\n this.listenTo(this.model, \"change:customize_size\", this.render );\r\n this.listenTo(this.model, \"change:border\", this.render );\r\n this.listenTo(this.model, \"change:drop_shadow\", this.render );\r\n this.listenTo(this.model, \"change:style\", this.render );\r\n\r\n this.listenTo( this.model, \"change\", this.apply_styles );\r\n\r\n return this.render();\r\n },\r\n render: function(){\r\n this.$el.html( this.template( _.extend( {}, this.model.toJSON(), {stylables: this.stylables } ) ) );\r\n this.apply_styles();\r\n this.create_css_editor();\r\n return this;\r\n },\r\n create_color_pickers: function(){\r\n this.$(\".wph-color-picker\").wpColorPicker({\r\n change: function(event, ui){\r\n var $this = $(this);\r\n $this.val( ui.color.toCSS()).trigger(\"change\");\r\n }\r\n });\r\n },\r\n get_layout_colors: function(){\r\n if( _.isTrue( this.model.get(\"customize_colors\") ) )\r\n return _( this.model.toJSON() ).reduce(function( obj, value, attribute ){\r\n\r\n if( _.indexOf( [\"drop_shadow_color\"], attribute ) !== -1 || /^border_/.test( attribute ) || /^drop_/.test(attribute) ) return obj; // excludes\r\n\r\n if( /_background$/.test( attribute ) || /_color$/.test( attribute ) || /_background_color$/.test( attribute ) )\r\n obj[ attribute ] = value;\r\n return obj;\r\n }, {} );\r\n\r\n return false;\r\n },\r\n apply_styles: _.debounce(function(){\r\n var self = this,\r\n data = this.model.toJSON(),\r\n colors = this.get_layout_colors(),\r\n styles = \"\",\r\n $styles_el = $(\"#hustle-css-preview-styles\").length ? $(\"#hustle-css-preview-styles\") : $('<style id=\"hustle-css-preview-styles\">').appendTo(\"body\");\r\n\r\n\r\n if( !_.isEmpty( colors ) ){\r\n _.each(colors, function(color, key){\r\n var color_type = /_background$/.test( key ) || /_background_color$/.test( key ) || /_bg_color/.test( key ) ? 'background' : 'color',\r\n selector = self.stylable_elements.result( key );\r\n\r\n if( selector )\r\n styles += ( selector + \"{ \" + color_type + \": \" + color +\";} \" );\r\n });\r\n }\r\n\r\n /**\r\n * Apply border styles\r\n */\r\n if( _.isTrue( data.border ) ){\r\n var border_tpl = Hustle.create_template( \" {{el}} {border:{{weight}}px {{type}} {{color}}; }\" ),\r\n border_radius_tpl = Hustle.create_template( \" {{el}} {border-radius:{{radius}}px; }\" ) ;\r\n _(['border_static_color']).each(function(key, i){\r\n styles += border_tpl({\r\n el: this.stylable_elements.result( key ),\r\n weight: data.border_weight,\r\n type: data.border_type,\r\n color: data[ key ]\r\n });\r\n }.bind(this) );\r\n\r\n /**\r\n * Apply border radius style\r\n */\r\n styles += border_radius_tpl( {\r\n el: this.stylable_elements.result( \"border_radius\" ),\r\n radius: data.border_radius\r\n } );\r\n\r\n }\r\n\r\n\r\n /***\r\n * Apply dropshadow styles\r\n */\r\n if( _.isTrue( data.drop_shadow ) ){\r\n var drop_shadow_tpl = Hustle.create_template( \" {{el}} {box-shadow:{{x}}px {{y}}px {{blur}}px {{spread}}px {{color}}; }\" );\r\n\r\n styles += drop_shadow_tpl( {\r\n el: this.stylable_elements.result( \"drop_shadow_color\" ),\r\n x: data.drop_shadow_x,\r\n y: data.drop_shadow_y,\r\n blur: data.drop_shadow_blur,\r\n spread: data.drop_shadow_spread,\r\n color: data.drop_shadow_color\r\n } );\r\n }\r\n\r\n /**\r\n * Apply custom size is being applied now on \"custom_content/view.js\"\r\n */\r\n /* if( _.isTrue( data.customize_size ) ){\r\n var custom_size_tpl = Hustle.create_template( \" {{el}} {width: {{width}}px; height: {{height}}px; }\" );\r\n\r\n styles += custom_size_tpl({\r\n el: this.stylable_elements.result( \"custom_height\" ),\r\n height: data.custom_height,\r\n width: data.custom_width\r\n });\r\n } */\r\n\r\n if( _.isTrue( data.customize_css ) )\r\n styles += data.custom_css;\r\n\r\n $styles_el.html( styles );\r\n }, 10),\r\n create_css_editor: _.debounce(function(){\r\n if( _.isFalse( this.model.get(\"customize_css\") ) ) return;\r\n\r\n this.css_editor = ace.edit(\"hustle_custom_css\");\r\n\r\n this.css_editor.getSession().setMode(\"ace/mode/css\");\r\n this.css_editor.setTheme(\"ace/theme/solarized_light\");\r\n this.css_editor.getSession().setUseWrapMode(true);\r\n this.css_editor.getSession().setUseWorker(false);\r\n this.css_editor.setShowPrintMargin(false);\r\n this.css_editor.renderer.setShowGutter(true);\r\n this.css_editor.setHighlightActiveLine(true);\r\n this.css_editor.on(\"blur\", $.proxy(this.update_custom_css, this));\r\n\r\n }, 0),\r\n update_custom_css: function(){\r\n if( this.css_editor )\r\n this.model.set(\"custom_css\", this.css_editor.getValue() );\r\n },\r\n insert_stylable_element: function(e){\r\n e.preventDefault();\r\n var $el = $(e.target),\r\n stylable = $el.data(\"stylable\") + \"{}\";\r\n\r\n this.css_editor.navigateFileEnd();\r\n this.css_editor.insert(stylable);\r\n this.css_editor.navigateLeft(1);\r\n this.css_editor.focus();\r\n\r\n }\r\n }));\r\n\r\n});","Hustle.define(\"Optin.Listing\", function($){\r\n \"use strict\";\r\n var Delete_Confirmation = Hustle.get(\"Delete_Confirmation\");\r\n\r\n return Backbone.View.extend({\r\n el: \"#hustle-optin-listing\",\r\n\t\tlogShown: false,\r\n events: {\r\n\t \"click .wph-accordions header\" : \"toggle_optin_accordion\",\r\n \"click .hustle-delete-optin\": \"delete_optin\",\r\n \"click .optin-active-state\": \"toggle_optin_activity\",\r\n \"click .button-view-email-list\": \"view_email_list\",\r\n \"change .optin-type-active-state\": \"toggle_type_activity\",\r\n \"change .wpoi-testmode-active-state\": \"toggle_type_mode_activity\",\r\n \"change .optin-toggle-tracking-activity\": \"toggle_tracking_activity\",\r\n\t\t\t\"click .button-view-log-list\": \"view_error_log_list\"\r\n },\r\n initialize: function(){\r\n var self = this;\r\n // Set visibility for test mode toggles at view load, with no animation\r\n this.$('.optin-type-active-state').each(function(){\r\n self.set_testmode_visibiliy( $(this), 0 );\r\n });\r\n },\r\n toggle_optin_accordion: function(e){\r\n\r\n if( _.indexOf( ['wph-accordion--animate_buttons', 'wph-icon i-arrow'], e.target.className ) === -1 ) return;\r\n\r\n var $this = $(e.target),\r\n $icon = $this.find(\".dev-icon\"),\r\n $li = $this.closest(\"li\"),\r\n $section = $li.find(\"section\");\r\n\r\n $icon.toggleClass(\"dev-icon-caret_down dev-icon-caret_up\");\r\n\t\t\t$li.toggleClass(\"wph-accordion--closed wph-accordion--open\");\r\n\t\t\t$li.siblings('li.wph-accordion--open').toggleClass(\"wph-accordion--closed wph-accordion--open\");\r\n\r\n },\r\n delete_optin: function(e){\r\n e.preventDefault();\r\n\r\n e.stopPropagation();\r\n var $this = this.$( e.target );\r\n\r\n if( $this.prev( \".hustle-delete-module-confirmation\" ).length ) return;\r\n\r\n var $li = $this.closest(\"li.wph-accordions--item\"),\r\n id = $this.data(\"id\"),\r\n confirmation = new Delete_Confirmation({\r\n id: $this.data(\"id\"),\r\n nonce: $this.data(\"nonce\"),\r\n action: \"inc_opt_delete_optin\",\r\n onSuccess: function(res){\r\n if( res.success ){\r\n $this.closest(\"li\").slideUp(300, function(){\r\n $(this).remove();\r\n });\r\n }\r\n\r\n }\r\n });\r\n\r\n $this.before( confirmation.$el );\r\n\r\n },\r\n toggle_optin_activity: function(e){\r\n var $this = this.$(e.target),\r\n data = $this.data() || {},\r\n $overlay = $this.closest(\".wph-accordions--item\").find(\".wph-accordion--disable\"),\r\n $row = $this.closest(\"li\");\r\n\r\n data.action = \"inc_opt_toggle_state\";\r\n data._ajax_nonce = data.nonce;\r\n $this.prop(\"disabled\", true);\r\n if( $this.is(\":checked\") ){\r\n $overlay.addClass(\"hidden\");\r\n $row.removeClass(\"wph-accordion--closed\")\r\n .addClass(\"wph-accordion--open\");\r\n }else{\r\n $overlay.removeClass(\"hidden\");\r\n $row.addClass(\"wph-accordion--closed\")\r\n .removeClass(\"wph-accordion--open\");\r\n }\r\n\r\n $.post(ajaxurl, data,function(response){\r\n $this.prop(\"disabled\", false);\r\n\r\n });\r\n },\r\n view_email_list: function(e){\r\n e.preventDefault();\r\n e.stopPropagation();\r\n var $this = $(e.target),\r\n id = $this.data(\"id\"),\r\n name = $this.data(\"name\"),\r\n total = $this.data(\"total\"),\r\n Subscription_List_Modal = Hustle.get(\"Optin.Subscription_List_Modal\");\r\n \r\n\r\n var subscription_list = new Subscription_List_Modal({\r\n model: {\r\n id: id,\r\n total: total,\r\n name: name,\r\n\t\t\t\t\tmodule_fields: []\r\n }\r\n });\r\n\r\n },\r\n set_testmode_visibiliy: function( active_toggle, speed ) {\r\n if( typeof speed === 'undefined' ) speed = 400;\r\n var $this = active_toggle,\r\n data = $this.data() || {};\r\n\r\n var $test_mode_toggle = this.$('.wpoi-testmode-active-state[data-id=\"' + data.id + '\"][data-type=\"' + data.type + '\"]').closest(\".test-mode\");\r\n if( $this.is( \":checked\" ) ){\r\n $test_mode_toggle.fadeOut( speed );\r\n } else {\r\n $test_mode_toggle.fadeIn( speed );\r\n }\r\n\r\n },\r\n toggle_tracking_activity: function(e){\r\n e.stopPropagation();\r\n var $this = $(e.target),\r\n id = $this.data(\"id\"),\r\n nonce = $this.data(\"nonce\"),\r\n type = $this.data(\"type\"),\r\n new_state = $this.is(\":checked\");\r\n\r\n $this.attr(\"disabled\", true);\r\n\r\n $.ajax({\r\n url: ajaxurl,\r\n type: \"POST\",\r\n data: {\r\n action: \"inc_optin_toggle_tracking_activity\",\r\n id: id,\r\n type: type,\r\n _ajax_nonce: nonce\r\n },\r\n complete: function(){\r\n $this.attr(\"disabled\", false);\r\n },\r\n success: function( res ){\r\n if( !res.success )\r\n $this.attr(\"checked\", !new_state);\r\n },\r\n error: function(res){\r\n if( !res.success )\r\n $this.attr(\"checked\", !new_state);\r\n }\r\n });\r\n },\r\n toggle_type_activity: function(e){\r\n var $this = $(e.target),\r\n data = $this.data() || {};\r\n\r\n // Set visibility for test mode toggles when the active toggle changes, as specified in indesign\r\n this.set_testmode_visibiliy( $this );\r\n\r\n $('.optin-type-active-state[data-id=\"' + data.id + '\"][data-type=\"' + data.type + '\"]').not(this).prop(\"checked\", $this.is(\":checked\") ? true : false);\r\n\r\n data.action = \"inc_opt_toggle_optin_type_state\";\r\n data._ajax_nonce = data.nonce;\r\n\r\n $this.prop(\"disabled\", true);\r\n $.post(ajaxurl, data,function(response){\r\n $this.prop(\"disabled\", false);\r\n });\r\n },\r\n toggle_type_mode_activity: function(e){\r\n var $this = $(e.target),\r\n data = $this.data() || {};\r\n\r\n data.action = \"inc_opt_toggle_type_test_mode\";\r\n data._ajax_nonce = data.nonce;\r\n\r\n $('.wpoi-testmode-active-state[data-id=\"' + data.id + '\"][data-type=\"' + data.type + '\"]').not(this).prop(\"checked\", $this.is(\":checked\") ? true : false);\r\n\r\n $this.prop(\"disabled\", true);\r\n $.post(ajaxurl, data,function(response){\r\n $this.prop(\"disabled\", false);\r\n });\r\n },\r\n\t\tview_error_log_list: function(e){\r\n\t\t\tvar target = $(e.currentTarget),\r\n\t\t\t\tdata = target.data(),\r\n\t\t\t\toptin_id = data.id,\r\n\t\t\t\tname = data.name,\r\n\t\t\t\tErrorList = Hustle.get( 'Optin.Error_List_Modal' );\r\n\r\n\t\t\tif ( ! this.logShown ) {\r\n\t\t\t\tthis.logShown = new ErrorList({\r\n\t\t\t\t\tbutton: target,\r\n\t\t\t\t\tmodel: {\r\n\t\t\t\t\t\tname: name,\r\n\t\t\t\t\t\toptin_id: optin_id,\r\n\t\t\t\t\t\ttotal: data.total\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t} else {\r\n\t\t\t\tthis.logShown.show();\r\n\t\t\t}\r\n\r\n/*\r\n\t\t\t$.getJSON( window.ajax, {\r\n\t\t\t\t_wpnonce: optin_vars.error_log_nonce,\r\n\t\t\t\toptin_id: optin_id\r\n\t\t\t}, function( res ) {\r\n\t\t\t\talert(res);\r\n\t\t\t});\r\n*/\r\n\t\t}\r\n });\r\n});","Hustle.define(\"Custom_Content.Popup_View\", function($, doc, win){\r\n \"use strict\";\r\n return Hustle.View.extend(_.extend({}, Hustle.get(\"Mixins.Model_Updater\"), {\r\n template: Hustle.template(\"wpoi-custom-content-popup-tpl\"),\r\n message_editor: false,\r\n init: function( options ){\r\n this.type = options.type;\r\n this.display_triggers_view = options.display_triggers_view;\r\n this.conditions_view = options.conditions_view;\r\n this.listenTo( this.model, \"change:enabled\", this.toggle_panel );\r\n this.conditions_view.on(\"toggle_condition\", this.update_conditions_label);\r\n this.conditions_view.on(\"change:update_view_label\", this.update_conditions_label);\r\n return this.render();\r\n },\r\n render: function(){\r\n this.$el.html( this.template( _.extend({}, {\r\n type: this.type,\r\n type_name: optin_vars.messages.settings[ this.type ],\r\n condition_labels: this.conditions_view.get_all_conditions_labels()\r\n }, this.model.toJSON() ) ) );\r\n\r\n this.$(\".wph-trigger\").html( this.display_triggers_view.$el );\r\n this.$(\".wph-conditions\").replaceWith( this.conditions_view.$el );\r\n\t\t\tif ( _.isFalse(this.model.enabled) ) this.$el.find(\"#wph-popup-condition-labels\").hide();\r\n return this;\r\n },\r\n toggle_panel: function( model ){\r\n this.$(\".switch-wrap\").toggleClass(\"open closed\");\r\n\t\t\tthis.$el.find(\"#wph-popup-condition-labels\").toggle();\r\n },\r\n update_conditions_label: function( conditions_view ){\r\n $('#wph-popup-condition-labels').html( conditions_view.get_all_conditions_labels() );\r\n }\r\n } ) );\r\n\r\n});","Hustle.define(\"Optin.Preview\", function($){\r\n \"use strict\";\r\n return Backbone.View.extend({\r\n el: \".wph-preview\",\r\n preview_modal: false,\r\n $preview_yield: false,\r\n wrapper_class_tpl: Hustle.create_template(\"wph-preview--optin wph-preview--{{type}}\"),\r\n events: {\r\n \"click .wph-preview--mask\": \"hide\",\r\n \"click .wph-preview--close\": \"hide\",\r\n \"change #wph-preview-type-selector\": \"change_type\"\r\n },\r\n initialize: function(){\r\n this.$preview_yield = this.$(\"#optin-preview-wrapper\");\r\n this.render();\r\n this.listenTo( this.preview_modal.model, \"change\", this.render );\r\n this.$(\"#wph-preview-type-selector\").val( this.model.get(\"type\") );\r\n },\r\n get_tpl: function( layout_id ){\r\n var templates = [\"optin-layout-one\", \"optin-layout-two\", \"optin-layout-three\", \"optin-layout-four\"];\r\n return Hustle.template( templates[ layout_id ] );\r\n },\r\n render: function(){\r\n var Modal = Hustle.get(\"Modal\");\r\n this.preview_modal = new Modal( { model: this.model, template: this.get_tpl( this.model.get(\"form_location\").toInt() ) } );\r\n this.$preview_yield.replaceWith( this.preview_modal.$el );\r\n this.$preview_yield = this.preview_modal.$el;\r\n this.preview_modal.show();\r\n this.$(\"#wph-preview-type-selector\").val( this.model.get(\"type\") );\r\n Hustle.Events.trigger(\"view.rendered\", this);\r\n },\r\n show: function(){\r\n this.$el\r\n .removeClass(\"wph-preview--closed\")\r\n .addClass(\"wph-preview--open\");\r\n this.$(\".wph-preview--optin\").attr(\"class\", this.wrapper_class_tpl({type: this.model.get(\"type\") }));\r\n Optin.Events.trigger(\"design:preview:render:finish\", this.preview_modal);\r\n },\r\n hide: function(e){\r\n this.$el\r\n .removeClass(\"wph-preview--open\")\r\n .addClass(\"wph-preview--closed\");\r\n },\r\n change_type: function(e){\r\n var type = this.$(e.target).val();\r\n\r\n this.preview_modal.model.set(\"type\", type);\r\n this.$(\".wph-preview--optin\").attr(\"class\", this.wrapper_class_tpl({type: type}));\r\n Optin.Events.trigger(\"design:preview:render:finish\", this.preview_modal);\r\n Hustle.Events.trigger(\"Optin.preview.changed.type\", this);\r\n }\r\n });\r\n});","Hustle.define(\"Custom_Content.Slide_In_View\", function($, doc, win){\r\n \"use strict\";\r\n\r\n return Hustle.View.extend(_.extend({}, Hustle.get(\"Mixins.Model_Updater\"), {\r\n template: Hustle.template(\"wpoi-custom-content-slide_in-tpl\"),\r\n message_editor: false,\r\n init: function( options ){\r\n this.type = options.type;\r\n this.display_triggers_view = options.display_triggers_view;\r\n this.conditions_view = options.conditions_view;\r\n this.listenTo( this.model, \"change:enabled\", this.toggle_panel );\r\n this.listenTo( this.model, \"change:position\", this.update_slide_in_position_label );\r\n this.conditions_view.on(\"toggle_condition\", this.update_conditions_label);\r\n this.conditions_view.on(\"change:update_view_label\", this.update_conditions_label);\r\n return this.render();\r\n },\r\n render: function(){\r\n this.model.set('position_label', optin_vars.messages.positions[this.model.get('position')], { silent:true } );\r\n this.$el.html( this.template( _.extend({}, {\r\n type: this.type,\r\n type_name: optin_vars.messages.settings[ this.type ],\r\n condition_labels: this.conditions_view.get_all_conditions_labels()\r\n }, this.model.toJSON() ) ) );\r\n\r\n this.$(\".wph-trigger\").html( this.display_triggers_view.$el );\r\n\t\t\tthis.$(\".wph-conditions\").replaceWith( this.conditions_view.$el );\r\n\t\t\tif ( _.isFalse(this.model.enabled) ) this.$el.find(\"#wph-slide-in-condition-labels\").hide();\r\n return this;\r\n },\r\n toggle_panel: function( model ){\r\n this.$(\".switch-wrap\").toggleClass(\"open closed\");\r\n\t\t\tthis.$el.find(\"#wph-slide-in-condition-labels\").toggle();\r\n },\r\n update_slide_in_position_label: function(e){\r\n this.$(\"#wpoi-slide_in-position-label\").text( optin_vars.messages.positions[this.model.get('position')] );\r\n },\r\n update_conditions_label: function( conditions_view ){\r\n $('#wph-slide-in-condition-labels').html( conditions_view.get_all_conditions_labels() );\r\n }\r\n } ) );\r\n\r\n});","Hustle.define(\"Social_Sharing.View\", function($, doc, win){\r\n \"use strict\";\r\n\r\n return Hustle.View.extend({\r\n el: '.wph-sshare-wizard-view',\r\n message_box_tpl: Optin.template('wpoi-social-sharing-message-box-tpl'),\r\n preview: false,\r\n preview_model: false,\r\n initial_data: new Backbone.Model({\r\n content: '',\r\n }),\r\n events: {\r\n 'click .wph-toggletabs .can-open': 'toggle_accordion',\r\n 'click ul.wph-ss-service-type li label': 'toggle_service_type',\r\n 'click .wph-button.ss-save-changes': 'ss_save',\r\n 'click .wph-button.ss-cancel': 'ss_cancel',\r\n 'click .wph-button.ss-next-step': 'ss_next_step',\r\n 'click .wph-button.ss-back': 'ss_back',\r\n 'click .wph-button.ss-finish': 'ss_finish',\r\n 'change .wph-sshare--pick_social_icons input.wph-share-icon-enable': 'toggle_icon',\r\n 'change .wph-sshare--pick_social_icons .wph-input--number input': 'icon_counter_updated',\r\n 'change .wph-sshare--pick_social_icons .wph-sshare--input_wrap input': 'icon_link_updated',\r\n 'click ul.wph-share-icon_style [name=\"wph-sshare-type_icons_design\"]': 'toggle_icon_style',\r\n 'click ul.wph-share-customize-color li > label': 'toggle_floating_custom_color',\r\n 'click ul.wph-share-widget-customize-color li > label': 'toggle_widget_custom_color',\r\n 'click ul.wph-sshare--pick_location_type li > label': 'toggle_location_type',\r\n 'click ul.wph-sshare--select_location_align_x li > label': 'toggle_location_align',\r\n 'click ul.wph-sshare--select_location_align_y li > label': 'toggle_location_align'\r\n },\r\n init: function( opts ){\r\n this.services_view = opts.services_view;\r\n this.appearance_view = opts.appearance_view;\r\n this.floating_view = opts.floating_view;\r\n \r\n this.listenTo( this.model, 'change', this.render_message_box );\r\n this.listenTo( this.services_view.model, 'change:service_type', this.services_view_changes );\r\n this.listenTo( this.services_view.model, 'change:click_counter', this.services_view_changes );\r\n this.listenTo( this.appearance_view.model, 'change:icons_order', this.icons_order_updated );\r\n this.listenTo( this.appearance_view.model, 'change:drop_shadow', this.appearance_view_changes );\r\n this.listenTo( this.appearance_view.model, 'change:customize_colors', this.appearance_view_changes );\r\n this.listenTo( this.appearance_view.model, 'change:customize_widget_colors', this.appearance_view_changes );\r\n this.listenTo( this.appearance_view.model, 'change:widget_drop_shadow', this.appearance_view_changes );\r\n this.listenTo( this.appearance_view.model, 'change:floating_inline_count', this.appearance_view_changes );\r\n this.listenTo( this.appearance_view.model, 'change:widget_inline_count', this.appearance_view_changes );\r\n this.listenTo( this.appearance_view.model, 'change', _.debounce( this.render_preview, 100 ) );\r\n \r\n this.render_message_box();\r\n return this.render();\r\n },\r\n render: function(){\r\n \r\n // Names & Services\r\n this.render_service_view();\r\n \r\n // Appearance\r\n this.render_appearance_view();\r\n \r\n var $floating_container = this.$('#wph-social-sharing--floating-social-container'),\r\n floating_container_classes = $floating_container.attr('class');\r\n \r\n $floating_container.replaceWith( this.floating_view.$el.addClass( floating_container_classes ).attr('id', 'wph-social-sharing--floating-social-container') );\r\n },\r\n render_service_view: function() {\r\n // Names & Services\r\n this.$('#wph-social-sharing--services_tab .wph-toggletabs--content').html('');\r\n this.services_view.delegateEvents();\r\n this.$('#wph-social-sharing--services_tab .wph-toggletabs--content')\r\n .append( this.services_view.$el );\r\n },\r\n render_appearance_view: function() {\r\n \r\n // Appearance\r\n this.$('#wph-social-sharing--appearance_tab .wph-toggletabs--content').html('');\r\n this.appearance_view.delegateEvents();\r\n this.$('#wph-social-sharing--appearance_tab .wph-toggletabs--content')\r\n .append( this.appearance_view.$el );\r\n \r\n Hustle.Events.trigger('SS.appearance_view_ready');\r\n \r\n // Preview\r\n this.render_preview();\r\n },\r\n services_view_changes: function() {\r\n Optin.hasChanges = true;\r\n this.services_view.render();\r\n this.render_service_view();\r\n this.appearance_view_changes();\r\n },\r\n appearance_view_changes: function() {\r\n Optin.hasChanges = true;\r\n this._set_social_icons();\r\n this.appearance_view.render();\r\n this.render_appearance_view();\r\n },\r\n render_message_box: function(){\r\n var shortcode_id = this._get_shortcode_id();\r\n this.$('#wph-social-sharing--messagebox').html( this.message_box_tpl( {shortcode_id: shortcode_id } ) );\r\n },\r\n render_preview: function() {\r\n var $preview_box = this.$('#wph-sshare--floating_social .wph-sshare--preview_box .wph-sshare--container'),\r\n $widget_preview_box = this.$('#wph-sshare--widget_shortcode .wph-sshare--preview_box .wph-sshare--container'),\r\n appearance_data = this.appearance_view.model.toJSON();\r\n \r\n // floating_social_bg\r\n $preview_box.css( 'background', appearance_data.floating_social_bg );\r\n // counter text\r\n if ( appearance_data.counter_text ) {\r\n $preview_box.find('.wph-sshare_social_counter span')\r\n .css( 'color', appearance_data.counter_text );\r\n }\r\n \r\n // custom icon bg color and icon color for each icon_style\r\n if ( appearance_data.customize_colors == '1' ) {\r\n \r\n if ( appearance_data.icon_style == 'one' ) {\r\n $preview_box.find('a').css( 'background', appearance_data.icon_bg_color );\r\n $preview_box.find('.wph-social-path .wph-social-icon').css( 'fill', appearance_data.icon_color );\r\n } \r\n \r\n if ( appearance_data.icon_style == 'two' ) {\r\n $preview_box.find('.wph-social').css( 'border-color', appearance_data.icon_bg_color );\r\n $preview_box.find('.wph-social .wph-social-icon').css( 'fill', appearance_data.icon_color );\r\n }\r\n \r\n if ( appearance_data.icon_style == 'three' || appearance_data.icon_style == 'four' ) {\r\n $preview_box.find('.wph-social').css( 'background', appearance_data.icon_bg_color );\r\n $preview_box.find('.wph-social .wph-social-icon').css( 'fill', appearance_data.icon_color );\r\n }\r\n \r\n if ( appearance_data.counter_border ) {\r\n $preview_box.find('a')\r\n .css( 'border', '1px solid ' + appearance_data.counter_border );\r\n }\r\n }\r\n \r\n // drop_shadow\r\n if ( appearance_data.drop_shadow == '1' ) {\r\n var box_shadow = '' + \r\n appearance_data.drop_shadow_x + 'px ' +\r\n appearance_data.drop_shadow_y + 'px ' +\r\n appearance_data.drop_shadow_blur + 'px ' +\r\n appearance_data.drop_shadow_spread + 'px ' +\r\n appearance_data.drop_shadow_color;\r\n \r\n $preview_box.css( 'box-shadow', box_shadow );\r\n }\r\n \r\n //widget_bg_color\r\n $widget_preview_box.css( 'background', appearance_data.widget_bg_color );\r\n $widget_preview_box\r\n .find('.wph-sshare_social_counter span')\r\n .css( 'color', appearance_data.widget_counter_text );\r\n \r\n // widget icon bg color and icon color for each icon_style\r\n if ( appearance_data.customize_widget_colors == '1' ) {\r\n \r\n if ( appearance_data.icon_style == 'one' ) {\r\n $widget_preview_box.find('a').css( 'background', appearance_data.widget_icon_bg_color );\r\n $widget_preview_box.find('.wph-social-path .wph-social-icon').css( 'fill', appearance_data.widget_icon_color );\r\n } \r\n \r\n if ( appearance_data.icon_style == 'two' ) {\r\n $widget_preview_box.find('.wph-social').css( 'border-color', appearance_data.widget_icon_bg_color );\r\n $widget_preview_box.find('.wph-social .wph-social-icon').css( 'fill', appearance_data.widget_icon_color );\r\n }\r\n \r\n if ( appearance_data.icon_style == 'three' || appearance_data.icon_style == 'four' ) {\r\n $widget_preview_box.find('.wph-social').css( 'background', appearance_data.widget_icon_bg_color );\r\n $widget_preview_box.find('.wph-social .wph-social-icon').css( 'fill', appearance_data.widget_icon_color );\r\n }\r\n \r\n }\r\n \r\n // widget_drop_shadow\r\n if ( appearance_data.widget_drop_shadow == '1' ) {\r\n var widget_box_shadow = '' + \r\n appearance_data.widget_drop_shadow_x + 'px ' +\r\n appearance_data.widget_drop_shadow_y + 'px ' +\r\n appearance_data.widget_drop_shadow_blur + 'px ' +\r\n appearance_data.widget_drop_shadow_spread + 'px ' +\r\n appearance_data.widget_drop_shadow_color;\r\n \r\n $widget_preview_box.css( 'box-shadow', widget_box_shadow );\r\n }\r\n },\r\n toggle_accordion: function(e) {\r\n e.preventDefault();\r\n var $this = $(e.target),\r\n $all = $('.wph-toggletabs'),\r\n $togglable = $this.closest('.wph-toggletabs'),\r\n $others = $all.not( $togglable ),\r\n $caret = $togglable.find('.dev-icon-caret_down, .dev-icon-caret_up');\r\n\r\n $others.removeClass('wph-toggletabs--open');\r\n $others.find('.dev-icon-caret_up')\r\n .removeClass('dev-icon-caret_up')\r\n .addClass('dev-icon-caret_down');\r\n\r\n $togglable.toggleClass('wph-toggletabs--open wph-toggletabs--closed');\r\n $caret.toggleClass('dev-icon-caret_down dev-icon-caret_up');\r\n\r\n },\r\n toggle_service_type: function(e){\r\n e.preventDefault();\r\n \r\n Optin.hasChanges = true;\r\n \r\n var $this = this.$(e.target);\r\n \r\n if ( $this.closest('li').hasClass('current') ) return;\r\n \r\n this.model.set( 'service_type', $(e.target).find('input').val() );\r\n },\r\n toggle_icon: function(e) {\r\n var $this = this.$(e.target),\r\n is_checked = $this.is(':checked'),\r\n service_type = this.services_view.model.get('service_type'),\r\n $parent_container = $this.parents('.wph-sshare--social_' + service_type );\r\n \r\n if( is_checked ) {\r\n $parent_container.find('.disabled').removeClass('disabled');\r\n } else {\r\n $parent_container.find('.wph-sshare--icon').addClass('disabled');\r\n if ( service_type == 'native' ) {\r\n $parent_container.find('.wph-input--number').addClass('disabled');\r\n } else {\r\n $parent_container.find('.wph-sshare--input_wrap').addClass('disabled');\r\n }\r\n }\r\n \r\n // this._set_social_icons();\r\n // trigger changes on Appearance view to reflect changes on selected icons\r\n this.appearance_view_changes();\r\n \r\n },\r\n icons_order_updated: _.debounce(\r\n function() {\r\n // this._set_social_icons();\r\n this.appearance_view_changes();\r\n }, \r\n 500\r\n ),\r\n icon_counter_updated: _.debounce(\r\n function() {\r\n // this._set_social_icons();\r\n this.appearance_view_changes();\r\n }, \r\n 500\r\n ),\r\n icon_link_updated: function(e) {\r\n this._set_social_icons();\r\n },\r\n toggle_icon_style: function(e) {\r\n e.preventDefault();\r\n var $this = this.$(e.target);\r\n \r\n if ( $this.closest('li').hasClass('current') ) return;\r\n \r\n this.appearance_view.model.set('icon_style', $this.val(), {silent:true});\r\n this.appearance_view.render();\r\n this.render_appearance_view();\r\n },\r\n toggle_floating_custom_color: function(e) {\r\n e.preventDefault();\r\n var $this = this.$(e.target),\r\n $li = $this.closest('li'),\r\n $input = $li.find('input');\r\n \r\n if ( $li.hasClass('current') ) return;\r\n \r\n $li.addClass('current');\r\n $li.siblings().removeClass('current');\r\n this.appearance_view.model.set( 'customize_colors', $input.val() );\r\n \r\n },\r\n toggle_widget_custom_color: function(e) {\r\n e.preventDefault();\r\n var $this = this.$(e.target),\r\n $li = $this.closest('li'),\r\n $input = $li.find('input');\r\n \r\n if ( $li.hasClass('current') ) return;\r\n \r\n $li.addClass('current');\r\n $li.siblings().removeClass('current');\r\n this.appearance_view.model.set( 'customize_widget_colors', $input.val() );\r\n \r\n },\r\n toggle_location_type: function(e) {\r\n e.preventDefault();\r\n var $this = this.$(e.target),\r\n $li = $this.closest('li'),\r\n $input = $li.find('input'),\r\n $selector_info = this.$('.wph-sshare--selector');\r\n \r\n if ( $li.hasClass('current') ) return;\r\n \r\n $li.addClass('current');\r\n $li.siblings().removeClass('current');\r\n this.floating_view.model.set( 'location_type', $input.val() );\r\n \r\n if ( $input.val() == 'selector' ) {\r\n $selector_info.removeClass('hidden');\r\n } else {\r\n if ( !$selector_info.hasClass('hidden') ) $selector_info.addClass('hidden');\r\n }\r\n \r\n },\r\n toggle_location_align: function(e) {\r\n e.preventDefault();\r\n var $this = this.$(e.target),\r\n $li = $this.closest('li'),\r\n $input = $li.find('input'),\r\n $additional_settings = this.$('.wph-sshare--offset_' + $input.val() ),\r\n data_field = $input.data('attribute');\r\n \r\n if ( $li.hasClass('current') ) return;\r\n \r\n $li.addClass('current');\r\n $li.siblings().removeClass('current');\r\n this.floating_view.model.set( data_field, $input.val() );\r\n \r\n $additional_settings.removeClass('hidden');\r\n $additional_settings.siblings('[class^=\"wph-sshare--offset_\"]').each( function() {\r\n if ( !$(this).hasClass('hidden') ) $(this).addClass('hidden');\r\n });\r\n },\r\n ss_save: function(e) {\r\n e.preventDefault();\r\n \r\n if ( !this.validate() ) return;\r\n \r\n var me = this,\r\n $this = this.$(e.target).closest('button'),\r\n ss_id = $this.data('id'),\r\n $buttons = $this.parents('.row').find('button.wph-button'),\r\n services = this.services_view.model.toJSON(),\r\n appearance = this.appearance_view.model.toJSON(),\r\n floating_social = this.floating_view.model.toJSON(),\r\n shortcode_id = this._get_shortcode_id();\r\n \r\n $this.addClass('wph-button-save--loading');\r\n \r\n // disable all buttons\r\n $buttons.each( function() {\r\n $(this).attr('disabled', true);\r\n } );\r\n \r\n services = this._get_social_icons_data(services);\r\n \r\n // saving the SS module\r\n return $.ajax({\r\n url: ajaxurl,\r\n type: 'POST',\r\n data: {\r\n action: 'hustle_social_sharing_save',\r\n _ajax_nonce: $this.data('nonce'),\r\n id: $this.data('id'),\r\n services: services,\r\n appearance: appearance,\r\n floating_social: floating_social,\r\n shortcode_id: shortcode_id\r\n },\r\n complete: function(resp) {\r\n var response = resp.responseJSON,\r\n $save_buttons = me.$('button.wph-button[data-id=\"'+ ss_id +'\"]');\r\n \r\n $this.removeClass('wph-button-save--loading');\r\n // enable back the buttons\r\n $buttons.each( function(){\r\n $(this).attr('disabled', false);\r\n } );\r\n \r\n Optin.hasChanges = false;\r\n \r\n if ( ss_id == -1 ) {\r\n // update all data-id on buttons\r\n $save_buttons.attr( 'data-id', response.data );\r\n // update url\r\n var currUrl = window.location.pathname + window.location.search;\r\n currUrl = currUrl.replace('id=-1', 'id=' + response.data);\r\n window.history.replaceState( {} , '', currUrl );\r\n }\r\n }\r\n });\r\n },\r\n ss_cancel: function(e) {\r\n e.preventDefault();\r\n window.onbeforeunload = null;\r\n window.location.replace( '?page=inc_hustle_social_sharing' );\r\n return;\r\n },\r\n ss_next_step: function(e) {\r\n e.preventDefault();\r\n if ( !this.validate() ) return;\r\n \r\n var me = this,\r\n $next_tab = this.$('.wph-toggletabs.wph-toggletabs--open ~ .wph-toggletabs').first();\r\n \r\n this.ss_save(e).done( function(resp){\r\n if ( resp.success ) {\r\n $next_tab.find('.can-open span').click();\r\n }\r\n } );\r\n },\r\n ss_back: function(e) {\r\n e.preventDefault();\r\n var $prev_tab = this.$('.wph-toggletabs.wph-toggletabs--open').prevAll('.wph-toggletabs').first();\r\n $prev_tab.find('.can-open span').click();\r\n },\r\n ss_finish: function(e) {\r\n e.preventDefault();\r\n if ( !this.validate() ) return;\r\n \r\n var me = this,\r\n $this = this.$(e.target),\r\n is_new = ( parseInt($this.data('id')) ) == -1 ? true : false;\r\n \r\n this.ss_save(e).done( function(resp){\r\n if ( resp.success ) {\r\n window.onbeforeunload = null;\r\n var url = \"?page=inc_hustle_social_sharing\";\r\n if( is_new ) {\r\n url += \"&new_id=\" + resp.data;\r\n } else{\r\n url += \"&updated_id=\" + resp.data;\r\n }\r\n window.location.replace( url );\r\n }\r\n } );\r\n },\r\n validate: function() {\r\n var success = true,\r\n $opt_name = this.$('[data-attribute=\"optin_name\"]'),\r\n opt_name_placeholder = $opt_name.attr('placeholder');\r\n \r\n // validating opt_name\r\n if ( !$opt_name.val() ) {\r\n success = false;\r\n if ( $opt_name.siblings('span.wph-icon.i-warning').length === 0 ) {\r\n var $warning = $('<span class=\"wph-icon i-warning\" title=\"'+ opt_name_placeholder +'\"></span>');\r\n $warning.insertBefore($opt_name);\r\n }\r\n $opt_name.focus();\r\n }\r\n \r\n if ( success ) {\r\n $('span.dashicons.dashicons-warning').remove();\r\n }\r\n \r\n return success;\r\n },\r\n _set_social_icons: function() {\r\n Optin.hasChanges = true;\r\n var services = this.services_view.model.toJSON();\r\n services = this._get_social_icons_data(services);\r\n this.services_view.model.set( 'social_icons', services.social_icons, {silent:true} );\r\n window.services_model = this.services_view.model;\r\n },\r\n _get_social_icons_data: function( services ) {\r\n \r\n var $social_containers = this.$( '.wph-sshare--social_' + services['service_type'] ),\r\n social_icons = {};\r\n \r\n $social_containers.each( function() {\r\n var $sc = $(this),\r\n $toggle_input = $sc.find('span.toggle input'),\r\n icon = $sc.find('.wph-sshare--icon').data('id'),\r\n $counter = $sc.find('.wph-input--number input'),\r\n $link = $sc.find('.wph-sshare--input_wrap input');\r\n \r\n // check if counter have negative values\r\n var counter_val = parseInt($counter.val());\r\n if ( counter_val < 0 ) {\r\n $counter.val(0);\r\n }\r\n \r\n if ( $toggle_input.is(':checked') ) {\r\n social_icons[icon] = {\r\n 'enabled': true,\r\n 'counter': ( $counter.length ) ? $counter.val() : '0',\r\n 'link': ( $link.length ) ? $link.val() : ''\r\n };\r\n }\r\n \r\n } );\r\n \r\n services['social_icons'] = social_icons;\r\n \r\n return services;\r\n },\r\n _get_shortcode_id: function() {\r\n return this.model.get('optin_name').trim().toLowerCase().replace(/\\s+/g, '-');\r\n }\r\n });\r\n\r\n});","Hustle.define(\"Social_Sharing.Appearance_View\", function($, doc, win){\r\n \"use strict\";\r\n return Hustle.View.extend(_.extend({}, Hustle.get(\"Mixins.Model_Updater\"), {\r\n template: Optin.template(\"wpoi-social-sharing-appreance-tpl\"),\r\n init: function( opts ){\r\n this.on( 'rendered', this.create_color_pickers );\r\n // this.on( 'rendered', this.make_icons_sortable );\r\n \r\n this.listenTo( Hustle.Events, 'SS.appearance_view_ready', this.ready );\r\n \r\n return this.render();\r\n },\r\n render: function(args){\r\n \r\n this.service_model_json = window.services_model.toJSON();\r\n this._handle_icons_order();\r\n \r\n this.setElement( this.template( _.extend( {}, this.model.toJSON(), this.service_model_json ) ) );\r\n \r\n return this;\r\n },\r\n create_color_pickers: function() {\r\n this.$('.wph-color-picker').wpColorPicker({\r\n change: function( event, ui ) {\r\n var $this = $(this);\r\n $this.val( ui.color.toCSS() ).trigger('change');\r\n }\r\n });\r\n },\r\n ready: function() {\r\n var social_icons = this.service_model_json.social_icons,\r\n $reorder_box = this.$('.wph-sshare-reorder_box'),\r\n icon_style = this.model.get('icon_style'),\r\n $preview_box = this.$('.wph-sshare-floating-social--preview_box'),\r\n $preview_container = $preview_box.find('.wph-sshare--container'),\r\n $widget_preview_box = this.$('.wph-sshare-widget--preview_box'),\r\n $widget_preview_container = $widget_preview_box.find('.wph-sshare--container');\r\n \r\n _.each( social_icons, $.proxy(function( data, key ) {\r\n var icon_template = ( icon_style == 'one' )\r\n ? Optin.template('wpoi-sshare-'+ key +'-one-svg')\r\n : Optin.template('wpoi-sshare-'+ key +'-svg');\r\n \r\n var icon_template_html = icon_template(); \r\n \r\n // append social icons into Reorder box\r\n var icon_html = '<div class=\"wph-sshare-reorder_item\" data-id=\"'+ key +'\">'+ icon_template_html +'</div>';\r\n $reorder_box.append(icon_html);\r\n \r\n // append icons on floating social preview\r\n var preview_icon_html = icon_template_html,\r\n native_class = ''; \r\n if ( this.service_model_json.service_type == 'native' ) {\r\n if ( _.isTrue( this.service_model_json.click_counter ) ) {\r\n preview_icon_html += '<div class=\"wph-sshare_social_counter\"><span>'+ data.counter +'</span></div>';\r\n }\r\n native_class = 'native-social-share';\r\n }\r\n var floating_preview_icon_html = '<a data-social=\"'+ key +'\" href=\"#\" class=\"'+ native_class +'\" target=\"_blank\">'+ preview_icon_html +'</a>';\r\n $preview_container.append(floating_preview_icon_html);\r\n \r\n // append icons on widget preview\r\n var widget_preview_icon_html = '<a data-social=\"'+ key +'\" href=\"#\" class=\"'+ native_class +'\" target=\"_blank\">'+ preview_icon_html +'</a>';\r\n $widget_preview_container.append(widget_preview_icon_html);\r\n \r\n }, this) );\r\n \r\n this.make_icons_sortable();\r\n \r\n // social counter display\r\n if ( this.service_model_json.service_type == 'native' ) {\r\n if ( this.model.get('floating_inline_count') == '1' ) {\r\n $preview_container.addClass('wph-sshare--count_inline');\r\n } else {\r\n $preview_container.addClass('wph-sshare--count_block');\r\n }\r\n if ( this.model.get('widget_inline_count') == '1' ) {\r\n $widget_preview_container.addClass('wph-sshare--count_inline');\r\n } else {\r\n $widget_preview_container.addClass('wph-sshare--count_block');\r\n }\r\n }\r\n \r\n },\r\n make_icons_sortable: function() {\r\n var me = this,\r\n sortArgs = {\r\n items: '.wph-sshare-reorder_item',\r\n revert: true,\r\n axis: 'x',\r\n containment: this.$('#wph-sshare-icons_reorder'),\r\n stop: function(e, ui) {\r\n me._reorder_icons();\r\n }\r\n };\r\n \r\n this.$('.wph-sshare-reorder_box').sortable(sortArgs).disableSelection();\r\n },\r\n _handle_icons_order: function() {\r\n var reordered = {},\r\n social_icons = this.service_model_json.social_icons,\r\n icons_order = this.model.get('icons_order'),\r\n icons_order_arr = icons_order.split(',');\r\n \r\n if ( icons_order && icons_order_arr.length ) {\r\n _.each(icons_order_arr, function( data, key ) {\r\n if ( typeof social_icons[data] !== 'undefined' ) {\r\n reordered[data] = social_icons[data];\r\n social_icons = _.pick(social_icons, function(val, index){\r\n if ( data !== index ) {\r\n return index = val;\r\n }\r\n });\r\n }\r\n });\r\n \r\n // if still have some, append those\r\n if ( Object.keys(social_icons).length ) {\r\n reordered = _.extend( reordered, _.pick(social_icons, function(val, index) {\r\n if ( typeof val !== 'undefined' ) {\r\n return index = val;\r\n }\r\n }) );\r\n }\r\n \r\n this.service_model_json.social_icons = reordered;\r\n }\r\n },\r\n _reorder_icons: function() {\r\n var order = [];\r\n this.$('.wph-sshare-reorder_box').find('.wph-sshare-reorder_item').each( function() {\r\n order.push($(this).data('id'));\r\n } );\r\n this.model.set( 'icons_order', order.join() );\r\n }\r\n } ) );\r\n\r\n});","Hustle.define( 'Social_Sharing.Floating_View', function( $, doc, win ) {\r\n\t'use strict';\r\n\r\n\treturn Hustle.View.extend(_.extend({}, Hustle.get(\"Mixins.Model_Updater\"), {\r\n\t\ttemplate: Hustle.template(\"wpoi-social-sharing-floating-tpl\"),\r\n\t\tmessage_editor: false,\r\n\t\tevents: {\r\n\t\t\t'change [name=\"animate\"]': 'toggle_animation'\r\n\t\t},\r\n\t\tinit: function( options ){\r\n\t\t\t this.type = options.type;\r\n\r\n\t\t\t this.conditions_view = options.conditions_view;\r\n\t\t\t this.listenTo( this.model, \"change:enabled\", this.toggle_panel );\r\n\t\t\t this.conditions_view.on(\"toggle_condition\", this.update_conditions_label);\r\n\t\t\t this.conditions_view.on(\"change:update_view_label\", this.update_conditions_label);\r\n\t\t\t return this.render();\r\n\t\t },\r\n\t\t render: function(){\r\n\t\t\t this.$el.html( this.template( _.extend({}, {\r\n\t\t\t\t type: this.type,\r\n\t\t\t\t type_name: optin_vars.messages.settings[ this.type ],\r\n\t\t\t\t condition_labels: this.conditions_view.get_all_conditions_labels()\r\n\t\t\t }, this.model.toJSON() ) ) );\r\n \r\n\t\t\t this.$(\".wph-conditions\").replaceWith( this.conditions_view.$el );\r\n\t\t\t if ( _.isFalse(this.model.enabled) ) this.$el.find(\"#wph-floating-social-condition-labels\").hide();\r\n\r\n\t\t\t this.toggle_animation();\r\n\r\n\t\t\t return this;\r\n\t\t },\r\n\t\t toggle_panel: function( model ){\r\n\t\t\t this.$(\".switch-wrap\").toggleClass(\"open closed\");\r\n\t\t\t this.$el.find(\"#wph-floating-social-condition-labels\").toggle();\r\n\t\t },\r\n\t\t update_conditions_label: function( conditions_view ){\r\n\t\t\t$('#wph-floating-social-condition-labels').html( conditions_view.get_all_conditions_labels() );\r\n\t\t },\r\n\t\t toggle_animation: function() {\r\n\t\t\tvar input = this.$('[name=\"animate\"]:checked'),\r\n\t\t\t\tisOff = 'false' === input.val(),\r\n\t\t\t\tanimation_list = this.$('#optin-afterc-animation-block');\r\n\r\n\t\t\tanimation_list[ isOff ? 'hide' : 'show']();\r\n\t\t }\r\n } ) );\r\n});","Hustle.define(\"Social_Sharing.Services_View\", function($, doc, win){\r\n \"use strict\";\r\n return Hustle.View.extend(_.extend({}, Hustle.get(\"Mixins.Model_Updater\"), {\r\n template: Optin.template(\"wpoi-social-sharing-services-tpl\"),\r\n init: function( opts ){\r\n
|