I apologize beforehand if this isn't the proper place to post this.
I have been working on a custom application on a private, development version of IPB 4.3.3 and it has been going great up until importing custom JS files. I've read the official docs about adding resources and it just doesn't work for me. Below are some of the things I've tried:
Made a bundle directory in /fw/dev/js/admin/ called fw (fw is the name of my custom application) and I have two files in there: clipboard.js (third party library for copying to clipboard) and fw.js
In the admin controller I attempted to import them with the following code:
public function execute()
{
\IPS\Output::i()->jsFiles = array_merge( \IPS\Output::i()->jsFiles, \IPS\Output::i()->js( 'admin_fw.js', 'fw', 'admin' ) );
parent::execute();
}
- as documented. This does not import the JS files in the admin dashboard, even after compiling the JS from the applications screen.
Next, I tried importing both of the files separately with the following code:
public function execute()
{
\IPS\Output::i()->jsFiles = array_merge( \IPS\Output::i()->jsFiles, \IPS\Output::i()->js( 'fw/clipboard.js', 'fw', 'admin' ), \IPS\Output::i()->js( 'fw/fw.js', 'fw', 'admin' ) );
parent::execute();
}
This, however, actually places the JS files in the dashboard. But, they do not appear in the dashboard after compiling the JS.
Does anyone know what on earth I am doing wrong? This is the only thing keeping me from completing this application.
Thanks!