Responsive Pricing Table - Version 5.1.6

Version Description

  • Fixed UI issue on adding new plans
Download this release

Release Info

Developer spwebguy
Plugin Icon 128x128 Responsive Pricing Table
Version 5.1.6
Comparing to
See all releases

Code changes from version 5.1.5 to 5.1.6

Files changed (4) hide show
  1. inc/dmb/dmb.js +3 -3
  2. inc/dmb/dmb.min.js +1 -1
  3. readme.txt +5 -2
  4. rpt.php +2 -2
inc/dmb/dmb.js CHANGED
@@ -57,10 +57,10 @@ $(document).ready(function (){
57
  $( '.dmb_no_row_notice' ).show();
58
  }
59
  // Shows/hides Add a pricing plan/Clone buttons when table is full.
60
- if($('.dmb_main').not('.dmb_empty_plan').length > 4){
61
- $( '.dmb_add_row, .clone-row' ).hide();
62
  } else {
63
- $( '.dmb_add_row, .clone-row' ).show();
64
  }
65
  }
66
 
57
  $( '.dmb_no_row_notice' ).show();
58
  }
59
  // Shows/hides Add a pricing plan/Clone buttons when table is full.
60
+ if($('.dmb_main').not('.dmb_empty_plan').length > 5){
61
+ $( '.dmb_add_row, .dmb_clone_row' ).hide();
62
  } else {
63
+ $( '.dmb_add_row, .dmb_clone_row' ).show();
64
  }
65
  }
66
 
inc/dmb/dmb.min.js CHANGED
@@ -2,4 +2,4 @@
2
  * Responsive Pricing Table Admin JS (minified)
3
  */
4
 
5
- !function(e){e(document).ready(function(){function t(e,t,i){var n;return function(){var r=this,o=arguments,s=i&&!n;clearTimeout(n),n=setTimeout(function(){n=null,i||e.apply(r,o)},t),s&&e.apply(r,o)}}var i;i=jQuery.fn.clone,jQuery.fn.clone=function(){for(var t=i.apply(this,arguments),n=this.find("textarea").add(this.filter("textarea")),r=t.find("textarea").add(t.filter("textarea")),o=this.find("select").add(this.filter("select")),s=t.find("select").add(t.filter("select")),a=0,l=n.length;a<l;++a)e(r[a]).val(e(n[a]).val());for(a=0,l=o.length;a<l;++a)s[a].selectedIndex=o[a].selectedIndex;return t};function n(){e(".dmb_main").not(".dmb_empty_plan").length>0?e(".dmb_no_row_notice").hide():e(".dmb_no_row_notice").show(),e(".dmb_main").not(".dmb_empty_plan").length>4?e(".dmb_add_row, .clone-row").hide():e(".dmb_add_row, .clone-row").show()}e(".dmb_color_picker").each(function(t,i){e(this).wpColorPicker()}),n();var r=new Array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f");function o(e){return"#"+s((e=e.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/))[1])+s(e[2])+s(e[3])}function s(e){return isNaN(e)?"00":r[(e-e%16)/16]+r[e%16]}function a(t){var i=e(t).closest(".dmb_main").find(".dmb_feature_dump"),n=e(t).closest(".dmb_main").find(".dmb_feature_field");if(0==n.length)i.val("");else{var r=[];n.each(function(t,n){if(e(this).val()){var o=e(this).val().split(",").join(")--(");r.push(o);var s=r.toString().split(",").join("\n").split(")--(").join(",");i.val(s)}})}return!1}e(".dmb_icon_data_url").each(function(t,i){var n=e(this).attr("data-icon");if(""!=n){var r=e(this).siblings(".dmb_upload_icon_btn");e(this).siblings(".dmb_icon_field").val(n),e("<br/><img src='"+n+"' class='dmb_icon_img'/><div class='dmb_clearfix imgClearfix'></div>").insertAfter(r),e('<a class="dmb_remove_icon_btn dmb_button dmb_button_large dmb_button_compact" href="#"><span class="dashicons dashicons-trash"></span></a>').insertAfter(r)}}),e(".dmb_main").not(".dmb_empty_plan").each(function(t,i){var n=e(this).find(".dmb_feature_dump").val(),r=e(this).find(".dmb_features");""!=n&&(n+="\n",e.each(n.split("\n").slice(0,-1),function(e,t){cleanedItem=t.replace(")--(",","),r.append('<div class="dmb_feature"><input class="dmb_field dmb_feature_field" type="text" value="" /><a class="dmb_remove_feature_btn" href="#"><span class="dashicons dashicons-no-alt"></span></a>\t\t<a class="dmb_move_feature_down_btn" class="button" href="#"><span class="dashicons dashicons-arrow-down-alt2"></span></a><a class="dmb_move_feature_up_btn" class="button" href="#"><span class="dashicons dashicons-arrow-up-alt2"></span></a></div>'),r.find(".dmb_feature_field:last").val(cleanedItem)}))}),e("body").on("click",".dmb_remove_icon_btn",function(t){return e(this).parent().find(".dmb_icon_img").remove(),e(this).parent().find(".imgClearfix").remove(),e(this).parent().find(".dmb_icon_field").val(""),e(this).remove(),!1}),e("body").on("click",".dmb_upload_icon_btn",function(){return upload_button=e(this),isAlreadyImg=e(this).siblings(".dmb_icon_data_url").attr("data-icon"),window.send_to_editor=function(t){imgUrl=e(t).attr("src"),isAlreadyImg&&(upload_button.parent().find(".dmb_icon_img").remove(),upload_button.parent().find(".dmb_remove_icon_btn").remove()),e("<br/><img src='"+imgUrl+"' class='dmb_icon_img'/><div class='dmb_clearfix imgClearfix'></div>").insertAfter(upload_button),e('<a class="dmb_remove_icon_btn dmb_button dmb_button_large dmb_button_compact" href="#"><span class="dashicons dashicons-trash"></span></a>').insertAfter(upload_button),upload_button.siblings(".dmb_icon_field").val(imgUrl),tb_remove()},tb_show("","media-upload.php?type=image&amp;TB_iframe=true"),!1}),e("body").on("click",".dmb_add_feature",function(){var t=e(this).siblings(".dmb_features").find(".dmb_feature:last .dmb_feature_field");if(""!=t.val()){var i=e(".empty-feature").clone(!0);return i.removeClass("empty-feature").show(),e(this).siblings(".dmb_features").append(i),i.find(".dmb_feature_field").focus(),!1}return t.focus(),!1}),e("body").on("click",".dmb_remove_feature_btn",function(t){return featureList=e(this).closest(".dmb_features"),e(this).parent().remove(),a(e(featureList)),!1}),e("body").on("click",".dmb_move_feature_down_btn",function(t){var i=e(this).closest(".dmb_feature");if(i.next().length>0){var n=i.clone().insertAfter(i.next());i.remove(),a(e(n))}return!1}),e("body").on("click",".dmb_move_feature_up_btn",function(t){var i=e(this).closest(".dmb_feature");if(i.prev().length>0){var n=i.clone().insertBefore(i.prev());i.remove(),a(e(n))}return!1}),e("body").on("keyup",".dmb_feature_field",t(function(t){a(e(this))},150)),e("body").on("click",".dmb_add_row",function(){var t=e(".dmb_empty_plan").clone(!0);return t.removeClass("dmb_empty_plan").addClass("dmb_main").show(),t.find(".emptyDump").removeClass("emptyDump").addClass("dmb_feature_dump"),t.insertBefore(e(".dmb_empty_plan")),t.find(".dmb_title_of_plan").focus(),t.find(".dmb_color_picker_ready").removeClass(".dmb_color_picker_ready").addClass(".dmb_color_picker").wpColorPicker().css({padding:"3px"}),t.find(".dmb_handle_title").html(objectL10n.untitled),n(),!1}),e("body").on("click",".dmb_remove_row_btn",function(t){return e(this).closest(".dmb_main").remove(),n(),!1}),e("body").on("click",".dmb_handle",function(t){return e(this).siblings(".dmb_inner").slideToggle(50),e(this).hasClass("closed")?e(this).removeClass("closed"):e(this).addClass("closed"),!1}),e("body").on("click",".dmb_collapse_rows",function(t){return e(".dmb_handle").each(function(t,i){e(this).closest(".dmb_empty_plan").length||e(this).hasClass("closed")||(e(this).siblings(".dmb_inner").slideToggle(50),e(this).addClass("closed"))}),!1}),e("body").on("click",".dmb_expand_rows",function(t){return e(".dmb_handle").each(function(t,i){e(this).hasClass("closed")&&(e(this).siblings(".dmb_inner").slideToggle(50),e(this).removeClass("closed"))}),!1}),e("body").on("click",".dmb_move_row_down",function(t){if(e(this).closest(".dmb_main").next().hasClass("dmb_main")){var i=e(this).closest(".dmb_main").clone(!0);i.insertAfter(e(this).closest(".dmb_main").next());var n=i.find(".wp-color-result").css("backgroundColor");i.find(".wp-picker-container").remove(),i.find(".dmb_color_box").append('<input class="dmb_color_picker dmb_field" name="plan_colors[]" type="text" value="'+o(n)+'" />'),i.find(".dmb_color_picker").wpColorPicker(),e(this).closest(".dmb_main").remove()}return!1}),e("body").on("click",".dmb_move_row_up",function(t){if(e(this).closest(".dmb_main").prev().hasClass("dmb_main")){var i=e(this).closest(".dmb_main").clone(!0);i.insertBefore(e(this).closest(".dmb_main").prev());var n=i.find(".wp-color-result").css("backgroundColor");i.find(".wp-picker-container").remove(),i.find(".dmb_color_box").append('<input class="dmb_color_picker dmb_field" name="plan_colors[]" type="text" value="'+o(n)+'" />'),i.find(".dmb_color_picker").wpColorPicker(),e(this).closest(".dmb_main").remove()}return!1}),e("body").on("click",".dmb_clone_row",function(t){var i=e(this).closest(".dmb_main").clone(!0);i.insertAfter(e(this).closest(".dmb_main")),i.find(".dmb_handle_title").html(i.find(".dmb_title_of_plan").val()+" ("+objectL10n.copy+")"),i.find(".dmb_title_of_plan").focus();var r=e(this).closest(".dmb_main").find(".wp-color-result").css("backgroundColor");return i.find(".wp-picker-container").remove(),i.find(".dmb_color_box").append('<input class="dmb_color_picker dmb_field" name="plan_colors[]" type="text" value="'+o(r)+'" />'),i.find(".dmb_color_picker").wpColorPicker(),n(),!1}),e(".dmb_title_of_plan").each(function(t,i){""!=e(this).val()&&e(this).closest(".dmb_main").find(".dmb_handle_title").html(e(this).val())}),e("body").on("keyup",".dmb_title_of_plan",t(function(t){var i=e(this),n=i.closest(".dmb_main").find(".dmb_handle_title");""!=i.val()?n.html(i.val()):n.html(objectL10n.untitled)},50)),e("body").on("click",".dmb_text_settings_box_show",function(){e(".dmb_text_settings_box").toggle()}),e("body").on("click",".dmb_show_preview_table",function(){var t={};t.planCount=e(".dmb_main").not(".dmb_empty_plan").length,t.tableCurrency=e("input[name='table_currency']").val(),t.fontTitleAlignment=e("select[name='font_title_alignment'] option:selected").val(),t.fontSizeTitle=e("select[name='font_size_title'] option:selected").val(),t.fontSizeSubtitle=e("select[name='font_size_subtitle'] option:selected").val(),t.fontSizeDescription=e("select[name='font_size_description'] option:selected").val(),t.fontSizePrice=e("select[name='font_size_price'] option:selected").val(),t.fontSizeRecurrence=e("select[name='font_size_recurrence'] option:selected").val(),t.fontSizeButton=e("select[name='font_size_button'] option:selected").val(),t.fontSizeFeatures=e("select[name='font_size_features'] option:selected").val(),"small"==t.fontSizeTitle?t.fontSizeTitle=" rpt_sm_title":"tiny"==t.fontSizeTitle?t.fontSizeTitle=" rpt_xsm_title":t.fontSizeTitle="","small"==t.fontSizeSubtitle?t.fontSizeSubtitle=" rpt_sm_subtitle":"tiny"==t.fontSizeSubtitle?t.fontSizeSubtitle=" rpt_xsm_subtitle":t.fontSizeSubtitle="","small"==t.fontSizeDescription?t.fontSizeDescription=" rpt_sm_description":t.fontSizeDescription="","small"==t.fontSizePrice?t.fontSizePrice=" rpt_sm_price":"tiny"==t.fontSizePrice?t.fontSizePrice=" rpt_xsm_price":"supertiny"==t.fontSizePrice?t.fontSizePrice=" rpt_xxsm_price":t.fontSizePrice="","small"==t.fontSizeRecurrence?t.fontSizeRecurrence=" rpt_sm_recurrence":t.fontSizeRecurrence="","small"==t.fontSizeFeatures?t.fontSizeFeatures=" rpt_sm_features":t.fontSizeFeatures="","small"==t.fontSizeButton?t.fontSizeButton=" rpt_sm_button":t.fontSizeButton="";var i="";i+='<div id="rpt_pricr" style="margin-top:100px;" class="rpt_plans rpt_'+t.planCount+'_plans rpt_style_basic">',i+='<div class="'+t.fontSizeTitle+" "+t.fontSizeSubtitle+" "+t.fontSizeDescription+" "+t.fontSizePrice+" "+t.fontSizeRecurrence+" "+t.fontSizeButton+" "+t.fontSizeFeatures+'">',i+='<style>.rpt_plans .rpt_plan .rpt_foot{line-height:34px;} #rpt_pricr{font-family: "Helvetica Neue", Arial, sans-serif; font-weight: 300; line-height: 27px;}</style>',e(".dmb_main").not(".dmb_empty_plan").each(function(n,r){var s={},a={};s.title=e(this).find(".dmb_title_of_plan").val(),s.subtitle=e(this).find(".dmb_subtitle_of_plan").val(),s.recurrence=e(this).find(".dmb_recurrence_of_plan").val(),s.price=e(this).find(".dmb_price_of_plan").val(),s.description=e(this).find(".dmb_description_of_plan").val(),s.icon=e(this).find(".dmb_icon_of_plan").attr("data-icon"),s.recommended=e(this).find(".dmb_switch_recommended").find(":selected").val(),s.free=e(this).find(".dmb_switch_free").find(":selected").val(),s.features=e(this).find(".dmb_features_of_plan").val(),s.buttonText=e(this).find(".dmb_button_text_of_plan").val(),s.customButton=e(this).find(".dmb_custom_button_of_plan").val(),s.color=o(e(this).find(".wp-color-result").css("backgroundColor"))||"#8dba09",s.recommended&&"yes"==s.recommended?(a.recoClass="rpt_recommended_plan",a.recoImg='<img class="rpt_recommended" src="../wp-content/plugins/dk-pricr-responsive-pricing-table/inc/img/rpt_recommended.png"/>'):(a.recoImg="",a.recoClass=""),i+='<div class="rpt_plan rpt_plan_'+n+" "+a.recoClass+'">',a.titleStyle='style="text-align:'+t.fontTitleAlignment+';"',s.title&&(i+="<div "+a.titleStyle+' class="rpt_title rpt_title_'+n+'">',s.icon&&(i+='<img height=30px width=30px src="'+s.icon+'" class="rpt_icon rpt_icon_'+n+'"/> '),i+=s.title,i+=a.recoImg+"</div>"),i+='<div class="rpt_head rpt_head_'+n+'">',s.recurrence&&(i+='<div class="rpt_recurrence rpt_recurrence_'+n+'">'+s.recurrence+"</div>"),s.price&&(i+='<div class="rpt_price rpt_price_'+n+'">',"yes"==s.free||"on"==s.free?(i+='<sup class="rpt_currency">',i+="</sup>"):t.tableCurrency?(i+='<sup class="rpt_currency">',i+=t.tableCurrency,i+="</sup>"):(i+='<sup class="rpt_currency">',i+="</sup>"),i+=s.price,i+="</div>"),s.subtitle&&(i+='<div style="color:'+s.color+';" class="rpt_subtitle rpt_subtitle_'+n+'">'+s.subtitle+"</div>"),s.description&&(i+='<div class="rpt_description rpt_description_'+n+'">'+s.description+"</div>"),i+='<div style="clear:both;"></div>',i+="</div>",s.features&&(i+='<div class="rpt_features rpt_features_'+n+'">',a.features=[],a.featureString=s.features,a.featureStringArray=a.featureString.split("\n"),a.featureStringArray=a.featureStringArray.map(function(e){return e.trim()}),e.each(a.featureStringArray,function(e,t){var i,n;a.features.push((i=t,n=((((n="<strong></strong><br><br/></br><img><a>")||"")+"").toLowerCase().match(/<[a-z][a-z0-9]*>/g)||[]).join(""),i.replace(/<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi,"").replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,function(e,t){return n.indexOf("<"+t.toLowerCase()+">")>-1?e:""})))}),e.each(a.featureStringArray,function(e,t){if(t){if("-n"==t.substr(0,2)){t=t.substr(2);var r="#bbbbbb"}else r="black";i+='<div style="color:'+r+';" class="rpt_feature rpt_feature_'+n+"-"+e+'">',i+=t,i+="</div>"}}),i+="</div>",i+='<div style="clear:both;"></div>'),s.customButton?(i+='<div class="rpt_custom_btn" style="background-color:'+s.color+'">',i+=s.customButton,i+="</div>"):(s.buttonText?(i+='<a href="#" style="background:'+s.color+'" class="rpt_foot rpt_foot_'+n+'">',i+=s.buttonText):i+='<a style="background:'+s.color+'" class="rpt_foot rpt_foot_'+n+'">',i+="</a>"),i+="</div>"}),i+="</div>",i+="</div>",i+='<div style="clear:both;"></div>',i+='<div class="dmb_accuracy_preview_notice">'+objectL10n.previewAccuracy+"</div>",0==t.planCount?e("#dmb_preview_table").append('<div class="dmb_no_row_preview_notice">'+objectL10n.noPlan+"</div>"):e("#dmb_preview_table").append(i),e("#dmb_preview_table").fadeIn(100),setTimeout(function(){e("img.rpt_recommended").each(function(){var t=e(this).parent().outerHeight()/2-e(this).height()/2;e(this).css("top",t-2+"px")})},50)}),e("body").on("click",".dmb_preview_table_close",function(){e("#dmb_preview_table #rpt_pricr, .dmb_accuracy_preview_notice, .dmb_no_row_preview_notice").remove(),e("#dmb_preview_table").fadeOut(100)})})}(jQuery);
2
  * Responsive Pricing Table Admin JS (minified)
3
  */
4
 
5
+ !function(e){e(document).ready(function(){function t(e,t,i){var n;return function(){var r=this,o=arguments,s=i&&!n;clearTimeout(n),n=setTimeout(function(){n=null,i||e.apply(r,o)},t),s&&e.apply(r,o)}}var i;i=jQuery.fn.clone,jQuery.fn.clone=function(){for(var t=i.apply(this,arguments),n=this.find("textarea").add(this.filter("textarea")),r=t.find("textarea").add(t.filter("textarea")),o=this.find("select").add(this.filter("select")),s=t.find("select").add(t.filter("select")),a=0,l=n.length;a<l;++a)e(r[a]).val(e(n[a]).val());for(a=0,l=o.length;a<l;++a)s[a].selectedIndex=o[a].selectedIndex;return t};function n(){e(".dmb_main").not(".dmb_empty_plan").length>0?e(".dmb_no_row_notice").hide():e(".dmb_no_row_notice").show(),e(".dmb_main").not(".dmb_empty_plan").length>5?e(".dmb_add_row, .dmb_clone_row").hide():e(".dmb_add_row, .dmb_clone_row").show()}e(".dmb_color_picker").each(function(t,i){e(this).wpColorPicker()}),n();var r=new Array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f");function o(e){return"#"+s((e=e.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/))[1])+s(e[2])+s(e[3])}function s(e){return isNaN(e)?"00":r[(e-e%16)/16]+r[e%16]}function a(t){var i=e(t).closest(".dmb_main").find(".dmb_feature_dump"),n=e(t).closest(".dmb_main").find(".dmb_feature_field");if(0==n.length)i.val("");else{var r=[];n.each(function(t,n){if(e(this).val()){var o=e(this).val().split(",").join(")--(");r.push(o);var s=r.toString().split(",").join("\n").split(")--(").join(",");i.val(s)}})}return!1}e(".dmb_icon_data_url").each(function(t,i){var n=e(this).attr("data-icon");if(""!=n){var r=e(this).siblings(".dmb_upload_icon_btn");e(this).siblings(".dmb_icon_field").val(n),e("<br/><img src='"+n+"' class='dmb_icon_img'/><div class='dmb_clearfix imgClearfix'></div>").insertAfter(r),e('<a class="dmb_remove_icon_btn dmb_button dmb_button_large dmb_button_compact" href="#"><span class="dashicons dashicons-trash"></span></a>').insertAfter(r)}}),e(".dmb_main").not(".dmb_empty_plan").each(function(t,i){var n=e(this).find(".dmb_feature_dump").val(),r=e(this).find(".dmb_features");""!=n&&(n+="\n",e.each(n.split("\n").slice(0,-1),function(e,t){cleanedItem=t.replace(")--(",","),r.append('<div class="dmb_feature"><input class="dmb_field dmb_feature_field" type="text" value="" /><a class="dmb_remove_feature_btn" href="#"><span class="dashicons dashicons-no-alt"></span></a>\t\t<a class="dmb_move_feature_down_btn" class="button" href="#"><span class="dashicons dashicons-arrow-down-alt2"></span></a><a class="dmb_move_feature_up_btn" class="button" href="#"><span class="dashicons dashicons-arrow-up-alt2"></span></a></div>'),r.find(".dmb_feature_field:last").val(cleanedItem)}))}),e("body").on("click",".dmb_remove_icon_btn",function(t){return e(this).parent().find(".dmb_icon_img").remove(),e(this).parent().find(".imgClearfix").remove(),e(this).parent().find(".dmb_icon_field").val(""),e(this).remove(),!1}),e("body").on("click",".dmb_upload_icon_btn",function(){return upload_button=e(this),isAlreadyImg=e(this).siblings(".dmb_icon_data_url").attr("data-icon"),window.send_to_editor=function(t){imgUrl=e(t).attr("src"),isAlreadyImg&&(upload_button.parent().find(".dmb_icon_img").remove(),upload_button.parent().find(".dmb_remove_icon_btn").remove()),e("<br/><img src='"+imgUrl+"' class='dmb_icon_img'/><div class='dmb_clearfix imgClearfix'></div>").insertAfter(upload_button),e('<a class="dmb_remove_icon_btn dmb_button dmb_button_large dmb_button_compact" href="#"><span class="dashicons dashicons-trash"></span></a>').insertAfter(upload_button),upload_button.siblings(".dmb_icon_field").val(imgUrl),tb_remove()},tb_show("","media-upload.php?type=image&amp;TB_iframe=true"),!1}),e("body").on("click",".dmb_add_feature",function(){var t=e(this).siblings(".dmb_features").find(".dmb_feature:last .dmb_feature_field");if(""!=t.val()){var i=e(".empty-feature").clone(!0);return i.removeClass("empty-feature").show(),e(this).siblings(".dmb_features").append(i),i.find(".dmb_feature_field").focus(),!1}return t.focus(),!1}),e("body").on("click",".dmb_remove_feature_btn",function(t){return featureList=e(this).closest(".dmb_features"),e(this).parent().remove(),a(e(featureList)),!1}),e("body").on("click",".dmb_move_feature_down_btn",function(t){var i=e(this).closest(".dmb_feature");if(i.next().length>0){var n=i.clone().insertAfter(i.next());i.remove(),a(e(n))}return!1}),e("body").on("click",".dmb_move_feature_up_btn",function(t){var i=e(this).closest(".dmb_feature");if(i.prev().length>0){var n=i.clone().insertBefore(i.prev());i.remove(),a(e(n))}return!1}),e("body").on("keyup",".dmb_feature_field",t(function(t){a(e(this))},150)),e("body").on("click",".dmb_add_row",function(){var t=e(".dmb_empty_plan").clone(!0);return t.removeClass("dmb_empty_plan").addClass("dmb_main").show(),t.find(".emptyDump").removeClass("emptyDump").addClass("dmb_feature_dump"),t.insertBefore(e(".dmb_empty_plan")),t.find(".dmb_title_of_plan").focus(),t.find(".dmb_color_picker_ready").removeClass(".dmb_color_picker_ready").addClass(".dmb_color_picker").wpColorPicker().css({padding:"3px"}),t.find(".dmb_handle_title").html(objectL10n.untitled),n(),!1}),e("body").on("click",".dmb_remove_row_btn",function(t){return e(this).closest(".dmb_main").remove(),n(),!1}),e("body").on("click",".dmb_handle",function(t){return e(this).siblings(".dmb_inner").slideToggle(50),e(this).hasClass("closed")?e(this).removeClass("closed"):e(this).addClass("closed"),!1}),e("body").on("click",".dmb_collapse_rows",function(t){return e(".dmb_handle").each(function(t,i){e(this).closest(".dmb_empty_plan").length||e(this).hasClass("closed")||(e(this).siblings(".dmb_inner").slideToggle(50),e(this).addClass("closed"))}),!1}),e("body").on("click",".dmb_expand_rows",function(t){return e(".dmb_handle").each(function(t,i){e(this).hasClass("closed")&&(e(this).siblings(".dmb_inner").slideToggle(50),e(this).removeClass("closed"))}),!1}),e("body").on("click",".dmb_move_row_down",function(t){if(e(this).closest(".dmb_main").next().hasClass("dmb_main")){var i=e(this).closest(".dmb_main").clone(!0);i.insertAfter(e(this).closest(".dmb_main").next());var n=i.find(".wp-color-result").css("backgroundColor");i.find(".wp-picker-container").remove(),i.find(".dmb_color_box").append('<input class="dmb_color_picker dmb_field" name="plan_colors[]" type="text" value="'+o(n)+'" />'),i.find(".dmb_color_picker").wpColorPicker(),e(this).closest(".dmb_main").remove()}return!1}),e("body").on("click",".dmb_move_row_up",function(t){if(e(this).closest(".dmb_main").prev().hasClass("dmb_main")){var i=e(this).closest(".dmb_main").clone(!0);i.insertBefore(e(this).closest(".dmb_main").prev());var n=i.find(".wp-color-result").css("backgroundColor");i.find(".wp-picker-container").remove(),i.find(".dmb_color_box").append('<input class="dmb_color_picker dmb_field" name="plan_colors[]" type="text" value="'+o(n)+'" />'),i.find(".dmb_color_picker").wpColorPicker(),e(this).closest(".dmb_main").remove()}return!1}),e("body").on("click",".dmb_clone_row",function(t){var i=e(this).closest(".dmb_main").clone(!0);i.insertAfter(e(this).closest(".dmb_main")),i.find(".dmb_handle_title").html(i.find(".dmb_title_of_plan").val()+" ("+objectL10n.copy+")"),i.find(".dmb_title_of_plan").focus();var r=e(this).closest(".dmb_main").find(".wp-color-result").css("backgroundColor");return i.find(".wp-picker-container").remove(),i.find(".dmb_color_box").append('<input class="dmb_color_picker dmb_field" name="plan_colors[]" type="text" value="'+o(r)+'" />'),i.find(".dmb_color_picker").wpColorPicker(),n(),!1}),e(".dmb_title_of_plan").each(function(t,i){""!=e(this).val()&&e(this).closest(".dmb_main").find(".dmb_handle_title").html(e(this).val())}),e("body").on("keyup",".dmb_title_of_plan",t(function(t){var i=e(this),n=i.closest(".dmb_main").find(".dmb_handle_title");""!=i.val()?n.html(i.val()):n.html(objectL10n.untitled)},50)),e("body").on("click",".dmb_text_settings_box_show",function(){e(".dmb_text_settings_box").toggle()}),e("body").on("click",".dmb_show_preview_table",function(){var t={};t.planCount=e(".dmb_main").not(".dmb_empty_plan").length,t.tableCurrency=e("input[name='table_currency']").val(),t.fontTitleAlignment=e("select[name='font_title_alignment'] option:selected").val(),t.fontSizeTitle=e("select[name='font_size_title'] option:selected").val(),t.fontSizeSubtitle=e("select[name='font_size_subtitle'] option:selected").val(),t.fontSizeDescription=e("select[name='font_size_description'] option:selected").val(),t.fontSizePrice=e("select[name='font_size_price'] option:selected").val(),t.fontSizeRecurrence=e("select[name='font_size_recurrence'] option:selected").val(),t.fontSizeButton=e("select[name='font_size_button'] option:selected").val(),t.fontSizeFeatures=e("select[name='font_size_features'] option:selected").val(),"small"==t.fontSizeTitle?t.fontSizeTitle=" rpt_sm_title":"tiny"==t.fontSizeTitle?t.fontSizeTitle=" rpt_xsm_title":t.fontSizeTitle="","small"==t.fontSizeSubtitle?t.fontSizeSubtitle=" rpt_sm_subtitle":"tiny"==t.fontSizeSubtitle?t.fontSizeSubtitle=" rpt_xsm_subtitle":t.fontSizeSubtitle="","small"==t.fontSizeDescription?t.fontSizeDescription=" rpt_sm_description":t.fontSizeDescription="","small"==t.fontSizePrice?t.fontSizePrice=" rpt_sm_price":"tiny"==t.fontSizePrice?t.fontSizePrice=" rpt_xsm_price":"supertiny"==t.fontSizePrice?t.fontSizePrice=" rpt_xxsm_price":t.fontSizePrice="","small"==t.fontSizeRecurrence?t.fontSizeRecurrence=" rpt_sm_recurrence":t.fontSizeRecurrence="","small"==t.fontSizeFeatures?t.fontSizeFeatures=" rpt_sm_features":t.fontSizeFeatures="","small"==t.fontSizeButton?t.fontSizeButton=" rpt_sm_button":t.fontSizeButton="";var i="";i+='<div id="rpt_pricr" style="margin-top:100px;" class="rpt_plans rpt_'+t.planCount+'_plans rpt_style_basic">',i+='<div class="'+t.fontSizeTitle+" "+t.fontSizeSubtitle+" "+t.fontSizeDescription+" "+t.fontSizePrice+" "+t.fontSizeRecurrence+" "+t.fontSizeButton+" "+t.fontSizeFeatures+'">',i+='<style>.rpt_plans .rpt_plan .rpt_foot{line-height:34px;} #rpt_pricr{font-family: "Helvetica Neue", Arial, sans-serif; font-weight: 300; line-height: 27px;}</style>',e(".dmb_main").not(".dmb_empty_plan").each(function(n,r){var s={},a={};s.title=e(this).find(".dmb_title_of_plan").val(),s.subtitle=e(this).find(".dmb_subtitle_of_plan").val(),s.recurrence=e(this).find(".dmb_recurrence_of_plan").val(),s.price=e(this).find(".dmb_price_of_plan").val(),s.description=e(this).find(".dmb_description_of_plan").val(),s.icon=e(this).find(".dmb_icon_of_plan").attr("data-icon"),s.recommended=e(this).find(".dmb_switch_recommended").find(":selected").val(),s.free=e(this).find(".dmb_switch_free").find(":selected").val(),s.features=e(this).find(".dmb_features_of_plan").val(),s.buttonText=e(this).find(".dmb_button_text_of_plan").val(),s.customButton=e(this).find(".dmb_custom_button_of_plan").val(),s.color=o(e(this).find(".wp-color-result").css("backgroundColor"))||"#8dba09",s.recommended&&"yes"==s.recommended?(a.recoClass="rpt_recommended_plan",a.recoImg='<img class="rpt_recommended" src="../wp-content/plugins/dk-pricr-responsive-pricing-table/inc/img/rpt_recommended.png"/>'):(a.recoImg="",a.recoClass=""),i+='<div class="rpt_plan rpt_plan_'+n+" "+a.recoClass+'">',a.titleStyle='style="text-align:'+t.fontTitleAlignment+';"',s.title&&(i+="<div "+a.titleStyle+' class="rpt_title rpt_title_'+n+'">',s.icon&&(i+='<img height=30px width=30px src="'+s.icon+'" class="rpt_icon rpt_icon_'+n+'"/> '),i+=s.title,i+=a.recoImg+"</div>"),i+='<div class="rpt_head rpt_head_'+n+'">',s.recurrence&&(i+='<div class="rpt_recurrence rpt_recurrence_'+n+'">'+s.recurrence+"</div>"),s.price&&(i+='<div class="rpt_price rpt_price_'+n+'">',"yes"==s.free||"on"==s.free?(i+='<sup class="rpt_currency">',i+="</sup>"):t.tableCurrency?(i+='<sup class="rpt_currency">',i+=t.tableCurrency,i+="</sup>"):(i+='<sup class="rpt_currency">',i+="</sup>"),i+=s.price,i+="</div>"),s.subtitle&&(i+='<div style="color:'+s.color+';" class="rpt_subtitle rpt_subtitle_'+n+'">'+s.subtitle+"</div>"),s.description&&(i+='<div class="rpt_description rpt_description_'+n+'">'+s.description+"</div>"),i+='<div style="clear:both;"></div>',i+="</div>",s.features&&(i+='<div class="rpt_features rpt_features_'+n+'">',a.features=[],a.featureString=s.features,a.featureStringArray=a.featureString.split("\n"),a.featureStringArray=a.featureStringArray.map(function(e){return e.trim()}),e.each(a.featureStringArray,function(e,t){var i,n;a.features.push((i=t,n=((((n="<strong></strong><br><br/></br><img><a>")||"")+"").toLowerCase().match(/<[a-z][a-z0-9]*>/g)||[]).join(""),i.replace(/<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi,"").replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,function(e,t){return n.indexOf("<"+t.toLowerCase()+">")>-1?e:""})))}),e.each(a.featureStringArray,function(e,t){if(t){if("-n"==t.substr(0,2)){t=t.substr(2);var r="#bbbbbb"}else r="black";i+='<div style="color:'+r+';" class="rpt_feature rpt_feature_'+n+"-"+e+'">',i+=t,i+="</div>"}}),i+="</div>",i+='<div style="clear:both;"></div>'),s.customButton?(i+='<div class="rpt_custom_btn" style="background-color:'+s.color+'">',i+=s.customButton,i+="</div>"):(s.buttonText?(i+='<a href="#" style="background:'+s.color+'" class="rpt_foot rpt_foot_'+n+'">',i+=s.buttonText):i+='<a style="background:'+s.color+'" class="rpt_foot rpt_foot_'+n+'">',i+="</a>"),i+="</div>"}),i+="</div>",i+="</div>",i+='<div style="clear:both;"></div>',i+='<div class="dmb_accuracy_preview_notice">'+objectL10n.previewAccuracy+"</div>",0==t.planCount?e("#dmb_preview_table").append('<div class="dmb_no_row_preview_notice">'+objectL10n.noPlan+"</div>"):e("#dmb_preview_table").append(i),e("#dmb_preview_table").fadeIn(100),setTimeout(function(){e("img.rpt_recommended").each(function(){var t=e(this).parent().outerHeight()/2-e(this).height()/2;e(this).css("top",t-2+"px")})},50)}),e("body").on("click",".dmb_preview_table_close",function(){e("#dmb_preview_table #rpt_pricr, .dmb_accuracy_preview_notice, .dmb_no_row_preview_notice").remove(),e("#dmb_preview_table").fadeOut(100)})})}(jQuery);
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: spwebguy
3
  Tags: pricing table, pricing tables, prices, pricing, shortcode, price, responsive, pricing, tables
4
  Requires at least: 3.6
5
- Tested up to: 5.7
6
- Stable tag: trunk
7
  License: GPL2
8
  License URI: http://www.gnu.org/licenses/gpl.html
9
 
@@ -93,6 +93,9 @@ Find help on [our support platform](https://help.wpdarko.com/en) for this plugin
93
  5. Finding the shortcode (admin view)
94
 
95
  == Changelog ==
 
 
 
96
  = 5.1.5 =
97
  * Added better support for HTML in features
98
 
2
  Contributors: spwebguy
3
  Tags: pricing table, pricing tables, prices, pricing, shortcode, price, responsive, pricing, tables
4
  Requires at least: 3.6
5
+ Tested up to: 6.1
6
+ Stable tag: 5.1.6
7
  License: GPL2
8
  License URI: http://www.gnu.org/licenses/gpl.html
9
 
93
  5. Finding the shortcode (admin view)
94
 
95
  == Changelog ==
96
+ = 5.1.6 =
97
+ * Fixed UI issue on adding new plans
98
+
99
  = 5.1.5 =
100
  * Added better support for HTML in features
101
 
rpt.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Responsive Pricing Table
5
  * Plugin URI: https://wpdarko.com/items/responsive-pricing-table-pro/
6
  * Description: A responsive, easy and elegant way to present your offer to your visitors. Just create a new pricing table (custom type) and copy-paste the shortcode into your posts/pages. Find help and information on our <a href="https://help.wpdarko.com/en">support site</a>. This free version is NOT limited and does not contain any ad. Check out the <a href='https://wpdarko.com/items/responsive-pricing-table-pro/'>PRO version</a> for more great features.
7
- * Version: 5.1.5
8
  * Author: WP Darko
9
  * Author URI: https://wpdarko.com
10
  * Text Domain: dk-pricr-responsive-pricing-table
@@ -19,7 +19,7 @@ define( 'RPT_PATH', plugin_dir_path( __FILE__ ) );
19
  define( 'RPT_TXTDM', 'dk-pricr-responsive-pricing-table' );
20
 
21
  /* Defines plugin's version. */
22
- define( 'RPT_VER', '5.1.5' );
23
 
24
 
25
  /* General. */
4
  * Plugin Name: Responsive Pricing Table
5
  * Plugin URI: https://wpdarko.com/items/responsive-pricing-table-pro/
6
  * Description: A responsive, easy and elegant way to present your offer to your visitors. Just create a new pricing table (custom type) and copy-paste the shortcode into your posts/pages. Find help and information on our <a href="https://help.wpdarko.com/en">support site</a>. This free version is NOT limited and does not contain any ad. Check out the <a href='https://wpdarko.com/items/responsive-pricing-table-pro/'>PRO version</a> for more great features.
7
+ * Version: 5.1.6
8
  * Author: WP Darko
9
  * Author URI: https://wpdarko.com
10
  * Text Domain: dk-pricr-responsive-pricing-table
19
  define( 'RPT_TXTDM', 'dk-pricr-responsive-pricing-table' );
20
 
21
  /* Defines plugin's version. */
22
+ define( 'RPT_VER', '5.1.6' );
23
 
24
 
25
  /* General. */