PluginProbe
Booking Calendar / 11.3
Booking Calendar v11.3
11.8.4 11.8.3 11.8.2 11.8.1 11.8 11.7 11.6.1 11.6 11.5 11.4.3 11.4.2 11.4.1 11.4 11.3 11.2.1 11.2 11.1 11.0 10.15.7 10.15.6 10.1.3 10.10 10.10.1 10.10.2 10.11 All 204 releases
booking / includes / page-bookings / _src / bookings__listing.js

bookings__listing.js in Booking Calendar 11.3, at includes/page-bookings/_src/bookings__listing.js

623 lines 22.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 "use strict";
2
3 jQuery('body').on({
4 'touchmove': function(e) {
5
6 jQuery( '.timespartly' ).each( function ( index ){
7
8 var td_el = jQuery( this ).get( 0 );
9
10 if ( (undefined != td_el._tippy) ){
11
12 var instance = td_el._tippy;
13 instance.hide();
14 }
15 } );
16 }
17 });
18
19 /**
20 * Request Object
21 * Here we can define Search parameters and Update it later, when some parameter was changed
22 *
23 */
24 var wpbc_ajx_booking_listing = (function ( obj, $) {
25
26 // Secure parameters for Ajax ------------------------------------------------------------------------------------
27 var p_secure = obj.security_obj = obj.security_obj || {
28 user_id: 0,
29 nonce : '',
30 locale : ''
31 };
32
33 obj.set_secure_param = function ( param_key, param_val ) {
34 p_secure[ param_key ] = param_val;
35 };
36
37 obj.get_secure_param = function ( param_key ) {
38 return p_secure[ param_key ];
39 };
40
41
42 // Listing Search parameters ------------------------------------------------------------------------------------
43 var p_listing = obj.search_request_obj = obj.search_request_obj || {
44 sort : "booking_id",
45 sort_type : "DESC",
46 page_num : 1,
47 page_items_count: 10,
48 create_date : "",
49 keyword : "",
50 source : ""
51 };
52
53 obj.search_set_all_params = function ( request_param_obj ) {
54 p_listing = request_param_obj;
55 };
56
57 obj.search_get_all_params = function () {
58 return p_listing;
59 };
60
61 obj.search_get_param = function ( param_key ) {
62 return p_listing[ param_key ];
63 };
64
65 obj.search_set_param = function ( param_key, param_val ) {
66 // if ( Array.isArray( param_val ) ){
67 // param_val = JSON.stringify( param_val );
68 // }
69 p_listing[ param_key ] = param_val;
70 };
71
72 obj.search_set_params_arr = function( params_arr ){
73 _.each( params_arr, function ( p_val, p_key, p_data ){ // Define different Search parameters for request
74 this.search_set_param( p_key, p_val );
75 } );
76 }
77
78
79 // Other parameters ------------------------------------------------------------------------------------
80 var p_other = obj.other_obj = obj.other_obj || { };
81
82 obj.set_other_param = function ( param_key, param_val ) {
83 p_other[ param_key ] = param_val;
84 };
85
86 obj.get_other_param = function ( param_key ) {
87 return p_other[ param_key ];
88 };
89
90
91 return obj;
92 }( wpbc_ajx_booking_listing || {}, jQuery ));
93
94
95 /**
96 * Ajax ------------------------------------------------------------------------------------------------------ */
97
98 /**
99 * Send Ajax search request
100 * for searching specific Keyword and other params
101 */
102 function wpbc_ajx_booking_ajax_search_request(){
103
104 console.groupCollapsed('AJX_BOOKING_LISTING'); console.log( ' == Before Ajax Send - search_get_all_params() == ' , wpbc_ajx_booking_listing.search_get_all_params() );
105
106 wpbc_booking_listing_reload_button__spin_start();
107 wpbc_booking_listing_reload__message_show();
108
109 /*
110 //FixIn: forVideo
111 if ( ! is_this_action ){
112 //wpbc_ajx_booking__actual_listing__hide();
113 jQuery( wpbc_ajx_booking_listing.get_other_param( 'listing_container' ) ).html(
114 '<div style="width:100%;text-align: center;" id="wpbc_loading_section"><span class="wpbc_icn_autorenew wpbc_spin"></span></div>'
115 + jQuery( wpbc_ajx_booking_listing.get_other_param( 'listing_container' ) ).html()
116 );
117 if ( 'function' === typeof (jQuery( '#wpbc_loading_section' ).wpbc_my_modal) ){ // FixIn: 9.0.1.5.
118 jQuery( '#wpbc_loading_section' ).wpbc_my_modal( 'show' );
119 } else {
120 alert( 'Warning! Booking Calendar. Its seems that you have deactivated loading of Bootstrap JS files at Booking Settings General page in Advanced section.' )
121 }
122 }
123 is_this_action = false;
124 */
125 // Start Ajax
126 jQuery.post( wpbc_url_ajax,
127 {
128 action : 'WPBC_AJX_BOOKING_LISTING',
129 wpbc_ajx_user_id: wpbc_ajx_booking_listing.get_secure_param( 'user_id' ),
130 nonce : wpbc_ajx_booking_listing.get_secure_param( 'nonce' ),
131 wpbc_ajx_locale : wpbc_ajx_booking_listing.get_secure_param( 'locale' ),
132
133 search_params : wpbc_ajx_booking_listing.search_get_all_params()
134 },
135 /**
136 * S u c c e s s
137 *
138 * @param response_data - its object returned from Ajax - class-live-searcg.php
139 * @param textStatus - 'success'
140 * @param jqXHR - Object
141 */
142 function ( response_data, textStatus, jqXHR ) {
143 //FixIn: forVideo
144 //jQuery( '#wpbc_loading_section' ).wpbc_my_modal( 'hide' );
145
146 try {
147 console.log( ' == Response WPBC_AJX_BOOKING_LISTING == ', response_data ); console.groupEnd();
148 // Probably Error
149 if ( (typeof response_data !== 'object') || (response_data === null) ){
150 jQuery( '.wpbc_ajx_under_toolbar_row' ).hide(); // FixIn: 9.6.1.5.
151 wpbc_booking_listing_reload_button__spin_pause();
152 wpbc_booking_listing_reload__message_hide();
153 jQuery( wpbc_ajx_booking_listing.get_other_param( 'listing_container' ) ).html(
154 '<div class="wpbc-settings-notice notice-warning" style="text-align:left">' +
155 response_data +
156 '</div>'
157 );
158 return;
159 }
160
161 // Reload page, after filter toolbar was reseted
162 if ( ( undefined != response_data[ 'ajx_cleaned_params' ])
163 && ( 'reset_done' === response_data[ 'ajx_cleaned_params' ][ 'ui_reset' ])
164 ){
165 wpbc_booking_listing_reload__message_hide();
166 window.location.href = response_data[ 'ajx_cleaned_params' ]['ui_reset_url'];
167 // location.reload();
168 return;
169 }
170
171 // Show listing
172 if ( response_data[ 'ajx_count' ] > 0 ){
173
174 wpbc_ajx_booking_show_listing( response_data[ 'ajx_items' ], response_data[ 'ajx_search_params' ], response_data[ 'ajx_booking_resources' ] );
175
176 wpbc_pagination_echo(
177 wpbc_ajx_booking_listing.get_other_param( 'pagination_container' ),
178 wpbc_ajx_booking_listing.get_other_param( 'pagination_container_header' ),
179 wpbc_ajx_booking_listing.get_other_param( 'pagination_container_footer' ),
180 {
181 'page_active': response_data[ 'ajx_search_params' ][ 'page_num' ],
182 'pages_count': Math.ceil( response_data[ 'ajx_count' ] / response_data[ 'ajx_search_params' ][ 'page_items_count' ] ),
183
184 'page_items_count': response_data[ 'ajx_search_params' ][ 'page_items_count' ],
185 'sort_type' : response_data[ 'ajx_search_params' ][ 'sort_type' ],
186 'total_count' : response_data[ 'ajx_count' ],
187 }
188 );
189 wpbc_ajx_booking_define_ui_hooks(); // Redefine Hooks, because we show new DOM elements
190
191 } else {
192
193 wpbc_ajx_booking__actual_listing__hide();
194 jQuery( wpbc_ajx_booking_listing.get_other_param( 'listing_container' ) ).html(
195 '<div class="wpbc-settings-notice0 notice-warning0" style="text-align:center;font-size: 15px;margin: 2em 0;">' +
196 '<p><strong>No results found for current filter options...</strong></p>' +
197 '<p><strong><a href="javascript:void(0)" ' +
198 ' onclick="javascript:wpbc_ajx_booking_send_search_request_with_params( {' +
199 ' \'ui_reset\': \'make_reset\', ' +
200 ' \'page_num\': 1 ' +
201 '} );">Reset filters</a> to show all bookings.</strong></p>' +
202 '</div>'
203 );
204 }
205
206 // Update new booking count
207 if ( undefined !== response_data[ 'ajx_new_bookings_count' ] ){
208 var ajx_new_bookings_count = parseInt( response_data[ 'ajx_new_bookings_count' ] )
209 if (ajx_new_bookings_count>0){
210 jQuery( '.wpbc_badge_count' ).show();
211 }
212 jQuery( '.bk-update-count' ).html( ajx_new_bookings_count );
213 }
214
215 wpbc_booking_listing_reload_button__spin_pause();
216 wpbc_booking_listing_reload__message_hide();
217
218 jQuery( '#ajax_respond' ).html( response_data ); // For ability to show response, add such DIV element to page
219 } finally {
220 wpbc_booking_listing_reload_button__spin_pause();
221 wpbc_booking_listing_reload__message_hide();
222 }
223 }
224 ).fail( function ( jqXHR, textStatus, errorThrown ) { if ( window.console && window.console.log ){ console.log( 'Ajax_Error', jqXHR, textStatus, errorThrown ); }
225 jQuery( '.wpbc_ajx_under_toolbar_row' ).hide(); // FixIn: 9.6.1.5.
226 wpbc_booking_listing_reload_button__spin_pause();
227 wpbc_booking_listing_reload__message_hide();
228 var error_message = '<strong>' + 'Error!' + '</strong> ' + errorThrown ;
229 if ( jqXHR.responseText ){
230 error_message += jqXHR.responseText;
231 }
232 error_message = error_message.replace( /\n/g, "<br />" );
233
234 wpbc_ajx_booking_show_message( error_message );
235 })
236 // .done( function ( data, textStatus, jqXHR ) { if ( window.console && window.console.log ){ console.log( 'second success', data, textStatus, jqXHR ); } })
237 // .always( function ( data_jqXHR, textStatus, jqXHR_errorThrown ) { if ( window.console && window.console.log ){ console.log( 'always finished', data_jqXHR, textStatus, jqXHR_errorThrown ); } })
238 ; // End Ajax
239 }
240
241
242 /**
243 * Views ----------------------------------------------------------------------------------------------------- */
244
245 /**
246 * Show Listing Table and define gMail checkbox hooks
247 *
248 * @param json_items_arr - JSON object with Items
249 * @param json_search_params - JSON object with Search
250 */
251 function wpbc_ajx_booking_show_listing( json_items_arr, json_search_params, json_booking_resources ){
252
253 wpbc_ajx_define_templates__resource_manipulation( json_items_arr, json_search_params, json_booking_resources );
254
255 //console.log( 'json_items_arr' , json_items_arr, json_search_params );
256 jQuery( '.wpbc_ajx_under_toolbar_row' ).css( "display", "flex" ); // FixIn: 9.6.1.5.
257 var list_header_tpl = wp.template( 'wpbc_ajx_booking_list_header' );
258 var list_footer_tpl = wp.template( 'wpbc_ajx_booking_list_footer' );
259 var list_row_tpl = wp.template( 'wpbc_ajx_booking_list_row' );
260
261
262 // Header.
263 jQuery( wpbc_ajx_booking_listing.get_other_param( 'listing_container' ) ).html( list_header_tpl() );
264 // Send to template all request params: jQuery( wpbc_ajx_booking_listing.get_other_param( 'listing_container' ) ).html( list_header_tpl(wpbc_ajx_booking_listing.search_get_all_params()) );
265 // Body.
266 jQuery( wpbc_ajx_booking_listing.get_other_param( 'listing_container' ) ).append( '<div class="wpbc_selectable_body"></div>' );
267 // Footer.
268 jQuery( wpbc_ajx_booking_listing.get_other_param( 'listing_container' ) ).append( list_footer_tpl() );
269
270 // R o w s
271 console.groupCollapsed( 'LISTING_ROWS' ); // LISTING_ROWS
272 _.each( json_items_arr, function ( p_val, p_key, p_data ){
273 if ( 'undefined' !== typeof json_search_params[ 'keyword' ] ){ // Parameter for marking keyword with different color in a list
274 p_val[ '__search_request_keyword__' ] = json_search_params[ 'keyword' ];
275 } else {
276 p_val[ '__search_request_keyword__' ] = '';
277 }
278 p_val[ 'booking_resources' ] = json_booking_resources;
279 jQuery( wpbc_ajx_booking_listing.get_other_param( 'listing_container' ) + ' .wpbc_selectable_body' ).append( list_row_tpl( p_val ) );
280 } );
281 console.groupEnd(); // LISTING_ROWS
282
283 wpbc_define_gmail_checkbox_selection( jQuery ); // Redefine Hooks for clicking at Checkboxes
284 }
285
286
287 /**
288 * Define template for changing booking resources & update it each time, when listing updating, useful for showing actual booking resources.
289 *
290 * @param json_items_arr - JSON object with Items
291 * @param json_search_params - JSON object with Search
292 * @param json_booking_resources - JSON object with Resources
293 */
294 function wpbc_ajx_define_templates__resource_manipulation( json_items_arr, json_search_params, json_booking_resources ){
295
296 // -------------------------------------------------------------------------------------------------------------
297 // New. 2025-04-21.
298 // -------------------------------------------------------------------------------------------------------------
299 // Change booking resource in Modal.
300 var modal__change_booking_resource = wp.template( 'wpbc_ajx__modal__change_booking_resource' );
301
302 jQuery( '#section_in_in_modal__change_booking_resource' ).html(
303 modal__change_booking_resource( {
304 'ajx_search_params' : json_search_params,
305 'ajx_booking_resources': json_booking_resources
306 } )
307 );
308
309 // Duplicate booking into another resource in Modal. New. 2025-04-21.
310 var modal__duplicate_booking_to_other_resource = wp.template( 'wpbc_ajx__modal__duplicate_booking_to_other_resource' );
311
312 jQuery( '#section_in_in_modal__duplicate_booking_to_other_resource' ).html(
313 modal__duplicate_booking_to_other_resource( {
314 'ajx_search_params' : json_search_params,
315 'ajx_booking_resources': json_booking_resources
316 } )
317 );
318 // -------------------------------------------------------------------------------------------------------------
319
320 }
321
322
323 /**
324 * Show just message instead of listing and hide pagination
325 */
326 function wpbc_ajx_booking_show_message( message ){
327
328 wpbc_ajx_booking__actual_listing__hide();
329
330 jQuery( wpbc_ajx_booking_listing.get_other_param( 'listing_container' ) ).html(
331 '<div class="wpbc-settings-notice notice-warning" style="text-align:left">' +
332 message +
333 '</div>'
334 );
335 }
336
337
338 /**
339 * H o o k s - its Action/Times when need to re-Render Views ----------------------------------------------- */
340
341 /**
342 * Send Ajax Search Request after Updating search request parameters
343 *
344 * @param params_arr
345 */
346 function wpbc_ajx_booking_send_search_request_with_params ( params_arr ){
347
348 // Define different Search parameters for request
349 _.each( params_arr, function ( p_val, p_key, p_data ) {
350 //console.log( 'Request for: ', p_key, p_val );
351 wpbc_ajx_booking_listing.search_set_param( p_key, p_val );
352 });
353
354 // Send Ajax Request
355 wpbc_ajx_booking_ajax_search_request();
356 }
357
358 /**
359 * Search request for "Page Number"
360 * @param page_number int
361 */
362 function wpbc_ajx_booking_pagination_click( page_number ){
363
364 wpbc_ajx_booking_send_search_request_with_params( {
365 'page_num': page_number
366 } );
367 }
368
369
370 /**
371 * Keyword Searching ----------------------------------------------------------------------------------------- */
372
373 /**
374 * Search request for "Keyword", also set current page to 1
375 *
376 * @param element_id - HTML ID of element, where was entered keyword
377 */
378 function wpbc_ajx_booking_send_search_request_for_keyword( element_id ) {
379
380 // We need to Reset page_num to 1 with each new search, because we can be at page #4, but after new search we can have totally only 1 page
381 wpbc_ajx_booking_send_search_request_with_params( {
382 'keyword' : jQuery( element_id ).val(),
383 'page_num': 1
384 } );
385 }
386
387 /**
388 * Send search request after few seconds (usually after 1,5 sec)
389 * Closure function. Its useful, for do not send too many Ajax requests, when someone make fast typing.
390 */
391 var wpbc_ajx_booking_searching_after_few_seconds = function (){
392
393 var closed_timer = 0;
394
395 return function ( element_id, timer_delay ){
396
397 // Get default value of "timer_delay", if parameter was not passed into the function.
398 timer_delay = typeof timer_delay !== 'undefined' ? timer_delay : 1500;
399
400 clearTimeout( closed_timer ); // Clear previous timer
401
402 // Start new Timer
403 closed_timer = setTimeout( wpbc_ajx_booking_send_search_request_for_keyword.bind( null, element_id ), timer_delay );
404 }
405 }();
406
407
408 /**
409 * Define Dynamic Hooks (like pagination click, which renew each time with new listing showing) ------------- */
410
411 /**
412 * Define HTML ui Hooks: on KeyUp | Change | -> Sort Order & Number Items / Page
413 * We are hcnaged it each time, when showing new listing, because DOM elements chnaged
414 */
415 function wpbc_ajx_booking_define_ui_hooks() {
416
417 if ( 'function' === typeof (wpbc_define_tippy_tooltips) ) {
418 wpbc_define_tippy_tooltips( '.wpbc__list__table ' );
419 }
420
421 wpbc_ajx_booking__ui_define__locale();
422 wpbc_ajx_booking__ui_define__remark();
423
424 wpbc_boo_listing__init_hook__sort_by();
425
426 // Items Per Page.
427 jQuery( '.wpbc_items_per_page' ).on(
428 'change',
429 function (event) {
430 wpbc_ajx_booking_send_search_request_with_params(
431 {
432 'page_items_count': jQuery( this ).val(),
433 'page_num' : 1
434 }
435 );
436 }
437 );
438
439 // Sorting.
440 jQuery( '.wpbc_items_sort_type' ).on(
441 'change',
442 function (event) {
443 wpbc_ajx_booking_send_search_request_with_params( { 'sort_type': jQuery( this ).val() } );
444 }
445 );
446 }
447
448
449 /**
450 * Show / Hide Listing --------------------------------------------------------------------------------------- */
451
452 /**
453 * Show Listing Table - Sending Ajax Request - with parameters that we early defined in "wpbc_ajx_booking_listing" Obj.
454 */
455 function wpbc_ajx_booking__actual_listing__show(){
456
457 wpbc_ajx_booking_ajax_search_request(); // Send Ajax Request - with parameters that we early defined in "wpbc_ajx_booking_listing" Obj.
458 }
459
460 /**
461 * Hide Listing Table ( and Pagination )
462 */
463 function wpbc_ajx_booking__actual_listing__hide(){
464 jQuery( '.wpbc_ajx_under_toolbar_row' ).hide(); // FixIn: 9.6.1.5.
465 jQuery( wpbc_ajx_booking_listing.get_other_param( 'listing_container' ) ).html( '' );
466 jQuery( wpbc_ajx_booking_listing.get_other_param( 'pagination_container' ) ).html( '' );
467 }
468
469
470 /**
471 * Support functions for Content Template data --------------------------------------------------------------- */
472
473 /**
474 * Highlight strings,
475 * by inserting <span class="fieldvalue name fieldsearchvalue">...</span> html elements into the string.
476 * @param {string} booking_details - Source string
477 * @param {string} booking_keyword - Keyword to highlight
478 * @returns {string}
479 */
480 function wpbc_get_highlighted_search_keyword( booking_details, booking_keyword ){
481
482 booking_keyword = booking_keyword.trim().toLowerCase();
483 if ( 0 == booking_keyword.length ){
484 return booking_details;
485 }
486
487 // Highlight substring withing HTML tags in "Content of booking fields data" -- e.g. starting from > and ending with <
488 let keywordRegex = new RegExp( `fieldvalue[^<>]*>([^<]*${booking_keyword}[^<]*)`, 'gim' );
489
490 //let matches = [...booking_details.toLowerCase().matchAll( keywordRegex )];
491 let matches = booking_details.toLowerCase().matchAll( keywordRegex );
492 matches = Array.from( matches );
493
494 let strings_arr = [];
495 let pos_previous = 0;
496 let search_pos_start;
497 let search_pos_end;
498
499 for ( const match of matches ){
500
501 search_pos_start = match.index + match[ 0 ].toLowerCase().indexOf( '>', 0 ) + 1 ;
502
503 strings_arr.push( booking_details.substr( pos_previous, (search_pos_start - pos_previous) ) );
504
505 search_pos_end = booking_details.toLowerCase().indexOf( '<', search_pos_start );
506
507 strings_arr.push( '<span class="fieldvalue name fieldsearchvalue">' + booking_details.substr( search_pos_start, (search_pos_end - search_pos_start) ) + '</span>' );
508
509 pos_previous = search_pos_end;
510 }
511
512 strings_arr.push( booking_details.substr( pos_previous, (booking_details.length - pos_previous) ) );
513
514 return strings_arr.join( '' );
515 }
516
517 /**
518 * Convert special HTML characters from: &amp; -> &
519 *
520 * @param text
521 * @returns {*}
522 */
523 function wpbc_decode_HTML_entities( text ){
524 var textArea = document.createElement( 'textarea' );
525 textArea.innerHTML = text;
526 return textArea.value;
527 }
528
529 /**
530 * Convert TO special HTML characters from: & -> &amp;
531 *
532 * @param text
533 * @returns {*}
534 */
535 function wpbc_encode_HTML_entities(text) {
536 var textArea = document.createElement('textarea');
537 textArea.innerText = text;
538 return textArea.innerHTML;
539 }
540
541
542 /**
543 * Support Functions - Spin Icon in Buttons ------------------------------------------------------------------ */
544
545 /**
546 * Spin button in Filter toolbar - Start
547 */
548 function wpbc_booking_listing_reload_button__spin_start(){
549 jQuery( '#wpbc_booking_listing_reload_button .menu_icon.wpbc_spin').removeClass( 'wpbc_animation_pause' );
550 }
551
552 /**
553 * Spin button in Filter toolbar - Pause
554 */
555 function wpbc_booking_listing_reload_button__spin_pause(){
556 jQuery( '#wpbc_booking_listing_reload_button .menu_icon.wpbc_spin' ).addClass( 'wpbc_animation_pause' );
557 }
558
559 /**
560 * Show visible feedback while Booking Listing is loading.
561 */
562 function wpbc_booking_listing_reload__message_show(){
563
564 var ajax_working = document.getElementById( 'ajax_working' );
565
566 if ( ! ajax_working ) {
567 return;
568 }
569
570 wpbc_booking_listing_reload__message_hide();
571
572 var listing_container = '';
573 if (
574 ( 'undefined' !== typeof wpbc_ajx_booking_listing )
575 && ( 'function' === typeof wpbc_ajx_booking_listing.get_other_param )
576 ) {
577 listing_container = wpbc_ajx_booking_listing.get_other_param( 'listing_container' );
578 }
579
580 if (
581 listing_container
582 && jQuery( listing_container ).find( '.wpbc_spins_loading_container' ).length
583 ) {
584 return;
585 }
586
587 var unique_div_id = 'wpbc_notice_' + ( new Date() ).getTime();
588
589 jQuery( ajax_working ).append(
590 '<div id="' + unique_div_id + '" class="wpbc_booking_listing_reload_notice" style="opacity: 1;">' +
591 '<div id="wpbc_alert_message" class="wpbc_alert_message">' +
592 '<div class="wpbc_inner_message notice notice-info "> ' +
593 '<a class="close" href="javascript:void(0)" onclick="javascript:jQuery(this).parent().hide();">&times;</a> ' +
594 '<span class="wpdevelop wpbc_booking_listing_reload_processing">' +
595 '<span class="wpbc_icn_rotate_right wpbc_spin wpbc_ajax_icon wpbc_processing wpbc_icn_autorenew" aria-hidden="true"></span>' +
596 '</span> Loading bookings...' +
597 '</div>' +
598 '</div>' +
599 '</div>'
600 );
601 }
602
603 /**
604 * Hide Booking Listing loading feedback.
605 */
606 function wpbc_booking_listing_reload__message_hide(){
607 jQuery( '.wpbc_booking_listing_reload_notice' ).remove();
608 jQuery( '.wpbc_booking_listing_reload_processing' ).closest( '[id^="wpbc_notice_"], .wpbc_inner_message' ).remove();
609 }
610
611 /**
612 * Spin button in Filter toolbar - is Spinning ?
613 *
614 * @returns {boolean}
615 */
616 function wpbc_booking_listing_reload_button__is_spin(){
617 if ( jQuery( '#wpbc_booking_listing_reload_button .menu_icon.wpbc_spin' ).hasClass( 'wpbc_animation_pause' ) ){
618 return true;
619 } else {
620 return false;
621 }
622 }
623