Popup by Supsystic - Version 1.9.44

Version Description

/ 18.01.2019 = * Fixed conflict with some cache plugins * Fix issue with close Facebook PopUp * Minor improvements

Download this release

Release Info

Developer supsystic.com
Plugin Icon 128x128 Popup by Supsystic
Version 1.9.44
Comparing to
See all releases

Code changes from version 1.9.38 to 1.9.44

classes/frame.php CHANGED
@@ -200,7 +200,7 @@ class framePps {
200
  if(!empty($noncedMethods)) {
201
  $noncedMethods = array_map('strtolower', $noncedMethods);
202
  if(in_array($action, $noncedMethods)) {
203
- $nonce = isset($_REQUEST['_wpnonce']) ? $_REQUEST['_wpnonce'] : reqCfs::getVar('_wpnonce');
204
  if(!wp_verify_nonce( $nonce, $action )) {
205
  $res = false;
206
  }
200
  if(!empty($noncedMethods)) {
201
  $noncedMethods = array_map('strtolower', $noncedMethods);
202
  if(in_array($action, $noncedMethods)) {
203
+ $nonce = isset($_REQUEST['_wpnonce']) ? $_REQUEST['_wpnonce'] : reqPps::getVar('_wpnonce');
204
  if(!wp_verify_nonce( $nonce, $action )) {
205
  $res = false;
206
  }
config.php CHANGED
@@ -48,7 +48,7 @@
48
  define('PPS_EOL', "\n");
49
 
50
  define('PPS_PLUGIN_INSTALLED', true);
51
- define('PPS_VERSION', '1.9.38');
52
  define('PPS_USER', 'user');
53
 
54
  define('PPS_CLASS_PREFIX', 'ppsc');
48
  define('PPS_EOL', "\n");
49
 
50
  define('PPS_PLUGIN_INSTALLED', true);
51
+ define('PPS_VERSION', '1.9.44');
52
  define('PPS_USER', 'user');
53
 
54
  define('PPS_CLASS_PREFIX', 'ppsc');
js/admin.options.js CHANGED
@@ -38,7 +38,7 @@ jQuery(document).ready(function(){
38
  jQuery('.ppsInputsWithDescrForm').find('input[type=checkbox][data-optkey]').change(function(){
39
  var optKey = jQuery(this).data('optkey')
40
  , descShell = jQuery('#ppsFormOptDetails_'+ optKey);
41
- if(descShell.size()) {
42
  if(jQuery(this).attr('checked')) {
43
  descShell.slideDown( 300 );
44
  } else {
@@ -151,7 +151,7 @@ function ppsInitTooltips( selector ) {
151
  for(var k in findPos) {
152
  if(typeof(k) === 'string') {
153
  var $tips = $findIn ? $findIn.find( k ) : jQuery( k ).not('.sup-no-init');
154
- if($tips && $tips.size()) {
155
  tooltipsterSettings.position = findPos[ k ];
156
  // Fallback for case if library was not loaded
157
  if(!$tips.tooltipster) continue;
@@ -200,7 +200,7 @@ function ppsInitStickyItem() {
200
  , wpTollbarHeight = 32
201
  , wndScrollTop = jQuery(window).scrollTop() + wpTollbarHeight
202
  , footer = jQuery('.ppsAdminFooterShell')
203
- , footerHeight = footer && footer.size() ? footer.height() : 0
204
  , docHeight = jQuery(document).height()
205
  , wasSticking = false
206
  , wasUnSticking = false;
@@ -210,7 +210,7 @@ function ppsInitStickyItem() {
210
  for(var i = 0; i < stickiItemsSelectors.length; i++) {
211
  jQuery(stickiItemsSelectors[ i ]).each(function(){
212
  var element = jQuery(this);
213
- if(element && element.size() && !element.hasClass('sticky-ignore')) {
214
  var scrollMinPos = element.offset().top
215
  , prevScrollMinPos = parseInt(element.data('scrollMinPos'))
216
  , useNextElementPadding = toeInArray(stickiItemsSelectors[ i ], elementsUsePaddingNext) !== -1 || element.hasClass('sticky-padd-next')
@@ -233,7 +233,7 @@ function ppsInitStickyItem() {
233
  if(useNextElementPadding) {
234
  //element.addClass('supsystic-sticky-active-bordered');
235
  var nextElement = element.next();
236
- if(nextElement && nextElement.size()) {
237
  nextElement.data('prevPaddingTop', nextElement.css('padding-top'));
238
  var addToNextPadding = parseInt(element.data('next-padding-add'));
239
  addToNextPadding = addToNextPadding ? addToNextPadding : 0;
@@ -257,7 +257,7 @@ function ppsInitStickyItem() {
257
  if(useNextElementPadding) {
258
  //element.removeClass('supsystic-sticky-active-bordered');
259
  var nextElement = element.next();
260
- if(nextElement && nextElement.size()) {
261
  var nextPrevPaddingTop = parseInt(nextElement.data('prevPaddingTop'));
262
  if(isNaN(nextPrevPaddingTop))
263
  nextPrevPaddingTop = 0;
@@ -312,7 +312,7 @@ function ppsInitCustomCheckRadio(selector) {
312
  jQuery(this).trigger('change');
313
  if(jQuery(this).hasClass('cbox')) {
314
  var parentRow = jQuery(this).parents('.jqgrow:first');
315
- if(parentRow && parentRow.size()) {
316
  jQuery(this).parents('td:first').trigger('click');
317
  } else {
318
  var checkId = jQuery(this).attr('id');
@@ -442,7 +442,7 @@ function prepareToPlotDate(data) {
442
  }
443
  function ppsInitPlugNotices() {
444
  var $notices = jQuery('.supsystic-admin-notice');
445
- if($notices && $notices.size()) {
446
  $notices.each(function(){
447
  jQuery(this).find('.notice-dismiss').click(function(){
448
  var $notice = jQuery(this).parents('.supsystic-admin-notice');
@@ -464,7 +464,7 @@ function ppsInitPlugNotices() {
464
  return false;
465
  });
466
  var $enbStatsBtn = jQuery(this).find('.ppsEnbStatsAdBtn');
467
- if($enbStatsBtn && $enbStatsBtn.size()) {
468
  $enbStatsBtn.click(function(){
469
  jQuery.sendFormPps({
470
  data: {mod: 'supsystic_promo', action: 'enbStatsOpt'}
@@ -524,7 +524,7 @@ function ppsInitMainPromoPopup() {
524
  } else {
525
  parent = jQuery(this).parents('tr:first');
526
  }
527
- if(!parent.size()) return;
528
  var promoLink = parent.find('.ppsProOptMiniLabel a').attr('href');
529
  if(promoLink && promoLink != '') {
530
  jQuery('#ppsOptInProWnd a').attr('href', promoLink);
38
  jQuery('.ppsInputsWithDescrForm').find('input[type=checkbox][data-optkey]').change(function(){
39
  var optKey = jQuery(this).data('optkey')
40
  , descShell = jQuery('#ppsFormOptDetails_'+ optKey);
41
+ if(descShell.length) {
42
  if(jQuery(this).attr('checked')) {
43
  descShell.slideDown( 300 );
44
  } else {
151
  for(var k in findPos) {
152
  if(typeof(k) === 'string') {
153
  var $tips = $findIn ? $findIn.find( k ) : jQuery( k ).not('.sup-no-init');
154
+ if($tips && $tips.length) {
155
  tooltipsterSettings.position = findPos[ k ];
156
  // Fallback for case if library was not loaded
157
  if(!$tips.tooltipster) continue;
200
  , wpTollbarHeight = 32
201
  , wndScrollTop = jQuery(window).scrollTop() + wpTollbarHeight
202
  , footer = jQuery('.ppsAdminFooterShell')
203
+ , footerHeight = footer && footer.length ? footer.height() : 0
204
  , docHeight = jQuery(document).height()
205
  , wasSticking = false
206
  , wasUnSticking = false;
210
  for(var i = 0; i < stickiItemsSelectors.length; i++) {
211
  jQuery(stickiItemsSelectors[ i ]).each(function(){
212
  var element = jQuery(this);
213
+ if(element && element.length && !element.hasClass('sticky-ignore')) {
214
  var scrollMinPos = element.offset().top
215
  , prevScrollMinPos = parseInt(element.data('scrollMinPos'))
216
  , useNextElementPadding = toeInArray(stickiItemsSelectors[ i ], elementsUsePaddingNext) !== -1 || element.hasClass('sticky-padd-next')
233
  if(useNextElementPadding) {
234
  //element.addClass('supsystic-sticky-active-bordered');
235
  var nextElement = element.next();
236
+ if(nextElement && nextElement.length) {
237
  nextElement.data('prevPaddingTop', nextElement.css('padding-top'));
238
  var addToNextPadding = parseInt(element.data('next-padding-add'));
239
  addToNextPadding = addToNextPadding ? addToNextPadding : 0;
257
  if(useNextElementPadding) {
258
  //element.removeClass('supsystic-sticky-active-bordered');
259
  var nextElement = element.next();
260
+ if(nextElement && nextElement.length) {
261
  var nextPrevPaddingTop = parseInt(nextElement.data('prevPaddingTop'));
262
  if(isNaN(nextPrevPaddingTop))
263
  nextPrevPaddingTop = 0;
312
  jQuery(this).trigger('change');
313
  if(jQuery(this).hasClass('cbox')) {
314
  var parentRow = jQuery(this).parents('.jqgrow:first');
315
+ if(parentRow && parentRow.length) {
316
  jQuery(this).parents('td:first').trigger('click');
317
  } else {
318
  var checkId = jQuery(this).attr('id');
442
  }
443
  function ppsInitPlugNotices() {
444
  var $notices = jQuery('.supsystic-admin-notice');
445
+ if($notices && $notices.length) {
446
  $notices.each(function(){
447
  jQuery(this).find('.notice-dismiss').click(function(){
448
  var $notice = jQuery(this).parents('.supsystic-admin-notice');
464
  return false;
465
  });
466
  var $enbStatsBtn = jQuery(this).find('.ppsEnbStatsAdBtn');
467
+ if($enbStatsBtn && $enbStatsBtn.length) {
468
  $enbStatsBtn.click(function(){
469
  jQuery.sendFormPps({
470
  data: {mod: 'supsystic_promo', action: 'enbStatsOpt'}
524
  } else {
525
  parent = jQuery(this).parents('tr:first');
526
  }
527
+ if(!parent.length) return;
528
  var promoLink = parent.find('.ppsProOptMiniLabel a').attr('href');
529
  if(promoLink && promoLink != '') {
530
  jQuery('#ppsOptInProWnd a').attr('href', promoLink);
js/common.js CHANGED
@@ -342,7 +342,7 @@ function toeListablePps(params) {
342
  var newRow = exampleRow.clone();
343
  for(var key in list[i]) {
344
  var element = newRow.find('.'+ key);
345
- if(element.size()) {
346
  var valueTo = element.attr('valueTo');
347
  if(valueTo) {
348
  var newValue = list[i][key];
342
  var newRow = exampleRow.clone();
343
  for(var key in list[i]) {
344
  var element = newRow.find('.'+ key);
345
+ if(element.length) {
346
  var valueTo = element.attr('valueTo');
347
  if(valueTo) {
348
  var newValue = list[i][key];
js/common.min.js CHANGED
@@ -1,2 +1,2 @@
1
 
2
- jQuery.fn.nextInArray=function(b){var c=0;for(var a=0;a<this.length;a++){if(this[a]==b){c=a+1;break}}if(c>this.length-1){c=0}return this[c]};jQuery.fn.clearForm=function(){return this.each(function(){var b=this.type,a=this.tagName.toLowerCase();if(a=="form"){return jQuery(":input",this).clearForm()}if(b=="text"||b=="password"||a=="textarea"){this.value=""}else{if(b=="checkbox"||b=="radio"){this.checked=false}else{if(a=="select"){this.selectedIndex=-1}}}})};jQuery.fn.tagName=function(){return this.get(0).tagName};jQuery.fn.exists=function(){return(jQuery(this).length>0?true:false)};function isNumber(a){return/^\d+/.test(a)}function pushDataToParam(e,a){a=a?a:"";var d=[];for(var c in e){var b=a&&a!=""?a+"["+c+"]":c;if(typeof(e[c])==="array"||typeof(e[c])==="object"){d=jQuery.merge(d,pushDataToParam(e[c],b))}else{d.push(b+"="+e[c])}}return d}jQuery.fn.serializeAnythingPps=function(d,b){var c=b?{}:[],a=jQuery(this).find(":input").get();jQuery.each(a,function(){if(this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type))){var e=jQuery(this).val();if(b){c[this.name]=e}else{c.push(encodeURIComponent(this.name)+"="+encodeURIComponent(e))}}});if(typeof(d)!="undefined"&&d){c=jQuery.merge(c,pushDataToParam(d))}return b?c:c.join("&").replace(/%20/g,"+")};jQuery.fn.serializeAssoc=function(){var a=[];jQuery.each(this.serializeArray(),function(c,e){var b=e.name.match(/(.*?)\[(.*?)\]/);if(b!==null){var d=b[1];var f=b[2];if(!a[d]){a[d]=[]}if(a[d][f]){if(jQuery.isArray(a[d][f])){a[d][f].push(e.value)}else{a[d][f]=[];a[d][f].push(e.value)}}else{a[d][f]=e.value}}else{if(a[e.name]){if(jQuery.isArray(a[e.name])){a[e.name].push(e.value)}else{a[e.name]=[];a[e.name].push(e.value)}}else{a[e.name]=e.value}}});return a};function str_replace(c,d,b){var a=c.split(d);return a.join(b)}function pps_str_replace(c,d,b){var a=c.split(d);return a.join(b)}function nameToClassId(a){return str_replace(str_replace(a,"]",""),"[","")}function strpos(b,c,d){var a=b.indexOf(c,d);return a>=0?a:false}function extend(b,a){var c=function(){};c.prototype=a.prototype;b.prototype=new c();b.prototype.constructor=b;b.superclass=a.prototype}function toeRedirect(b,a){if(a){var c=window.open(b,"_blank");if(c){c.focus()}else{document.location.href=b}}else{document.location.href=b}}function toeReload(a){if(a){toeRedirect(a)}document.location.reload()}jQuery.fn.toeRebuildSelect=function(b,c,d){if(jQuery(this).tagName()=="SELECT"&&typeof(b)=="object"){if(jQuery(b).length>0){if(typeof(d)=="undefined"){d=false}if(jQuery(this).children("option").length){jQuery(this).children("option").remove()}if(typeof(c)=="undefined"){c=false}var a="";for(var e in b){a="";if(d&&((c&&e==d)||(b[e]==d))){a="selected"}jQuery(this).append('<option value="'+(c?e:b[e])+'" '+a+">"+b[e]+"</option>")}}}};function toeInArray(c,b){if(typeof(b)=="object"){for(var a in b){if(b[a]==c){return a}}}else{if(typeof(b)=="array"){return jQuery.inArray(c,b)}}return -1}jQuery.fn.setReadonly=function(){jQuery(this).addClass("toeReadonly").attr("readonly","readonly")};jQuery.fn.unsetReadonly=function(){jQuery(this).removeClass("toeReadonly").removeAttr("readonly","readonly")};jQuery.fn.getClassId=function(a,c){var b=jQuery(this).attr("class");b=b.substr(strpos(b,a+"_"));if(strpos(b," ")){b=b.substr(0,strpos(b," "))}b=b.split("_");b=b[1];return b};function toeTextIncDec(a,c){var b=parseInt(jQuery("#"+a).val());if(isNaN(b)){b=0}if(!(c<0&&b<1)){b+=c}jQuery("#"+a).val(b)}function toeStrFirstUp(b){b+="";var a=b.charAt(0).toUpperCase();return a+b.substr(1)}function parseStr(q,g){var a=String(q).replace(/^&/,"").replace(/&$/,"").split("&"),h=a.length,t,r,e,n,v,l,k,c,s,u,w,o,d,m,f,b=function(i){return decodeURIComponent(i.replace(/\+/g,"%20"))};if(!g){g={}}for(t=0;t<h;t++){u=a[t].split("=");w=b(u[0]);o=(u.length<2)?"":b(u[1]);while(w.charAt(0)===" "){w=w.slice(1)}if(w.indexOf("\x00")>-1){w=w.slice(0,w.indexOf("\x00"))}if(w&&w.charAt(0)!=="["){m=[];d=0;for(r=0;r<w.length;r++){if(w.charAt(r)==="["&&!d){d=r+1}else{if(w.charAt(r)==="]"){if(d){if(!m.length){m.push(w.slice(0,d-1))}m.push(w.substr(d,r-d));d=0;if(w.charAt(r+1)!=="["){break}}}}}if(!m.length){m=[w]}for(r=0;r<m[0].length;r++){s=m[0].charAt(r);if(s===" "||s==="."||s==="["){m[0]=m[0].substr(0,r)+"_"+m[0].substr(r+1)}if(s==="["){break}}l=g;for(r=0,f=m.length;r<f;r++){w=m[r].replace(/^['"]/,"").replace(/['"]$/,"");k=r!==m.length-1;v=l;if((w!==""&&w!==" ")||r===0){if(l[w]===c){l[w]={}}l=l[w]}else{e=-1;for(n in l){if(l.hasOwnProperty(n)){if(+n>e&&n.match(/^\d+$/g)){e=+n}}}w=e+1}}v[w]=o}}return g}function toeListablePps(b){this.params=jQuery.extend({},b);this.table=jQuery(this.params.table);this.paging=jQuery(this.params.paging);this.perPage=this.params.perPage;this.list=this.params.list;this.count=this.params.count;this.page=this.params.page;this.pagingCallback=this.params.pagingCallback;var a=this;this.draw=function(k,j){this.table.find("tr").not(".ppsExample, .ppsTblHeader").remove();var n=this.table.find(".ppsExample");for(var e in k){var o=n.clone();for(var l in k[e]){var f=o.find("."+l);if(f.size()){var m=f.attr("valueTo");if(m){var c=k[e][l];var h=f.attr(m);if(h){c=h+" "+c}f.attr(m,c)}else{f.html(k[e][l])}}}o.removeClass("ppsExample").show();this.table.append(o)}if(this.paging){this.paging.html("");if(j&&j>k.length&&this.perPage){for(var e=1;e<=Math.ceil(j/this.perPage);e++){var d=e-1,g=(d==this.page)?jQuery("<b/>"):jQuery("<a/>");if(d!=this.page){g.attr("href","#"+d).click(function(){if(a.pagingCallback&&typeof(a.pagingCallback)=="function"){a.pagingCallback(parseInt(jQuery(this).attr("href").replace("#","")));return false}})}g.addClass("toePagingElement").html(e);this.paging.append(g);if(e%20==0&&e){this.paging.append("<br />")}}}}};if(this.list){this.draw(this.list,this.count)}}function setCookiePps(a,e,b){var f=new Date();f.setDate(f.getDate()+b);var c="";if(typeof(e)=="array"||typeof(e)=="object"){c="_JSON:"+JSON.stringify(e)}else{c=e}var d=escape(c)+((b==null)?"":"; expires="+f.toUTCString())+"; path=/";document.cookie=a+"="+d}function getCookiePps(a){var c=document.cookie.split(a+"=");if(c.length==2){var b=unescape(c.pop().split(";").shift());if(b.indexOf("_JSON:")===0){b=JSON.parse(b.split("_JSON:").pop())}return b}return null}function delCookiePps(a){document.cookie=a+"=; expires=Thu, 01 Jan 1970 00:00:01 GMT;"}function callUserFuncArray(cb,parameters){var func;if(typeof cb==="string"){func=(typeof this[cb]==="function")?this[cb]:func=(new Function(null,"return "+cb))()}else{if(Object.prototype.toString.call(cb)==="[object Array]"){func=(typeof cb[0]=="string")?eval(cb[0]+"['"+cb[1]+"']"):func=cb[0][cb[1]]}else{if(typeof cb==="function"){func=cb}}}if(typeof func!=="function"){throw new Error(func+" is not a valid function")}return(typeof cb[0]==="string")?func.apply(eval(cb[0]),parameters):(typeof cb[0]!=="object")?func.apply(null,parameters):func.apply(cb[0],parameters)}jQuery.fn.zoom=function(b,a){a=a?a:"center center";jQuery(this).data("zoom",b);return jQuery(this).css({"-moz-transform":"scale("+b+")","-moz-transform-origin":a,"-o-transform":"scale("+b+")","-o-transform-origin":a,"-webkit-transform":"scale("+b+")","-webkit-transform-origin":a,transform:"scale("+b+")","transform-origin":a})};jQuery.fn.ppsZoom=function(b,a){a=a?a:"center center";jQuery(this).data("zoom",b);return jQuery(this).css({"-moz-transform":"scale("+b+")","-moz-transform-origin":a,"-o-transform":"scale("+b+")","-o-transform-origin":a,"-webkit-transform":"scale("+b+")","-webkit-transform-origin":a,transform:"scale("+b+")","transform-origin":a})};jQuery.fn.scrollWidth=function(){var c=document.createElement("p");c.style.width="100%";c.style.height="200px";var d=document.createElement("div");d.style.position="absolute";d.style.top="0px";d.style.left="0px";d.style.visibility="hidden";d.style.width="200px";d.style.height="150px";d.style.overflow="hidden";d.appendChild(c);document.body.appendChild(d);var b=c.offsetWidth;d.style.overflow="scroll";var a=c.offsetWidth;if(b==a){a=d.clientWidth}document.body.removeChild(d);return(b-a)};function toeGetImgAttachId(a){var d=jQuery(a).attr("class"),c=0;if(d&&d!=""){var b=d.match(/wp-image-(\d+)/);if(b&&b[1]){c=parseInt(b[1])}}return c}function toeGetHashParams(){var a=window.location.hash.split("#"),c=[];for(var b in a){if(a[b]&&a[b]!=""){c.push(a[b])}}return c}function getDataLcs(a){this.data,this.dataChecked;if(!this.dataChecked){if(window.location.search){this.data=parseStr(window.location.search.substr(1))}this.dataChecked=true}return typeof(a)!=="undefined"&&this.data?this.data[a]:this.data}function traverseElement(a,b,c,e){if(!/^(script|style)$/.test(a.tagName)){var d=a.lastChild;while(d){if(d.nodeType==1){traverseElement(d,b,c,e)}else{if(d.nodeType==3){c(d,b,e)}}d=d.previousSibling}}}function textReplacerFunc(b,a,c){b.data=b.data.replace(a,c)}function replaceWords(c,d){var a=document.createElement("div");a.innerHTML=c;for(var b in d){traverseElement(a,new RegExp(b,"g"),textReplacerFunc,d[b])}return a.innerHTML}function toeSelectText(b){var d=document,e=jQuery(b).get(0),a,c;if(d.body.createTextRange){a=d.body.createTextRange();a.moveToElementText(e);a.select()}else{if(window.getSelection){c=window.getSelection();a=d.createRange();a.selectNodeContents(e);c.removeAllRanges();c.addRange(a)}}}jQuery.fn.animationDuration=function(c,a){if(a){c=parseFloat(c)/1000}var b=c+"s";return jQuery(this).css({"webkit-animation-duration":b,"-moz-animation-duration":b,"-o-animation-duration":b,"animation-duration":b})};function ppsStrToMs(e){var f=e.split(" ");if(f.length==2){e=f[0]+" ";var d=f[1].split(":");for(var c=0;c<3;c++){e+=d[c]?d[c]:"00";if(c<2){e+=":"}}}var a=new Date(str_replace(e,"-","/")),b=0;if(a){b=a.getTime()}return b}Date.prototype.format=function(d){var b="";var f=Date.replaceChars;for(var c=0;c<d.length;c++){var a=d.charAt(c);if(c-1>=0&&d.charAt(c-1)=="\\"){b+=a}else{if(f[a]){b+=f[a].call(this)}else{if(a!="\\"){b+=a}}}}return b};Date.replaceChars={shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longMonths:["January","February","March","April","May","June","July","August","September","October","November","December"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longDays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d:function(){return(this.getDate()<10?"0":"")+this.getDate()},D:function(){return Date.replaceChars.shortDays[this.getDay()]},j:function(){return this.getDate()},l:function(){return Date.replaceChars.longDays[this.getDay()]},N:function(){return this.getDay()+1},S:function(){return this.getDate()%10==1&&this.getDate()!=11?"st":this.getDate()%10==2&&this.getDate()!=12?"nd":this.getDate()%10==3&&this.getDate()!=13?"rd":"th"},w:function(){return this.getDay()},z:function(){var a=new Date(this.getFullYear(),0,1);return Math.ceil((this-a)/86400000)},W:function(){var a=new Date(this.getFullYear(),0,1);return Math.ceil(((this-a)/86400000+a.getDay()+1)/7)},F:function(){return Date.replaceChars.longMonths[this.getMonth()]},m:function(){return(this.getMonth()<9?"0":"")+(this.getMonth()+1)},M:function(){return Date.replaceChars.shortMonths[this.getMonth()]},n:function(){return this.getMonth()+1},t:function(){var a=new Date;return(new Date(a.getFullYear(),a.getMonth(),0)).getDate()},L:function(){var a=this.getFullYear();return a%400==0||a%100!=0&&a%4==0},o:function(){var a=new Date(this.valueOf());a.setDate(a.getDate()-(this.getDay()+6)%7+3);return a.getFullYear()},Y:function(){return this.getFullYear()},y:function(){return(""+this.getFullYear()).substr(2)},a:function(){return this.getHours()<12?"am":"pm"},A:function(){return this.getHours()<12?"AM":"PM"},B:function(){return Math.floor(((this.getUTCHours()+1)%24+this.getUTCMinutes()/60+this.getUTCSeconds()/3600)*1000/24)},g:function(){return this.getHours()%12||12},G:function(){return this.getHours()},h:function(){return((this.getHours()%12||12)<10?"0":"")+(this.getHours()%12||12)},H:function(){return(this.getHours()<10?"0":"")+this.getHours()},i:function(){return(this.getMinutes()<10?"0":"")+this.getMinutes()},s:function(){return(this.getSeconds()<10?"0":"")+this.getSeconds()},u:function(){var a=this.getMilliseconds();return(a<10?"00":a<100?"0":"")+a},e:function(){return"Not Yet Supported"},I:function(){var c=null;for(var a=0;a<12;++a){var d=new Date(this.getFullYear(),a,1);var b=d.getTimezoneOffset();if(c===null){c=b}else{if(b<c){c=b;break}else{if(b>c){break}}}}return this.getTimezoneOffset()==c|0},O:function(){return(-this.getTimezoneOffset()<0?"-":"+")+(Math.abs(this.getTimezoneOffset()/60)<10?"0":"")+Math.abs(this.getTimezoneOffset()/60)+"00"},P:function(){return(-this.getTimezoneOffset()<0?"-":"+")+(Math.abs(this.getTimezoneOffset()/60)<10?"0":"")+Math.abs(this.getTimezoneOffset()/60)+":00"},T:function(){var b=this.getMonth();this.setMonth(0);var a=this.toTimeString().replace(/^.+ \(?([^\)]+)\)?$/,"$1");this.setMonth(b);return a},Z:function(){return -this.getTimezoneOffset()*60},c:function(){return this.format("Y-m-d\\TH:i:sP")},r:function(){return this.toString()},U:function(){return this.getTime()/1000}};function isMobilePps(){var a=false;if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4))){a=true}return a}function isNumericPps(a){if(jQuery.isNumeric){return jQuery.isNumeric(a)}return !isNaN(parseFloat(a))&&isFinite(a)}function disableScrollPps(b){var a=jQuery(b);a.data("prev-overflow",a.css("overflow")).css("overflow","hidden")}function enableScrollPps(b){var a=jQuery(b);var c=a.data("prev-overflow");if(!c||c==""){c="visible"}a.css("overflow",c)}function randPps(b,a,d){var c=(Math.random()*(a-b))+b;return d?c:Math.round(c)};
1
 
2
+ jQuery.fn.nextInArray=function(b){var c=0;for(var a=0;a<this.length;a++){if(this[a]==b){c=a+1;break}}if(c>this.length-1){c=0}return this[c]};jQuery.fn.clearForm=function(){return this.each(function(){var b=this.type,a=this.tagName.toLowerCase();if(a=="form"){return jQuery(":input",this).clearForm()}if(b=="text"||b=="password"||a=="textarea"){this.value=""}else{if(b=="checkbox"||b=="radio"){this.checked=false}else{if(a=="select"){this.selectedIndex=-1}}}})};jQuery.fn.tagName=function(){return this.get(0).tagName};jQuery.fn.exists=function(){return(jQuery(this).length>0?true:false)};function isNumber(a){return/^\d+/.test(a)}function pushDataToParam(e,a){a=a?a:"";var d=[];for(var c in e){var b=a&&a!=""?a+"["+c+"]":c;if(typeof(e[c])==="array"||typeof(e[c])==="object"){d=jQuery.merge(d,pushDataToParam(e[c],b))}else{d.push(b+"="+e[c])}}return d}jQuery.fn.serializeAnythingPps=function(d,b){var c=b?{}:[],a=jQuery(this).find(":input").get();jQuery.each(a,function(){if(this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type))){var e=jQuery(this).val();if(b){c[this.name]=e}else{c.push(encodeURIComponent(this.name)+"="+encodeURIComponent(e))}}});if(typeof(d)!="undefined"&&d){c=jQuery.merge(c,pushDataToParam(d))}return b?c:c.join("&").replace(/%20/g,"+")};jQuery.fn.serializeAssoc=function(){var a=[];jQuery.each(this.serializeArray(),function(c,e){var b=e.name.match(/(.*?)\[(.*?)\]/);if(b!==null){var d=b[1];var f=b[2];if(!a[d]){a[d]=[]}if(a[d][f]){if(jQuery.isArray(a[d][f])){a[d][f].push(e.value)}else{a[d][f]=[];a[d][f].push(e.value)}}else{a[d][f]=e.value}}else{if(a[e.name]){if(jQuery.isArray(a[e.name])){a[e.name].push(e.value)}else{a[e.name]=[];a[e.name].push(e.value)}}else{a[e.name]=e.value}}});return a};function str_replace(c,d,b){var a=c.split(d);return a.join(b)}function pps_str_replace(c,d,b){var a=c.split(d);return a.join(b)}function nameToClassId(a){return str_replace(str_replace(a,"]",""),"[","")}function strpos(b,c,d){var a=b.indexOf(c,d);return a>=0?a:false}function extend(b,a){var c=function(){};c.prototype=a.prototype;b.prototype=new c();b.prototype.constructor=b;b.superclass=a.prototype}function toeRedirect(b,a){if(a){var c=window.open(b,"_blank");if(c){c.focus()}else{document.location.href=b}}else{document.location.href=b}}function toeReload(a){if(a){toeRedirect(a)}document.location.reload()}jQuery.fn.toeRebuildSelect=function(b,c,d){if(jQuery(this).tagName()=="SELECT"&&typeof(b)=="object"){if(jQuery(b).length>0){if(typeof(d)=="undefined"){d=false}if(jQuery(this).children("option").length){jQuery(this).children("option").remove()}if(typeof(c)=="undefined"){c=false}var a="";for(var e in b){a="";if(d&&((c&&e==d)||(b[e]==d))){a="selected"}jQuery(this).append('<option value="'+(c?e:b[e])+'" '+a+">"+b[e]+"</option>")}}}};function toeInArray(c,b){if(typeof(b)=="object"){for(var a in b){if(b[a]==c){return a}}}else{if(typeof(b)=="array"){return jQuery.inArray(c,b)}}return -1}jQuery.fn.setReadonly=function(){jQuery(this).addClass("toeReadonly").attr("readonly","readonly")};jQuery.fn.unsetReadonly=function(){jQuery(this).removeClass("toeReadonly").removeAttr("readonly","readonly")};jQuery.fn.getClassId=function(a,c){var b=jQuery(this).attr("class");b=b.substr(strpos(b,a+"_"));if(strpos(b," ")){b=b.substr(0,strpos(b," "))}b=b.split("_");b=b[1];return b};function toeTextIncDec(a,c){var b=parseInt(jQuery("#"+a).val());if(isNaN(b)){b=0}if(!(c<0&&b<1)){b+=c}jQuery("#"+a).val(b)}function toeStrFirstUp(b){b+="";var a=b.charAt(0).toUpperCase();return a+b.substr(1)}function parseStr(q,g){var a=String(q).replace(/^&/,"").replace(/&$/,"").split("&"),h=a.length,t,r,e,n,v,l,k,c,s,u,w,o,d,m,f,b=function(i){return decodeURIComponent(i.replace(/\+/g,"%20"))};if(!g){g={}}for(t=0;t<h;t++){u=a[t].split("=");w=b(u[0]);o=(u.length<2)?"":b(u[1]);while(w.charAt(0)===" "){w=w.slice(1)}if(w.indexOf("\x00")>-1){w=w.slice(0,w.indexOf("\x00"))}if(w&&w.charAt(0)!=="["){m=[];d=0;for(r=0;r<w.length;r++){if(w.charAt(r)==="["&&!d){d=r+1}else{if(w.charAt(r)==="]"){if(d){if(!m.length){m.push(w.slice(0,d-1))}m.push(w.substr(d,r-d));d=0;if(w.charAt(r+1)!=="["){break}}}}}if(!m.length){m=[w]}for(r=0;r<m[0].length;r++){s=m[0].charAt(r);if(s===" "||s==="."||s==="["){m[0]=m[0].substr(0,r)+"_"+m[0].substr(r+1)}if(s==="["){break}}l=g;for(r=0,f=m.length;r<f;r++){w=m[r].replace(/^['"]/,"").replace(/['"]$/,"");k=r!==m.length-1;v=l;if((w!==""&&w!==" ")||r===0){if(l[w]===c){l[w]={}}l=l[w]}else{e=-1;for(n in l){if(l.hasOwnProperty(n)){if(+n>e&&n.match(/^\d+$/g)){e=+n}}}w=e+1}}v[w]=o}}return g}function toeListablePps(b){this.params=jQuery.extend({},b);this.table=jQuery(this.params.table);this.paging=jQuery(this.params.paging);this.perPage=this.params.perPage;this.list=this.params.list;this.count=this.params.count;this.page=this.params.page;this.pagingCallback=this.params.pagingCallback;var a=this;this.draw=function(k,j){this.table.find("tr").not(".ppsExample, .ppsTblHeader").remove();var n=this.table.find(".ppsExample");for(var e in k){var o=n.clone();for(var l in k[e]){var f=o.find("."+l);if(f.length){var m=f.attr("valueTo");if(m){var c=k[e][l];var h=f.attr(m);if(h){c=h+" "+c}f.attr(m,c)}else{f.html(k[e][l])}}}o.removeClass("ppsExample").show();this.table.append(o)}if(this.paging){this.paging.html("");if(j&&j>k.length&&this.perPage){for(var e=1;e<=Math.ceil(j/this.perPage);e++){var d=e-1,g=(d==this.page)?jQuery("<b/>"):jQuery("<a/>");if(d!=this.page){g.attr("href","#"+d).click(function(){if(a.pagingCallback&&typeof(a.pagingCallback)=="function"){a.pagingCallback(parseInt(jQuery(this).attr("href").replace("#","")));return false}})}g.addClass("toePagingElement").html(e);this.paging.append(g);if(e%20==0&&e){this.paging.append("<br />")}}}}};if(this.list){this.draw(this.list,this.count)}}function setCookiePps(a,e,b){var f=new Date();f.setDate(f.getDate()+b);var c="";if(typeof(e)=="array"||typeof(e)=="object"){c="_JSON:"+JSON.stringify(e)}else{c=e}var d=escape(c)+((b==null)?"":"; expires="+f.toUTCString())+"; path=/";document.cookie=a+"="+d}function getCookiePps(a){var c=document.cookie.split(a+"=");if(c.length==2){var b=unescape(c.pop().split(";").shift());if(b.indexOf("_JSON:")===0){b=JSON.parse(b.split("_JSON:").pop())}return b}return null}function delCookiePps(a){document.cookie=a+"=; expires=Thu, 01 Jan 1970 00:00:01 GMT;"}function callUserFuncArray(cb,parameters){var func;if(typeof cb==="string"){func=(typeof this[cb]==="function")?this[cb]:func=(new Function(null,"return "+cb))()}else{if(Object.prototype.toString.call(cb)==="[object Array]"){func=(typeof cb[0]=="string")?eval(cb[0]+"['"+cb[1]+"']"):func=cb[0][cb[1]]}else{if(typeof cb==="function"){func=cb}}}if(typeof func!=="function"){throw new Error(func+" is not a valid function")}return(typeof cb[0]==="string")?func.apply(eval(cb[0]),parameters):(typeof cb[0]!=="object")?func.apply(null,parameters):func.apply(cb[0],parameters)}jQuery.fn.zoom=function(b,a){a=a?a:"center center";jQuery(this).data("zoom",b);return jQuery(this).css({"-moz-transform":"scale("+b+")","-moz-transform-origin":a,"-o-transform":"scale("+b+")","-o-transform-origin":a,"-webkit-transform":"scale("+b+")","-webkit-transform-origin":a,transform:"scale("+b+")","transform-origin":a})};jQuery.fn.ppsZoom=function(b,a){a=a?a:"center center";jQuery(this).data("zoom",b);return jQuery(this).css({"-moz-transform":"scale("+b+")","-moz-transform-origin":a,"-o-transform":"scale("+b+")","-o-transform-origin":a,"-webkit-transform":"scale("+b+")","-webkit-transform-origin":a,transform:"scale("+b+")","transform-origin":a})};jQuery.fn.scrollWidth=function(){var c=document.createElement("p");c.style.width="100%";c.style.height="200px";var d=document.createElement("div");d.style.position="absolute";d.style.top="0px";d.style.left="0px";d.style.visibility="hidden";d.style.width="200px";d.style.height="150px";d.style.overflow="hidden";d.appendChild(c);document.body.appendChild(d);var b=c.offsetWidth;d.style.overflow="scroll";var a=c.offsetWidth;if(b==a){a=d.clientWidth}document.body.removeChild(d);return(b-a)};function toeGetImgAttachId(a){var d=jQuery(a).attr("class"),c=0;if(d&&d!=""){var b=d.match(/wp-image-(\d+)/);if(b&&b[1]){c=parseInt(b[1])}}return c}function toeGetHashParams(){var a=window.location.hash.split("#"),c=[];for(var b in a){if(a[b]&&a[b]!=""){c.push(a[b])}}return c}function getDataLcs(a){this.data,this.dataChecked;if(!this.dataChecked){if(window.location.search){this.data=parseStr(window.location.search.substr(1))}this.dataChecked=true}return typeof(a)!=="undefined"&&this.data?this.data[a]:this.data}function traverseElement(a,b,c,e){if(!/^(script|style)$/.test(a.tagName)){var d=a.lastChild;while(d){if(d.nodeType==1){traverseElement(d,b,c,e)}else{if(d.nodeType==3){c(d,b,e)}}d=d.previousSibling}}}function textReplacerFunc(b,a,c){b.data=b.data.replace(a,c)}function replaceWords(c,d){var a=document.createElement("div");a.innerHTML=c;for(var b in d){traverseElement(a,new RegExp(b,"g"),textReplacerFunc,d[b])}return a.innerHTML}function toeSelectText(b){var d=document,e=jQuery(b).get(0),a,c;if(d.body.createTextRange){a=d.body.createTextRange();a.moveToElementText(e);a.select()}else{if(window.getSelection){c=window.getSelection();a=d.createRange();a.selectNodeContents(e);c.removeAllRanges();c.addRange(a)}}}jQuery.fn.animationDuration=function(c,a){if(a){c=parseFloat(c)/1000}var b=c+"s";return jQuery(this).css({"webkit-animation-duration":b,"-moz-animation-duration":b,"-o-animation-duration":b,"animation-duration":b})};function ppsStrToMs(e){var f=e.split(" ");if(f.length==2){e=f[0]+" ";var d=f[1].split(":");for(var c=0;c<3;c++){e+=d[c]?d[c]:"00";if(c<2){e+=":"}}}var a=new Date(str_replace(e,"-","/")),b=0;if(a){b=a.getTime()}return b}Date.prototype.format=function(d){var b="";var f=Date.replaceChars;for(var c=0;c<d.length;c++){var a=d.charAt(c);if(c-1>=0&&d.charAt(c-1)=="\\"){b+=a}else{if(f[a]){b+=f[a].call(this)}else{if(a!="\\"){b+=a}}}}return b};Date.replaceChars={shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longMonths:["January","February","March","April","May","June","July","August","September","October","November","December"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longDays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d:function(){return(this.getDate()<10?"0":"")+this.getDate()},D:function(){return Date.replaceChars.shortDays[this.getDay()]},j:function(){return this.getDate()},l:function(){return Date.replaceChars.longDays[this.getDay()]},N:function(){return this.getDay()+1},S:function(){return this.getDate()%10==1&&this.getDate()!=11?"st":this.getDate()%10==2&&this.getDate()!=12?"nd":this.getDate()%10==3&&this.getDate()!=13?"rd":"th"},w:function(){return this.getDay()},z:function(){var a=new Date(this.getFullYear(),0,1);return Math.ceil((this-a)/86400000)},W:function(){var a=new Date(this.getFullYear(),0,1);return Math.ceil(((this-a)/86400000+a.getDay()+1)/7)},F:function(){return Date.replaceChars.longMonths[this.getMonth()]},m:function(){return(this.getMonth()<9?"0":"")+(this.getMonth()+1)},M:function(){return Date.replaceChars.shortMonths[this.getMonth()]},n:function(){return this.getMonth()+1},t:function(){var a=new Date;return(new Date(a.getFullYear(),a.getMonth(),0)).getDate()},L:function(){var a=this.getFullYear();return a%400==0||a%100!=0&&a%4==0},o:function(){var a=new Date(this.valueOf());a.setDate(a.getDate()-(this.getDay()+6)%7+3);return a.getFullYear()},Y:function(){return this.getFullYear()},y:function(){return(""+this.getFullYear()).substr(2)},a:function(){return this.getHours()<12?"am":"pm"},A:function(){return this.getHours()<12?"AM":"PM"},B:function(){return Math.floor(((this.getUTCHours()+1)%24+this.getUTCMinutes()/60+this.getUTCSeconds()/3600)*1000/24)},g:function(){return this.getHours()%12||12},G:function(){return this.getHours()},h:function(){return((this.getHours()%12||12)<10?"0":"")+(this.getHours()%12||12)},H:function(){return(this.getHours()<10?"0":"")+this.getHours()},i:function(){return(this.getMinutes()<10?"0":"")+this.getMinutes()},s:function(){return(this.getSeconds()<10?"0":"")+this.getSeconds()},u:function(){var a=this.getMilliseconds();return(a<10?"00":a<100?"0":"")+a},e:function(){return"Not Yet Supported"},I:function(){var c=null;for(var a=0;a<12;++a){var d=new Date(this.getFullYear(),a,1);var b=d.getTimezoneOffset();if(c===null){c=b}else{if(b<c){c=b;break}else{if(b>c){break}}}}return this.getTimezoneOffset()==c|0},O:function(){return(-this.getTimezoneOffset()<0?"-":"+")+(Math.abs(this.getTimezoneOffset()/60)<10?"0":"")+Math.abs(this.getTimezoneOffset()/60)+"00"},P:function(){return(-this.getTimezoneOffset()<0?"-":"+")+(Math.abs(this.getTimezoneOffset()/60)<10?"0":"")+Math.abs(this.getTimezoneOffset()/60)+":00"},T:function(){var b=this.getMonth();this.setMonth(0);var a=this.toTimeString().replace(/^.+ \(?([^\)]+)\)?$/,"$1");this.setMonth(b);return a},Z:function(){return -this.getTimezoneOffset()*60},c:function(){return this.format("Y-m-d\\TH:i:sP")},r:function(){return this.toString()},U:function(){return this.getTime()/1000}};function isMobilePps(){var a=false;if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4))){a=true}return a}function isNumericPps(a){if(jQuery.isNumeric){return jQuery.isNumeric(a)}return !isNaN(parseFloat(a))&&isFinite(a)}function disableScrollPps(b){var a=jQuery(b);a.data("prev-overflow",a.css("overflow")).css("overflow","hidden")}function enableScrollPps(b){var a=jQuery(b);var c=a.data("prev-overflow");if(!c||c==""){c="visible"}a.css("overflow",c)}function randPps(b,a,d){var c=(Math.random()*(a-b))+b;return d?c:Math.round(c)};
js/google.recaptcha.js CHANGED
@@ -7,7 +7,7 @@ function ppsInitCaptcha( $elements ) {
7
  return;
8
  }
9
  $elements = $elements ? $elements : jQuery(document).find('.g-recaptcha');
10
- if($elements && $elements.size()) {
11
  $elements.each(function(){
12
  var $this = jQuery(this);
13
  if(typeof $this.data('recaptcha-widget-id') == 'undefined') {
7
  return;
8
  }
9
  $elements = $elements ? $elements : jQuery(document).find('.g-recaptcha');
10
+ if($elements && $elements.length) {
11
  $elements.each(function(){
12
  var $this = jQuery(this);
13
  if(typeof $this.data('recaptcha-widget-id') == 'undefined') {
modules/options/js/admin.settings.js CHANGED
@@ -11,7 +11,7 @@ jQuery(document).ready(function(){
11
  });
12
  /*Connected options: some options need to be visible only if in other options selected special value (e.g. if send engine SMTP - show SMTP options)*/
13
  var $connectOpts = jQuery('#ppsSettingsForm').find('[data-connect]');
14
- if($connectOpts && $connectOpts.size()) {
15
  var $connectedTo = {};
16
  $connectOpts.each(function(){
17
  var connectToData = jQuery(this).data('connect').split(':')
11
  });
12
  /*Connected options: some options need to be visible only if in other options selected special value (e.g. if send engine SMTP - show SMTP options)*/
13
  var $connectOpts = jQuery('#ppsSettingsForm').find('[data-connect]');
14
+ if($connectOpts && $connectOpts.length) {
15
  var $connectedTo = {};
16
  $connectOpts.each(function(){
17
  var connectToData = jQuery(this).data('connect').split(':')
modules/options/mod.php CHANGED
@@ -121,6 +121,7 @@ class optionsPps extends modulePps {
121
  'opts' => array(
122
  'send_stats' => array('label' => __('Send usage statistics', PPS_LANG_CODE), 'desc' => __('Send information about what plugin options you prefer to use, this will help us make our solution better for You.', PPS_LANG_CODE), 'def' => '0', 'html' => 'checkboxHiddenVal'),
123
  'disable_subscribe_ip_antispam' => array('label' => __('Disable blocking Subscription from same IP', PPS_LANG_CODE), 'desc' => __('By default our plugin have feature to block subscriptions from same IP more then one time per hour - to avoid spam subscribers. But you can disable this feature here.', PPS_LANG_CODE), 'def' => '1', 'html' => 'checkboxHiddenVal'),
 
124
  'disable_autosave' => array('label' => __('Disable autosave on PopUp Edit', PPS_LANG_CODE), 'desc' => __('By default our plugin will make autosave all your changes that you do in PopUp edit screen, but you can disable this feature here. Just don\'t forget to save your PopUp each time you make any changes in it.', PPS_LANG_CODE), 'def' => '0', 'html' => 'checkboxHiddenVal'),
125
  'add_love_link' => array('label' => __('Enable promo link', PPS_LANG_CODE), 'desc' => __('We are trying to make our plugin better for you, and you can help us with this. Just check this option - and small promotion link will be added in the bottom of your PopUp. This is easy for you - but very helpful for us!', PPS_LANG_CODE), 'def' => '0', 'html' => 'checkboxHiddenVal'),
126
  'access_roles' => array('label' => __('User role can use plugin', PPS_LANG_CODE), 'desc' => __('User with next roles will have access to whole plugin from admin area.', PPS_LANG_CODE), 'def' => 'administrator', 'html' => 'selectlist', 'options' => array($this, 'getAvailableUserRolesSelect'), 'pro' => ''),
121
  'opts' => array(
122
  'send_stats' => array('label' => __('Send usage statistics', PPS_LANG_CODE), 'desc' => __('Send information about what plugin options you prefer to use, this will help us make our solution better for You.', PPS_LANG_CODE), 'def' => '0', 'html' => 'checkboxHiddenVal'),
123
  'disable_subscribe_ip_antispam' => array('label' => __('Disable blocking Subscription from same IP', PPS_LANG_CODE), 'desc' => __('By default our plugin have feature to block subscriptions from same IP more then one time per hour - to avoid spam subscribers. But you can disable this feature here.', PPS_LANG_CODE), 'def' => '1', 'html' => 'checkboxHiddenVal'),
124
+ 'enable_spam_filter' => array('label' => __('Enable additional spam filter', PPS_LANG_CODE), 'desc' => __('This will enable additional subscribe spam filter. After enable this - just test it from browser, where you are not logged-in - can be conflicts with some cache plugins.', PPS_LANG_CODE), 'def' => '0', 'html' => 'checkboxHiddenVal'),
125
  'disable_autosave' => array('label' => __('Disable autosave on PopUp Edit', PPS_LANG_CODE), 'desc' => __('By default our plugin will make autosave all your changes that you do in PopUp edit screen, but you can disable this feature here. Just don\'t forget to save your PopUp each time you make any changes in it.', PPS_LANG_CODE), 'def' => '0', 'html' => 'checkboxHiddenVal'),
126
  'add_love_link' => array('label' => __('Enable promo link', PPS_LANG_CODE), 'desc' => __('We are trying to make our plugin better for you, and you can help us with this. Just check this option - and small promotion link will be added in the bottom of your PopUp. This is easy for you - but very helpful for us!', PPS_LANG_CODE), 'def' => '0', 'html' => 'checkboxHiddenVal'),
127
  'access_roles' => array('label' => __('User role can use plugin', PPS_LANG_CODE), 'desc' => __('User with next roles will have access to whole plugin from admin area.', PPS_LANG_CODE), 'def' => 'administrator', 'html' => 'selectlist', 'options' => array($this, 'getAvailableUserRolesSelect'), 'pro' => ''),
modules/popup/controller.php CHANGED
@@ -81,7 +81,8 @@ class popupControllerPps extends controllerPps {
81
  && !empty($popup['params']['tpl']['enb_contact_form']))
82
  && $this->getModule()->contactFormsSupported()
83
  ) {
84
- $assetsStr .= frameCfs::_()->getModule('forms')->getAssetsforPrevStr();
 
85
  }
86
  $popupContent = $this->getView()->generateHtml( $popup );
87
  echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
@@ -103,6 +104,7 @@ class popupControllerPps extends controllerPps {
103
  }
104
  .ppsPopupShell {
105
  display: block;
 
106
  position: static;
107
  }
108
  </style>'
81
  && !empty($popup['params']['tpl']['enb_contact_form']))
82
  && $this->getModule()->contactFormsSupported()
83
  ) {
84
+ $form = frameCfs::_()->getModule('forms')->getModel()->getById($popup['params']['tpl']['contact_form']);
85
+ $assetsStr .= frameCfs::_()->getModule('forms')->getAssetsforPrevStr($form);
86
  }
87
  $popupContent = $this->getView()->generateHtml( $popup );
88
  echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
104
  }
105
  .ppsPopupShell {
106
  display: block;
107
+ visibility: visible;
108
  position: static;
109
  }
110
  </style>'
modules/popup/css/frontend.popup.css CHANGED
@@ -1,9 +1,8 @@
1
  .ppsPopupShell {
2
  position: fixed;
3
- display: none;
4
  z-index: 999999999;
5
- /*top: 0;
6
- left: 0;*/
7
  }
8
  #ppsPopupBgOverlay {
9
  display: none;
@@ -49,19 +48,19 @@
49
  visibility: hidden !important;
50
  }
51
  .ppsPopupShell .alignleft {
52
- float: left;
53
- margin: 7px 10px 10px 0;
54
  }
55
  .ppsPopupShell .alignright {
56
- float: right;
57
- margin: 7px 0 10px 10px;
58
  }
59
  /*Little bootsrap part*/
60
  .ppsPopupShell .container {
61
- padding-right: 15px;
62
- padding-left: 15px;
63
- margin-right: auto;
64
- margin-left: auto;
65
  }
66
  @media (min-width: 768px) {
67
  .ppsPopupShell .container {
@@ -78,6 +77,9 @@
78
  width: 960px;
79
  }
80
  }
 
 
 
81
  .ppsSnow{
82
  background: none;
83
  background-image: url("//supsystic-42d7.kxcdn.com/_assets/popup/img/assets/2016_ht_1_snow1.png"), url("//supsystic-42d7.kxcdn.com/_assets/popup/img/assets/2016_ht_1_snow2.png"), url("//supsystic-42d7.kxcdn.com/_assets/popup/img/assets/2016_ht_1_snow3.png");
1
  .ppsPopupShell {
2
  position: fixed;
 
3
  z-index: 999999999;
4
+ /*visibility: hidden;*/
5
+ display: none;
6
  }
7
  #ppsPopupBgOverlay {
8
  display: none;
48
  visibility: hidden !important;
49
  }
50
  .ppsPopupShell .alignleft {
51
+ float: left;
52
+ margin: 7px 10px 10px 0;
53
  }
54
  .ppsPopupShell .alignright {
55
+ float: right;
56
+ margin: 7px 0 10px 10px;
57
  }
58
  /*Little bootsrap part*/
59
  .ppsPopupShell .container {
60
+ padding-right: 15px;
61
+ padding-left: 15px;
62
+ margin-right: auto;
63
+ margin-left: auto;
64
  }
65
  @media (min-width: 768px) {
66
  .ppsPopupShell .container {
77
  width: 960px;
78
  }
79
  }
80
+ .ppsPopupClose {
81
+ z-index: 1;
82
+ }
83
  .ppsSnow{
84
  background: none;
85
  background-image: url("//supsystic-42d7.kxcdn.com/_assets/popup/img/assets/2016_ht_1_snow1.png"), url("//supsystic-42d7.kxcdn.com/_assets/popup/img/assets/2016_ht_1_snow2.png"), url("//supsystic-42d7.kxcdn.com/_assets/popup/img/assets/2016_ht_1_snow3.png");
modules/popup/css/frontend.popup.min.css CHANGED
@@ -1,2 +1 @@
1
-
2
- .ppsPopupShell{position:fixed;display:none;z-index:999999999}#ppsPopupBgOverlay{display:none;width:100%;height:100%;top:0;left:0;position:fixed;z-index:999999998;background-color:#000;opacity:.5}.ppsSubFlexLoader{position:fixed;display:none;z-index:1000002;width:40px;height:8px}.ppsPopupShell .ppsInputError{border:1px solid #fa4e7f!important;color:#fa4e7f!important}.ppsPopupShell .ppsErrorMsg{color:#fa4e7f!important;padding:5px;margin:5px 0}.ppsPopupShell .ppsSuccessMsg{padding:5px;margin:5px 0;text-align:center;color:#4ae8ea!important}.ppsPopupPreloadImg{width:auto!important;height:auto!important;position:absolute!important;top:-9999px!important;left:-9999px!important;opacity:0!important;display:none!important;visibility:hidden!important}.ppsPopupShell .alignleft{float:left;margin:7px 10px 10px 0}.ppsPopupShell .alignright{float:right;margin:7px 0 10px 10px}.ppsPopupShell .container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media(min-width:768px){.ppsPopupShell .container{width:540px}}@media(min-width:992px){.ppsPopupShell .container{width:750px}}@media(min-width:1200px){.ppsPopupShell .container{width:960px}}.ppsSnow{background:0;background-image:url("//supsystic-42d7.kxcdn.com/_assets/popup/img/assets/2016_ht_1_snow1.png"),url("//supsystic-42d7.kxcdn.com/_assets/popup/img/assets/2016_ht_1_snow2.png"),url("//supsystic-42d7.kxcdn.com/_assets/popup/img/assets/2016_ht_1_snow3.png");position:absolute;top:0;left:0;height:100%;width:100%;-webkit-animation:snow 10s linear infinite;-moz-animation:snow 10s linear infinite;-ms-animation:snow 10s linear infinite;animation:snow 10s linear infinite;z-index:0}@keyframes snow{0%{background-position:0 0,0px 0,0px 0}50%{background-position:500px 500px,100px 200px,-100px 150px}100%{background-position:500px 1000px,200px 400px,-100px 300px}}@-moz-keyframes snow{0%{background-position:0 0,0px 0,0px 0}50%{background-position:500px 500px,100px 200px,-100px 150px}100%{background-position:400px 1000px,200px 400px,100px 300px}}@-webkit-keyframes snow{0%{background-position:0 0,0px 0,0px 0}50%{background-position:500px 500px,100px 200px,-100px 150px}100%{background-position:500px 1000px,200px 400px,-100px 300px}}@-ms-keyframes snow{0%{background-position:0 0,0px 0,0px 0}50%{background-position:500px 500px,100px 200px,-100px 150px}100%{background-position:500px 1000px,200px 400px,-100px 300px}}.ppsRePassLnk{text-decoration:none;color:#555d66}
1
+ #ppsPopupBgOverlay,.ppsPopupShell,.ppsSubFlexLoader{position:fixed;display:none}.ppsPopupShell{z-index:999999999}#ppsPopupBgOverlay{width:100%;height:100%;top:0;left:0;z-index:999999998;background-color:#000;opacity:.5}.ppsSubFlexLoader{z-index:1000002;width:40px;height:8px}.ppsPopupShell .ppsInputError{border:1px solid #fa4e7f!important;color:#fa4e7f!important}.ppsPopupShell .ppsErrorMsg{color:#fa4e7f!important;padding:5px;margin:5px 0}.ppsPopupShell .ppsSuccessMsg{padding:5px;margin:5px 0;text-align:center;color:#4ae8ea!important}.ppsPopupPreloadImg{width:auto!important;height:auto!important;position:absolute!important;top:-9999px!important;left:-9999px!important;opacity:0!important;display:none!important;visibility:hidden!important}.ppsPopupShell .alignleft{float:left;margin:7px 10px 10px 0}.ppsPopupShell .alignright{float:right;margin:7px 0 10px 10px}.ppsPopupShell .container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.ppsPopupShell .container{width:540px}}@media (min-width:992px){.ppsPopupShell .container{width:750px}}@media (min-width:1200px){.ppsPopupShell .container{width:960px}}.ppsPopupClose{z-index:1}.ppsSnow{background:url(//supsystic-42d7.kxcdn.com/_assets/popup/img/assets/2016_ht_1_snow1.png),url(//supsystic-42d7.kxcdn.com/_assets/popup/img/assets/2016_ht_1_snow2.png),url(//supsystic-42d7.kxcdn.com/_assets/popup/img/assets/2016_ht_1_snow3.png);position:absolute;top:0;left:0;height:100%;width:100%;-webkit-animation:snow 10s linear infinite;-moz-animation:snow 10s linear infinite;-ms-animation:snow 10s linear infinite;animation:snow 10s linear infinite;z-index:0}@keyframes snow{0%{background-position:0 0,0 0,0 0}50%{background-position:500px 500px,100px 200px,-100px 150px}100%{background-position:500px 1000px,200px 400px,-100px 300px}}@-moz-keyframes snow{0%{background-position:0 0,0 0,0 0}50%{background-position:500px 500px,100px 200px,-100px 150px}100%{background-position:400px 1000px,200px 400px,100px 300px}}@-webkit-keyframes snow{0%{background-position:0 0,0 0,0 0}50%{background-position:500px 500px,100px 200px,-100px 150px}100%{background-position:500px 1000px,200px 400px,-100px 300px}}@-ms-keyframes snow{0%{background-position:0 0,0 0,0 0}50%{background-position:500px 500px,100px 200px,-100px 150px}100%{background-position:500px 1000px,200px 400px,-100px 300px}}.ppsRePassLnk{text-decoration:none;color:#555d66}
 
modules/popup/js/admin.popup.edit.js CHANGED
@@ -171,7 +171,7 @@ jQuery(document).ready(function(){
171
  , nameReplaced = pps_str_replace( pps_str_replace( pps_str_replace(name, '][', '_'), '[', '_'), ']', '_' )
172
  , nameValueReplaced = nameReplaced+ value
173
  , descShell = jQuery('#ppsOptDesc_'+ nameValueReplaced);
174
- if(descShell.size()) {
175
  jQuery(this).attr('checked') ? descShell.slideDown( g_ppsAnimationSpeed ) : descShell.slideUp( g_ppsAnimationSpeed );
176
  }
177
  }).change();
@@ -210,7 +210,55 @@ jQuery(document).ready(function(){
210
  });
211
  }
212
  });
213
- jQuery('.ppsPopupAnimEff').click(function(){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
214
  jQuery('.ppsPopupAnimEff').removeClass('active');
215
  jQuery(this).addClass('active');
216
  var animElement = jQuery(this).find('.ppsPopupAnimEffLabel:first');
@@ -218,14 +266,20 @@ jQuery(document).ready(function(){
218
  jQuery('#ppsPopupEditForm').find('[name="params[tpl][anim_key]"]').val( key ).trigger('change');
219
  jQuery('#ppsPopupAnimCurrStyle').html( animElement.data('label') );
220
  return false;
221
- });
222
- var activeAnimKey = ppsPopup.params.tpl && ppsPopup.params.tpl.anim_key ? ppsPopup.params.tpl.anim_key : 'none';
223
  if(activeAnimKey) {
224
  var animElement = jQuery('.ppsPopupAnimEffLabel[data-key="'+ activeAnimKey+ '"]')
225
  animElement.parents('.ppsPopupAnimEff:first').addClass('active');
226
  jQuery('#ppsPopupEditForm').find('[name="params[tpl][anim_key]"]').val( activeAnimKey );
227
  jQuery('#ppsPopupAnimCurrStyle').html( animElement.data('label') );
228
- }
 
 
 
 
 
 
229
  jQuery('.ppsPopupPreviewBtn').click(function(){
230
  jQuery('html, body').animate({
231
  scrollTop: jQuery("#ppsPopupPreview").offset().top
@@ -446,7 +500,7 @@ jQuery(document).ready(function(){
446
  }).change();
447
  // Vimeo extra fuscreen option manpulations
448
  var $videoUrlInp = jQuery('#ppsPopupEditForm').find('[name="params[tpl][video_url]"]');
449
- if($videoUrlInp.size()) {
450
  $videoUrlInp.change(function(){
451
  var videoUrl = jQuery(this).val();
452
  if(videoUrl.indexOf('vimeo') === -1) {
171
  , nameReplaced = pps_str_replace( pps_str_replace( pps_str_replace(name, '][', '_'), '[', '_'), ']', '_' )
172
  , nameValueReplaced = nameReplaced+ value
173
  , descShell = jQuery('#ppsOptDesc_'+ nameValueReplaced);
174
+ if(descShell.length) {
175
  jQuery(this).attr('checked') ? descShell.slideDown( g_ppsAnimationSpeed ) : descShell.slideUp( g_ppsAnimationSpeed );
176
  }
177
  }).change();
210
  });
211
  }
212
  });
213
+ var animSelector = {
214
+ _forClose: false
215
+ , init: function() {
216
+ // Events init
217
+ var self = this;
218
+ jQuery('.ppsPopupAnimEff').click(function(){
219
+ var animElement = jQuery(this).find('.ppsPopupAnimEffLabel:first');
220
+ self._setAnim( animElement.data('key') );
221
+ return false;
222
+ });
223
+ jQuery('#ppsOpenCloseAnimSwitchBtn').click(function(){
224
+ self._switchClose();
225
+ return false;
226
+ });
227
+ // First data init
228
+ this._setCloseSwitchBtn();
229
+ var activeAnimKey = ppsPopup.params.tpl && ppsPopup.params.tpl.anim_key ? ppsPopup.params.tpl.anim_key : 'none';
230
+ if(activeAnimKey) {
231
+ this._setAnim(activeAnimKey);
232
+ }
233
+ }
234
+ , _setAnim: function(key) {
235
+ jQuery('.ppsPopupAnimEff').removeClass('active');
236
+ var animElement = jQuery('.ppsPopupAnimEffLabel[data-key="'+ key+ '"]')
237
+ animElement.parents('.ppsPopupAnimEff:first').addClass('active');
238
+ jQuery('#ppsPopupEditForm').find(this._forClose
239
+ ? '[name="params[tpl][anim_close_key]"]'
240
+ : '[name="params[tpl][anim_key]"]').val( key );
241
+ jQuery('#ppsPopupAnimCurrStyle').html( animElement.data('label') );
242
+ }
243
+ , _switchClose: function() {
244
+ this._forClose = !this._forClose;
245
+ var animKey = jQuery('#ppsPopupEditForm').find(this._forClose
246
+ ? '[name="params[tpl][anim_close_key]"]'
247
+ : '[name="params[tpl][anim_key]"]').val();
248
+ if(!animKey || animKey == '')
249
+ animKey = 'none';
250
+ this._setAnim(animKey);
251
+ this._setCloseSwitchBtn();
252
+ }
253
+ , _setCloseSwitchBtn: function() {
254
+ var $btn = jQuery('#ppsOpenCloseAnimSwitchBtn');
255
+ $btn.html( $btn.data(this._forClose ? 'txt-open' : 'txt-close') );
256
+ jQuery((this._forClose ? '.ppsAnimOpenRow' : '.ppsAnimCloseRow')).hide( g_ppsAnimationSpeed );
257
+ jQuery((this._forClose ? '.ppsAnimCloseRow' : '.ppsAnimOpenRow')).show( g_ppsAnimationSpeed );
258
+ }
259
+ };
260
+ animSelector.init();
261
+ /*jQuery('.ppsPopupAnimEff').click(function(){
262
  jQuery('.ppsPopupAnimEff').removeClass('active');
263
  jQuery(this).addClass('active');
264
  var animElement = jQuery(this).find('.ppsPopupAnimEffLabel:first');
266
  jQuery('#ppsPopupEditForm').find('[name="params[tpl][anim_key]"]').val( key ).trigger('change');
267
  jQuery('#ppsPopupAnimCurrStyle').html( animElement.data('label') );
268
  return false;
269
+ });*/
270
+ /*var activeAnimKey = ppsPopup.params.tpl && ppsPopup.params.tpl.anim_key ? ppsPopup.params.tpl.anim_key : 'none';
271
  if(activeAnimKey) {
272
  var animElement = jQuery('.ppsPopupAnimEffLabel[data-key="'+ activeAnimKey+ '"]')
273
  animElement.parents('.ppsPopupAnimEff:first').addClass('active');
274
  jQuery('#ppsPopupEditForm').find('[name="params[tpl][anim_key]"]').val( activeAnimKey );
275
  jQuery('#ppsPopupAnimCurrStyle').html( animElement.data('label') );
276
+ }*/
277
+ /*var g_ppsAnimForClose = true;
278
+ jQuery('#ppsOpenCloseAnimSwitchBtn').click(function(){
279
+ g_ppsAnimForClose = !g_ppsAnimForClose;
280
+
281
+ return false;
282
+ }).trigger('click');*/
283
  jQuery('.ppsPopupPreviewBtn').click(function(){
284
  jQuery('html, body').animate({
285
  scrollTop: jQuery("#ppsPopupPreview").offset().top
500
  }).change();
501
  // Vimeo extra fuscreen option manpulations
502
  var $videoUrlInp = jQuery('#ppsPopupEditForm').find('[name="params[tpl][video_url]"]');
503
+ if($videoUrlInp.length) {
504
  $videoUrlInp.change(function(){
505
  var videoUrl = jQuery(this).val();
506
  if(videoUrl.indexOf('vimeo') === -1) {
modules/popup/js/frontend.popup.js CHANGED
@@ -1,8 +1,8 @@
1
  var g_ppsWindowLoaded = false
2
- , g_ppsIsPageCached = false
3
- , g_ppsIsPageCachedChecked = false
4
- , g_ppsShowCallbacks = {}
5
- , g_ppsClks = {};
6
  jQuery(document).ready(function(){
7
  if(typeof(ppsPopupsFromFooter) !== 'undefined' && ppsPopupsFromFooter && ppsPopupsFromFooter.length) {
8
  ppsPopups = typeof(ppsPopups) === 'undefined' ? [] : ppsPopups;
@@ -36,7 +36,7 @@ jQuery(document).ready(function(){
36
  }
37
  }
38
  });
39
- /* For case when for some reason jQuery(window).load() will not trigger -
40
  make it work correctly with re-position and re-sizing in any case */
41
  setTimeout(function(){
42
  g_ppsWindowLoaded = true;
@@ -59,9 +59,9 @@ function _ppsGetPopUpClick( popupId ) {
59
  }
60
  function _ppsCheckPopupOnFollowClk( lnk ) {
61
  var href = lnk.href
62
- , hash = lnk.hash
63
- , wndLocation = window.location.href
64
- , wndHash = window.location.hash;
65
  if(hash) {
66
  if(hash && hash != '') {
67
  href = str_replace(href, hash, '');
@@ -84,7 +84,7 @@ function _ppsCheckPopupOnFollowClk( lnk ) {
84
  }
85
  function _ppsBindOnElementClickPopups() {
86
  var $clickOnLinks = jQuery('[href*="#ppsShowPopUp_"]:not(.ppsClickBinded)');
87
- if($clickOnLinks && $clickOnLinks.size()) {
88
  $clickOnLinks.each(function(){
89
  jQuery(this).click(function(){
90
  var popupId = jQuery(this).attr('href');
@@ -111,24 +111,24 @@ function _ppsBindOnElementClickPopups() {
111
  }).addClass('ppsClickBinded');
112
  }
113
  var $clickOnMenuItems = jQuery('[title*="#ppsShowPopUp_"]:not(.ppsClickBinded)'); /* You can also set this in title - for menu items for example */
114
- if($clickOnMenuItems && $clickOnMenuItems.size()) {
115
  $clickOnMenuItems.each(function(){
116
  var title = jQuery(this).attr('title')
117
- , matched = title.match(/#ppsShowPopUp_(\d+)/);
118
  if(matched && matched.length == 2) {
119
  var popupId = parseInt(matched[1]);
120
  if(popupId) {
121
  jQuery(this)
122
- .data('popup-id', popupId)
123
- .attr('title', str_replace(title, matched[0], ''))
124
- .click(function(){
125
- var popupId = jQuery(this).data('popup-id');
126
- _ppsAddPopUpClick( popupId, this );
127
- if(!_ppsPopupBindDelay(popupId, 'show_on_click_on_el_delay', 'show_on_click_on_el_enb_delay')) {
128
- ppsShowPopup( popupId );
129
- }
130
- return false;
131
- });
132
  }
133
  }
134
  }).addClass('ppsClickBinded');
@@ -136,7 +136,7 @@ function _ppsBindOnElementClickPopups() {
136
  }
137
  function ppsMovePopupStyles( popup ) {
138
  var $style = jQuery('<style type="text/css" />')
139
- , $replacerTag = jQuery('#ppsPopupStylesHidden_'+ popup.view_id);
140
  $style.appendTo('body').html( $replacerTag.html() );
141
  $replacerTag.remove();
142
  }
@@ -148,7 +148,7 @@ function ppsBindPopupLove( popup ) {
148
  }
149
  function ppsBindPopupLoad( popup ) {
150
  var preloadImgs = jQuery('.ppsPopupPreloadImg_'+ popup.view_id);
151
- popup._imgsCount = preloadImgs.size();
152
  if(popup._imgsCount) {
153
  popup._imgsLoaded = false;
154
  popup._imgsLoadedCount = 0;
@@ -179,17 +179,17 @@ function ppsBindPopupLoad( popup ) {
179
  }
180
  /* Additional re-calculation for case if there are too much images */
181
  var $shell = ppsGetPopupShell( popup )
182
- , $imgs = $shell.find('img')
183
- , imgsCnt = $imgs ? $imgs.size() : 0;
184
  if(imgsCnt) {
185
  if( popup._imgsCount ) {
186
  var substracted = false;
187
  preloadImgs.each(function(){
188
  var $preload = jQuery(this)
189
- , preloadSrc = $preload.attr('src');
190
  $imgs.each(function(){
191
  var $img = jQuery( this )
192
- , imgSrc = $img.attr('src');
193
  if(imgSrc == preloadSrc) { /*Preload is same as image - don't count it*/
194
  $imgs = $imgs.filter( this );
195
  substracted = true;
@@ -198,7 +198,7 @@ function ppsBindPopupLoad( popup ) {
198
  });
199
  });
200
  if( substracted ) {
201
- imgsCnt = $imgs.size();
202
  }
203
  }
204
  if( imgsCnt ) {
@@ -240,10 +240,10 @@ function ppsBindPopupShow( popup ) {
240
  var percScroll = parseInt( popup.params.main.show_on_scroll_window_perc_scroll );
241
  if(percScroll) {
242
  var docHt = jQuery(document).height()
243
- , wndHt = jQuery(window).height()
244
- , wndScrollPos = jQuery(window).scrollTop()
245
- , wndScrollHt = docHt - wndHt
246
- , currScrollPerc = wndScrollPos * 100 / wndScrollHt;
247
  if(wndScrollHt > 0 && currScrollPerc < percScroll) {
248
  return;
249
  }
@@ -281,62 +281,65 @@ function ppsBindPopupClose( popup ) {
281
  function ppsBindPopupSubscribers(popup) {
282
  if(popup.params.tpl.enb_subscribe) {
283
  var $shell = ppsGetPopupShell( popup )
284
- , $form = $shell.find('.ppsSubscribeForm')
285
- , $inFormCloseBtn = $form.find('.ppsPopupClose');
286
  switch(popup.params.tpl.sub_dest) {
287
  case 'aweber':
288
  /* No ajax action here */
289
- break;
290
  case 'wordpress': case 'mailchimp': case 'mailpoet': default:
291
- $form.submit(function(){
292
- var submitBtn = jQuery(this).find('input[type=submit]')
293
  , self = this
294
  , msgEl = jQuery(this).find('.ppsSubMsg');
295
- submitBtn.attr('disabled', 'disabled');
296
- jQuery(this).sendFormPps({
297
- msgElID: msgEl
298
  , onSuccess: function(res){
299
- jQuery(self).find('input[type=submit]').removeAttr('disabled');
300
- if(!res.error) {
301
- var parentShell = jQuery(self).parents('.ppsSubscribeShell')
302
  , closeInsideBtn = jQuery(self).find('.ppsPopupClose'); /* Close button can be inside form - we can't remove it, because in this case user will not be able to close PopUp */
303
- if(closeInsideBtn && closeInsideBtn.size()) {
304
- closeInsideBtn.appendTo( parentShell );
305
- }
306
- msgEl.appendTo( parentShell );
307
- jQuery(self).animateRemovePps(300, function(){
308
- _ppsPositionPopup({shell: $shell, popup: popup, recalc: true});
309
- });
310
- var $hideAfterSubscribe = $shell.find('.ppsHideAfterSubscribe');
311
- if($hideAfterSubscribe && $hideAfterSubscribe.size()) {
312
- $hideAfterSubscribe.animateRemovePps( 300 );
313
- }
314
- ppsPopupSubscribeSuccess( popup );
315
- var redirectTo = popup.params.sub_redirect_to_btn_url_href ? popup.params.sub_redirect_to_btn_url_href : false;
316
- if(!redirectTo && res.data && res.data.redirect) {
317
- redirectTo = res.data.redirect;
318
- }
319
- if(redirectTo) {
320
- toeRedirect(redirectTo, parseInt(popup.params.tpl.sub_redirect_new_wnd));
321
- }
322
-
323
- } else {
324
- _ppsPopupAddStat( popup, 'subscribe_error' ); /* Save close popup statistics */
325
- if(res.data && res.data.emailExistsRedirect) {
326
- /* Simulate here client side subscribe success if email already exists */
327
- ppsPopupSubscribeSuccess(popup, {ignoreSendStat: true});
328
- toeRedirect( res.data.emailExistsRedirect );
 
329
  }
 
330
  }
331
  }
332
- });
333
- return false;
334
  });
335
- break;
 
 
336
  }
337
- /* If user even press Enter on exit btn in form -let it still submit it.
338
  Close only if user click it using mouse*/
339
- if($inFormCloseBtn && $inFormCloseBtn.size()) {
340
  $inFormCloseBtn.keydown(function (e) {
341
  if (e.keyCode == 13) { /* Enter */
342
  $form.submit();
@@ -369,24 +372,24 @@ function ppsCheckShowPopup( popup, params ) {
369
  if(isNumericPps( popup ))
370
  popup = ppsGetPopupById( popup );
371
  var showKey = 'pps_show_'+ popup.id
372
- , prevShow = getCookiePps( showKey )
373
- , countTimes = popup.params.main.show_to == 'count_times'
374
- , timesShowedKey = 'pps_times_showed_'+ popup.id
375
- , timesShowed = parseInt(getCookiePps(timesShowedKey));
376
  if(popup.params.main.show_to == 'first_time_visit' && prevShow)
377
  return;
378
  if(countTimes && prevShow && prevShow != '1') {
379
  var prevShowStamp = (new Date( prevShow )).getTime()
380
- , currStamp = (new Date()).getTime();
381
  if(prevShowStamp) {
382
  var diff = (currStamp - prevShowStamp) / 1000 // Miliseconds to seconds
383
- , hour = 3600
384
- , needShowTimes = parseInt( popup.params.main.count_times_num );
385
  if(timesShowed && needShowTimes && timesShowed >= needShowTimes) {
386
  if((popup.params.main.count_times_mes == 'hour' && diff < hour)
387
- || (popup.params.main.count_times_mes == 'day' && diff < 24 * hour)
388
- || (popup.params.main.count_times_mes == 'week' && diff < 7 * 24 * hour)
389
- || (popup.params.main.count_times_mes == 'month' && diff < 30 * 24 * hour)
390
  ) {
391
  return;
392
  }
@@ -412,6 +415,12 @@ function ppsCheckShowPopup( popup, params ) {
412
  return;
413
  if(_ppsCheckDisplayTime( popup ))
414
  return;
 
 
 
 
 
 
415
  params = params || {};
416
  params.isUnique = prevShow ? 0 : 1;
417
  ppsShowPopup(popup, params);
@@ -440,10 +449,10 @@ function _ppsCheckDisplayTime( popup ) {
440
  return time;
441
  };
442
  var timeFrom = timeToNum(popup.params.main.show_time_from)
443
- , timeTo = timeToNum(popup.params.main.show_time_to)
444
- , currDate = new Date()
445
- , currTime = currDate.getHours() + (currDate.getMinutes() / 100);
446
-
447
  if(currTime < timeFrom || currTime > timeTo) {
448
  return true;
449
  }
@@ -458,7 +467,7 @@ function _ppsPopupGetActionDone( popup ) {
458
  if(isNumericPps( popup ))
459
  popup = ppsGetPopupById( popup );
460
  var actionsKey = 'pps_actions_'+ popup.id
461
- , actions = getCookiePps( actionsKey );
462
  if(actions) {
463
  if(popup.type == 'age_verify' && actions.age_verify && popup.params.opts_attrs.btns_number) {
464
  // Count action done for Age Berify types only if primary was clicked
@@ -493,7 +502,7 @@ function _ppsPopupSetActionDone( popup, action, smType, params ) {
493
  popup = ppsGetPopupById( popup );
494
  smType = smType !== null ? smType : '';
495
  var actionsKey = 'pps_actions_'+ popup.id
496
- , actions = getCookiePps( actionsKey );
497
  if(!actions)
498
  actions = {};
499
  // Save btn ID for age verify popups
@@ -516,7 +525,7 @@ function _ppsPopupAddStat( popup, action, smType, isUnique ) {
516
  return;
517
  jQuery.sendFormPps({
518
  msgElID: 'noMessages'
519
- , data: {mod: 'statistics', action: 'add', id: popup.id, type: action, sm_type: smType, is_unique: isUnique, 'connect_hash': popup.connect_hash}
520
  });
521
  jQuery(document).trigger('ppsAfterPopupsStatAdded', {popup: popup, action: action, smType: smType, is_unique: isUnique});
522
  }
@@ -526,6 +535,18 @@ function ppsShowPopUpOnClick( popup, element ) {
526
  _ppsSaveClickHref(popup, jQuery(element));
527
  ppsShowPopup( popup );
528
  }
 
 
 
 
 
 
 
 
 
 
 
 
529
  /**
530
  * Show popup
531
  * @param {mixed} popup Popup object or it's ID
@@ -560,12 +581,12 @@ function ppsShowPopup( popup, params ) {
560
  if(popup.params.tpl.anim && !popup.resized_for_wnd) {
561
  _ppsHandlePopupAnimationShow( popup, $shell );
562
  } else {
563
- $shell.show();
564
  }
565
  // For iFrames - we need to reset it's width - to make sure that it fit correct
566
  if(toeInArrayPps(popup.type, ['iframe'])) {
567
  var $frame = $shell.find('.ppsMainFrame');
568
- if($frame && $frame.size()) {
569
  $frame.css('width', 'auto');
570
  $frame.css('width', '100%');
571
  }
@@ -591,9 +612,9 @@ function ppsShowPopup( popup, params ) {
591
  popup.is_rendered = true; // Rendered at least one time
592
  jQuery(document).trigger('ppsAfterPopupsActionShow', popup);
593
  runShowClb( popup, $shell ); // Run all additional added show callback functions if such was added
594
-
595
  if(toeInArrayPps(popup.type, ['iframe'])) {
596
- if(popup.params.tpl.iframe_display_only
597
  && popup.params.tpl.iframe_display_only != ''
598
  && typeof(_ppsIFrameDisplayOnly) == 'function'
599
  && !popup.params.tpl._iframeDisplayOnlyBinded
@@ -603,7 +624,7 @@ function ppsShowPopup( popup, params ) {
603
  }
604
  }
605
  function _ppsCheckVideos( params ) {
606
- if(params.popup.type == 'video'
607
  && params.popup.params.tpl.video_type == 'youtube'
608
  && params.popup.params.tpl.video_autoplay
609
  ) {
@@ -613,27 +634,41 @@ function _ppsCheckVideos( params ) {
613
  $iframe.attr('src', $iframe.attr('src')+ '&autoplay=1');
614
  }
615
  }
616
- function _ppsHandlePopupAnimationShow( popup, shell ) {
617
  var preAnimClass = popup.params.tpl.anim.old ? 'magictime' : 'animated';
618
- shell.animationDuration( popup.params.tpl.anim_duration, true );
619
- shell.removeClass(popup.params.tpl.anim.hide_class);
620
- shell.addClass(preAnimClass+ ' '+ popup.params.tpl.anim.show_class).show();
 
 
 
 
621
  // This need to make properly work responsivness
622
  setTimeout(function(){
623
- shell.removeClass(preAnimClass+ ' '+ popup.params.tpl.anim.show_class);
624
  }, parseInt(popup.params.tpl.anim_duration));
625
  }
626
- function _ppsHandlePopupAnimationHide( popup, shell ) {
627
  var preAnimClass = popup.params.tpl.anim.old ? 'magictime' : 'animated';
628
- shell.removeClass(popup.params.tpl.anim.show_class).addClass(popup.params.tpl.anim.hide_class);
 
 
 
 
 
 
 
 
 
629
  setTimeout(function(){
630
- shell.removeClass( preAnimClass ).hide();
 
631
  ppsHideBgOverlay( popup );
632
- }, popup.params.tpl.anim_duration );
633
  }
634
  function _ppsIframesForReload(params) {
635
  var popup = params.popup
636
- , shell = params.shell ? params.shell : ppsGetPopupShell( popup );
637
  if(shell.find('iframe')) {
638
  shell.find('iframe').each(function(){
639
  var src = jQuery(this).attr('src');
@@ -655,16 +690,16 @@ function _ppsIsIframeForHide( params ) {
655
  if(params.popup.type == 'video')
656
  return true; // First check is really simple, isn't it?:)
657
  var $shell = params.shell ? params.shell : ppsGetPopupShell( params.popup )
658
- , $iFrames = $shell ? $shell.find('iframe') : false
659
- , videoFound = false;
660
- if($iFrames && $iFrames.size()) {
661
  var videoSources = ['youtube', 'vimeo', 'dtbaker'];
662
  $iFrames.each(function(){
663
  var originalSrc = jQuery(this).data('original-src')
664
- , src = jQuery(this).attr('src');
665
  if(src || originalSrc) {
666
  for(var i = 0; i < videoSources.length; i++) {
667
- if((src && src.indexOf( videoSources[ i ] ) !== -1)
668
  || (originalSrc && originalSrc.indexOf( videoSources[ i ] ) !== -1)
669
  ) {
670
  videoFound = true;
@@ -680,8 +715,8 @@ function _ppsCheckBindVideo(params) {
680
  params = params || {};
681
  if(_ppsIsIframeForHide( params )) {
682
  var $shell = params.shell ? params.shell : ppsGetPopupShell( params.popup )
683
- , $iFrames = $shell ? $shell.find('iframe,video') : false;
684
- if($iFrames && $iFrames.size()) {
685
  $iFrames.each(function(){
686
  jQuery(this).data('original-src', jQuery(this).attr('src'));
687
  jQuery(this).attr('src', '');
@@ -693,11 +728,11 @@ function _ppsCheckPlayVideo(params) {
693
  params = params || {};
694
  if(_ppsIsIframeForHide( params )) {
695
  var $shell = params.shell ? params.shell : ppsGetPopupShell( params.popup )
696
- , $iFrames = $shell ? $shell.find('iframe,video') : false;
697
- if($iFrames && $iFrames.size()) {
698
  $iFrames.each(function(){
699
  var originalSrc = jQuery(this).data('original-src')
700
- , src = jQuery(this).attr('src');
701
  if(originalSrc && originalSrc != '' && (!src || src == '')) {
702
  jQuery(this).attr('src', originalSrc);
703
  }
@@ -709,11 +744,11 @@ function _ppsCheckStopVideo(params) {
709
  params = params || {};
710
  if(_ppsIsIframeForHide( params )) {
711
  var $shell = params.shell ? params.shell : ppsGetPopupShell( params.popup )
712
- , $iFrames = $shell ? $shell.find('iframe,video') : false;
713
  if(params.popup.params.tpl.video_extra_full_screen) {
714
  return;
715
  }
716
- if($iFrames && $iFrames.size()) {
717
  $iFrames.each(function(){
718
  jQuery(this).attr('src', '');
719
  });
@@ -725,7 +760,7 @@ function _ppsCheckInnerScripts(params) {
725
  var $shell = params.shell ? params.shell : ppsGetPopupShell( params.popup )
726
  // Check scripts in description, and execute them if they are there
727
  var $scripts = $shell.find('script');
728
- if($scripts && $scripts.size()) {
729
  $scripts.each(function(){
730
  var scriptSrc = jQuery(this).attr('src');
731
  if(scriptSrc && scriptSrc != '') {
@@ -737,8 +772,8 @@ function _ppsCheckInnerScripts(params) {
737
  function _ppsCheckMap(params) {
738
  params = params || {};
739
  var shell = params.shell ? params.shell : ppsGetPopupShell( params.popup )
740
- , maps = shell.find('.gmp_map_opts');
741
- if(maps && maps.size()) {
742
  // For case we need to wait until gmap scripts will be loaded
743
  if(typeof(gmpGetMapByViewId) === 'undefined') {
744
  setTimeout(function(){
@@ -748,7 +783,7 @@ function _ppsCheckMap(params) {
748
  }
749
  maps.each(function(){
750
  var viewId = jQuery(this).data('view-id')
751
- , map = gmpGetMapByViewId(viewId);
752
  if(map) { // If map is already there - just refresh it after popup was shown
753
  map.fullRefresh ? map.fullRefresh() : map.refresh(); // For compatibilty with old methids, where there are no fullRefresh() method
754
  } else { // If there are no map - but it should be there - just create it
@@ -761,8 +796,8 @@ function _ppsCheckMap(params) {
761
  function _ppsCheckContactForm(params) {
762
  params = params || {};
763
  var $shell = params.shell ? params.shell : ppsGetPopupShell( params.popup )
764
- , $forms = $shell.find('.cfsFormShell');
765
- if($forms && $forms.size()) {
766
  // For case we need to wait until gmap scripts will be loaded
767
  if(typeof(g_cfsForms) === 'undefined') {
768
  setTimeout(function(){
@@ -775,7 +810,7 @@ function _ppsCheckContactForm(params) {
775
  }
776
  $forms.each(function(){
777
  var viewHtmlId = jQuery(this).attr('id')
778
- , form = g_cfsForms.getByViewHtmlId( viewHtmlId );
779
  if(form) {
780
  form.refresh();
781
  } else { // If there are no form - but it should be there - just create it
@@ -791,8 +826,8 @@ function _ppsCheckContactForm(params) {
791
  function _ppsSocialIcons(params) {
792
  params = params || {};
793
  var shell = params.shell ? params.shell : ppsGetPopupShell( params.popup )
794
- , icons = shell.find('.supsystic-social-sharing:not(.supsystic-social-sharing-loaded)');
795
- if(icons && icons.size() && typeof(window.initSupsysticSocialSharing) !== 'undefined') {
796
  icons.each(function(){
797
  window.initSupsysticSocialSharing(this);
798
  });
@@ -801,15 +836,15 @@ function _ppsSocialIcons(params) {
801
  function _ppsCheckPublication(params) {
802
  params = params || {};
803
  var shell = params.shell ? params.shell : ppsGetPopupShell( params.popup )
804
- , publications = shell.find('.dpsBookStageShell');
805
 
806
- if(publications && publications.size()) {
807
  publications.each(function(){
808
  if(typeof(dpsBookMng) == 'undefined') {
809
  dpsBookMng = new dpsBookManager();
810
  }
811
  var id = jQuery(this).find('.dpsBook').data('bookid')
812
- , publication = dpsBookMng.getById(id);
813
  if(publication) { // If publication is already there - just reinit it after popup was shown
814
  publication.getHtml().turn('destroy');
815
  publication.getStage().parent().html( publication._baseHtml );
@@ -826,18 +861,29 @@ function _ppsPositionPopup( params ) {
826
  params.popup = params.popup && typeof(params.popup) !== 'object' ? ppsGetPopupById( params.popup ) : params.popup;
827
  var $shell = params.shell ? params.shell : ppsGetPopupShell( params.popup );
828
  if($shell) {
829
- var wndWidth = params.wndWidth ? params.wndWidth : jQuery(window).width()
 
 
 
 
 
 
 
 
 
 
830
  , wndHeight = params.wndHeight ? params.wndHeight : jQuery(window).height()
831
- , shellWidth = $shell.outerWidth()
832
  , shellHeight = $shell.outerHeight()
833
  , resized = false
834
  , resizedW = false
835
  , resizedH = false
836
- , compareWidth = wndWidth - 10 // less then 10px
837
- , compareHeight = wndHeight - 10 // less then 10px
838
  , resizeDivision = 1
839
- , responsiveInside = $shell.hasClass('ppsResponsiveInside');
840
-
 
841
  if(shellHeight >= compareHeight && !responsiveInside && !(params.popup && params.popup._notResizeHeight)) {
842
  var initialHeight = params.recalc ? false : parseInt($shell.data('init-height'));
843
  if(!initialHeight) {
@@ -863,6 +909,7 @@ function _ppsPositionPopup( params ) {
863
  if(params.popup.params.tpl.responsive_mode == 'width_only') {
864
  if(resizedW) {
865
  var totalPadding = shellWidth - $shell.width(); // outer width - just width == paddings
 
866
  $shell.css({
867
  'width': 'calc(100% - '+ (totalPadding + 20)+ 'px)'
868
  });
@@ -904,23 +951,33 @@ function _ppsPositionPopup( params ) {
904
  }
905
  }
906
  params.popup.resized_for_wnd = resized;
907
- jQuery(document).trigger('ppsResize', {popup: params.popup, shell: $shell, wndWidth: wndWidth, wndHeight: wndHeight});
908
  if(!$shell.positioned_outside) { // Make available - re-position popup from outside modules
909
  var left = (wndWidth - shellWidth) / 2
910
  , top = (wndHeight - shellHeight) / 2;
911
  left = left < 0 ? 0 : left;
912
  top = top < 0 ? 0 : top;
913
  if(resizedW) {
914
- left -= (initialWidth - initialWidth * widthDivision) / 2;
915
  }
916
  if(resizedH && params.popup.params.tpl.responsive_mode != 'width_only') {
917
  top -= (initialHeight - initialHeight * resizeDivision) / 2;
918
  }
919
-
920
  $shell.css({
921
  'left': left
922
  , 'top': top
923
  });
 
 
 
 
 
 
 
 
 
 
 
924
  }
925
  } else {
926
  console.log('CAN NOT FIND POPUP SHELL TO RESIZE!');
@@ -929,14 +986,14 @@ function _ppsPositionPopup( params ) {
929
  function ppsClosePopup(popup) {
930
  if(isNumericPps( popup ))
931
  popup = ppsGetPopupById( popup );
932
- var shell = ppsGetPopupShell( popup );
933
  if(popup.params.tpl.anim) {
934
- _ppsHandlePopupAnimationHide( popup, shell );
935
  } else {
936
- shell.hide();
937
  ppsHideBgOverlay( popup );
938
  }
939
- _ppsCheckStopVideo({shell: shell, popup: popup});
940
  // Check disable wnd scrolling
941
  if(popup.params.tpl.dsbl_wnd_scroll) {
942
  enableScrollPps('html');
@@ -975,8 +1032,8 @@ function ppsInitBgOverlay() {
975
  jQuery('#ppsPopupBgOverlay').click(function(){
976
  if(ppsPopups && ppsPopups.length) {
977
  for(var i = 0; i < ppsPopups.length; i++) {
978
- if(ppsPopups[ i ]
979
- && ppsPopups[ i ].params
980
  && ppsPopups[ i ].params.main
981
  && ppsPopups[ i ].params.main.close_on
982
  && ppsPopups[ i ].params.main.close_on == 'overlay_click'
@@ -1030,34 +1087,34 @@ function ppsShowBgOverlay(popup) {
1030
  case 'stretch':
1031
  $overlay.css({
1032
  'background-position': 'center center'
1033
- , 'background-repeat': 'no-repeat'
1034
- , 'background-attachment': 'fixed'
1035
- , '-webkit-background-size': 'cover'
1036
- , '-moz-background-size': 'cover'
1037
- , '-o-background-size': 'cover'
1038
- , 'background-size': 'cover'
1039
  });
1040
  break;
1041
  case 'center':
1042
  $overlay.css({
1043
  'background-position': 'center center'
1044
- , 'background-repeat': 'no-repeat'
1045
- , 'background-attachment': 'scroll'
1046
- , '-webkit-background-size': 'auto'
1047
- , '-moz-background-size': 'auto'
1048
- , '-o-background-size': 'auto'
1049
- , 'background-size': 'auto'
1050
  });
1051
  break;
1052
  case 'tile':
1053
  $overlay.css({
1054
  'background-position': 'left top'
1055
- , 'background-repeat': 'repeat'
1056
- , 'background-attachment': 'scroll'
1057
- , '-webkit-background-size': 'auto'
1058
- , '-moz-background-size': 'auto'
1059
- , '-o-background-size': 'auto'
1060
- , 'background-size': 'auto'
1061
  });
1062
  break;
1063
  }
@@ -1101,17 +1158,17 @@ function ppsBindPopupActions(popup) {
1101
  if($shell.find('.supsystic-social-sharing').length) {
1102
  $shell.find('.supsystic-social-sharing a').click(function(){
1103
  var socHost = this.hostname
1104
- , socType = ''; // Social network type key
1105
  if(socHost && socHost != '') {
1106
  switch(socHost) {
1107
- case 'www.facebook.com':
1108
- socType = 'facebook';
1109
  break;
1110
  case 'plus.google.com':
1111
- socType = 'googleplus';
1112
  break;
1113
  case 'twitter.com':
1114
- socType = 'twitter';
1115
  break;
1116
  default:
1117
  socType = socHost;
@@ -1127,10 +1184,10 @@ function ppsBindPopupActions(popup) {
1127
  /*For age verification templates*/
1128
  if(popup.type == 'age_verify') {
1129
  var $verifyBtns = $shell.find('.ppsBtn');
1130
- if($verifyBtns && $verifyBtns.size()) {
1131
  $verifyBtns.click(function(){
1132
  var btnClasses = jQuery(this).attr('class').split(' ')
1133
- , btnId = 0;
1134
  if(btnClasses && btnClasses.length) {
1135
  for(var i = 0; i < btnClasses.length; i++) {
1136
  if(btnClasses[ i ].indexOf('ppsBtn_') === 0) {
@@ -1178,9 +1235,9 @@ function ppsPopupSubscribeSuccess(popup, params) {
1178
  function _ppsPopupBindDelay(popup, delayKey, delayEnbKey) {
1179
  if(popup && isNumericPps( popup ))
1180
  popup = ppsGetPopupById( popup );
1181
- var delay = (popup.params.main[ delayEnbKey ]
1182
- && parseInt(popup.params.main[ delayEnbKey ])
1183
- && parseInt( popup.params.main[ delayKey ] ))
1184
  ? (parseInt(popup.params.main[ delayKey ]) * 1000)
1185
  : 0;
1186
  if(delay) {
@@ -1232,7 +1289,7 @@ function ppsBindPopupForceShow( popup ) {
1232
  function ppsCheckPopupGetNotices( popup ) {
1233
  var res = {
1234
  errors: getDataLcs('ppsErrors')
1235
- , messages: getDataLcs('ppsMsgs')
1236
  };
1237
  if(res.errors)
1238
  res.error = true;
@@ -1249,40 +1306,40 @@ function _ppsCheckIsPageCached() {
1249
  if(g_ppsIsPageCachedChecked) // It was computed before - ignore one more compilation
1250
  return g_ppsIsPageCached;
1251
  jQuery('*:not(iframe,video,object)').contents().filter(function(){
1252
- return this.nodeType == 8;
1253
- }).each(function(i, e){
1254
- if(e.nodeValue
1255
  && (e.nodeValue.indexOf('Performance optimized by W3 Total Cache') !== -1
1256
  || e.nodeValue.indexOf('Cached page generated by WP-Super-Cache') !== -1)
1257
  ) {
1258
  g_ppsIsPageCached = true;
1259
  return false;
1260
  }
1261
- });
1262
  g_ppsIsPageCachedChecked = true;
1263
  return g_ppsIsPageCached;
1264
  }
1265
  function _ppsUpdatePopupNonces( popup ) {
1266
  if(!popup._nonces_updated) { // Update them only one time per session for each PopUp
1267
  var $shell = ppsGetPopupShell( popup )
1268
- , $forms = $shell.find('form')
1269
- , getFor = []
1270
- , tryGetFor = ['ppsSubscribeForm', 'ppsLoginForm', 'ppsRegForm'];
1271
- if($forms && $forms.size()) {
1272
  $forms.each(function(){
1273
  for(var i = 0; i < tryGetFor.length; i++) {
1274
  if(jQuery(this).hasClass( tryGetFor[ i ] )) {
1275
  getFor.push( tryGetFor[ i ] );
1276
  }
1277
  }
1278
-
1279
  });
1280
  }
1281
  if(getFor && getFor.length) {
1282
  jQuery.sendFormPps({
1283
  msgElID: 'noMessages'
1284
- , data: {mod: 'popup', action: 'updateNonce', id: popup.id, get_for: getFor}
1285
- , onSuccess: function(res) {
1286
  if(!res.error && res.data.update_for) {
1287
  var $shell = ppsGetPopupShell( popup );
1288
  for(var className in res.data.update_for) {
1
  var g_ppsWindowLoaded = false
2
+ , g_ppsIsPageCached = false
3
+ , g_ppsIsPageCachedChecked = false
4
+ , g_ppsShowCallbacks = {}
5
+ , g_ppsClks = {};
6
  jQuery(document).ready(function(){
7
  if(typeof(ppsPopupsFromFooter) !== 'undefined' && ppsPopupsFromFooter && ppsPopupsFromFooter.length) {
8
  ppsPopups = typeof(ppsPopups) === 'undefined' ? [] : ppsPopups;
36
  }
37
  }
38
  });
39
+ /* For case when for some reason jQuery(window).load() will not trigger -
40
  make it work correctly with re-position and re-sizing in any case */
41
  setTimeout(function(){
42
  g_ppsWindowLoaded = true;
59
  }
60
  function _ppsCheckPopupOnFollowClk( lnk ) {
61
  var href = lnk.href
62
+ , hash = lnk.hash
63
+ , wndLocation = window.location.href
64
+ , wndHash = window.location.hash;
65
  if(hash) {
66
  if(hash && hash != '') {
67
  href = str_replace(href, hash, '');
84
  }
85
  function _ppsBindOnElementClickPopups() {
86
  var $clickOnLinks = jQuery('[href*="#ppsShowPopUp_"]:not(.ppsClickBinded)');
87
+ if($clickOnLinks && $clickOnLinks.length) {
88
  $clickOnLinks.each(function(){
89
  jQuery(this).click(function(){
90
  var popupId = jQuery(this).attr('href');
111
  }).addClass('ppsClickBinded');
112
  }
113
  var $clickOnMenuItems = jQuery('[title*="#ppsShowPopUp_"]:not(.ppsClickBinded)'); /* You can also set this in title - for menu items for example */
114
+ if($clickOnMenuItems && $clickOnMenuItems.length) {
115
  $clickOnMenuItems.each(function(){
116
  var title = jQuery(this).attr('title')
117
+ , matched = title.match(/#ppsShowPopUp_(\d+)/);
118
  if(matched && matched.length == 2) {
119
  var popupId = parseInt(matched[1]);
120
  if(popupId) {
121
  jQuery(this)
122
+ .data('popup-id', popupId)
123
+ .attr('title', str_replace(title, matched[0], ''))
124
+ .click(function(){
125
+ var popupId = jQuery(this).data('popup-id');
126
+ _ppsAddPopUpClick( popupId, this );
127
+ if(!_ppsPopupBindDelay(popupId, 'show_on_click_on_el_delay', 'show_on_click_on_el_enb_delay')) {
128
+ ppsShowPopup( popupId );
129
+ }
130
+ return false;
131
+ });
132
  }
133
  }
134
  }).addClass('ppsClickBinded');
136
  }
137
  function ppsMovePopupStyles( popup ) {
138
  var $style = jQuery('<style type="text/css" />')
139
+ , $replacerTag = jQuery('#ppsPopupStylesHidden_'+ popup.view_id);
140
  $style.appendTo('body').html( $replacerTag.html() );
141
  $replacerTag.remove();
142
  }
148
  }
149
  function ppsBindPopupLoad( popup ) {
150
  var preloadImgs = jQuery('.ppsPopupPreloadImg_'+ popup.view_id);
151
+ popup._imgsCount = preloadImgs.length;
152
  if(popup._imgsCount) {
153
  popup._imgsLoaded = false;
154
  popup._imgsLoadedCount = 0;
179
  }
180
  /* Additional re-calculation for case if there are too much images */
181
  var $shell = ppsGetPopupShell( popup )
182
+ , $imgs = $shell.find('img')
183
+ , imgsCnt = $imgs ? $imgs.length : 0;
184
  if(imgsCnt) {
185
  if( popup._imgsCount ) {
186
  var substracted = false;
187
  preloadImgs.each(function(){
188
  var $preload = jQuery(this)
189
+ , preloadSrc = $preload.attr('src');
190
  $imgs.each(function(){
191
  var $img = jQuery( this )
192
+ , imgSrc = $img.attr('src');
193
  if(imgSrc == preloadSrc) { /*Preload is same as image - don't count it*/
194
  $imgs = $imgs.filter( this );
195
  substracted = true;
198
  });
199
  });
200
  if( substracted ) {
201
+ imgsCnt = $imgs.length;
202
  }
203
  }
204
  if( imgsCnt ) {
240
  var percScroll = parseInt( popup.params.main.show_on_scroll_window_perc_scroll );
241
  if(percScroll) {
242
  var docHt = jQuery(document).height()
243
+ , wndHt = jQuery(window).height()
244
+ , wndScrollPos = jQuery(window).scrollTop()
245
+ , wndScrollHt = docHt - wndHt
246
+ , currScrollPerc = wndScrollPos * 100 / wndScrollHt;
247
  if(wndScrollHt > 0 && currScrollPerc < percScroll) {
248
  return;
249
  }
281
  function ppsBindPopupSubscribers(popup) {
282
  if(popup.params.tpl.enb_subscribe) {
283
  var $shell = ppsGetPopupShell( popup )
284
+ , $form = $shell.find('.ppsSubscribeForm')
285
+ , $inFormCloseBtn = $form.find('.ppsPopupClose');
286
  switch(popup.params.tpl.sub_dest) {
287
  case 'aweber':
288
  /* No ajax action here */
289
+ break;
290
  case 'wordpress': case 'mailchimp': case 'mailpoet': default:
291
+ $form.submit(function(){
292
+ var submitBtn = jQuery(this).find('input[type=submit]')
293
  , self = this
294
  , msgEl = jQuery(this).find('.ppsSubMsg');
295
+ submitBtn.attr('disabled', 'disabled');
296
+ jQuery(this).sendFormPps({
297
+ msgElID: msgEl
298
  , onSuccess: function(res){
299
+ jQuery(self).find('input[type=submit]').removeAttr('disabled');
300
+ if(!res.error) {
301
+ var parentShell = jQuery(self).parents('.ppsSubscribeShell')
302
  , closeInsideBtn = jQuery(self).find('.ppsPopupClose'); /* Close button can be inside form - we can't remove it, because in this case user will not be able to close PopUp */
303
+ if(closeInsideBtn && closeInsideBtn.length) {
304
+ closeInsideBtn.appendTo( parentShell );
305
+ }
306
+ msgEl.appendTo( parentShell );
307
+ jQuery(self).animateRemovePps(300, function(){
308
+ _ppsPositionPopup({shell: $shell, popup: popup, recalc: true});
309
+ });
310
+ var $hideAfterSubscribe = $shell.find('.ppsHideAfterSubscribe');
311
+ if($hideAfterSubscribe && $hideAfterSubscribe.length) {
312
+ $hideAfterSubscribe.animateRemovePps( 300 );
313
+ }
314
+ ppsPopupSubscribeSuccess( popup );
315
+ var redirectTo = popup.params.sub_redirect_to_btn_url_href ? popup.params.sub_redirect_to_btn_url_href : false;
316
+ if(!redirectTo && res.data && res.data.redirect) {
317
+ redirectTo = res.data.redirect;
318
+ }
319
+ if(redirectTo) {
320
+ toeRedirect(redirectTo, parseInt(popup.params.tpl.sub_redirect_new_wnd));
321
+ }
322
+
323
+ } else {
324
+ _ppsPopupAddStat( popup, 'subscribe_error' ); /* Save close popup statistics */
325
+ if(res.data && res.data.emailExistsRedirect) {
326
+ /* Simulate here client side subscribe success if email already exists */
327
+ ppsPopupSubscribeSuccess(popup, {ignoreSendStat: true});
328
+ if(res.data.emailExistsRedirect.indexOf('http') !== 0) {
329
+ res.data.emailExistsRedirect = window.location.href+ res.data.emailExistsRedirect;
330
  }
331
+ toeRedirect( res.data.emailExistsRedirect );
332
  }
333
  }
334
+ }
 
335
  });
336
+ return false;
337
+ });
338
+ break;
339
  }
340
+ /* If user even press Enter on exit btn in form -let it still submit it.
341
  Close only if user click it using mouse*/
342
+ if($inFormCloseBtn && $inFormCloseBtn.length) {
343
  $inFormCloseBtn.keydown(function (e) {
344
  if (e.keyCode == 13) { /* Enter */
345
  $form.submit();
372
  if(isNumericPps( popup ))
373
  popup = ppsGetPopupById( popup );
374
  var showKey = 'pps_show_'+ popup.id
375
+ , prevShow = getCookiePps( showKey )
376
+ , countTimes = popup.params.main.show_to == 'count_times'
377
+ , timesShowedKey = 'pps_times_showed_'+ popup.id
378
+ , timesShowed = parseInt(getCookiePps(timesShowedKey));
379
  if(popup.params.main.show_to == 'first_time_visit' && prevShow)
380
  return;
381
  if(countTimes && prevShow && prevShow != '1') {
382
  var prevShowStamp = (new Date( prevShow )).getTime()
383
+ , currStamp = (new Date()).getTime();
384
  if(prevShowStamp) {
385
  var diff = (currStamp - prevShowStamp) / 1000 // Miliseconds to seconds
386
+ , hour = 3600
387
+ , needShowTimes = parseInt( popup.params.main.count_times_num );
388
  if(timesShowed && needShowTimes && timesShowed >= needShowTimes) {
389
  if((popup.params.main.count_times_mes == 'hour' && diff < hour)
390
+ || (popup.params.main.count_times_mes == 'day' && diff < 24 * hour)
391
+ || (popup.params.main.count_times_mes == 'week' && diff < 7 * 24 * hour)
392
+ || (popup.params.main.count_times_mes == 'month' && diff < 30 * 24 * hour)
393
  ) {
394
  return;
395
  }
415
  return;
416
  if(_ppsCheckDisplayTime( popup ))
417
  return;
418
+ if(popup.params.main.show_to == 'until_email_confirm'
419
+ && typeof(ppsCheckEmailConfirmed) === 'function'
420
+ && ppsCheckEmailConfirmed(popup)
421
+ ) {
422
+ return;
423
+ }
424
  params = params || {};
425
  params.isUnique = prevShow ? 0 : 1;
426
  ppsShowPopup(popup, params);
449
  return time;
450
  };
451
  var timeFrom = timeToNum(popup.params.main.show_time_from)
452
+ , timeTo = timeToNum(popup.params.main.show_time_to)
453
+ , currDate = new Date()
454
+ , currTime = currDate.getHours() + (currDate.getMinutes() / 100);
455
+
456
  if(currTime < timeFrom || currTime > timeTo) {
457
  return true;
458
  }
467
  if(isNumericPps( popup ))
468
  popup = ppsGetPopupById( popup );
469
  var actionsKey = 'pps_actions_'+ popup.id
470
+ , actions = getCookiePps( actionsKey );
471
  if(actions) {
472
  if(popup.type == 'age_verify' && actions.age_verify && popup.params.opts_attrs.btns_number) {
473
  // Count action done for Age Berify types only if primary was clicked
502
  popup = ppsGetPopupById( popup );
503
  smType = smType !== null ? smType : '';
504
  var actionsKey = 'pps_actions_'+ popup.id
505
+ , actions = getCookiePps( actionsKey );
506
  if(!actions)
507
  actions = {};
508
  // Save btn ID for age verify popups
525
  return;
526
  jQuery.sendFormPps({
527
  msgElID: 'noMessages'
528
+ , data: {mod: 'statistics', action: 'add', id: popup.id, type: action, sm_type: smType, is_unique: isUnique, 'connect_hash': popup.connect_hash}
529
  });
530
  jQuery(document).trigger('ppsAfterPopupsStatAdded', {popup: popup, action: action, smType: smType, is_unique: isUnique});
531
  }
535
  _ppsSaveClickHref(popup, jQuery(element));
536
  ppsShowPopup( popup );
537
  }
538
+ function __ppsDisplayShell(params) {
539
+ params.shell.show();
540
+ // For FB PopUp only
541
+ if(params.shell.find('.fb-page iframe:first').length > 0) {
542
+ setTimeout(function(){
543
+ _ppsPositionPopup(params);
544
+ }, 500);
545
+ }
546
+ }
547
+ function __ppsHideShell(params) {
548
+ params.shell.hide();
549
+ }
550
  /**
551
  * Show popup
552
  * @param {mixed} popup Popup object or it's ID
581
  if(popup.params.tpl.anim && !popup.resized_for_wnd) {
582
  _ppsHandlePopupAnimationShow( popup, $shell );
583
  } else {
584
+ __ppsDisplayShell({shell: $shell, popup: popup});
585
  }
586
  // For iFrames - we need to reset it's width - to make sure that it fit correct
587
  if(toeInArrayPps(popup.type, ['iframe'])) {
588
  var $frame = $shell.find('.ppsMainFrame');
589
+ if($frame && $frame.length) {
590
  $frame.css('width', 'auto');
591
  $frame.css('width', '100%');
592
  }
612
  popup.is_rendered = true; // Rendered at least one time
613
  jQuery(document).trigger('ppsAfterPopupsActionShow', popup);
614
  runShowClb( popup, $shell ); // Run all additional added show callback functions if such was added
615
+
616
  if(toeInArrayPps(popup.type, ['iframe'])) {
617
+ if(popup.params.tpl.iframe_display_only
618
  && popup.params.tpl.iframe_display_only != ''
619
  && typeof(_ppsIFrameDisplayOnly) == 'function'
620
  && !popup.params.tpl._iframeDisplayOnlyBinded
624
  }
625
  }
626
  function _ppsCheckVideos( params ) {
627
+ if(params.popup.type == 'video'
628
  && params.popup.params.tpl.video_type == 'youtube'
629
  && params.popup.params.tpl.video_autoplay
630
  ) {
634
  $iframe.attr('src', $iframe.attr('src')+ '&autoplay=1');
635
  }
636
  }
637
+ function _ppsHandlePopupAnimationShow( popup, $shell ) {
638
  var preAnimClass = popup.params.tpl.anim.old ? 'magictime' : 'animated';
639
+ $shell.animationDuration( popup.params.tpl.anim_duration, true );
640
+ var hideClass = popup.params.tpl.anim_close
641
+ ? popup.params.tpl.anim_close.hide_class
642
+ : popup.params.tpl.anim.hide_class;
643
+ $shell.removeClass(hideClass);
644
+ $shell.addClass(preAnimClass+ ' '+ popup.params.tpl.anim.show_class);
645
+ __ppsDisplayShell({shell: $shell, popup: popup});
646
  // This need to make properly work responsivness
647
  setTimeout(function(){
648
+ $shell.removeClass(preAnimClass+ ' '+ popup.params.tpl.anim.show_class);
649
  }, parseInt(popup.params.tpl.anim_duration));
650
  }
651
+ function _ppsHandlePopupAnimationHide( popup, $shell ) {
652
  var preAnimClass = popup.params.tpl.anim.old ? 'magictime' : 'animated';
653
+ var hideClass = popup.params.tpl.anim_close
654
+ ? popup.params.tpl.anim_close.hide_class
655
+ : popup.params.tpl.anim.hide_class;
656
+ var cloaseAnimDuration = popup.params.tpl.anim_close_duration;
657
+ if(cloaseAnimDuration && cloaseAnimDuration > 0) {
658
+ $shell.animationDuration( cloaseAnimDuration, true );
659
+ } else {
660
+ cloaseAnimDuration = popup.params.tpl.anim_duration;
661
+ }
662
+ $shell.removeClass(popup.params.tpl.anim.show_class).addClass(hideClass);
663
  setTimeout(function(){
664
+ $shell.removeClass( preAnimClass );
665
+ __ppsHideShell({shell: $shell, popup: popup});
666
  ppsHideBgOverlay( popup );
667
+ }, cloaseAnimDuration );
668
  }
669
  function _ppsIframesForReload(params) {
670
  var popup = params.popup
671
+ , shell = params.shell ? params.shell : ppsGetPopupShell( popup );
672
  if(shell.find('iframe')) {
673
  shell.find('iframe').each(function(){
674
  var src = jQuery(this).attr('src');
690
  if(params.popup.type == 'video')
691
  return true; // First check is really simple, isn't it?:)
692
  var $shell = params.shell ? params.shell : ppsGetPopupShell( params.popup )
693
+ , $iFrames = $shell ? $shell.find('iframe') : false
694
+ , videoFound = false;
695
+ if($iFrames && $iFrames.length) {
696
  var videoSources = ['youtube', 'vimeo', 'dtbaker'];
697
  $iFrames.each(function(){
698
  var originalSrc = jQuery(this).data('original-src')
699
+ , src = jQuery(this).attr('src');
700
  if(src || originalSrc) {
701
  for(var i = 0; i < videoSources.length; i++) {
702
+ if((src && src.indexOf( videoSources[ i ] ) !== -1)
703
  || (originalSrc && originalSrc.indexOf( videoSources[ i ] ) !== -1)
704
  ) {
705
  videoFound = true;
715
  params = params || {};
716
  if(_ppsIsIframeForHide( params )) {
717
  var $shell = params.shell ? params.shell : ppsGetPopupShell( params.popup )
718
+ , $iFrames = $shell ? $shell.find('iframe,video') : false;
719
+ if($iFrames && $iFrames.length) {
720
  $iFrames.each(function(){
721
  jQuery(this).data('original-src', jQuery(this).attr('src'));
722
  jQuery(this).attr('src', '');
728
  params = params || {};
729
  if(_ppsIsIframeForHide( params )) {
730
  var $shell = params.shell ? params.shell : ppsGetPopupShell( params.popup )
731
+ , $iFrames = $shell ? $shell.find('iframe,video') : false;
732
+ if($iFrames && $iFrames.length) {
733
  $iFrames.each(function(){
734
  var originalSrc = jQuery(this).data('original-src')
735
+ , src = jQuery(this).attr('src');
736
  if(originalSrc && originalSrc != '' && (!src || src == '')) {
737
  jQuery(this).attr('src', originalSrc);
738
  }
744
  params = params || {};
745
  if(_ppsIsIframeForHide( params )) {
746
  var $shell = params.shell ? params.shell : ppsGetPopupShell( params.popup )
747
+ , $iFrames = $shell ? $shell.find('iframe,video') : false;
748
  if(params.popup.params.tpl.video_extra_full_screen) {
749
  return;
750
  }
751
+ if($iFrames && $iFrames.length) {
752
  $iFrames.each(function(){
753
  jQuery(this).attr('src', '');
754
  });
760
  var $shell = params.shell ? params.shell : ppsGetPopupShell( params.popup )
761
  // Check scripts in description, and execute them if they are there
762
  var $scripts = $shell.find('script');
763
+ if($scripts && $scripts.length) {
764
  $scripts.each(function(){
765
  var scriptSrc = jQuery(this).attr('src');
766
  if(scriptSrc && scriptSrc != '') {
772
  function _ppsCheckMap(params) {
773
  params = params || {};
774
  var shell = params.shell ? params.shell : ppsGetPopupShell( params.popup )
775
+ , maps = shell.find('.gmp_map_opts');
776
+ if(maps && maps.length) {
777
  // For case we need to wait until gmap scripts will be loaded
778
  if(typeof(gmpGetMapByViewId) === 'undefined') {
779
  setTimeout(function(){
783
  }
784
  maps.each(function(){
785
  var viewId = jQuery(this).data('view-id')
786
+ , map = gmpGetMapByViewId(viewId);
787
  if(map) { // If map is already there - just refresh it after popup was shown
788
  map.fullRefresh ? map.fullRefresh() : map.refresh(); // For compatibilty with old methids, where there are no fullRefresh() method
789
  } else { // If there are no map - but it should be there - just create it
796
  function _ppsCheckContactForm(params) {
797
  params = params || {};
798
  var $shell = params.shell ? params.shell : ppsGetPopupShell( params.popup )
799
+ , $forms = $shell.find('.cfsFormShell');
800
+ if($forms && $forms.length) {
801
  // For case we need to wait until gmap scripts will be loaded
802
  if(typeof(g_cfsForms) === 'undefined') {
803
  setTimeout(function(){
810
  }
811
  $forms.each(function(){
812
  var viewHtmlId = jQuery(this).attr('id')
813
+ , form = g_cfsForms.getByViewHtmlId( viewHtmlId );
814
  if(form) {
815
  form.refresh();
816
  } else { // If there are no form - but it should be there - just create it
826
  function _ppsSocialIcons(params) {
827
  params = params || {};
828
  var shell = params.shell ? params.shell : ppsGetPopupShell( params.popup )
829
+ , icons = shell.find('.supsystic-social-sharing:not(.supsystic-social-sharing-loaded)');
830
+ if(icons && icons.length && typeof(window.initSupsysticSocialSharing) !== 'undefined') {
831
  icons.each(function(){
832
  window.initSupsysticSocialSharing(this);
833
  });
836
  function _ppsCheckPublication(params) {
837
  params = params || {};
838
  var shell = params.shell ? params.shell : ppsGetPopupShell( params.popup )
839
+ , publications = shell.find('.dpsBookStageShell');
840
 
841
+ if(publications && publications.length) {
842
  publications.each(function(){
843
  if(typeof(dpsBookMng) == 'undefined') {
844
  dpsBookMng = new dpsBookManager();
845
  }
846
  var id = jQuery(this).find('.dpsBook').data('bookid')
847
+ , publication = dpsBookMng.getById(id);
848
  if(publication) { // If publication is already there - just reinit it after popup was shown
849
  publication.getHtml().turn('destroy');
850
  publication.getStage().parent().html( publication._baseHtml );
861
  params.popup = params.popup && typeof(params.popup) !== 'object' ? ppsGetPopupById( params.popup ) : params.popup;
862
  var $shell = params.shell ? params.shell : ppsGetPopupShell( params.popup );
863
  if($shell) {
864
+ var wndWidthOffset = 10, // at least 10px;
865
+ wndHeightOffset = 10, // at least 10px;
866
+ leftOffset,
867
+ btnClose;
868
+
869
+ btnClose = $shell.find('.ppsPopupClose');
870
+ if(btnClose.css('position') == 'absolute') {
871
+ wndWidthOffset = +wndWidthOffset - parseFloat(btnClose.css('right'));
872
+ }
873
+ leftOffset = wndWidthOffset / 2;
874
+ var wndWidth = params.wndWidth ? params.wndWidth : jQuery(window).width()
875
  , wndHeight = params.wndHeight ? params.wndHeight : jQuery(window).height()
876
+ , shellWidth = $shell.outerWidth(true)
877
  , shellHeight = $shell.outerHeight()
878
  , resized = false
879
  , resizedW = false
880
  , resizedH = false
881
+ , compareWidth = wndWidth - wndWidthOffset
882
+ , compareHeight = wndHeight - wndHeightOffset
883
  , resizeDivision = 1
884
+ , responsiveInside = $shell.hasClass('ppsResponsiveInside')
885
+ , isResponsedByWidthOnly = false;
886
+
887
  if(shellHeight >= compareHeight && !responsiveInside && !(params.popup && params.popup._notResizeHeight)) {
888
  var initialHeight = params.recalc ? false : parseInt($shell.data('init-height'));
889
  if(!initialHeight) {
909
  if(params.popup.params.tpl.responsive_mode == 'width_only') {
910
  if(resizedW) {
911
  var totalPadding = shellWidth - $shell.width(); // outer width - just width == paddings
912
+ isResponsedByWidthOnly = shellWidth >= wndWidth;
913
  $shell.css({
914
  'width': 'calc(100% - '+ (totalPadding + 20)+ 'px)'
915
  });
951
  }
952
  }
953
  params.popup.resized_for_wnd = resized;
954
+ jQuery(document).trigger('ppsResize', {popup: params.popup, shell: $shell, wndWidth: wndWidth, wndHeight: wndHeight, isResponsedByWidthOnly: isResponsedByWidthOnly});
955
  if(!$shell.positioned_outside) { // Make available - re-position popup from outside modules
956
  var left = (wndWidth - shellWidth) / 2
957
  , top = (wndHeight - shellHeight) / 2;
958
  left = left < 0 ? 0 : left;
959
  top = top < 0 ? 0 : top;
960
  if(resizedW) {
961
+ left -= ((initialWidth - initialWidth * widthDivision) / 2) - leftOffset;
962
  }
963
  if(resizedH && params.popup.params.tpl.responsive_mode != 'width_only') {
964
  top -= (initialHeight - initialHeight * resizeDivision) / 2;
965
  }
 
966
  $shell.css({
967
  'left': left
968
  , 'top': top
969
  });
970
+ if(isResponsedByWidthOnly) {
971
+ $shell.css({
972
+ 'transform': 'translate(-50%, 0)',
973
+ 'left': '0'
974
+ });
975
+ setTimeout(function() {
976
+ $shell.css({
977
+ 'left': '50%'
978
+ });
979
+ }, params.popup.params.tpl.anim_duration - 20);
980
+ }
981
  }
982
  } else {
983
  console.log('CAN NOT FIND POPUP SHELL TO RESIZE!');
986
  function ppsClosePopup(popup) {
987
  if(isNumericPps( popup ))
988
  popup = ppsGetPopupById( popup );
989
+ var $shell = ppsGetPopupShell( popup );
990
  if(popup.params.tpl.anim) {
991
+ _ppsHandlePopupAnimationHide( popup, $shell );
992
  } else {
993
+ __ppsHideShell({shell: $shell, popup: popup});
994
  ppsHideBgOverlay( popup );
995
  }
996
+ _ppsCheckStopVideo({shell: $shell, popup: popup});
997
  // Check disable wnd scrolling
998
  if(popup.params.tpl.dsbl_wnd_scroll) {
999
  enableScrollPps('html');
1032
  jQuery('#ppsPopupBgOverlay').click(function(){
1033
  if(ppsPopups && ppsPopups.length) {
1034
  for(var i = 0; i < ppsPopups.length; i++) {
1035
+ if(ppsPopups[ i ]
1036
+ && ppsPopups[ i ].params
1037
  && ppsPopups[ i ].params.main
1038
  && ppsPopups[ i ].params.main.close_on
1039
  && ppsPopups[ i ].params.main.close_on == 'overlay_click'
1087
  case 'stretch':
1088
  $overlay.css({
1089
  'background-position': 'center center'
1090
+ , 'background-repeat': 'no-repeat'
1091
+ , 'background-attachment': 'fixed'
1092
+ , '-webkit-background-size': 'cover'
1093
+ , '-moz-background-size': 'cover'
1094
+ , '-o-background-size': 'cover'
1095
+ , 'background-size': 'cover'
1096
  });
1097
  break;
1098
  case 'center':
1099
  $overlay.css({
1100
  'background-position': 'center center'
1101
+ , 'background-repeat': 'no-repeat'
1102
+ , 'background-attachment': 'scroll'
1103
+ , '-webkit-background-size': 'auto'
1104
+ , '-moz-background-size': 'auto'
1105
+ , '-o-background-size': 'auto'
1106
+ , 'background-size': 'auto'
1107
  });
1108
  break;
1109
  case 'tile':
1110
  $overlay.css({
1111
  'background-position': 'left top'
1112
+ , 'background-repeat': 'repeat'
1113
+ , 'background-attachment': 'scroll'
1114
+ , '-webkit-background-size': 'auto'
1115
+ , '-moz-background-size': 'auto'
1116
+ , '-o-background-size': 'auto'
1117
+ , 'background-size': 'auto'
1118
  });
1119
  break;
1120
  }
1158
  if($shell.find('.supsystic-social-sharing').length) {
1159
  $shell.find('.supsystic-social-sharing a').click(function(){
1160
  var socHost = this.hostname
1161
+ , socType = ''; // Social network type key
1162
  if(socHost && socHost != '') {
1163
  switch(socHost) {
1164
+ case 'www.facebook.com':
1165
+ socType = 'facebook';
1166
  break;
1167
  case 'plus.google.com':
1168
+ socType = 'googleplus';
1169
  break;
1170
  case 'twitter.com':
1171
+ socType = 'twitter';
1172
  break;
1173
  default:
1174
  socType = socHost;
1184
  /*For age verification templates*/
1185
  if(popup.type == 'age_verify') {
1186
  var $verifyBtns = $shell.find('.ppsBtn');
1187
+ if($verifyBtns && $verifyBtns.length) {
1188
  $verifyBtns.click(function(){
1189
  var btnClasses = jQuery(this).attr('class').split(' ')
1190
+ , btnId = 0;
1191
  if(btnClasses && btnClasses.length) {
1192
  for(var i = 0; i < btnClasses.length; i++) {
1193
  if(btnClasses[ i ].indexOf('ppsBtn_') === 0) {
1235
  function _ppsPopupBindDelay(popup, delayKey, delayEnbKey) {
1236
  if(popup && isNumericPps( popup ))
1237
  popup = ppsGetPopupById( popup );
1238
+ var delay = (popup.params.main[ delayEnbKey ]
1239
+ && parseInt(popup.params.main[ delayEnbKey ])
1240
+ && parseInt( popup.params.main[ delayKey ] ))
1241
  ? (parseInt(popup.params.main[ delayKey ]) * 1000)
1242
  : 0;
1243
  if(delay) {
1289
  function ppsCheckPopupGetNotices( popup ) {
1290
  var res = {
1291
  errors: getDataLcs('ppsErrors')
1292
+ , messages: getDataLcs('ppsMsgs')
1293
  };
1294
  if(res.errors)
1295
  res.error = true;
1306
  if(g_ppsIsPageCachedChecked) // It was computed before - ignore one more compilation
1307
  return g_ppsIsPageCached;
1308
  jQuery('*:not(iframe,video,object)').contents().filter(function(){
1309
+ return this.nodeType == 8;
1310
+ }).each(function(i, e){
1311
+ if(e.nodeValue
1312
  && (e.nodeValue.indexOf('Performance optimized by W3 Total Cache') !== -1
1313
  || e.nodeValue.indexOf('Cached page generated by WP-Super-Cache') !== -1)
1314
  ) {
1315
  g_ppsIsPageCached = true;
1316
  return false;
1317
  }
1318
+ });
1319
  g_ppsIsPageCachedChecked = true;
1320
  return g_ppsIsPageCached;
1321
  }
1322
  function _ppsUpdatePopupNonces( popup ) {
1323
  if(!popup._nonces_updated) { // Update them only one time per session for each PopUp
1324
  var $shell = ppsGetPopupShell( popup )
1325
+ , $forms = $shell.find('form')
1326
+ , getFor = []
1327
+ , tryGetFor = ['ppsSubscribeForm', 'ppsLoginForm', 'ppsRegForm'];
1328
+ if($forms && $forms.length) {
1329
  $forms.each(function(){
1330
  for(var i = 0; i < tryGetFor.length; i++) {
1331
  if(jQuery(this).hasClass( tryGetFor[ i ] )) {
1332
  getFor.push( tryGetFor[ i ] );
1333
  }
1334
  }
1335
+
1336
  });
1337
  }
1338
  if(getFor && getFor.length) {
1339
  jQuery.sendFormPps({
1340
  msgElID: 'noMessages'
1341
+ , data: {mod: 'popup', action: 'updateNonce', id: popup.id, get_for: getFor}
1342
+ , onSuccess: function(res) {
1343
  if(!res.error && res.data.update_for) {
1344
  var $shell = ppsGetPopupShell( popup );
1345
  for(var className in res.data.update_for) {
modules/popup/js/frontend.popup.min.js CHANGED
@@ -1,2 +1 @@
1
-
2
- var g_ppsWindowLoaded=false,g_ppsIsPageCached=false,g_ppsIsPageCachedChecked=false,g_ppsShowCallbacks={},g_ppsClks={};jQuery(document).ready(function(){if(typeof(ppsPopupsFromFooter)!=="undefined"&&ppsPopupsFromFooter&&ppsPopupsFromFooter.length){ppsPopups=typeof(ppsPopups)==="undefined"?[]:ppsPopups;ppsPopups=ppsPopups.concat(ppsPopupsFromFooter)}jQuery(document).trigger("ppsBeforePopupsStartInit",ppsPopups);if(typeof(ppsPopups)!=="undefined"&&ppsPopups&&ppsPopups.length){ppsInitBgOverlay();jQuery(document).trigger("ppsBeforePopupsInit",ppsPopups);for(var a=0;a<ppsPopups.length;a++){jQuery("body").append(ppsPopups[a].rendered_html);ppsMovePopupStyles(ppsPopups[a]);ppsBindPopupLove(ppsPopups[a]);ppsBindPopupLoad(ppsPopups[a]);ppsBindPopupShow(ppsPopups[a]);ppsBindPopupActions(ppsPopups[a]);ppsBindPopupClose(ppsPopups[a]);ppsBindPopupSubscribers(ppsPopups[a]);ppsBindPopupForceShow(ppsPopups[a]);ppsCheckPopupGetNotices(ppsPopups[a])}_ppsBindOnElementClickPopups();_ppsBindClickHrefSaving();setTimeout(_ppsBindOnElementClickPopups,300);jQuery(document).trigger("ppsAfterPopupsInit",ppsPopups);jQuery(window).resize(function(){for(var b=0;b<ppsPopups.length;b++){if(ppsPopups[b].is_visible){_ppsPositionPopup({popup:ppsPopups[b]})}}});setTimeout(function(){g_ppsWindowLoaded=true},5000)}});jQuery(window).load(function(){g_ppsWindowLoaded=true;for(var a=0;a<ppsPopups.length;a++){if(ppsPopups[a].is_visible){_ppsPositionPopup({popup:ppsPopups[a]})}}});function _ppsAddPopUpClick(b,a){g_ppsClks[b]=a}function _ppsGetPopUpClick(a){return g_ppsClks[a]}function _ppsCheckPopupOnFollowClk(e){var a=e.href,d=e.hash,b=window.location.href,c=window.location.hash;if(d){if(d&&d!=""){a=str_replace(a,d,"")}if(c&&c!=""){b=str_replace(b,c,"")}if(strpos(a,"/",a.length-1)!==false){a=a.substr(0,a.length-1)}if(strpos(b,"/",b.length-1)!==false){b=b.substr(0,b.length-1)}if(b==a){setTimeout(function(){toeReload()},100)}}}function _ppsBindOnElementClickPopups(){var b=jQuery('[href*="#ppsShowPopUp_"]:not(.ppsClickBinded)');if(b&&b.size()){b.each(function(){jQuery(this).click(function(){var d=jQuery(this).attr("href");if(d&&d!=""){d=d.split("_");d=d[1]?parseInt(d[1]):0;if(d){var c=ppsGetPopupById(d);if(c&&c.params.main.show_on=="link_follow"){_ppsCheckPopupOnFollowClk(this);return true}_ppsAddPopUpClick(d,this);if(!_ppsPopupBindDelay(d,"show_on_click_on_el_delay","show_on_click_on_el_enb_delay")){ppsShowPopup(d)}}else{_ppsCheckPopupOnFollowClk(this);return true}}return false})}).addClass("ppsClickBinded")}var a=jQuery('[title*="#ppsShowPopUp_"]:not(.ppsClickBinded)');if(a&&a.size()){a.each(function(){var e=jQuery(this).attr("title"),c=e.match(/#ppsShowPopUp_(\d+)/);if(c&&c.length==2){var d=parseInt(c[1]);if(d){jQuery(this).data("popup-id",d).attr("title",str_replace(e,c[0],"")).click(function(){var f=jQuery(this).data("popup-id");_ppsAddPopUpClick(f,this);if(!_ppsPopupBindDelay(f,"show_on_click_on_el_delay","show_on_click_on_el_enb_delay")){ppsShowPopup(f)}return false})}}}).addClass("ppsClickBinded")}}function ppsMovePopupStyles(a){var b=jQuery('<style type="text/css" />'),c=jQuery("#ppsPopupStylesHidden_"+a.view_id);b.appendTo("body").html(c.html());c.remove()}function ppsBindPopupLove(b){if(parseInt(toeOptionPps("add_love_link"))){var a=ppsGetPopupShell(b);a.append(toeOptionPps("love_link_html"))}}function ppsBindPopupLoad(d){var e=jQuery(".ppsPopupPreloadImg_"+d.view_id);d._imgsCount=e.size();if(d._imgsCount){d._imgsLoaded=false;d._imgsLoadedCount=0;e.bind("load error",function(){d._imgsLoadedCount++;if(d._imgsLoadedCount>=d._imgsCount){d._imgsLoaded=true;var g=ppsGetPopupShell(d);g.trigger("ppsShowPopupAfterAllImgs",d)}})}else{if(toeInArrayPps(d.type,["iframe","pdf"])){d._imgsLoaded=false;var c=ppsGetPopupShell(d);c.find(".ppsMainFrame").bind("load error",function(){var g=d._imgsLoaded;d._imgsLoaded=true;if(!g){setTimeout(function(){c.trigger("ppsShowPopupAfterAllImgs",d)},1000)}})}else{d._imgsLoaded=true}}var c=ppsGetPopupShell(d),f=c.find("img"),b=f?f.size():0;if(b){if(d._imgsCount){var a=false;e.each(function(){var g=jQuery(this),h=g.attr("src");f.each(function(){var i=jQuery(this),j=i.attr("src");if(j==h){f=f.filter(this);a=true;return false}})});if(a){b=f.size()}}if(b){f.bind("load error",function(){b--;if(b<=0&&d.is_visible){_ppsPositionPopup({shell:c,popup:d,recalc:true})}})}}}function ppsBindPopupShow(a){_ppsCheckBindVideo({popup:a});switch(a.params.main.show_on){case"page_load":if(!_ppsPopupBindDelay(a,"show_on_page_load_delay","show_on_page_load_enb_delay")){if(a.type=="fb_like"){a.render_with_fb_load=true}else{ppsCheckShowPopup(a)}}break;case"click_on_page":jQuery(document).click(function(){if(!a.click_on_page_displayed){ppsCheckShowPopup(a);a.click_on_page_displayed=true}});break;case"click_on_element":break;case"scroll_window":jQuery(window).scroll(function(){if(parseInt(a.params.main.show_on_scroll_window_enb_perc_scroll)){var e=parseInt(a.params.main.show_on_scroll_window_perc_scroll);if(e){var h=jQuery(document).height(),b=jQuery(window).height(),c=jQuery(window).scrollTop(),g=h-b,f=c*100/g;if(g>0&&f<e){return}}}if(!a.scroll_window_displayed){var d=0;if(a.params.main.show_on_scroll_window_enb_delay&&parseInt(a.params.main.show_on_scroll_window_enb_delay)){a.params.main.show_on_scroll_window_delay=parseInt(a.params.main.show_on_scroll_window_delay);if(a.params.main.show_on_scroll_window_delay){d=a.params.main.show_on_scroll_window_delay*1000}}if(d){setTimeout(function(){ppsCheckShowPopup(a)},d)}else{ppsCheckShowPopup(a)}a.scroll_window_displayed=true}});break}}function ppsBindPopupClose(b){var a=ppsGetPopupShell(b);a.find(".ppsPopupClose").click(function(){ppsClosePopup(b);return false})}function ppsBindPopupSubscribers(b){if(b.params.tpl.enb_subscribe){var a=ppsGetPopupShell(b),d=a.find(".ppsSubscribeForm"),e=d.find(".ppsPopupClose");switch(b.params.tpl.sub_dest){case"aweber":break;case"wordpress":case"mailchimp":case"mailpoet":default:d.submit(function(){var g=jQuery(this).find("input[type=submit]"),h=this,i=jQuery(this).find(".ppsSubMsg");g.attr("disabled","disabled");jQuery(this).sendFormPps({msgElID:i,onSuccess:function(k){jQuery(h).find("input[type=submit]").removeAttr("disabled");if(!k.error){var j=jQuery(h).parents(".ppsSubscribeShell"),l=jQuery(h).find(".ppsPopupClose");if(l&&l.size()){l.appendTo(j)}i.appendTo(j);jQuery(h).animateRemovePps(300,function(){_ppsPositionPopup({shell:a,popup:b,recalc:true})});var n=a.find(".ppsHideAfterSubscribe");if(n&&n.size()){n.animateRemovePps(300)}ppsPopupSubscribeSuccess(b);var m=b.params.sub_redirect_to_btn_url_href?b.params.sub_redirect_to_btn_url_href:false;if(!m&&k.data&&k.data.redirect){m=k.data.redirect}if(m){toeRedirect(m,parseInt(b.params.tpl.sub_redirect_new_wnd))}}else{_ppsPopupAddStat(b,"subscribe_error");if(k.data&&k.data.emailExistsRedirect){ppsPopupSubscribeSuccess(b,{ignoreSendStat:true});toeRedirect(k.data.emailExistsRedirect)}}}});return false});break}if(e&&e.size()){e.keydown(function(g){if(g.keyCode==13){d.submit();return false}})}if(navigator.userAgent.indexOf("Safari")>-1&&!(navigator.userAgent.indexOf("Chrome")>-1)){var c=a.get(0).getElementsByTagName("form");if(c&&c.length){for(var f=0;f<c.length;f++){c[f].noValidate=true;c[f].addEventListener("submit",function(g){if(!g.target.checkValidity()){g.preventDefault();jQuery(this).find(".ppsSubMsg").addClass("ppsErrorMsg").html("Please fill-in all fields")}},false)}}}}}function ppsCheckShowPopup(b,e){if(isNumericPps(b)){b=ppsGetPopupById(b)}var h="pps_show_"+b.id,l=getCookiePps(h),n=b.params.main.show_to=="count_times",f="pps_times_showed_"+b.id,a=parseInt(getCookiePps(f));if(b.params.main.show_to=="first_time_visit"&&l){return}if(n&&l&&l!="1"){var g=(new Date(l)).getTime(),i=(new Date()).getTime();if(g){var m=(i-g)/1000,d=3600,k=parseInt(b.params.main.count_times_num);if(a&&k&&a>=k){if((b.params.main.count_times_mes=="hour"&&m<d)||(b.params.main.count_times_mes=="day"&&m<24*d)||(b.params.main.count_times_mes=="week"&&m<7*24*d)||(b.params.main.count_times_mes=="month"&&m<30*24*d)){return}if(a>=k){a=0}}}}if(!l||n){var j=parseInt(b.params.main.show_to_first_time_visit_days);j=isNaN(j)||n?30:j;if(!j){j=null}var c=n?(new Date()).toString():"1";setCookiePps("pps_show_"+b.id,c,j);if(n){setCookiePps(f,(a?a+1:1),30)}}var o=_ppsPopupGetActionDone(b);if(b.params.main.show_to=="until_make_action"&&o){return}if(_ppsCheckDisplayTime(b)){return}e=e||{};e.isUnique=l?0:1;ppsShowPopup(b,e);return false}function _ppsCheckDisplayTime(b){if(isNumericPps(b)){b=ppsGetPopupById(b)}if(b.params.main.enb_show_time&&b.params.main.show_time_from&&b.params.main.show_time_to&&b.params.main.show_time_from!=b.params.main.show_time_to){var f=function(i){var h=strpos(i,"pm")!==false?12:0;var g=parseFloat(str_replace(str_replace(str_replace(i,"am",""),"pm",""),":","."));if(toeInArray(g,[12,12.3])===-1){g+=h}else{if(!h){g-=12}}return g};var a=f(b.params.main.show_time_from),d=f(b.params.main.show_time_to),e=new Date(),c=e.getHours()+(e.getMinutes()/100);if(c<a||c>d){return true}}return false}function _ppsPopupGetActionDone(a){if(isNumericPps(a)){a=ppsGetPopupById(a)}var d="pps_actions_"+a.id,e=getCookiePps(d);if(e){if(a.type=="age_verify"&&e.age_verify&&a.params.opts_attrs.btns_number){var b=false;for(var c=0;c<a.params.opts_attrs.btns_number;c++){if(a.params.tpl["is_btn_primary_"+c]){if(c==e.age_verify){return true}b=true}}if(b){return false}}return true}return false}function _ppsPopupSetActionDone(b,d,c,g){g=g||{};if(isNumericPps(b)){b=ppsGetPopupById(b)}c=c!==null?c:"";var e="pps_actions_"+b.id,f=getCookiePps(e);if(!f){f={}}if(d=="age_verify"){f[d]=c}else{f[d]=1}var a=parseInt(b.params.main.show_to_until_make_action_days);a=isNaN(a)?30:a;if(!a){a=null}setCookiePps(e,f,a);if(!g.ignoreSendStat){_ppsPopupAddStat(b,d,c)}jQuery(document).trigger("ppsAfterPopupsActionDone",{popup:b,action:d,smType:c})}function _ppsPopupAddStat(a,d,b,c){if(a&&a.params&&a.params.tpl.dsbl_stats){return}jQuery.sendFormPps({msgElID:"noMessages",data:{mod:"statistics",action:"add",id:a.id,type:d,sm_type:b,is_unique:c,connect_hash:a.connect_hash}});jQuery(document).trigger("ppsAfterPopupsStatAdded",{popup:a,action:d,smType:b,is_unique:c})}function ppsShowPopUpOnClick(a,b){if(isNumericPps(a)){a=ppsGetPopupById(a)}_ppsSaveClickHref(a,jQuery(b));ppsShowPopup(a)}function ppsShowPopup(b,d){if(!ppsCorrectJqueryUsed()){ppsReloadCoreJs(ppsShowPopup,[b,d]);return}d=d||{};if(isNumericPps(b)){b=ppsGetPopupById(b)}var a=ppsGetPopupShell(b);if(!b._imgsLoaded){a.bind("ppsShowPopupAfterAllImgs",function(){ppsShowPopup(b,d)});return}a.data("view-id",b.view_id);if(_ppsCheckIsPageCached()){_ppsUpdatePopupNonces(b)}_ppsPopupAddStat(b,"show",0,d.isUnique);if(!d.ignoreBgOverlay){ppsShowBgOverlay(b)}if(g_ppsWindowLoaded&&!d.ignorePosition){_ppsPositionPopup({shell:a,popup:b})}if(b.params.tpl.anim&&!b.resized_for_wnd){_ppsHandlePopupAnimationShow(b,a)}else{a.show()}if(toeInArrayPps(b.type,["iframe"])){var c=a.find(".ppsMainFrame");if(c&&c.size()){c.css("width","auto");c.css("width","100%")}}_ppsCheckPlayVideo({popup:b,shell:a});_ppsIframesForReload({popup:b,shell:a});_ppsCheckInnerScripts({popup:b,shell:a});setTimeout(function(){_ppsCheckMap({popup:b,shell:a});_ppsSocialIcons({popup:b,shell:a});_ppsCheckContactForm({popup:b,shell:a});_ppsCheckVideos({popup:b,shell:a})},100);_ppsCheckPublication({popup:b,shell:a});if(b.params.tpl.dsbl_wnd_scroll){disableScrollPps("html");disableScrollPps("body")}b.is_visible=true;b.is_rendered=true;jQuery(document).trigger("ppsAfterPopupsActionShow",b);runShowClb(b,a);if(toeInArrayPps(b.type,["iframe"])){if(b.params.tpl.iframe_display_only&&b.params.tpl.iframe_display_only!=""&&typeof(_ppsIFrameDisplayOnly)=="function"&&!b.params.tpl._iframeDisplayOnlyBinded){_ppsIFrameDisplayOnly(b)}}}function _ppsCheckVideos(b){if(b.popup.type=="video"&&b.popup.params.tpl.video_type=="youtube"&&b.popup.params.tpl.video_autoplay){var a=b.shell.find("iframe:first");a.attr("src",a.attr("src")+"&autoplay=1")}}function _ppsHandlePopupAnimationShow(a,b){var c=a.params.tpl.anim.old?"magictime":"animated";b.animationDuration(a.params.tpl.anim_duration,true);b.removeClass(a.params.tpl.anim.hide_class);b.addClass(c+" "+a.params.tpl.anim.show_class).show();setTimeout(function(){b.removeClass(c+" "+a.params.tpl.anim.show_class)},parseInt(a.params.tpl.anim_duration))}function _ppsHandlePopupAnimationHide(a,b){var c=a.params.tpl.anim.old?"magictime":"animated";b.removeClass(a.params.tpl.anim.show_class).addClass(a.params.tpl.anim.hide_class);setTimeout(function(){b.removeClass(c).hide();ppsHideBgOverlay(a)},a.params.tpl.anim_duration)}function _ppsIframesForReload(c){var a=c.popup,b=c.shell?c.shell:ppsGetPopupShell(a);if(b.find("iframe")){b.find("iframe").each(function(){var d=jQuery(this).attr("src");if(d){if(d.indexOf("www.google.com/maps/embed")!==-1){this.src=this.src}}})}}function _ppsIsIframeForHide(e){e=e||{};if(e.popup.type=="video"){return true}var b=e.shell?e.shell:ppsGetPopupShell(e.popup),d=b?b.find("iframe"):false,a=false;if(d&&d.size()){var c=["youtube","vimeo","dtbaker"];d.each(function(){var f=jQuery(this).data("original-src"),h=jQuery(this).attr("src");if(h||f){for(var g=0;g<c.length;g++){if((h&&h.indexOf(c[g])!==-1)||(f&&f.indexOf(c[g])!==-1)){a=true;return false}}}})}return a}function _ppsCheckBindVideo(c){c=c||{};if(_ppsIsIframeForHide(c)){var a=c.shell?c.shell:ppsGetPopupShell(c.popup),b=a?a.find("iframe,video"):false;if(b&&b.size()){b.each(function(){jQuery(this).data("original-src",jQuery(this).attr("src"));jQuery(this).attr("src","")})}}}function _ppsCheckPlayVideo(c){c=c||{};if(_ppsIsIframeForHide(c)){var a=c.shell?c.shell:ppsGetPopupShell(c.popup),b=a?a.find("iframe,video"):false;if(b&&b.size()){b.each(function(){var d=jQuery(this).data("original-src"),e=jQuery(this).attr("src");if(d&&d!=""&&(!e||e=="")){jQuery(this).attr("src",d)}})}}}function _ppsCheckStopVideo(c){c=c||{};if(_ppsIsIframeForHide(c)){var a=c.shell?c.shell:ppsGetPopupShell(c.popup),b=a?a.find("iframe,video"):false;if(c.popup.params.tpl.video_extra_full_screen){return}if(b&&b.size()){b.each(function(){jQuery(this).attr("src","")})}}}function _ppsCheckInnerScripts(b){b=b||{};var a=b.shell?b.shell:ppsGetPopupShell(b.popup);var c=a.find("script");if(c&&c.size()){c.each(function(){var d=jQuery(this).attr("src");if(d&&d!=""){jQuery.getScript(d)}})}}function _ppsCheckMap(c){c=c||{};var a=c.shell?c.shell:ppsGetPopupShell(c.popup),b=a.find(".gmp_map_opts");if(b&&b.size()){if(typeof(gmpGetMapByViewId)==="undefined"){setTimeout(function(){_ppsCheckMap(c)},1000);return}b.each(function(){var d=jQuery(this).data("view-id"),e=gmpGetMapByViewId(d);if(e){e.fullRefresh?e.fullRefresh():e.refresh()}else{var f=gmpGetMapInfoByViewId(d);gmpInitMapOnPage(f)}})}}function _ppsCheckContactForm(b){b=b||{};var a=b.shell?b.shell:ppsGetPopupShell(b.popup),c=a.find(".cfsFormShell");if(c&&c.size()){if(typeof(g_cfsForms)==="undefined"){setTimeout(function(){_ppsCheckContactForm(b)},1000);return}if(typeof(cfsCheckInitForms)!=="undefined"){cfsCheckInitForms(a)}c.each(function(){var d=jQuery(this).attr("id"),e=g_cfsForms.getByViewHtmlId(d);if(e){e.refresh()}else{g_cfsForms.add(g_cfsForms.getFormDataByViewHtmlId(d))}})}}function _ppsSocialIcons(c){c=c||{};var b=c.shell?c.shell:ppsGetPopupShell(c.popup),a=b.find(".supsystic-social-sharing:not(.supsystic-social-sharing-loaded)");if(a&&a.size()&&typeof(window.initSupsysticSocialSharing)!=="undefined"){a.each(function(){window.initSupsysticSocialSharing(this)})}}function _ppsCheckPublication(c){c=c||{};var a=c.shell?c.shell:ppsGetPopupShell(c.popup),b=a.find(".dpsBookStageShell");if(b&&b.size()){b.each(function(){if(typeof(dpsBookMng)=="undefined"){dpsBookMng=new dpsBookManager()}var e=jQuery(this).find(".dpsBook").data("bookid"),d=dpsBookMng.getById(e);if(d){d.getHtml().turn("destroy");d.getStage().parent().html(d._baseHtml);d._init(true)}else{dpsInitBookOnPage(dpsBookInfoByTermId(e));dpsBindBookActions(e)}})}}function _ppsPositionPopup(s){s=s||{};s.popup=s.popup&&typeof(s.popup)!=="object"?ppsGetPopupById(s.popup):s.popup;var h=s.shell?s.shell:ppsGetPopupShell(s.popup);if(h){var t=s.wndWidth?s.wndWidth:jQuery(window).width(),p=s.wndHeight?s.wndHeight:jQuery(window).height(),m=h.outerWidth(),c=h.outerHeight(),q=false,k=false,r=false,b=t-10,i=p-10,n=1,f=h.hasClass("ppsResponsiveInside");if(c>=i&&!f&&!(s.popup&&s.popup._notResizeHeight)){var o=s.recalc?false:parseInt(h.data("init-height"));if(!o){o=c;h.data("init-height",o)}n=i/o;q=r=true}if(m>=b&&!f){var e=s.recalc?false:parseInt(h.data("init-width"));if(!e){e=m;h.data("init-width",e)}var a=b/e;if(a<n){n=a}q=k=true}if(q){if(s.popup.params.tpl.responsive_mode=="width_only"){if(k){var g=m-h.width();h.css({width:"calc(100% - "+(g+20)+"px)"})}else{var e=parseInt(h.data("init-width"));if(e&&e<b){h.css({width:e})}}if(r){h.css({position:"absolute"})}else{h.css({position:"fixed"})}}else{var l={left:"center",top:"center"};h.ppsZoom(n,l.left+" "+l.top)}h.data("resized",1);m=h.outerWidth();c=h.outerHeight()}else{if(h.data("resized")){if(s.popup.params.tpl.responsive_mode=="width_only"){var e=parseInt(h.data("init-width"));if(e&&e<b){h.css({width:e})}h.css({position:"fixed"})}}}s.popup.resized_for_wnd=q;jQuery(document).trigger("ppsResize",{popup:s.popup,shell:h,wndWidth:t,wndHeight:p});if(!h.positioned_outside){var d=(t-m)/2,j=(p-c)/2;d=d<0?0:d;j=j<0?0:j;if(k){d-=(e-e*a)/2}if(r&&s.popup.params.tpl.responsive_mode!="width_only"){j-=(o-o*n)/2}h.css({left:d,top:j})}}else{console.log("CAN NOT FIND POPUP SHELL TO RESIZE!")}}function ppsClosePopup(a){if(isNumericPps(a)){a=ppsGetPopupById(a)}var b=ppsGetPopupShell(a);if(a.params.tpl.anim){_ppsHandlePopupAnimationHide(a,b)}else{b.hide();ppsHideBgOverlay(a)}_ppsCheckStopVideo({shell:b,popup:a});if(a.params.tpl.dsbl_wnd_scroll){enableScrollPps("html");enableScrollPps("body")}if(parseInt(a.params.tpl.close_redirect_to_btn_url)&&a.params.close_redirect_to_btn_url_href){toeRedirect(a.params.close_redirect_to_btn_url_href,parseInt(a.params.tpl.reidrect_on_close_new_wnd))}else{if(a.params.tpl.reidrect_on_close&&a.params.tpl.reidrect_on_close!=""){toeRedirect(a.params.tpl.reidrect_on_close,parseInt(a.params.tpl.reidrect_on_close_new_wnd))}}_ppsPopupAddStat(a,"close");a.is_visible=false}function ppsGetPopupShell(a){if(isNumericPps(a)){a=ppsGetPopupById(a)}return jQuery("#ppsPopupShell_"+a.view_id)}function ppsGetPopupById(b){for(var a=0;a<ppsPopups.length;a++){if(ppsPopups[a].id==b){return ppsPopups[a]}}return false}function ppsGetPopupByViewId(a){for(var b=0;b<ppsPopups.length;b++){if(ppsPopups[b].view_id==a){return ppsPopups[b]}}return false}function ppsInitBgOverlay(){jQuery("body").append('<div id="ppsPopupBgOverlay" />');jQuery("#ppsPopupBgOverlay").click(function(){if(ppsPopups&&ppsPopups.length){for(var a=0;a<ppsPopups.length;a++){if(ppsPopups[a]&&ppsPopups[a].params&&ppsPopups[a].params.main&&ppsPopups[a].params.main.close_on&&ppsPopups[a].params.main.close_on=="overlay_click"){ppsClosePopup(ppsPopups[a])}}}})}function ppsShowBgOverlay(b){if(b&&isNumericPps(b)){b=ppsGetPopupById(b)}if(b.ignore_background){return}var a=jQuery("#ppsPopupBgOverlay");a.css({"background-position":"","background-repeat":"","background-attachment":"","-webkit-background-size":"","-moz-background-size":"","-o-background-size":"","background-size":"","background-color":"","background-url":""}).removeClass("ppsSnow");if(b&&b.params){if(typeof(b.params.tpl.bg_overlay_opacity)!=="undefined"){if(!b.params.tpl.bg_overlay_opacity||b.params.tpl.bg_overlay_opacity==""){b.params.tpl.bg_overlay_opacity=0}var c=parseFloat(b.params.tpl.bg_overlay_opacity);if(!isNaN(c)){a.css({opacity:c})}}if(typeof(b.params.tpl.bg_overlay_type)!=="undefined"){switch(b.params.tpl.bg_overlay_type){case"color":a.css({"background-color":b.params.tpl.bg_overlay_color});break;case"img":if(b.params.tpl.bg_overlay_img){switch(b.params.tpl.bg_overlay_img_pos){case"stretch":a.css({"background-position":"center center","background-repeat":"no-repeat","background-attachment":"fixed","-webkit-background-size":"cover","-moz-background-size":"cover","-o-background-size":"cover","background-size":"cover"});break;case"center":a.css({"background-position":"center center","background-repeat":"no-repeat","background-attachment":"scroll","-webkit-background-size":"auto","-moz-background-size":"auto","-o-background-size":"auto","background-size":"auto"});break;case"tile":a.css({"background-position":"left top","background-repeat":"repeat","background-attachment":"scroll","-webkit-background-size":"auto","-moz-background-size":"auto","-o-background-size":"auto","background-size":"auto"});break}a.css({"background-image":'url("'+b.params.tpl.bg_overlay_img+'")'})}break;case"snow":a.addClass("ppsSnow");break}}}a.show()}function ppsHideBgOverlay(a){if(a&&isNumericPps(a)){a=ppsGetPopupById(a)}if(a.ignore_background){return}jQuery("#ppsPopupBgOverlay").hide()}function ppsBindPopupActions(b){var a=ppsGetPopupShell(b);if(a.find(".ppsSubscribeForm_aweber").length){a.find(".ppsSubscribeForm_aweber").submit(function(){if(jQuery(this).find("input[name=email]").val()){ppsPopupSubscribeSuccess(b)}})}if(a.find(".ppsSmLink").length){a.find(".ppsSmLink").click(function(){_ppsPopupSetActionDone(b,"share",jQuery(this).data("type"))})}if(a.find(".supsystic-social-sharing").length){a.find(".supsystic-social-sharing a").click(function(){var d=this.hostname,e="";if(d&&d!=""){switch(d){case"www.facebook.com":e="facebook";break;case"plus.google.com":e="googleplus";break;case"twitter.com":e="twitter";break;default:e=d;break}_ppsPopupSetActionDone(b,"share",e)}})}if(a.find(".fb_iframe_widget").length){_ppsBindFbLikeBtnAction(b)}if(b.type=="age_verify"){var c=a.find(".ppsBtn");if(c&&c.size()){c.click(function(){var e=jQuery(this).attr("class").split(" "),f=0;if(e&&e.length){for(var d=0;d<e.length;d++){if(e[d].indexOf("ppsBtn_")===0){f=parseInt(e[d].split("_")[1]);break}}}_ppsPopupSetActionDone(b,"age_verify",f)})}}}function _ppsBindFbLikeBtnAction(a){if(typeof(FB)==="undefined"){setTimeout(function(){_ppsBindFbLikeBtnAction(a)},500);return}FB.Event.subscribe("edge.create",function(b){_ppsPopupSetActionDone(a,"fb_like")});FB.Event.subscribe("xfbml.render",function(b){setTimeout(function(){setTimeout(function(){_ppsPositionPopup({popup:a})},1000);if(a.render_with_fb_load){ppsCheckShowPopup(a);_ppsPositionPopup({popup:a})}else{_ppsPositionPopup({popup:a})}},1000)})}function ppsPopupSubscribeSuccess(a,b){if(a&&isNumericPps(a)){a=ppsGetPopupById(a)}_ppsPopupSetActionDone(a,"subscribe",false,b)}function _ppsPopupBindDelay(a,d,c){if(a&&isNumericPps(a)){a=ppsGetPopupById(a)}var b=(a.params.main[c]&&parseInt(a.params.main[c])&&parseInt(a.params.main[d]))?(parseInt(a.params.main[d])*1000):0;if(b){if(d=="show_on_page_load_delay"&&parseInt(a.params.main.enb_page_load_global_delay)){a.start_time=(new Date).getTime();_ppsPopupBindUnloadDelay(d,a);var e=parseInt(getCookiePps("pps_un_"+d+"_"+a.id));if(e&&e>0){b-=e;if(b<0){b=0}}}setTimeout(function(){ppsCheckShowPopup(a)},b);return true}return false}function _ppsPopupBindUnloadDelay(b,a){jQuery(window).unload(function(){var c=a.is_rendered?0:(new Date()).getTime()-a.start_time;setCookiePps("pps_un_"+b+"_"+a.id,c)})}function ppsBindPopupForceShow(a){if(a.params.main.show_on!="link_follow"){var b=toeGetHashParams();if(b&&b.length&&toeInArray("ppsShowPopUp_"+a.id,b)!==-1){ppsCheckShowPopup(a)}}}function ppsCheckPopupGetNotices(a){var c={errors:getDataLcs("ppsErrors"),messages:getDataLcs("ppsMsgs")};if(c.errors){c.error=true}if(c.errors||c.messages){var b=ppsGetPopupShell(a);toeProcessAjaxResponsePps(c,b.find(".ppsSubMsg"))}}function _ppsCheckIsPageCached(){if(g_ppsIsPageCachedChecked){return g_ppsIsPageCached}jQuery("*:not(iframe,video,object)").contents().filter(function(){return this.nodeType==8}).each(function(a,b){if(b.nodeValue&&(b.nodeValue.indexOf("Performance optimized by W3 Total Cache")!==-1||b.nodeValue.indexOf("Cached page generated by WP-Super-Cache")!==-1)){g_ppsIsPageCached=true;return false}});g_ppsIsPageCachedChecked=true;return g_ppsIsPageCached}function _ppsUpdatePopupNonces(b){if(!b._nonces_updated){var a=ppsGetPopupShell(b),e=a.find("form"),d=[],c=["ppsSubscribeForm","ppsLoginForm","ppsRegForm"];if(e&&e.size()){e.each(function(){for(var f=0;f<c.length;f++){if(jQuery(this).hasClass(c[f])){d.push(c[f])}}})}if(d&&d.length){jQuery.sendFormPps({msgElID:"noMessages",data:{mod:"popup",action:"updateNonce",id:b.id,get_for:d},onSuccess:function(g){if(!g.error&&g.data.update_for){var f=ppsGetPopupShell(b);for(var h in g.data.update_for){f.find("."+h).find('input[name="_wpnonce"]').val(g.data.update_for[h])}}}})}b._nonces_updated=true}}function _ppsBindClickHrefSaving(){for(var a=0;a<ppsPopups.length;a++){if(ppsPopups[a].params&&ppsPopups[a].params.tpl&&(parseInt(ppsPopups[a].params.tpl.sub_redirect_to_btn_url)||parseInt(ppsPopups[a].params.tpl.close_redirect_to_btn_url))){var b=jQuery('[onclick*="ppsShowPopup('+ppsPopups[a].id+')"]');ppsPopups[a]=_ppsSaveClickHref(ppsPopups[a],b)}}}function _ppsSaveClickHref(b,a){if(b.params&&b.params.tpl&&a&&a.length){var c=a.attr("href");if(parseInt(b.params.tpl.sub_redirect_to_btn_url)){b.params.sub_redirect_to_btn_url_href=c}if(parseInt(b.params.tpl.close_redirect_to_btn_url)){b.params.close_redirect_to_btn_url_href=c}}return b}function ppsAddShowClb(b,a){if(!g_ppsShowCallbacks[b]){g_ppsShowCallbacks[b]=[]}g_ppsShowCallbacks[b].push(a)}function runShowClb(a,c){if(a&&isNumericPps(a)){a=ppsGetPopupById(a)}if(g_ppsShowCallbacks[a.id]&&g_ppsShowCallbacks[a.id].length){for(var b=0;b<g_ppsShowCallbacks[a.id].length;b++){if(typeof(g_ppsShowCallbacks[a.id][b])==="function"){g_ppsShowCallbacks[a.id][b](a,c)}}}};
1
+ var g_ppsWindowLoaded=!1,g_ppsIsPageCached=!1,g_ppsIsPageCachedChecked=!1,g_ppsShowCallbacks={},g_ppsClks={};function _ppsAddPopUpClick(p,e){g_ppsClks[p]=e}function _ppsGetPopUpClick(p){return g_ppsClks[p]}function _ppsCheckPopupOnFollowClk(p){var e=p.href,s=p.hash,o=window.location.href,i=window.location.hash;s&&(s&&""!=s&&(e=str_replace(e,s,"")),i&&""!=i&&(o=str_replace(o,i,"")),!1!==strpos(e,"/",e.length-1)&&(e=e.substr(0,e.length-1)),!1!==strpos(o,"/",o.length-1)&&(o=o.substr(0,o.length-1)),o==e&&setTimeout(function(){toeReload()},100))}function _ppsBindOnElementClickPopups(){var p=jQuery('[href*="#ppsShowPopUp_"]:not(.ppsClickBinded)');p&&p.length&&p.each(function(){jQuery(this).click(function(){var p=jQuery(this).attr("href");if(p&&""!=p){if(!(p=(p=p.split("_"))[1]?parseInt(p[1]):0))return _ppsCheckPopupOnFollowClk(this),!0;var e=ppsGetPopupById(p);if(e&&"link_follow"==e.params.main.show_on)return _ppsCheckPopupOnFollowClk(this),!0;_ppsAddPopUpClick(p,this),_ppsPopupBindDelay(p,"show_on_click_on_el_delay","show_on_click_on_el_enb_delay")||ppsShowPopup(p)}return!1})}).addClass("ppsClickBinded");var e=jQuery('[title*="#ppsShowPopUp_"]:not(.ppsClickBinded)');e&&e.length&&e.each(function(){var p=jQuery(this).attr("title"),e=p.match(/#ppsShowPopUp_(\d+)/);if(e&&2==e.length){var s=parseInt(e[1]);s&&jQuery(this).data("popup-id",s).attr("title",str_replace(p,e[0],"")).click(function(){var p=jQuery(this).data("popup-id");return _ppsAddPopUpClick(p,this),_ppsPopupBindDelay(p,"show_on_click_on_el_delay","show_on_click_on_el_enb_delay")||ppsShowPopup(p),!1})}}).addClass("ppsClickBinded")}function ppsMovePopupStyles(p){var e=jQuery('<style type="text/css" />'),s=jQuery("#ppsPopupStylesHidden_"+p.view_id);e.appendTo("body").html(s.html()),s.remove()}function ppsBindPopupLove(p){parseInt(toeOptionPps("add_love_link"))&&ppsGetPopupShell(p).append(toeOptionPps("love_link_html"))}function ppsBindPopupLoad(p){var e=jQuery(".ppsPopupPreloadImg_"+p.view_id);(p._imgsCount=e.length,p._imgsCount)?(p._imgsLoaded=!1,p._imgsLoadedCount=0,e.bind("load error",function(){(p._imgsLoadedCount++,p._imgsLoadedCount>=p._imgsCount)&&(p._imgsLoaded=!0,ppsGetPopupShell(p).trigger("ppsShowPopupAfterAllImgs",p))})):toeInArrayPps(p.type,["iframe","pdf"])?(p._imgsLoaded=!1,(s=ppsGetPopupShell(p)).find(".ppsMainFrame").bind("load error",function(){var e=p._imgsLoaded;p._imgsLoaded=!0,e||setTimeout(function(){s.trigger("ppsShowPopupAfterAllImgs",p)},1e3)})):p._imgsLoaded=!0;var s,o=(s=ppsGetPopupShell(p)).find("img"),i=o?o.length:0;if(i){if(p._imgsCount){var t=!1;e.each(function(){var p=jQuery(this).attr("src");o.each(function(){if(jQuery(this).attr("src")==p)return o=o.filter(this),t=!0,!1})}),t&&(i=o.length)}i&&o.bind("load error",function(){--i<=0&&p.is_visible&&_ppsPositionPopup({shell:s,popup:p,recalc:!0})})}}function ppsBindPopupShow(p){switch(_ppsCheckBindVideo({popup:p}),p.params.main.show_on){case"page_load":_ppsPopupBindDelay(p,"show_on_page_load_delay","show_on_page_load_enb_delay")||("fb_like"==p.type?p.render_with_fb_load=!0:ppsCheckShowPopup(p));break;case"click_on_page":jQuery(document).click(function(){p.click_on_page_displayed||(ppsCheckShowPopup(p),p.click_on_page_displayed=!0)});break;case"click_on_element":break;case"scroll_window":jQuery(window).scroll(function(){if(parseInt(p.params.main.show_on_scroll_window_enb_perc_scroll)){var e=parseInt(p.params.main.show_on_scroll_window_perc_scroll);if(e){var s=jQuery(document).height(),o=jQuery(window).height(),i=jQuery(window).scrollTop(),t=s-o;if(t>0&&100*i/t<e)return}}if(!p.scroll_window_displayed){var a=0;p.params.main.show_on_scroll_window_enb_delay&&parseInt(p.params.main.show_on_scroll_window_enb_delay)&&(p.params.main.show_on_scroll_window_delay=parseInt(p.params.main.show_on_scroll_window_delay),p.params.main.show_on_scroll_window_delay&&(a=1e3*p.params.main.show_on_scroll_window_delay)),a?setTimeout(function(){ppsCheckShowPopup(p)},a):ppsCheckShowPopup(p),p.scroll_window_displayed=!0}})}}function ppsBindPopupClose(p){ppsGetPopupShell(p).find(".ppsPopupClose").click(function(){return ppsClosePopup(p),!1})}function ppsBindPopupSubscribers(p){if(p.params.tpl.enb_subscribe){var e=ppsGetPopupShell(p),s=e.find(".ppsSubscribeForm"),o=s.find(".ppsPopupClose");switch(p.params.tpl.sub_dest){case"aweber":break;case"wordpress":case"mailchimp":case"mailpoet":default:s.submit(function(){var s=jQuery(this).find("input[type=submit]"),o=this,i=jQuery(this).find(".ppsSubMsg");return s.attr("disabled","disabled"),jQuery(this).sendFormPps({msgElID:i,onSuccess:function(s){if(jQuery(o).find("input[type=submit]").removeAttr("disabled"),s.error)_ppsPopupAddStat(p,"subscribe_error"),s.data&&s.data.emailExistsRedirect&&(ppsPopupSubscribeSuccess(p,{ignoreSendStat:!0}),0!==s.data.emailExistsRedirect.indexOf("http")&&(s.data.emailExistsRedirect=window.location.href+s.data.emailExistsRedirect),toeRedirect(s.data.emailExistsRedirect));else{var t=jQuery(o).parents(".ppsSubscribeShell"),a=jQuery(o).find(".ppsPopupClose");a&&a.length&&a.appendTo(t),i.appendTo(t),jQuery(o).animateRemovePps(300,function(){_ppsPositionPopup({shell:e,popup:p,recalc:!0})});var n=e.find(".ppsHideAfterSubscribe");n&&n.length&&n.animateRemovePps(300),ppsPopupSubscribeSuccess(p);var r=!!p.params.sub_redirect_to_btn_url_href&&p.params.sub_redirect_to_btn_url_href;!r&&s.data&&s.data.redirect&&(r=s.data.redirect),r&&toeRedirect(r,parseInt(p.params.tpl.sub_redirect_new_wnd))}}}),!1})}if(o&&o.length&&o.keydown(function(p){if(13==p.keyCode)return s.submit(),!1}),navigator.userAgent.indexOf("Safari")>-1&&!(navigator.userAgent.indexOf("Chrome")>-1)){var i=e.get(0).getElementsByTagName("form");if(i&&i.length)for(var t=0;t<i.length;t++)i[t].noValidate=!0,i[t].addEventListener("submit",function(p){p.target.checkValidity()||(p.preventDefault(),jQuery(this).find(".ppsSubMsg").addClass("ppsErrorMsg").html("Please fill-in all fields"))},!1)}}}function ppsCheckShowPopup(p,e){isNumericPps(p)&&(p=ppsGetPopupById(p));var s="pps_show_"+p.id,o=getCookiePps(s),i="count_times"==p.params.main.show_to,t="pps_times_showed_"+p.id,a=parseInt(getCookiePps(t));if("first_time_visit"!=p.params.main.show_to||!o){if(i&&o&&"1"!=o){var n=new Date(o).getTime(),r=(new Date).getTime();if(n){var u=(r-n)/1e3,l=parseInt(p.params.main.count_times_num);if(a&&l&&a>=l){if("hour"==p.params.main.count_times_mes&&u<3600||"day"==p.params.main.count_times_mes&&u<86400||"week"==p.params.main.count_times_mes&&u<604800||"month"==p.params.main.count_times_mes&&u<2592e3)return;a>=l&&(a=0)}}}if(!o||i){var c=parseInt(p.params.main.show_to_first_time_visit_days);(c=isNaN(c)||i?30:c)||(c=null);var d=i?(new Date).toString():"1";setCookiePps("pps_show_"+p.id,d,c),i&&setCookiePps(t,a?a+1:1,30)}var _=_ppsPopupGetActionDone(p);if(!("until_make_action"==p.params.main.show_to&&_||_ppsCheckDisplayTime(p)||"until_email_confirm"==p.params.main.show_to&&"function"==typeof ppsCheckEmailConfirmed&&ppsCheckEmailConfirmed(p)))return(e=e||{}).isUnique=o?0:1,ppsShowPopup(p,e),!1}}function _ppsCheckDisplayTime(p){if(isNumericPps(p)&&(p=ppsGetPopupById(p)),p.params.main.enb_show_time&&p.params.main.show_time_from&&p.params.main.show_time_to&&p.params.main.show_time_from!=p.params.main.show_time_to){var e=function(p){var e=!1!==strpos(p,"pm")?12:0,s=parseFloat(str_replace(str_replace(str_replace(p,"am",""),"pm",""),":","."));return-1===toeInArray(s,[12,12.3])?s+=e:e||(s-=12),s},s=e(p.params.main.show_time_from),o=e(p.params.main.show_time_to),i=new Date,t=i.getHours()+i.getMinutes()/100;if(t<s||t>o)return!0}return!1}function _ppsPopupGetActionDone(p){isNumericPps(p)&&(p=ppsGetPopupById(p));var e="pps_actions_"+p.id,s=getCookiePps(e);if(s){if("age_verify"==p.type&&s.age_verify&&p.params.opts_attrs.btns_number){for(var o=!1,i=0;i<p.params.opts_attrs.btns_number;i++)if(p.params.tpl["is_btn_primary_"+i]){if(i==s.age_verify)return!0;o=!0}if(o)return!1}return!0}return!1}function _ppsPopupSetActionDone(p,e,s,o){o=o||{},isNumericPps(p)&&(p=ppsGetPopupById(p)),s=null!==s?s:"";var i="pps_actions_"+p.id,t=getCookiePps(i);t||(t={}),t[e]="age_verify"==e?s:1;var a=parseInt(p.params.main.show_to_until_make_action_days);(a=isNaN(a)?30:a)||(a=null),setCookiePps(i,t,a),o.ignoreSendStat||_ppsPopupAddStat(p,e,s),jQuery(document).trigger("ppsAfterPopupsActionDone",{popup:p,action:e,smType:s})}function _ppsPopupAddStat(p,e,s,o){p&&p.params&&p.params.tpl.dsbl_stats||(jQuery.sendFormPps({msgElID:"noMessages",data:{mod:"statistics",action:"add",id:p.id,type:e,sm_type:s,is_unique:o,connect_hash:p.connect_hash}}),jQuery(document).trigger("ppsAfterPopupsStatAdded",{popup:p,action:e,smType:s,is_unique:o}))}function ppsShowPopUpOnClick(p,e){isNumericPps(p)&&(p=ppsGetPopupById(p)),_ppsSaveClickHref(p,jQuery(e)),ppsShowPopup(p)}function __ppsDisplayShell(p){p.shell.show(),p.shell.find(".fb-page iframe:first").length>0&&setTimeout(function(){_ppsPositionPopup(p)},500)}function __ppsHideShell(p){p.shell.hide()}function ppsShowPopup(p,e){if(ppsCorrectJqueryUsed()){e=e||{},isNumericPps(p)&&(p=ppsGetPopupById(p));var s=ppsGetPopupShell(p);if(p._imgsLoaded){if(s.data("view-id",p.view_id),_ppsCheckIsPageCached()&&_ppsUpdatePopupNonces(p),_ppsPopupAddStat(p,"show",0,e.isUnique),e.ignoreBgOverlay||ppsShowBgOverlay(p),g_ppsWindowLoaded&&!e.ignorePosition&&_ppsPositionPopup({shell:s,popup:p}),p.params.tpl.anim&&!p.resized_for_wnd?_ppsHandlePopupAnimationShow(p,s):__ppsDisplayShell({shell:s,popup:p}),toeInArrayPps(p.type,["iframe"])){var o=s.find(".ppsMainFrame");o&&o.length&&(o.css("width","auto"),o.css("width","100%"))}_ppsCheckPlayVideo({popup:p,shell:s}),_ppsIframesForReload({popup:p,shell:s}),_ppsCheckInnerScripts({popup:p,shell:s}),setTimeout(function(){_ppsCheckMap({popup:p,shell:s}),_ppsSocialIcons({popup:p,shell:s}),_ppsCheckContactForm({popup:p,shell:s}),_ppsCheckVideos({popup:p,shell:s})},100),_ppsCheckPublication({popup:p,shell:s}),p.params.tpl.dsbl_wnd_scroll&&(disableScrollPps("html"),disableScrollPps("body")),p.is_visible=!0,p.is_rendered=!0,jQuery(document).trigger("ppsAfterPopupsActionShow",p),runShowClb(p,s),toeInArrayPps(p.type,["iframe"])&&p.params.tpl.iframe_display_only&&""!=p.params.tpl.iframe_display_only&&"function"==typeof _ppsIFrameDisplayOnly&&!p.params.tpl._iframeDisplayOnlyBinded&&_ppsIFrameDisplayOnly(p)}else s.bind("ppsShowPopupAfterAllImgs",function(){ppsShowPopup(p,e)})}else ppsReloadCoreJs(ppsShowPopup,[p,e])}function _ppsCheckVideos(p){if("video"==p.popup.type&&"youtube"==p.popup.params.tpl.video_type&&p.popup.params.tpl.video_autoplay){var e=p.shell.find("iframe:first");e.attr("src",e.attr("src")+"&autoplay=1")}}function _ppsHandlePopupAnimationShow(p,e){var s=p.params.tpl.anim.old?"magictime":"animated";e.animationDuration(p.params.tpl.anim_duration,!0);var o=p.params.tpl.anim_close?p.params.tpl.anim_close.hide_class:p.params.tpl.anim.hide_class;e.removeClass(o),e.addClass(s+" "+p.params.tpl.anim.show_class),__ppsDisplayShell({shell:e,popup:p}),setTimeout(function(){e.removeClass(s+" "+p.params.tpl.anim.show_class)},parseInt(p.params.tpl.anim_duration))}function _ppsHandlePopupAnimationHide(p,e){var s=p.params.tpl.anim.old?"magictime":"animated",o=p.params.tpl.anim_close?p.params.tpl.anim_close.hide_class:p.params.tpl.anim.hide_class,i=p.params.tpl.anim_close_duration;i&&i>0?e.animationDuration(i,!0):i=p.params.tpl.anim_duration,e.removeClass(p.params.tpl.anim.show_class).addClass(o),setTimeout(function(){e.removeClass(s),__ppsHideShell({shell:e,popup:p}),ppsHideBgOverlay(p)},i)}function _ppsIframesForReload(p){var e=p.popup,s=p.shell?p.shell:ppsGetPopupShell(e);s.find("iframe")&&s.find("iframe").each(function(){var p=jQuery(this).attr("src");p&&-1!==p.indexOf("www.google.com/maps/embed")&&(this.src=this.src)})}function _ppsIsIframeForHide(p){if("video"==(p=p||{}).popup.type)return!0;var e=p.shell?p.shell:ppsGetPopupShell(p.popup),s=!!e&&e.find("iframe"),o=!1;if(s&&s.length){var i=["youtube","vimeo","dtbaker"];s.each(function(){var p=jQuery(this).data("original-src"),e=jQuery(this).attr("src");if(e||p)for(var s=0;s<i.length;s++)if(e&&-1!==e.indexOf(i[s])||p&&-1!==p.indexOf(i[s]))return o=!0,!1})}return o}function _ppsCheckBindVideo(p){if(_ppsIsIframeForHide(p=p||{})){var e=p.shell?p.shell:ppsGetPopupShell(p.popup),s=!!e&&e.find("iframe,video");s&&s.length&&s.each(function(){jQuery(this).data("original-src",jQuery(this).attr("src")),jQuery(this).attr("src","")})}}function _ppsCheckPlayVideo(p){if(_ppsIsIframeForHide(p=p||{})){var e=p.shell?p.shell:ppsGetPopupShell(p.popup),s=!!e&&e.find("iframe,video");s&&s.length&&s.each(function(){var p=jQuery(this).data("original-src"),e=jQuery(this).attr("src");!p||""==p||e&&""!=e||jQuery(this).attr("src",p)})}}function _ppsCheckStopVideo(p){if(_ppsIsIframeForHide(p=p||{})){var e=p.shell?p.shell:ppsGetPopupShell(p.popup),s=!!e&&e.find("iframe,video");if(p.popup.params.tpl.video_extra_full_screen)return;s&&s.length&&s.each(function(){jQuery(this).attr("src","")})}}function _ppsCheckInnerScripts(p){var e=((p=p||{}).shell?p.shell:ppsGetPopupShell(p.popup)).find("script");e&&e.length&&e.each(function(){var p=jQuery(this).attr("src");p&&""!=p&&jQuery.getScript(p)})}function _ppsCheckMap(p){var e=((p=p||{}).shell?p.shell:ppsGetPopupShell(p.popup)).find(".gmp_map_opts");if(e&&e.length){if("undefined"==typeof gmpGetMapByViewId)return void setTimeout(function(){_ppsCheckMap(p)},1e3);e.each(function(){var p=jQuery(this).data("view-id"),e=gmpGetMapByViewId(p);if(e)e.fullRefresh?e.fullRefresh():e.refresh();else{var s=gmpGetMapInfoByViewId(p);gmpInitMapOnPage(s)}})}}function _ppsCheckContactForm(p){var e=(p=p||{}).shell?p.shell:ppsGetPopupShell(p.popup),s=e.find(".cfsFormShell");if(s&&s.length){if("undefined"==typeof g_cfsForms)return void setTimeout(function(){_ppsCheckContactForm(p)},1e3);"undefined"!=typeof cfsCheckInitForms&&cfsCheckInitForms(e),s.each(function(){var p=jQuery(this).attr("id"),e=g_cfsForms.getByViewHtmlId(p);e?e.refresh():g_cfsForms.add(g_cfsForms.getFormDataByViewHtmlId(p))})}}function _ppsSocialIcons(p){var e=((p=p||{}).shell?p.shell:ppsGetPopupShell(p.popup)).find(".supsystic-social-sharing:not(.supsystic-social-sharing-loaded)");e&&e.length&&void 0!==window.initSupsysticSocialSharing&&e.each(function(){window.initSupsysticSocialSharing(this)})}function _ppsCheckPublication(p){var e=((p=p||{}).shell?p.shell:ppsGetPopupShell(p.popup)).find(".dpsBookStageShell");e&&e.length&&e.each(function(){"undefined"==typeof dpsBookMng&&(dpsBookMng=new dpsBookManager);var p=jQuery(this).find(".dpsBook").data("bookid"),e=dpsBookMng.getById(p);e?(e.getHtml().turn("destroy"),e.getStage().parent().html(e._baseHtml),e._init(!0)):(dpsInitBookOnPage(dpsBookInfoByTermId(p)),dpsBindBookActions(p))})}function _ppsPositionPopup(p){(p=p||{}).popup=p.popup&&"object"!=typeof p.popup?ppsGetPopupById(p.popup):p.popup;var e=p.shell?p.shell:ppsGetPopupShell(p.popup);if(e){var s,o,i=10;"absolute"==(o=e.find(".ppsPopupClose")).css("position")&&(i=+i-parseFloat(o.css("right"))),s=i/2;var t=p.wndWidth?p.wndWidth:jQuery(window).width(),a=p.wndHeight?p.wndHeight:jQuery(window).height(),n=e.outerWidth(!0),r=e.outerHeight(),u=!1,l=!1,c=!1,d=t-i,_=a-10,h=1,m=e.hasClass("ppsResponsiveInside"),f=!1;if(r>=_&&!m&&(!p.popup||!p.popup._notResizeHeight)){var g=!p.recalc&&parseInt(e.data("init-height"));g||(g=r,e.data("init-height",g)),h=_/g,u=c=!0}if(n>=d&&!m){(v=!p.recalc&&parseInt(e.data("init-width")))||(v=n,e.data("init-width",v));var P=d/v;P<h&&(h=P),u=l=!0}if(u){if("width_only"==p.popup.params.tpl.responsive_mode){if(l){var y=n-e.width();f=n>=t,e.css({width:"calc(100% - "+(y+20)+"px)"})}else{(v=parseInt(e.data("init-width")))&&v<d&&e.css({width:v})}c?e.css({position:"absolute"}):e.css({position:"fixed"})}else{var w="center",b="center";e.ppsZoom(h,w+" "+b)}e.data("resized",1),n=e.outerWidth(),r=e.outerHeight()}else if(e.data("resized")){var v;if("width_only"==p.popup.params.tpl.responsive_mode)(v=parseInt(e.data("init-width")))&&v<d&&e.css({width:v}),e.css({position:"fixed"})}if(p.popup.resized_for_wnd=u,jQuery(document).trigger("ppsResize",{popup:p.popup,shell:e,wndWidth:t,wndHeight:a,isResponsedByWidthOnly:f}),!e.positioned_outside){var k=(t-n)/2,S=(a-r)/2;k=k<0?0:k,S=S<0?0:S,l&&(k-=(v-v*P)/2-s),c&&"width_only"!=p.popup.params.tpl.responsive_mode&&(S-=(g-g*h)/2),e.css({left:k,top:S}),f&&(e.css({transform:"translate(-50%, 0)",left:"0"}),setTimeout(function(){e.css({left:"50%"})},p.popup.params.tpl.anim_duration-20))}}else console.log("CAN NOT FIND POPUP SHELL TO RESIZE!")}function ppsClosePopup(p){isNumericPps(p)&&(p=ppsGetPopupById(p));var e=ppsGetPopupShell(p);p.params.tpl.anim?_ppsHandlePopupAnimationHide(p,e):(__ppsHideShell({shell:e,popup:p}),ppsHideBgOverlay(p)),_ppsCheckStopVideo({shell:e,popup:p}),p.params.tpl.dsbl_wnd_scroll&&(enableScrollPps("html"),enableScrollPps("body")),parseInt(p.params.tpl.close_redirect_to_btn_url)&&p.params.close_redirect_to_btn_url_href?toeRedirect(p.params.close_redirect_to_btn_url_href,parseInt(p.params.tpl.reidrect_on_close_new_wnd)):p.params.tpl.reidrect_on_close&&""!=p.params.tpl.reidrect_on_close&&toeRedirect(p.params.tpl.reidrect_on_close,parseInt(p.params.tpl.reidrect_on_close_new_wnd)),_ppsPopupAddStat(p,"close"),p.is_visible=!1}function ppsGetPopupShell(p){return isNumericPps(p)&&(p=ppsGetPopupById(p)),jQuery("#ppsPopupShell_"+p.view_id)}function ppsGetPopupById(p){for(var e=0;e<ppsPopups.length;e++)if(ppsPopups[e].id==p)return ppsPopups[e];return!1}function ppsGetPopupByViewId(p){for(var e=0;e<ppsPopups.length;e++)if(ppsPopups[e].view_id==p)return ppsPopups[e];return!1}function ppsInitBgOverlay(){jQuery("body").append('<div id="ppsPopupBgOverlay" />'),jQuery("#ppsPopupBgOverlay").click(function(){if(ppsPopups&&ppsPopups.length)for(var p=0;p<ppsPopups.length;p++)ppsPopups[p]&&ppsPopups[p].params&&ppsPopups[p].params.main&&ppsPopups[p].params.main.close_on&&"overlay_click"==ppsPopups[p].params.main.close_on&&ppsClosePopup(ppsPopups[p])})}function ppsShowBgOverlay(p){if(p&&isNumericPps(p)&&(p=ppsGetPopupById(p)),!p.ignore_background){var e=jQuery("#ppsPopupBgOverlay");if(e.css({"background-position":"","background-repeat":"","background-attachment":"","-webkit-background-size":"","-moz-background-size":"","-o-background-size":"","background-size":"","background-color":"","background-url":""}).removeClass("ppsSnow"),p&&p.params){if(void 0!==p.params.tpl.bg_overlay_opacity){p.params.tpl.bg_overlay_opacity&&""!=p.params.tpl.bg_overlay_opacity||(p.params.tpl.bg_overlay_opacity=0);var s=parseFloat(p.params.tpl.bg_overlay_opacity);isNaN(s)||e.css({opacity:s})}if(void 0!==p.params.tpl.bg_overlay_type)switch(p.params.tpl.bg_overlay_type){case"color":e.css({"background-color":p.params.tpl.bg_overlay_color});break;case"img":if(p.params.tpl.bg_overlay_img){switch(p.params.tpl.bg_overlay_img_pos){case"stretch":e.css({"background-position":"center center","background-repeat":"no-repeat","background-attachment":"fixed","-webkit-background-size":"cover","-moz-background-size":"cover","-o-background-size":"cover","background-size":"cover"});break;case"center":e.css({"background-position":"center center","background-repeat":"no-repeat","background-attachment":"scroll","-webkit-background-size":"auto","-moz-background-size":"auto","-o-background-size":"auto","background-size":"auto"});break;case"tile":e.css({"background-position":"left top","background-repeat":"repeat","background-attachment":"scroll","-webkit-background-size":"auto","-moz-background-size":"auto","-o-background-size":"auto","background-size":"auto"})}e.css({"background-image":'url("'+p.params.tpl.bg_overlay_img+'")'})}break;case"snow":e.addClass("ppsSnow")}}e.show()}}function ppsHideBgOverlay(p){p&&isNumericPps(p)&&(p=ppsGetPopupById(p)),p.ignore_background||jQuery("#ppsPopupBgOverlay").hide()}function ppsBindPopupActions(p){var e=ppsGetPopupShell(p);if(e.find(".ppsSubscribeForm_aweber").length&&e.find(".ppsSubscribeForm_aweber").submit(function(){jQuery(this).find("input[name=email]").val()&&ppsPopupSubscribeSuccess(p)}),e.find(".ppsSmLink").length&&e.find(".ppsSmLink").click(function(){_ppsPopupSetActionDone(p,"share",jQuery(this).data("type"))}),e.find(".supsystic-social-sharing").length&&e.find(".supsystic-social-sharing a").click(function(){var e=this.hostname,s="";if(e&&""!=e){switch(e){case"www.facebook.com":s="facebook";break;case"plus.google.com":s="googleplus";break;case"twitter.com":s="twitter";break;default:s=e}_ppsPopupSetActionDone(p,"share",s)}}),e.find(".fb_iframe_widget").length&&_ppsBindFbLikeBtnAction(p),"age_verify"==p.type){var s=e.find(".ppsBtn");s&&s.length&&s.click(function(){var e=jQuery(this).attr("class").split(" "),s=0;if(e&&e.length)for(var o=0;o<e.length;o++)if(0===e[o].indexOf("ppsBtn_")){s=parseInt(e[o].split("_")[1]);break}_ppsPopupSetActionDone(p,"age_verify",s)})}}function _ppsBindFbLikeBtnAction(p){"undefined"!=typeof FB?(FB.Event.subscribe("edge.create",function(e){_ppsPopupSetActionDone(p,"fb_like")}),FB.Event.subscribe("xfbml.render",function(e){setTimeout(function(){setTimeout(function(){_ppsPositionPopup({popup:p})},1e3),p.render_with_fb_load?(ppsCheckShowPopup(p),_ppsPositionPopup({popup:p})):_ppsPositionPopup({popup:p})},1e3)})):setTimeout(function(){_ppsBindFbLikeBtnAction(p)},500)}function ppsPopupSubscribeSuccess(p,e){p&&isNumericPps(p)&&(p=ppsGetPopupById(p)),_ppsPopupSetActionDone(p,"subscribe",!1,e)}function _ppsPopupBindDelay(p,e,s){p&&isNumericPps(p)&&(p=ppsGetPopupById(p));var o=p.params.main[s]&&parseInt(p.params.main[s])&&parseInt(p.params.main[e])?1e3*parseInt(p.params.main[e]):0;if(o){if("show_on_page_load_delay"==e&&parseInt(p.params.main.enb_page_load_global_delay)){p.start_time=(new Date).getTime(),_ppsPopupBindUnloadDelay(e,p);var i=parseInt(getCookiePps("pps_un_"+e+"_"+p.id));i&&i>0&&(o-=i)<0&&(o=0)}return setTimeout(function(){ppsCheckShowPopup(p)},o),!0}return!1}function _ppsPopupBindUnloadDelay(p,e){jQuery(window).unload(function(){var s=e.is_rendered?0:(new Date).getTime()-e.start_time;setCookiePps("pps_un_"+p+"_"+e.id,s)})}function ppsBindPopupForceShow(p){if("link_follow"!=p.params.main.show_on){var e=toeGetHashParams();e&&e.length&&-1!==toeInArray("ppsShowPopUp_"+p.id,e)&&ppsCheckShowPopup(p)}}function ppsCheckPopupGetNotices(p){var e={errors:getDataLcs("ppsErrors"),messages:getDataLcs("ppsMsgs")};if(e.errors&&(e.error=!0),e.errors||e.messages){var s=ppsGetPopupShell(p);toeProcessAjaxResponsePps(e,s.find(".ppsSubMsg"))}}function _ppsCheckIsPageCached(){return g_ppsIsPageCachedChecked?g_ppsIsPageCached:(jQuery("*:not(iframe,video,object)").contents().filter(function(){return 8==this.nodeType}).each(function(p,e){if(e.nodeValue&&(-1!==e.nodeValue.indexOf("Performance optimized by W3 Total Cache")||-1!==e.nodeValue.indexOf("Cached page generated by WP-Super-Cache")))return g_ppsIsPageCached=!0,!1}),g_ppsIsPageCachedChecked=!0,g_ppsIsPageCached)}function _ppsUpdatePopupNonces(p){if(!p._nonces_updated){var e=ppsGetPopupShell(p).find("form"),s=[],o=["ppsSubscribeForm","ppsLoginForm","ppsRegForm"];e&&e.length&&e.each(function(){for(var p=0;p<o.length;p++)jQuery(this).hasClass(o[p])&&s.push(o[p])}),s&&s.length&&jQuery.sendFormPps({msgElID:"noMessages",data:{mod:"popup",action:"updateNonce",id:p.id,get_for:s},onSuccess:function(e){if(!e.error&&e.data.update_for){var s=ppsGetPopupShell(p);for(var o in e.data.update_for)s.find("."+o).find('input[name="_wpnonce"]').val(e.data.update_for[o])}}}),p._nonces_updated=!0}}function _ppsBindClickHrefSaving(){for(var p=0;p<ppsPopups.length;p++)if(ppsPopups[p].params&&ppsPopups[p].params.tpl&&(parseInt(ppsPopups[p].params.tpl.sub_redirect_to_btn_url)||parseInt(ppsPopups[p].params.tpl.close_redirect_to_btn_url))){var e=jQuery('[onclick*="ppsShowPopup('+ppsPopups[p].id+')"]');ppsPopups[p]=_ppsSaveClickHref(ppsPopups[p],e)}}function _ppsSaveClickHref(p,e){if(p.params&&p.params.tpl&&e&&e.length){var s=e.attr("href");parseInt(p.params.tpl.sub_redirect_to_btn_url)&&(p.params.sub_redirect_to_btn_url_href=s),parseInt(p.params.tpl.close_redirect_to_btn_url)&&(p.params.close_redirect_to_btn_url_href=s)}return p}function ppsAddShowClb(p,e){g_ppsShowCallbacks[p]||(g_ppsShowCallbacks[p]=[]),g_ppsShowCallbacks[p].push(e)}function runShowClb(p,e){if(p&&isNumericPps(p)&&(p=ppsGetPopupById(p)),g_ppsShowCallbacks[p.id]&&g_ppsShowCallbacks[p.id].length)for(var s=0;s<g_ppsShowCallbacks[p.id].length;s++)"function"==typeof g_ppsShowCallbacks[p.id][s]&&g_ppsShowCallbacks[p.id][s](p,e)}jQuery(document).ready(function(){if("undefined"!=typeof ppsPopupsFromFooter&&ppsPopupsFromFooter&&ppsPopupsFromFooter.length&&(ppsPopups="undefined"==typeof ppsPopups?[]:ppsPopups,ppsPopups=ppsPopups.concat(ppsPopupsFromFooter)),jQuery(document).trigger("ppsBeforePopupsStartInit",ppsPopups),"undefined"!=typeof ppsPopups&&ppsPopups&&ppsPopups.length){ppsInitBgOverlay(),jQuery(document).trigger("ppsBeforePopupsInit",ppsPopups);for(var p=0;p<ppsPopups.length;p++)jQuery("body").append(ppsPopups[p].rendered_html),ppsMovePopupStyles(ppsPopups[p]),ppsBindPopupLove(ppsPopups[p]),ppsBindPopupLoad(ppsPopups[p]),ppsBindPopupShow(ppsPopups[p]),ppsBindPopupActions(ppsPopups[p]),ppsBindPopupClose(ppsPopups[p]),ppsBindPopupSubscribers(ppsPopups[p]),ppsBindPopupForceShow(ppsPopups[p]),ppsCheckPopupGetNotices(ppsPopups[p]);_ppsBindOnElementClickPopups(),_ppsBindClickHrefSaving(),setTimeout(_ppsBindOnElementClickPopups,300),jQuery(document).trigger("ppsAfterPopupsInit",ppsPopups),jQuery(window).resize(function(){for(var p=0;p<ppsPopups.length;p++)ppsPopups[p].is_visible&&_ppsPositionPopup({popup:ppsPopups[p]})}),setTimeout(function(){g_ppsWindowLoaded=!0},5e3)}}),jQuery(window).load(function(){g_ppsWindowLoaded=!0;for(var p=0;p<ppsPopups.length;p++)ppsPopups[p].is_visible&&_ppsPositionPopup({popup:ppsPopups[p]})});
 
modules/popup/mod.php CHANGED
@@ -64,8 +64,9 @@ class popupPps extends modulePps {
64
  public function checkPopupShow() {
65
  global $wp_query;
66
  $currentPageId = (int) get_the_ID();
67
-
68
  $isHome = function_exists('is_front_page') ? is_front_page() : is_home();
 
69
  /*show_pages = 1 -> All, 2 -> show on selected, 3 -> do not show on selected*/
70
  /*show_on = 1 -> Page load, 2 -> click on page, 3 -> click on certain element (shortcode)*/
71
  $condition = "original_id != 0 AND active = 1 AND (show_pages = 1";
@@ -73,12 +74,12 @@ class popupPps extends modulePps {
73
  $isOnlyOnePage = count($wp_query->posts) == 1;
74
  // WooCommerce substitute real Page ID: it will make current $wp_query list woo products
75
  // but our users can select "shop" page - like page where PopUp need to be triggered
76
- if(!$currentPageId
77
- && function_exists('is_shop')
78
- && function_exists('woocommerce_get_page_id')
79
- && is_shop()
80
- ) {
81
- $currentPageId = woocommerce_get_page_id('shop');
82
  $havePostsListing = true;
83
  $isOnlyOnePage = true;
84
  }
@@ -101,8 +102,9 @@ class popupPps extends modulePps {
101
  if($isHome && $wp_query && is_object($wp_query) && $wp_query->query && isset($wp_query->query['paged']) && (int) $wp_query->query['paged'] > 1) {
102
  $isHome = false;
103
  }
104
- if($isHome)
105
  $currentPageId = PPS_HOME_PAGE_ID;
 
106
  $condition .= " OR (show_pages = 2 AND id IN (SELECT popup_id FROM @__popup_show_pages WHERE post_id = $currentPageId AND not_show = 0))
107
  OR (show_pages = 3 AND id NOT IN (SELECT popup_id FROM @__popup_show_pages WHERE post_id = $currentPageId AND not_show = 1))";
108
  if(!$isHome) {
@@ -155,8 +157,13 @@ class popupPps extends modulePps {
155
  /*if($this->getModel()->abDeactivated()) {
156
  $condition .= ' AND ab_id = 0';
157
  }*/
158
- $popups = dispatcherPps::applyFilters('popupListFilterBeforeRender', $this->_beforeRender( $this->getModel()->addWhere( $condition )->getFromTbl() ));
159
- if(!empty($popups)) {
 
 
 
 
 
160
  $popups = dispatcherPps::applyFilters('popupListBeforeRender', $popups);
161
  $this->renderList( $popups );
162
  }
@@ -213,9 +220,11 @@ class popupPps extends modulePps {
213
  $postType = get_post_type();
214
  }
215
  $hideShowRevert = isset($p['params']['main']['hide_for_post_types_show']) && (int) $p['params']['main']['hide_for_post_types_show'];
216
- if(((!$hideShowRevert && count($wp_query->posts) === 1 && in_array($postType, $p['params']['main']['hide_for_post_types']))
217
- || ($hideShowRevert && (!in_array($postType, $p['params']['main']['hide_for_post_types']) || count($wp_query->posts) !== 1))
218
- )) {
 
 
219
  unset($popups[ $i ]);
220
  $dataRemoved = true;
221
  }
@@ -227,6 +236,13 @@ class popupPps extends modulePps {
227
  unset($popups[ $i ]);
228
  $dataRemoved = true;
229
  }
 
 
 
 
 
 
 
230
  if(isset($p['params']['main']['hide_for_ips'])
231
  && !empty($p['params']['main']['hide_for_ips'])
232
  ) { // Check if we need to hide it for IPs
@@ -327,6 +343,12 @@ class popupPps extends modulePps {
327
  if(!isset($p['params']['tpl']['anim_duration']) || $p['params']['tpl']['anim_duration'] <= 0) {
328
  $popups[ $i ]['params']['tpl']['anim_duration'] = 1000; // 1 second by default
329
  }
 
 
 
 
 
 
330
  $popups[ $i ]['rendered_html'] = $this->getView()->generateHtml( $p, array('replace_style_tag' => true) );
331
  // Unset those parameters - make data lighter
332
  unset($popups[ $i ]['css']);
64
  public function checkPopupShow() {
65
  global $wp_query;
66
  $currentPageId = (int) get_the_ID();
67
+
68
  $isHome = function_exists('is_front_page') ? is_front_page() : is_home();
69
+ $isShop = function_exists('is_shop') && is_shop();
70
  /*show_pages = 1 -> All, 2 -> show on selected, 3 -> do not show on selected*/
71
  /*show_on = 1 -> Page load, 2 -> click on page, 3 -> click on certain element (shortcode)*/
72
  $condition = "original_id != 0 AND active = 1 AND (show_pages = 1";
74
  $isOnlyOnePage = count($wp_query->posts) == 1;
75
  // WooCommerce substitute real Page ID: it will make current $wp_query list woo products
76
  // but our users can select "shop" page - like page where PopUp need to be triggered
77
+ if($isShop) {
78
+ if(function_exists('wc_get_page_id')) {
79
+ $currentPageId = wc_get_page_id('shop');
80
+ } else if(function_exists('woocommerce_get_page_id')) {
81
+ $currentPageId = woocommerce_get_page_id('shop');
82
+ }
83
  $havePostsListing = true;
84
  $isOnlyOnePage = true;
85
  }
102
  if($isHome && $wp_query && is_object($wp_query) && $wp_query->query && isset($wp_query->query['paged']) && (int) $wp_query->query['paged'] > 1) {
103
  $isHome = false;
104
  }
105
+ if($isHome && !$isShop) {
106
  $currentPageId = PPS_HOME_PAGE_ID;
107
+ }
108
  $condition .= " OR (show_pages = 2 AND id IN (SELECT popup_id FROM @__popup_show_pages WHERE post_id = $currentPageId AND not_show = 0))
109
  OR (show_pages = 3 AND id NOT IN (SELECT popup_id FROM @__popup_show_pages WHERE post_id = $currentPageId AND not_show = 1))";
110
  if(!$isHome) {
157
  /*if($this->getModel()->abDeactivated()) {
158
  $condition .= ' AND ab_id = 0';
159
  }*/
160
+ //Debug mode for load any popup on current popup page
161
+ // if(!empty($_GET['popup'])) {
162
+ // $popups = dispatcherPps::applyFilters('popupListFilterBeforeRender', $this->_beforeRender( array($this->getModel()->getById($_GET['popup'])) ));
163
+ // } else {
164
+ $popups = dispatcherPps::applyFilters('popupListFilterBeforeRender', $this->_beforeRender( $this->getModel()->addWhere( $condition )->getFromTbl() ));
165
+ // }
166
+ if(!empty($popups)) {
167
  $popups = dispatcherPps::applyFilters('popupListBeforeRender', $popups);
168
  $this->renderList( $popups );
169
  }
220
  $postType = get_post_type();
221
  }
222
  $hideShowRevert = isset($p['params']['main']['hide_for_post_types_show']) && (int) $p['params']['main']['hide_for_post_types_show'];
223
+ if(isset($wp_query->posts)
224
+ && is_array($wp_query->posts)
225
+ && ((!$hideShowRevert && count($wp_query->posts) === 1 && in_array($postType, $p['params']['main']['hide_for_post_types']))
226
+ || ($hideShowRevert && (!in_array($postType, $p['params']['main']['hide_for_post_types']) || count($wp_query->posts) !== 1))
227
+ )) {
228
  unset($popups[ $i ]);
229
  $dataRemoved = true;
230
  }
236
  unset($popups[ $i ]);
237
  $dataRemoved = true;
238
  }
239
+ if(isset($p['params']['main']['show_for_logged_in'])
240
+ && !empty($p['params']['main']['show_for_logged_in'])
241
+ && !$isUserLoggedIn
242
+ ) { // Check if we need to hide it from logged-in users
243
+ unset($popups[ $i ]);
244
+ $dataRemoved = true;
245
+ }
246
  if(isset($p['params']['main']['hide_for_ips'])
247
  && !empty($p['params']['main']['hide_for_ips'])
248
  ) { // Check if we need to hide it for IPs
343
  if(!isset($p['params']['tpl']['anim_duration']) || $p['params']['tpl']['anim_duration'] <= 0) {
344
  $popups[ $i ]['params']['tpl']['anim_duration'] = 1000; // 1 second by default
345
  }
346
+ if(isset($p['params']['tpl']['anim_close_key']) && !empty($p['params']['tpl']['anim_close_key']) && $p['params']['tpl']['anim_close_key'] != 'none') {
347
+ $popups[ $i ]['params']['tpl']['anim_close'] = $this->getView()->getAnimationByKey( $p['params']['tpl']['anim_close_key'] );
348
+ }
349
+ if(isset($p['params']['tpl']['anim_close_duration']) && !empty($p['params']['tpl']['anim_close_duration'])) {
350
+ $popups[ $i ]['params']['tpl']['anim_close_duration'] = (float) $p['params']['tpl']['anim_close_duration'];
351
+ }
352
  $popups[ $i ]['rendered_html'] = $this->getView()->generateHtml( $p, array('replace_style_tag' => true) );
353
  // Unset those parameters - make data lighter
354
  unset($popups[ $i ]['css']);
modules/popup/models/popup.php CHANGED
@@ -376,6 +376,7 @@ class popupModelPps extends modelPps {
376
  'for_countries' => array('id' => 3),
377
  'until_make_action' => array('id' => 4),
378
  'count_times' => array('id' => 5),
 
379
  );
380
  }
381
  return $this->_showToList;
@@ -409,7 +410,7 @@ class popupModelPps extends modelPps {
409
  'adblock_detected' => array('id' => 12),
410
  ));
411
  }
412
- return $this->_showPagesList;
413
  }
414
  public function getShowOnIdByKey($key) {
415
  $this->getShowOnList();
376
  'for_countries' => array('id' => 3),
377
  'until_make_action' => array('id' => 4),
378
  'count_times' => array('id' => 5),
379
+ 'until_email_confirm' => array('id' => 6),
380
  );
381
  }
382
  return $this->_showToList;
410
  'adblock_detected' => array('id' => 12),
411
  ));
412
  }
413
+ return $this->_showOnList;
414
  }
415
  public function getShowOnIdByKey($key) {
416
  $this->getShowOnList();
modules/popup/views/popup.php CHANGED
@@ -639,6 +639,14 @@ class popupViewPps extends viewPps {
639
  private function _generateVideoHtml($popup) {
640
  $res = '';
641
  if(isset($popup['params']['tpl']['video_url']) && !empty($popup['params']['tpl']['video_url'])) {
 
 
 
 
 
 
 
 
642
 
643
  $attrs = array();
644
  if(isset($popup['params']['opts_attrs']['video_width_as_popup']) && $popup['params']['opts_attrs']['video_width_as_popup']) {
@@ -662,6 +670,7 @@ class popupViewPps extends viewPps {
662
  }
663
  add_filter('oembed_result', array($this, 'modifyEmbRes'), 10, 3);
664
  $res = wp_oembed_get($popup['params']['tpl']['video_url'], $attrs);
 
665
  // Try to load self-hosted video
666
  if(empty($res) && strpos($popup['params']['tpl']['video_url'], PPS_SITE_URL) === 0) {
667
  $res = $this->_generateSelfHostedVideo($popup['params']['tpl']['video_url'], $attrs);
639
  private function _generateVideoHtml($popup) {
640
  $res = '';
641
  if(isset($popup['params']['tpl']['video_url']) && !empty($popup['params']['tpl']['video_url'])) {
642
+ //wordpress wp_oembed_get can't work with youtube embed url
643
+ //simple replace embed url to watch url
644
+ if (strpos($popup['params']['tpl']['video_url'], 'www.youtube.com/embed/') !== false) {
645
+ preg_match("/^(?:http(?:s)?:\/\/)?(?:www\.)?(?:m\.)?(?:youtu\.be\/|youtube\.com\/(?:(?:watch)?\?(?:.*&)?v(?:i)?=|(?:embed|v|vi|user)\/))([^\?&\"'>]+)/", $popup['params']['tpl']['video_url'], $matches);
646
+ if($matches['1']){
647
+ $popup['params']['tpl']['video_url'] = 'https://www.youtube.com/watch?v=' . $matches['1'];
648
+ }
649
+ }
650
 
651
  $attrs = array();
652
  if(isset($popup['params']['opts_attrs']['video_width_as_popup']) && $popup['params']['opts_attrs']['video_width_as_popup']) {
670
  }
671
  add_filter('oembed_result', array($this, 'modifyEmbRes'), 10, 3);
672
  $res = wp_oembed_get($popup['params']['tpl']['video_url'], $attrs);
673
+
674
  // Try to load self-hosted video
675
  if(empty($res) && strpos($popup['params']['tpl']['video_url'], PPS_SITE_URL) === 0) {
676
  $res = $this->_generateSelfHostedVideo($popup['params']['tpl']['video_url'], $attrs);
modules/popup/views/tpl/popupEditAdminAnimationOpts.php CHANGED
@@ -1,8 +1,11 @@
1
- <span class="ppsOptLabel">
2
  <?php _e('Choose PopUp animation style', PPS_LANG_CODE)?>,
3
  <?php _e('current style', PPS_LANG_CODE)?>:
4
  <span id="ppsPopupAnimCurrStyle"></span>
5
  </span>
 
 
 
6
  <hr /><div style="clear: both;"></div>
7
  <div class="ppsPopupOptRow">
8
  <div id="ppsPopupAnimOptsShell">
@@ -24,11 +27,23 @@
24
  <div style="clear: both;"></div>
25
  </div>
26
  <?php echo htmlPps::hidden('params[tpl][anim_key]', array('value' => $this->popup['params']['tpl']['anim_key']))?>
 
 
 
27
  </div>
28
- <div class="ppsPopupOptRow">
29
  <label>
30
  <?php _e('Animation Duration', PPS_LANG_CODE)?>:
31
  <?php echo htmlPps::text('params[tpl][anim_duration]', array('value' => $this->popup['params']['tpl']['anim_duration']))?>
32
  <?php _e('miliseconds', PPS_LANG_CODE)?>
33
  </label>
 
 
 
 
 
 
 
 
 
34
  </div>
1
+ <span class="ppsOptLabel" style="display: inline; line-height: 30px;">
2
  <?php _e('Choose PopUp animation style', PPS_LANG_CODE)?>,
3
  <?php _e('current style', PPS_LANG_CODE)?>:
4
  <span id="ppsPopupAnimCurrStyle"></span>
5
  </span>
6
+ <a href="#" class="button" id="ppsOpenCloseAnimSwitchBtn"
7
+ data-txt-close="<?php _e('Select Close Animation')?>"
8
+ data-txt-open="<?php _e('Select Open Animation')?>"></a>
9
  <hr /><div style="clear: both;"></div>
10
  <div class="ppsPopupOptRow">
11
  <div id="ppsPopupAnimOptsShell">
27
  <div style="clear: both;"></div>
28
  </div>
29
  <?php echo htmlPps::hidden('params[tpl][anim_key]', array('value' => $this->popup['params']['tpl']['anim_key']))?>
30
+ <?php echo htmlPps::hidden('params[tpl][anim_close_key]', array('value' => isset($this->popup['params']['tpl']['anim_close_key'])
31
+ ? $this->popup['params']['tpl']['anim_close_key']
32
+ : ''))?>
33
  </div>
34
+ <div class="ppsPopupOptRow ppsAnimOpenRow">
35
  <label>
36
  <?php _e('Animation Duration', PPS_LANG_CODE)?>:
37
  <?php echo htmlPps::text('params[tpl][anim_duration]', array('value' => $this->popup['params']['tpl']['anim_duration']))?>
38
  <?php _e('miliseconds', PPS_LANG_CODE)?>
39
  </label>
40
+ </div>
41
+ <div class="ppsPopupOptRow ppsAnimCloseRow">
42
+ <label>
43
+ <?php _e('Close Animation Duration', PPS_LANG_CODE)?>:
44
+ <?php echo htmlPps::text('params[tpl][anim_close_duration]', array('value' => isset($this->popup['params']['tpl']['anim_close_duration'])
45
+ ? $this->popup['params']['tpl']['anim_close_duration']
46
+ : ''))?>
47
+ <?php _e('miliseconds', PPS_LANG_CODE)?>
48
+ </label>
49
  </div>
modules/popup/views/tpl/popupEditAdminDesignOpts.php CHANGED
@@ -104,17 +104,17 @@
104
  ))?>
105
  </td>
106
  </tr>
107
- <tr>
108
  <th scope="row" class="col-w-1perc">
109
  <?php _e('Ignore related videos', PPS_LANG_CODE)?>&nbsp;
110
- <i class="fa fa-question supsystic-tooltip" title="<?php esc_html(sprintf(__('In the end there are list of related videos by default, but you can disable this feature using this option. For vimeo videos - you need to change this in your vide settings, check <a href="%s" target="_blank">this FAQ</a>.', PPS_LANG_CODE), 'https://vimeo.com/help/faq/sharing-videos/embedding-videos'))?>"></i>
111
  </th>
112
  <td class="col-w-1perc">
113
  <?php echo htmlPps::checkbox('params[tpl][video_hide_rel]', array(
114
  'checked' => htmlPps::checkedOpt($this->popup['params']['tpl'], 'video_hide_rel')
115
  ))?>
116
  </td>
117
- </tr>
118
  <?php }?>
119
  <?php if(in_array($this->popup['type'], array(PPS_FB_LIKE))) {?>
120
  <?php foreach($this->fbLikeOpts as $fKey => $fData) { ?>
104
  ))?>
105
  </td>
106
  </tr>
107
+ <?php /*<tr>
108
  <th scope="row" class="col-w-1perc">
109
  <?php _e('Ignore related videos', PPS_LANG_CODE)?>&nbsp;
110
+ <i class="fa fa-question supsystic-tooltip" title="<?php echo esc_html(sprintf(__('In the end there are list of related videos by default, but you can disable this feature using this option. For vimeo videos - you need to change this in your vide settings, check <a href="%s" target="_blank">this FAQ</a>.', PPS_LANG_CODE), 'https://vimeo.com/help/faq/sharing-videos/embedding-videos'))?>"></i>
111
  </th>
112
  <td class="col-w-1perc">
113
  <?php echo htmlPps::checkbox('params[tpl][video_hide_rel]', array(
114
  'checked' => htmlPps::checkedOpt($this->popup['params']['tpl'], 'video_hide_rel')
115
  ))?>
116
  </td>
117
+ </tr>*/ ?>
118
  <?php }?>
119
  <?php if(in_array($this->popup['type'], array(PPS_FB_LIKE))) {?>
120
  <?php foreach($this->fbLikeOpts as $fKey => $fData) { ?>
modules/popup/views/tpl/popupEditAdminMainOpts.php CHANGED
@@ -504,6 +504,16 @@
504
  'attrs' => 'class="chosen" data-chosen-width="80px"'
505
  ))?>
506
  </div><br />
 
 
 
 
 
 
 
 
 
 
507
  <label class="ppsPopupMainOptLbl" id="ppsHideForDevicesLabel">
508
  <span class="supsystic-tooltip" title="<?php echo esc_html(__('Click to revert feature function: from Hide - to Show, and vice versa.', PPS_LANG_CODE))?>">
509
  <a href="#" class="ppsSwitchShowHideOptLink" data-input-value="0" data-input-name="params[main][hide_for_devices_show]"><?php _e('Hide', PPS_LANG_CODE)?></a>/<a href="#" class="ppsSwitchShowHideOptLink" data-input-value="1" data-input-name="params[main][hide_for_devices_show]"><?php _e('Show Only', PPS_LANG_CODE)?></a>
@@ -642,6 +652,11 @@
642
  'checked' => htmlPps::checkedOpt($this->popup['params']['main'], 'hide_for_logged_in')))?>
643
  <?php _e('Hide for Logged-in', PPS_LANG_CODE)?>
644
  </label><br />
 
 
 
 
 
645
  </section>
646
  <div id="ppsHideForIpWnd" style="display: none;" title="<?php _e('IPs List', PPS_LANG_CODE)?>">
647
  <label>
504
  'attrs' => 'class="chosen" data-chosen-width="80px"'
505
  ))?>
506
  </div><br />
507
+ <label class="supsystic-tooltip-left ppsPopupMainOptLbl" data-name="Until user confirm email" title="<?php _e('Only after user will confirm email address - PopUp will disappear (for WordPress subscription for now).')?>">
508
+ <?php echo htmlPps::radiobutton('params[main][show_to]', array(
509
+ 'value' => 'until_email_confirm',
510
+ 'attrs' => 'class="ppsProOpt"',
511
+ 'checked' => htmlPps::checkedOpt($this->popup['params']['main'], 'show_to', 'until_email_confirm')))?>
512
+ <?php _e('Until user confirm email', PPS_LANG_CODE)?>
513
+ <?php if(!$this->isPro) {?>
514
+ <span class="ppsProOptMiniLabel"><a target="_blank" href="<?php echo framePps::_()->getModule('supsystic_promo')->generateMainLink('utm_source=plugin&utm_medium=show_to_until_email_confirm&utm_campaign=popup');?>"><?php _e('PRO option', PPS_LANG_CODE)?></a></span>
515
+ <?php } ?>
516
+ </label><br />
517
  <label class="ppsPopupMainOptLbl" id="ppsHideForDevicesLabel">
518
  <span class="supsystic-tooltip" title="<?php echo esc_html(__('Click to revert feature function: from Hide - to Show, and vice versa.', PPS_LANG_CODE))?>">
519
  <a href="#" class="ppsSwitchShowHideOptLink" data-input-value="0" data-input-name="params[main][hide_for_devices_show]"><?php _e('Hide', PPS_LANG_CODE)?></a>/<a href="#" class="ppsSwitchShowHideOptLink" data-input-value="1" data-input-name="params[main][hide_for_devices_show]"><?php _e('Show Only', PPS_LANG_CODE)?></a>
652
  'checked' => htmlPps::checkedOpt($this->popup['params']['main'], 'hide_for_logged_in')))?>
653
  <?php _e('Hide for Logged-in', PPS_LANG_CODE)?>
654
  </label><br />
655
+ <label class="supsystic-tooltip-left ppsPopupMainOptLbl" title="<?php _e('Show PopUp only for Logged-in users and hide it for not Logged-in site visitors.', PPS_LANG_CODE)?>" style="">
656
+ <?php echo htmlPps::checkbox('params[main][show_for_logged_in]', array(
657
+ 'checked' => htmlPps::checkedOpt($this->popup['params']['main'], 'show_for_logged_in')))?>
658
+ <?php _e('Show Only for Logged-in', PPS_LANG_CODE)?>
659
+ </label><br />
660
  </section>
661
  <div id="ppsHideForIpWnd" style="display: none;" title="<?php _e('IPs List', PPS_LANG_CODE)?>">
662
  <label>
modules/popup/views/tpl/popupEditAdminSubOpts.php CHANGED
@@ -41,6 +41,16 @@
41
  'checked' => htmlPps::checkedOpt($this->popup['params']['tpl'], 'sub_ignore_confirm')))?>
42
  </td>
43
  </tr>
 
 
 
 
 
 
 
 
 
 
44
  <tr class="ppsPopupSubDestOpts ppsPopupSubDestOpts_wordpress">
45
  <th scope="row">
46
  <?php _e('Export Subscribers', PPS_LANG_CODE)?>
41
  'checked' => htmlPps::checkedOpt($this->popup['params']['tpl'], 'sub_ignore_confirm')))?>
42
  </td>
43
  </tr>
44
+ <tr class="ppsPopupSubDestOpts ppsPopupSubDestOpts_wordpress">
45
+ <th scope="row">
46
+ <?php _e('Confirmation page reload time', PPS_LANG_CODE)?>
47
+ <i class="fa fa-question supsystic-tooltip" title="<?php _e('Time that require to Confirm page to be realoaded and redirect user to your site, in seconds. Usually - 10 seconds.', PPS_LANG_CODE)?>"></i>
48
+ </th>
49
+ <td>
50
+ <?php echo htmlPps::text('params[tpl][sub_confirm_reload_time]', array(
51
+ 'value' => isset($this->popup['params']['tpl']['sub_confirm_reload_time']) ? $this->popup['params']['tpl']['sub_confirm_reload_time'] : 10))?>(sec)
52
+ </td>
53
+ </tr>
54
  <tr class="ppsPopupSubDestOpts ppsPopupSubDestOpts_wordpress">
55
  <th scope="row">
56
  <?php _e('Export Subscribers', PPS_LANG_CODE)?>
modules/subscribe/controller.php CHANGED
@@ -4,9 +4,11 @@ class subscribeControllerPps extends controllerPps {
4
  $res = new responsePps();
5
  $data = reqPps::get('post');
6
  $id = isset($data['id']) ? (int) $data['id'] : 0;
7
- $nonce = isset($_REQUEST['_wpnonce']) ? $_REQUEST['_wpnonce'] : reqPps::getVar('_wpnonce');
8
- if(!wp_verify_nonce($nonce, 'subscribe-'. $id)) {
9
- die('Some error with your request.........');
 
 
10
  }
11
  if($this->getModel()->subscribe(reqPps::get('post'), true)) {
12
  $dest = $this->getModel()->getDest();
@@ -50,7 +52,8 @@ class subscribeControllerPps extends controllerPps {
50
  && !empty($lastPopup['params']['tpl']['sub_redirect_email_exists'])
51
  && $this->getModel()->getEmailExists()
52
  ) {
53
- $res->addData('emailExistsRedirect', uriPps::normal($lastPopup['params']['tpl']['sub_redirect_email_exists']));
 
54
  }
55
  $res->pushError ($this->getModel()->getErrors());
56
  }
@@ -71,14 +74,29 @@ class subscribeControllerPps extends controllerPps {
71
  }
72
  return $res->ajaxExec();
73
  }
 
 
 
74
  public function confirm() {
75
  $res = new responsePps();
76
  $forReg = (int) reqPps::getVar('for_reg', 'get');
77
- if(!$this->getModel()->confirm(reqPps::get('get'), $forReg)) {
 
78
  $res->pushError ($this->getModel()->getErrors());
 
79
  }
 
80
  $lastPopup = $this->getModel()->getLastPopup();
81
- $this->getView()->displaySuccessPage($lastPopup, $res, $forReg);
 
 
 
 
 
 
 
 
 
82
  exit();
83
  // Just simple redirect for now
84
  //$siteUrl = get_bloginfo('wpurl');
4
  $res = new responsePps();
5
  $data = reqPps::get('post');
6
  $id = isset($data['id']) ? (int) $data['id'] : 0;
7
+ if((int)framePps::_()->getModule('options')->get('enable_spam_filter')) {
8
+ $nonce = isset($_REQUEST['_wpnonce']) ? $_REQUEST['_wpnonce'] : reqPps::getVar('_wpnonce');
9
+ if(!wp_verify_nonce($nonce, 'subscribe-'. $id)) {
10
+ die('Some error with your request.........');
11
+ }
12
  }
13
  if($this->getModel()->subscribe(reqPps::get('post'), true)) {
14
  $dest = $this->getModel()->getDest();
52
  && !empty($lastPopup['params']['tpl']['sub_redirect_email_exists'])
53
  && $this->getModel()->getEmailExists()
54
  ) {
55
+ $this->_setConfirmedCookie($lastPopup['id']);
56
+ $res->addData('emailExistsRedirect', $lastPopup['params']['tpl']['sub_redirect_email_exists']);
57
  }
58
  $res->pushError ($this->getModel()->getErrors());
59
  }
74
  }
75
  return $res->ajaxExec();
76
  }
77
+ private function _setConfirmedCookie($popupId) {
78
+ reqPps::setVar('pps_email_confirmed_'. $popupId, '1', 'cookie', array('expire' => 999 * 24 * 60 * 60));
79
+ }
80
  public function confirm() {
81
  $res = new responsePps();
82
  $forReg = (int) reqPps::getVar('for_reg', 'get');
83
+ $haveErrors = false;
84
+ if(($userId = $this->getModel()->confirm(reqPps::get('get'), $forReg)) === false) {
85
  $res->pushError ($this->getModel()->getErrors());
86
+ $haveErrors = true;
87
  }
88
+
89
  $lastPopup = $this->getModel()->getLastPopup();
90
+ $subscribedUrl = '';
91
+ if(!$haveErrors) {
92
+ //reqPps::setVar('pps_email_confirmed_'. $lastPopup['id'], '1', 'cookie', array('expire' => 999 * 24 * 60 * 60));
93
+ $this->_setConfirmedCookie($lastPopup['id']);
94
+ $subscribedUrl = get_user_meta($userId, '_subscribe_url', true);
95
+ if(strpos($subscribedUrl, $_SERVER['HTTP_HOST']) === false) {
96
+ $subscribedUrl = '';
97
+ }
98
+ }
99
+ $this->getView()->displaySuccessPage($lastPopup, $res, $forReg, $subscribedUrl);
100
  exit();
101
  // Just simple redirect for now
102
  //$siteUrl = get_bloginfo('wpurl');
modules/subscribe/js/admin.subscribe.js CHANGED
@@ -5,7 +5,7 @@ jQuery(document).ready(function(){
5
  var selectedSubMethod = jQuery(this).val();
6
  jQuery('.ppsPopupSubDestOpts:visible').slideUp( g_ppsAnimationSpeed );
7
  var selectedShell = jQuery('.ppsPopupSubDestOpts_'+ selectedSubMethod);
8
- if(selectedShell && selectedShell.size()) {
9
  selectedShell.slideDown( g_ppsAnimationSpeed );
10
  }
11
  if(toeInArray(selectedSubMethod, ['aweber']) === -1) { // For aweber we use simple post send to aweber side method - so all messages is generated by aweber
5
  var selectedSubMethod = jQuery(this).val();
6
  jQuery('.ppsPopupSubDestOpts:visible').slideUp( g_ppsAnimationSpeed );
7
  var selectedShell = jQuery('.ppsPopupSubDestOpts_'+ selectedSubMethod);
8
+ if(selectedShell && selectedShell.length) {
9
  selectedShell.slideDown( g_ppsAnimationSpeed );
10
  }
11
  if(toeInArray(selectedSubMethod, ['aweber']) === -1) { // For aweber we use simple post send to aweber side method - so all messages is generated by aweber
modules/subscribe/mod.php CHANGED
@@ -68,7 +68,7 @@ class subscribePps extends modulePps {
68
  return '<script type="text/javascript">'
69
  . 'jQuery(function(){ '
70
  . 'var $originalBtns = jQuery("#'. $popup['view_html_id']. '").find(".ppsLoginForm input[type=submit]:not(.ppsPopupClose)");'
71
- . 'if(!$originalBtns || !$originalBtns.size()) {'
72
  . '$originalBtns = jQuery("#'. $popup['view_html_id']. '").find(".ppsRegForm input[type=submit]:not(.ppsPopupClose)");'
73
  . '}'
74
  . 'var $btns = $originalBtns.clone();'
68
  return '<script type="text/javascript">'
69
  . 'jQuery(function(){ '
70
  . 'var $originalBtns = jQuery("#'. $popup['view_html_id']. '").find(".ppsLoginForm input[type=submit]:not(.ppsPopupClose)");'
71
+ . 'if(!$originalBtns || !$originalBtns.length) {'
72
  . '$originalBtns = jQuery("#'. $popup['view_html_id']. '").find(".ppsRegForm input[type=submit]:not(.ppsPopupClose)");'
73
  . '}'
74
  . 'var $btns = $originalBtns.clone();'
modules/subscribe/models/subscribe.php CHANGED
@@ -295,6 +295,7 @@ class subscribeModelPps extends modelPps {
295
  $username = $this->_getUsernameFromEmail($email, $username);
296
  $ignoreConfirm = (isset($popup['params']['tpl'][$pref. '_ignore_confirm']) && $popup['params']['tpl'][$pref. '_ignore_confirm']) || $forceIgnoreConfirm;
297
  $confirmHash = md5($email. NONCE_KEY);
 
298
  $saveData = array(
299
  'username' => $username,
300
  'email' => $email,
@@ -378,8 +379,12 @@ class subscribeModelPps extends modelPps {
378
  }
379
  }
380
  }
 
 
 
 
381
  $this->_sendNewUserNotification($popup, $userId, $password, $d, $forReg);
382
- return true;
383
  } else {
384
  $defaultErrorMsg = $forReg ? __('Can\'t registrate for now. Please try again later.', PPS_LANG_CODE) : __('Can\'t subscribe for now. Please try again later.', PPS_LANG_CODE);
385
  $this->pushError (is_wp_error($userId) ? $userId->get_error_message() : $defaultErrorMsg);
295
  $username = $this->_getUsernameFromEmail($email, $username);
296
  $ignoreConfirm = (isset($popup['params']['tpl'][$pref. '_ignore_confirm']) && $popup['params']['tpl'][$pref. '_ignore_confirm']) || $forceIgnoreConfirm;
297
  $confirmHash = md5($email. NONCE_KEY);
298
+ $d['_subscribe_url'] = dbPps::prepareHtmlIn(reqPps::getVar('HTTP_REFERER', 'server'));
299
  $saveData = array(
300
  'username' => $username,
301
  'email' => $email,
379
  }
380
  }
381
  }
382
+
383
+ if(isset($d['_subscribe_url']) && !empty($d['_subscribe_url'])) {
384
+ update_user_meta($userId, '_subscribe_url', $d['_subscribe_url']);
385
+ }
386
  $this->_sendNewUserNotification($popup, $userId, $password, $d, $forReg);
387
+ return $userId;
388
  } else {
389
  $defaultErrorMsg = $forReg ? __('Can\'t registrate for now. Please try again later.', PPS_LANG_CODE) : __('Can\'t subscribe for now. Please try again later.', PPS_LANG_CODE);
390
  $this->pushError (is_wp_error($userId) ? $userId->get_error_message() : $defaultErrorMsg);
modules/subscribe/views/subscribe.php CHANGED
@@ -63,6 +63,7 @@ class subscribeViewPps extends viewPps {
63
  $res .= htmlPps::hidden('mod', array('value' => 'subscribe'));
64
  $res .= htmlPps::hidden('action', array('value' => 'subscribe'));
65
  $res .= htmlPps::hidden('id', array('value' => $popup['id']));
 
66
  $res .= htmlPps::hidden('_wpnonce', array('value' => wp_create_nonce('subscribe-'. $popup['id'])));
67
  if(!in_array($popup['original_id'], array(31))) { // For those templates - put message up to the form
68
  $res .= '<div class="ppsSubMsg"></div>';
@@ -82,10 +83,11 @@ class subscribeViewPps extends viewPps {
82
  public function generateFormEndCommon($popup) {
83
  return $this->_generateFormEndCommon($popup);
84
  }
85
- public function displaySuccessPage($popup, $res, $forReg = false) {
86
  $this->assign('popup', $popup);
87
  $this->assign('res', $res);
88
  $this->assign('forReg', $forReg);
 
89
  parent::display('subSuccessPage');
90
  }
91
  }
63
  $res .= htmlPps::hidden('mod', array('value' => 'subscribe'));
64
  $res .= htmlPps::hidden('action', array('value' => 'subscribe'));
65
  $res .= htmlPps::hidden('id', array('value' => $popup['id']));
66
+ //$res .= htmlPps::hidden('from_url', array('value' => uriPps::getFullUrl()));
67
  $res .= htmlPps::hidden('_wpnonce', array('value' => wp_create_nonce('subscribe-'. $popup['id'])));
68
  if(!in_array($popup['original_id'], array(31))) { // For those templates - put message up to the form
69
  $res .= '<div class="ppsSubMsg"></div>';
83
  public function generateFormEndCommon($popup) {
84
  return $this->_generateFormEndCommon($popup);
85
  }
86
+ public function displaySuccessPage($popup, $res, $forReg = false, $subscribedUrl = '') {
87
  $this->assign('popup', $popup);
88
  $this->assign('res', $res);
89
  $this->assign('forReg', $forReg);
90
+ $this->assign('redirectUrl', $subscribedUrl);
91
  parent::display('subSuccessPage');
92
  }
93
  }
modules/subscribe/views/tpl/subSuccessPage.php CHANGED
@@ -65,11 +65,22 @@
65
  $successMessage = $this->popup && isset($this->popup['params']['tpl'][$pref. '_txt_success'])
66
  ? $this->popup['params']['tpl'][$pref. '_txt_success']
67
  : $defaultSuccessMsg;
68
- $redirectUrl = isset($this->popup['params']['tpl'][$pref. '_redirect_url']) && !empty($this->popup['params']['tpl'][$pref. '_redirect_url'])
69
- ? $this->popup['params']['tpl'][$pref. '_redirect_url']
70
- : get_bloginfo('wpurl');
 
 
 
 
 
 
71
  $redirectUrl = uriPps::normal( $redirectUrl );
72
  $autoRedirectTime = 10;
 
 
 
 
 
73
  ?>
74
  <h1 class="ppsConfirmTitle"><?php echo ($this->forReg
75
  ? __('Registration confirmed', PPS_LANG_CODE)
65
  $successMessage = $this->popup && isset($this->popup['params']['tpl'][$pref. '_txt_success'])
66
  ? $this->popup['params']['tpl'][$pref. '_txt_success']
67
  : $defaultSuccessMsg;
68
+ if(isset($this->popup['params']['tpl'][$pref. '_redirect_url'])
69
+ && !empty($this->popup['params']['tpl'][$pref. '_redirect_url'])
70
+ ) {
71
+ $redirectUrl = $this->popup['params']['tpl'][$pref. '_redirect_url'];
72
+ } elseif(!empty($this->redirectUrl)) {
73
+ $redirectUrl = $this->redirectUrl;
74
+ } else {
75
+ $redirectUrl = get_bloginfo('wpurl');
76
+ }
77
  $redirectUrl = uriPps::normal( $redirectUrl );
78
  $autoRedirectTime = 10;
79
+ if(isset($this->popup['params']['tpl']['sub_confirm_reload_time'])
80
+ && !empty($this->popup['params']['tpl']['sub_confirm_reload_time'])
81
+ ) {
82
+ $autoRedirectTime = (int) $this->popup['params']['tpl']['sub_confirm_reload_time'];
83
+ }
84
  ?>
85
  <h1 class="ppsConfirmTitle"><?php echo ($this->forReg
86
  ? __('Registration confirmed', PPS_LANG_CODE)
modules/supsystic_promo/js/admin.item.edit.stats.js CHANGED
@@ -17,7 +17,7 @@ jQuery(document).ready(function(){
17
  };
18
  var $manTabsNav = jQuery('#ppsPopupEditTabs .ppsMainTabsNav');
19
  var getTabName = function( $tab ) {
20
- if($tab && $tab.size()) {
21
  var href = $tab.attr('href')
22
  , name = '';
23
  if(href) {
@@ -92,10 +92,10 @@ function _ppsBigDataMainOpt( inpName, label ) {
92
  }
93
  function __ppsBigDataOptToLabel( $opt ) {
94
  var $label = $opt.parents('label:first');
95
- if(!$label || !$label.size()) {
96
  $label = $opt.parents('.ppsPopupMainOptLbl:first');
97
  }
98
- if($label && $label.size()) {
99
  var optName = $label.data('name');
100
  if(!optName) {
101
  optName = $label.text();
17
  };
18
  var $manTabsNav = jQuery('#ppsPopupEditTabs .ppsMainTabsNav');
19
  var getTabName = function( $tab ) {
20
+ if($tab && $tab.length) {
21
  var href = $tab.attr('href')
22
  , name = '';
23
  if(href) {
92
  }
93
  function __ppsBigDataOptToLabel( $opt ) {
94
  var $label = $opt.parents('label:first');
95
+ if(!$label || !$label.length) {
96
  $label = $opt.parents('.ppsPopupMainOptLbl:first');
97
  }
98
+ if($label && $label.length) {
99
  var optName = $label.data('name');
100
  if(!optName) {
101
  optName = $label.text();
modules/supsystic_promo/js/admin.plugins.js CHANGED
@@ -1,6 +1,6 @@
1
  jQuery(document).ready(function(){
2
  var $deactivateLnk = jQuery('#the-list tr[data-slug="'+ ppsPluginsData.plugSlug+ '"] .row-actions .deactivate a');
3
- if($deactivateLnk && $deactivateLnk.size()) {
4
  var $deactivateForm = jQuery('#ppsDeactivateForm');
5
  var $deactivateWnd = jQuery('#ppsDeactivateWnd').dialog({
6
  modal: true
@@ -40,7 +40,7 @@ jQuery(document).ready(function(){
40
  jQuery('.ppsDeactivateDescShell').slideUp( g_ppsAnimationSpeed );
41
  if(jQuery(this).prop('checked')) {
42
  var $descShell = jQuery(this).parents('.ppsDeactivateReasonShell:first').find('.ppsDeactivateDescShell');
43
- if($descShell && $descShell.size()) {
44
  $descShell.slideDown( g_ppsAnimationSpeed );
45
  }
46
  }
1
  jQuery(document).ready(function(){
2
  var $deactivateLnk = jQuery('#the-list tr[data-slug="'+ ppsPluginsData.plugSlug+ '"] .row-actions .deactivate a');
3
+ if($deactivateLnk && $deactivateLnk.length) {
4
  var $deactivateForm = jQuery('#ppsDeactivateForm');
5
  var $deactivateWnd = jQuery('#ppsDeactivateWnd').dialog({
6
  modal: true
40
  jQuery('.ppsDeactivateDescShell').slideUp( g_ppsAnimationSpeed );
41
  if(jQuery(this).prop('checked')) {
42
  var $descShell = jQuery(this).parents('.ppsDeactivateReasonShell:first').find('.ppsDeactivateDescShell');
43
+ if($descShell && $descShell.length) {
44
  $descShell.slideDown( g_ppsAnimationSpeed );
45
  }
46
  }
modules/supsystic_promo/js/admin.tour.js CHANGED
@@ -70,7 +70,7 @@ function _ppsOpenPointer(tourId, pointId) {
70
  , $closeBtn = $btnsShell.find('.close')
71
  , $finishBtn = $btnsShell.find('.supsystic-tour-finish-btn');
72
 
73
- if($finishBtn && $finishBtn.size()) {
74
  $finishBtn.click(function(e){
75
  e.preventDefault();
76
  jQuery.sendFormPps({
@@ -80,7 +80,7 @@ function _ppsOpenPointer(tourId, pointId) {
80
  g_ppsCurrTour.element.pointer('close');
81
  });
82
  }
83
- if($closeBtn && $closeBtn.size()) {
84
  $closeBtn.bind( 'click.pointer', function(e) {
85
  e.preventDefault();
86
  jQuery.sendFormPps({
70
  , $closeBtn = $btnsShell.find('.close')
71
  , $finishBtn = $btnsShell.find('.supsystic-tour-finish-btn');
72
 
73
+ if($finishBtn && $finishBtn.length) {
74
  $finishBtn.click(function(e){
75
  e.preventDefault();
76
  jQuery.sendFormPps({
80
  g_ppsCurrTour.element.pointer('close');
81
  });
82
  }
83
+ if($closeBtn && $closeBtn.length) {
84
  $closeBtn.bind( 'click.pointer', function(e) {
85
  e.preventDefault();
86
  jQuery.sendFormPps({
modules/supsystic_promo/views/tpl/layeredStylePromo.php CHANGED
@@ -9,7 +9,7 @@
9
  </a>
10
  <a target="_blank" class="button" style="margin-top: -8px;" href="<?php echo $this->promoLink?>"><?php _e('Available in PRO', PPS_LANG_CODE)?></a>
11
  </label>
12
- <div class="description"><?php _e('By default all PopUps have modal style: it appears on user screen over the whole site. Layered style allows you to show your PopUp - on selected position: top, bottom, etc. and not over your site - but right near your content.', PPS_LANG_CODE)?></div>
13
  </div>
14
  <span>
15
  <div class="ppsPopupOptRow">
9
  </a>
10
  <a target="_blank" class="button" style="margin-top: -8px;" href="<?php echo $this->promoLink?>"><?php _e('Available in PRO', PPS_LANG_CODE)?></a>
11
  </label>
12
+ <div class="description"><?php _e('By default all PopUps have modal style: it appears on user screen over the whole site. Layered style allows you to show your PopUp - on selected position: top, bottom, etc. and not over your site - but right near your content.', PPS_LANG_CODE)?><?php _e('Notice: If you enable Layered style - background overlay for popup will not be displayed on frontend.', PPS_LANG_CODE)?></div>
13
  </div>
14
  <span>
15
  <div class="ppsPopupOptRow">
pps.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Popup by Supsystic
4
  * Plugin URI: https://supsystic.com/plugins/popup-plugin/
5
  * Description: The Best WordPress popup plugin to help you gain more subscribers, social followers or advertisement. Responsive popups with friendly options
6
- * Version: 1.9.38
7
  * Author: supsystic.com
8
  * Author URI: https://supsystic.com
9
  **/
3
  * Plugin Name: Popup by Supsystic
4
  * Plugin URI: https://supsystic.com/plugins/popup-plugin/
5
  * Description: The Best WordPress popup plugin to help you gain more subscribers, social followers or advertisement. Responsive popups with friendly options
6
+ * Version: 1.9.44
7
  * Author: supsystic.com
8
  * Author URI: https://supsystic.com
9
  **/
readme.txt CHANGED
@@ -1,19 +1,19 @@
1
- === Popup by Supsystic ===
2
  Contributors: supsystic.com
3
  Donate link: https://supsystic.com/plugins/popup-plugin
4
  Tags: popup, popup WordPress plugin, marketing, popover, pop-up, popup builder, social popup, facebook popup, popup builder, popup maker
5
- Tested up to: 4.9.8
6
- Stable tag: 1.9.38
7
 
8
  Create elegant popup easily with Popup Builder by Supsystic. Popup with Subscription Forms, Facebook popup, Optin and Social locks, Contact Forms etc.
9
 
10
  == Description ==
11
 
12
- [Popup plugin by Supsystic](https://supsystic.com/plugins/popup-plugin?utm_source=wordpress&utm_medium=description&utm_campaign=popup "Popup WordPress Plugin") with Popup Builder helps you get newsletter subscribers, promote new products, make special offers and attract more social followers.
13
 
14
- Create a lightbox easily with any type of information you want to show to your visitors. You can simply choose the most appropriate popup type and template that fit the design of your website and make a popup in the shortest time. Add a shortcode to any post, where you want to show a popup. It is possible to make unlimited number of popups with unique configurations.
15
  The intuitive admin panel interface was developed to let you easily customize popup location, sizes, set loading and closing options, etc.
16
- According to your needs, show popup only to first time users, or for everybody. It can be loaded automatically with time delay or by clicking on a specific location. There are many options helping to adapt the popup to the individual needs.
17
 
18
 
19
  = Main Features =
@@ -22,59 +22,141 @@ According to your needs, show popup only to first time users, or for everybody.
22
  * [Over 18 Popup types](https://supsystic.com/popup-examples?utm_source=wordpress&utm_medium=featurestypes&utm_campaign=popup), so even the pickiest user will find the one which fits their needs perfectly. And if you`d like to make our perfect preset more adorable, you can customize it with usual builder and HTML/СSS editor.
23
  * Different [Popup Location](https://supsystic.com/documentation/popup-location?utm_source=wordpress&utm_medium=featureslocation&utm_campaign=popup) on the page in one click. Pop-up can be shown at any place on your page – bottom, top, center, left, right, in the corner of the page etc.
24
  * [20+ Opening Animations](https://supsystic.com/documentation/popup-animations?utm_source=wordpress&utm_medium=featuresanimation&utm_campaign=popup). Feel like you are a wizard for a moment - try the full range of animation effects one by one to finish the look on the most suitable popup for your website.
25
- * Make [A/B Split Tests](https://supsystic.com/what-is-ab-testing?utm_source=wordpress&utm_medium=optionstests&utm_campaign=popup "A / B Split Test") for choosing the best way of showing your Pop-up. See [Real Time Stats](https://supsystic.com/statistics?utm_source=wordpress&utm_medium=optionsstatistic&utm_campaign=popup "Real Time Popup Stats") for analytics.
26
- * There are many different popular popup types, such as Subsсription, video, iFrame, Facebook, PDF, Age Verification, Full Screen, Login and Registration, Google Maps, Notification Bar, etc.
27
 
28
  Video tutorial to show you how to make a pop-up easily with our plugin.
29
  [youtube http://www.youtube.com/watch?v=-Q9-tWi-lQE]
30
 
31
  == Screenshots ==
32
 
33
- 1. Subscription templates
34
- 2. Facebook like popup
35
- 3. Popup with YouTube video and more
36
- 4. PopUp Login / Registration Style
37
- 5. Popup with google map and contact form
38
- 6. Social Buttons and contact form with popup
39
- 7. Age verification
40
- 8. Simple HTML popups
 
 
 
 
41
 
42
  == Frequently Asked Questions ==
43
 
44
  = For fist-time users =
45
 
46
- Our plugin is overloaded by different features and abilities, so you can look at [tutorial](https://supsystic.com/documentation/popup-getting-started/) to learn to create PopUps in a couple of minutes. If something is still unclear, [contact us](https://supsystic.com/contact-us/) and we will be glad to help you.
 
 
 
47
 
48
  = When and Whom to Show Popup =
49
 
50
- You can choose when and whom to show Popup in the Main tab of the plugin’s admin panel. It can be shown when the page loads, when the user clicks on the page or scrolls the window, by click on certain link / button / other element, on the bottom of the page, in case of user inactivity, on exit from your site, etc.
51
  You can show Popup for everyone, only for first-time visitors, until user makes an action or you can set the fixed number of times a day (an hour, a week, a month) for showing it. There is also a possibility to hide/show only for mobile devices, for defined countries, user roles, specific post types etc.
52
 
53
  = When Popup can be Closed =
54
 
55
- You may choose different variants for closing pop up window: after user close it, by clicking anywhere outside the pop-up, only after action (Subscribe / Share / Like), when the curtain time passed.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
 
57
  = How to Create a Facebook Like Popup =
58
 
59
  In order to add facebook like popup for WordPress with Popup by Supsystic you need to:
60
  * Create popup and enable Social Buttons – go to Design tab -> Social -> activate “Enable Social Buttons” checkbox -> activate only Facebook social network.
61
  * Enable Facebook button in WordPress Popup plugin
62
- * Go to this page – https://developers.facebook.com/docs/plugins/like-button and follow the step-by-step instruction.
63
  * Choose URL or Page of a website or Facebook Page you want to use with the like button and put it to the “URL to Like” field.
64
  * Adjust settings like the width of the facebook like button, layout – you can choose different styles of button, and action type – like or recommend.
65
  * Click the “Get Code” button to generate facebook like button code.
66
  * Copy and paste the snippet into the HTML editor of WordPress Popup plugin on CSS/HTML Code tab.
67
  * Save the settings and check popup.
68
 
69
- For more information check an article [Add Facebook Like Popup](https://supsystic.com/documentation/add-facebook-like-button/ "How to Create a Facebook Like Box Popup")
70
 
71
- = Opening popup with link =
72
 
73
  With WordPress Popup plugin by Supsystic you can show popup in different ways – when page loads, after user scrolls page, on exit from site, after user comment. Besides you can show popup by clicking on certain link, button, image or even show it by clicking the Menu item. Just add required code and everything is done!
74
 
75
- For more information see the article [How to open popup with link](https://supsystic.com/documentation/open-popup-click/ "Opening popup with link")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76
 
77
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
 
79
  = 1.9.38 / 18.09.2018 =
80
  * Additional code improvements
@@ -98,8 +180,8 @@ For more information see the article [How to open popup with link](https://supsy
98
 
99
  = 1.9.33 / 25.07.2018 =
100
  * Fixed export popup. Fixed 48 popup login button
101
- * Fix issue with several PopUps on page but with different font settings for each of them
102
- * Fix design issues with Facebook Subscribe button
103
  * Minor issues fix
104
 
105
  = 1.9.32 / 10.07.2018 =
@@ -177,7 +259,7 @@ For more information see the article [How to open popup with link](https://supsy
177
 
178
  = 1.9.15 / 28.12.2017
179
  * Dotmailer subscription system integration
180
- * Possibility to display only required data from iFrame Popup using "Display only selector"
181
  * Core code improvement (make it little faster)
182
 
183
  = 1.9.14 / 27.11.2017
@@ -187,8 +269,8 @@ For more information see the article [How to open popup with link](https://supsy
187
 
188
  = 1.9.13 / 21.11.2017
189
  * Minor code issue fix
190
- * Disable build-in MailChimp Welcome email functionality - it was disabled by MailChimp for API, and can be enabled in MailChimp account
191
- * Possibility to insert images - from remove URLs too
192
  * Core code improvements
193
 
194
  = 1.9.12 / 14.11.2017
@@ -212,8 +294,8 @@ For more information see the article [How to open popup with link](https://supsy
212
 
213
  = 1.9.8 / 05.10.2017
214
  * Compatibility with MailPoet 3rd version
215
- * Fixed issue when subscribing to already subscribed list with existing email to MailChimp
216
- * Fix issue with Videos auto-play when Popup is not visible right after page load (show after click or on exit from site for example)
217
  * Minor Core code improvements
218
 
219
  = 1.9.7 / 07.09.2017
@@ -222,7 +304,7 @@ For more information see the article [How to open popup with link](https://supsy
222
  * Code improvements
223
 
224
  = 1.9.6 / 10.08.2017
225
- * Fix issue with Font Stiles and Colors for texts, that have inner html elements
226
  * Fix small issue with template "Best Of Collection"
227
  * Minor issues fix and improvements
228
 
@@ -244,7 +326,7 @@ For more information see the article [How to open popup with link](https://supsy
244
  * Added Age Verification templates detailed statistics
245
  * Fixed issue with propagandizing cached stats for AB Test Popups
246
  * Fix small issue with ConstantContact subscribe service
247
- * Core code improvements and minor issues fix
248
 
249
  = 1.9.1 / 11.04.2017
250
  * ActiveCampaign - fix Tags functionality
@@ -271,15 +353,15 @@ For more information see the article [How to open popup with link](https://supsy
271
 
272
  = 1.8.7 / 16.02.2017
273
  * WooCommerce categories added to Categories select list
274
- * Facebook Like Pop up fix - to make it work according latest Facebook changes
275
- * Fix HTTP images protocol for christmas snow effect
276
  * Possibility to select week days when you need to show Popups
277
  * SMTP servers integration
278
  * Send Mail service integration
279
- * Possibility to just close window if email already exists during Registration process
280
- * Fix possible conflict if someone add html tag with name "ajaxurl"
281
  * Setting images for backgrounds only with selected in WordPress library size
282
- * Possibility to show Close button for Close mode - "Only after action (Subscribe / Share / Like)"
283
 
284
  = 1.8.6 / 26.01.2017
285
  * Possibility to manually create Passwords on Frontend Registration
@@ -287,7 +369,7 @@ For more information see the article [How to open popup with link](https://supsy
287
  * Do not use Pop up close and subscribe errors actions - when calculating conversions
288
  * Blacklist error message editing
289
  * Make correct work Layered Popup with Click outside option
290
- * Fix issue with displaying Popup on Posts page listing
291
 
292
  = 1.8.5 / 12.01.2017
293
  * Fix MailChimp Groups List sending value in email
@@ -309,8 +391,8 @@ For more information see the article [How to open popup with link](https://supsy
309
  * Subscribe fields - values presets: User IP, Country, Pages URLs and Titles in Subscribe forms
310
 
311
  = 1.8.3 / 07.12.2016 =
312
- * Background Overlay settings added: Color, Image and Snow
313
- * Paralax Page Builder compatibility
314
  * Fix template bugs for additional subscribe elements
315
  * Added template "Winter Sale"
316
  * Added template "Christmas Tree"
@@ -376,7 +458,7 @@ For more information see the article [How to open popup with link](https://supsy
376
  * Code review and improvements
377
 
378
  = 1.7.6 / 21.07.2016 =
379
- * Fix issue with conflict of Font and Text Color styles and styles of users custom themes (theme styles often override our styles, now it will not occur anymore)
380
  * Fixed issue for showing Popup on Homepage with posts listing and multiple pages of listings
381
  * Integration with Contact Form plugin (step 1 - correct show shortcodes)
382
  * Options with Disabling CDN usage description link added
@@ -387,36 +469,36 @@ For more information see the article [How to open popup with link](https://supsy
387
  * Minor spelling issues fix
388
 
389
  = 1.7.5 / 21.06.2016 =
390
- * Small fixes of welcome page and step-by step tutorial
391
  * Fix small issue with Facebook Subscription
392
- * Possibility to export all subscribers from all Popups - in one click from Settings page
393
- * Possibility to redirect to link URL after subscribe if On Click link was used to show Pop up
394
- * Fix issue with detecting required user roles for Show / Hide for user role functionality for cases when user have several roles
395
 
396
  = 1.7.4 / 07.06.2016 =
397
  * Possibility to disable CDN server usage - and move all assets to own website
398
  * Fix issue with showing Pop-up on main Home Page if Home Page - is from WooCommerce plugin
399
- * Code review and re-factor
400
  * Minor improvements
401
 
402
  = 1.7.2 / 17.05.2016 =
403
  * Possibility to enable Label at the top of the Facebook Widget Popup
404
  * Option to show Pop-up if AdBlock is enabled - PRO
405
- * Possibility to send any user data - to email with user confirm link, and in email to new user subscribers
406
  * Added New Subscribers notification email Subject option
407
  * Show / Hide for selected User Roles option - PRO
408
  * Small fixes and improvements for Themes. #170 add 0.2h
409
  * Possibility to select categories for showing
410
  * Possibility to insert shortcodes in Subscribe fields values
411
  * Possibility to insert scripts - inside content (in text editors)
412
- * Show Popup "On Click" - add additional check - after all scripts, that was triggered, will done their work - check it one more time - to make sure we didn't miss anyone
413
  * Fixed conflicts with WordPress plugins, that make URLs relative
414
  * Fixed conflicts with other themes and plugins, that using zoom jQuery method with same method name
415
  * Code review and improvements
416
 
417
  = 1.7.1 / 28.04.2016 =
418
  * New Template added - "Video List Flat"
419
- * MailChimp API key - ignore space symbols in beginning or ending of it in case they was inserted accidentally
420
  * Fix issue with Social Share by Supsystic project sharing re-selecting from Pop-up
421
  * Updated Italian translation
422
  * Additional TinyMCE check in admin area - to make sure we will not call errors in case it's absent on user WP configuration
@@ -447,14 +529,14 @@ For more information see the article [How to open popup with link](https://supsy
447
  * Small spelling issues fix
448
 
449
  = 1.6.5 / 05.04.2016 =
450
- * Possibility to use Subscribe, Login and Registration forms - in one Pop up, at one and same time - all 3 forms together
451
  * Small fix for "Photodoto" Template
452
  * Added option "Redirect after close" - you can now redirect your users after they will close Popup
453
  * Emma email subscription service integration - PRO
454
  * Correct subscriber, registration and login form work with enable cache plugins (W3 Total Cache or Super Cache)
455
- * Don't send standard WordPress new users notifications if all messages fields was cleared by user
456
  * MailChimp - possibility to send welcome email from MailChimp even if double opt-in is disabled
457
- * Fix issue with compatibility of subscribe - and login/registration forms
458
 
459
  = 1.6.4 / 29.03.2016 =
460
  * Compatibility with oldest versions of jquery library (some theme developers still use them)
@@ -469,7 +551,7 @@ For more information see the article [How to open popup with link](https://supsy
469
  = 1.6.3 / 22.03.2016 =
470
  * Fix issue with showing Popup on WooCommerce "Shop" page only
471
  * Added another supported video hosting service
472
- * Small fix for build-in content popup - do not load them in standard load query (they will be loaded from shortcodes)
473
  * Minor debug issues fix
474
 
475
  = 1.6.2 / 17.03.2016 =
@@ -486,7 +568,7 @@ For more information see the article [How to open popup with link](https://supsy
486
  * ConvertKit subscription method integration - PRO
487
  * Login - login by Username by default
488
  * Disable block IP for multiple subscriptions by default
489
- * Improve On Exit initialization (to avoid conflict with some modificated jquery libraries)
490
  * Fixed minor conflicts in admin area with other javascript codes of other themes and plugins
491
  * Added possibility to use Registration and Login form - in one Popup at one and same time
492
  * Count time from first site load option added
@@ -497,9 +579,9 @@ For more information see the article [How to open popup with link](https://supsy
497
 
498
  = 1.6.0 / 02.03.2016 =
499
  * Remove unused error message parts from MailChimp errors
500
- * SalesForce - Web-to-Lead integration - PRO
501
- * Close video after Popup was closed even if template was not with video type
502
- * Constant Contact - add contact even if it exist in some other subscription lists
503
  * InfusionSoft subscription method added - PRO
504
  * Additional compatibility with Google Maps Easy plugin https://wordpress.org/plugins/google-maps-easy/
505
  * Language files update and minor spelling issues fix
@@ -512,17 +594,17 @@ For more information see the article [How to open popup with link](https://supsy
512
  = 1.5.8 / 23.02.2016 =
513
  * Jetpack subscription engine added - now you can subscribe to Jetpack!
514
  * Added Date display range
515
- * Count already subscribed user as subscriber on client side if email already exists and "Redirect if email already exists" option is enabled
516
  * iContact Subscribe method integration
517
  * GetResponse Subscribe method improvements
518
- * Always send form on Enter press in Subscribe form
519
  * Fix issue with HTTPS loading fonts in Fonts PRO module
520
  * GetResponse - added new field - "Cycle Day"
521
  * Don't pass unused data - to fronted JavaScript: make code lighter
522
- * MailChimp - fix issue with limit of Subscribe lists, shown in admin area (there was standard limit in 25 lists)
523
  * Core code improve (minor "strict standards" php notice fix)
524
  * Facebook Subscribe - fix result messages (or errors) - now they will be visible in Pop-up itself
525
- * When to close -> Only after action -> Added possibility to select time after action that should pass before close
526
  * Update Spanish translation
527
  * Code review
528
 
@@ -537,27 +619,27 @@ For more information see the article [How to open popup with link](https://supsy
537
 
538
  = 1.5.6 / 02.02.2016 =
539
  * Added subscribe from URL variable to subscribers emails - [subscribe_url]
540
- * If user is already subscribed to MailChimp - count this as done subscribe action, and not error
541
- * "Email exists" error message option in admin area
542
  * Reduce user browser memory usage to work correctly - make it faster and lighter!
543
- * Functionality to show only for first time visitors popup even if they are shown "On Click"
544
- * Fix issue with opening Media Library on Enter key press in admin area edit screen
545
  * Small fix for Pop-up Template
546
- * "Add Popup" button - in admin top bar: create your pop up more faster!
547
 
548
  = 1.5.5 / 26.01.2016 =
549
  * MailChimp Groups functionality added
550
  * Do not send CSS and HTML data when editing plugin if they were not changed
551
- * Possibility to force show Popup right after page loaded using hash parameters
552
  * Minor fix for Business Template
553
  * Improve IP detection algorithm
554
- * Small correct for TinyMce buttons colors on Edit screen
555
  * Minor fixes for templates Video Classy, Layered Popup, Ready and Business
556
  * Added option "Disable window scroll" to disable browser window scrolling while Pop-up is opened
557
- * Show for cases when user selected invalid image as of the Backgrounds
558
 
559
  = 1.5.4 / 13.01.2016 =
560
- * Possibility to create WordPress Subscribers with different then WordPress subscribers mail engine
561
  * Added option to load all plugin assets - in site footer - to increase page speed load
562
  * Correct detecting mobile device with On Exit functionality
563
  * Possibility to add attachments to email from plugin
@@ -614,21 +696,21 @@ For more information see the article [How to open popup with link](https://supsy
614
 
615
  = 1.4.5 / 10.11.2015 =
616
  * Fixed issue with PRO for multi-sites
617
- * Changed sort orders of Templates in admin area
618
  * PRO - Updated Facebook API usage
619
  * Minor core code improvements
620
 
621
  = 1.4.4 / 05.11.2015 =
622
- * Send statistics about social network action - when social icons is generated by Social Share Buttons by Supsystic plugin
623
  * PopUp "SIGN UP" template - minor CSS fix
624
  * Core minor improvement
625
 
626
  = 1.4.3 / 03.11.2015 =
627
  * New Animation library added - more animations with better performance!
628
  * Small issue fix with WordPress Subscribers export
629
- * Small admin area user friendly improvements
630
  * Corrections for responsiveness - now will correct display on all devices
631
- * Added Polish language
632
  * Small fix for Calm template
633
  * AB Testing - added possibility to select Main (Display) settings for tested Popup
634
  * MailRelay module - minor code improvements
@@ -637,23 +719,23 @@ For more information see the article [How to open popup with link](https://supsy
637
 
638
  = 1.4.2 / 27.10.2015 =
639
  * Minor issues fix for "List Building", "Bonus" and "Smart" templates
640
- * Remove admin tooltips animation - just to check now it will be look like
641
  * Small fixes for preview templates Pink and Discount
642
  * Export subscribers to WordPress users list as CSV file (all subscribers - confirmed and unconfirmed too)
643
- * Fix small issue with possible empty REQUEST php array
644
  * Make custom selects in admin area - responsive
645
  * Fix List Green and Green Dots bullets
646
- * Change version for js and css files each time new version is release - to avoid using browser cache
647
  * Small fixes for Business and Map style templates
648
 
649
  = 1.4.1 / 21.10.2015 =
650
- * Added HTML5 Subscribe fields validation on client side - fast and light!
651
  * Small fix to make proper work responsiveness + animation feature when need to reduce size after Pop-up will be shown
652
  * Fix issue for compatibility with styles output on some mobile devices
653
  * Admin WordPress more pretty menu icon
654
  * Additional clarification link to documentation about MailChimp usage
655
- * Improve usability - move to Design tab after template was changed
656
- * Backgrounds images preview in admin area - max width to 300px
657
  * Admin area -> Make Background opacity slider - smaller
658
  * Small fix for Find Us and Map style templates
659
  * Admin area - fixes for small devices
@@ -664,8 +746,8 @@ For more information see the article [How to open popup with link](https://supsy
664
  * Small spelling issues fix
665
  * Fixed optin template Map style
666
  * Fix issue with displaying popup and Google Maps in it (when Maps didn't load it's scripts correctly on some themes)
667
- * Admin lead generator interface design small improvements - make it more user friendly
668
- * More interactions with our users - just trying improve software for your needs!
669
  * Small fix for SendGrid admin js issue
670
 
671
  = 1.3.9 / 06.10.2015 =
@@ -678,7 +760,7 @@ For more information see the article [How to open popup with link](https://supsy
678
  * Notification about new subscribers for all Subscription services functionality added
679
  * Added "Open in a new window" for Redirect after subscription functionality
680
  * Possibility to change Name and E-mail fields label
681
- * Possibility to set Name field as mandatory field
682
  * Mailrelay subscribe service integration - PRO
683
 
684
  = 1.3.7 / 24.09.2015 =
@@ -689,9 +771,9 @@ For more information see the article [How to open popup with link](https://supsy
689
 
690
  = 1.3.6 / 22.09.2015 =
691
  * Moved static info - to CDN servers: make plugin lighter
692
- * List popup - get only required information from database -> reduce response size
693
  * Design corrections for admin Welcome page
694
- * Switch admin area tabs controls positions - make it's usage more comfortable
695
  * Option for users, who want to help our plugin, check it in Settings tab -> Promo link
696
 
697
  = 1.3.5 / 17.09.2015 =
@@ -728,7 +810,7 @@ For more information see the article [How to open popup with link](https://supsy
728
  * Added 4 new templates with Google Maps and Contact Form!
729
  * New text list bullet type
730
  * Added fix for servers without ctype_alpha standard PHP function
731
- * Admin Popup preview - load all frontend styles and scripts - to make it's view more like on frontend
732
  * Fix minor issues in templates
733
 
734
  = 1.2.9 / 04.08.2015 =
@@ -747,7 +829,7 @@ For more information see the article [How to open popup with link](https://supsy
747
  = 1.2.7 / 24.07.2015 =
748
  * Added hide for Post Types functionality
749
  * Updated preview images, some fixes in templates
750
- * Layered style - fix displaying saved setting in admin area
751
  * Minor admin area design improvements
752
  * Integration with Social Share Buttons plugin - https://wordpress.org/plugins/social-share-buttons-by-supsystic/
753
  * Additional improvements for "On Click" show - now link can contain shortcode in any href attr place
@@ -756,8 +838,8 @@ For more information see the article [How to open popup with link](https://supsy
756
  * Vertical Response Subscribe Engine integration - PRO
757
  * arpReach Subscribe Engine integration - PRO
758
  * SendGrid Subscribe Engine integration - PRO
759
- * SG Autorepondeur Engine integration - PRO
760
- * Added "Show Only" option in addition for options Hide for Devices, Hide for Post Types, Hide for for IP, Hide for Countries and Hide for Languages
761
  * Functionality to show - on Menu Item click
762
 
763
  = 1.2.6 / 16.07.2015 =
@@ -818,7 +900,7 @@ For more information see the article [How to open popup with link](https://supsy
818
  * Some unused files remove
819
  * Small re-design on Layered style feature
820
  * Admin area design improvements
821
- * Correct message for subscribe success when MailPoet is used as Subscribe engine
822
 
823
  = 1.1.9 / 07.05.2015 =
824
  * Code review
@@ -838,7 +920,7 @@ For more information see the article [How to open popup with link](https://supsy
838
  * Admin area User Interface improvements - make it more comfortable and attractive for our Users
839
  * Fix conflict with some WordPress plugins in our Code editor tool (conflict with "codemirror" library)
840
  * Hide popup for Logged-in option
841
- * Option to set period of time for hide for already viewed users, or already made an action
842
 
843
  = 1.1.6 / 14.04.2015 =
844
  * Correction for cookie lifetime in recording user actions
@@ -859,7 +941,7 @@ For more information see the article [How to open popup with link](https://supsy
859
  * Fixed conflict with Twig autoloaded re-defining in other plugins or themes
860
  * Facebook Pop-up - correct language detection
861
  * Correct displaying usual embed iframes with Google Maps
862
- * PRO - added options: Close only after action, after time passed - https://supsystic.com/plugins/popup-plugin/
863
  * PRO - added options: Show at the bottom of the page, after Inactivity, after User Comment option, after Purchasing (Checkout) - https://supsystic.com/plugins/popup-plugin/
864
  * PRO - Possibility to subscribe with Facebook - https://supsystic.com/plugins/popup-plugin/
865
  * PRO - Possibility to set user role for plugin usage (not just admin) - https://supsystic.com/plugins/popup-plugin/
@@ -896,12 +978,12 @@ For more information see the article [How to open popup with link](https://supsy
896
  * Correct condition - for showing / hiding for specific post / page - don't show on posts listing, only on single post / page
897
 
898
  = 1.1.1 / 10.03.2015 =
899
- * Subscription - possibility to modify subscribe messages - browser notifications, email subject and content
900
  * Subscription - possibility to add Redirect after subscribe
901
- * Statistics - show data if week / month is selected with date range that is in current week / month
902
- * Mailchimp popup API class - minor correct for DEBUG mode
903
  * Correct popup saving "&" sign - in text fields
904
- * Fix animations tab in admin area
905
  * Correct animation for Facebook Like Popup - animate it only after whole content will be loaded from Facebook
906
  * Added popup link to documentation about usage code - HTML and CSS - editor
907
  * Correct process shortcode from any place (not only from post/page content) - sidebars, external themes/plugins, etc.
@@ -925,17 +1007,17 @@ For more information see the article [How to open popup with link](https://supsy
925
  * Pop-up Installer improve
926
 
927
  = 1.0.9 / 24.02.2015 =
928
- * Allow to assign new subscribers - special roles
929
- * Option to disable Popup for: Mobile, Tablet or Desktop PC
930
  * Additional fix for mobile devices
931
  * Small fix for latest added new templates
932
  * Main edit tabs sticky functionality - make it work with some standard notifications
933
  * Show Popup label always on top of edit tabs on edit screen - more user-friendly
934
- * Option to show Pop-up - after scroll window - right after scroll or with delay
935
  * Layered integration - https://supsystic.com/plugins/popup-plugin/
936
- * Additional modification for "Click On" show mode - to make sure it work with more content editor systems
937
  * A/B testing - tests should stay tests even after whole design change - fixed - https://supsystic.com/plugins/popup-plugin/
938
- * Admin list table - do not stick header line (call too much problems and don't need this)
939
  * Correct show on mobile devices - every size, every type
940
  * Fix sticky edit tabs scroll position
941
 
@@ -966,10 +1048,10 @@ For more information see the article [How to open popup with link](https://supsy
966
  = 1.0.6 =
967
  * MailChimp integration with popup
968
  * Video popup - Autoplay option added
969
- * Correct position set for Facebook Like Popup - depend position on widget size after it will be loaded
970
- * Re-calculate position for each Pop up - after window was resized
971
  * Fix issue with Facebook Like Popup array options
972
- * Disable popup clicking and submitting forms inside preview iFrame in admin area
973
  * Fix images load as background - added load WordPress media gallery
974
  * List Building and Video List templates - fix subscribe Submit button name option
975
  * Fastest and Easiest template - fix subscribe enable/disabler name option
@@ -978,9 +1060,9 @@ For more information see the article [How to open popup with link](https://supsy
978
  * Rename admin area menu items - make it more intuitive and user-friendly
979
  * Fix preview iFrame issue in admin area - when for some cases scripts with "ppsHidePreviewUpdating" was not loaded when iFrame was already loaded
980
  * Tooltip functionality in admin area optimization
981
- * Some wording changes in admin area
982
  * Compress some javascript libraries and remove unused files to make plugin lighter
983
- * Admin popup UI design minor optimizations - make it's usage more comfortable for You
984
 
985
  = 1.0.5 =
986
  * Fixed activation warning with DEBUG mode enabled
1
+ === Popup by Supsystic ===
2
  Contributors: supsystic.com
3
  Donate link: https://supsystic.com/plugins/popup-plugin
4
  Tags: popup, popup WordPress plugin, marketing, popover, pop-up, popup builder, social popup, facebook popup, popup builder, popup maker
5
+ Tested up to: 5.0.3
6
+ Stable tag: 1.9.44
7
 
8
  Create elegant popup easily with Popup Builder by Supsystic. Popup with Subscription Forms, Facebook popup, Optin and Social locks, Contact Forms etc.
9
 
10
  == Description ==
11
 
12
+ [Popup plugin by Supsystic](https://supsystic.com/plugins/popup-plugin?utm_source=wordpress&utm_medium=description&utm_campaign=popup "Popup WordPress Plugin") with [Popup Builder](https://supsystic.com/feature/design-customization?utm_source=wordpress&utm_medium=builder&utm_campaign=popup "Popup Builder") helps you get newsletter subscribers, promote new products, make special offers and attract more social followers.
13
 
14
+ Create a lightbox easily with any type of information you want to show to your visitors. You can simply choose the most appropriate popup type and template that fits the design of your website and create a popup in the shortest time. Add a shortcode to any post, where you want to show a popup. It is possible to make unlimited number of popups with unique configurations.
15
  The intuitive admin panel interface was developed to let you easily customize popup location, sizes, set loading and closing options, etc.
16
+ According to your needs, [show popup only to first time users](https://supsystic.com/documentation/make-popup-visible-first-time-users?utm_source=wordpress&utm_medium=showpopup&utm_campaign=popup "Show popup only to first time users"), or for everybody. It can be loaded automatically with time delay or by clicking on a specific location. There are many options helping to adapt the popup to the individual needs.
17
 
18
 
19
  = Main Features =
22
  * [Over 18 Popup types](https://supsystic.com/popup-examples?utm_source=wordpress&utm_medium=featurestypes&utm_campaign=popup), so even the pickiest user will find the one which fits their needs perfectly. And if you`d like to make our perfect preset more adorable, you can customize it with usual builder and HTML/СSS editor.
23
  * Different [Popup Location](https://supsystic.com/documentation/popup-location?utm_source=wordpress&utm_medium=featureslocation&utm_campaign=popup) on the page in one click. Pop-up can be shown at any place on your page – bottom, top, center, left, right, in the corner of the page etc.
24
  * [20+ Opening Animations](https://supsystic.com/documentation/popup-animations?utm_source=wordpress&utm_medium=featuresanimation&utm_campaign=popup). Feel like you are a wizard for a moment - try the full range of animation effects one by one to finish the look on the most suitable popup for your website.
25
+ * Make [A/B Split Tests](https://supsystic.com/what-is-ab-testing?utm_source=wordpress&utm_medium=optionstests&utm_campaign=popup "A / B Split Test") for choosing the best way of showing your Pop-up. See [Real Time Stats and Analytics](https://supsystic.com/feature/statistics-analytics?utm_source=wordpress&utm_medium=optionsstatistic&utm_campaign=popup "Real Time Popup Stats and Analytics") for analytics.
26
+ * There are many different popular popup types, such as [Subscription](https://supsystic.com/documentation/popup-subscription-settings?utm_source=wordpress&utm_medium=subscriptionsettings&utm_campaign=popup "Subscription Settings"), [Social Share](https://supsystic.com/feature/social-popup?utm_source=wordpress&utm_medium=socialpopup&utm_campaign=popup "Social Popup"), [iFrame](https://supsystic.com/plugins/popup-plugin/?utm_source=wordpress&utm_medium=typeiframe&utm_campaign=popup#ppsShowPopUp_161 "iFrame"), [PDF](https://supsystic.com/plugins/popup-plugin?utm_source=wordpress&utm_medium=typepdf&utm_campaign=popup#ppsShowPopUp_169 "PDF"), [Age Verification](https://supsystic.com/plugins/popup-plugin?utm_source=wordpress&utm_medium=typeverification&utm_campaign=popup#ppsShowPopUp_158 "Age Verification"), [Full Screen](https://supsystic.com/plugins/popup-plugin?utm_source=wordpress&utm_medium=typefull&utm_campaign=popup#ppsShowPopUp_157 "Full Screen"), [Google Maps](https://supsystic.com/popup-examples?utm_source=wordpress&utm_medium=typemaps&utm_campaign=popup#ppsShowPopUp_141 "Google Maps"), [Notification Bar](https://supsystic.com/plugins/popup-plugin?utm_source=wordpress&utm_medium=typenotification&utm_campaign=popup#ppsShowPopUp_159 "Notification Bar"), [Facebook](https://supsystic.com/plugins/popup-plugin?utm_source=wordpress&utm_medium=typefacebook&utm_campaign=popup#ppsShowPopUp_104 "Facebook") etc.
27
 
28
  Video tutorial to show you how to make a pop-up easily with our plugin.
29
  [youtube http://www.youtube.com/watch?v=-Q9-tWi-lQE]
30
 
31
  == Screenshots ==
32
 
33
+ 1. Popup Demo
34
+ 2. Facebook like popup, Popup with YouTube video, Age verification and more
35
+ 3. Full screen, Clear popup, Subscription Forms
36
+ 4. PopUp Login / Registration
37
+ 5. Popup with google map, Social Buttons, Login and more
38
+ 6. Admin Panel
39
+ 7. Admin Panel
40
+ 8. Admin Panel
41
+ 9. Admin Panel
42
+ 10. Admin Panel
43
+ 11. Admin Panel
44
+ 12. Admin Panel
45
 
46
  == Frequently Asked Questions ==
47
 
48
  = For fist-time users =
49
 
50
+ Popup gives you total control of the settings, so you can completely match your popup to the design of site. Our plugin is overloaded by different features and abilities, so you can look at [Getting Started tutorial](https://supsystic.com/documentation/popup-getting-started/?utm_source=wordpress&utm_medium=gettingstarteds&utm_campaign=popup "Popup Getting Started") to learn how to create PopUps in a couple of minutes. If something is still unclear, [contact us](http://supsystic.com/contact-us?utm_source=wordpress&utm_medium=supportcontact&utm_campaign=popup "Contact Us") and we will be glad to help you.
51
+
52
+ = How many popups can I create? =
53
+ You can create as many popups as you need, there is no limitation either on the Free or the PRO version.Also you can have as many popups as you want on the same page. In order to activate more than one popup, you need to enable in each popup Turn On button. It is on the right top of Popup plugin.
54
 
55
  = When and Whom to Show Popup =
56
 
57
+ You can choose [When to show](https://supsystic.com/documentation/when-to-show-popup?utm_source=wordpress&utm_medium=whentoshowspopup&utm_campaign=popup "When to show Popup") and [Whom to show Popup](https://supsystic.com/documentation/whom-to-show-popup/?utm_source=wordpress&utm_medium=whomtoshows&utm_campaign=popup "Whom to show Popup") in the Main tab of the plugin’s admin panel. It can be shown when the page loads, when the user clicks on the page or scrolls the window, by click on certain link / button / other element, on the bottom of the page, in case of user inactivity, on exit from your site, etc.
58
  You can show Popup for everyone, only for first-time visitors, until user makes an action or you can set the fixed number of times a day (an hour, a week, a month) for showing it. There is also a possibility to hide/show only for mobile devices, for defined countries, user roles, specific post types etc.
59
 
60
  = When Popup can be Closed =
61
 
62
+ [When to close PopUp](https://supsystic.com/documentation/when-to-close-popup?utm_source=wordpress&utm_medium=whentoclose&utm_campaign=popup "When to close PopUp") section provides the ability to set different variations for closing your popup: after user close it, by clicking anywhere outside the pop-up, only after action (Subscribe / Share / Like), when the curtain time passed.
63
+
64
+ = How to make the Popup responsive? =
65
+ Responsive mode which provides nice and proper view of your popup on any device.
66
+ Here you are able to set plugin responsivity:
67
+ * Full resize – PopUp will be fully zoomed for smaller screens.
68
+ * Width only – PopUp will adapt only Width for device screen size.
69
+
70
+ = Why should I buy the PRO version? =
71
+ The Free version of Popup Plugin gives you all necessary options for creating unlimited fully functional popups. Our PRO version gives you the ability to create more advanced popups, with [Login & Registration](https://supsystic.com/documentation/popup-login-registration&utm_medium=loginregistration&utm_campaign=popup "Login and registration") options, Popup [Location](https://supsystic.com/documentation/popup-location?utm_source=wordpress&utm_medium=featureslocation&utm_campaign=popup "Location") and Text Font and color settings, [Google Analytics](https://supsystic.com/documentation/popup-statistics/?utm_source=wordpress&utm_medium=optionsstatistic&utm_campaign=popup "Analytics"), [A/B Testing](https://supsystic.com/what-is-ab-testing?utm_source=wordpress&utm_medium=optionstests&utm_campaign=popup "A/B Testing") and more.
72
+ With Popup Pro you will get [Templates Pack](https://supsystic.com/popup-examples?utm_source=wordpress&utm_medium=featurestypes&utm_campaign=popup "Examples") with 69 preset templates for your popups to easily create elegant popups in couple minutes.
73
+ Also, you will have more possible ways of [opening and closing popup](https://supsystic.com/docs/popup-triggers?utm_source=wordpress&utm_medium=triggers&utm_campaign=popup "Triggers") : On Exit from Site, On Bottom of the page, After Inactivity, After User Comment, After Purchasing, On Link Follow, Close Only after action (Subscribe / Share / Like), Close After time passed and many other.
74
+ So if you need these advanced popups and functionalities, get [Popup Plugin by Supsystic PRO here](http://supsystic.com/plugins/popup-plugin?utm_source=wordpress&utm_medium=description&utm_campaign=popup "Popup Pro").
75
+
76
+ = Can I set a Popup to be closed in several seconds? =
77
+ If you want to make the popup closed after some period of time, [follow the next steps](https://supsystic.com/documentation/auto-close-popup-x-seconds?utm_source=wordpress&utm_medium=popupclosed&utm_campaign=popup "Close Popup after x seconds"):
78
+ * Choose Popup by Supsystic on your admin panel of the WordPress admin page
79
+ * Find there an insert “Add new PopUp” and choose Iframe theme. Don’t forget to click Simple iFrame icon.
80
+ * Type the name of future Popup and click the button “Save”.
81
+ * Then you will see another window with several option inserts like: “Main”, “Design”, “Login/Registration”, “A/B Testing”. Your choice is Main insert and a directory “When to close PopUp”, there find an option After time passed and type the number of seconds you need.
82
+
83
 
84
  = How to Create a Facebook Like Popup =
85
 
86
  In order to add facebook like popup for WordPress with Popup by Supsystic you need to:
87
  * Create popup and enable Social Buttons – go to Design tab -> Social -> activate “Enable Social Buttons” checkbox -> activate only Facebook social network.
88
  * Enable Facebook button in WordPress Popup plugin
89
+ * Go to this page – [facebook for developers](https://developers.facebook.com/docs/plugins/like-button "Facebook for developers" ) and follow the step-by-step instruction.
90
  * Choose URL or Page of a website or Facebook Page you want to use with the like button and put it to the “URL to Like” field.
91
  * Adjust settings like the width of the facebook like button, layout – you can choose different styles of button, and action type – like or recommend.
92
  * Click the “Get Code” button to generate facebook like button code.
93
  * Copy and paste the snippet into the HTML editor of WordPress Popup plugin on CSS/HTML Code tab.
94
  * Save the settings and check popup.
95
 
96
+ For more information check an article [Add Facebook Like Popup](https://supsystic.com/documentation/add-facebook-like-button?utm_source=wordpress&utm_medium=facebooklike&utm_campaign=popup "How to Create a Facebook Like Box Popup")
97
 
98
+ = How can I set a popup opening with link? =
99
 
100
  With WordPress Popup plugin by Supsystic you can show popup in different ways – when page loads, after user scrolls page, on exit from site, after user comment. Besides you can show popup by clicking on certain link, button, image or even show it by clicking the Menu item. Just add required code and everything is done!
101
 
102
+ For more information see the article [How to open popup with link](https://supsystic.com/documentation/open-popup-click?utm_source=wordpress&utm_medium=popupwithlink&utm_campaign=popup "Opening popup with link")
103
+
104
+ = How to redirect users after after users close popup? =
105
+ [Redirection to the required URL](https://supsystic.com/documentation/redirect-url-closing-popup?utm_source=wordpress&utm_medium=redirection&utm_campaign=popup "Redirection to the required URL") is very useful option. If users won’t subscribe through the popup you will still have a chance to show the required information, after they close it.
106
+
107
+ Enable “Redirect after close” option in Appearance setting on the Design tab of WordPress Popup plugin by Supsystic. Insert there the required URL and save your popup. Also you can set the link to open in a new tab.
108
+
109
+ = How to use A/B testing =
110
+ [A/B testing feature](https://supsystic.com/feature/a-b-testing?utm_source=wordpress&utm_medium=abtesting&utm_campaign=popup "A/B testing"), in PopUp by Supsystic allows you to test two versions of popup, compare the stats and decide, which one you’d like to use on your site. Such testing is a simple way to test changes against the current design and determine which ones produce positive results. It is a way to figure out that any new customization or change to your site is growing your conversion rate before you implement the change to life.
111
+
112
+ = Something does not work. What should I do?
113
+ [Contact us](http://supsystic.com/contact-us?utm_source=wordpress&utm_medium=supportcontact&utm_campaign=popup "Contact Us")! Depending on your server configuration something may go wrong, please don’t hesitate on contacting us, we are here to help you!
114
+
115
+ = Everything works PERFECT. What should I do?
116
+ Leave us a nice review 🙂
117
 
118
  == Changelog ==
119
+ = 1.9.44 / 18.01.2019 =
120
+ * Fixed conflict with some cache plugins
121
+ * Fix issue with close Facebook PopUp
122
+ * Minor improvements
123
+
124
+ = 1.9.43 / 15.01.2019 =
125
+ * Fix of collecting of data in subscription fields
126
+ * Fixed popup opening with an iframe anchor tag
127
+ * Update screenshots
128
+ * Readme update
129
+ * Fix of using of Benchmark subscription service
130
+ * Possibility to Show PopUp until user Confirm Email
131
+ * Code and styles fix
132
+ * Fix of popup positioning on mobile by width only
133
+ * Possibility to set Confirmation Page to reload (redirect) time after Subscription Confirm
134
+ * Fix of displaying of the popup on Woocommerce Shop Page
135
+
136
+ = 1.9.42 / 05.12.2018 =
137
+ * Fix of positioning of popup for mobile devices
138
+ * Minor issues fix
139
+
140
+ = 1.9.41 / 28.11.2018 =
141
+ * Fix of subscribing through SG Autoresponder service
142
+ * Remove deprecated options: Ignore related videos
143
+ * Fix of the positioning of the popup for mobile devices
144
+ * Fix redirect for InfusionSoft
145
+ * Minor code fixes and improvements
146
+
147
+ = 1.9.40 / 01.11.2018 =
148
+ * Possibility to set different close and open animations in PoPup
149
+ * Fix minor issue with Facebook Subscribe button layout
150
+ * Small fix for "Bump!" PopUp Theme
151
+ * Added full compatibility with latest jQuery versions (where size() function was removed)
152
+ * Fix issue with new rules of Facebook applications
153
+ * Fixed working with embed URL youtube
154
+
155
+ = 1.9.39 / 09.10.2018 =
156
+ * New option - Show PopUp Only for Logged-in users
157
+ * Possibility to set different close and open animations in PoPup
158
+ * Minor issues fix
159
+ * Code review
160
 
161
  = 1.9.38 / 18.09.2018 =
162
  * Additional code improvements
180
 
181
  = 1.9.33 / 25.07.2018 =
182
  * Fixed export popup. Fixed 48 popup login button
183
+ * Fix issue with several PopUps on the page but with different font settings for each of them
184
+ * Fix design issues with the Facebook Subscribe button
185
  * Minor issues fix
186
 
187
  = 1.9.32 / 10.07.2018 =
259
 
260
  = 1.9.15 / 28.12.2017
261
  * Dotmailer subscription system integration
262
+ * Possibility to display only required data from iFrame Popup using "Display the only selector"
263
  * Core code improvement (make it little faster)
264
 
265
  = 1.9.14 / 27.11.2017
269
 
270
  = 1.9.13 / 21.11.2017
271
  * Minor code issue fix
272
+ * Disable build-in MailChimp Welcome email functionality - it was disabled by MailChimp for API and can be enabled in MailChimp account
273
+ * Possibility to insert images - from removing URLs too
274
  * Core code improvements
275
 
276
  = 1.9.12 / 14.11.2017
294
 
295
  = 1.9.8 / 05.10.2017
296
  * Compatibility with MailPoet 3rd version
297
+ * Fixed issue when subscribing to already subscribed list with an existing email to MailChimp
298
+ * Fix issue with Videos auto-play when Popup is not visible right after page load (show after the click or on exit from the site for example)
299
  * Minor Core code improvements
300
 
301
  = 1.9.7 / 07.09.2017
304
  * Code improvements
305
 
306
  = 1.9.6 / 10.08.2017
307
+ * Fix issue with Font Stiles and Colors for texts, that have inner HTML elements
308
  * Fix small issue with template "Best Of Collection"
309
  * Minor issues fix and improvements
310
 
326
  * Added Age Verification templates detailed statistics
327
  * Fixed issue with propagandizing cached stats for AB Test Popups
328
  * Fix small issue with ConstantContact subscribe service
329
+ * Core code improvements and minor issues fixed
330
 
331
  = 1.9.1 / 11.04.2017
332
  * ActiveCampaign - fix Tags functionality
353
 
354
  = 1.8.7 / 16.02.2017
355
  * WooCommerce categories added to Categories select list
356
+ * Facebook Like Popup fix - to make it work according to latest Facebook changes
357
+ * Fix HTTP images protocol for Christmas snow effect
358
  * Possibility to select week days when you need to show Popups
359
  * SMTP servers integration
360
  * Send Mail service integration
361
+ * Possibility to just close window if email already exists during the Registration process
362
+ * Fix possible conflict if someone adds HTML tag with name "ajaxurl"
363
  * Setting images for backgrounds only with selected in WordPress library size
364
+ * Possibility to show Close button for Close mode - "Only after an action (Subscribe / Share / Like)"
365
 
366
  = 1.8.6 / 26.01.2017
367
  * Possibility to manually create Passwords on Frontend Registration
369
  * Do not use Pop up close and subscribe errors actions - when calculating conversions
370
  * Blacklist error message editing
371
  * Make correct work Layered Popup with Click outside option
372
+ * Fix issue with displaying Popup on the Posts page listing
373
 
374
  = 1.8.5 / 12.01.2017
375
  * Fix MailChimp Groups List sending value in email
391
  * Subscribe fields - values presets: User IP, Country, Pages URLs and Titles in Subscribe forms
392
 
393
  = 1.8.3 / 07.12.2016 =
394
+ * Background Overlay settings added: Color, Image, and Snow
395
+ * Parallax Page Builder compatibility
396
  * Fix template bugs for additional subscribe elements
397
  * Added template "Winter Sale"
398
  * Added template "Christmas Tree"
458
  * Code review and improvements
459
 
460
  = 1.7.6 / 21.07.2016 =
461
+ * Fix issue with a conflict of Font and Text Color styles and styles of users custom themes (theme styles often override our styles, now it will not occur anymore)
462
  * Fixed issue for showing Popup on Homepage with posts listing and multiple pages of listings
463
  * Integration with Contact Form plugin (step 1 - correct show shortcodes)
464
  * Options with Disabling CDN usage description link added
469
  * Minor spelling issues fix
470
 
471
  = 1.7.5 / 21.06.2016 =
472
+ * Small fixes of welcome page and step-by-step tutorial
473
  * Fix small issue with Facebook Subscription
474
+ * Possibility to export all subscribers from all Popups - in one click from the Settings page
475
+ * Possibility to redirect to link URL after subscribe if On Click link was used to show Popup
476
+ * Fix issue with detecting required user roles for Show / Hide for user role functionality for cases when the user has several roles
477
 
478
  = 1.7.4 / 07.06.2016 =
479
  * Possibility to disable CDN server usage - and move all assets to own website
480
  * Fix issue with showing Pop-up on main Home Page if Home Page - is from WooCommerce plugin
481
+ * Code review and refactor
482
  * Minor improvements
483
 
484
  = 1.7.2 / 17.05.2016 =
485
  * Possibility to enable Label at the top of the Facebook Widget Popup
486
  * Option to show Pop-up if AdBlock is enabled - PRO
487
+ * Possibility to send any user data - to email with user confirm the link, and an email to new user subscribers
488
  * Added New Subscribers notification email Subject option
489
  * Show / Hide for selected User Roles option - PRO
490
  * Small fixes and improvements for Themes. #170 add 0.2h
491
  * Possibility to select categories for showing
492
  * Possibility to insert shortcodes in Subscribe fields values
493
  * Possibility to insert scripts - inside content (in text editors)
494
+ * Show Popup "On Click" - add additional check - after all scripts, that was triggered, will do their work - check it one more time - to make sure we didn't miss anyone
495
  * Fixed conflicts with WordPress plugins, that make URLs relative
496
  * Fixed conflicts with other themes and plugins, that using zoom jQuery method with same method name
497
  * Code review and improvements
498
 
499
  = 1.7.1 / 28.04.2016 =
500
  * New Template added - "Video List Flat"
501
+ * MailChimp API key - ignore space symbols in beginning or end of it in case they were inserted accidentally
502
  * Fix issue with Social Share by Supsystic project sharing re-selecting from Pop-up
503
  * Updated Italian translation
504
  * Additional TinyMCE check in admin area - to make sure we will not call errors in case it's absent on user WP configuration
529
  * Small spelling issues fix
530
 
531
  = 1.6.5 / 05.04.2016 =
532
+ * Possibility to use Subscribe, Login and Registration forms - in one Pop up, at one and the same time - all 3 forms together
533
  * Small fix for "Photodoto" Template
534
  * Added option "Redirect after close" - you can now redirect your users after they will close Popup
535
  * Emma email subscription service integration - PRO
536
  * Correct subscriber, registration and login form work with enable cache plugins (W3 Total Cache or Super Cache)
537
+ * Don't send standard WordPress new users notifications if all messages fields were cleared by the user
538
  * MailChimp - possibility to send welcome email from MailChimp even if double opt-in is disabled
539
+ * Fix issue with compatibility of subscribing - and login/registration forms
540
 
541
  = 1.6.4 / 29.03.2016 =
542
  * Compatibility with oldest versions of jquery library (some theme developers still use them)
551
  = 1.6.3 / 22.03.2016 =
552
  * Fix issue with showing Popup on WooCommerce "Shop" page only
553
  * Added another supported video hosting service
554
+ * Small fix for built-in content popup - do not load them in standard load query (they will be loaded from shortcodes)
555
  * Minor debug issues fix
556
 
557
  = 1.6.2 / 17.03.2016 =
568
  * ConvertKit subscription method integration - PRO
569
  * Login - login by Username by default
570
  * Disable block IP for multiple subscriptions by default
571
+ * Improve On Exit initialization (to avoid conflict with some modified jquery libraries)
572
  * Fixed minor conflicts in admin area with other javascript codes of other themes and plugins
573
  * Added possibility to use Registration and Login form - in one Popup at one and same time
574
  * Count time from first site load option added
579
 
580
  = 1.6.0 / 02.03.2016 =
581
  * Remove unused error message parts from MailChimp errors
582
+ * Salesforce - Web-to-Lead integration - PRO
583
+ * Close video after Popup was closed even if the template was not with video type
584
+ * Constant Contact - add contact even if it exists in some other subscription lists
585
  * InfusionSoft subscription method added - PRO
586
  * Additional compatibility with Google Maps Easy plugin https://wordpress.org/plugins/google-maps-easy/
587
  * Language files update and minor spelling issues fix
594
  = 1.5.8 / 23.02.2016 =
595
  * Jetpack subscription engine added - now you can subscribe to Jetpack!
596
  * Added Date display range
597
+ * Count already subscribed user as the subscriber on the client side if email already exists and "Redirect if email already exists" option is enabled
598
  * iContact Subscribe method integration
599
  * GetResponse Subscribe method improvements
600
+ * Always send the form on "Enter" press in Subscribe form
601
  * Fix issue with HTTPS loading fonts in Fonts PRO module
602
  * GetResponse - added new field - "Cycle Day"
603
  * Don't pass unused data - to fronted JavaScript: make code lighter
604
+ * MailChimp - fix issue with the limit of Subscribe lists, shown in the admin area (there was the standard limit in 25 lists)
605
  * Core code improve (minor "strict standards" php notice fix)
606
  * Facebook Subscribe - fix result messages (or errors) - now they will be visible in Pop-up itself
607
+ * When to close -> Only after action -> Added possibility to select time after an action that should pass before close
608
  * Update Spanish translation
609
  * Code review
610
 
619
 
620
  = 1.5.6 / 02.02.2016 =
621
  * Added subscribe from URL variable to subscribers emails - [subscribe_url]
622
+ * If the user is already subscribed to MailChimp - count this as done subscribe action, and not error
623
+ * "Email exists" error message option in the admin area
624
  * Reduce user browser memory usage to work correctly - make it faster and lighter!
625
+ * Functionality to show only for first-time visitors popup even if they are shown "On Click"
626
+ * Fix issue with opening Media Library on "Enter" key press in admin area edit screen
627
  * Small fix for Pop-up Template
628
+ * "Add Popup" button - in admin top bar: create your pop up faster!
629
 
630
  = 1.5.5 / 26.01.2016 =
631
  * MailChimp Groups functionality added
632
  * Do not send CSS and HTML data when editing plugin if they were not changed
633
+ * Possibility to force show Popup right after the page loaded using hash parameters
634
  * Minor fix for Business Template
635
  * Improve IP detection algorithm
636
+ * Small correct for TinyMCE buttons colors on Edit screen
637
  * Minor fixes for templates Video Classy, Layered Popup, Ready and Business
638
  * Added option "Disable window scroll" to disable browser window scrolling while Pop-up is opened
639
+ * Show for cases when the user selected invalid image as of the Backgrounds
640
 
641
  = 1.5.4 / 13.01.2016 =
642
+ * Possibility to create WordPress Subscribers with different than WordPress subscribers mail engine
643
  * Added option to load all plugin assets - in site footer - to increase page speed load
644
  * Correct detecting mobile device with On Exit functionality
645
  * Possibility to add attachments to email from plugin
696
 
697
  = 1.4.5 / 10.11.2015 =
698
  * Fixed issue with PRO for multi-sites
699
+ * Changed sort orders of Templates in the admin area
700
  * PRO - Updated Facebook API usage
701
  * Minor core code improvements
702
 
703
  = 1.4.4 / 05.11.2015 =
704
+ * Send statistics about social network action - when social icons are generated by Social Share Buttons by Supsystic plugin
705
  * PopUp "SIGN UP" template - minor CSS fix
706
  * Core minor improvement
707
 
708
  = 1.4.3 / 03.11.2015 =
709
  * New Animation library added - more animations with better performance!
710
  * Small issue fix with WordPress Subscribers export
711
+ * Small admin area user-friendly improvements
712
  * Corrections for responsiveness - now will correct display on all devices
713
+ * Added the Polish language
714
  * Small fix for Calm template
715
  * AB Testing - added possibility to select Main (Display) settings for tested Popup
716
  * MailRelay module - minor code improvements
719
 
720
  = 1.4.2 / 27.10.2015 =
721
  * Minor issues fix for "List Building", "Bonus" and "Smart" templates
722
+ * Remove admin tooltips animation - just to check how it will look like
723
  * Small fixes for preview templates Pink and Discount
724
  * Export subscribers to WordPress users list as CSV file (all subscribers - confirmed and unconfirmed too)
725
+ * Fix small issue with a possible empty REQUEST php array
726
  * Make custom selects in admin area - responsive
727
  * Fix List Green and Green Dots bullets
728
+ * Change version for js and CSS files each time new version is released - to avoid using browser cache
729
  * Small fixes for Business and Map style templates
730
 
731
  = 1.4.1 / 21.10.2015 =
732
+ * Added HTML5 Subscribe fields validation on the client side - fast and light!
733
  * Small fix to make proper work responsiveness + animation feature when need to reduce size after Pop-up will be shown
734
  * Fix issue for compatibility with styles output on some mobile devices
735
  * Admin WordPress more pretty menu icon
736
  * Additional clarification link to documentation about MailChimp usage
737
+ * Improve usability - move to the Design tab after the template was changed
738
+ * Backgrounds images preview in admin area - max-width to 300px
739
  * Admin area -> Make Background opacity slider - smaller
740
  * Small fix for Find Us and Map style templates
741
  * Admin area - fixes for small devices
746
  * Small spelling issues fix
747
  * Fixed optin template Map style
748
  * Fix issue with displaying popup and Google Maps in it (when Maps didn't load it's scripts correctly on some themes)
749
+ * Admin lead generator interface design small improvements - make it more user-friendly
750
+ * More interactions with our users - just trying to improve software for your needs!
751
  * Small fix for SendGrid admin js issue
752
 
753
  = 1.3.9 / 06.10.2015 =
760
  * Notification about new subscribers for all Subscription services functionality added
761
  * Added "Open in a new window" for Redirect after subscription functionality
762
  * Possibility to change Name and E-mail fields label
763
+ * Possibility to set Name field as the mandatory field
764
  * Mailrelay subscribe service integration - PRO
765
 
766
  = 1.3.7 / 24.09.2015 =
771
 
772
  = 1.3.6 / 22.09.2015 =
773
  * Moved static info - to CDN servers: make plugin lighter
774
+ * List popup - get only required information from the database -> reduce response size
775
  * Design corrections for admin Welcome page
776
+ * Switch admin area tabs control positions - make its usage more comfortable
777
  * Option for users, who want to help our plugin, check it in Settings tab -> Promo link
778
 
779
  = 1.3.5 / 17.09.2015 =
810
  * Added 4 new templates with Google Maps and Contact Form!
811
  * New text list bullet type
812
  * Added fix for servers without ctype_alpha standard PHP function
813
+ * Admin Popup preview - load all frontend styles and scripts - to make its view more like on frontend
814
  * Fix minor issues in templates
815
 
816
  = 1.2.9 / 04.08.2015 =
829
  = 1.2.7 / 24.07.2015 =
830
  * Added hide for Post Types functionality
831
  * Updated preview images, some fixes in templates
832
+ * Layered style - fix displaying saved setting in the admin area
833
  * Minor admin area design improvements
834
  * Integration with Social Share Buttons plugin - https://wordpress.org/plugins/social-share-buttons-by-supsystic/
835
  * Additional improvements for "On Click" show - now link can contain shortcode in any href attr place
838
  * Vertical Response Subscribe Engine integration - PRO
839
  * arpReach Subscribe Engine integration - PRO
840
  * SendGrid Subscribe Engine integration - PRO
841
+ * SG Autoresponder Engine integration - PRO
842
+ * Added "Show Only" option in addition for options Hide for Devices, Hide for Post Types, Hide for IP, Hide for Countries and Hide for Languages
843
  * Functionality to show - on Menu Item click
844
 
845
  = 1.2.6 / 16.07.2015 =
900
  * Some unused files remove
901
  * Small re-design on Layered style feature
902
  * Admin area design improvements
903
+ * Correct message for subscribing success when MailPoet is used as Subscribe engine
904
 
905
  = 1.1.9 / 07.05.2015 =
906
  * Code review
920
  * Admin area User Interface improvements - make it more comfortable and attractive for our Users
921
  * Fix conflict with some WordPress plugins in our Code editor tool (conflict with "codemirror" library)
922
  * Hide popup for Logged-in option
923
+ * Option to set period of time for hiding for already viewed users, or already made an action
924
 
925
  = 1.1.6 / 14.04.2015 =
926
  * Correction for cookie lifetime in recording user actions
941
  * Fixed conflict with Twig autoloaded re-defining in other plugins or themes
942
  * Facebook Pop-up - correct language detection
943
  * Correct displaying usual embed iframes with Google Maps
944
+ * PRO - added options: Close only after the action, after time passed - https://supsystic.com/plugins/popup-plugin/
945
  * PRO - added options: Show at the bottom of the page, after Inactivity, after User Comment option, after Purchasing (Checkout) - https://supsystic.com/plugins/popup-plugin/
946
  * PRO - Possibility to subscribe with Facebook - https://supsystic.com/plugins/popup-plugin/
947
  * PRO - Possibility to set user role for plugin usage (not just admin) - https://supsystic.com/plugins/popup-plugin/
978
  * Correct condition - for showing / hiding for specific post / page - don't show on posts listing, only on single post / page
979
 
980
  = 1.1.1 / 10.03.2015 =
981
+ * Subscription - possibility to modify subscribe messages - browser notifications, email subject, and content
982
  * Subscription - possibility to add Redirect after subscribe
983
+ * Statistics - show data if week/month is selected with a date range that is in current week/month
984
+ * MailChimp popup API class - minor correct for DEBUG mode
985
  * Correct popup saving "&" sign - in text fields
986
+ * Fix animations tab in the admin area
987
  * Correct animation for Facebook Like Popup - animate it only after whole content will be loaded from Facebook
988
  * Added popup link to documentation about usage code - HTML and CSS - editor
989
  * Correct process shortcode from any place (not only from post/page content) - sidebars, external themes/plugins, etc.
1007
  * Pop-up Installer improve
1008
 
1009
  = 1.0.9 / 24.02.2015 =
1010
+ * Allow assigning new subscribers - special roles
1011
+ * Option to disable Popup for Mobile, Tablet or Desktop PC
1012
  * Additional fix for mobile devices
1013
  * Small fix for latest added new templates
1014
  * Main edit tabs sticky functionality - make it work with some standard notifications
1015
  * Show Popup label always on top of edit tabs on edit screen - more user-friendly
1016
+ * Option to show Pop-up - after scroll window - right after a scroll or with delay
1017
  * Layered integration - https://supsystic.com/plugins/popup-plugin/
1018
+ * Additional modification for "Click On" show mode - to make sure it works with more content editor systems
1019
  * A/B testing - tests should stay tests even after whole design change - fixed - https://supsystic.com/plugins/popup-plugin/
1020
+ * Admin list table - do not stick header line (call too many problems and don't need this)
1021
  * Correct show on mobile devices - every size, every type
1022
  * Fix sticky edit tabs scroll position
1023
 
1048
  = 1.0.6 =
1049
  * MailChimp integration with popup
1050
  * Video popup - Autoplay option added
1051
+ * Correct position set for Facebook Like Popup - depends on the position on widget size after it will be loaded
1052
+ * Re-calculate position for each Popup - after the window was resized
1053
  * Fix issue with Facebook Like Popup array options
1054
+ * Disable popup clicking and submitting forms inside preview iFrame in the admin area
1055
  * Fix images load as background - added load WordPress media gallery
1056
  * List Building and Video List templates - fix subscribe Submit button name option
1057
  * Fastest and Easiest template - fix subscribe enable/disabler name option
1060
  * Rename admin area menu items - make it more intuitive and user-friendly
1061
  * Fix preview iFrame issue in admin area - when for some cases scripts with "ppsHidePreviewUpdating" was not loaded when iFrame was already loaded
1062
  * Tooltip functionality in admin area optimization
1063
+ * Some wording changes in the admin area
1064
  * Compress some javascript libraries and remove unused files to make plugin lighter
1065
+ * Admin popup UI design minor optimizations - make its usage more comfortable for You
1066
 
1067
  = 1.0.5 =
1068
  * Fixed activation warning with DEBUG mode enabled