Custom JavaScript in UI

Is there a elegant way to add a custom tag to the Zammad UI?

I’d like to add custom functionality but don’t want to mess with the Zammad source code itself. A simple Tag in the header allowing me to run API requests and show IFRAMEs would be all I need.

Is there such a configuration?

That’s not possible without changing Zammads source code, I’m sorry.

(Edit: Unless you want to do some dirty stuff with rewrite rules and use your own js that also contains zammads js but again, that’s a maximum pervy dose )

Since I’m using (currently testing) my own installation - what would be the “best” way to alter the source code so that my tag gets served along with the UI?

You can find the important stuff relevant to youi in

/opt/zammad/app/assets/javascripts/ the application.js is Zammads javascript file.

After changing the file, you need to tell Zammad the changes by:

systemctl stop zammad
zammad run rails assets:precompile
systemctl start zammad

Changes should take affect then.

If needed, you can remove your current javascript compiles to ensure zammad really writes them: rm /opt/zammad/public/assets/*.js*

1 Like

This topic was automatically closed after 416 days. New replies are no longer allowed.