Changeset 3195242
- Timestamp:
- 11/22/2024 10:19:14 PM (14 months ago)
- Location:
- advanced-crossword/trunk
- Files:
-
- 8 edited
-
advanced-crossword.php (modified) (2 diffs)
-
assets/css/back/pc_puzzle_main.css (modified) (1 diff)
-
assets/js/back/pc_puzzle_new.js (modified) (3 diffs)
-
includes/PcPUzzleCrosswords_OptionsManager.php (modified) (1 diff)
-
includes/PcPuzzleCrossword_LifeCycle.php (modified) (1 diff)
-
includes/PcPuzzleCrossword_Plugin.php (modified) (1 diff)
-
includes/w/W_PcPuzzleCrosswords_View.php (modified) (8 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
advanced-crossword/trunk/advanced-crossword.php
r3122725 r3195242 3 3 * Plugin Name: Advanced Crossword 4 4 * Plugin URI: https://tuskcode.com 5 * Version: 1. 0.75 * Version: 1.1.0 6 6 * Author: dan009 7 7 * Description: Create a beautiful, responsive 15x15 grid crossword to your liking. You have full control over the blank cells and the clues. Unlimited crossword puzzle in your website. Responsive and lightweight. … … 15 15 $Pc_Puzzle_Crossword_MinimalRequiredPhpVersion = '5.2'; 16 16 if( ! defined('PC_PUZZLE_CROSSWORD_VER')) 17 define('PC_PUZZLE_CROSSWORD_VER', '1. 0.7');17 define('PC_PUZZLE_CROSSWORD_VER', '1.1.0'); 18 18 if( ! defined('PC_PUZZLE_CROSSWORD_URL')) 19 19 define( 'PC_PUZZLE_CROSSWORD_URL', plugins_url( '', __FILE__ ) ); -
advanced-crossword/trunk/assets/css/back/pc_puzzle_main.css
r3030350 r3195242 28 28 margin-right: 7px; 29 29 background: #f3f6fc; 30 } 31 32 .bmp-set-row{ 33 box-shadow: inset 2px 2px 2px 0px rgb(255 255 255 / 50%), 7px 7px 20px 0px rgb(0 0 0 / 10%), 4px 4px 5px 0px rgb(0 0 0 / 10%); 34 border-radius: 10px; 35 background: #f3f6fc; 36 padding: 5px; 30 37 } 31 38 -
advanced-crossword/trunk/assets/js/back/pc_puzzle_new.js
r3009532 r3195242 30 30 drawBlanks : false, 31 31 BLANK_SYMBOL : '#', 32 borderCollapse : false,32 borderCollapse : true, 33 33 hor_clues : {}, 34 34 ver_clues : {}, … … 41 41 answer_from_time : '', 42 42 input_reg_expr : '', 43 is_valid_reg_expr : true 44 43 is_valid_reg_expr : true, 44 fastLoadType : '' 45 45 } 46 46 }, … … 131 131 } 132 132 133 }, 134 135 fastLoad : function( type ){ 136 if( type == 'across' ){ 137 if( Object.values( this.hor_clues ).length == 0 ){ 138 alert( 'No Across Clues Found. Draw blanks first, and generate the clues.' ); 139 return false; 140 } 141 }else{ 142 if( Object.values( this.ver_clues ).length == 0 ){ 143 alert( 'No Down Clues Found. Draw blanks first, and generate the clues.' ); 144 return false; 145 } 146 } 147 148 this.fastLoadType = type; 149 150 if( type == 'across' ){ 151 152 this.$refs.fast_load_clues.value = ''; 153 for( let item in this.hor_clues ){ 154 this.$refs.fast_load_clues.value += this.hor_clues[ item ].q + '\n'; 155 } 156 }else{ 157 this.$refs.fast_load_clues.value = ''; 158 for( let item in this.ver_clues ){ 159 this.$refs.fast_load_clues.value += this.ver_clues[ item ].q + '\n'; 160 } 161 } 162 163 this.$refs.btn_modal_fast_load.click(); 164 165 }, 166 167 updateClues : function( $event ){ 168 let textarea = this.$refs.fast_load_clues.value; 169 let lines = textarea.split('\n'); 170 let key = ''; 171 lines.forEach( ( line, index ) => { 172 173 if( line.trim() !== '' ){ 174 175 if( this.fastLoadType == 'across' ){ 176 try { 177 key = Object.keys( this.hor_clues )[ index ]; 178 this.hor_clues[ key ].q = line.trim(); 179 } catch (error) { 180 console.error( error) 181 } 182 183 }else{ 184 try { 185 key = Object.keys( this.ver_clues )[ index ]; 186 this.ver_clues[ key ].q = line.trim(); 187 } catch (error) { 188 console.error( error); 189 } 190 191 } 192 193 } 194 }); 195 196 this.$refs.btn_close_modal_fast_load.click(); 133 197 }, 134 198 -
advanced-crossword/trunk/includes/PcPUzzleCrosswords_OptionsManager.php
r3030350 r3195242 18 18 const RULE_AU_ID = 9999; 19 19 const CROSSWORD_RULES = 'crossword_rules'; 20 const PRODUCTION = true; 20 21 21 22 function __construct(){ -
advanced-crossword/trunk/includes/PcPuzzleCrossword_LifeCycle.php
r3030350 r3195242 35 35 const ACCESS_RULES = 'crossword_rules_crud'; 36 36 const ACCESS_LICENSE = 'crossword_license_crud'; 37 const ACCESS_RELEASES = 'crossword_releases_crud'; 37 const ACCESS_RELEASES = 'crossword_releases_crud'; 38 38 39 39 public function __construct(){ -
advanced-crossword/trunk/includes/PcPuzzleCrossword_Plugin.php
r3030350 r3195242 227 227 228 228 wp_enqueue_style('pc-puzzle-style-main', PC_PUZZLE_CROSSWORD_URL.'/assets/css/back/pc_puzzle_main.css', '', $this->getVersion() ); 229 wp_enqueue_script('pc-puzzle-script-bootstrap', PC_PUZZLE_CROSSWORD_URL.'/assets/js/back/bootstrap.min.js', '', $this->getVersion() ); 230 wp_enqueue_script('pc-puzzle-script-vue', PC_PUZZLE_CROSSWORD_URL.'/assets/js/back/vue-prod.min.js', '', $this->getVersion(), array('in_footer' => false ) ); 229 wp_enqueue_script('pc-puzzle-script-bootstrap', PC_PUZZLE_CROSSWORD_URL.'/assets/js/back/bootstrap.min.js', '', $this->getVersion() ); 230 231 if( $this::PRODUCTION ){ 232 wp_enqueue_script('pc-puzzle-script-vue', PC_PUZZLE_CROSSWORD_URL.'/assets/js/back/vue-prod.min.js', '', $this->getVersion(), array('in_footer' => false ) ); 233 }else{ 234 wp_enqueue_script('pc-puzzle-script-vue', PC_PUZZLE_CROSSWORD_URL.'/assets/js/back/vue-dev.js', '', $this->getVersion(), array('in_footer' => false ) ); 235 } 231 236 232 237 wp_enqueue_script('pc-puzzle-script-bootbox', PC_PUZZLE_CROSSWORD_URL.'/assets/js/back/bootbox.min.js', array('jquery'), $this->getVersion(), true ); -
advanced-crossword/trunk/includes/w/W_PcPuzzleCrosswords_View.php
r3030350 r3195242 145 145 146 146 <!-- Modal --> 147 <div class="modal fade" id="modal_user_access" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true"> 147 <div class="modal fade" id="modal_user_access" aria-modal='true' data-bs-backdrop="static" data-bs-keyboard="false" 148 tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true"> 148 149 <div class="modal-dialog"> 149 150 <div class="modal-content"> … … 286 287 PcPuzzleCrossword_Includes::premium_link(); 287 288 ?> 288 <div class="input-group mb-3 ">289 <div class="input-group mb-3 bmp-set-row"> 289 290 <span class="input-group-text"> 290 291 <?php esc_html_e('Puzzle Name', 'advanced-crossword' ); ?> … … 349 350 </div> 350 351 351 <div class="input-group mb-3 ">352 <div class="input-group mb-3 bmp-set-row"> 352 353 353 354 <span class="input-group-text"> … … 442 443 </div> 443 444 444 445 446 <div class="input-group mb-3"> 445 <div class="input-group mb-3 bmp-set-row"> 447 446 448 447 <button @click="enableDrawBlanks" … … 541 540 <p class='mt-3'></p> 542 541 543 <table class='puzzle-view-tbl tbl-edit-blanks mt-5 '542 <table class='puzzle-view-tbl tbl-edit-blanks mt-5 bmp-set-row' 544 543 :class="{'tbl-edit-blanks-collapse': borderCollapse, 545 544 'tbl-draw-blanks' : drawBlanks }"> … … 587 586 588 587 <div class="row clues-div"> 589 <div class="col-md-6" style=""> 588 589 <div class="col-md-6" > 590 590 <h5> 591 591 <?php esc_html_e( 'Across Clue', 'advanced-crossword' ); ?> 592 592 <span v-html="acrossClueNotFilled"></span> 593 593 </h5> 594 <div id='div_h_qa' class='mt-2'> 594 595 <button class="button button-primary" @click="fastLoad('across')"> 596 <?php esc_html_e('Fast Load', 'advanced-crossword' ); ?> 597 </button> 598 599 <div id='div_h_qa' class='mt-2 bmp-set-row'> 595 600 <div v-for="item in hor_clues"> 596 601 … … 628 633 </h5> 629 634 630 <div id="div_v_qa"> 635 <button class="button button-primary" @click="fastLoad('down')"> 636 <?php esc_html_e('Fast Load', 'advanced-crossword' ); ?> 637 </button> 638 639 <div id="div_v_qa" class='mt-2 bmp-set-row'> 631 640 <div v-for="item in ver_clues"> 632 641 … … 673 682 </div> 674 683 684 685 686 <button type="button" class="btn btn-primary d-none" ref='btn_modal_fast_load' 687 data-bs-toggle="modal" data-bs-target="#modal_fast_load"> 688 View 689 </button> 690 691 692 <!-- Modal --> 693 <div class="modal" id="modal_fast_load" data-bs-backdrop="static" data-bs-keyboard="false" 694 tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true"> 695 <div class="modal-dialog modal-lg"> 696 <div class="modal-content"> 697 <div class="modal-header"> 698 <h5 class="modal-title" id="staticBackdropLabel"> 699 <?php esc_html_e('Fast Load Clues', 'advanced-crossword'); ?> 700 </h5> 701 <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> 702 </div> 703 <div class="modal-body"> 704 <div> 705 <p> <strong> <?php esc_html_e('Copy and paste your clues here. Each clue on a new line', 'advanced-crossword'); ?> </strong> </p> 706 </div> 707 708 <div> 709 <textarea name="" id="" cols='50' rows='20' class="form-control" ref='fast_load_clues'></textarea> 710 </div> 711 712 </div> 713 <div class="modal-footer"> 714 <button type="button" class="btn btn-secondary" ref='btn_close_modal_fast_load' data-bs-dismiss="modal"> <?php esc_html_e('Close', 'advanced-crossword');?> </button> 715 <button type="button" class="btn btn-primary" @click='updateClues($event)'> <?php esc_html_e('Update Clues', 'advanced-crossword');?> </button> 716 </div> 717 </div> 718 </div> 719 </div> 720 721 675 722 </div> 676 723 -
advanced-crossword/trunk/readme.txt
r3122725 r3195242 4 4 Tags: crossword, puzzle, word game 5 5 Requires at least: 5.0.1 6 Tested up to: 6. 67 Stable tag: 1. 0.76 Tested up to: 6.7 7 Stable tag: 1.1.0 8 8 Requires PHP: 5.2.4 9 9 License: GPLv2 or later … … 42 42 43 43 == Changelog == 44 45 = 2024-11-22 46 * Tested with Wordpress version 6.7 47 * Added Fast Load for Clues, copy and paste clues into textarea 44 48 45 49 = 2024-07-21
Note: See TracChangeset
for help on using the changeset viewer.