PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.11.10
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.11.10
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.10.1 3.10.10 3.10.11 3.10.12 3.10.13 3.10.14 3.10.15 3.10.2 3.10.3 All 149 releases
← All changes | js/frame.js +2 -119 4.0.33.11.10 View file →
@@ -35,9 +35,8 @@
35 35 });
36 36 }
37 37
38 38 function onReady() {
39 - initAccessibility();
40 39 initTabs();
41 40
42 41 // open the correct source tab/sub-tab.
43 42 var source = $('#visualizer-chart-id').attr('data-chart-source');
@@ -73,9 +72,8 @@
73 72
74 73 $('.type-radio').change(function () {
75 74 $('.type-label-selected').removeClass('type-label-selected');
76 75 $(this).parent().addClass('type-label-selected');
77 - updateTypeAriaChecked();
78 76 });
79 77
80 78 // collapse other open sections of this group
81 79 $(document).on('click', '.viz-group-title', function () {
@@ -96,18 +94,15 @@
96 94 * and then show the chart as it was
97 95 * let's close the LHS window and show the chart that is hidden
98 96 */
99 97 $('body').trigger('visualizer:change:action');
100 - updateGroupAriaState($(this));
101 98 });
102 99
103 100 // collapse other open subsections of this section
104 101 $(document).on('click', '.viz-section-title', function () {
105 102 var grandparent = $(this).parent().parent();
106 - grandparent.find('.viz-section-title.open').not(this).each(function () {
107 - $(this).removeClass('open').siblings('.viz-section-items').hide();
108 - });
109 - updateSectionAriaState($(this));
103 + grandparent.find('.viz-section-title.open ~ .viz-section-items').hide();
104 + grandparent.find('.viz-section-title.open').removeClass('open');
110 105 });
111 106
112 107 $('#view-remote-file').click(function () {
113 108 var url = $(this).parent().find('#vz-schedule-url').val();
@@ -159,102 +154,8 @@
159 154 });
160 155
161 156 }
162 157
163 - function initAccessibility(){
164 - // Chart type picker: treat tiles as radios with keyboard support.
165 - var $typePicker = $('#type-picker');
166 - if($typePicker.length){
167 - $typePicker.attr('role', 'radiogroup');
168 - $('.type-label').each(function(){
169 - var $label = $(this);
170 - var $input = $label.find('input[type="radio"]');
171 - $label.attr('tabindex', '0').attr('role', 'radio');
172 - if($input.length){
173 - $label.attr('aria-checked', $input.is(':checked') ? 'true' : 'false');
174 - }else{
175 - $label.attr('aria-disabled', 'true');
176 - }
177 - });
178 - $(document).on('keydown', '.type-label', function(e){
179 - if(e.key === 'Enter' || e.key === ' '){
180 - e.preventDefault();
181 - var $label = $(this);
182 - var $input = $label.find('input[type="radio"]');
183 - if($input.length){
184 - $input.prop('checked', true).trigger('change');
185 - }
186 - }
187 - });
188 - }
189 -
190 - // Collapsible groups: add button roles + keyboard activation.
191 - $('.viz-group-title').each(function(index){
192 - var $title = $(this);
193 - $title.attr('role', 'button').attr('tabindex', '0');
194 - var $content = $title.siblings('.viz-group-content');
195 - if($content.length){
196 - if(!$content.attr('id')){
197 - $content.attr('id', 'viz-group-content-' + index);
198 - }
199 - $title.attr('aria-controls', $content.attr('id'));
200 - updateGroupAriaState($title);
201 - }
202 - });
203 - $(document).on('keydown', '.viz-group-title', function(e){
204 - if(e.key === 'Enter' || e.key === ' '){
205 - e.preventDefault();
206 - $(this).trigger('click');
207 - }
208 - });
209 -
210 - // Subsections in source panel.
211 - $('.viz-section-title').each(function(index){
212 - var $title = $(this);
213 - $title.attr('role', 'button').attr('tabindex', '0');
214 - var $items = $title.siblings('.viz-section-items');
215 - if($items.length){
216 - if(!$items.attr('id')){
217 - $items.attr('id', 'viz-section-items-' + index);
218 - }
219 - $title.attr('aria-controls', $items.attr('id'));
220 - updateSectionAriaState($title);
221 - }
222 - });
223 - $(document).on('keydown', '.viz-section-title', function(e){
224 - if(e.key === 'Enter' || e.key === ' '){
225 - e.preventDefault();
226 - $(this).trigger('click');
227 - }
228 - });
229 - }
230 -
231 - function updateTypeAriaChecked(){
232 - $('.type-label').each(function(){
233 - var $label = $(this);
234 - var $input = $label.find('input[type="radio"]');
235 - if($input.length){
236 - $label.attr('aria-checked', $input.is(':checked') ? 'true' : 'false');
237 - }
238 - });
239 - }
240 -
241 - function updateGroupAriaState($title){
242 - if(!$title || $title.length === 0){
243 - return;
244 - }
245 - var isOpen = $title.parent().hasClass('open');
246 - $title.attr('aria-expanded', isOpen ? 'true' : 'false');
247 - }
248 -
249 - function updateSectionAriaState($title){
250 - if(!$title || $title.length === 0){
251 - return;
252 - }
253 - var isOpen = $title.hasClass('open');
254 - $title.attr('aria-expanded', isOpen ? 'true' : 'false');
255 - }
256 -
257 158 /**
258 159 * Initialize/Update the available chart list based on their supported renderer libraries.
259 160 *
260 161 * @returns {void}
@@ -468,10 +369,8 @@
468 369
469 370 function init_filter_import() {
470 371 $( '#db-filter-save-button' ).on( 'click', function(){
471 372 $('#vz-filter-wizard').submit();
472 - $( '#vz-wp-sync-options' ).hide();
473 - $( '#vz-wp-sync-btn' ).attr( 'aria-expanded', false );
474 373 });
475 374 }
476 375
477 376 function init_db_import(){
@@ -544,29 +443,13 @@
544 443 $( '#db-chart-save-button' ).trigger('click');
545 444 }
546 445 } );
547 446
548 - $( document ).on( 'click', '#vz-db-sync-btn', function(){
549 - var $options = $( '#vz-db-sync-options' );
550 - var isOpen = $options.is( ':visible' );
551 - $options.toggle();
552 - $( this ).attr( 'aria-expanded', ! isOpen );
553 - } );
554 -
555 - $( document ).on( 'click', '#vz-wp-sync-btn', function(){
556 - var $options = $( '#vz-wp-sync-options' );
557 - var isOpen = $options.is( ':visible' );
558 - $options.toggle();
559 - $( this ).attr( 'aria-expanded', ! isOpen );
560 - } );
561 -
562 447 $( '#db-chart-save-button' ).on( 'click', function(){
563 448 // submit only if a query has been provided.
564 449 if($('#db-query-form .visualizer-db-query').val().length > 0){
565 450 $('#viz-db-wizard-params').val($('#db-query-form').serialize());
566 451 $('#vz-db-wizard').submit();
567 - $( '#vz-db-sync-options' ).hide();
568 - $( '#vz-db-sync-btn' ).attr( 'aria-expanded', false );
569 452 }else{
570 453 $('#canvas').unlock();
571 454 }
572 455 });