Version Description
- Updated deprecated jQuery code
- Fixed Instant Preview issue
- Fixed color pickers bug
- Fixed button alignment
Download this release
Release Info
Developer | spwebguy |
Plugin | Responsive Pricing Table |
Version | 5.1.2 |
Comparing to | |
See all releases |
Code changes from version 5.1.1 to 5.1.2
- inc/dmb/dmb.css +1 -0
- inc/dmb/dmb.js +1 -1
- inc/dmb/dmb.min.css +1 -1
- inc/dmb/dmb.min.js +1 -46
- inc/rpt-admin-scripts.php +3 -3
- inc/rpt-front-scripts.php +2 -2
- inc/rpt-metaboxes-pro.php +1 -1
- readme.txt +7 -1
- rpt.php +4 -1
inc/dmb/dmb.css
CHANGED
@@ -610,6 +610,7 @@
|
|
610 |
|
611 |
.dmb_sidebar .dmb_field_title{ font-size:13px; }
|
612 |
.dmb_field_title{
|
|
|
613 |
margin-top: 10px;
|
614 |
margin-bottom:3px;
|
615 |
color: #555;
|
610 |
|
611 |
.dmb_sidebar .dmb_field_title{ font-size:13px; }
|
612 |
.dmb_field_title{
|
613 |
+
width: 100%;
|
614 |
margin-top: 10px;
|
615 |
margin-bottom:3px;
|
616 |
color: #555;
|
inc/dmb/dmb.js
CHANGED
@@ -442,7 +442,7 @@ $(document).ready(function (){
|
|
442 |
// Gets settings.
|
443 |
var settings = {};
|
444 |
|
445 |
-
settings.planCount = $('.dmb_main').not('.dmb_empty_plan').
|
446 |
settings.tableCurrency = $("input[name='table_currency']").val();
|
447 |
|
448 |
settings.fontTitleAlignment = $("select[name='font_title_alignment'] option:selected").val();
|
442 |
// Gets settings.
|
443 |
var settings = {};
|
444 |
|
445 |
+
settings.planCount = $('.dmb_main').not('.dmb_empty_plan').length;
|
446 |
settings.tableCurrency = $("input[name='table_currency']").val();
|
447 |
|
448 |
settings.fontTitleAlignment = $("select[name='font_title_alignment'] option:selected").val();
|
inc/dmb/dmb.min.css
CHANGED
@@ -5,4 +5,4 @@
|
|
5 |
* Last updated: Nov 24, 2017
|
6 |
*/
|
7 |
|
8 |
-
.dmb_clearfix{clear:both}.dmb_feature{position:relative}.dmb_feature input{padding-right:25px;width:100%;margin-bottom:4px}.dmb_features{padding-top:5px}.dmb_big_field{width:100%;padding:10px 8px;border-radius:4px;font-size:16px}.dmb_field{width:100%;padding:4px 8px;font-size:13px}.dmb_custom_button textarea{height:64px}.dmb_icon_field{display:none}.dmb_icon_data_url{display:none}.dmb_icon_img{max-width:100%;margin-top:8px;display:block}.dmb_field_title .dmb_field_subtitle{padding-top:8px;color:#999;font-size:12px;font-style:italic;padding-bottom:2px}.dmb_big_button_primary{text-shadow:0 -1px 1px #849d3a,1px 0 1px #849d3a,0 1px 1px #849d3a,-1px 0 1px #849d3a;padding:8px 6px 5px 10px;font-size:14px;background:#
|
5 |
* Last updated: Nov 24, 2017
|
6 |
*/
|
7 |
|
8 |
+
.dmb_clearfix{clear:both}.dmb_feature{position:relative}.dmb_feature input{padding-right:25px;width:100%;margin-bottom:4px}.dmb_features{padding-top:5px}.dmb_big_field{width:100%;padding:10px 8px;border-radius:4px;font-size:16px}.dmb_field{width:100%;padding:4px 8px;font-size:13px}.dmb_custom_button textarea{height:64px}.dmb_icon_field{display:none}.dmb_icon_data_url{display:none}.dmb_icon_img{max-width:100%;margin-top:8px;display:block}.dmb_field_title .dmb_field_subtitle{padding-top:8px;color:#999;font-size:12px;font-style:italic;padding-bottom:2px}.dmb_big_button_primary{text-shadow:0 -1px 1px #849d3a,1px 0 1px #849d3a,0 1px 1px #849d3a,-1px 0 1px #849d3a;padding:8px 6px 5px 10px;font-size:14px;background:#acce45;color:#fff;text-decoration:none;border-radius:3px;border:1px solid #8ea93d;border-bottom:2px solid #8ea93d;border-right:1px solid #8ea93d;line-height:15px}.dmb_big_button_primary:focus,.dmb_big_button_primary:hover{background-image:none;outline:0;-webkit-box-shadow:none;box-shadow:none;background:#b1d34a;color:#fff}.dmb_big_button_secondary{padding:3px 10px;font-size:13px;background:#fff;font-weight:500;color:#333;text-decoration:none;border-radius:3px;border-bottom:2px solid #ddd;border-right:1px solid #ddd}.dmb_big_button_secondary:focus,.dmb_big_button_secondary:hover{background-image:none;outline:0;-webkit-box-shadow:none;box-shadow:none;color:#555}.dmb_big_button_secondary.dmb_remove_row_btn{padding:3px 3px 3px 4px}.dmb_small_button_primary{margin:5px 1px;text-shadow:0 -1px 1px #497bad,1px 0 1px #497bad,0 1px 1px #497bad,-1px 0 1px #497bad;padding:4px 4px 1px;line-height:17px;font-size:12px;background:#5690ca;color:#fff;text-decoration:none;border-radius:3px;border:1px solid #497bad;border-bottom:2px solid #497bad;border-right:1px solid #497bad}.dmb_small_button_primary:focus,.dmb_small_button_primary:hover{background-image:none;outline:0;-webkit-box-shadow:none;box-shadow:none;background:#5a97d4;color:#fff}.dmb_small_button_secondary{padding:2px;margin-top:1px;line-height:18px;font-size:12px;background:#fff;font-weight:500;color:#333;text-decoration:none;border-radius:3px;border-bottom:2px solid #ddd;border-right:1px solid #ddd}.dmb_small_button_secondary:focus,.dmb_small_button_secondary:hover{background-image:none;outline:0;opacity:1;-webkit-box-shadow:none;box-shadow:none;color:#555}.dmb_grid{float:left;padding-left:6px;box-sizing:border-box;padding-right:6px}.dmb_grid_20{width:20%}.dmb_grid_25{width:25%}.dmb_grid_33{width:33%}.dmb_grid_35{width:35%}.dmb_grid_40{width:40%}.dmb_grid_50{width:50%}.dmb_grid_60{width:60%}.dmb_grid_100{width:100%}.dmb_grid_first{padding-left:0}.dmb_grid_last{padding-right:0}.dmb_color_picker{padding:3px!important}.wp-picker-container{position:relative}.wp-picker-clear{display:none!important}.wp-picker-container,.wp-picker-container:active{display:block;z-index:9999}.iris-picker{position:absolute!important;bottom:33px!important;left:80!important;background:#fff!important}.dmb_text_settings_box{display:none}.dmb_text_settings_box_show{display:block;margin-top:14px;cursor:pointer;font-size:14px}.dmb_help_title,.dmb_side_block_title{font-size:14px;margin-top:4px;margin-bottom:2px;font-weight:500;color:#555}.dmb_side_block_title{font-weight:400}.dmb_help_title{margin-bottom:10px}.dmb_side_block{padding-bottom:2px;margin-top:10px}.dmb_side_block a{text-decoration:none}[data-tooltip]{position:relative;z-index:2;cursor:pointer}[data-tooltip]:after,[data-tooltip]:before{visibility:hidden;opacity:0;pointer-events:none}[data-tooltip]:before{position:absolute;bottom:150%;left:50%;margin-bottom:5px;margin-left:-80px;padding:7px;padding-left:14px;width:160px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;background-color:#000;background-color:hsla(0,0%,20%,.9);color:#fff;content:attr(data-tooltip);text-align:left;font-size:12px;line-height:16px}.dmb_tooltip_large[data-tooltip]:before{width:320px}.dmb_tooltip_medium[data-tooltip]:before{width:220px}.dmb_tooltip_small[data-tooltip]:before{width:180px}[data-tooltip]:after{position:absolute;bottom:150%;left:50%;margin-left:-5px;width:0;border-top:5px solid #000;border-top:5px solid hsla(0,0%,20%,.9);border-right:5px solid transparent;border-left:5px solid transparent;content:" ";font-size:0;line-height:0}[data-tooltip]:hover:after,[data-tooltip]:hover:before{visibility:visible;opacity:1}@media only screen and (max-width :850px){.dmb_grid_100,.dmb_grid_20,.dmb_grid_25,.dmb_grid_33,.dmb_grid_35,.dmb_grid_40,.dmb_grid_50,.dmb_grid_60{padding-right:0;padding-left:0;width:100%}}.dmb_button{font-size:13px;line-height:2;padding:2px 10px 3px;display:inline-block;text-decoration:none;margin:0;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;border-radius:3px;white-space:nowrap;box-sizing:border-box;min-height:30px;text-decoration:none;text-shadow:none;background:#f5f5f5;border-color:#d3d3d3;color:#23282d}.dmb_button:active,.dmb_button:focus,.dmb_button:hover{background-image:none;outline:0;-webkit-box-shadow:none;box-shadow:none;background:#eceaea;color:#23282d}.dmb_button_large .dashicons{position:relative;top:4px}.dmb_button_large{font-size:13px;line-height:2.15384615;padding:0 12px 2px}.dmb_button_huge{font-size:16px;line-height:2.28384615;padding:0 15px 3px}.dmb_button_compact{padding:0 4px 2px}.dmb_button_blue{background:#007cba;border-color:#007cba;color:#fff}.dmb_button_blue:active,.dmb_button_blue:focus,.dmb_button_blue:hover{background:#00669b;color:#fff}.dmb_button_green{background:#81c240;border-color:#81c240;color:#fff}.dmb_button_green:active,.dmb_button_green:focus,.dmb_button_green:hover{background:#75b03a;color:#fff}.dmb_button_gold{background:#edb50c;border-color:#edb50c;color:#fff}.dmb_button_gold:focus,.dmb_button_gold:hover{background:#e3ab02;color:#fff}#dmb_preview_table .dmb_preview_table_close{position:fixed;top:20px;right:40px;z-index:1}.dmb_clone_row,.dmb_export_row,.dmb_remove_row_btn{margin-left:7px;float:right}.dmb_move_row_down,.dmb_move_row_up{float:left}.dmb_move_row_down{margin-left:7px;margin-right:12px}.dmb_upload_icon_btn{display:inline-block;cursor:pointer;margin-top:10px!important;margin-bottom:3px}.dmb_upload_icon_btn .dashicons{position:relative;top:-2px}.dmb_remove_icon_btn{display:inline-block;margin-left:7px}.dmb_add_row{margin:0 auto;margin-top:10px;display:inline-block}.dmb_add_feature{margin-top:6px;margin-bottom:5px;display:inline-block}.dmb_remove_feature_btn{color:#666!important;border-radius:3px;float:right;position:absolute;top:10px;text-decoration:none;right:5px;background:#f5f5f5;border:1px solid #ccc}.dmb_move_feature_down_btn{color:#666!important;border-radius:3px;float:right;position:absolute;top:10px;text-decoration:none;right:32px;background:#f5f5f5;border:1px solid #ccc}.dmb_move_feature_up_btn{color:#666!important;border-radius:3px;float:right;position:absolute;top:10px;text-decoration:none;right:59px;background:#f5f5f5;border:1px solid #ccc}.dmb_no_row_notice{background:#f5f5f5;padding:50px 10px;margin-top:10px;text-align:center;font-size:20px;line-height:36px;font-weight:400;border:1px solid #ddd}.dmb_toolbar{padding-top:4px;display:block;text-align:left}.dmb_toolbar .dmb_expand_rows{margin-right:10px}.dmb_import_row_label,.dmb_toolbar .dmb_collapse_rows,.dmb_toolbar .dmb_expand_rows{float:left;margin-right:7px;margin-top:9px}.dmb_toolbar .dmb_show_preview_table{float:right;margin-left:7px}.dmb_main{margin-top:10px}.dmb_main .dmb_inner{background:#f5f5f5;padding:4px 10px 8px;border:1px solid #ddd;border-top:none}.dmb_main .dmb_handle{padding:8px 12px;background:#fff;border:1px solid #ccd0d4!important;display:block}.dmb_main .dmb_handle.closed{border-bottom:none}.dmb_main .dmb_handle .dmb_handle_title{margin-top:4px;float:left;color:#23282d;font-weight:400;font-size:18px;box-sizing:border-box}#dmb_preview_table{box-sizing:border-box;display:none;position:fixed;overflow-y:scroll;border:1px solid #bbb;top:0;bottom:0;left:0;right:0;padding-bottom:90px;background:#eee;z-index:100000;padding:0 15%;text-align:center;box-shadow:-1px 0 204px -6px rgba(0,0,0,.75)}.dmb_accuracy_preview_notice{background:#fff;padding:20px 30px;text-align:center;font-size:17px;line-height:27px;font-weight:400;border:1px solid #ddd;margin-bottom:80px;max-width:550px;margin:0 auto;margin-top:60px}.dmb_no_row_preview_notice{background:#fff;padding:20px 30px;margin-top:10px;text-align:center;font-size:17px;line-height:27px;font-weight:400;border:1px solid #ddd;margin-top:60px;margin-bottom:80px;max-width:550px;margin:0 auto;margin-top:120px}.dmb_feature_dump{display:none}.dmb_main select,.dmb_side_select{width:100%;margin-bottom:5px}.dmb_field{width:100%}.dmb_feature_field{margin-top:6px}.dmb_section_title{font-size:20px;color:#7a7a78;padding-bottom:4px;margin:15px 2px 2px;border-bottom:3px dashed #ddd;text-align:left}.dmb_sidebar .dmb_field_title{font-size:13px}.dmb_field_title{width:100%;margin-top:10px;margin-bottom:3px;color:#555;font-size:15px;padding-left:2px;display:inline-block;font-weight:400;line-height:19px}::-webkit-input-placeholder{color:#bbb}::-moz-placeholder{color:#bbb}:-ms-input-placeholder{color:#bbb}:-moz-placeholder{color:#bbb}.dmb_tip{padding-left:2px;font-size:14px;color:#999;line-height:23px;margin-top:8px}.dmb_tip .dashicons{font-size:24px;height:17px}.dmb_inline_tip,.dmb_tip a{color:#0073aa;cursor:pointer}.dmb_discount_box_pushr{height:60px}.dmb_discount_box{background:#f5f5f5;border-top:1px solid #ddd;padding:2px 16px 8px 11px;position:absolute;bottom:0;left:0;right:0}#rpt_pricing_table_pro strong{color:#000}.dmb_see_pro{margin-top:10px}
|
inc/dmb/dmb.min.js
CHANGED
@@ -2,49 +2,4 @@
|
|
2 |
* Responsive Pricing Table Admin JS (minified)
|
3 |
*/
|
4 |
|
5 |
-
;(function($){$(document).ready(function(){function debounce(func,wait,immediate){var timeout;return function(){var context=this,args=arguments;var later=function(){timeout=null;if(!immediate)func.apply(context,args)};var callNow=immediate&&!timeout;clearTimeout(timeout);timeout=setTimeout(later,wait);if(callNow)func.apply(context,args)}};(function(original){jQuery.fn.clone=function(){var result=original.apply(this,arguments),my_textareas=this.find('textarea').add(this.filter('textarea')),result_textareas=result.find('textarea').add(result.filter('textarea')),my_selects=this.find('select').add(this.filter('select')),result_selects=result.find('select').add(result.filter('select'));for(var i=0,l=my_textareas.length;i<l;++i)$(result_textareas[i]).val($(my_textareas[i]).val());for(var i=0,l=my_selects.length;i<l;++i)result_selects[i].selectedIndex=my_selects[i].selectedIndex;return result}})(jQuery.fn.clone);var pluginFolderSlug='dk-pricr-responsive-pricing-table';$('.dmb_color_picker').each(function(i,obj){$(this).wpColorPicker()});function refreshPlanCountRelatedUI(){if($('.dmb_main').not('.dmb_empty_plan').length>0){$('.dmb_no_row_notice').hide()}else{$('.dmb_no_row_notice').show()}
|
6 |
-
if($('.dmb_main').not('.dmb_empty_plan').length>4){$('.dmb_add_row, .clone-row').hide()}else{$('.dmb_add_row, .clone-row').show()}}
|
7 |
-
refreshPlanCountRelatedUI();var hexDigits=new Array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f");function dmb_rgb2hex(rgb){rgb=rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);return"#"+dmb_hex(rgb[1])+dmb_hex(rgb[2])+dmb_hex(rgb[3])}
|
8 |
-
function dmb_hex(x){return isNaN(x)?"00":hexDigits[(x-x%16)/16]+hexDigits[x%16]}
|
9 |
-
function dmb_strip_tags(input,allowed){allowed=(((allowed||'')+'').toLowerCase().match(/<[a-z][a-z0-9]*>/g)||[]).join('');var tags=/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,commentsAndPhpTags=/<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi;return input.replace(commentsAndPhpTags,'').replace(tags,function($0,$1){return allowed.indexOf('<'+$1.toLowerCase()+'>')>-1?$0:''})}
|
10 |
-
$('.dmb_icon_data_url').each(function(i,obj){var imgUrl=$(this).attr("data-icon");if(imgUrl!=''){var upload_button=$(this).siblings('.dmb_upload_icon_btn');$(this).siblings('.dmb_icon_field').val(imgUrl);$("<br/><img src='"+imgUrl+"' class='dmb_icon_img'/><div class='dmb_clearfix imgClearfix'></div>").insertAfter(upload_button);$('<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)}});$('.dmb_main').not('.dmb_empty_plan').each(function(i,obj){var featureDump=$(this).find('.dmb_feature_dump').val();var features=$(this).find('.dmb_features');if(featureDump!=''){featureDump=featureDump+'\n';$.each(featureDump.split("\n").slice(0,-1),function(index,item){cleanedItem=item.replace(')--(',',');features.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> <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>');features.find('.dmb_feature_field:last').val(cleanedItem)})}});$('body').on('click','.dmb_remove_icon_btn',function(e){$(this).parent().find('.dmb_icon_img').remove();$(this).parent().find('.imgClearfix').remove();$(this).parent().find('.dmb_icon_field').val('');$(this).remove();return!1});$('body').on('click','.dmb_upload_icon_btn',function(){upload_button=$(this);isAlreadyImg=$(this).siblings('.dmb_icon_data_url').attr("data-icon");window.send_to_editor=function(html){imgUrl=$(html).attr('src');if(isAlreadyImg){upload_button.parent().find('.dmb_icon_img').remove();upload_button.parent().find('.dmb_remove_icon_btn').remove()}
|
11 |
-
$("<br/><img src='"+imgUrl+"' class='dmb_icon_img'/><div class='dmb_clearfix imgClearfix'></div>").insertAfter(upload_button);$('<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()}
|
12 |
-
tb_show('','media-upload.php?type=image&TB_iframe=true');return!1});function updateFeatureList(el){var featureDump=$(el).closest('.dmb_main').find('.dmb_feature_dump');var featureList=$(el).closest('.dmb_main').find('.dmb_feature_field');if(featureList.length==0){featureDump.val('')}else{var remainingFeatures=[];featureList.each(function(i,obj){if($(this).val()){var cleanFeature=$(this).val().split(',').join(')--(');remainingFeatures.push(cleanFeature);var newFeatures=remainingFeatures.toString().split(',').join("\n").split(')--(').join(',');featureDump.val(newFeatures)}})}
|
13 |
-
return!1}
|
14 |
-
$('body').on('click','.dmb_add_feature',function(){var lastFeature=$(this).siblings('.dmb_features').find('.dmb_feature:last .dmb_feature_field');if(lastFeature.val()!=''){var feature=$('.empty-feature').clone(!0);feature.removeClass('empty-feature').show();$(this).siblings('.dmb_features').append(feature);feature.find('.dmb_feature_field').focus();return!1}else{lastFeature.focus()}
|
15 |
-
return!1});$('body').on('click','.dmb_remove_feature_btn',function(e){featureList=$(this).closest('.dmb_features');$(this).parent().remove();updateFeatureList($(featureList));return!1});$('body').on('click','.dmb_move_feature_down_btn',function(e){var thisFeature=$(this).closest('.dmb_feature');if(thisFeature.next().length>0){var newFeature=thisFeature.clone().insertAfter(thisFeature.next());thisFeature.remove();updateFeatureList($(newFeature))}
|
16 |
-
return!1});$('body').on('click','.dmb_move_feature_up_btn',function(e){var thisFeature=$(this).closest('.dmb_feature');if(thisFeature.prev().length>0){var newFeature=thisFeature.clone().insertBefore(thisFeature.prev());thisFeature.remove();updateFeatureList($(newFeature))}
|
17 |
-
return!1});$('body').on('keyup','.dmb_feature_field',debounce(function(e){updateFeatureList($(this))},150));$('body').on('click','.dmb_add_row',function(){var row=$('.dmb_empty_plan').clone(!0);row.removeClass('dmb_empty_plan').addClass('dmb_main').show();row.find('.emptyDump').removeClass('emptyDump').addClass('dmb_feature_dump');row.insertBefore($('.dmb_empty_plan'));row.find('.dmb_title_of_plan').focus();row.find('.dmb_color_picker_ready').removeClass('.dmb_color_picker_ready').addClass('.dmb_color_picker').wpColorPicker().css({'padding':'3px'});row.find('.dmb_handle_title').html(objectL10n.untitled);refreshPlanCountRelatedUI();return!1});$('body').on('click','.dmb_remove_row_btn',function(e){$(this).closest('.dmb_main').remove();refreshPlanCountRelatedUI();return!1});$('body').on('click','.dmb_handle',function(e){$(this).siblings('.dmb_inner').slideToggle(50);($(this).hasClass('closed'))?$(this).removeClass('closed'):$(this).addClass('closed');return!1});$('body').on('click','.dmb_collapse_rows',function(e){$('.dmb_handle').each(function(i,obj){if(!$(this).closest('.dmb_empty_plan').length){if($(this).hasClass('closed')){}else{$(this).siblings('.dmb_inner').slideToggle(50);$(this).addClass('closed')}}});return!1});$('body').on('click','.dmb_expand_rows',function(e){$('.dmb_handle').each(function(i,obj){if($(this).hasClass('closed')){$(this).siblings('.dmb_inner').slideToggle(50);$(this).removeClass('closed')}});return!1});$('body').on('click','.dmb_move_row_down',function(e){if($(this).closest('.dmb_main').next().hasClass('dmb_main')){var movingPlan=$(this).closest('.dmb_main').clone(!0);movingPlan.insertAfter($(this).closest('.dmb_main').next());var rgbColorToMove=movingPlan.find('.wp-color-result').css('backgroundColor');movingPlan.find('.wp-picker-container').remove();movingPlan.find('.dmb_color_box').append('<input class="dmb_color_picker dmb_field" name="plan_colors[]" type="text" value="'+dmb_rgb2hex(rgbColorToMove)+'" />');movingPlan.find('.dmb_color_picker').wpColorPicker();$(this).closest('.dmb_main').remove()}
|
18 |
-
return!1});$('body').on('click','.dmb_move_row_up',function(e){if($(this).closest('.dmb_main').prev().hasClass('dmb_main')){var movingPlan=$(this).closest('.dmb_main').clone(!0);movingPlan.insertBefore($(this).closest('.dmb_main').prev());var rgbColorToMove=movingPlan.find('.wp-color-result').css('backgroundColor');movingPlan.find('.wp-picker-container').remove();movingPlan.find('.dmb_color_box').append('<input class="dmb_color_picker dmb_field" name="plan_colors[]" type="text" value="'+dmb_rgb2hex(rgbColorToMove)+'" />');movingPlan.find('.dmb_color_picker').wpColorPicker();$(this).closest('.dmb_main').remove()}
|
19 |
-
return!1});$('body').on('click','.dmb_clone_row',function(e){var clone=$(this).closest('.dmb_main').clone(!0);clone.insertAfter($(this).closest('.dmb_main'));clone.find('.dmb_handle_title').html(clone.find('.dmb_title_of_plan').val()+' ('+objectL10n.copy+')');clone.find('.dmb_title_of_plan').focus();var rgbColorToMove=$(this).closest('.dmb_main').find('.wp-color-result').css('backgroundColor');clone.find('.wp-picker-container').remove();clone.find('.dmb_color_box').append('<input class="dmb_color_picker dmb_field" name="plan_colors[]" type="text" value="'+dmb_rgb2hex(rgbColorToMove)+'" />');clone.find('.dmb_color_picker').wpColorPicker();refreshPlanCountRelatedUI();return!1});$('.dmb_title_of_plan').each(function(i,obj){if($(this).val()!=''){var handleTitle=$(this).closest('.dmb_main').find('.dmb_handle_title');handleTitle.html($(this).val())}});$('body').on('keyup','.dmb_title_of_plan',debounce(function(e){var titleField=$(this);var handleTitle=titleField.closest('.dmb_main').find('.dmb_handle_title');(titleField.val()!='')?handleTitle.html(titleField.val()):handleTitle.html(objectL10n.untitled)},50));$('body').on('click','.dmb_text_settings_box_show',function(){$('.dmb_text_settings_box').toggle()});$('body').on('click','.dmb_show_preview_table',function(){var settings={};settings.planCount=$('.dmb_main').not('.dmb_empty_plan').size();settings.tableCurrency=$("input[name='table_currency']").val();settings.fontTitleAlignment=$("select[name='font_title_alignment'] option:selected").val();settings.fontSizeTitle=$("select[name='font_size_title'] option:selected").val();settings.fontSizeSubtitle=$("select[name='font_size_subtitle'] option:selected").val();settings.fontSizeDescription=$("select[name='font_size_description'] option:selected").val();settings.fontSizePrice=$("select[name='font_size_price'] option:selected").val();settings.fontSizeRecurrence=$("select[name='font_size_recurrence'] option:selected").val();settings.fontSizeButton=$("select[name='font_size_button'] option:selected").val();settings.fontSizeFeatures=$("select[name='font_size_features'] option:selected").val();if(settings.fontSizeTitle=='small'){settings.fontSizeTitle=' rpt_sm_title'}
|
20 |
-
else if(settings.fontSizeTitle=='tiny'){settings.fontSizeTitle=' rpt_xsm_title'}
|
21 |
-
else{settings.fontSizeTitle=''}
|
22 |
-
if(settings.fontSizeSubtitle=='small'){settings.fontSizeSubtitle=' rpt_sm_subtitle'}
|
23 |
-
else if(settings.fontSizeSubtitle=='tiny'){settings.fontSizeSubtitle=' rpt_xsm_subtitle'}
|
24 |
-
else{settings.fontSizeSubtitle=''}
|
25 |
-
if(settings.fontSizeDescription=='small'){settings.fontSizeDescription=' rpt_sm_description'}
|
26 |
-
else{settings.fontSizeDescription=''}
|
27 |
-
if(settings.fontSizePrice=='small'){settings.fontSizePrice=' rpt_sm_price'}
|
28 |
-
else if(settings.fontSizePrice=='tiny'){settings.fontSizePrice=' rpt_xsm_price'}
|
29 |
-
else if(settings.fontSizePrice=='supertiny'){settings.fontSizePrice=' rpt_xxsm_price'}
|
30 |
-
else{settings.fontSizePrice=''}
|
31 |
-
if(settings.fontSizeRecurrence=='small'){settings.fontSizeRecurrence=' rpt_sm_recurrence'}
|
32 |
-
else{settings.fontSizeRecurrence=''}
|
33 |
-
if(settings.fontSizeFeatures=='small'){settings.fontSizeFeatures=' rpt_sm_features'}
|
34 |
-
else{settings.fontSizeFeatures=''}
|
35 |
-
if(settings.fontSizeButton=='small'){settings.fontSizeButton=' rpt_sm_button'}
|
36 |
-
else{settings.fontSizeButton=''}
|
37 |
-
var preview_html='';preview_html+='<div id="rpt_pricr" style="margin-top:100px;" class="rpt_plans rpt_'+settings.planCount+'_plans rpt_style_basic">';preview_html+='<div class="'+settings.fontSizeTitle+' '+settings.fontSizeSubtitle+' '+settings.fontSizeDescription+' '+settings.fontSizePrice+' '+settings.fontSizeRecurrence+' '+settings.fontSizeButton+' '+settings.fontSizeFeatures+'">';preview_html+='<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>'
|
38 |
-
$('.dmb_main').not('.dmb_empty_plan').each(function(i,obj){var fields={},plan={};fields.title=$(this).find(".dmb_title_of_plan").val();fields.subtitle=$(this).find(".dmb_subtitle_of_plan").val();fields.recurrence=$(this).find(".dmb_recurrence_of_plan").val();fields.price=$(this).find(".dmb_price_of_plan").val();fields.description=$(this).find(".dmb_description_of_plan").val();fields.icon=$(this).find(".dmb_icon_of_plan").attr('data-icon');fields.recommended=$(this).find(".dmb_switch_recommended").find(":selected").val();fields.free=$(this).find(".dmb_switch_free").find(":selected").val();fields.features=$(this).find(".dmb_features_of_plan").val();fields.buttonText=$(this).find(".dmb_button_text_of_plan").val();fields.customButton=$(this).find(".dmb_custom_button_of_plan").val();fields.color=dmb_rgb2hex($(this).find(".wp-color-result").css('backgroundColor'))||'#8dba09';if(fields.recommended&&fields.recommended=='yes'){plan.recoClass='rpt_recommended_plan';plan.recoImg='<img class="rpt_recommended" src="../wp-content/plugins/'+pluginFolderSlug+'/inc/img/rpt_recommended.png"/>'}else{plan.recoImg='';plan.recoClass=''}
|
39 |
-
preview_html+='<div class="rpt_plan rpt_plan_'+i+' '+plan.recoClass+'">';plan.titleStyle='style="text-align:'+settings.fontTitleAlignment+';"';if(fields.title){preview_html+='<div '+plan.titleStyle+' class="rpt_title rpt_title_'+i+'">';if(fields.icon){preview_html+='<img height=30px width=30px src="'+fields.icon+'" class="rpt_icon rpt_icon_'+i+'"/> '}
|
40 |
-
preview_html+=fields.title;preview_html+=plan.recoImg+'</div>'}
|
41 |
-
preview_html+='<div class="rpt_head rpt_head_'+i+'">';if(fields.recurrence){preview_html+='<div class="rpt_recurrence rpt_recurrence_'+i+'">'+fields.recurrence+'</div>'}
|
42 |
-
if(fields.price){preview_html+='<div class="rpt_price rpt_price_'+i+'">';if(fields.free=='yes'||fields.free=='on'){preview_html+='<sup class="rpt_currency">';preview_html+='</sup>'}else{if(settings.tableCurrency){preview_html+='<sup class="rpt_currency">';preview_html+=settings.tableCurrency;preview_html+='</sup>'}else{preview_html+='<sup class="rpt_currency">';preview_html+='</sup>'}}
|
43 |
-
preview_html+=fields.price;preview_html+='</div>'}
|
44 |
-
if(fields.subtitle){preview_html+='<div style="color:'+fields.color+';" class="rpt_subtitle rpt_subtitle_'+i+'">'+fields.subtitle+'</div>'}
|
45 |
-
if(fields.description){preview_html+='<div class="rpt_description rpt_description_'+i+'">'+fields.description+'</div>'}
|
46 |
-
preview_html+='<div style="clear:both;"></div>';preview_html+='</div>';if(fields.features){preview_html+='<div class="rpt_features rpt_features_'+i+'">';plan.features=[];plan.featureString=fields.features;plan.featureStringArray=plan.featureString.split("\n");plan.featureStringArray=plan.featureStringArray.map(function(el){return el.trim()});$.each(plan.featureStringArray,function(index,value){plan.features.push(dmb_strip_tags(value,'<strong></strong><br><br/></br><img><a>'))});$.each(plan.featureStringArray,function(smallKey,feature){if(feature){var check=feature.substr(0,2);if(check=='-n'){feature=feature.substr(2);var checkColor='#bbbbbb'}else{checkColor='black'}
|
47 |
-
preview_html+='<div style="color:'+checkColor+';" class="rpt_feature rpt_feature_'+i+'-'+smallKey+'">';preview_html+=feature;preview_html+='</div>'}});preview_html+='</div>';preview_html+='<div style="clear:both;"></div>'}
|
48 |
-
if(fields.customButton){preview_html+='<div class="rpt_custom_btn" style="background-color:'+fields.color+'">';preview_html+=fields.customButton;preview_html+='</div>'}else{if(fields.buttonText){preview_html+='<a href="#" style="background:'+fields.color+'" class="rpt_foot rpt_foot_'+i+'">';preview_html+=fields.buttonText}else{preview_html+='<a style="background:'+fields.color+'" class="rpt_foot rpt_foot_'+i+'">'}
|
49 |
-
preview_html+='</a>'}
|
50 |
-
preview_html+='</div>'});preview_html+='</div>';preview_html+='</div>';preview_html+='<div style="clear:both;"></div>';preview_html+='<div class="dmb_accuracy_preview_notice">'+objectL10n.previewAccuracy+'</div>';(settings.planCount==0)?$('#dmb_preview_table').append('<div class="dmb_no_row_preview_notice">'+objectL10n.noPlan+'</div>'):$('#dmb_preview_table').append(preview_html);$('#dmb_preview_table').fadeIn(100);setTimeout(function(){$('img.rpt_recommended').each(function(){var topPush=($(this).parent().outerHeight()/2)-($(this).height()/2);$(this).css('top',(topPush-2)+'px')})},50)});$('body').on('click','.dmb_preview_table_close',function(){$('#dmb_preview_table #rpt_pricr, .dmb_accuracy_preview_notice, .dmb_no_row_preview_notice').remove();$('#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>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&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);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/rpt-admin-scripts.php
CHANGED
@@ -10,14 +10,14 @@ function add_admin_rpt_style() {
|
|
10 |
if( 'rpt_pricing_table' == $post_type ) {
|
11 |
|
12 |
/* CSS for metaboxes. */
|
13 |
-
wp_enqueue_style( 'rpt_dmb_styles', plugins_url('dmb/dmb.min.css', __FILE__));
|
14 |
/* CSS for previews */
|
15 |
-
wp_enqueue_style( 'rpt_styles', plugins_url('css/rpt_style.min.css', __FILE__));
|
16 |
/* Others */
|
17 |
wp_enqueue_style( 'wp-color-picker' );
|
18 |
|
19 |
/* JS for metaboxes. */
|
20 |
-
wp_enqueue_script( 'rpt', plugins_url('dmb/dmb.min.js', __FILE__), array( 'jquery', 'thickbox', 'wp-color-picker' ));
|
21 |
wp_localize_script( 'rpt', 'objectL10n', array(
|
22 |
'untitled' => __( 'Untitled', RPT_TXTDM ),
|
23 |
'copy' => __( 'copy', RPT_TXTDM ),
|
10 |
if( 'rpt_pricing_table' == $post_type ) {
|
11 |
|
12 |
/* CSS for metaboxes. */
|
13 |
+
wp_enqueue_style( 'rpt_dmb_styles', plugins_url('dmb/dmb.min.css', __FILE__), array(), RPT_VER);
|
14 |
/* CSS for previews */
|
15 |
+
wp_enqueue_style( 'rpt_styles', plugins_url('css/rpt_style.min.css', __FILE__), array(), RPT_VER);
|
16 |
/* Others */
|
17 |
wp_enqueue_style( 'wp-color-picker' );
|
18 |
|
19 |
/* JS for metaboxes. */
|
20 |
+
wp_enqueue_script( 'rpt', plugins_url('dmb/dmb.min.js', __FILE__), array( 'jquery', 'thickbox', 'wp-color-picker' ), RPT_VER);
|
21 |
wp_localize_script( 'rpt', 'objectL10n', array(
|
22 |
'untitled' => __( 'Untitled', RPT_TXTDM ),
|
23 |
'copy' => __( 'copy', RPT_TXTDM ),
|
inc/rpt-front-scripts.php
CHANGED
@@ -3,8 +3,8 @@
|
|
3 |
/* Enqueues front scripts. */
|
4 |
add_action( 'wp_enqueue_scripts', 'add_rpt_scripts', 99 );
|
5 |
function add_rpt_scripts() {
|
6 |
-
wp_enqueue_style( 'rpt', plugins_url('css/rpt_style.min.css', __FILE__));
|
7 |
-
wp_enqueue_script( 'rpt', plugins_url('js/rpt.min.js', __FILE__), array( 'jquery' ));
|
8 |
}
|
9 |
|
10 |
?>
|
3 |
/* Enqueues front scripts. */
|
4 |
add_action( 'wp_enqueue_scripts', 'add_rpt_scripts', 99 );
|
5 |
function add_rpt_scripts() {
|
6 |
+
wp_enqueue_style( 'rpt', plugins_url('css/rpt_style.min.css', __FILE__), array(), RPT_VER);
|
7 |
+
wp_enqueue_script( 'rpt', plugins_url('js/rpt.min.js', __FILE__), array( 'jquery' ), RPT_VER);
|
8 |
}
|
9 |
|
10 |
?>
|
inc/rpt-metaboxes-pro.php
CHANGED
@@ -30,7 +30,7 @@ function dmb_rpts_pro_display() { ?>
|
|
30 |
</div>
|
31 |
|
32 |
<a class="dmb_button dmb_button_huge dmb_button_green dmb_see_pro" target="_blank" href="https://wpdarko.com/items/responsive-pricing-table-pro">
|
33 |
-
See all the new features
|
34 |
</a>
|
35 |
|
36 |
<div class="dmb_discount_box_pushr"></div>
|
30 |
</div>
|
31 |
|
32 |
<a class="dmb_button dmb_button_huge dmb_button_green dmb_see_pro" target="_blank" href="https://wpdarko.com/items/responsive-pricing-table-pro">
|
33 |
+
See all the new features
|
34 |
</a>
|
35 |
|
36 |
<div class="dmb_discount_box_pushr"></div>
|
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Contributors: spwebguy
|
3 |
Tags: pricing table, pricing tables, prices, pricing, plans, offer, shortcode, price, responsive, pricing, tables, pricing plan
|
4 |
Requires at least: 3.6
|
5 |
-
Tested up to: 5.
|
6 |
Stable tag: trunk
|
7 |
License: GPL2
|
8 |
License URI: http://www.gnu.org/licenses/gpl.html
|
@@ -91,6 +91,12 @@ Find help on [our support platform](https://wpdarko.com/support) for this plugin
|
|
91 |
5. Finding the shortcode (admin view)
|
92 |
|
93 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
= 5.1.1 =
|
95 |
* CSS fixes for WordPress 5.5
|
96 |
|
2 |
Contributors: spwebguy
|
3 |
Tags: pricing table, pricing tables, prices, pricing, plans, offer, shortcode, price, responsive, pricing, tables, pricing plan
|
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
|
91 |
5. Finding the shortcode (admin view)
|
92 |
|
93 |
== Changelog ==
|
94 |
+
= 5.1.2 =
|
95 |
+
* Updated deprecated jQuery code
|
96 |
+
* Fixed Instant Preview issue
|
97 |
+
* Fixed color pickers bug
|
98 |
+
* Fixed button alignment
|
99 |
+
|
100 |
= 5.1.1 =
|
101 |
* CSS fixes for WordPress 5.5
|
102 |
|
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://wpdarko.com/support">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.
|
8 |
* Author: WP Darko
|
9 |
* Author URI: https://wpdarko.com
|
10 |
* Text Domain: dk-pricr-responsive-pricing-table
|
@@ -18,6 +18,9 @@ define( 'RPT_PATH', plugin_dir_path( __FILE__ ) );
|
|
18 |
/* Defines plugin's text domain. */
|
19 |
define( 'RPT_TXTDM', 'dk-pricr-responsive-pricing-table' );
|
20 |
|
|
|
|
|
|
|
21 |
|
22 |
/* General. */
|
23 |
require_once('inc/rpt-text-domain.php');
|
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://wpdarko.com/support">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.2
|
8 |
* Author: WP Darko
|
9 |
* Author URI: https://wpdarko.com
|
10 |
* Text Domain: dk-pricr-responsive-pricing-table
|
18 |
/* Defines plugin's text domain. */
|
19 |
define( 'RPT_TXTDM', 'dk-pricr-responsive-pricing-table' );
|
20 |
|
21 |
+
/* Defines plugin's version. */
|
22 |
+
define( 'RPT_VER', '5.1.2' );
|
23 |
+
|
24 |
|
25 |
/* General. */
|
26 |
require_once('inc/rpt-text-domain.php');
|