Loading...
diff --git a/web/typo3conf/ext/ep_products/Classes/Controller/AjaxContentController.php b/web/typo3conf/ext/ep_products/Classes/Controller/AjaxContentController.php
deleted file mode 100644
index 37455407..00000000
--- a/web/typo3conf/ext/ep_products/Classes/Controller/AjaxContentController.php
+++ /dev/null
@@ -1,108 +0,0 @@
-, dreipunktnull
- *
- * All rights reserved
- *
- * This script is part of the TYPO3 project. The TYPO3 project is
- * free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * The GNU General Public License can be found at
- * http://www.gnu.org/copyleft/gpl.html.
- *
- * This script is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-
-use EP\EpProducts\Domain\Model\City;
-use EP\EpProducts\Domain\Model\Country;
-use EP\EpProducts\Domain\Model\Hotel;
-use EP\EpProducts\Domain\Model\Journey;
-use EP\EpProducts\Domain\Model\Product;
-use EP\EpProducts\Domain\Model\Region;
-use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
-
-class AjaxContentController extends ActionController
-{
-
- /**
- * @param Product $product
- * @param Hotel $hotel
- * @param integer $referringPageUid
- */
- public function productAction(Product $product, Hotel $hotel = null, $referringPageUid = null)
- {
- $this->view->assignMultiple([
- 'hotel' => $hotel,
- 'product' => $product,
- 'referringPageUid' => $referringPageUid,
- ]);
- }
-
- /**
- * @param Hotel $hotel
- */
- public function hotelAction(Hotel $hotel)
- {
- $this->view->assign('hotel', $hotel);
- }
-
- /**
- * @param Country $country
- */
- public function countryAction(Country $country)
- {
- $this->view->assign('country', $country);
- }
-
- /**
- * @param Region $region
- */
- public function regionAction(Region $region)
- {
- $this->view->assign('region', $region);
- }
-
- /**
- * @param City $city
- */
- public function cityAction(City $city)
- {
- $this->view->assign('city', $city);
- }
-
- /**
- * @param Journey $journey
- */
- public function journeyAction(Journey $journey)
- {
- $this->view->assign('journey', $journey);
- }
-
- /**
- * @param Region $region
- */
- public function webcamAction(Region $region)
- {
- $webcam = $region->getWebcam();
- $available = ($webcam !== null && $webcam->getAvailable());
- $this->view->assignMultiple([
- 'region' => $region,
- 'webcam' => $webcam,
- 'available' => $available,
- ]);
- }
-}
diff --git a/web/typo3conf/ext/ep_products/Classes/Domain/Model/Region.php b/web/typo3conf/ext/ep_products/Classes/Domain/Model/Region.php
index fa9e6d91..1d1d4186 100644
--- a/web/typo3conf/ext/ep_products/Classes/Domain/Model/Region.php
+++ b/web/typo3conf/ext/ep_products/Classes/Domain/Model/Region.php
@@ -392,6 +392,15 @@ class Region extends AbstractDestination implements TeaserInterface
return $this->webcam;
}
+ /**
+ * @return bool
+ */
+ public function getWebcamAvailable()
+ {
+ $webcam = $this->getWebcam();
+ return $webcam !== null && $webcam->getAvailable();
+ }
+
/**
* @param Webcam $webcam
*/
diff --git a/web/typo3conf/ext/ep_products/Configuration/TypoScript/setup.txt b/web/typo3conf/ext/ep_products/Configuration/TypoScript/setup.txt
index fa9d1ad9..9c2fb473 100644
--- a/web/typo3conf/ext/ep_products/Configuration/TypoScript/setup.txt
+++ b/web/typo3conf/ext/ep_products/Configuration/TypoScript/setup.txt
@@ -110,15 +110,6 @@ tx_epproducts_ajax_json {
AjaxFilterpanel {
1 = autocomplete
}
- AjaxContent {
- 1 = country
- 2 = region
- 3 = city
- 4 = hotel
- 5 = product
- 6 = journey
- 7 = webcam
- }
AjaxTable {
1 = pricetable
2 = pricetableHtml
diff --git a/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/ProductDetail.vue b/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/ProductDetail.vue
index 33f573df..6b924b19 100644
--- a/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/ProductDetail.vue
+++ b/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/ProductDetail.vue
@@ -39,7 +39,7 @@
priceTableShow: false,
detailShow: false,
loading: true,
- activeUri: null,
+ activeSection: null,
singleDate: false
}
},
@@ -79,7 +79,7 @@
},
loadDatesView () {
this.loadDates();
- this.activeUri = 'dates';
+ this.activeSection = 'dates';
this.scrollToMain();
},
loadPriceTable (dateUid) {
@@ -103,21 +103,18 @@
this.loadPriceTable(dateuid);
this.scrollToMain();
},
- loadHtml (uri, scroll = true) {
- this.loading = true;
+ showHtml (section, scroll = true) {
this.datesShow = false;
this.priceTableShow = false;
this.detailShow = true;
- const ajaxUri = this.uris[uri];
- $.get(ajaxUri, (html) => {
- this.detailHtml = html;
- this.loading = false;
- if (scroll) {
- this.scrollToMain();
- }
- EventBus.$emit('ajaxContentLoaded');
+ if (scroll) {
+ this.scrollToMain();
+ }
+ this.activeSection = section;
+ // 'Wake up' Slick slider after changing visibility
+ Vue.nextTick(() => {
+ $('.slider--content > .slider__items').slick('setPosition');
});
- this.activeUri = uri;
},
scrollToMain () {
EventBus.$emit('scrollTo', '#main');
@@ -134,7 +131,7 @@
mounted () {
Vue.nextTick(() => {
if (this.hotelFirst) {
- this.loadHtml('hotel', false);
+ this.showHtml('hotel', false);
} else {
this.loadDatesView();
}
diff --git a/web/typo3conf/ext/ep_theme/Resources/Private/Partials/Journey/Details.html b/web/typo3conf/ext/ep_theme/Resources/Private/Partials/Journey/Details.html
new file mode 100644
index 00000000..bd58c6ab
--- /dev/null
+++ b/web/typo3conf/ext/ep_theme/Resources/Private/Partials/Journey/Details.html
@@ -0,0 +1,13 @@
+
Loading...