New Dynamic Field Type JavaScript files

Moderator: crythias

Locked
Reenuay
Znuny newbie
Posts: 3
Joined: 16 Jan 2017, 10:47
Znuny Version: 4 free
Real Name: Rustam Azizov
Company: Azedunet

New Dynamic Field Type JavaScript files

Post by Reenuay »

Hello everyone! I'm using OTRS 4 Free version. I'm writing a new dynamic field type module following instructions in official documentation. This field will do the same thing like JQuery Typeahead but for OTRS. Now an admin panel is already done for this this dynamic field. But I have a little problem with adding js files. For admin panel js files there is information in documentation. But I have no idea how can I add js or css files when "new email ticket" is created, for example. Please, give me information how can I do that correctly. Thank you in advance.
RStraub
Znuny guru
Posts: 2210
Joined: 13 Mar 2014, 09:16
Znuny Version: 6.0.14
Real Name: Rolf Straub

Re: New Dynamic Field Type JavaScript files

Post by RStraub »

Hello Reenuay,

try the SysConfig under Ticket -> Frontend::Module###AgentTicketEmail

There, add the path to your javascript file in the Loader config.
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
Reenuay
Znuny newbie
Posts: 3
Joined: 16 Jan 2017, 10:47
Znuny Version: 4 free
Real Name: Rustam Azizov
Company: Azedunet

Re: New Dynamic Field Type JavaScript files

Post by Reenuay »

RStraub wrote:Hello Reenuay,

try the SysConfig under Ticket -> Frontend::Module###AgentTicketEmail

There, add the path to your javascript file in the Loader config.
Thank you RStraub! If it is the best way then I'll use it.
Locked