Changeset 2285358
- Timestamp:
- 04/17/2020 02:35:26 AM (6 years ago)
- Location:
- wysiwyg-custom-products
- Files:
-
- 9 edited
-
tags/1.2/readme.txt (modified) (1 diff)
-
tags/1.2/wysiwyg-custom-products.php (modified) (1 diff)
-
trunk/admin/class-layout.php (modified) (3 diffs)
-
trunk/assets/js/admin/line-manager.js (modified) (5 diffs)
-
trunk/assets/js/admin/settings-layout.js (modified) (4 diffs)
-
trunk/assets/stylesheets/settings.css (modified) (1 diff)
-
trunk/common/class-layout.php (modified) (16 diffs)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/wysiwyg-custom-products.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wysiwyg-custom-products/tags/1.2/readme.txt
r2233022 r2285358 4 4 Tags: WYSIWYG, wysiwyg, custom, customised, customized, preview, live, update, view, woocommerce 5 5 Requires at least: 4.9.0 6 Tested up to: 5. 3.26 Tested up to: 5.4.0 7 7 Requires PHP: 5.6.0 8 8 Stable tag: 1.2 -
wysiwyg-custom-products/tags/1.2/wysiwyg-custom-products.php
r2233022 r2285358 12 12 * Domain Path: /languages 13 13 * WC requires at least: 3.0.0 14 * WC tested up to: 3.9.014 * WC tested up to: 4.0.1 15 15 * This program is free software: you can redistribute it and/or modify 16 16 * it under the terms of the GNU General Public License as published by -
wysiwyg-custom-products/trunk/admin/class-layout.php
r2233022 r2285358 83 83 $htmlEcho->tag( 'p', $htmlBuild->get_html(), 'form-field' ); 84 84 85 85 86 $htmlEcho->popDoEscape(); 86 87 $htmlEcho->c_div(); … … 91 92 * 92 93 * @since 1.1.0 Refactored 94 * @updated 1.2.7 93 95 */ 94 96 public function line_format_meta_box() { … … 154 156 $htmlEcho->o_tag( 'table', 'hidden', 'line_formats' ); 155 157 156 $headerAttributes = [ 'width' => intdiv( 100, 6 ) . '%' ];158 $headerAttributes = [ 'width' => '17%' ]; 157 159 $htmlEcho->o_tag( 'tr' ); 158 160 -
wysiwyg-custom-products/trunk/assets/js/admin/line-manager.js
r2011778 r2285358 5 5 * 6 6 * @since 1.0.0 7 * @updated 1.2. 07 * @updated 1.2.7 8 8 */ 9 9 … … 28 28 29 29 30 var keepSame = {30 var keepSame = { 31 31 0: false, // Y 32 32 1: true, // X … … 74 74 * 75 75 * @since 1.0.0 76 * @updated 1.2. 076 * @updated 1.2.7 77 77 */ 78 78 $wcpA.LineManagerLine.prototype.setLine = function (line) { … … 89 89 this.drawVisuals(); 90 90 }; 91 /** 92 * Sets a value associated with an action 93 * 94 * @param action 95 * @param value 96 * 97 * @since 1.0.0 98 * @updated 1.2.7 99 */ 91 100 92 101 $wcpA.LineManagerLine.prototype.setValue = function (action, value) { … … 461 470 * @param action One of the actions enumerated in line-manager.js 462 471 * 463 * @returns int 464 * 465 * @since 1.0.0 466 * @updated 1. 0.0472 * @returns int | string 473 * 474 * @since 1.0.0 475 * @updated 1.2.7 467 476 */ 468 477 $wcpA.LineManagerLine.prototype.getVal = function (action) { -
wysiwyg-custom-products/trunk/assets/js/admin/settings-layout.js
r2233022 r2285358 3 3 * 4 4 * @since 1.2.0 5 * @updated 1.2. 65 * @updated 1.2.7 6 6 */ 7 7 … … 43 43 * 44 44 * @since 1.0.0 45 * @updated 1.2. 645 * @updated 1.2.7 46 46 */ 47 47 function reloadLayout() { … … 112 112 113 113 /** 114 * Ajax call to fetch the selected layout. initialise is set during initialisation114 * Ajax call to fetch the selected layout. 115 115 * 116 116 * … … 797 797 * 798 798 * @since 1.0.0 799 * @updated 1.2. 0799 * @updated 1.2.7 800 800 */ 801 801 $wcpA.initialise = function () { -
wysiwyg-custom-products/trunk/assets/stylesheets/settings.css
r2011778 r2285358 82 82 } 83 83 84 .woocommerce_options_panel textarea { 85 height: auto !important; 86 } 87 84 88 /* Make sure entry table is suitably sized */ 85 89 td input[type=number], td input[type=text], td select { -
wysiwyg-custom-products/trunk/common/class-layout.php
r2233022 r2285358 39 39 * 40 40 * @since 1.0.0 41 * @updated 1.2. 541 * @updated 1.2.7 42 42 */ 43 43 class Layout { … … 129 129 'SinglelineReformat' => '', 130 130 'IeMessage' => '', 131 'EffectUUID' => '', 131 132 'InkColor' => 0x000000, // Black 132 133 'ActiveMouseColor' => 0x00FFFF, // Aqua … … 135 136 'Lines1' => [ 136 137 [ 137 'Y' => 300, // self::DEFAULT_IMAGE_SIZE / 2, PHP < 5.6 fiddle138 'X' => 300, //self::DEFAULT_IMAGE_SIZE / 2,139 'Width' => 300, //self::DEFAULT_IMAGE_SIZE / 2,138 'Y' => self::DEFAULT_IMAGE_SIZE / 2, 139 'X' => self::DEFAULT_IMAGE_SIZE / 2, 140 'Width' => self::DEFAULT_IMAGE_SIZE / 2, 140 141 'Align' => 'C', 141 142 'MinFont' => 45, … … 144 145 'Css' => '', 145 146 'TextPathUUID' => '', 147 'EffectUUID' => '', 146 148 ], 147 149 ], … … 180 182 */ 181 183 private $ieMsg; 184 /** 185 * @var string Layout wide SVG Effect 186 */ 187 private $effectUUID; 182 188 /** 183 189 * @var int $setupWidth of layout, Used for scaling … … 340 346 * 341 347 * @since 1.0.1 342 * @updated 1.2. 5348 * @updated 1.2.7 343 349 */ 344 350 public static function is_layout_valid( array &$layout, $sanitize = false ) { … … 355 361 if ( ( ! isset( $layout['IeMessage'] ) || ( $layout['IeMessage'] === '' ) ) ) { // 1.2.5 Format update 356 362 $layout['IeMessage'] = self::get_customer_message( 'IeMessage' ); 363 } 364 365 if ( ! isset( $layout['EffectUUID'] ) ) { // 1.2.7 Format update 366 $layout['EffectUUID'] = ''; 357 367 } 358 368 … … 373 383 self::is_string( $layout['SinglelineReformat'] ); 374 384 self::is_string( $layout['IeMessage'] ); 385 self::is_string( $layout['EffectUUID'] ); 375 386 self::int_check( $layout['InkColor'], 0, 0xFFFFFF ); 376 387 self::int_check( $layout['ActiveMouseColor'], 0, 0xFFFFFF ); … … 563 574 } 564 575 576 /** 577 * Layout wide SVG Effect getter 578 * 579 * @return string 580 * 581 * @since 1.2.7 582 * @updated 1.2.7 583 */ 584 public function getEffectUUID() { 585 return $this->effectUUID; 586 } 587 588 /** 589 * Layout wide SVG Effect setter 590 * 591 * @param string $effectUUID 592 * 593 * @since 1.2.7 594 * @updated 1.2.7 595 */ 596 public function setEffectUUID( $effectUUID ) { 597 $this->effectUUID = $effectUUID; 598 } 565 599 /** 566 600 * Gets the a hex string representation of the requested color … … 606 640 * 607 641 * @since 1.0.0 608 * @updated 1.2. 5642 * @updated 1.2.7 609 643 */ 610 644 public function load_layout( $layout, $layoutName ) { … … 630 664 $this->setSingleLineReformatMsg( $layout['SinglelineReformat'] ); 631 665 $this->setIeMessage( $layout['IeMessage'] ); 666 $this->setEffectUUID( $layout['EffectUUID'] ); 632 667 633 668 $this->formats = $layout['Formats']; … … 660 695 $result['SinglelineReformat'] = $this->singleLineReformatMsg; 661 696 $result['IeMessage'] = $this->ieMsg; 697 $result['EffectUUID'] = $this->effectUUID; 662 698 663 699 $result = apply_filters( 'layout_as_array', $result ); … … 736 772 * 737 773 * @since 1.0.0 774 * @updated 1.2.7 738 775 */ 739 776 public function compact_format( $numberOfLines ) { … … 817 854 * 818 855 * @since 1.0.1 819 * @updated 1.2. 0856 * @updated 1.2.7 820 857 */ 821 858 private static function is_format_valid( array &$formatArray, $lines, array $formatKeys, $maxFontSize, $sanitize ) { … … 844 881 } 845 882 883 if ( ! isset( $line['EffectUUID'] ) ) { // 1.2.7 Format update 884 $line['EffectUUID'] = ''; 885 } 886 846 887 if ( array_diff( $formatKeys, array_keys( $line ) ) !== [] ) { 847 888 throw new LayoutException( self::$exceptionMsg . __LINE__ ); … … 861 902 self::is_string( $line['Css'] ); 862 903 self::is_string( $line['TextPathUUID'] ); 904 self::is_string( $line['EffectUUID'] ); 863 905 864 906 if ( $sanitize ) { -
wysiwyg-custom-products/trunk/readme.txt
r2233022 r2285358 4 4 Tags: WYSIWYG, wysiwyg, custom, customised, customized, preview, live, update, view, woocommerce 5 5 Requires at least: 4.9.0 6 Tested up to: 5. 3.26 Tested up to: 5.4.0 7 7 Requires PHP: 5.6.0 8 8 Stable tag: 1.2 -
wysiwyg-custom-products/trunk/wysiwyg-custom-products.php
r2233022 r2285358 12 12 * Domain Path: /languages 13 13 * WC requires at least: 3.0.0 14 * WC tested up to: 3.9.014 * WC tested up to: 4.0.1 15 15 * This program is free software: you can redistribute it and/or modify 16 16 * it under the terms of the GNU General Public License as published by
Note: See TracChangeset
for help on using the changeset viewer.