Using ->_path while including js and css

This commit is contained in:
shreesh arora
2022-01-05 16:38:57 +05:30
parent 8a5c66f1b6
commit d27a4a5ea7
31 changed files with 38 additions and 84 deletions

View File

@@ -46,8 +46,7 @@ class ProductControllerCore extends FrontController
$this->addCSS(_THEME_CSS_DIR_.'product.css');
$this->addCSS(_THEME_CSS_DIR_.'print.css', 'print');
$this->addJqueryPlugin(array('fancybox', 'idTabs', 'scrollTo', 'serialScroll', 'bxslider'));
// for the search block By webkul
$this->addCSS(_PS_MODULE_DIR_.'hotelreservationsystem/views/css/datepickerCustom.css');
$this->addCSS(_THEME_CSS_DIR_.'datepicker.css');
$this->addJS(array(
_THEME_JS_DIR_.'tools.js', // retro compat themes 1.5
_THEME_JS_DIR_.'product.js'

View File

@@ -1,6 +1,6 @@
<?php
/**
* 2010-2020 Webkul.
* 2010-2021 Webkul.
*
* NOTICE OF LICENSE
*
@@ -14,7 +14,7 @@
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
*
* @author Webkul IN <support@webkul.com>
* @copyright 2010-2020 Webkul IN
* @copyright 2010-2021 Webkul IN
* @license https://store.webkul.com/license.html
*/
@@ -25,5 +25,5 @@ header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../../');
header('Location: ../../');
exit;

View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

@@ -1,6 +1,6 @@
<?php
/**
* 2010-2020 Webkul.
* 2010-2021 Webkul.
*
* NOTICE OF LICENSE
*
@@ -14,7 +14,7 @@
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
*
* @author Webkul IN <support@webkul.com>
* @copyright 2010-2020 Webkul IN
* @copyright 2010-2021 Webkul IN
* @license https://store.webkul.com/license.html
*/
@@ -25,5 +25,5 @@ header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../../');
header('Location: ../../');
exit;

View File

@@ -53,8 +53,8 @@ class blocknavigationmenu extends Module
'currentPage' => Tools::getValue('controller')
)
);
$this->context->controller->addJS(_PS_MODULE_DIR_.$this->name.'/views/js/htlnevigationmenu.js');
$this->context->controller->addCSS(_PS_MODULE_DIR_.$this->name.'/views/css/blocknavigation.css');
$this->context->controller->addJS($this->_path.'/views/js/htlnevigationmenu.js');
$this->context->controller->addCSS($this->_path.'/views/css/blocknavigation.css');
$objCustomNavigationLink = new WkCustomNavigationLink();
if ($navigationLinks = $objCustomNavigationLink->getCustomNavigationLinks(1, false, 1)) {
@@ -78,7 +78,7 @@ class blocknavigationmenu extends Module
$link['link'] = $this->context->link->getPageLink($link['link']);
}
}
$this->context->controller->addCSS(_PS_MODULE_DIR_.$this->name.'/views/css/wkFooterNavigationBlock.css');
$this->context->controller->addCSS($this->_path.'/views/css/wkFooterNavigationBlock.css');
$this->context->smarty->assign('navigation_links', $navigationLinks);
return $this->display(__FILE__, 'wkFooterNavigationBlock.tpl');
}

View File

@@ -601,15 +601,8 @@ class AdminAddHotelController extends ModuleAdminController
parent::setMedia();
HotelHelper::assignDataTableVariables();
$this->context->controller->addJS(
_MODULE_DIR_.$this->module->name.'/libs/datatable/jquery.dataTables.min.js'
);
$this->context->controller->addJS(
_MODULE_DIR_.$this->module->name.'/libs/datatable/dataTables.bootstrap.js'
);
$this->context->controller->addCSS(
_MODULE_DIR_.$this->module->name.'/views/css/libs/datatable/datatable_bootstrap.css'
);
$this->context->controller->addJS(_PS_JS_DIR_.'/datatable/jquery.dataTables.min.js');
$this->context->controller->addJS(_PS_JS_DIR_.'/datatable/dataTables.bootstrap.js');
Media::addJsDef(
array(

View File

@@ -458,7 +458,6 @@ class AdminHotelFeaturePricesSettingsController extends ModuleAdminController
public function setMedia()
{
parent::setMedia();
$this->addCSS(_MODULE_DIR_.'hotelreservationsystem/views/css/datepickerCustom.css');
$this->addCSS(_MODULE_DIR_.'hotelreservationsystem/views/css/HotelReservationAdmin.css');
$this->addJs(_MODULE_DIR_.'hotelreservationsystem/views/js/HotelReservationAdmin.js');
}

View File

@@ -676,6 +676,6 @@ class AdminHotelRoomsBookingController extends ModuleAdminController
parent::setMedia();
$this->addCSS(array(_MODULE_DIR_.'hotelreservationsystem/views/css/HotelReservationAdmin.css'));
$this->addJs(_PS_MODULE_DIR_.$this->module->name.'/views/js/HotelReservationAdmin.js');
$this->addJs(_MODULE_DIR_.$this->module->name.'/views/js/HotelReservationAdmin.js');
}
}

View File

@@ -95,8 +95,8 @@ class hotelreservationsystem extends Module
}
}
//End
$this->context->controller->addCSS(_PS_MODULE_DIR_.$this->name.'/views/css/HotelReservationFront.css');
$this->context->controller->addJS(_PS_MODULE_DIR_.$this->name.'/views/js/HotelReservationFront.js');
$this->context->controller->addCSS($this->_path.'/views/css/HotelReservationFront.css');
$this->context->controller->addJS($this->_path.'/views/js/HotelReservationFront.js');
}
public function hookDisplayAfterHookTop()

View File

@@ -1,10 +0,0 @@
<?php
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../../');
exit;

View File

@@ -1,10 +0,0 @@
<?php
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../../');
exit;

View File

@@ -45,18 +45,11 @@ class WkAboutHotelBlock extends Module
public function hookDisplayHome()
{
// owl.carousel Plug-in files
$this->context->controller->addCSS(
_PS_MODULE_DIR_.'hotelreservationsystem/libs/owl.carousel/assets/owl.carousel.min.css'
);
$this->context->controller->addCSS(
_PS_MODULE_DIR_.'hotelreservationsystem/libs/owl.carousel/assets/owl.theme.default.min.css'
);
$this->context->controller->addJS(
_PS_MODULE_DIR_.'hotelreservationsystem/libs/owl.carousel/owl.carousel.min.js'
);
$this->context->controller->addCSS(_PS_MODULE_DIR_.$this->name.'/views/css/WkAboutHotelBlockFront.css');
$this->context->controller->addJS(_PS_MODULE_DIR_.$this->name.'/views/js/WkAboutHotelBlockFront.js');
$this->context->controller->addCSS(_PS_JS_DIR_.'owl-carousel/assets/owl.carousel.min.css');
$this->context->controller->addCSS(_PS_JS_DIR_.'owl-carousel/assets/owl.theme.default.min.css');
$this->context->controller->addJS(_PS_JS_DIR_.'owl-carousel/owl.carousel.min.js');
$this->context->controller->addCSS($this->_path.'/views/css/WkAboutHotelBlockFront.css');
$this->context->controller->addJS($this->_path.'/views/js/WkAboutHotelBlockFront.js');
$HOTEL_INTERIOR_HEADING = Configuration::get('HOTEL_INTERIOR_HEADING', $this->context->language->id);
$HOTEL_INTERIOR_DESCRIPTION = Configuration::get('HOTEL_INTERIOR_DESCRIPTION', $this->context->language->id);

View File

@@ -46,7 +46,7 @@ class WkFooterAboutBlock extends Module
array('WK_HTL_SHORT_DESC' => Configuration::get('WK_HTL_SHORT_DESC', $this->context->language->id))
);
$this->context->controller->addCSS(_PS_MODULE_DIR_.$this->name.'/views/css/wkFooterAboutBlockFront.css');
$this->context->controller->addCSS($this->_path.'/views/css/wkFooterAboutBlockFront.css');
return $this->display(__FILE__, 'wkFooterAboutBlock.tpl');
}

View File

@@ -49,7 +49,7 @@ class WkFooterPaymentBlock extends Module
$objPaymentBlockInfo = new WkFooterPaymentBlockInfo();
if ($allPaymentBlocks = $objPaymentBlockInfo->getAllPaymentBlocks(1, 'position')) {
$this->context->smarty->assign('allPaymentBlocks', $allPaymentBlocks);
$this->context->controller->addCSS(_PS_MODULE_DIR_.$this->name.'/views/css/wkFooterPaymentBlockFront.css');
$this->context->controller->addCSS($this->_path.'/views/css/wkFooterPaymentBlockFront.css');
return $this->display(__FILE__, 'wkFooterPaymentBlock.tpl');
}
}

View File

@@ -44,8 +44,8 @@ class WkHotelFeaturesBlock extends Module
public function hookDisplayHome()
{
$this->context->controller->addCSS(_PS_MODULE_DIR_.$this->name.'/views/css/wkHotelFeaturesBlockFront.css');
$this->context->controller->addJS(_PS_MODULE_DIR_.$this->name.'/views/js/wkHotelFeaturesBlockFront.js');
$this->context->controller->addCSS($this->_path.'/views/css/wkHotelFeaturesBlockFront.css');
$this->context->controller->addJS($this->_path.'/views/js/wkHotelFeaturesBlockFront.js');
$objFeaturesData = new WkHotelFeaturesData();
$hotelAmenities = $objFeaturesData->getHotelAmenities(1);

View File

@@ -200,8 +200,8 @@ class wkhotelfilterblock extends Module
if ($this->context->controller->php_self == 'category') {
Media::addJsDef(array('noRoomAvailTxt' => $this->l('No room available')));
$this->context->controller->addJS(_PS_MODULE_DIR_.$this->name.'/views/js/wkhotelfilterblock.js');
$this->context->controller->addCSS(_PS_MODULE_DIR_.$this->name.'/views/css/wkhotelfilterblock.css');
$this->context->controller->addJS($this->_path.'/views/js/wkhotelfilterblock.js');
$this->context->controller->addCSS($this->_path.'/views/css/wkhotelfilterblock.css');
$id_lang = $this->context->language->id;
$all_feat = FeatureCore::getFeatures($id_lang);

View File

@@ -98,7 +98,7 @@ class WkHotelRoom extends Module
)
);
$this->context->controller->addCSS(_PS_MODULE_DIR_.$this->name.'/views/css/WkHotelRoomBlockFront.css');
$this->context->controller->addCSS($this->_path.'/views/css/WkHotelRoomBlockFront.css');
return $this->display(__FILE__, 'hotelRoomDisplayBlock.tpl');
}

View File

@@ -51,9 +51,9 @@ class WkRoomSearchBlock extends Module
|| 'index' == $controller
|| 'product' == $controller
) {
$this->context->controller->addCSS(_PS_MODULE_DIR_.'hotelreservationsystem/views/css/datepickerCustom.css');
$this->context->controller->addCSS(_PS_MODULE_DIR_.$this->name.'/views/css/wk-global-search.css');
$this->context->controller->addJS(_PS_MODULE_DIR_.$this->name.'/views/js/wk-room-search-block.js');
$this->context->controller->addCSS($this->_path.'/views/css/wk-global-search.css');
$this->context->controller->addJS($this->_path.'/views/js/wk-room-search-block.js');
$this->context->controller->addCSS(_THEME_CSS_DIR_.'datepicker.css');
Media::addJsDef(
array (

View File

@@ -53,22 +53,12 @@ class WkTestimonialBlock extends Module
public function hookDisplayHome()
{
// These files are already included in "wkabouthotelblock" module
if (!(Module::isInstalled('wkabouthotelblock') && Module::isEnabled('wkabouthotelblock'))) {
// owl.carousel Plug-in files
$this->context->controller->addCSS(
_PS_MODULE_DIR_.'hotelreservationsystem/libs/owl.carousel/assets/owl.carousel.min.css'
);
$this->context->controller->addCSS(
_PS_MODULE_DIR_.'hotelreservationsystem/libs/owl.carousel/assets/owl.theme.default.min.css'
);
$this->context->controller->addJS(
_PS_MODULE_DIR_.'hotelreservationsystem/libs/owl.carousel/owl.carousel.min.js'
);
}
/*---- Module Files ----*/
$this->context->controller->addCSS(_PS_MODULE_DIR_.$this->name.'/views/css/WkTestimonialBlockFront.css');
$this->context->controller->addJS(_PS_MODULE_DIR_.$this->name.'/views/js/WkTestimonialBlockFront.js');
$this->context->controller->addCSS(_PS_JS_DIR_.'/owl-carousel/assets/owl.carousel.min.css');
$this->context->controller->addCSS(_PS_JS_DIR_.'/owl-carousel/assets/owl.theme.default.min.css');
$this->context->controller->addJS(_PS_JS_DIR_.'/owl-carousel/owl.carousel.min');
$this->context->controller->addCSS($this->_path.'/views/css/WkTestimonialBlockFront.css');
$this->context->controller->addJS($this->_path.'/views/js/WkTestimonialBlockFront.js');
$HOTEL_TESIMONIAL_BLOCK_HEADING = Configuration::get(
'HOTEL_TESIMONIAL_BLOCK_HEADING',

View File

@@ -1,5 +1,5 @@
/**
* 2010-2020 Webkul.
* 2010-2021 Webkul.
*
* NOTICE OF LICENSE
*
@@ -13,7 +13,7 @@
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
*
* @author Webkul IN <support@webkul.com>
* @copyright 2010-2020 Webkul IN
* @copyright 2010-2021 Webkul IN
* @license https://store.webkul.com/license.html
*/