Changeset 1975439
- Timestamp:
- 11/16/2018 11:19:15 AM (7 years ago)
- Location:
- easyreservations/trunk
- Files:
-
- 18 edited
-
assets/js/ajax/data.js (modified) (1 diff)
-
assets/js/ajax/form.js (modified) (8 diffs)
-
assets/js/ajax/send_validate.js (modified) (1 diff)
-
assets/js/date-selection.js (modified) (2 diffs)
-
changelog.html (modified) (1 diff)
-
easyReservations.php (modified) (1 diff)
-
lib/admin/class-er-admin-resources.php (modified) (1 diff)
-
lib/admin/dashboard.php (modified) (2 diffs)
-
lib/admin/views/html-admin-resource-header.php (modified) (1 diff)
-
lib/admin/views/html-admin-settings-about.php (modified) (1 diff)
-
lib/class-easyreservations.php (modified) (2 diffs)
-
lib/class-er-ajax.php (modified) (4 diffs)
-
lib/class-er-reservation.php (modified) (4 diffs)
-
lib/core/core.php (modified) (3 diffs)
-
lib/er-reservation-functions.php (modified) (1 diff)
-
lib/functions/admin.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
templates/date-selection.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
easyreservations/trunk/assets/js/ajax/data.js
r1959903 r1975439 2 2 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 = ''; 3 3 4 console.log(form);5 4 if(jQuery('#'+form+' input[name="from"]').length > 0){ 6 5 var from = jQuery('#'+form+' input[name="from"]').val(); -
easyreservations/trunk/assets/js/ajax/form.js
r1959903 r1975439 57 57 var theprices = easyReservationsPrice; 58 58 if(add){ 59 if(window.easyLastPrice && window.easyLastPrice > 0) var easyLastPrice = window.easyLastPrice;59 if(window.easyLastPrice && window.easyLastPrice > 0) var easyLastPrice = window.easyLastPrice; 60 60 else var easyLastPrice = 0; 61 61 if(!easyReservationEdit){ … … 64 64 jQuery('#easyFrontendFormular *[disabled="disabled"]').attr('disabled', false).attr('temp', 'disabled'); 65 65 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 } 67 69 }); 68 70 jQuery('#easyFrontendFormular *[temp="disabled"]').attr('disabled', 'disabled').attr('temp', false); … … 74 76 for(i in thedatas){ 75 77 var datas = thedatas[i]; 78 if(typeof(thedatas[i]) == 'string') datas = easyUnserialize(thedatas[i]); 76 79 if(datas && datas['resource']){ 77 if(typeof(thedatas[i]) == 'string') datas = easyUnserialize(thedatas[i]);78 80 if(i == thedatas.length-1) reservations += '<tr class="active">'; 79 81 else reservations += '<tr>'; … … 116 118 var onclicke = 'easyEdit('+i+',true);'; 117 119 } 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>'; 119 121 reservations+='</tr>'; 120 122 } … … 208 210 function easyEdit(i,dimm){ 209 211 if(dimm && dimm !== false){ 210 if(!easyLastPrice) var easyLastPrice = 0; 212 var easyLastPrice = 0; 213 if(window.easyLastPrice && window.easyLastPrice > 0) easyLastPrice = window.easyLastPrice; 211 214 easyReservationDatas.push(jQuery('#easyFrontendFormular').serialize()); 212 215 easyReservationsPrice.push(easyLastPrice); … … 215 218 var data = easyReservationDatas[i]; 216 219 if(data){ 217 data = easyUnserialize(data);220 if(typeof(data) == 'string') data = easyUnserialize(data); 218 221 jQuery.each(data, function (name,value) { 219 222 jQuery("input[name='"+name+"'],select[name='"+name+"']").each(function() { … … 232 235 case "select": 233 236 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; 235 238 }); 236 239 break; … … 238 241 }); 239 242 }); 240 if(dimm) easyOverlayDimm(1); 243 if(dimm) easyOverlayDimm(1); 244 jQuery('#easyFrontendFormular').find('*[name=resource]').trigger('change'); 241 245 } else alert('Error #3243 - please report in forum.'); 242 246 } -
easyreservations/trunk/assets/js/ajax/send_validate.js
r1959903 r1975439 35 35 }); 36 36 37 jQuery("#easy-show-error-div").addClass('hid den');37 jQuery("#easy-show-error-div").addClass('hide'); 38 38 jQuery("[id^='easy-form-'],[id^='easy-custom-'],[id^='easy-new-custom-']").removeClass('form-error'); 39 39 jQuery(".error-wrapper + .ui-effects-wrapper, .error-wrapper, .ui-effects-wrapper").remove(); -
easyreservations/trunk/assets/js/date-selection.js
r1964306 r1975439 315 315 beforeShowDay: checkData, 316 316 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 } 318 320 e.find('div.time').slideUp(300); 319 321 if(arrival){ … … 390 392 e.find('input[name=date-from-min]').val(minute); 391 393 392 if( settings.departure){394 if(!settings.departure){ 393 395 e.find('.departure .text .date').addClass('important').html(easy_date_selection_params.wait); 394 396 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> 1 46 <h2>easyReservations 5.0.4 - 5.0.7 - 30.10.2018</h2> 2 47 <ul> -
easyreservations/trunk/easyReservations.php
r1965850 r1975439 4 4 Plugin URI: http://www.easyreservations.org 5 5 Description: This powerful property and reservation management plugin allows you to receive, schedule and handle your bookings easily! 6 Version: 5.0. 76 Version: 5.0.8 7 7 Author: Feryaz Beer 8 8 Author URI: http://www.feryaz.de -
easyreservations/trunk/lib/admin/class-er-admin-resources.php
r1959903 r1975439 94 94 $all_filter[ $key ] = $filter; 95 95 } 96 } else { 97 $all_filter = array(); 96 98 } 97 99 -
easyreservations/trunk/lib/admin/dashboard.php
r1959903 r1975439 264 264 elseif(isset($delete)) $theid = $delete; 265 265 266 if(!isset($res))$res = new ER_Reservation($theid);266 $res = new ER_Reservation($theid); 267 267 try { 268 268 $res->checkAvailability(2); … … 314 314 315 315 $return = $the_reservation->editReservation(array('status', 'paid', 'space'), true, $emailformation, $the_reservation->email); 316 $return = 'bla';317 316 318 317 if(!$return){ -
easyreservations/trunk/lib/admin/views/html-admin-resource-header.php
r1965850 r1975439 43 43 <script> 44 44 jQuery(document).ready(function($) { 45 console.log(132);46 45 $('.resource-navigation').easyNavigation({value: 'settings', hash: true}); 47 46 easyUiTooltip(); -
easyreservations/trunk/lib/admin/views/html-admin-settings-about.php
r1965260 r1975439 11 11 <tbody> 12 12 <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> 14 14 </tr> 15 15 <tr class="alternate"> -
easyreservations/trunk/lib/class-easyreservations.php
r1965850 r1975439 8 8 final class easyReservations { 9 9 //Current Version of easyReservations 10 public $version = '5.0. 7';10 public $version = '5.0.8'; 11 11 12 12 //Current Database Version of easyReservations … … 40 40 $reservations_settings = get_option( "reservations_settings" ); 41 41 42 define( 'RESERVATIONS_VERSION', '5.0. 7' );42 define( 'RESERVATIONS_VERSION', '5.0.8' ); 43 43 define( 'RESERVATIONS_ABSPATH', dirname( RESERVATIONS_PLUGIN_FILE ) . '/' ); 44 44 define( 'RESERVATIONS_URL', WP_PLUGIN_URL . '/easyreservations/' ); -
easyreservations/trunk/lib/class-er-ajax.php
r1959903 r1975439 547 547 $arrivalplus = 0; 548 548 if(isset($_POST['date-from-hour'])) $arrivalplus += (int) $_POST['date-from-hour'] * 60; 549 else $arrivalplus += 12*60;549 else $arrivalplus += 0; 550 550 if(isset($_POST['date-from-min'])) $arrivalplus += (int) $_POST['date-from-min']; 551 551 if($arrivalplus > 0) $arrivalplus = $arrivalplus * 60; … … 608 608 609 609 $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 } 611 614 else echo 'error'; 612 615 } catch(Exception $e){ … … 664 667 } 665 668 666 $payment = $ids;667 669 $prices = round($prices, RESERVATIONS_DECIMAL); 668 670 … … 675 677 676 678 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); 678 680 } 679 681 -
easyreservations/trunk/lib/class-er-reservation.php
r1959903 r1975439 986 986 date(RESERVATIONS_DATE_FORMAT_SHOW, $this->arrival) 987 987 ); 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'])){ 989 989 $errors[] = 'easy-form-from'; 990 990 $start_days = ''; … … 999 999 $errors[] = 'easy-form-to'; 1000 1000 $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'])){ 1002 1002 $errors[] = 'easy-form-to'; 1003 1003 $end_days = ''; … … 1249 1249 if(is_array($data) && !empty($data)){ 1250 1250 $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'); 1252 1252 foreach($data as $key){ 1253 1253 if(isset($this->$key)) $array[$key] = $this->$key; … … 1364 1364 $return = $wpdb->insert( $wpdb->prefix.'reservations', $rarray); 1365 1365 if(!$return){ 1366 var_dump($wpdb->print_error()); 1366 1367 throw new easyException( 'Reservation could not be added. Error: '.$wpdb->last_error ); 1367 1368 return true; -
easyreservations/trunk/lib/core/core.php
r1965260 r1975439 129 129 'content' => 'Style your emails with HTML to increase the appearance of your hospitality.', 130 130 'function' => 'easyreservations_send_multipart_mail', 131 'least' => '1.1.1 2',132 'vers' => '1.1.1 3',131 'least' => '1.1.14', 132 'vers' => '1.1.14', 133 133 'image' => 'envelope', 134 134 ), … … 180 180 'content' => 'Synchronize your resources availability with unlimited portals and calendars through iCalendar feeds. Includes function to add reservations to the shopping card of WooCommerce.', 181 181 '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', 184 184 'image' => 'refresh', 185 185 ), … … 216 216 '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.', 217 217 'function' => 'easyreservations_generate_chat', 218 'least' => '1.3.1 1',219 'vers' => '1.3.1 1',218 'least' => '1.3.12', 219 'vers' => '1.3.12', 220 220 'image' => 'user', 221 221 ), -
easyreservations/trunk/lib/er-reservation-functions.php
r1959903 r1975439 104 104 return $content; 105 105 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; 106 122 } 107 123 return ''; -
easyreservations/trunk/lib/functions/admin.php
r1959903 r1975439 521 521 $custom_add .= '<tbody><tr><td class="content">'; 522 522 $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>'; 524 524 $custom_add .= '<input type="button" id="custom_add_field" class="easy-button grey last" value="'.__('Add', 'easyReservations').'">'; 525 525 $custom_add .= '</span>'; -
easyreservations/trunk/readme.txt
r1965850 r1975439 4 4 Requires at least: 3.3 5 5 Tested up to: 4.9.8 6 Stable tag: 5.0. 76 Stable tag: 5.0.8 7 7 8 8 This powerful property and reservation management plugin allows you to receive, schedule and handle your bookings easily! -
easyreservations/trunk/templates/date-selection.php
r1959903 r1975439 49 49 </div> 50 50 <div id="easy-form-from"></div> 51 <div id="easy-form-to"></div>
Note: See TracChangeset
for help on using the changeset viewer.