Jump to content

Need Help With Override Admin Module Js


Recommended Posts

Hi, I need to override this file:

\modules\my_module\views\js\back.js

 

Where do I need to create another back.js to make override?

I tried:

\themes\my_theme\js\modules\my_module\views\js\back.js - not working

which is strange because for \modules\my_module\views\js\front.js - it works

Edited by tper (see edit history)
Link to comment
Share on other sites

Hi bellini13, thx for your replay.

 

I searched module for back.js and front.js and only results are in \modules\livechatpro\livechatpro.php:

 

For back.js:

public function hookBackOfficeHeader($params){

...

$media  .= '<script type="text/javascript">'.$this->context->smarty->fetch(dirname(__FILE__).'/views/js/assigned_vars_back.js').'</script>

<script type="text/javascript">'.$this->context->smarty->fetch(dirname(__FILE__).'/views/templates/admin/translations.js.tpl').'</script>

';//<script src="'.$this->_path.'views/js/back.js"></script>

$this->context->controller->addJS($this->_path.'views/js/back.js');

...

}

 

public function syncChatDialog($plus_media = false, $display = false)

{

...

if ($plus_media == true)

{

$media .= '<script src="'.$this->_path.'views/js/back.js"></script>';

...

}

...

}

 

For front.js

public function hookHeader()

{

...

$media  .= '<script type="text/javascript">'.$this->context->smarty->fetch(dirname(__FILE__).'/views/js/assigned_vars_front.js').'</script>

<script type="text/javascript">'.$this->context->smarty->fetch(dirname(__FILE__).'/views/templates/admin/translations.js.tpl').'</script>

';//<script src="'.$this->_path.'views/js/front.js"></script>

$this->context->controller->addJS($this->_path.'views/js/front.js');

...

}

 

public function syncFrontChatDialog($plus_media = false, $display = false)

{

...

$media .= '<script type="text/javascript">'.$this->context->smarty->fetch(dirname(__FILE__).'/views/js/assigned_vars_front.js').'</script>

<script type="text/javascript">'.$this->context->smarty->fetch(dirname(__FILE__).'/views/templates/admin/translations.js.tpl').'</script>

<script src="'.$this->_path.'views/js/front.js"></script>

...

}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...