diff --git a/CHANGELOG_JOMRES b/CHANGELOG_JOMRES index 39ccdfe93d..c82b222804 100644 --- a/CHANGELOG_JOMRES +++ b/CHANGELOG_JOMRES @@ -1,3 +1,83 @@ +

Jomres 10.7.0 25/05/2023

+ +Feature Lots of changes related to overrides in this version. A lot of scripts can be overridden by dropping a copy of the script into the template or theme directory, /html/com_jomres/custom_code sub directory. + + Function overrides. Create a file called custom_functions.php and copy functions from the varies function files in /jomres/libraries/jomres/functions into this file to have custom Jomres functions. + Class overrides. Copy the class file into the custom_code directory and Jomres will automatically use that. + Map styles overrides. To customise map styles create a file custom_map_style.style into the custom_code dir. + Custom Jquery UI css file. Create a file called custom_jquery_ui.css in the custom_code directory and Jomres will use that. Due to when it's called Jquery UI css declarations here will override the defaults. + Joomla only : Custom copy of components/com_jomres/router/router.php can be put into the custom_code directory and Jomres will use that instead of the default. + Customised versions of /jomres/assets/css and /jomres/assets/javascript files can be put into custom_code directory and Jomres will use those instead of the default. + Property Specific Minicomponents. In the override directory you can create subdirectories numbered according to property type IDs. Now you can put copies of minicomponents in those directories and if the property type being shown is of that type then the customised version of that minicomponent will be used. Previously you could use this feature for template files, and it has now been extended to support minicomponents too. + +NB: If you're already an experienced Jomres user, note that the custom_code directory referenced here is different to the one you're used to. Look in the Developer's and Designer's guide in the Documentation section of Jomres.net and find the Read This First section for more information. + +Feature Reviewed and reworked the old property specific language strings feature called Language Context. Also added the ability for urls and shortcodes to set the language context. + +In the Translate Language file strings page you will see a new dropdown called Language Context. When you change this dropdown the page will reload. Now any changes you make to language strings will be specific to that property type. To find the correct language context for a property type visit the administrator > Jomres > Settings > Property types page. The contexts are shown in the table. + +A use case example : + +In the Translate lang file strings page change the Language Context dropdown to Camp Site. Now search the page for _JOMRES_SEARCH_BUTTON. Under that line you will see the string "Search". Change that string to "Find a camp site". Now you can create a Search Form Elements custom module with the shortcode {jomres search_form_button &language_context=campsite} and now the text for the button will change to "Find a camp site". + +Another use case : + +Search the translate lang file strings page for _JOMRES_COM_MR_QUICKRES_STEP2_TITLE. The row below it shows "Our rooms". Again, change the language context at the top of the page to Camp site. Now search for _JOMRES_COM_MR_QUICKRES_STEP2_TITLE again. Change the row below it from "Our Rooms" to "Our pitches". Now when somebody views the property details page of a camp site type property, instead of saying "Our rooms" it will say "Our pitches". + +In previous versions of Jomres this feature used alternate language files to achieve the same thing. This new feature is much more flexible and allows you to change the language context via shortcode arguments, allowing you to have different strings in shortcodes without needing to change any files. As always the changes are saved to the database so they are update-safe. + +Feature Added a new Property type setting that sets a property type to be an Item Hire property type. This will automatically disable showing selection of guest numbers in the booking form, and a few property config settings. Properties set with this setting are essentially MRPs. To prevent us being burdened with significant more template files, some templates will still refer to guest numbers so they'll need to be copied and placed in property type specific override directories. +Feature Added Animation Library for animating display of properties. +Feature Managers can now switch between Micromanage and Advanced. Advanced wasn't available in 10.6, but brought it back in to 10.7 as it still has it's uses. +Feature Added setting which allows property managers to determine if the number of children can be used when checking the number of guests in a booking v the number of selected rooms. +Feature When an oauth client is now created, if a valid token doesn't exist we'll automatically create one for them, then redirect back to the edit client page. Quality of life improvement. +Feature If per person per night is not true (i.e. the property/rooms is/are booked per night instead) then child rates are not prompted for, and child prices aren't calculated. Likewise, prices aren't shown for children, but children can still be added to the booking if child rates are added to the booking. You can leave the rate set to zero to just record the ages of the children without charging for them. +Feature Added a new local tokens class, allows a plugin or core system to create tokens for the rest api for a specific purpose. This token is then stored in the user's parameters which can then be used elsewhere by the plugin's scripts to use the local rest api without needing the user to generate client id/secret and token themselves. +Feature Changed occupancy levels adults dropdown so that the dropdown maximum adults is set to whatever the highest max adults from all tariffs can be. +Feature Added 4 new scripts + corresponding template files, which are called before and after search results and property details scripts are run. In Core they don't do anything, but they provide a unified mechanism by which plugins can add elements like columns/widgets etc to wrap search results and the property details page. The new "Search Composite Sidebar" plugin uses this to add a search form to the side of the search results page. + +Change Weekly percentages widget updated (BS5 only). +Change Reworked property details in BS5. Header area, image is now parallax and full width of available space (in Cassiopeia there's still some margin, even with the template style set to fluid, not static.). Other layout related tweaks and improvements. +Change Removed container class div from top.html & bottom.html. Where the theme/template allows, then content can be full width. Moved the container instead to wrap the menu position div. +Change Added a new disable_main_menu script that the main menu will obey, if it has been run then the menu will not be shown anywhere in the page. This allows us to use a simple shortcode {jomres_script disable_main_menu} in any Jomres template and we can disable the menu only on those pages that the template has been rendered. +Change Added new arguments to show_main_menu that can be used to set which div id the menu should be moved into once rendered. In BS5 and greater, the bottom.html template will trigger the menu, instead of it being triggered in jomres.php. +Change Booking Confirmation page markup improved, some wording changed for clarity. +Change Add a handful of BRs to the bottom of the page so that sticky Save buttons don't hide bits of the page. +Change Enabled/disabled a couple of settings based on an upcoming new "secret" setting that allows some sites to revert to the old guest types if required. +Change Core app key management checks for local tokens array and excludes any api keys from display in the app key management page. +Change Old management view button that used BS2 for fullscreen viewing is now ditched by default, I don't feel it's necessary any more. Managers can re-enable the button, if they wish, by editing Jomres' configuration.php and adding the line demonstrated in site_config.php however I believe that it interferes with the rest of the Jomres UI in J4/BS5 to no strong benefit. +Change Added a function to determine the relative path to a file when handed it's full path. Primarily used for overriding css and javascript files. +Change Per person per night setting moved from Tariffs into Bookings tab of Property Configuration. +Change Generate date input now can accept an array of options. Currently uses this array to disable the calendar fontawesome icon. You can also use a j00001 script to configure which classes the jquery ui datepicker should use. +Change Modified Core so that it can use the autocomplete feature. +Change Unselected heart for shortlists changed to grey so works better in cassiopeia. +Change Add an automatic test that will check to see if the system is api capable. If it is, we'll install the CMF Features and Framework plugins automatically. +Change Search by stars modified so that searching is done based on array of stars, not a single variable (like you would get from a dropdown). This allows Core searching to use the Stars rows previously found in Ajax search composite (ASC uses it's own search feature so should be unaffected by this change). +Change If the image size of slideshow is set to large, we'll allow the "thumbnails" to be large too. With the full adoption of lazy loading, having large thumbs by default assures high quality images to be visible from the outset. BS5 carousel plugin however hides larger images on small viewports so that plugin remains recommended if you're using BS5. +Change Wordpress : Change how we detect the root directory and trigger the installation location, try our damnedest to install in /jomres not the plugin dir where possible. +Change Modified new functionality that imports language strings from language definitions. Older functionality was attempting to match vuejs code like {{ message }} which was unwanted behaviour. This change checks to see if the matched string is all in uppercase. If it is, then it can attempt to import the language strings. +Change On installation, ensure that the default tariff editing mode is 3 (Micromanage) for new properties. +Change Update existing sites so that default tariff editing mode is 3 (micromanage). Existing properties keep their current tariff editing mode, however once they change to Micromanage/Advanced they can't then change back. +Change Added property switcher to BS3 top.html +Change Croatian currency code changed to euro. +Change Dynamically adjust minimum interval in the booking engine if possible. +Change Set the departure date to be the arrival date + whatever the calculated min interval was found to be. +Change Prevent a new google map message about callbacks by adding &callback=Function.prototype to the api url used. +Change Change the gmaps version to suppress a console warning. +Change Allow Joomla 4 sites to change the Bootstrap setting because upgraded sites may still have the old setting which needs to be changed. +Change Minor tweak to make BS3 payment gateway images responsive. +Change Accepting children is off by default in new properties. +Change Improved show rooms and show room template markup +Change Don't show list properties page if site is set to single property only. +Change Add a new script to show the property schema independently. + +Fix Resolved an issue where database re-import of images would misbehave. One of those "Weird, that's been working fine for years, and now it's not?" bugs. +Fix Set max height of uploaded image to 150px (mainly so that the no-image svg doesn't appear too large). Media centre. +Fix Main menu navbar toggler fixed. +Fix Improved address url for qr codes +Fix Make sure that the Stripe logo is included correctly by the payment methods class. + +

Jomres 10.6.0 08/11/2022

Feature Property switching dropdown re-added to Jomres, and significantly updated. This allows us to switch properties quickly when administering properties. This is a useful older feature that has been reintroduced and updated to be context sensitive. diff --git a/README.md b/README.md index 1784ec69ae..5eb6e3fb9d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +![](https://img.shields.io/badge/Coded%20By%20Human-100%25-brightgreen) + # Jomres Core - Online Booking Engine for WordPress and Joomla Jomres is the only Joomla & WordPress Online Booking engine with PMS features and built-in REST API. diff --git a/admin.php b/admin.php index c088a3dce5..1166d888f4 100644 --- a/admin.php +++ b/admin.php @@ -4,9 +4,9 @@ * * @author Vince Wooll * - * @version Jomres 10.6.0 + * @version Jomres 10.7.0 * - * @copyright 2005-2022 Vince Wooll + * @copyright 2005-2023 Vince Wooll * Jomres (tm) PHP, CSS & Javascript files are released under both MIT and GPL2 licenses. This means that you can choose the license that best suits your project, and use it accordingly **/ @@ -41,6 +41,10 @@ request_log(); } + jr_import('jomres_api_capability_test'); + $jomres_api_capability_test = new jomres_api_capability_test(); + $jomres_api_capability_test->is_system_capable(); + //get all properties in system. $jomres_properties = jomres_singleton_abstract::getInstance('jomres_properties'); $jomres_properties->get_all_properties(); diff --git a/api/classes/all_api_features.class.php b/api/classes/all_api_features.class.php index 2dbfdd9d30..8d371dd2f6 100644 --- a/api/classes/all_api_features.class.php +++ b/api/classes/all_api_features.class.php @@ -9,9 +9,9 @@ * * @author Vince Wooll * - * @version Jomres 10.6.0 + * @version Jomres 10.7.0 * - * @copyright 2005-2022 Vince Wooll + * @copyright 2005-2023 Vince Wooll * Jomres (tm) PHP, CSS & Javascript files are released under both MIT and GPL2 licenses. This means that you can choose the license that best suits your project, and use it accordingly */ diff --git a/api/classes/call.class.php b/api/classes/call.class.php index 65cafe43b1..91d54e3b16 100644 --- a/api/classes/call.class.php +++ b/api/classes/call.class.php @@ -9,9 +9,9 @@ * * @author Vince Wooll * - * @version Jomres 10.6.0 + * @version Jomres 10.7.0 * - * @copyright 2005-2022 Vince Wooll + * @copyright 2005-2023 Vince Wooll * Jomres (tm) PHP, CSS & Javascript files are released under both MIT and GPL2 licenses. This means that you can choose the license that best suits your project, and use it accordingly **/ diff --git a/api/classes/call_self.class.php b/api/classes/call_self.class.php index a5e6d6887b..eb087947f7 100755 --- a/api/classes/call_self.class.php +++ b/api/classes/call_self.class.php @@ -7,9 +7,9 @@ * * @author Vince Wooll * - * @version Jomres 10.6.0 + * @version Jomres 10.7.0 * - * @copyright 2005-2022 Vince Wooll + * @copyright 2005-2023 Vince Wooll * Jomres (tm) PHP, CSS & Javascript files are released under both MIT and GPL2 licenses. This means that you can choose the license that best suits your project, and use it accordingly */ @@ -57,7 +57,7 @@ public function call($elements = array()) if (!isset($elements['headers'])) { $elements['headers'] = array(); } - + $response = new stdClass(); try { $response = $this->jomres_call_api->send_request( $elements['method'] , $elements['request'] , $elements['data'] , $elements['headers']); } diff --git a/api/classes/logging.class.php b/api/classes/logging.class.php index 4c4c909f0b..94f37ee781 100644 --- a/api/classes/logging.class.php +++ b/api/classes/logging.class.php @@ -5,9 +5,9 @@ * * @author Vince Wooll * - * @version Jomres 10.6.0 + * @version Jomres 10.7.0 * - * @copyright 2005-2022 Vince Wooll + * @copyright 2005-2023 Vince Wooll * Jomres (tm) PHP, CSS & Javascript files are released under both MIT and GPL2 licenses. This means that you can choose the license that best suits your project, and use it accordingly **/ use Monolog\Logger; diff --git a/api/classes/validate_property_access.class.php b/api/classes/validate_property_access.class.php index da0b9ee46a..29394d28a2 100644 --- a/api/classes/validate_property_access.class.php +++ b/api/classes/validate_property_access.class.php @@ -6,9 +6,9 @@ * * @author Vince Wooll * - * @version Jomres 10.6.0 + * @version Jomres 10.7.0 * - * @copyright 2005-2022 Vince Wooll + * @copyright 2005-2023 Vince Wooll * Jomres (tm) PHP, CSS & Javascript files are released under both MIT and GPL2 licenses. This means that you can choose the license that best suits your project, and use it accordingly **/ diff --git a/api/classes/validate_scope.class.php b/api/classes/validate_scope.class.php index c30c07c8f5..09093e3e58 100644 --- a/api/classes/validate_scope.class.php +++ b/api/classes/validate_scope.class.php @@ -5,9 +5,9 @@ * * @author Vince Wooll * - * @version Jomres 10.6.0 + * @version Jomres 10.7.0 * - * @copyright 2005-2022 Vince Wooll + * @copyright 2005-2023 Vince Wooll * Jomres (tm) PHP, CSS & Javascript files are released under both MIT and GPL2 licenses. This means that you can choose the license that best suits your project, and use it accordingly **/ diff --git a/api/custom_methods.php b/api/custom_methods.php index 9322e0aab9..b4e2b6ad68 100644 --- a/api/custom_methods.php +++ b/api/custom_methods.php @@ -6,9 +6,9 @@ * * @author Vince Wooll * - * @version Jomres 10.6.0 + * @version Jomres 10.7.0 * - * @copyright 2005-2022 Vince Wooll + * @copyright 2005-2023 Vince Wooll * Jomres (tm) PHP, CSS & Javascript files are released under both MIT and GPL2 licenses. This means that you can choose the license that best suits your project, and use it accordingly. */ diff --git a/api/index.php b/api/index.php index 96f636a578..1a0437a36f 100644 --- a/api/index.php +++ b/api/index.php @@ -8,9 +8,9 @@ * * @author Vince Wooll * - * @version Jomres 10.6.0 + * @version Jomres 10.7.0 * - * @copyright 2005-2022 Vince Wooll + * @copyright 2005-2023 Vince Wooll * * * Jomres (tm) PHP, CSS & Javascript files are released under both MIT and GPL2 licenses. This means that you can choose the license that best suits your project, and use it accordingly @@ -52,6 +52,28 @@ require_once(JOMRES_API_JOMRES_ROOT.DIRECTORY_SEPARATOR.'configuration.php'); +if (is_dir(JOMRES_API_CMS_ROOT.DIRECTORY_SEPARATOR.'wp-content'.DIRECTORY_SEPARATOR.'themes')) { + $templates_dir = JOMRES_API_CMS_ROOT.DIRECTORY_SEPARATOR.'wp-content'.DIRECTORY_SEPARATOR.'themes'; +} else { + $templates_dir = JOMRES_API_CMS_ROOT.DIRECTORY_SEPARATOR.'templates'; +} + +// We will try to find the template override directory. Because we can't call the CMS (for performance reasons) we'll have to do this the hard way. Disadvantage is that the overriding developer must ensure that there's only one instance of $target_pattern in the entire site, otherwise we'll get the wrong path. That's why the similar function in load_custom_functions goes to great lengths to call the CMS whever possible. +$rii = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($templates_dir)); + +$target_pattern = '/html/com_jomres/'; + +foreach ($rii as $file) { + if ($file->isDir()){ + $path = $file->getPathname(); + if (strstr($path, $target_pattern)) { + define('JOMRES_OVERRIDE_PATH',substr($path,0,-2)); + break; + } + } +} + + if ($jrConfig['development_production'] == 'development') { define('PRODUCTION', false); } else { @@ -90,7 +112,7 @@ $pop = explode('?', $bang[1]); $route = $pop[0]; } else { - $route = filter_var($bang[1], FILTER_SANITIZE_STRING); + $route = filter_var($bang[1], FILTER_SANITIZE_FULL_SPECIAL_CHARS); } // @@ -210,7 +232,7 @@ } if (!PRODUCTION) { - Flight::set('flight.handle_errors', false); + Flight::set('flight.handle_errors', true); } Flight::set('user_id', $token['user_id']); Flight::set('scopes', explode(',', $token['scope'])); @@ -231,7 +253,7 @@ $response .= "The exception was created in file: " . $e->getFile(); $response .= "The exception was created on line: " . $e->getLine(); } - + } else { $response = Flight::request_response(); diff --git a/api/language/en-GB.php b/api/language/en-GB.php index f6f41ba493..3aaa2f519d 100644 --- a/api/language/en-GB.php +++ b/api/language/en-GB.php @@ -4,9 +4,9 @@ * * @author Vince Wooll * - * @version Jomres 10.6.0 + * @version Jomres 10.7.0 * - * @copyright 2005-2022 Vince Wooll + * @copyright 2005-2023 Vince Wooll * Jomres (tm) PHP, CSS & Javascript files are released under both MIT and GPL2 licenses. This means that you can choose the license that best suits your project, and use it accordingly **/ define('RESPONSE', ''); diff --git a/api/oauth/OAuth2/Server.php b/api/oauth/OAuth2/Server.php index 6f1960d761..81754c9169 100644 --- a/api/oauth/OAuth2/Server.php +++ b/api/oauth/OAuth2/Server.php @@ -566,7 +566,7 @@ protected function createDefaultAuthorizeController() if (!isset($this->storages['client'])) { throw new \LogicException('You must supply a storage object implementing \OAuth2\Storage\ClientInterface to use the authorize server'); } - if (0 == count($this->responseTypes)) { + if (!is_array($this->responseTypes) || 0 == count($this->responseTypes)) { $this->responseTypes = $this->getDefaultResponseTypes(); } if ($this->config['use_openid_connect'] && !isset($this->responseTypes['id_token'])) { diff --git a/api/oauth/OAuth2/TokenType/Bearer.php b/api/oauth/OAuth2/TokenType/Bearer.php index ffe0867e0b..02e4998f99 100644 --- a/api/oauth/OAuth2/TokenType/Bearer.php +++ b/api/oauth/OAuth2/TokenType/Bearer.php @@ -93,15 +93,15 @@ public function getAccessTokenParameter(RequestInterface $request, ResponseInter } // HEADER: Get the access token from the header - if (!empty($headers)) { - if (!preg_match('/' . $this->config['token_bearer_header_name'] . '\s(\S+)/i', $headers, $matches)) { - $response->setError(400, 'invalid_request', 'Malformed auth header'); + if (!empty($headers)) { + if (!preg_match('/' . $this->config['token_bearer_header_name'] . '\s(\S+)/i', $headers, $matches)) { + $response->setError(400, 'invalid_request', 'Malformed auth header'); - return null; - } + return null; + } - return $matches[1]; - } + return $matches[1]; + } if ($request->request($this->config['token_param_name'])) { // // POST: Get the token from POST data @@ -112,7 +112,7 @@ public function getAccessTokenParameter(RequestInterface $request, ResponseInter } $contentType = $request->server('CONTENT_TYPE'); - if (false !== $pos = strpos($contentType, ';')) { + if (false !== $pos = strpos((string) $contentType, ';')) { $contentType = substr($contentType, 0, $pos); } diff --git a/api/oauth/inc_configs.php b/api/oauth/inc_configs.php index 6e64928408..954de06fe0 100644 --- a/api/oauth/inc_configs.php +++ b/api/oauth/inc_configs.php @@ -7,9 +7,9 @@ * * @author Vince Wooll * - * @version Jomres 10.6.0 + * @version Jomres 10.7.0 * - * @copyright 2005-2022 Vince Wooll + * @copyright 2005-2023 Vince Wooll * Jomres (tm) PHP, CSS & Javascript files are released under both MIT and GPL2 licenses. This means that you can choose the license that best suits your project, and use it accordingly */ diff --git a/api/oauth/resource.php b/api/oauth/resource.php index 4e84b35175..5fc5e4bc43 100644 --- a/api/oauth/resource.php +++ b/api/oauth/resource.php @@ -7,9 +7,9 @@ * * @author Vince Wooll * - * @version Jomres 10.6.0 + * @version Jomres 10.7.0 * - * @copyright 2005-2022 Vince Wooll + * @copyright 2005-2023 Vince Wooll * Jomres (tm) PHP, CSS & Javascript files are released under both MIT and GPL2 licenses. This means that you can choose the license that best suits your project, and use it accordingly */ diff --git a/api/oauth/server.php b/api/oauth/server.php index b26f7f2a45..6ec922a572 100644 --- a/api/oauth/server.php +++ b/api/oauth/server.php @@ -7,9 +7,9 @@ * * @author Vince Wooll * - * @version Jomres 10.6.0 + * @version Jomres 10.7.0 * - * @copyright 2005-2022 Vince Wooll + * @copyright 2005-2023 Vince Wooll * Jomres (tm) PHP, CSS & Javascript files are released under both MIT and GPL2 licenses. This means that you can choose the license that best suits your project, and use it accordingly */ diff --git a/api/oauth/token.php b/api/oauth/token.php index 1b2acaa0d7..6487789cd7 100644 --- a/api/oauth/token.php +++ b/api/oauth/token.php @@ -7,9 +7,9 @@ * * @author Vince Wooll * - * @version Jomres 10.6.0 + * @version Jomres 10.7.0 * - * @copyright 2005-2022 Vince Wooll + * @copyright 2005-2023 Vince Wooll * Jomres (tm) PHP, CSS & Javascript files are released under both MIT and GPL2 licenses. This means that you can choose the license that best suits your project, and use it accordingly */ diff --git a/api/put_method_handling.php b/api/put_method_handling.php index c8d6c74a99..4d4a573d24 100644 --- a/api/put_method_handling.php +++ b/api/put_method_handling.php @@ -5,9 +5,9 @@ * * @author Vince Wooll * - * @version Jomres 10.6.0 + * @version Jomres 10.7.0 * - * @copyright 2005-2022 Vince Wooll + * @copyright 2005-2023 Vince Wooll * Jomres (tm) PHP, CSS & Javascript files are released under both MIT and GPL2 licenses. This means that you can choose the license that best suits your project, and use it accordingly */ diff --git a/api/routes.php b/api/routes.php index fa61d2f974..5dbfcc8755 100644 --- a/api/routes.php +++ b/api/routes.php @@ -9,9 +9,9 @@ * * @author Vince Wooll * - * @version Jomres 10.6.0 + * @version Jomres 10.7.0 * - * @copyright 2005-2022 Vince Wooll + * @copyright 2005-2023 Vince Wooll * Jomres (tm) PHP, CSS & Javascript files are released under both MIT and GPL2 licenses. This means that you can choose the license that best suits your project, and use it accordingly */ diff --git a/assets/css/custom_jquery_ui.css b/assets/css/custom_jquery_ui.css new file mode 100644 index 0000000000..fcb2967ca9 --- /dev/null +++ b/assets/css/custom_jquery_ui.css @@ -0,0 +1,111 @@ + +.ui-datepicker { + background-color: #fff; + box-shadow: 0 0 0.25em rgba(0, 0, 0, 0.3); + display: none; + padding: 1em; + width: 25em; +} + +.ui-datepicker-calendar a { + color: inherit; + text-decoration: none; +} + +.ui-datepicker-header { + align-items: center; + display: flex; + justify-content: space-between; + margin-bottom: 1em; +} + +.ui-datepicker-prev, +.ui-datepicker-next { + cursor: pointer; +} + +.ui-datepicker-next { + order: 1; +} + +.ui-datepicker-prev .ui-icon, +.ui-datepicker-next .ui-icon { + background-image: url("https://cdn.rawgit.com/marcobiedermann/playground/3027274a/ui/datepicker/jquery-ui-datepicker/dist/assets/images/datepicker-arrows.svg"); + background-repeat: no-repeat; + background-size: 300%; + display: inline-block; + height: 1em; + overflow: hidden; + text-indent: -999px; + width: 1em; +} + +.ui-datepicker-prev:hover .ui-icon-circle-triangle-w { + background-position: -1em 0; +} + +.ui-datepicker-prev.ui-state-disabled .ui-icon-circle-triangle-w { + background-position: -2em 0; +} + +.ui-datepicker-next .ui-icon-circle-triangle-e { + background-position: 0 -1em; +} + +.ui-datepicker-next:hover .ui-icon-circle-triangle-e { + background-position: -1em -1em; +} + +.ui-datepicker-nextui-state-disabled .ui-icon-circle-triangle-e { + background-position: -2em -1em; +} + +.ui-datepicker-title { + font-size: 1.5rem; + font-weight: 700; +} + +.ui-datepicker-calendar td, +.ui-datepicker-calendar th { + text-align: center; +} + +.ui-datepicker-calendar td a, +.ui-datepicker-calendar td span { + background-color: #f6f6f6; + display: block; + padding: 0.5em 1em; +} + +.ui-datepicker-calendar .ui-datepicker-unselectable { + color: #c8c8ca; +} + +.ui-datepicker-calendar .ui-datepicker-today a, +.ui-datepicker-calendar .ui-datepicker-today span { + color: #bed62f; + font-weight: 700; +} + +.ui-datepicker-calendar .ui-datepicker-current-day a { + background-color: #bed62f; + color: #fff; + font-weight: 700; +} + +.ui-datepicker-buttonpane { + margin-top: 1em; +} + +.ui-datepicker-buttonpane button { + background-color: #484a4e; + color: #fff; + font-size: 0.75rem; + padding: 0.25em 0.5em; +} + +.ui-datepicker-buttonpane button + button { + margin-left: 0.5em; +} + +.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:49%;} diff --git a/assets/css/jomrescss_bootstrap5.css b/assets/css/jomrescss_bootstrap5.css index 92302da4e5..51758dc1b5 100644 --- a/assets/css/jomrescss_bootstrap5.css +++ b/assets/css/jomrescss_bootstrap5.css @@ -149,46 +149,12 @@ fieldset.radio.btn-group { padding-left: 0; } -/* Custom labels */ -.label-grey {background-color: #bdbdbd !important;} -.label-black {background-color: #212121 !important;} -.label-orange {background-color: #ffa726 !important;} -.label-red {background-color: #ef5350 !important;} -.label-green {background-color: #66bb6a !important;} -.label-blue {background-color: #29b6f6 !important;} -.label-purple {background-color: #ab47bc !important;} -.label-teal {background-color: #26a69a !important;} .property-list-overbudget-properties { opacity: .3; } -.price-tag { - background: url("../images/price-tag.png") no-repeat scroll left top rgba(0, 0, 0, 0); - height: 41px; - padding: 2px 15px 8px 30px; - position: absolute; - right: 0; - text-align: right; - top: 10px; - width: auto; -} -.price-tag small { - color: #fff; - font-size: 11px; -} -.price-tag small a { - color: #fff; -} -.price-tag small a:hover { - color: #fff; - text-decoration: underline; -} -.price-tag h4 { - color: #fff; - font-size: 18px; -} /*Datepicker overrides*/ img.ui-datepicker-trigger { diff --git a/assets/images/payment_processors/amex.svg b/assets/images/payment_processors/amex.svg new file mode 100644 index 0000000000..402f9f522b --- /dev/null +++ b/assets/images/payment_processors/amex.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + diff --git a/assets/images/payment_processors/mastercard.svg b/assets/images/payment_processors/mastercard.svg new file mode 100644 index 0000000000..d1bf0510bc --- /dev/null +++ b/assets/images/payment_processors/mastercard.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/assets/images/payment_processors/visa.svgz b/assets/images/payment_processors/visa.svgz new file mode 100644 index 0000000000..f2a0541897 Binary files /dev/null and b/assets/images/payment_processors/visa.svgz differ diff --git a/assets/js/AOS.js b/assets/js/AOS.js new file mode 100644 index 0000000000..ad0555eb06 --- /dev/null +++ b/assets/js/AOS.js @@ -0,0 +1,4 @@ + +document.addEventListener('DOMContentLoaded', function(){ + AOS.init(); +}, { once: true , disable: 'mobile' }); diff --git a/assets/js/jomres.js b/assets/js/jomres.js index 9807c65675..8372f645d7 100644 --- a/assets/js/jomres.js +++ b/assets/js/jomres.js @@ -432,9 +432,23 @@ function switch_editing_mode(url, val) { function switch_language_context(val) { var original_url = window.location.href; - window.location = original_url + '&language_context=' + val; + var new_url = replaceUrlParam(original_url, 'language_context', val) + window.location = new_url; }; +function replaceUrlParam(url, paramName, paramValue) +{ + if (paramValue == null) { + paramValue = ''; + } + var pattern = new RegExp('\\b('+paramName+'=).*?(&|#|$)'); + if (url.search(pattern)>=0) { + return url.replace(pattern,'$1' + paramValue + '$2'); + } + url = url.replace(/[?#]$/,''); + return url + (url.indexOf('?')>0 ? '&' : '?') + paramName + '=' + paramValue; +} + function switch_exchange_rate(url, val) { var original_url = window.location.href; jomresJquery.get(url + '&task=switch_exchange_rate¤cy_code=' + val, function (data) { @@ -1353,4 +1367,16 @@ document.addEventListener('DOMContentLoaded', function(){ lessLinkClass: 'link-secondary', }); }); +}); + +const checkOffset = jomresJquery.datepicker._checkOffset; + +jomresJquery.extend(jomresJquery.datepicker, { + _checkOffset: function(inst, offset, isFixed) { + if(isFixed) { + return checkOffset.apply(this, arguments); + } else { + return offset; + } + } }); \ No newline at end of file diff --git a/assets/templates/bootstrap/administrator/control_panel.html b/assets/templates/bootstrap/administrator/control_panel.html index f9fe0c1cd0..9008c08841 100644 --- a/assets/templates/bootstrap/administrator/control_panel.html +++ b/assets/templates/bootstrap/administrator/control_panel.html @@ -40,7 +40,7 @@
- Copyright: © 2005 - 2020 Vince Wooll + Copyright: © 2005 - 2023 Vince Wooll
Jomres is Open Source software for the Joomla and Wordpress Content Management Systems diff --git a/assets/templates/bootstrap/frontend/animation_library.html b/assets/templates/bootstrap/frontend/animation_library.html new file mode 100644 index 0000000000..2c2a6b2ffe --- /dev/null +++ b/assets/templates/bootstrap/frontend/animation_library.html @@ -0,0 +1,3 @@ + + data-aos="{ANIMATION_LIBRARY_ANIMATION}" data-aos-delay="{ANIMATION_LIBRARY_DELAY}" data-aos-duration="{ANIMATION_LIBRARY_DURATION}" data-aos-easing="{ANIMATION_LIBRARY_EASING}" data-aos-once="true" + \ No newline at end of file diff --git a/assets/templates/bootstrap/frontend/property_details_wrapper_bottom.html b/assets/templates/bootstrap/frontend/property_details_wrapper_bottom.html new file mode 100644 index 0000000000..3f0488c6f2 --- /dev/null +++ b/assets/templates/bootstrap/frontend/property_details_wrapper_bottom.html @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/assets/templates/bootstrap/frontend/property_details_wrapper_top.html b/assets/templates/bootstrap/frontend/property_details_wrapper_top.html new file mode 100644 index 0000000000..3b6e17f1f0 --- /dev/null +++ b/assets/templates/bootstrap/frontend/property_details_wrapper_top.html @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/assets/templates/bootstrap/frontend/search_results_wrapper_bottom.html b/assets/templates/bootstrap/frontend/search_results_wrapper_bottom.html new file mode 100644 index 0000000000..3f0488c6f2 --- /dev/null +++ b/assets/templates/bootstrap/frontend/search_results_wrapper_bottom.html @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/assets/templates/bootstrap/frontend/search_results_wrapper_top.html b/assets/templates/bootstrap/frontend/search_results_wrapper_top.html new file mode 100644 index 0000000000..3f0488c6f2 --- /dev/null +++ b/assets/templates/bootstrap/frontend/search_results_wrapper_top.html @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/assets/templates/bootstrap/frontend/select_list.html b/assets/templates/bootstrap/frontend/select_list.html new file mode 100644 index 0000000000..d60aeb210c --- /dev/null +++ b/assets/templates/bootstrap/frontend/select_list.html @@ -0,0 +1,7 @@ + + + \ No newline at end of file diff --git a/assets/templates/bootstrap3/backend/payment_gateways.html b/assets/templates/bootstrap3/backend/payment_gateways.html index 0a00495e38..214f8d038a 100644 --- a/assets/templates/bootstrap3/backend/payment_gateways.html +++ b/assets/templates/bootstrap3/backend/payment_gateways.html @@ -11,7 +11,7 @@
- +

{GATEWAY_NAME}

diff --git a/assets/templates/bootstrap3/frontend/animation_library.html b/assets/templates/bootstrap3/frontend/animation_library.html new file mode 100644 index 0000000000..2c2a6b2ffe --- /dev/null +++ b/assets/templates/bootstrap3/frontend/animation_library.html @@ -0,0 +1,3 @@ + + data-aos="{ANIMATION_LIBRARY_ANIMATION}" data-aos-delay="{ANIMATION_LIBRARY_DELAY}" data-aos-duration="{ANIMATION_LIBRARY_DURATION}" data-aos-easing="{ANIMATION_LIBRARY_EASING}" data-aos-once="true" + \ No newline at end of file diff --git a/assets/templates/bootstrap3/frontend/property_details_wrapper_bottom.html b/assets/templates/bootstrap3/frontend/property_details_wrapper_bottom.html new file mode 100644 index 0000000000..3f0488c6f2 --- /dev/null +++ b/assets/templates/bootstrap3/frontend/property_details_wrapper_bottom.html @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/assets/templates/bootstrap3/frontend/property_details_wrapper_top.html b/assets/templates/bootstrap3/frontend/property_details_wrapper_top.html new file mode 100644 index 0000000000..3b6e17f1f0 --- /dev/null +++ b/assets/templates/bootstrap3/frontend/property_details_wrapper_top.html @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/assets/templates/bootstrap3/frontend/search_results_wrapper_bottom.html b/assets/templates/bootstrap3/frontend/search_results_wrapper_bottom.html new file mode 100644 index 0000000000..3f0488c6f2 --- /dev/null +++ b/assets/templates/bootstrap3/frontend/search_results_wrapper_bottom.html @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/assets/templates/bootstrap3/frontend/search_results_wrapper_top.html b/assets/templates/bootstrap3/frontend/search_results_wrapper_top.html new file mode 100644 index 0000000000..3f0488c6f2 --- /dev/null +++ b/assets/templates/bootstrap3/frontend/search_results_wrapper_top.html @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/assets/templates/bootstrap3/frontend/select_list.html b/assets/templates/bootstrap3/frontend/select_list.html new file mode 100644 index 0000000000..d60aeb210c --- /dev/null +++ b/assets/templates/bootstrap3/frontend/select_list.html @@ -0,0 +1,7 @@ + + + \ No newline at end of file diff --git a/assets/templates/bootstrap3/frontend/top.html b/assets/templates/bootstrap3/frontend/top.html index f3fe45ac60..64d9bb4c9b 100644 --- a/assets/templates/bootstrap3/frontend/top.html +++ b/assets/templates/bootstrap3/frontend/top.html @@ -27,8 +27,13 @@ webmaster.

- -

{HACTIVE_PROPERTY}{PROPERTYNAME}

+ +
+ +
+ {PROPERTY_SELECTOR_DROPDOWN} +
+
diff --git a/assets/templates/bootstrap5/administrator/control_panel.html b/assets/templates/bootstrap5/administrator/control_panel.html index 9232fca7bf..49ba739da9 100644 --- a/assets/templates/bootstrap5/administrator/control_panel.html +++ b/assets/templates/bootstrap5/administrator/control_panel.html @@ -80,7 +80,7 @@
- Copyright: © 2005 - 2022 Vince Wooll + Copyright: © 2005 - 2023 Vince Wooll
Jomres is Open Source software for the Joomla and Wordpress Content Management Systems diff --git a/assets/templates/bootstrap5/administrator/jomres_income_overview.html b/assets/templates/bootstrap5/administrator/jomres_income_overview.html index 6e243c6a30..8a8882015e 100644 --- a/assets/templates/bootstrap5/administrator/jomres_income_overview.html +++ b/assets/templates/bootstrap5/administrator/jomres_income_overview.html @@ -2,12 +2,12 @@
{_JOMRES_INCOME_PAID_AMOUNTS}
-

{_JOMRES_STATUS_BOOKINGS} {BOOKINGS_INCOME}

+

{_JOMRES_STATUS_BOOKINGS} {BOOKINGS_INCOME}

-

Subscriptions {SUBSCRIPTIONS_INCOME}

+

Subscriptions {SUBSCRIPTIONS_INCOME}

-

Commission {COMMISSION_INCOME}

+

Commission {COMMISSION_INCOME}

diff --git a/assets/templates/bootstrap5/administrator/jomres_properties_overview.html b/assets/templates/bootstrap5/administrator/jomres_properties_overview.html index af91e0ea0d..3bc9e12514 100644 --- a/assets/templates/bootstrap5/administrator/jomres_properties_overview.html +++ b/assets/templates/bootstrap5/administrator/jomres_properties_overview.html @@ -2,11 +2,11 @@
{_JOMRES_HLIST_PROPERTIES}
-

{_ADMIN_CPANEL_PROPERTIES_PANEL_TOTAL} {TOTAL_PROPERTIES}

-

{_ADMIN_CPANEL_PROPERTIES_PANEL_PUBLISHED} {TOTAL_PUBLISHED}

-

{_ADMIN_CPANEL_PROPERTIES_PANEL_UNPUBLISHED} {TOTAL_UNPUBLISHED}

-

{_ADMIN_CPANEL_PROPERTIES_PANEL_APPROVED} {TOTAL_APPROVED}

-

{_ADMIN_CPANEL_PROPERTIES_PANEL_REQUIREAPPROVAL} {TOTAL_NOTAPPROVED}

+

{_ADMIN_CPANEL_PROPERTIES_PANEL_TOTAL} {TOTAL_PROPERTIES}

+

{_ADMIN_CPANEL_PROPERTIES_PANEL_PUBLISHED} {TOTAL_PUBLISHED}

+

{_ADMIN_CPANEL_PROPERTIES_PANEL_UNPUBLISHED} {TOTAL_UNPUBLISHED}

+

{_ADMIN_CPANEL_PROPERTIES_PANEL_APPROVED} {TOTAL_APPROVED}

+

{_ADMIN_CPANEL_PROPERTIES_PANEL_REQUIREAPPROVAL} {TOTAL_NOTAPPROVED}

diff --git a/assets/templates/bootstrap5/administrator/jomres_reviews_overview.html b/assets/templates/bootstrap5/administrator/jomres_reviews_overview.html index a684f99ee7..b94393cb65 100644 --- a/assets/templates/bootstrap5/administrator/jomres_reviews_overview.html +++ b/assets/templates/bootstrap5/administrator/jomres_reviews_overview.html @@ -3,9 +3,9 @@
{_JOMRES_REVIEWS}
-

{_ADMIN_CPANEL_REVIEWS_PANEL_TOTAL_REVIEWS} {TOTAL_REVIEWS}

-

{_ADMIN_CPANEL_REVIEWS_PANEL_UNPUBLISHED_REVIEWS} {TOTAL_UNPUBLISHED_REVIEWS}

-

{_ADMIN_CPANEL_REVIEWS_PANEL_REPORTED_REVIEWS} {TOTAL_REVIEW_REPORTS}

+

{_ADMIN_CPANEL_REVIEWS_PANEL_TOTAL_REVIEWS} {TOTAL_REVIEWS}

+

{_ADMIN_CPANEL_REVIEWS_PANEL_UNPUBLISHED_REVIEWS} {TOTAL_UNPUBLISHED_REVIEWS}

+

{_ADMIN_CPANEL_REVIEWS_PANEL_REPORTED_REVIEWS} {TOTAL_REVIEW_REPORTS}

diff --git a/assets/templates/bootstrap5/administrator/jomres_system_info.html b/assets/templates/bootstrap5/administrator/jomres_system_info.html index d70d37303d..831e110afa 100644 --- a/assets/templates/bootstrap5/administrator/jomres_system_info.html +++ b/assets/templates/bootstrap5/administrator/jomres_system_info.html @@ -5,7 +5,7 @@
{_ADMIN_CPANEL_SYSTEM_INFO}

{_JOMRES_VERSIONCHECK_THISJOMRESVERSION} {THIS_JOMRES_VERSION}

-

{_JOMRES_VERSIONCHECK_LATESTJOMRESVERSION} {LATEST_JOMRES_VERSION}

+

{_JOMRES_VERSIONCHECK_LATESTJOMRESVERSION} {LATEST_JOMRES_VERSION}

{ALERT}{ERROR}
{UPDATEINFO}
diff --git a/assets/templates/bootstrap5/administrator/list_shortcodes.html b/assets/templates/bootstrap5/administrator/list_shortcodes.html index 8370f18dd9..935a39c65f 100644 --- a/assets/templates/bootstrap5/administrator/list_shortcodes.html +++ b/assets/templates/bootstrap5/administrator/list_shortcodes.html @@ -11,6 +11,10 @@ {JOMRESTOOLBAR}

{INFO}

+ +

{SHORTCODE_INFO_JOMRES_V_JOMRES_SCRIPT}

+ + diff --git a/assets/templates/bootstrap5/administrator/menu_badge_black.html b/assets/templates/bootstrap5/administrator/menu_badge_black.html index 7724d401d3..61d8366c3c 100644 --- a/assets/templates/bootstrap5/administrator/menu_badge_black.html +++ b/assets/templates/bootstrap5/administrator/menu_badge_black.html @@ -1,4 +1,4 @@ - {NUMBER} + {NUMBER} diff --git a/assets/templates/bootstrap5/administrator/menu_badge_blue.html b/assets/templates/bootstrap5/administrator/menu_badge_blue.html index 46af2c4497..b1fe2b793c 100644 --- a/assets/templates/bootstrap5/administrator/menu_badge_blue.html +++ b/assets/templates/bootstrap5/administrator/menu_badge_blue.html @@ -1,4 +1,4 @@ - {NUMBER} + {NUMBER} diff --git a/assets/templates/bootstrap5/administrator/menu_badge_green.html b/assets/templates/bootstrap5/administrator/menu_badge_green.html index 4c4bcb22c3..b4900a81a2 100644 --- a/assets/templates/bootstrap5/administrator/menu_badge_green.html +++ b/assets/templates/bootstrap5/administrator/menu_badge_green.html @@ -1,4 +1,4 @@ - {NUMBER} + {NUMBER} diff --git a/assets/templates/bootstrap5/administrator/menu_badge_orange.html b/assets/templates/bootstrap5/administrator/menu_badge_orange.html index e4bae576e2..74c1cac24d 100644 --- a/assets/templates/bootstrap5/administrator/menu_badge_orange.html +++ b/assets/templates/bootstrap5/administrator/menu_badge_orange.html @@ -1,4 +1,4 @@ - {NUMBER} + {NUMBER} diff --git a/assets/templates/bootstrap5/backend/dashboard.html b/assets/templates/bootstrap5/backend/dashboard.html index eb871c2509..ba4ff27158 100644 --- a/assets/templates/bootstrap5/backend/dashboard.html +++ b/assets/templates/bootstrap5/backend/dashboard.html @@ -648,14 +648,14 @@

{PAGETITLE}

 
{HLEGEND}
-{TEXT_PENDING} -{TEXT_ARRIVETODAY} -{TEXT_RESIDENT} -{TEXT_LATE} -{TEXT_DEPARTTODAY} -{TEXT_STILLHERE} -{TEXT_BOOKEDOUT} -{HBLACKBOOKING} +{TEXT_PENDING} +{TEXT_ARRIVETODAY} +{TEXT_RESIDENT} +{TEXT_LATE} +{TEXT_DEPARTTODAY} +{TEXT_STILLHERE} +{TEXT_BOOKEDOUT} +{HBLACKBOOKING}

diff --git a/assets/templates/bootstrap5/backend/list_property_bookings.html b/assets/templates/bootstrap5/backend/list_property_bookings.html index 388f8349b9..c832413258 100644 --- a/assets/templates/bootstrap5/backend/list_property_bookings.html +++ b/assets/templates/bootstrap5/backend/list_property_bookings.html @@ -51,14 +51,14 @@
{HLEGEND} ({_JOMRES_BOOKING_NUMBER})
-{TEXT_PENDING} -{TEXT_ARRIVETODAY} -{TEXT_RESIDENT} -{TEXT_LATE} -{TEXT_DEPARTTODAY} -{TEXT_STILLHERE} -{TEXT_BOOKEDOUT} -{TEXT_CANCELLED} +{TEXT_PENDING} +{TEXT_ARRIVETODAY} +{TEXT_RESIDENT} +{TEXT_LATE} +{TEXT_DEPARTTODAY} +{TEXT_STILLHERE} +{TEXT_BOOKEDOUT} +{TEXT_CANCELLED}