Changeset 3305993
- Timestamp:
- 06/03/2025 06:40:53 PM (10 months ago)
- Location:
- chordpress
- Files:
-
- 4 edited
- 23 copied
-
tags/3.9.2 (copied) (copied from chordpress/trunk)
-
tags/3.9.2/admin/class-chordpress-admin.php (copied) (copied from chordpress/trunk/admin/class-chordpress-admin.php)
-
tags/3.9.2/admin/js/chordpress-admin.js (copied) (copied from chordpress/trunk/admin/js/chordpress-admin.js)
-
tags/3.9.2/admin/js/tinymce_buttons.js (copied) (copied from chordpress/trunk/admin/js/tinymce_buttons.js)
-
tags/3.9.2/admin/partials/chordpress-admin-chord-meta-box.php (copied) (copied from chordpress/trunk/admin/partials/chordpress-admin-chord-meta-box.php)
-
tags/3.9.2/admin/partials/chordpress-admin-license.php (copied) (copied from chordpress/trunk/admin/partials/chordpress-admin-license.php)
-
tags/3.9.2/admin/partials/chordpress-admin-options.php (copied) (copied from chordpress/trunk/admin/partials/chordpress-admin-options.php)
-
tags/3.9.2/chordpress.php (copied) (copied from chordpress/trunk/chordpress.php) (2 diffs)
-
tags/3.9.2/includes/class-chordpress-activator.php (copied) (copied from chordpress/trunk/includes/class-chordpress-activator.php)
-
tags/3.9.2/includes/class-chordpress-chord.php (copied) (copied from chordpress/trunk/includes/class-chordpress-chord.php)
-
tags/3.9.2/includes/class-chordpress-deactivator.php (copied) (copied from chordpress/trunk/includes/class-chordpress-deactivator.php)
-
tags/3.9.2/includes/class-chordpress-i18n.php (copied) (copied from chordpress/trunk/includes/class-chordpress-i18n.php)
-
tags/3.9.2/includes/class-chordpress-license.php (copied) (copied from chordpress/trunk/includes/class-chordpress-license.php)
-
tags/3.9.2/includes/class-chordpress-loader.php (copied) (copied from chordpress/trunk/includes/class-chordpress-loader.php)
-
tags/3.9.2/includes/class-chordpress-plugin.php (copied) (copied from chordpress/trunk/includes/class-chordpress-plugin.php)
-
tags/3.9.2/includes/class-chordpress-renderer.php (copied) (copied from chordpress/trunk/includes/class-chordpress-renderer.php) (2 diffs)
-
tags/3.9.2/languages/chordpress.pot (copied) (copied from chordpress/trunk/languages/chordpress.pot)
-
tags/3.9.2/makepot.cmd (copied) (copied from chordpress/trunk/makepot.cmd)
-
tags/3.9.2/public/class-chordpress-public.php (copied) (copied from chordpress/trunk/public/class-chordpress-public.php)
-
tags/3.9.2/public/css/chordpress-public.css (copied) (copied from chordpress/trunk/public/css/chordpress-public.css)
-
tags/3.9.2/public/js/chordpress-public.js (copied) (copied from chordpress/trunk/public/js/chordpress-public.js) (1 diff)
-
tags/3.9.2/readme.txt (copied) (copied from chordpress/trunk/readme.txt) (1 diff)
-
tags/3.9.2/uninstall.php (copied) (copied from chordpress/trunk/uninstall.php)
-
trunk/chordpress.php (modified) (2 diffs)
-
trunk/includes/class-chordpress-renderer.php (modified) (2 diffs)
-
trunk/public/js/chordpress-public.js (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
chordpress/tags/3.9.2/chordpress.php
r3299214 r3305993 19 19 * Plugin URI: https://lewe.gitbook.io/lewe-chordpress/ 20 20 * Description: This plugin renders ChordPro formatted text and chord diagrams in WordPress sites. 21 * Version: 3.9. 121 * Version: 3.9.2 22 22 * Author: George Lewe 23 23 * Author URI: https://www.lewe.com … … 38 38 */ 39 39 define('CHORDPRESS_NAME', 'ChordPress'); 40 define('CHORDPRESS_VERSION', '3.9. 1');40 define('CHORDPRESS_VERSION', '3.9.2'); 41 41 define('CHORDPRESS_AUTHOR', 'George Lewe'); 42 42 define('CHORDPRESS_AUTHOR_URI', 'https://www.lewe.com'); -
chordpress/tags/3.9.2/includes/class-chordpress-renderer.php
r3299214 r3305993 707 707 * Start of ChordPress wrapper 708 708 */ 709 $cpressStyles = "<style>div.cpress { float: " . $this->float . "; } div.cpress_line { " . $this->lineStyle . "; } div.cpress_line_section { display: inline; float: left; } div.cpress_line_section .chord .chordshort { " . $this->chordStyle . "; } div.cpress_line_section .lyric { " . $this->lyricsStyle . "; } div.cpress_chorus { " . $this->chorusStyle . "; } div.cpress_verse { " . $this->verseStyle . "; } div.cpress_clear { clear: both; } div.cpress_meta { " . $this->metaStyle . "; } div.cpress_interaction { float: right; } div.cpress_interaction select { width: auto; } span.cpress_comment { " . $this->commentStyle . "; } div.cpress_chordsheet { text-align: center; }</style>"; 710 709 711 $returnText = "\n\n 710 712 <!--begin: ChordPress SongSheet --> 711 713 <div> 712 <style> 713 div.cpress { float: " . $this->float . "; } 714 div.cpress_line { " . $this->lineStyle . "; } 715 div.cpress_line_section { display: inline; float: left; } 716 div.cpress_line_section .chord .chordshort { " . $this->chordStyle . "; } 717 div.cpress_line_section .lyric { " . $this->lyricsStyle . "; } 718 div.cpress_chorus { " . $this->chorusStyle . "; } 719 div.cpress_verse { " . $this->verseStyle . "; } 720 div.cpress_clear { clear: both; } 721 div.cpress_meta { " . $this->metaStyle . "; } 722 div.cpress_interaction { float: right; } 723 div.cpress_interaction select { width: auto; } 724 span.cpress_comment { " . $this->commentStyle . "; } 725 div.cpress_chordsheet { text-align: center; } 726 </style> 714 " . $cpressStyles . " 727 715 </div>\n"; 728 716 … … 869 857 $interactionForm .= "<div class='cpress-col cpress-pr-0'>"; 870 858 if (!$this->hidePrint) { 871 $interactionForm .= "<br><button class='cpress-btn cpress-btn-secondary cpress-btn-sm' onclick=\"window.print();\">" . __('Print', 'chordpress') . "</button>\n"; 859 $printTitle = 'ChordPress SongSheet'; 860 if (strlen($this->arrDirectives['title']) && !$this->hideTitle) { 861 $printTitle = $this->arrDirectives['title']; 862 } 863 $interactionForm .= "<br><button class='cpress-btn cpress-btn-secondary cpress-btn-sm' onclick=\"printElement('%cpressID%', '" . $printTitle . "', '" . $cpressStyles . "');\">" . __('Print', 'chordpress') . "</button>\n"; 864 // $interactionForm .= "<br><button class='cpress-btn cpress-btn-secondary cpress-btn-sm' onclick=\"window.print();\">" . __('Print', 'chordpress') . "</button>\n"; 872 865 } 873 866 $interactionForm .= "</div>"; -
chordpress/tags/3.9.2/public/js/chordpress-public.js
r3298894 r3305993 325 325 326 326 /** 327 * ---------------------------------------------------------------------------- 328 * Print Element. 329 * ---------------------------------------------------------------------------- 330 * Prints the content of a specified HTML element in a new browser window. 331 * 332 * This function retrieves the inner HTML of the specified element by its ID, 333 * opens a new browser window, and writes the content into it. The new window 334 * is styled with basic CSS and given a title, which can be customized via the 335 * `printTitle` parameter. The function also ensures compatibility with older 336 * versions of Internet Explorer by closing and focusing the print window. 337 * 338 * @param {string} elementId - The ID of the HTML element whose content will be printed. 339 * @param {string} [printTitle='ChordPress Song'] - The title of the print window. Defaults to 'ChordPress Song'. 340 * 341 * @since 3.9.2 342 */ 343 function printElement(elementId, printTitle = 'ChordPress Song', cpressStyles = '') { 344 const content = document.getElementById(elementId).innerHTML; 345 const printWindow = window.open('', '', 'height=600,width=800'); 346 printWindow.document.write(` 347 <html> 348 <head> 349 <title>${printTitle}</title> 350 <style> 351 body { font-family: Arial, sans-serif; padding: 20px; } 352 </style> 353 ${cpressStyles} 354 </head> 355 <body> 356 ${content} 357 </body> 358 </html> 359 `); 360 printWindow.document.close(); // Necessary for IE >= 10 361 printWindow.focus(); // Necessary for IE >= 10 362 printWindow.print(); 363 printWindow.close(); 364 } 365 366 /** 327 367 * Modal Dialog 328 368 * -
chordpress/tags/3.9.2/readme.txt
r3299214 r3305993 130 130 131 131 == Changelog == 132 = 3.9.2 = 133 * 2025-06-02 134 * Print button prints song only incl. custom styles 135 132 136 = 3.9.1 = 133 137 * 2025-05-23 -
chordpress/trunk/chordpress.php
r3299214 r3305993 19 19 * Plugin URI: https://lewe.gitbook.io/lewe-chordpress/ 20 20 * Description: This plugin renders ChordPro formatted text and chord diagrams in WordPress sites. 21 * Version: 3.9. 121 * Version: 3.9.2 22 22 * Author: George Lewe 23 23 * Author URI: https://www.lewe.com … … 38 38 */ 39 39 define('CHORDPRESS_NAME', 'ChordPress'); 40 define('CHORDPRESS_VERSION', '3.9. 1');40 define('CHORDPRESS_VERSION', '3.9.2'); 41 41 define('CHORDPRESS_AUTHOR', 'George Lewe'); 42 42 define('CHORDPRESS_AUTHOR_URI', 'https://www.lewe.com'); -
chordpress/trunk/includes/class-chordpress-renderer.php
r3299214 r3305993 707 707 * Start of ChordPress wrapper 708 708 */ 709 $cpressStyles = "<style>div.cpress { float: " . $this->float . "; } div.cpress_line { " . $this->lineStyle . "; } div.cpress_line_section { display: inline; float: left; } div.cpress_line_section .chord .chordshort { " . $this->chordStyle . "; } div.cpress_line_section .lyric { " . $this->lyricsStyle . "; } div.cpress_chorus { " . $this->chorusStyle . "; } div.cpress_verse { " . $this->verseStyle . "; } div.cpress_clear { clear: both; } div.cpress_meta { " . $this->metaStyle . "; } div.cpress_interaction { float: right; } div.cpress_interaction select { width: auto; } span.cpress_comment { " . $this->commentStyle . "; } div.cpress_chordsheet { text-align: center; }</style>"; 710 709 711 $returnText = "\n\n 710 712 <!--begin: ChordPress SongSheet --> 711 713 <div> 712 <style> 713 div.cpress { float: " . $this->float . "; } 714 div.cpress_line { " . $this->lineStyle . "; } 715 div.cpress_line_section { display: inline; float: left; } 716 div.cpress_line_section .chord .chordshort { " . $this->chordStyle . "; } 717 div.cpress_line_section .lyric { " . $this->lyricsStyle . "; } 718 div.cpress_chorus { " . $this->chorusStyle . "; } 719 div.cpress_verse { " . $this->verseStyle . "; } 720 div.cpress_clear { clear: both; } 721 div.cpress_meta { " . $this->metaStyle . "; } 722 div.cpress_interaction { float: right; } 723 div.cpress_interaction select { width: auto; } 724 span.cpress_comment { " . $this->commentStyle . "; } 725 div.cpress_chordsheet { text-align: center; } 726 </style> 714 " . $cpressStyles . " 727 715 </div>\n"; 728 716 … … 869 857 $interactionForm .= "<div class='cpress-col cpress-pr-0'>"; 870 858 if (!$this->hidePrint) { 871 $interactionForm .= "<br><button class='cpress-btn cpress-btn-secondary cpress-btn-sm' onclick=\"window.print();\">" . __('Print', 'chordpress') . "</button>\n"; 859 $printTitle = 'ChordPress SongSheet'; 860 if (strlen($this->arrDirectives['title']) && !$this->hideTitle) { 861 $printTitle = $this->arrDirectives['title']; 862 } 863 $interactionForm .= "<br><button class='cpress-btn cpress-btn-secondary cpress-btn-sm' onclick=\"printElement('%cpressID%', '" . $printTitle . "', '" . $cpressStyles . "');\">" . __('Print', 'chordpress') . "</button>\n"; 864 // $interactionForm .= "<br><button class='cpress-btn cpress-btn-secondary cpress-btn-sm' onclick=\"window.print();\">" . __('Print', 'chordpress') . "</button>\n"; 872 865 } 873 866 $interactionForm .= "</div>"; -
chordpress/trunk/public/js/chordpress-public.js
r3298894 r3305993 325 325 326 326 /** 327 * ---------------------------------------------------------------------------- 328 * Print Element. 329 * ---------------------------------------------------------------------------- 330 * Prints the content of a specified HTML element in a new browser window. 331 * 332 * This function retrieves the inner HTML of the specified element by its ID, 333 * opens a new browser window, and writes the content into it. The new window 334 * is styled with basic CSS and given a title, which can be customized via the 335 * `printTitle` parameter. The function also ensures compatibility with older 336 * versions of Internet Explorer by closing and focusing the print window. 337 * 338 * @param {string} elementId - The ID of the HTML element whose content will be printed. 339 * @param {string} [printTitle='ChordPress Song'] - The title of the print window. Defaults to 'ChordPress Song'. 340 * 341 * @since 3.9.2 342 */ 343 function printElement(elementId, printTitle = 'ChordPress Song', cpressStyles = '') { 344 const content = document.getElementById(elementId).innerHTML; 345 const printWindow = window.open('', '', 'height=600,width=800'); 346 printWindow.document.write(` 347 <html> 348 <head> 349 <title>${printTitle}</title> 350 <style> 351 body { font-family: Arial, sans-serif; padding: 20px; } 352 </style> 353 ${cpressStyles} 354 </head> 355 <body> 356 ${content} 357 </body> 358 </html> 359 `); 360 printWindow.document.close(); // Necessary for IE >= 10 361 printWindow.focus(); // Necessary for IE >= 10 362 printWindow.print(); 363 printWindow.close(); 364 } 365 366 /** 327 367 * Modal Dialog 328 368 * -
chordpress/trunk/readme.txt
r3299214 r3305993 130 130 131 131 == Changelog == 132 = 3.9.2 = 133 * 2025-06-02 134 * Print button prints song only incl. custom styles 135 132 136 = 3.9.1 = 133 137 * 2025-05-23
Note: See TracChangeset
for help on using the changeset viewer.