Skip to content

Commit

Permalink
38334 load jquery for custom select
Browse files Browse the repository at this point in the history
  • Loading branch information
dai-eastgate committed Oct 18, 2023
1 parent 11f0e5e commit 7204ef3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions plugin/EstateList.php
Original file line number Diff line number Diff line change
Expand Up @@ -885,8 +885,8 @@ private function getShowMapConfig(): bool
private function doExtraEnqueues(){
if($this->_pDataView instanceof DataListView){
wp_register_script('onoffice-sort-list-selector', plugin_dir_url( ONOFFICE_PLUGIN_DIR . '/index.php' ) . 'js/onoffice-sort-list-selector.js', ['jquery'], '', true);
wp_register_script('onoffice-form-preview', plugin_dir_url( ONOFFICE_PLUGIN_DIR . '/index.php' ) . 'js/onoffice-form-preview.js', [], '', true);
wp_register_script('onoffice-custom-select', plugin_dir_url( ONOFFICE_PLUGIN_DIR . '/index.php' ) . 'js/onoffice-custom-select.js', [], '', true);
wp_register_script('onoffice-form-preview', plugin_dir_url( ONOFFICE_PLUGIN_DIR . '/index.php' ) . 'js/onoffice-form-preview.js', ['jquery'], '', true);
wp_register_script('onoffice-custom-select', plugin_dir_url( ONOFFICE_PLUGIN_DIR . '/index.php' ) . 'js/onoffice-custom-select.js', ['jquery'], '', true);
wp_register_script('onoffice-multiselect', plugin_dir_url( ONOFFICE_PLUGIN_DIR . '/index.php' ) . 'js/onoffice-multiselect.js', [], '', true);
wp_register_script('onoffice-estatetype', plugin_dir_url( ONOFFICE_PLUGIN_DIR . '/index.php' ) . 'js/onoffice-estatetype.js', ['onoffice-multiselect'], '', true);
wp_enqueue_script('onoffice-sort-list-selector');
Expand Down
4 changes: 2 additions & 2 deletions plugin/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ public function getEstateContextLabel(): string
*/

private function doExtraEnqueues(string $type){
wp_register_script('onoffice-custom-select', plugin_dir_url( ONOFFICE_PLUGIN_DIR . '/index.php' ) . 'js/onoffice-custom-select.js', [], '', true);
wp_register_script('onoffice-custom-select', plugin_dir_url( ONOFFICE_PLUGIN_DIR . '/index.php' ) . 'js/onoffice-custom-select.js', ['jquery'], '', true);
wp_register_script('onoffice-multiselect', plugin_dir_url( ONOFFICE_PLUGIN_DIR . '/index.php' ) . 'js/onoffice-multiselect.js', [], '', true);
wp_register_script('onoffice-estatetype', plugin_dir_url( ONOFFICE_PLUGIN_DIR . '/index.php' ) . 'js/onoffice-estatetype.js', ['onoffice-multiselect'], '', true);
wp_register_script('onoffice-leadform', plugin_dir_url( ONOFFICE_PLUGIN_DIR . '/index.php' ) . 'js/onoffice-leadform.js', ['jquery'], '', true);
Expand All @@ -623,7 +623,7 @@ private function doExtraEnqueues(string $type){
wp_script_add_data('onoffice-estatetype', IncludeFileModel::LOAD_ASYNC, true);

if($type === self::TYPE_APPLICANT_SEARCH){
wp_register_script('onoffice-form-preview', plugin_dir_url( ONOFFICE_PLUGIN_DIR . '/index.php' ) . 'js/onoffice-form-preview.js', [], '', true);
wp_register_script('onoffice-form-preview', plugin_dir_url( ONOFFICE_PLUGIN_DIR . '/index.php' ) . 'js/onoffice-form-preview.js', ['jquery'], '', true);
wp_enqueue_script('onoffice-form-preview');

wp_localize_script('onoffice-form-preview', 'onoffice_form_preview_strings', [
Expand Down

0 comments on commit 7204ef3

Please sign in to comment.