| @@ -313,9 +313,9 @@ | ||
| 313 | 313 | |
| 314 | 314 | // Load all the assets for the different libraries we support. |
| 315 | 315 | $deps = array( |
| 316 | 316 | Visualizer_Render_Sidebar_Google::enqueue_assets( array( 'media-editor' ) ), |
| 317 | - Visualizer_Render_Sidebar_Type_DataTable_DataTable::enqueue_assets( array( 'media-editor' ) ), | |
| 317 | + Visualizer_Render_Sidebar_Type_DataTable_Tabular::enqueue_assets( array( 'media-editor' ) ), | |
| 318 | 318 | ); |
| 319 | 319 | |
| 320 | 320 | wp_enqueue_script( 'visualizer-media-model', VISUALIZER_ABSURL . 'js/media/model.js', $deps, Visualizer_Plugin::VERSION, true ); |
| 321 | 321 | wp_enqueue_script( 'visualizer-media-collection', VISUALIZER_ABSURL . 'js/media/collection.js', array( 'visualizer-media-model' ), Visualizer_Plugin::VERSION, true ); |
| @@ -391,12 +391,12 @@ | ||
| 391 | 391 | |
| 392 | 392 | $types = array_merge( |
| 393 | 393 | $additional, |
| 394 | 394 | array( |
| 395 | - 'dataTable' => array( | |
| 395 | + 'tabular' => array( | |
| 396 | 396 | 'name' => esc_html__( 'Table', 'visualizer' ), |
| 397 | 397 | 'enabled' => true, |
| 398 | - 'supports' => array( 'DataTable' ), | |
| 398 | + 'supports' => array( 'Google Charts', 'DataTable' ), | |
| 399 | 399 | ), |
| 400 | 400 | 'pie' => array( |
| 401 | 401 | 'name' => esc_html__( 'Pie/Donut', 'visualizer' ), |
| 402 | 402 | 'enabled' => true, |
| @@ -449,13 +449,8 @@ | ||
| 449 | 449 | 'enabled' => true, |
| 450 | 450 | 'supports' => array( 'Google Charts' ), |
| 451 | 451 | ), |
| 452 | 452 | // pro types |
| 453 | - 'table' => array( | |
| 454 | - 'name' => esc_html__( 'Table (Deprecated)', 'visualizer' ), | |
| 455 | - 'enabled' => false, | |
| 456 | - 'supports' => array( 'Google Charts' ), | |
| 457 | - ), | |
| 458 | 453 | 'timeline' => array( |
| 459 | 454 | 'name' => esc_html__( 'Timeline', 'visualizer' ), |
| 460 | 455 | 'enabled' => false, |
| 461 | 456 | 'supports' => array( 'Google Charts', 'ChartJS' ), |
| @@ -524,18 +519,8 @@ | ||
| 524 | 519 | switch ( $where ) { |
| 525 | 520 | case 'types': |
| 526 | 521 | // fall-through |
| 527 | 522 | case 'library': |
| 528 | - // if the user has a Google Table chart, show it as deprecated otherwise remove the option from the library. | |
| 529 | - if ( ! self::hasChartType( 'table' ) ) { | |
| 530 | - $deprecated[] = 'table'; | |
| 531 | - if ( $get2Darray ) { | |
| 532 | - $types['dataTable'] = esc_html__( 'Table', 'visualizer' ); | |
| 533 | - } else { | |
| 534 | - $types['dataTable']['name'] = esc_html__( 'Table', 'visualizer' ); | |
| 535 | - } | |
| 536 | - } | |
| 537 | - | |
| 538 | 523 | // if a user has a Gauge/Candlestick chart, then let them keep using it. |
| 539 | 524 | if ( ! Visualizer_Module::is_pro() ) { |
| 540 | 525 | if ( ! self::hasChartType( 'gauge' ) ) { |
| 541 | 526 | if ( $get2Darray ) { |
| @@ -553,18 +538,8 @@ | ||
| 553 | 538 | } |
| 554 | 539 | } |
| 555 | 540 | break; |
| 556 | 541 | default: |
| 557 | - // remove the option to create a Google Table chart. | |
| 558 | - $deprecated[] = 'table'; | |
| 559 | - | |
| 560 | - // rename the new table chart type. | |
| 561 | - if ( $get2Darray ) { | |
| 562 | - $types['dataTable'] = esc_html__( 'Table', 'visualizer' ); | |
| 563 | - } else { | |
| 564 | - $types['dataTable']['name'] = esc_html__( 'Table', 'visualizer' ); | |
| 565 | - } | |
| 566 | - | |
| 567 | 542 | // if a user has a Gauge/Candlestick chart, then let them keep using it. |
| 568 | 543 | if ( ! Visualizer_Module::is_pro() ) { |
| 569 | 544 | if ( ! self::hasChartType( 'gauge' ) ) { |
| 570 | 545 | if ( $get2Darray ) { |
| @@ -622,8 +597,9 @@ | ||
| 622 | 597 | * @param string $suffix The current page suffix. |
| 623 | 598 | */ |
| 624 | 599 | public function enqueueLibraryScripts( $suffix ) { |
| 625 | 600 | if ( $suffix === $this->_libraryPage ) { |
| 601 | + wp_register_script( 'visualizer-clipboardjs', VISUALIZER_ABSURL . 'js/lib/clipboardjs/clipboard.min.js', array( 'jquery' ), Visualizer_Plugin::VERSION, true ); | |
| 626 | 602 | wp_enqueue_style( 'visualizer-library', VISUALIZER_ABSURL . 'css/library.css', array(), Visualizer_Plugin::VERSION ); |
| 627 | 603 | $this->_addFilter( 'media_upload_tabs', 'setupVisualizerTab' ); |
| 628 | 604 | wp_enqueue_media(); |
| 629 | 605 | wp_enqueue_script( |
| @@ -631,8 +607,9 @@ | ||
| 631 | 607 | VISUALIZER_ABSURL . 'js/library.js', |
| 632 | 608 | array( |
| 633 | 609 | 'jquery', |
| 634 | 610 | 'media-views', |
| 611 | + 'visualizer-clipboardjs', | |
| 635 | 612 | ), |
| 636 | 613 | Visualizer_Plugin::VERSION, |
| 637 | 614 | true |
| 638 | 615 | ); |
| @@ -977,9 +954,10 @@ | ||
| 977 | 954 | ), |
| 978 | 955 | ), |
| 979 | 956 | 'page_type' => 'library', |
| 980 | 957 | 'is_front' => false, |
| 981 | - 'i10n' => array( | |
| 958 | + 'i10n' => array( | |
| 959 | + 'copied' => __( 'The shortcode has been copied to your clipboard. Hit Ctrl-V/Cmd-V to paste it.', 'visualizer' ), | |
| 982 | 960 | 'conflict' => __( 'We have detected a potential conflict with another component that prevents Visualizer from functioning properly. Please disable any of the following components if they are activated on your instance: Modern Events Calendar plugin, Acronix plugin. In case the aforementioned components are not activated or you continue to see this error message, please disable all other plugins and enable them one by one to find out the component that is causing the conflict.', 'visualizer' ), |
| 983 | 961 | ), |
| 984 | 962 | ) |
| 985 | 963 | ); |