Skip to content

Commit

Permalink
Merge pull request #290 from shreesh-webkul/gli-656
Browse files Browse the repository at this point in the history
Moved owl-carousel and datatable plugins to core-js folder
  • Loading branch information
rohit053 authored Jan 31, 2022
2 parents d3e14c9 + d27a4a5 commit 25be94a
Show file tree
Hide file tree
Showing 31 changed files with 38 additions and 84 deletions.
3 changes: 1 addition & 2 deletions controllers/front/ProductController.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ public function setMedia()
$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'
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* 2010-2020 Webkul.
* 2010-2021 Webkul.
*
* NOTICE OF LICENSE
*
Expand All @@ -14,7 +14,7 @@
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
*
* @author Webkul IN <[email protected]>
* @copyright 2010-2020 Webkul IN
* @copyright 2010-2021 Webkul IN
* @license https://store.webkul.com/license.html
*/

Expand All @@ -25,5 +25,5 @@
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');

header('Location: ../../../');
header('Location: ../../');
exit;
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* 2010-2020 Webkul.
* 2010-2021 Webkul.
*
* NOTICE OF LICENSE
*
Expand All @@ -14,7 +14,7 @@
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
*
* @author Webkul IN <[email protected]>
* @copyright 2010-2020 Webkul IN
* @copyright 2010-2021 Webkul IN
* @license https://store.webkul.com/license.html
*/

Expand All @@ -25,5 +25,5 @@
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');

header('Location: ../../../');
header('Location: ../../');
exit;
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions modules/blocknavigationmenu/blocknavigationmenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ public function hookDisplayTopSubSecondaryBlock($params)
'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)) {
Expand All @@ -78,7 +78,7 @@ public function hookFooter()
$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');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -603,15 +603,8 @@ public function setMedia()
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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,6 @@ public function ajaxProcessSearchProductByName()
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');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,6 @@ public function setMedia()
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');
}
}
4 changes: 2 additions & 2 deletions modules/hotelreservationsystem/hotelreservationsystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ public function hookDisplayHeader()
}
}
//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()
Expand Down
10 changes: 0 additions & 10 deletions modules/hotelreservationsystem/libs/owl.carousel/assets/index.php

This file was deleted.

10 changes: 0 additions & 10 deletions modules/hotelreservationsystem/libs/owl.carousel/index.php

This file was deleted.

17 changes: 5 additions & 12 deletions modules/wkabouthotelblock/wkabouthotelblock.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,11 @@ public function __construct()

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);
Expand Down
2 changes: 1 addition & 1 deletion modules/wkfooteraboutblock/wkfooteraboutblock.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function hookFooter($params)
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');
}

Expand Down
2 changes: 1 addition & 1 deletion modules/wkfooterpaymentblock/wkfooterpaymentblock.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function hookFooter($params)
$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');
}
}
Expand Down
4 changes: 2 additions & 2 deletions modules/wkhotelfeaturesblock/wkhotelfeaturesblock.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ public function __construct()

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);
Expand Down
4 changes: 2 additions & 2 deletions modules/wkhotelfilterblock/wkhotelfilterblock.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ public function hookDisplayLeftColumn()
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);

Expand Down
2 changes: 1 addition & 1 deletion modules/wkhotelroom/wkhotelroom.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function hookDisplayHome()
)
);

$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');
}
Expand Down
6 changes: 3 additions & 3 deletions modules/wkroomsearchblock/wkroomsearchblock.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ public function hookActionFrontControllerSetMedia()
|| '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 (
Expand Down
22 changes: 6 additions & 16 deletions modules/wktestimonialblock/wktestimonialblock.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,12 @@ public function hookDisplayAddModuleSettingLink()

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',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* 2010-2020 Webkul.
* 2010-2021 Webkul.
*
* NOTICE OF LICENSE
*
Expand All @@ -13,7 +13,7 @@
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
*
* @author Webkul IN <[email protected]>
* @copyright 2010-2020 Webkul IN
* @copyright 2010-2021 Webkul IN
* @license https://store.webkul.com/license.html
*/

Expand Down

0 comments on commit 25be94a

Please sign in to comment.