Plugin Directory

Changeset 1975439


Ignore:
Timestamp:
11/16/2018 11:19:15 AM (7 years ago)
Author:
feryaz
Message:

Update to 5.0.8

Location:
easyreservations/trunk
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • easyreservations/trunk/assets/js/ajax/data.js

    r1959903 r1975439  
    22    var tnights = 0, nights = '', nights_interval = 0, slot = -1, to = '', toplus = 0, fromplus = 0, children = 0, adults = 1, captcha = 'x!', captcha_prefix = '', tom = 0, toh = '', fromm = 0, fromh = '', theid = '';
    33
    4     console.log(form);
    54    if(jQuery('#'+form+' input[name="from"]').length > 0){
    65        var from = jQuery('#'+form+' input[name="from"]').val();
  • easyreservations/trunk/assets/js/ajax/form.js

    r1959903 r1975439  
    5757            var theprices = easyReservationsPrice;
    5858            if(add){
    59                 if(window.easyLastPrice && window.easyLastPrice > 0) var easyLastPrice= window.easyLastPrice;
     59                if(window.easyLastPrice && window.easyLastPrice > 0) var easyLastPrice = window.easyLastPrice;
    6060                else var easyLastPrice = 0;
    6161                if(!easyReservationEdit){
     
    6464                    jQuery('#easyFrontendFormular *[disabled="disabled"]').attr('disabled', false).attr('temp', 'disabled');
    6565                    jQuery.each(jQuery('#easyFrontendFormular').serializeArray(), function(i, field){
    66                         ndata[field.name] = field.value;
     66                        if(!ndata[field.name]){
     67                            ndata[field.name] = field.value;
     68                        }
    6769                    });
    6870                    jQuery('#easyFrontendFormular *[temp="disabled"]').attr('disabled', 'disabled').attr('temp', false);
     
    7476            for(i in thedatas){
    7577                var datas = thedatas[i];
     78                if(typeof(thedatas[i]) == 'string') datas = easyUnserialize(thedatas[i]);
    7679                if(datas && datas['resource']){
    77                   if(typeof(thedatas[i]) == 'string') datas = easyUnserialize(thedatas[i]);
    7880                  if(i == thedatas.length-1) reservations += '<tr class="active">';
    7981                  else reservations += '<tr>';
     
    116118                    var onclicke = 'easyEdit('+i+',true);';
    117119                  }
    118                   reservations+='<td><a href="javascript:void" onclick="'+onclicke+'" class="fa fa-pencil" title="edit"></a><a href="javascript:void" onclick="'+onclickc+'" class="fa fa-trash" title="cancel"></a></td>';
     120                  reservations+='<td><a href="javascript:void(0)" onclick="'+onclicke+'" class="fa fa-pencil" title="edit"></a><a href="javascript:void(0)" onclick="'+onclickc+'" class="fa fa-trash" title="cancel"></a></td>';
    119121                  reservations+='</tr>';
    120122                }
     
    208210function easyEdit(i,dimm){
    209211    if(dimm && dimm !== false){
    210         if(!easyLastPrice) var easyLastPrice = 0;
     212        var easyLastPrice = 0;
     213        if(window.easyLastPrice && window.easyLastPrice > 0) easyLastPrice = window.easyLastPrice;
    211214        easyReservationDatas.push(jQuery('#easyFrontendFormular').serialize());
    212215        easyReservationsPrice.push(easyLastPrice);
     
    215218    var data = easyReservationDatas[i];
    216219    if(data){
    217         data = easyUnserialize(data);
     220        if(typeof(data) == 'string') data = easyUnserialize(data);
    218221        jQuery.each(data, function (name,value) {
    219222            jQuery("input[name='"+name+"'],select[name='"+name+"']").each(function() {
     
    232235                    case "select":
    233236                        jQuery("option",this).each(function(){
    234                             if(this.value&&this.value==value) this.selected=true;
     237                            if(this.value && this.value==value) this.selected=true;
    235238                        });
    236239                        break;
     
    238241            });
    239242        });
    240         if(dimm) easyOverlayDimm(1);   
     243        if(dimm) easyOverlayDimm(1);
     244        jQuery('#easyFrontendFormular').find('*[name=resource]').trigger('change');
    241245    } else alert('Error #3243 - please report in forum.');
    242246}
  • easyreservations/trunk/assets/js/ajax/send_validate.js

    r1959903 r1975439  
    3535        });
    3636
    37         jQuery("#easy-show-error-div").addClass('hidden');
     37        jQuery("#easy-show-error-div").addClass('hide');
    3838        jQuery("[id^='easy-form-'],[id^='easy-custom-'],[id^='easy-new-custom-']").removeClass('form-error');
    3939        jQuery(".error-wrapper + .ui-effects-wrapper, .error-wrapper, .ui-effects-wrapper").remove();
  • easyreservations/trunk/assets/js/date-selection.js

    r1964306 r1975439  
    315315                beforeShowDay: checkData,
    316316                onChangeMonthYear: function(year, month, inst){
    317                     loadData(date_format.replace('dd', '01').replace('mm', month).replace('yy', year));
     317                    if(!slots || (!arrivalTime && settings.time)  || (arrival && !settings.time)){
     318                        loadData(date_format.replace('dd', '01').replace('mm', month).replace('yy', year));
     319                    }
    318320                    e.find('div.time').slideUp(300);
    319321                    if(arrival){
     
    390392                    e.find('input[name=date-from-min]').val(minute);
    391393
    392                     if(settings.departure){
     394                    if(!settings.departure){
    393395                        e.find('.departure .text .date').addClass('important').html(easy_date_selection_params.wait);
    394396                        loadData(arrival);
  • easyreservations/trunk/changelog.html

    r1965850 r1975439  
     1<h2>easyReservations 5.0.8 - 16.10.2018</h2>
     2<ul>
     3    <li><strong>Premium</strong>
     4        <ul>
     5            <li><strong>htmlMails 1.1.14</strong>
     6                <ul>
     7                    <li>Fixed not able to click in settings</li>
     8                </ul>
     9            </li>
     10        </ul>
     11        <ul>
     12            <li><strong>Synchronization 2.0.3</strong>
     13                <ul>
     14                    <li>Fixed import from airbnb</li>
     15                    <li>Fixed import of events with an UID longer than 50 chars</li>
     16                    <li>Fixed import past reservations setting</li>
     17                </ul>
     18            </li>
     19        </ul>
     20        <ul>
     21            <li><strong>User Control Panel 1.3.12</strong>
     22                <ul>
     23                    <li>Fixed submit</li>
     24                    <li>Fixed departure date minute</li>
     25                </ul>
     26            </li>
     27        </ul>
     28    </li>
     29    <li><strong>Bugs fixed</strong>
     30        <ul>
     31            <li>Approve reservation on edit</li>
     32            <li>Slot selection into the next month</li>
     33            <li>Edit reservation when making multiple at once in the form</li>
     34            <li>Display form errors</li>
     35            <li>Error message when resource has no filters</li>
     36            <li>Add custom field button in admin area</li>
     37        </ul>
     38    </li>
     39    <li><strong>Improvements</strong>
     40        <ul>
     41            <li>Brought back the [customs] email tag</li>
     42            <li>Recalculate price when editing old reservations in form</li>
     43        </ul>
     44    </li>
     45</ul>
    146<h2>easyReservations 5.0.4 - 5.0.7 - 30.10.2018</h2>
    247<ul>
  • easyreservations/trunk/easyReservations.php

    r1965850 r1975439  
    44Plugin URI: http://www.easyreservations.org
    55Description: This powerful property and reservation management plugin allows you to receive, schedule and handle your bookings easily!
    6 Version: 5.0.7
     6Version: 5.0.8
    77Author: Feryaz Beer
    88Author URI: http://www.feryaz.de
  • easyreservations/trunk/lib/admin/class-er-admin-resources.php

    r1959903 r1975439  
    9494                $all_filter[ $key ] = $filter;
    9595            }
     96        } else {
     97            $all_filter = array();
    9698        }
    9799
  • easyreservations/trunk/lib/admin/dashboard.php

    r1959903 r1975439  
    264264        elseif(isset($delete)) $theid = $delete;
    265265
    266         if(!isset($res)) $res = new ER_Reservation($theid);
     266        $res = new ER_Reservation($theid);
    267267        try {
    268268            $res->checkAvailability(2);
     
    314314
    315315            $return = $the_reservation->editReservation(array('status', 'paid', 'space'), true, $emailformation, $the_reservation->email);
    316             $return = 'bla';
    317316
    318317            if(!$return){
  • easyreservations/trunk/lib/admin/views/html-admin-resource-header.php

    r1965850 r1975439  
    4343<script>
    4444    jQuery(document).ready(function($) {
    45         console.log(132);
    4645        $('.resource-navigation').easyNavigation({value: 'settings', hash: true});
    4746        easyUiTooltip();
  • easyreservations/trunk/lib/admin/views/html-admin-settings-about.php

    r1965260 r1975439  
    1111    <tbody>
    1212    <tr>
    13         <td style="font-weight:bold;padding:10px;text-align:center"><span style="width:30%;display: inline-block">Version: <?php echo RESERVATIONS_VERSION; ?></span><span style="width:30%;display: inline-block">Last update: 30.10.2018</span><span style="width:30%;display: inline-block">written by Feryaz Beer</span></td>
     13        <td style="font-weight:bold;padding:10px;text-align:center"><span style="width:30%;display: inline-block">Version: <?php echo RESERVATIONS_VERSION; ?></span><span style="width:30%;display: inline-block">Last update: 16.11.2018</span><span style="width:30%;display: inline-block">written by Feryaz Beer</span></td>
    1414    </tr>
    1515    <tr class="alternate">
  • easyreservations/trunk/lib/class-easyreservations.php

    r1965850 r1975439  
    88final class easyReservations {
    99    //Current Version of easyReservations
    10     public $version = '5.0.7';
     10    public $version = '5.0.8';
    1111
    1212    //Current Database Version of easyReservations
     
    4040        $reservations_settings = get_option( "reservations_settings" );
    4141
    42         define( 'RESERVATIONS_VERSION', '5.0.7' );
     42        define( 'RESERVATIONS_VERSION', '5.0.8' );
    4343        define( 'RESERVATIONS_ABSPATH', dirname( RESERVATIONS_PLUGIN_FILE ) . '/' );
    4444        define( 'RESERVATIONS_URL', WP_PLUGIN_URL . '/easyreservations/' );
  • easyreservations/trunk/lib/class-er-ajax.php

    r1959903 r1975439  
    547547                $arrivalplus = 0;
    548548                if(isset($_POST['date-from-hour'])) $arrivalplus += (int) $_POST['date-from-hour'] * 60;
    549                 else $arrivalplus += 12*60;
     549                else $arrivalplus += 0;
    550550                if(isset($_POST['date-from-min'])) $arrivalplus += (int) $_POST['date-from-min'];
    551551                if($arrivalplus > 0) $arrivalplus = $arrivalplus * 60;
     
    608608
    609609                        $theID = $res->editReservation();
    610                         if(!$theID) echo json_encode(array($res->id, round($res->get_price(), RESERVATIONS_DECIMAL)));
     610                        if(!$theID) {
     611                            echo json_encode(array($res->id, round($res->get_price(), RESERVATIONS_DECIMAL)));
     612                            exit;
     613                        }
    611614                        else echo 'error';
    612615                    } catch(Exception $e){
     
    664667                    }
    665668
    666                     $payment = $ids;
    667669                    $prices = round($prices, RESERVATIONS_DECIMAL);
    668670
     
    675677
    676678                    if(function_exists('easyreservations_generate_payment_form') && $atts['payment'] > 0){
    677                         $final_form .= easyreservations_generate_payment_form($payment, $prices, ($atts['payment'] == 2) ? true : false, (is_numeric($atts['discount']) && $atts['discount'] < 100) ? $atts['discount'] : false);
     679                        $final_form .= easyreservations_generate_payment_form($ids, $prices, ($atts['payment'] == 2) ? true : false, (is_numeric($atts['discount']) && $atts['discount'] < 100) ? $atts['discount'] : false);
    678680                    }
    679681
  • easyreservations/trunk/lib/class-er-reservation.php

    r1959903 r1975439  
    986986                    date(RESERVATIONS_DATE_FORMAT_SHOW, $this->arrival)
    987987                );
    988             } elseif( $req['start-on'] !== 0 && !in_array(date("N", $this->arrival), $req['start-on'])){
     988            } elseif( !empty($req['start-on']) && !in_array(date("N", $this->arrival), $req['start-on'])){
    989989                $errors[] = 'easy-form-from';
    990990                $start_days = '';
     
    999999                $errors[] = 'easy-form-to';
    10001000                $errors[] = sprintf(__('Departure not possible on %s', 'easyReservations'), date(RESERVATIONS_DATE_FORMAT_SHOW, $this->departure));
    1001             } elseif( $req['end-on'] !== 0 && !in_array(date("N", $this->departure), $req['end-on'])){
     1001            } elseif( !empty($req['end-on']) && !in_array(date("N", $this->departure), $req['end-on'])){
    10021002                $errors[] = 'easy-form-to';
    10031003                $end_days = '';
     
    12491249        if(is_array($data) && !empty($data)){
    12501250            $array = array();
    1251             if($data[0] == 'all') $data = array('name', 'email', 'arrival', 'departure', 'resource', 'space', 'adults', 'children', 'country', 'approve', 'reserved', 'user', 'price', 'paid');
     1251            if($data[0] == 'all') $data = array('name', 'email', 'arrival', 'departure', 'resource', 'space', 'adults', 'children', 'country', 'status', 'reserved', 'user', 'price', 'paid');
    12521252            foreach($data as $key){
    12531253                if(isset($this->$key)) $array[$key] = $this->$key;
     
    13641364        $return = $wpdb->insert( $wpdb->prefix.'reservations', $rarray);
    13651365        if(!$return){
     1366            var_dump($wpdb->print_error());
    13661367            throw new easyException( 'Reservation could not be added. Error: '.$wpdb->last_error );
    13671368            return true;
  • easyreservations/trunk/lib/core/core.php

    r1965260 r1975439  
    129129                    'content' => 'Style your emails with HTML to increase the appearance of your hospitality.',
    130130                    'function' => 'easyreservations_send_multipart_mail',
    131                     'least' => '1.1.12',
    132                     'vers' => '1.1.13',
     131                    'least' => '1.1.14',
     132                    'vers' => '1.1.14',
    133133                    'image' => 'envelope',
    134134                ),
     
    180180                    'content' => 'Synchronize your resources availability with unlimited portals and calendars through iCalendar feeds. Includes function to add reservations to the shopping card of WooCommerce.',
    181181                    'function' => 'easyreservations_sync_add_rewrite_rule',
    182                     'least' => '2.0.2',
    183                     'vers' => '2.0.2',
     182                    'least' => '2.0.3',
     183                    'vers' => '2.0.3',
    184184                    'image' => 'refresh',
    185185                ),
     
    216216                    'content' => 'Lets your guests login to edit their reservations. They can switch between their reservations in a table. In addition it provides a chat-like feature. New messages in table, dummy message at start, admin notices, avatars and fully AJAX driven. The guest can see his invoice and cancel his reservation.',
    217217                    'function' => 'easyreservations_generate_chat',
    218                     'least' => '1.3.11',
    219                     'vers' => '1.3.11',
     218                    'least' => '1.3.12',
     219                    'vers' => '1.3.12',
    220220                    'image' => 'user',
    221221                ),
  • easyreservations/trunk/lib/er-reservation-functions.php

    r1959903 r1975439  
    104104            return $content;
    105105            break;
     106        case 'customs':
     107            $content = '';
     108            $custom_fields = get_option('reservations_custom_fields');
     109            $customs = $res->get_meta('custom');
     110            foreach($customs as $custom){
     111                if(isset($custom_fields['fields'][$custom['id']])){
     112                    $content .= $custom_fields['fields'][$custom['id']]['title'].': ';
     113                    $content .= $res->getCustomsValue($custom);
     114                    if(isset($custom_field['price'])){
     115                        $content .= ' ('.er_format_money($res->calculateCustom( $tag['id'], $custom['value'], $customs),1).')';
     116                    }
     117                    $content .= '<br>';
     118                }
     119            }
     120            return $content;
     121            break;
    106122    }
    107123    return '';
  • easyreservations/trunk/lib/functions/admin.php

    r1959903 r1975439  
    521521            $custom_add .= '<tbody><tr><td class="content">';
    522522            $custom_add .= '<span class="together-wrapper" style="width:95%">';
    523             $custom_add .= '<span class="select" style="width:200px"><select id="custom_add_select" class="first">'.$options.'</select></span>';
     523            $custom_add .= '<span class="select" style="width:200px"><select id="custom_add_select" class="first" style="width:100%">'.$options.'</select></span>';
    524524            $custom_add .= '<input type="button" id="custom_add_field" class="easy-button grey last" value="'.__('Add', 'easyReservations').'">';
    525525            $custom_add .= '</span>';
  • easyreservations/trunk/readme.txt

    r1965850 r1975439  
    44Requires at least: 3.3
    55Tested up to: 4.9.8
    6 Stable tag: 5.0.7
     6Stable tag: 5.0.8
    77
    88This powerful property and reservation management plugin allows you to receive, schedule and handle your bookings easily!
  • easyreservations/trunk/templates/date-selection.php

    r1959903 r1975439  
    4949</div>
    5050<div id="easy-form-from"></div>
     51<div id="easy-form-to"></div>
Note: See TracChangeset for help on using the changeset viewer.