Plugin Directory

Changeset 2550218


Ignore:
Timestamp:
06/18/2021 05:36:52 AM (5 years ago)
Author:
dunskii
Message:

Improvements to administration monthly and weekly booking views.

Location:
booking-x/trunk
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • booking-x/trunk/README.txt

    r2544756 r2550218  
    55Tested up to: 5.7.2
    66Requires PHP: 5.0
    7 Stable tag: 1.0.4
     7Stable tag: 1.0.5
    88License: GPLv2 or later
    99License URI: https://booking-x.com/gpl-licence/
     
    134134== Upgrade Notice ==
    135135
    136 = 1.0.4 =
    137 Improvements to edit booking UI and UX
     136= 1.0.5 =
     137Improvements to administration monthly and weekly booking views
    138138
    139139== Updating ==
     
    147147= 1.0.3 - Adding Sale Price functionality. 2021-20-04 =
    148148= 1.0.4 - Improvements to edit booking UI and UX. 2021-04-06 =
     149= 1.0.5 - Improvements to administration monthly and weekly booking views. 2021-18-06 =
  • booking-x/trunk/admin/class-bookingx-admin.php

    r2544756 r2550218  
    44 *
    55 * @link       https://dunskii.com
    6  * @since      1.0.4
     6 * @since      1.0.5
    77 *
    88 * @package    Bookingx
     
    1414     * The ID of this plugin.
    1515     *
    16      * @since      1.0.4
     16     * @since      1.0.5
    1717     * @access   private
    1818     * @var      string $plugin_name The ID of this plugin.
     
    2323     * The version of this plugin.
    2424     *
    25      * @since      1.0.4
     25     * @since      1.0.5
    2626     * @access   private
    2727     * @var      string $version The current version of this plugin.
     
    3434     * @param string $plugin_name The name of this plugin.
    3535     * @param string $version The version of this plugin.
    36      * @since      1.0.4
     36     * @since      1.0.5
    3737     */
    3838    public function __construct( $plugin_name = null, $version = null ) {
     
    622622     * Register the stylesheets for the admin area.
    623623     *
    624      * @since      1.0.4
     624     * @since      1.0.5
    625625     */
    626626    public function enqueue_styles() {
     
    644644     * Register the JavaScript for the admin area.
    645645     *
    646      * @since      1.0.4
     646     * @since      1.0.5
    647647     */
    648648    public function enqueue_scripts() {
     
    12111211    public function bkx_generate_listing_view( $type ) {
    12121212        if ( 'weekly' === $type || 'monthly' === $type ) {
    1213             $default_view = 'weekly' === $type ? 'agendaWeek' : 'month';
     1213            $default_view = 'weekly' === $type ? 'timeGridWeek' : 'dayGridMonth';
    12141214            // $bkx_calendar_json_data = bkx_crud_option_multisite( 'bkx_calendar_json_data' );
    12151215            $bkx_booking            = new BkxBooking();
    12161216            $search['booking_date'] = date( 'Y-m-d' ); // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date
    1217             $search['by']           = 'this_month';
     1217            $search['by']           = 'future';
    12181218            $search['type']         = $type;
     1219
    12191220            $bkx_calendar_json_data = $bkx_booking->CalendarJsonData( $search );
     1221
    12201222
    12211223            if ( isset( $bkx_calendar_json_data ) && ! empty( $bkx_calendar_json_data ) ) {
    12221224                ?>
    1223                 jQuery(document).ready(function() {
    1224                 jQuery('#calendar').fullCalendar({
    1225                 plugins: [ 'interaction', 'dayGrid', 'timeGrid' ],
    1226                 header: {
    1227                 left: 'prev,next',
    1228                 center: 'title',
    1229                 right: 'dayGridMonth,timeGridWeek,timeGridDay'
    1230                 },
    1231                 defaultView: '<?php echo esc_attr( $default_view ); ?>',
    1232                 defaultDate: '<?php echo date( 'Y-m-d' ); //phpcs:ignore ?>',
    1233                 navLinks: true, // can click day/week names to navigate views
    1234                 editable: false,
    1235                 eventLimit: true,
    1236                 viewRender: function(currentView){
    1237                 var minDate = moment(),
    1238                 maxDate = moment().add(2,'weeks');
    1239                 // Past
    1240                 if (minDate >= currentView.start && minDate <= currentView.end) {
    1241                 jQuery(".fc-prev-button").prop('disabled', true);
    1242                 jQuery(".fc-prev-button").addClass('fc-state-disabled');
    1243                 }
    1244                 else {
    1245                 jQuery(".fc-prev-button").removeClass('fc-state-disabled');
    1246                 jQuery(".fc-prev-button").prop('disabled', false);
    1247                 }
    1248 
    1249                 },
    1250                 events: [<?php echo $bkx_calendar_json_data; //phpcs:ignore ?>]
    1251                 });
    1252                 });
     1225
     1226                document.addEventListener('DOMContentLoaded', function() {
     1227                var calendarEl = document.getElementById('calendar');
     1228
     1229                var calendar = new FullCalendar.Calendar(calendarEl, {
     1230                initialDate: '<?php echo date('Y-m-d'); ?>',
     1231                initialView: '<?php echo $default_view;?>',
     1232                nowIndicator: true,
     1233                headerToolbar: {
     1234                left: 'prev,next today',
     1235                center: 'title',
     1236                right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'
     1237                },
     1238                navLinks: true, // can click day/week names to navigate views
     1239                editable: true,
     1240                selectable: true,
     1241                selectMirror: true,
     1242                dayMaxEvents: true, // allow "more" link when too many events
     1243                events: [
     1244                <?php echo $bkx_calendar_json_data; //phpcs:ignore ?>
     1245                ]
     1246                });
     1247
     1248                calendar.render();
     1249                });
    12531250                <?php
    12541251            }
  • booking-x/trunk/admin/css/bookingx-admin.css

    r2544756 r2550218  
    110110#calendar {
    111111    max-width: 900px;
     112    width: 100%;
    112113    margin: 0 auto;
    113114    background: #fff;
  • booking-x/trunk/admin/settings.php

    r2544756 r2550218  
    44 *
    55 * @package Bookingx/admin
    6  * @since      1.0.4
     6 * @since      1.0.5
    77 */
    88
  • booking-x/trunk/admin/settings/bkx_biz-view.php

    r2544756 r2550218  
    44 *
    55 * @package Bookingx/admin
    6  * @since      1.0.4
     6 * @since      1.0.5
    77 */
    88
  • booking-x/trunk/admin/settings/bkx_general-view.php

    r2544756 r2550218  
    44 *
    55 * @package Bookingx/admin
    6  * @since      1.0.4
     6 * @since      1.0.5
    77 */
    88
  • booking-x/trunk/admin/settings/bkx_payment-view.php

    r2544756 r2550218  
    44 *
    55 * @package Bookingx/admin
    6  * @since      1.0.4
     6 * @since      1.0.5
    77 */
    88
  • booking-x/trunk/admin/settings/setting-functions.php

    r2544756 r2550218  
    44 *
    55 * @package Bookingx/admin
    6  * @since      1.0.4
     6 * @since      1.0.5
    77 */
    88
  • booking-x/trunk/admin/settings/settings_save.php

    r2544756 r2550218  
    44 *
    55 * @package Bookingx/admin
    6  * @since      1.0.4
     6 * @since      1.0.5
    77 */
    88
  • booking-x/trunk/bookingx.php

    r2544756 r2550218  
    44 *  Plugin URI: https://booking-x.com/
    55 *  Description: Booking X is a booking and appointments plugin for WordPress
    6  *  Version: 1.0.4
     6 *  Version: 1.0.5
    77 *  Requires at least: 5.0
    88 *  Requires PHP: 5.0
     
    4040define( 'BKX_PLUGIN_PUBLIC_URL', BKX_PLUGIN_DIR_URL . 'public' );
    4141define( 'BKX_PLUGIN_PUBLIC_PATH', BKX_PLUGIN_DIR_PATH . 'public' );
    42 define( 'BKX_PLUGIN_VER', '1.0.4' );
     42define( 'BKX_PLUGIN_VER', '1.0.5' );
    4343define( 'BKX_BLOCKS_ASSETS', BKX_PLUGIN_DIR_URL . 'includes/core/blocks/assets/' );
    4444define( 'BKX_BLOCKS_ASSETS_BASE_PATH', BKX_PLUGIN_DIR_PATH . "includes\core\blocks\assets" );
  • booking-x/trunk/includes/class-bookingx-activator.php

    r2544756 r2550218  
    55 * This class defines all code necessary to run during the plugin's activation.
    66 *
    7  * @since      1.0.4
     7 * @since      1.0.5
    88 * @package    Bookingx
    99 * @subpackage Bookingx/includes
  • booking-x/trunk/includes/class-bookingx.php

    r2544756 r2550218  
    2222 * version of the plugin.
    2323 *
    24  * @since      1.0.4
     24 * @since      1.0.5
    2525 * @package    Bookingx
    2626 * @subpackage Bookingx/includes
  • booking-x/trunk/includes/core/ajax/class-bkx-ajax-loader.php

    r2544756 r2550218  
    158158              } else {
    159159         $user_data = wp_update_user(
    160     array(
    161      'ID'         => $user_id,
    162      'first_name' => $first_name,
    163      'last_name'  => $last_name,
    164      'user_email' => $email_address,
    165     )
     160                array(
     161                 'ID'         => $user_id,
     162                 'first_name' => $first_name,
     163                 'last_name'  => $last_name,
     164                 'user_email' => $email_address,
     165                )
    166166         );
    167167         if ( is_wp_error( $user_data ) ) {
  • booking-x/trunk/includes/core/script/class-bkx-script-loader.php

    r2496574 r2550218  
    9393            ),
    9494            'fullcalendar'           => array(
    95                 'src'     => BKX_PLUGIN_PUBLIC_URL . '/js/fullcalendar/min.js',
     95                'src'     => BKX_PLUGIN_PUBLIC_URL . '/js/fullcalendar/lib/main.js',
    9696                'deps'    => array( 'jquery' ),
    9797                'version' => BKX_PLUGIN_VER,
     
    144144            ),*/
    145145            'fullcalendarcss'  => array(
    146                 'src'     => BKX_PLUGIN_PUBLIC_URL . '/css/fullcalendar/min.css',
     146                'src'     => BKX_PLUGIN_PUBLIC_URL . '/js/fullcalendar/lib/main.css',
    147147                'deps'    => array( 'style-main' ),
    148148                'version' => BKX_PLUGIN_VER,
     
    202202                ),
    203203                'fullcalendarcss'  => array(
    204                     'src'     => BKX_PLUGIN_PUBLIC_URL . '/css/fullcalendar/min.css',
     204                    'src'     => BKX_PLUGIN_PUBLIC_URL . '/js/fullcalendar/lib/main.css',
    205205                    'deps'    => array( 'style-main' ),
    206206                    'version' => BKX_PLUGIN_VER,
  • booking-x/trunk/public/js/booking-form/bkx-booking-form.js

    r2544756 r2550218  
    351351            e.preventDefault();
    352352            block($('div.step-4'));
    353             bkx_error_flag.val(0);
     353            //bkx_error_flag.val(0);
    354354            booking_form.validate_form_fields();
    355355            var user_time_zone = $('#bkx_user_time_zone').val();
     
    394394            });
    395395            var submission_skip = false;
    396             if (GetCurrentStep() == 4 && 1 === flag() && 1 === GatewayFlag() && ( booking_form.is_prepayment == true || booking_form.is_prepayment == 'true' ) ) {
     396            if ( (4 ===GetCurrentStep() || '4' ===GetCurrentStep() ) && 1 === flag() && 1 === GatewayFlag() && ( booking_form.is_prepayment == true || booking_form.is_prepayment == 'true' ) ) {
    397397                submission_skip = true;
    398398            }
    399 
    400             console.log(submission_skip)
     399            if( $('#bkx_gateway_flag').val() == 'skip' ){
     400                submission_skip = true;
     401            }
    401402            setTimeout(function () {
    402403                block($('div.step-4'));
  • booking-x/trunk/templates/single-bkx_addition.php

    r2544756 r2550218  
    55 * @package    Bookingx
    66 * @subpackage bookingx
    7  * @since      1.0.4
     7 * @since      1.0.5
    88 */
    99
  • booking-x/trunk/templates/single-bkx_base.php

    r2544756 r2550218  
    55 * @package    Bookingx
    66 * @subpackage bookingx
    7  * @since      1.0.4
     7 * @since      1.0.5
    88 */
    99
  • booking-x/trunk/templates/single-bkx_seat.php

    r2544756 r2550218  
    55 * @package    Bookingx
    66 * @subpackage bookingx
    7  * @since      1.0.4
     7 * @since      1.0.5
    88 */
    99
  • booking-x/trunk/templates/single.php

    r2544756 r2550218  
    55 * @package    Bookingx
    66 * @subpackage bookingx
    7  * @since      1.0.4
     7 * @since      1.0.5
    88 */
    99
Note: See TracChangeset for help on using the changeset viewer.