PluginProbe
Booking Calendar / 11.8.4
Booking Calendar v11.8.4
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
← All changes | core/any/js/admin-support.js +174 -120 10.1.311.8.4 View file →
@@ -10,24 +10,94 @@
10 10 *
11 11 * @modified 2015-04-09
12 12 */
13 13
14 +function wpbc_parse_url_and_get_params_arr( url ) {
15 +
16 + var url_parameters = url.split( '?' )[1];
17 + var result_params_arr = {};
18 + var url_parameters_arr = url_parameters.split( /\?|&/ );
19 + var param_length = url_parameters_arr.length;
20 + for ( var i = 0; i < param_length; i++ ) {
21 + if ( ! url_parameters_arr[i] ) {
22 + continue;
23 + }
24 + var ary = url_parameters_arr[i].split( '=' );
25 + result_params_arr[ary[0]] = ary[1];
26 + }
27 + return result_params_arr;
28 +}
29 +
30 +function wpbc_ui_settings__menu__click( url, left_vert_nav_menu_a, section_id_to_show, text_for_path ){
31 +
32 + var current_page_params = wpbc_parse_url_and_get_params_arr( window.location.href );
33 + var destination_page_params = wpbc_parse_url_and_get_params_arr( url );
34 +
35 + var is_this_same_page = 0;
36 +
37 + if (current_page_params['page'] === destination_page_params['page']){
38 + is_this_same_page++;
39 + }
40 + if (
41 + ( (typeof( current_page_params['tab'] ) === 'undefined') && (typeof( destination_page_params['tab'] ) === 'undefined') ) ||
42 + ( (current_page_params['tab'] === destination_page_params['tab']) )
43 + ) {
44 + is_this_same_page++;
45 + }
46 + if (
47 + ( (typeof( current_page_params['subtab'] ) === 'undefined') && (typeof( destination_page_params['subtab'] ) === 'undefined') ) ||
48 + ( (current_page_params['subtab'] === destination_page_params['subtab']) )
49 + ) {
50 + is_this_same_page++;
51 + }
52 +
53 + if ( 3 === is_this_same_page ) {
54 + wpbc_ui_settings__panel__click( left_vert_nav_menu_a, section_id_to_show, text_for_path )
55 + } else {
56 + window.location.href = url;
57 + }
58 +
59 +}
60 +
61 +function wpbc_ui_settings__panel__click( left_vert_nav_menu_a, section_id_to_show, text_for_path ){
62 +
63 + // Update text in Top Menu.
64 + jQuery( '.wpbc_settings_path_el_active' ).html(
65 + '<a onclick="javascript:wpbc_ui_settings__panel__click( \'' + left_vert_nav_menu_a + '\', \'' + section_id_to_show + '\', \'' + text_for_path + '\' );" href="javascript:void(0);">' + text_for_path + '</a>'
66 + );
67 +
68 + // Show / Hide section and enable Left Vert Menu item
69 + wpbc_navigation_click_show_section( left_vert_nav_menu_a, section_id_to_show , '.postbox' , false);
70 +
71 + // wpbc_scroll_to( '.wpbc_settings_path_el_active' ); // Scroll to path.
72 + // wpbc_scroll_to( '.wpbc_page_top__header_tabs' ); // Scroll to Top.
73 + wpbc_scroll_to( '.wpbc_settings_page_header_title' ); // Scroll to Top.
74 +
75 +}
76 +
77 +
14 78 /**
15 79 * When click on Navigation Column menu
16 80 */
17 81 function wpbc_navigation_click_show_section( _this, section_id_to_show ){
18 82 var container_to_hide_class = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '.postbox';
83 + var is_scroll = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
19 84
85 + // -- Set Left Nav Active ------------------------------------------------------------------------------------------
20 86 jQuery( _this ).parents( '.wpbc_settings_flex_container' ).find( '.wpbc_settings_navigation_item_active' ).removeClass( 'wpbc_settings_navigation_item_active' );
21 87 jQuery( _this ).parents( '.wpbc_settings_navigation_item' ).addClass( 'wpbc_settings_navigation_item_active' );
88 + // -- Hide all and show selected ----------------------------------------------------------------------------------
22 89 jQuery( _this ).parents( '.wpbc_settings_flex_container' ).find( container_to_hide_class ).hide();
23 90 jQuery( '.wpbc_container_always_hide__on_left_nav_click' ).hide();
24 91 jQuery( section_id_to_show ).show();
25 92
93 + // -- Scroll -------------------------------------------------------------------------------------------------------
26 94 //jQuery( _this ).trigger( 'blur' );
27 - wpbc_scroll_to( section_id_to_show );
95 + if ( is_scroll ) {
96 + var targetOffset = wpbc_scroll_to( section_id_to_show );
97 + }
28 98
29 - //FixIn: 9.8.6.1
99 + // -- Set Value to Input about selected Nav element --------------------------------------------------------------- // FixIn: 9.8.6.1.
30 100 var section_id_tab = section_id_to_show.substring( 0, section_id_to_show.length - 8 ) + '_tab';
31 101 if ( container_to_hide_class == section_id_to_show ){
32 102 section_id_tab = '#wpbc_general_settings_all_tab'
33 103 }
@@ -43,41 +113,58 @@
43 113 *
44 114 * @param {type} object_name
45 115 * @returns {undefined}
46 116 */
47 -function wpbc_scroll_to( object_name ) {
48 - if ( jQuery( object_name ).length > 0 ) {
49 - var targetOffset = jQuery( object_name ).offset().top;
50 - // targetOffset = targetOffset - 50;
51 - if (targetOffset<0) targetOffset = 0;
52 - if ( jQuery('#wpadminbar').length > 0 ) targetOffset = targetOffset - 50;
53 - else targetOffset = targetOffset - 20;
54 - jQuery('html,body').animate({scrollTop: targetOffset}, 500);
55 - }
117 +function wpbc_scroll_to(object_name) {
118 +
119 + if ( jQuery( object_name ).length > 0 ) {
120 + var targetOffset = jQuery( object_name ).offset().top;
121 + if ( targetOffset < 0 ) {
122 + targetOffset = 0;
123 + }
124 + if ( jQuery( '#wpadminbar' ).length > 0 ) {
125 + targetOffset = targetOffset - 50 - 40;
126 + } else {
127 + targetOffset = targetOffset - 20;
128 + }
129 + jQuery( 'html,body' ).animate( { scrollTop: targetOffset }, 500 );
130 + return targetOffset;
131 + }
132 + return 0;
56 133 }
57 134
58 -jQuery( document ).ready(function(){
59 - setTimeout(function() {
60 - wpbc_scroll_to( window.location.hash );
61 - }, 100)
62 -});
135 +/**
136 + * Auto scroll to unchor after page loaded.
137 + */
138 +jQuery( document ).ready(
139 + function () {
140 + setTimeout(
141 + function () {
142 + // window.location.hash = #section_id / doc: https://developer.mozilla.org/en-US/docs/Web/API/Location .
143 + wpbc_scroll_to( window.location.hash );
144 + },
145 + 100
146 + );
147 + }
148 +);
63 149
64 150 function wpbc_animate_border( element, time, colors, x ) {
65 -
66 - if (x >= colors.length) {
151 +
152 + if ( x >= colors.length ) {
67 153 x = 0;
68 154 } else {
69 155 x++;
70 156 var color;
71 - if ( colors[x] === '' ) {
72 - color = ''
157 + if ( colors[ x ] === '' ) {
158 + color = '';
73 159 } else {
74 - color = '#'+colors[x]
75 - }
76 - element.css('border-color', color)
77 - setTimeout(function() {
160 + color = '#' + colors[ x ];
161 + }
162 + element.css( 'border-color', color );
163 + element.css( 'color', color );
164 + setTimeout( function () {
78 165 wpbc_animate_border( element, time, colors, x );
79 - }, time)
166 + }, time );
80 167 }
81 168 }
82 169
83 170 function wpbc_field_highlight( object_name ) {
@@ -88,9 +175,9 @@
88 175
89 176 wpbc_animate_border(
90 177 jQuery( object_name ) // Element
91 178 , 200 // Time in ms
92 - , ['f87000', '', 'f87000', '', 'f87000', '', 'f87000', '', 'f87000', '', 'f87000', ''] // Colors Array
179 + , ['d63637', '', 'd63637', '', 'd63637', '', 'd63637', '', 'd63637', '', 'd63637', ''] // Colors Array
93 180 , 0
94 181 );
95 182 }
96 183 }
@@ -122,9 +209,9 @@
122 209
123 210 if ( message == 'undefined' )
124 211 message = 'Processing'
125 212
126 - message = ' <span class="wpdevelop"><span class="glyphicon glyphicon-refresh wpbc_spin wpbc_ajax_icon wpbc_processing" aria-hidden="true"></span></span> ' + message + '...';
213 + message = ' <span class="wpdevelop"><span class="wpbc_icn_rotate_right wpbc_spin wpbc_ajax_icon wpbc_processing wpbc_icn_autorenew" aria-hidden="true"></span></span> ' + message + '...';
127 214
128 215 wpbc_admin_show_message( message, 'info', 10000 );
129 216 }
130 217
@@ -136,11 +223,11 @@
136 223 * @param {tyintpe} m_delay - microseconds
137 224 * @param {bool} is_append (default true) - append notice instead of replacing
138 225 * @returns {undefined}
139 226 */
140 -function wpbc_admin_show_message( message, m_type, m_delay, is_append ){ //FixIn: 7.2.1.16
227 +function wpbc_admin_show_message( message, m_type, m_delay, is_append ){ // FixIn: 7.2.1.16.
141 228
142 - if ( is_append === undefined) { //FixIn: 8.0.1.100
229 + if ( is_append === undefined) { // FixIn: 8.0.1.100.
143 230 is_append = true;
144 231 }
145 232
146 233 var alert_class = 'notice '; //'alert ';
@@ -198,9 +285,10 @@
198 285 function wpbc_close_dropdown_selectbox( selector_id ) {
199 286 jQuery('#' + selector_id + '_container li input[type=checkbox],#' + selector_id + '_container li input[type=radio]').prop('checked', false);
200 287 jQuery('#' + selector_id + '_container').hide();
201 288 }
202 - // Show Container depend from the selected option in dropdown list
289 +
290 + // Show Container depend from the selected option in dropdown list.
203 291 function wpbc_show_selected_in_dropdown( selector_id, title, value ){
204 292 jQuery('#' + selector_id + '_selector .wpbc_selected_in_dropdown').html( title );
205 293 jQuery('#' + selector_id ).val( value );
206 294 jQuery('#' + selector_id ).trigger('change');
@@ -205,10 +293,10 @@
205 293 jQuery('#' + selector_id ).val( value );
206 294 jQuery('#' + selector_id ).trigger('change');
207 295 }
208 296
209 - // Show Container depend from the selected Radio Option and Selectbox value in dropdown list
210 - // Exmaple: wpbc_show_selected_in_dropdown__radio_select_option( 'wh_booking_date', 'wh_booking_date2', 'wh_booking_datedays_interval_Radios' );
297 + // Show Container depend from the selected Radio Option and Selectbox value in dropdown list.
298 + // Exmaple: wpbc_show_selected_in_dropdown__radio_select_option( 'wh_booking_date', 'wh_booking_date2', 'wh_booking_datedays_interval_Radios' );.
211 299 function wpbc_show_selected_in_dropdown__radio_select_option( selector_id, selector_id2, radio_name ){
212 300
213 301 // Get selected value in radio buttons
214 302 var rad_val = jQuery('input:radio[name="' + radio_name + '"]:checked').val();
@@ -264,31 +352,9 @@
264 352
265 353 /**
266 354 * End: Dropdown BS List elements -------------------------------------------------------------------------------- */
267 355
268 -//FixIn: 9.6.3.5
269 356
270 -/* Mark rows in listing as selected by adding specific CLASS*/
271 -( function( $ ){
272 - $( document ).ready(function(){
273 -
274 -
275 - $('.wpbc-listing-row input[type="checkbox"]').on( 'change', function(){
276 -
277 - $('.wpbc-listing-row').find('.check-column').find(':checkbox').each( function() {
278 - if ( $(this).is(':checked') ) {
279 - $(this).parent().parent().parent().parent().addClass('row_selected_color');
280 - } else {
281 - $(this).parent().parent().parent().parent().removeClass('row_selected_color');
282 - }
283 -
284 - });
285 -
286 - } );
287 -
288 - });
289 -}( jQuery ) );
290 -
291 357 /**
292 358 * Ajax Request
293 359 *
294 360 * @param {type} us_id
@@ -294,41 +360,47 @@
294 360 * @param {type} us_id
295 361 * @param {type} window_id
296 362 * @returns {undefined}
297 363 */
298 -//<![CDATA[
299 -function wpbc_verify_window_opening( us_id, window_id ){
364 +function wpbc_verify_window_opening(us_id, window_id) {
300 365
301 - var is_closed = 0;
366 + var is_closed = 0;
302 367
303 - if (jQuery('#' + window_id ).hasClass('closed') == true){
304 - jQuery('#' + window_id ).removeClass('closed');
305 - } else {
306 - jQuery('#' + window_id ).addClass('closed');
307 - is_closed = 1;
308 - }
368 + if ( jQuery( '#' + window_id ).hasClass( 'closed' ) == true ) {
369 + jQuery( '#' + window_id ).removeClass( 'closed' );
370 + } else {
371 + jQuery( '#' + window_id ).addClass( 'closed' );
372 + is_closed = 1;
373 + }
309 374
375 + jQuery.ajax(
376 + {
377 + // Start Ajax Sending.
378 + url : wpbc_url_ajax,
379 + type : 'POST',
380 + success: function (data, textStatus) {
381 + if ( textStatus == 'success' ) jQuery( '#ajax_respond' ).html( data );
382 + },
383 + error : function (XMLHttpRequest, textStatus, errorThrown) {
384 + window.status = 'Ajax sending Error status:' + textStatus;
385 + alert( XMLHttpRequest.status + ' ' + XMLHttpRequest.statusText );
386 + if ( XMLHttpRequest.status == 500 ) {
387 + alert( 'Error: 500' );
388 + }
389 + },
390 + // beforeSend: someFunction,
391 + data: {
392 + action : 'USER_SAVE_WINDOW_STATE',
393 + user_id : us_id,
394 + window : window_id,
395 + is_closed : is_closed,
396 + wpbc_nonce: jQuery( '#wpbc_admin_panel_nonce' ).val()
397 + }
398 + }
399 + );
310 400
311 - jQuery.ajax({ // Start Ajax Sending
312 - url: wpbc_url_ajax,
313 - type:'POST',
314 - success: function (data, textStatus){if( textStatus == 'success') jQuery('#ajax_respond').html( data );},
315 - error:function (XMLHttpRequest, textStatus, errorThrown){ window.status = 'Ajax sending Error status:'+ textStatus; alert(XMLHttpRequest.status + ' ' + XMLHttpRequest.statusText); if ( XMLHttpRequest.status == 500 ) { alert('Error: 500'); } } ,
316 - // beforeSend: someFunction,
317 - data:{
318 - action: 'USER_SAVE_WINDOW_STATE',
319 - user_id: us_id ,
320 - window: window_id,
321 - is_closed: is_closed,
322 - wpbc_nonce: jQuery('#wpbc_admin_panel_nonce').val()
323 - }
324 - });
325 -
326 401 }
327 -//]]>
328 402
329 -
330 -
331 403 /**
332 404 * Ajax Request - Saving Custom Data for User
333 405 *
334 406 * @param {int} us_id
@@ -335,18 +407,17 @@
335 407 * @param {string} data_name
336 408 * @param {string} data_value - serialized data
337 409 * @param {int} is_reload - { 0 | 1 } reload or not page
338 410 */
339 -//<![CDATA[
340 411 function wpbc_save_custom_user_data( us_id, data_name, data_value , is_reload ){
341 412
342 - wpbc_admin_show_message_processing( 'saving' );
413 + wpbc_admin_show_message_processing( 'saving' );
343 414
344 415 jQuery.ajax({ // Start Ajax Sending
345 416 url: wpbc_url_ajax,
346 417 type:'POST',
347 418 success: function (data, textStatus){if( textStatus == 'success') jQuery('#ajax_respond').html( data );},
348 - error:function (XMLHttpRequest, textStatus, errorThrown){ window.status = 'Ajax sending Error status:'+ textStatus; alert(XMLHttpRequest.status + ' ' + XMLHttpRequest.statusText); if ( XMLHttpRequest.status == 500 ) { alert('Error: 500'); } } ,
419 + error:function (XMLHttpRequest, textStatus, errorThrown){ window.status = 'Ajax sending Error status:'+ textStatus; console.error( XMLHttpRequest.status + ' ' + XMLHttpRequest.statusText); if ( XMLHttpRequest.status == 500 ) { console.error( 'Error: 500'); } } ,
349 420 // beforeSend: someFunction,
350 421 data:{
351 422 action: 'USER_SAVE_CUSTOM_DATA',
352 423 user_id: us_id,
@@ -355,18 +426,11 @@
355 426 is_reload: is_reload,
356 427 wpbc_nonce: jQuery('#wpbc_admin_panel_nonce').val()
357 428 }
358 429 });
359 -
360 430 }
361 -//]]>
362 431
363 -
364 -
365 -
366 -////////////////////////////////////////////////////////////////////////////////
367 -// Contact Form
368 -////////////////////////////////////////////////////////////////////////////////
432 +// Contact Form.
369 433 function wpbc_submit_client_form( submit_form, wpdev_active_locale ){
370 434
371 435 var count = submit_form.elements.length;
372 436 var formdata = '';
@@ -505,9 +569,8 @@
505 569
506 570 submit_form.submit(); // Submit Form, if previously was no interuptions
507 571 }
508 572
509 -
510 573 /**
511 574 * Show message under specific element
512 575 *
513 576 * @param {type} element - jQuery definition of the element
@@ -536,10 +599,9 @@
536 599 .animate( {opacity: 1}, 10000 )
537 600 .fadeOut( 2000 );
538 601 }
539 602
540 -
541 -// Show Error Message in Booking Form at Front End
603 +// Show Error Message in Booking Form at Front End.
542 604 function wpbc_show_error_message( element , errorMessage) {
543 605
544 606 // Scroll to the element
545 607 wpbc_scroll_to( element );
@@ -574,9 +636,9 @@
574 636 .css( {'vertical-align': 'sub' } ) ;
575 637 jQuery(".wpbc-near-field-message")
576 638 .animate( {opacity: 1}, 10000 )
577 639 .fadeOut( 2000 );
578 - jQuery( element).trigger( 'focus' ); //FixIn: 8.7.11.12
640 + jQuery( element).trigger( 'focus' ); // FixIn: 8.7.11.12.
579 641 return;
580 642
581 643 }
582 644
@@ -616,12 +678,11 @@
616 678 //return parser.href;
617 679 window.location.href = parser.href;
618 680 }
619 681
620 -// jQuery(window).load(function(){
621 -jQuery( window ).on( "load", function (){ //FixIn: 8.7.9.7
682 +// Deprecated:.
683 +jQuery( window ).on( "load", function (){ // FixIn: 8.7.9.7.
622 684
623 -
624 685 // Color Text picker ///////////////////////////////////////////////////////
625 686 if ( jQuery('.field-text-color').length > 0 ) {
626 687 jQuery('.field-text-color').iris( {
627 688 change: function(event, ui){
@@ -633,9 +694,9 @@
633 694 , palettes: ['#333', '#555', '#777', '#aaa', '#fff']
634 695 } ).each( function() {
635 696 jQuery(this).css( { backgroundColor: jQuery(this).val() } );
636 697 })
637 - .on( 'click', function(){ //FixIn: 8.7.11.12
698 + .on( 'click', function(){ // FixIn: 8.7.11.12.
638 699 jQuery('.iris-picker').hide();
639 700 jQuery(this).closest('div').find('.iris-picker').show();
640 701 });
641 702 }
@@ -651,21 +712,21 @@
651 712 , palettes: [ '#FFEE99', '#459', '#78b', '#ab0', '#df5d5d', '#f0f']
652 713 } ).each( function() {
653 714 jQuery(this).css( { backgroundColor: jQuery(this).val() } );
654 715 })
655 - .on( 'click', function(){ //FixIn: 8.7.11.12
716 + .on( 'click', function(){ // FixIn: 8.7.11.12.
656 717 jQuery('.iris-picker').hide();
657 718 jQuery(this).closest('div').find('.iris-picker').show();
658 719 });
659 - //FixIn: 8.7.11.12
720 + // FixIn: 8.7.11.12.
660 721 jQuery('.field-text-color, .field-background-color' ).on( 'click', function(event){
661 722 event.stopPropagation();
662 723 });
663 724 }
664 725
665 - ////////////////////////////////////////////////////////////////////////////
726 + // -----------------------------------------------------------------------------------------------------------------
666 727 // General Color picker in settings table //////////////////////////////////
667 - ////////////////////////////////////////////////////////////////////////////
728 + // -----------------------------------------------------------------------------------------------------------------
668 729 if ( jQuery('.wpbc_colorpick').length > 0 ) {
669 730 jQuery('.wpbc_colorpick').iris( {
670 731 change: function(event, ui){
671 732 jQuery(this).css( { backgroundColor: ui.color.toString() } );
@@ -675,9 +736,9 @@
675 736 , palettes: ['#125', '#459', '#78b', '#ab0', '#de3', '#f0f']
676 737 } ).each( function() {
677 738 jQuery(this).css( { backgroundColor: jQuery(this).val() } );
678 739 })
679 - .on( 'click', function(){ //FixIn: 8.7.11.12
740 + .on( 'click', function(){ // FixIn: 8.7.11.12.
680 741 jQuery('.iris-picker').hide();
681 742 jQuery(this).closest('td').find('.iris-picker').show();
682 743 });
683 744
@@ -683,22 +744,17 @@
683 744
684 745 jQuery('body' ).on( 'click', function() {
685 746 jQuery('.iris-picker').hide();
686 747 });
687 - //FixIn: 8.7.11.12
748 + // FixIn: 8.7.11.12.
688 749 jQuery('.wpbc_colorpick' ).on( 'click', function(event){
689 750 event.stopPropagation();
690 751 });
691 752 }
692 -
693 -});
753 +});
694 754
755 +// -- Support Functions ------------------------------------------------------------------------------------------------
695 756
696 -
697 -////////////////////////////////////////////////////////////////////////////
698 -// Support Functions
699 -////////////////////////////////////////////////////////////////////////////
700 -
701 757 /**
702 758 * Reset of WP Editor or TextArea Content
703 759 * @param {string} editor_textarea_id - ID of element
704 760 * @param {string} editor_textarea_content - Content
@@ -704,9 +760,9 @@
704 760 * @param {string} editor_textarea_content - Content
705 761 */
706 762 function wpbc_reset_wp_editor_content( editor_textarea_id, editor_textarea_content ) {
707 763
708 - //FixIn: 8.4.7.18
764 + // FixIn: 8.4.7.18.
709 765
710 766 if ( (typeof WPBC_CM !== 'undefined') && ( WPBC_CM.is_defined( '#' + editor_textarea_id ) ) ){
711 767
712 768 WPBC_CM.set_codemirror_value( '#' + editor_textarea_id , editor_textarea_content );
@@ -732,9 +788,8 @@
732 788 * @param {type} us_id
733 789 * @param {type} window_id
734 790 * @returns {undefined}
735 791 */
736 -//<![CDATA[
737 792 function wpbc_dismiss_window(us_id, window_id ){
738 793
739 794 jQuery.ajax({ // Start Ajax Sending
740 795 url: wpbc_url_ajax,
@@ -739,9 +794,9 @@
739 794 jQuery.ajax({ // Start Ajax Sending
740 795 url: wpbc_url_ajax,
741 796 type:'POST',
742 797 success: function (data, textStatus){if( textStatus == 'success') jQuery('#ajax_respond').html( data );},
743 - error:function (XMLHttpRequest, textStatus, errorThrown){window.status = 'Ajax sending Error status:'+ textStatus;alert(XMLHttpRequest.status + ' ' + XMLHttpRequest.statusText);if (XMLHttpRequest.status == 500) {alert('Please check at this page according this error:' + ' https://wpbookingcalendar.com/faq/#ajax-sending-error');}},
798 + error:function (XMLHttpRequest, textStatus, errorThrown){window.status = 'Ajax sending Error status:'+ textStatus;console.error( XMLHttpRequest.status + ' ' + XMLHttpRequest.statusText);if (XMLHttpRequest.status == 500) {console.error( 'Please check at this page according this error:' + ' https://wpbookingcalendar.com/faq/#ajax-sending-error');}},
744 799 // beforeSend: someFunction,
745 800 data:{
746 801 //ajax_action : 'USER_SAVE_WINDOW_STATE',
747 802 action : 'USER_SAVE_WINDOW_STATE',
@@ -751,9 +806,8 @@
751 806 wpbc_nonce: document.getElementById('wpbc_admin_panel_dismiss_window_nonce').value
752 807 }
753 808 });
754 809 }
755 -//]]>
756 810
757 811 /**
758 812 * Hide HTML element with animation during 0.5 second
759 813 *
@@ -758,7 +812,7 @@
758 812 * Hide HTML element with animation during 0.5 second
759 813 *
760 814 * @param window_id - HTML ID of element, such as 'wpbc_my_window' - without # symbol
761 815 */
762 -function wpbc_hide_window( window_id ){
763 - jQuery( '#' + window_id ).slideUp( 800 );
764 -}
816 +function wpbc_hide_window(window_id) {
817 + jQuery( '#' + window_id ).slideUp( 800 );
818 +}