PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.6.1
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.6.1
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 3.10.4 All 148 releases
← All changes | js/frame.js +8 -37 3.10.133.6.1 View file →
@@ -382,25 +382,19 @@
382 382 $('.visualizer-json-subform').accordion( "option", "active", i );
383 383 });
384 384
385 385 // toggle between chart and create/modify parameters
386 - $( '#json-chart-button, #woo-chart-button' ).on( 'click', function(){
386 + $( '#json-chart-button' ).on( 'click', function(){
387 387
388 388 $('body').off('visualizer:change:action').on('visualizer:change:action', function(e){
389 - var filter_button = $( '#json-chart-button, #woo-chart-button' );
389 + var filter_button = $( '#json-chart-button' );
390 390 $( '#visualizer-json-screen' ).css("z-index", "-1").hide();
391 391 filter_button.val( filter_button.attr( 'data-t-chart' ) );
392 392 filter_button.html( filter_button.attr( 'data-t-chart' ) );
393 393 filter_button.attr( 'data-current', 'chart' );
394 394 $( '#canvas' ).css("z-index", "1").show();
395 - $( '#vz-import-woo-report' ).find( 'select, input' ).removeAttr( 'disabled' );
396 395 });
397 396
398 - if ( 'json-chart-button' === $( this ).attr( 'id' ) ) {
399 - $( '#vz-import-woo-report' ).find( 'select, input' ).attr( 'disabled', true );
400 - } else {
401 - $( '#vz-import-woo-report' ).find( 'select, input' ).removeAttr( 'disabled' );
402 - }
403 397 $('#content').css('width', 'calc(100% - 100px)');
404 398 if( $(this).attr( 'data-current' ) === 'chart'){
405 399 // toggle from chart to LHS form
406 400 $(this).val( $(this).attr( 'data-t-filter' ) );
@@ -407,17 +401,8 @@
407 401 $(this).html( $(this).attr( 'data-t-filter' ) );
408 402 $(this).attr( 'data-current', 'filter' );
409 403 $( '.visualizer-editor-lhs' ).hide();
410 404 $( '#visualizer-json-screen' ).css("z-index", "9999").show();
411 - if ( 'woo-chart-button' === $( this ).attr( 'id' ) && '' !== $( '#vz-woo-source:visible' ).val() ) {
412 - $( '#vz-import-json-url' ).val( visualizer.rest_base + $( '#vz-woo-source' ).val() ).attr( 'readonly', true );
413 - } else {
414 - if ( 'undefined' !== $( '#vz-import-json-url' ).attr( 'readonly' ) ) {
415 - $( '#vz-import-json-url' ).val( '' ).removeAttr( 'readonly' ).removeAttr( 'value' );
416 - $('#json-endpoint-form')[0].reset();
417 - $('.visualizer-json-form h3.viz-step:not(.step1)').addClass('ui-state-disabled');
418 - }
419 - }
420 405 $( '#canvas' ).hide();
421 406 }else{
422 407 // toggle from LHS form to chart
423 408 $( '#json-conclude-form' ).trigger('submit');
@@ -424,9 +409,9 @@
424 409 }
425 410 } );
426 411
427 412 $('body').on('visualizer:json:form:submit', function() {
428 - var filter_button = $( '#json-chart-button, #woo-chart-button' );
413 + var filter_button = $( '#json-chart-button' );
429 414 $( '#visualizer-json-screen' ).css("z-index", "-1").hide();
430 415 $('#canvas').lock();
431 416 filter_button.val( filter_button.attr( 'data-t-chart' ) );
432 417 filter_button.html( filter_button.attr( 'data-t-chart' ) );
@@ -431,9 +416,9 @@
431 416 filter_button.val( filter_button.attr( 'data-t-chart' ) );
432 417 filter_button.html( filter_button.attr( 'data-t-chart' ) );
433 418 filter_button.attr( 'data-current', 'chart' );
434 419 end_ajax( $( '#visualizer-json-screen' ) );
435 - $( '#canvas' ).removeClass('visualizer-chart-loaded').css("z-index", "1").show();
420 + $( '#canvas' ).css("z-index", "1").show();
436 421 });
437 422
438 423
439 424 // fetch the roots for the provided endpoint
@@ -526,9 +511,9 @@
526 511 return false;
527 512 }
528 513
529 514 // populate the form elements that are in the other tabs.
530 - $('#json-conclude-form-helper .json-form-element, #json-endpoint-form .json-form-element, #json-root-form .json-form-element, #vz-import-json .json-form-element, #vz-import-woo-report .json-form-element:not(:disabled)').each(function(x, y){
515 + $('#json-conclude-form-helper .json-form-element, #json-endpoint-form .json-form-element, #json-root-form .json-form-element, #vz-import-json .json-form-element').each(function(x, y){
531 516 $('#json-conclude-form').append('<input type="hidden" name="' + y.name + '" value="' + y.value + '">');
532 517 });
533 518
534 519 $('body').trigger('visualizer:json:form:submit');
@@ -534,12 +519,11 @@
534 519 $('body').trigger('visualizer:json:form:submit');
535 520 });
536 521
537 522 // update the schedule
538 - $('#json-chart-save-button, #woo-chart-save-button').on('click', function(e){
523 + $('#json-chart-save-button').on('click', function(e){
539 524 e.preventDefault();
540 525 $('#canvas').lock();
541 - var btnID = jQuery( this ).attr( 'id' );
542 526 $.ajax({
543 527 url : ajaxurl,
544 528 method : 'post',
545 529 data : {
@@ -544,11 +528,10 @@
544 528 method : 'post',
545 529 data : {
546 530 'action' : visualizer.ajax['actions']['json_set_schedule'],
547 531 'security' : visualizer.ajax['nonces']['json_set_schedule'],
548 - 'chart' : $('#vz-json-time, #vz-woo-time').attr('data-chart'),
549 - 'time' : $('#vz-json-time, #vz-woo-time').val(),
550 - 'is_woocommerce_report': 'woo-chart-save-button' === btnID,
532 + 'chart' : $('#vz-json-time').attr('data-chart'),
533 + 'time' : $('#vz-json-time').val()
551 534 },
552 535 success : function(data){
553 536 // do nothing.
554 537 },
@@ -556,20 +539,8 @@
556 539 $('#canvas').unlock();
557 540 }
558 541 });
559 542 });
560 -
561 - // Select WooCommerce report endpoint.
562 - $( '#vz-woo-source' ).on( 'click', function( e ) {
563 - // Trigger change action.
564 - $( 'body' ).trigger( 'visualizer:change:action' );
565 -
566 - if ( '' !== $( this ).val() ) {
567 - $( '#woo-chart-button, #woo-chart-save-button' ).removeAttr( 'disabled' );
568 - } else {
569 - $( '#woo-chart-button, #woo-chart-save-button' ).attr( 'disabled', true );
570 - }
571 - } );
572 543
573 544 }
574 545
575 546 function init_editor_table() {