Skip to content

Commit 5934972

Browse files
Merge pull request #654 from contactashish13/issue-194-pro
Features that show parameters screen on LHS (json, db, editor, wp) cannot be cancelled
2 parents d2413ef + 95cc24b commit 5934972

File tree

6 files changed

+93
-19
lines changed

6 files changed

+93
-19
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11

2+
### v3.4.2 - 2020-02-17
3+
**Changes:**
4+
* New Cypress tests for the Gutenberg block
5+
6+
### v3.4.1 - 2020-02-14
7+
**Changes:**
8+
* [Fix] Insert chart button in the classic block
9+
* [Fix for Pro version] Import from chart did not work
10+
211
### v3.4.0 - 2020-02-13
312
**Changes:**
413
* [Feat] Support for authentication for JSON import

js/frame.js

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,15 @@
7979
parent.addClass('open');
8080
}
8181

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');
82+
/*
83+
* if the user wants to perform an action and click that tab to change the source
84+
* and the chart is no longer showing because that particular LHS screen is showing
85+
* e.g. create parameters, import json, db query box etc.
86+
* we need to make sure we cancel the current process WITHOUT saving
87+
* and then show the chart as it was
88+
* let's close the LHS window and show the chart that is hidden
89+
*/
90+
$('body').trigger('visualizer:change:action');
8991
});
9092

9193
// collapse other open subsections of this section
@@ -338,6 +340,16 @@
338340
});
339341

340342
$( '#db-chart-button' ).on( 'click', function(){
343+
344+
$('body').off('visualizer:change:action').on('visualizer:change:action', function(e){
345+
var filter_button = $( '#db-chart-button' );
346+
$( '#visualizer-db-query' ).css("z-index", "-1").hide();
347+
filter_button.val( filter_button.attr( 'data-t-chart' ) );
348+
filter_button.html( filter_button.attr( 'data-t-chart' ) );
349+
filter_button.attr( 'data-current', 'chart' );
350+
$( '#canvas' ).css("z-index", "1").show();
351+
});
352+
341353
$('#content').css('width', 'calc(100% - 300px)');
342354
if( $(this).attr( 'data-current' ) === 'chart'){
343355
$(this).val( $(this).attr( 'data-t-filter' ) );
@@ -390,7 +402,16 @@
390402

391403
// toggle between chart and create/modify parameters
392404
$( '#json-chart-button' ).on( 'click', function(){
393-
var $bttn = $(this);
405+
406+
$('body').off('visualizer:change:action').on('visualizer:change:action', function(e){
407+
var filter_button = $( '#json-chart-button' );
408+
$( '#visualizer-json-screen' ).css("z-index", "-1").hide();
409+
filter_button.val( filter_button.attr( 'data-t-chart' ) );
410+
filter_button.html( filter_button.attr( 'data-t-chart' ) );
411+
filter_button.attr( 'data-current', 'chart' );
412+
$( '#canvas' ).css("z-index", "1").show();
413+
});
414+
394415
$('#content').css('width', 'calc(100% - 100px)');
395416
if( $(this).attr( 'data-current' ) === 'chart'){
396417
// toggle from chart to LHS form

js/simple-editor.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,17 @@
2424

2525
function showTextEditor(button) {
2626
if( button.attr( 'data-current' ) === 'chart'){
27+
28+
$('body').off('visualizer:change:action').on('visualizer:change:action', function(e){
29+
button.val( button.attr( 'data-t-chart' ) );
30+
button.html( button.attr( 'data-t-chart' ) );
31+
button.attr( 'data-current', 'chart' );
32+
$('p.viz-editor-selection').show();
33+
$('.viz-text-editor').hide();
34+
$('.viz-simple-editor').hide();
35+
$( '#canvas' ).css('z-index', '1').show();
36+
});
37+
2738
// showing the editor
2839
button.val( button.attr( 'data-t-editor' ) );
2940
button.html( button.attr( 'data-t-editor' ) );
@@ -57,6 +68,17 @@
5768

5869
function showTableEditor(button) {
5970
if( button.attr( 'data-current' ) === 'chart'){
71+
72+
$('body').off('visualizer:change:action').on('visualizer:change:action', function(e){
73+
button.val( button.attr( 'data-t-chart' ) );
74+
button.html( button.attr( 'data-t-chart' ) );
75+
button.attr( 'data-current', 'chart' );
76+
$('p.viz-editor-selection').show();
77+
$('.viz-table-editor').hide();
78+
$('.viz-simple-editor').hide();
79+
$( '#canvas' ).css('z-index', '1').show();
80+
});
81+
6082
// showing the editor
6183
button.val( button.attr( 'data-t-editor' ) );
6284
button.html( button.attr( 'data-t-editor' ) );

readme.md

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Visualizer: Tables and Charts for WordPress #
2-
**Contributors:** [[codeinwp](https://profiles.wordpress.org/codeinwp)](https://profiles.wordpress.org/[codeinwp](https://profiles.wordpress.org/codeinwp)), [[marius2012](https://profiles.wordpress.org/marius2012)](https://profiles.wordpress.org/[marius2012](https://profiles.wordpress.org/marius2012)), [[marius_codeinwp](https://profiles.wordpress.org/marius_codeinwp)](https://profiles.wordpress.org/[marius_codeinwp](https://profiles.wordpress.org/marius_codeinwp)), [[hardeepasrani](https://profiles.wordpress.org/hardeepasrani)](https://profiles.wordpress.org/[hardeepasrani](https://profiles.wordpress.org/hardeepasrani)), [[themeisle](https://profiles.wordpress.org/themeisle)](https://profiles.wordpress.org/[themeisle](https://profiles.wordpress.org/themeisle)), [[Madalin_ThemeIsle](https://profiles.wordpress.org/Madalin_ThemeIsle)](https://profiles.wordpress.org/[Madalin_ThemeIsle](https://profiles.wordpress.org/Madalin_ThemeIsle)), [[contactashish13](https://profiles.wordpress.org/contactashish13)](https://profiles.wordpress.org/[contactashish13](https://profiles.wordpress.org/contactashish13))
3-
**Tags:** tables, charts, pie, visualization, graphs
1+
# Visualizer: Tables and Charts Manager for WordPress # #
2+
**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:** tables, charts, pie, visualization, graphs
44
**Requires at least:** 3.5
55
**Tested up to:** 5.3
66
**Requires PHP:** 5.6
@@ -11,13 +11,13 @@
1111
A simple and powerful WordPress chart plugin to create responsive charts & tables and embed them into your site.
1212

1313
## Description ##
14-
14+
1515
<p><a href="https://themeisle.com/plugins/visualizer-charts-and-graphs/" rel="nofollow">Visualizer: Tables and Charts for WordPress plugin</a> is a powerful and easy to use plugin used to create, manage and embed interactive, responsive charts & tables into your WordPress posts and pages.</p>
1616

1717
The plugin uses Google Visualization API, DataTables.net and ChartJS to add responsive & animated charts, graphs and tables, which support cross-browser compatibility and display perfectly on mobile devices. You can greatly customize all aspects of the charts and tables, and import the data from Excel, CSV, Google Sheets and more!
1818

1919
### 9 Chart types + 6 more in the pro version ###
20-
This WordPress graph plugin provides a variety of charts that are optimized to address your WordPress data visualization needs. In the free version, it has line charts, area charts, bar charts, column charts, pie charts, geo charts, table charts, bubble charts, scatter charts. These charts are based on pure HTML5/SVG technology (adopting VML for old IE versions), so no extra plugins are required. Adding these charts to your page can be done in a few simple steps.
20+
This WordPress graph plugin provides a variety of charts that are optimized to address your WordPress data visualization needs. In the free version, it has line charts, area charts, bar charts, column charts, pie charts, geo charts, table charts, bubble charts, scatter charts. These charts are based on pure HTML5/SVG technology (adopting VML for old IE versions), so no extra plugins are required. Adding these charts to your page can be done in a few simple steps.
2121

2222
### One of the best table plugin for wordpress ###
2323
On top of our responsive charts and graphs, you can also add our responsive tables to your posts and pages, and customize them however you like. Not only can you customize the design of the tables, you can add sorting capabilities, pagination, search and more. You can view a few examples of what can be done <a href="https://demo.themeisle.com/visualizer/table-chart/">here</a>, but many more things can be done, including pricing tables and product tables.
@@ -162,6 +162,17 @@ Pay attention that to turn your shortcodes into graphs, your theme has to have `
162162
13. Bar chart
163163

164164
## Changelog ##
165+
### 3.4.2 - 2020-02-17 ###
166+
167+
* New Cypress tests for the Gutenberg block
168+
169+
170+
### 3.4.1 - 2020-02-14 ###
171+
172+
* [Fix] Insert chart button in the classic block
173+
* [Fix for Pro version] Import from chart did not work
174+
175+
165176
### 3.4.0 - 2020-02-13 ###
166177

167178
* [Feat] Support for authentication for JSON import
@@ -302,15 +313,15 @@ Pay attention that to turn your shortcodes into graphs, your theme has to have `
302313

303314
* Adds insert button in chart library.
304315
* Remove frontend assets where they are not needed.
305-
* Improve non-English charts compatibility.
316+
* Improve non-English charts compatibility.
306317
* Adds a filter to change charts locale.
307318

308319

309320
### 3.0.6 - 2018-02-27 ###
310321

311-
* Fix UTF-8 support while saving the data.
312-
* Improve editing experience.
313-
* Improves compatibility with Premium version.
322+
* Fix UTF-8 support while saving the data.
323+
* Improve editing experience.
324+
* Improves compatibility with Premium version.
314325
* Adds chart button into TinyMCE editor.
315326

316327

@@ -360,7 +371,7 @@ Pay attention that to turn your shortcodes into graphs, your theme has to have `
360371

361372
### 2.1.8 - 2017-07-03 ###
362373

363-
* Added chart title into library.
374+
* Added chart title into library.
364375
* Fixed SDK issues with dashboard widget.
365376

366377

readme.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,17 @@ Pay attention that to turn your shortcodes into graphs, your theme has to have `
162162
13. Bar chart
163163

164164
== Changelog ==
165+
= 3.4.2 - 2020-02-17 =
166+
167+
* New Cypress tests for the Gutenberg block
168+
169+
170+
= 3.4.1 - 2020-02-14 =
171+
172+
* [Fix] Insert chart button in the classic block
173+
* [Fix for Pro version] Import from chart did not work
174+
175+
165176
= 3.4.0 - 2020-02-13 =
166177

167178
* [Feat] Support for authentication for JSON import

themeisle-hash.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"index.php":"e3217d70f32ef50b1942c9044649aa86"}
1+
{"index.php":"1c0c5ae1729bc8087c5c2bef281bd2e6"}

0 commit comments

Comments
 (0)