Skip to content

Commit 2ff5419

Browse files
Merge pull request #8 from Codeinwp/development
Development
2 parents ac6dc30 + 6aaa3d2 commit 2ff5419

File tree

11 files changed

+59
-20
lines changed

11 files changed

+59
-20
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
language: php
22
sudo: false
3+
dist: trusty
34
matrix:
45
fast_finish: true
56
include:

classes/Visualizer/Module/Sources.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,14 @@ public function addProUpsell( $old, $feature = null ) {
134134
$return = '';
135135
$feature = strval( $feature );
136136
if ( empty( $feature ) || ( in_array( $feature, $biz_features, true ) && ! apply_filters( 'visualizer_is_business', false ) ) ) {
137-
$plan = 'PRO';
138-
if ( in_array( $feature, $biz_features, true ) ) {
139-
$plan = 'DEVELOPER';
137+
$msg = sprintf( __( 'Upgrade to %s to activate this feature!', 'visualizer' ), 'PRO' );
138+
if ( Visualizer_Module::is_pro() && in_array( $feature, $biz_features, true ) ) {
139+
$msg = sprintf( __( 'Upgrade your license to at least the %s version to activate this feature!', 'visualizer' ), 'DEVELOPER' );
140140
}
141141
$return = '<div class="only-pro-content">';
142142
$return .= ' <div class="only-pro-container">';
143143
$return .= ' <div class="only-pro-inner">';
144-
$return .= ' <p>' . sprintf( __( 'Activate your %s version to use this feature!', 'visualizer' ), $plan ) . '</p>';
144+
$return .= ' <p>' . $msg . '</p>';
145145
$return .= ' <a target="_blank" href="' . Visualizer_Plugin::PRO_TEASER_URL . '" title="' . __( 'Buy now', 'visualizer' ) . '">' . __( 'Buy now', 'visualizer' ) . '</a>';
146146
$return .= ' </div>';
147147
$return .= ' </div>';

classes/Visualizer/Render/Library.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ private function _renderSidebar() {
243243
if ( ! Visualizer_Module::is_pro() ) {
244244
echo '<div id="visualizer-sidebar">';
245245
echo '<div class="visualizer-sidebar-box">';
246-
echo '<h3>' . __( 'Gain more editing power', 'visualizer' ) . '</h3><ul>';
246+
echo '<h3>' . __( 'Discover the power of PRO!', 'visualizer' ) . '</h3><ul>';
247247
echo '<li>' . __( 'Spreadsheet like editor', 'visualizer' ) . '</li>';
248248
echo '<li>' . __( 'Import from other charts', 'visualizer' ) . '</li>';
249249
echo '<li>' . __( 'Use database query to create charts', 'visualizer' ) . '</li>';
@@ -253,6 +253,7 @@ private function _renderSidebar() {
253253
echo '<li>' . __( 'Auto-sync with online files', 'visualizer' ) . '</li>';
254254
echo '<li>' . __( '6 more chart types', 'visualizer' ) . '</li></ul>';
255255
echo '<p><a href="' . Visualizer_Plugin::PRO_TEASER_URL . '" target="_blank" class="button button-primary">' . __( 'View more features', 'visualizer' ) . '</a></p>';
256+
echo '<p style="background-color: #0073aac7; color: #ffffff; padding: 2px; font-weight: bold;">' . __( 'We offer a 30-day no-questions-asked money back guarantee!', 'visualizer' ) . '</p>';
256257
echo '<p><a href="' . VISUALIZER_SURVEY . '" target="_blank" class="">' . __( 'Don\'t see the features you need? Help us improve!', 'visualizer' ) . '</a></p>';
257258
echo '</div>';
258259
echo '</div>';

classes/Visualizer/Render/Page/Data.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ class="visualizer-select">
221221
?>
222222
</div>
223223

224-
<input type="button" id="json-chart-button" class="button button-secondary "
224+
<input type="button" id="json-chart-button" class="button button-secondary show-chart-toggle"
225225
value="<?php echo $bttn_label; ?>" data-current="chart"
226226
data-t-filter="<?php _e( 'Show Chart', 'visualizer' ); ?>"
227227
data-t-chart="<?php echo $bttn_label; ?>">
@@ -334,7 +334,7 @@ class="dashicons dashicons-lock"></span></h2>
334334
?>
335335
</select>
336336

337-
<input type="button" id="filter-chart-button" class="button button-secondary" value="<?php echo $bttn_label; ?>" data-current="chart" data-t-filter="<?php _e( 'Show Chart', 'visualizer' ); ?>" data-t-chart="<?php echo $bttn_label; ?>">
337+
<input type="button" id="filter-chart-button" class="button button-secondary show-chart-toggle" value="<?php echo $bttn_label; ?>" data-current="chart" data-t-filter="<?php _e( 'Show Chart', 'visualizer' ); ?>" data-t-chart="<?php echo $bttn_label; ?>">
338338
<input type="button" id="db-filter-save-button" class="button button-primary" value="<?php _e( 'Save Schedule', 'visualizer' ); ?>">
339339
<?php echo apply_filters( 'visualizer_pro_upsell', '', 'db-query' ); ?>
340340
</form>
@@ -384,7 +384,7 @@ class="dashicons dashicons-lock"></span></h2>
384384
</select>
385385
<input type="hidden" name="params" id="viz-db-wizard-params">
386386

387-
<input type="button" id="db-chart-button" class="button button-secondary" value="<?php echo $bttn_label; ?>" data-current="chart" data-t-filter="<?php _e( 'Show Chart', 'visualizer' ); ?>" data-t-chart="<?php echo $bttn_label; ?>">
387+
<input type="button" id="db-chart-button" class="button button-secondary show-chart-toggle" value="<?php echo $bttn_label; ?>" data-current="chart" data-t-filter="<?php _e( 'Show Chart', 'visualizer' ); ?>" data-t-chart="<?php echo $bttn_label; ?>">
388388
<input type="button" id="db-chart-save-button" class="button button-primary" value="<?php _e( 'Save Schedule', 'visualizer' ); ?>">
389389
<?php echo apply_filters( 'visualizer_pro_upsell', '', 'db-query' ); ?>
390390
</form>

index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ function visualizer_launch() {
125125
add_filter( 'themeisle_sdk_products', 'visualizer_register_sdk', 10, 1 );
126126
add_filter( 'pirate_parrot_log', 'visualizer_register_parrot', 10, 1 );
127127

128-
define( 'VISUALIZER_SURVEY', Visualizer_Module::is_pro() ? 'https://docs.google.com/forms/d/1WYZTHLnL7Nb6MpdjaOSo07iEjlDvolVB2wFDxUL9YnQ/' : 'https://docs.google.com/forms/d/10JiVg_XAFHOy9Vh7TFZuFybd4U_IOlldXXf1Z8Kkf7I' );
128+
define( 'VISUALIZER_SURVEY', Visualizer_Module::is_pro() ? 'https://forms.gle/7Zo7FuZbvQ8DTvRi6' : 'https://forms.gle/muMtbcyvHn1aTvmJ7' );
129129

130130
}
131131

js/frame.js

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@
6767

6868
return false;
6969
});
70+
71+
// collapse other open sections of this group
7072
$('.viz-group-title').click(function () {
7173
var parent = $(this).parent();
7274

@@ -76,7 +78,23 @@
7678
parent.parent().find('.viz-group.open').removeClass('open');
7779
parent.addClass('open');
7880
}
81+
82+
// if the user wanted to perform an action
83+
// and the chart is no longer showing because that particular screen is showing
84+
// e.g. create parameters
85+
// and then the user decided to click on another action
86+
// let's invoke the show chart of the previous action so that the chart shows
87+
// and the user does not get confused
88+
$('input[type="button"][data-current!="chart"].show-chart-toggle').trigger('click');
89+
});
90+
91+
// collapse other open subsections of this section
92+
$('.viz-section-title').click(function () {
93+
var grandparent = $(this).parent().parent();
94+
grandparent.find('.viz-section-title.open ~ .viz-section-items').hide();
95+
grandparent.find('.viz-section-title.open').removeClass('open');
7996
});
97+
8098
$('#view-remote-file').click(function () {
8199
var url = $(this).parent().find('#remote-data').val();
82100

@@ -330,8 +348,13 @@
330348
} );
331349

332350
$( '#db-chart-save-button' ).on( 'click', function(){
333-
$('#viz-db-wizard-params').val($('#db-query-form').serialize());
334-
$('#vz-db-wizard').submit();
351+
// submit only if a query has been provided.
352+
if($('#db-query-form .visualizer-db-query').val().length > 0){
353+
$('#viz-db-wizard-params').val($('#db-query-form').serialize());
354+
$('#vz-db-wizard').submit();
355+
}else{
356+
$('#canvas').unlock();
357+
}
335358
});
336359
}
337360

js/render-google.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,8 @@ var __visualizer_chart_images = [];
228228
}
229229
});
230230

231+
$('body').trigger('visualizer:chart:settings:extend', {id: id, chart: chart, settings: settings, data: table});
232+
231233
render.draw(table, settings);
232234
}
233235

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Visualizer: Tables and Charts Manager for WordPress # #
22
**Contributors:** [codeinwp](https://profiles.wordpress.org/codeinwp), [marius2012](https://profiles.wordpress.org/marius2012), [marius_codeinwp](https://profiles.wordpress.org/marius_codeinwp), [hardeepasrani](https://profiles.wordpress.org/hardeepasrani), [themeisle](https://profiles.wordpress.org/themeisle), [Madalin_ThemeIsle](https://profiles.wordpress.org/Madalin_ThemeIsle), [contactashish13](https://profiles.wordpress.org/contactashish13)
3-
**Tags:** chart, charts, charting, graph, graphs, graphing, visualisation, visualise data, visualization, visualize data, HTML5, canvas, pie chart, line chart, bar chart, column chart, gauge chart, area chart, scatter chart, candlestick chart, geo chart, google visualization api, data tables
3+
**Tags:** chart, charts, charting, graph, graphs, graphing, visualisation, visualise data, visualization, visualize data, HTML5, canvas, pie chart, line chart, bar chart, column chart, gauge chart, area chart, scatter chart, candlestick chart, geo chart, google visualization api, data tables, chartjs
44
**Requires at least:** 3.5
55
**Tested up to:** 5.2
66
**Stable tag:** trunk
@@ -13,7 +13,7 @@ A simple and quite powerful WordPress chart plugin to create and embed interacti
1313

1414
<a href="https://themeisle.com/plugins/visualizer-charts-and-graphs/" rel="nofollow">Visualizer: Tables and Charts Manager for WordPress plugin</a> is a simple, easy to use and quite powerful tool to create, manage and embed interactive charts & tables into your WordPress posts and pages.
1515

16-
The plugin uses Google Visualization API and DataTables.net to add responsive & animated charts/diagrams, which support cross-browser compatibility (adopting VML for older IE versions) and cross-platform portability to iOS and new Android releases. Is the best Excel to WordPress solution who let's you insert charts to your wp site using a simple chart builder.
16+
The plugin uses Google Visualization API, DataTables.net and ChartJS to add responsive & animated charts/diagrams, which support cross-browser compatibility (adopting VML for older IE versions) and cross-platform portability to iOS and new Android releases. Is the best Excel to WordPress solution who let's you insert charts to your wp site using a simple chart builder.
1717

1818
> **Time-saving features available in the Pro version:**
1919
>

readme.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
=== Visualizer: Tables and Charts Manager for WordPress # ===
22
Contributors: codeinwp,marius2012,marius_codeinwp,hardeepasrani,themeisle,Madalin_ThemeIsle,contactashish13
3-
Tags: chart, charts, charting, graph, graphs, graphing, visualisation, visualise data, visualization, visualize data, HTML5, canvas, pie chart, line chart, bar chart, column chart, gauge chart, area chart, scatter chart, candlestick chart, geo chart, google visualization api, data tables
3+
Tags: chart, charts, charting, graph, graphs, graphing, visualisation, visualise data, visualization, visualize data, HTML5, canvas, pie chart, line chart, bar chart, column chart, gauge chart, area chart, scatter chart, candlestick chart, geo chart, google visualization api, data tables, chartjs
44
Requires at least: 3.5
55
Tested up to: 5.2
66
Stable tag: trunk
@@ -13,7 +13,7 @@ A simple and quite powerful WordPress chart plugin to create and embed interacti
1313

1414
<a href="http://themeisle.com/plugins/visualizer-charts-and-graphs-lite/" rel="nofollow">Visualizer: Tables and Charts Manager for WordPress (Lite) plugin</a> is a simple, easy to use and quite powerful tool to create, manage and embed interactive charts & tables into your WordPress posts and pages.
1515

16-
The plugin uses Google Visualization API and DataTables.net to add responsive & animated charts/diagrams, which support cross-browser compatibility (adopting VML for older IE versions) and cross-platform portability to iOS and new Android releases. Is the best Excel to WordPress solution who let's you insert charts to your wp site using a simple chart builder.
16+
The plugin uses Google Visualization API, DataTables.net and ChartJS to add responsive & animated charts/diagrams, which support cross-browser compatibility (adopting VML for older IE versions) and cross-platform portability to iOS and new Android releases. Is the best Excel to WordPress solution who let's you insert charts to your wp site using a simple chart builder.
1717

1818
> **Time-saving features available in the Pro version:**
1919
>

templates/upsell.php renamed to templates/more.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
<?php
2+
if ( ! Visualizer_Module::is_pro() ) {
3+
?>
14
<div class="pro-feature">
25
<div class="pro-feature-inner">
36
<div class="pro-feature-features">
@@ -37,6 +40,11 @@
3740
</div>
3841
<div class="clear"></div>
3942

43+
<?php
44+
}
45+
if ( ! apply_filters( 'visualizer_is_business', false ) ) {
46+
?>
47+
4048
<div class="pro-feature">
4149
<div class="pro-feature-inner">
4250
<div class="pro-feature-features">
@@ -48,3 +56,7 @@
4856
<div class="clear"></div>
4957
</div>
5058
</div>
59+
60+
<?php
61+
}
62+
?>

0 commit comments

Comments
 (0)