Re: Linking javascript with templates

Alexis HAUSER <[email protected]> Thu, 15 Mar 2018 10:32:18 +0100 (CET)
Newsgroups gmane.comp.otrs.devel
Message-ID <1532428521.13897834.1521106338134.JavaMail.zimbra@imt-atlantique.fr>
--===============0465872441466208347==
Content-Type: multipart/alternative; 
	boundary="=_ec26b1cb-7379-4c6a-9dea-aad8932720bd"

--=_ec26b1cb-7379-4c6a-9dea-aad8932720bd
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Thank you, I've checked in 'Loader::Customer::CommonJS###000-Framework' and=
 it seems it's already in. (autocomplete.js)=20

Actually what I would like to do is : add autocompletion for email adresses=
 in a custom field in customer interface (when posting or replying to a tic=
ket).=20
Do you have any idea how it would be possible to do that ?=20

From what I can see, in the rendered page, it looks like :=20

Core.Config.AddConfig({"Action":"AgentTicketCompose","Autocomplete":{"Custo=
merSearch":{"AutoCompleteActive":"1","ButtonText":"Search Customer","MaxRes=
ultsDisplayed":"20","MinQueryLength":"2","QueryDelay":"100"},"Default":{"Au=
toCompleteActive":"1" ...........=20

Best regards=20
Alexis=20





De: "Juan Manuel Clavero Almir=C3=B3n" <[email protected]>=20
=C3=80: "dev" <[email protected]>=20
Envoy=C3=A9: Jeudi 15 Mars 2018 10:15:27=20
Objet: Re: [dev] Linking javascript with templates=20

Hi,=20

you have to declare it in the config=20
If it's a library that should be available in the hole customer interface, =
then you should declare it in the 'Loader::Customer::CommonJS###000-Framewo=
rk' config entry. If it's only for a module, then you should do it in it's =
ModuleRegistration config entry=20

Kind regards,=20
Juan=20




On 15. Mar 2018, at 09:57, Alexis HAUSER < [ mailto:alexis.hauser@imt-atlan=
tique.fr | [email protected] ] > wrote:=20

Hi,=20

I would like to add some javascript from Agent interface to Customer interf=
ace.=20

In css, you only have to use the class names of HTML templates to choose wh=
at you do.=20

But how do you tell OTRS, "I want to load this javascript file for this pag=
e"...=20
I don't see the same class name from OTRS templates in javascript files...=
=20

Any clue ?=20


Best regards=20
Alexis=20

_______________________________________________=20
OTRS mailing list: dev - Webpage: [ http://otrs.org/ | http://otrs.org/ ]=
=20
Archive: [ http://lists.otrs.org/pipermail/dev | http://lists.otrs.org/pipe=
rmail/dev ]=20
To unsubscribe: [ http://lists.otrs.org/mailman/listinfo/dev | http://lists=
.otrs.org/mailman/listinfo/dev ]=20





_______________________________________________=20
OTRS mailing list: dev - Webpage: http://otrs.org/=20
Archive: http://lists.otrs.org/pipermail/dev=20
To unsubscribe: http://lists.otrs.org/mailman/listinfo/dev=20

--=_ec26b1cb-7379-4c6a-9dea-aad8932720bd
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

<html><body><div style=3D"font-family: arial, helvetica, sans-serif; font-s=
ize: 12pt; color: #000000"><div>Thank you, I've checked in 'Loader::Custome=
r::CommonJS###000-Framework' and it seems it's already in. (autocomplete.js=
)<br></div><div><br data-mce-bogus=3D"1"></div><div>Actually what I would l=
ike to do is : add autocompletion for email adresses in a custom field in c=
ustomer interface (when posting or replying to a ticket).<br data-mce-bogus=
=3D"1"></div><div>Do you have any idea how it would be possible to do that =
?<br data-mce-bogus=3D"1"></div><div><br data-mce-bogus=3D"1"></div><div>Fr=
om what I can see, in the rendered page, it looks like : <br data-mce-bogus=
=3D"1"></div><div><br data-mce-bogus=3D"1"></div><div><pre id=3D"line1"><sp=
an>Core.Config.AddConfig({"Action":"AgentTicketCompose","Autocomplete":{"Cu=
stomerSearch":{"AutoCompleteActive":"1","ButtonText":"Search Customer","Max=
ResultsDisplayed":"20","MinQueryLength":"2","QueryDelay":"100"},"Default":{=
"AutoCompleteActive":"1"</span>...........</pre></div><div><br data-mce-bog=
us=3D"1"></div><div>Best regards<br data-mce-bogus=3D"1"></div><div>Alexis<=
br data-mce-bogus=3D"1"></div><div><br data-mce-bogus=3D"1"></div><div><br =
data-mce-bogus=3D"1"></div><div><br data-mce-bogus=3D"1"></div><div><br dat=
a-mce-bogus=3D"1"></div><hr id=3D"zwchr" data-marker=3D"__DIVIDER__"><div d=
ata-marker=3D"__HEADERS__"><b>De: </b>"Juan Manuel Clavero Almir=C3=B3n" &l=
t;[email protected]&gt;<br><b>=C3=80: </b>"dev" &lt;[email protected].=
org&gt;<br><b>Envoy=C3=A9: </b>Jeudi 15 Mars 2018 10:15:27<br><b>Objet: </b=
>Re: [dev] Linking javascript with templates<br></div><div><br></div><div d=
ata-marker=3D"__QUOTED_TEXT__">Hi,<div class=3D""><br class=3D""><div class=
=3D"">you have to declare it in the config</div><div class=3D"">If it's a l=
ibrary that should be available in the hole customer interface, then you sh=
ould declare it in the 'Loader::Customer::CommonJS###000-Framework' config =
entry. If it's only for a module, then you should do it in it's ModuleRegis=
tration config entry</div><div class=3D""><br class=3D""></div><div class=
=3D"">Kind regards,</div><div class=3D"">Juan<br class=3D""><div><br class=
=3D""><blockquote class=3D""><div class=3D"">On 15. Mar 2018, at 09:57, Ale=
xis HAUSER &lt;<a href=3D"mailto:[email protected]" class=3D"=
" target=3D"_blank">[email protected]</a>&gt; wrote:</div><br=
 class=3D"Apple-interchange-newline"><div class=3D""><div class=3D""><div s=
tyle=3D"font-family: arial, helvetica, sans-serif; font-size: 12pt;" class=
=3D""><div class=3D"">Hi,<br class=3D""></div><div class=3D""><br class=3D"=
"></div><div class=3D"">I would like to add some javascript from Agent inte=
rface to Customer interface.<br class=3D""></div><div class=3D""><br class=
=3D""></div><div class=3D"">In css, you only have to use the class names of=
 HTML templates to choose what you do.<br class=3D""></div><div class=3D"">=
<br class=3D""></div><div class=3D"">But how do you tell OTRS, "I want to l=
oad this javascript file for this page"... <br class=3D""></div><div class=
=3D"">I don't see the same class name from OTRS templates in javascript fil=
es...<br class=3D""></div><div class=3D""><br class=3D""></div><div class=
=3D"">Any clue ?<br class=3D""></div><div class=3D""><br class=3D""></div><=
div class=3D""><br class=3D""></div><div class=3D"">Best regards<br class=
=3D""></div><div class=3D"">Alexis<br class=3D""></div><div class=3D""><br =
class=3D""></div></div></div>______________________________________________=
_<br class=3D"">OTRS mailing list: dev - Webpage: <a href=3D"http://otrs.or=
g/" class=3D"" target=3D"_blank">http://otrs.org/</a><br class=3D"">Archive=
: <a href=3D"http://lists.otrs.org/pipermail/dev" class=3D"" target=3D"_bla=
nk">http://lists.otrs.org/pipermail/dev</a><br class=3D"">To unsubscribe: <=
a href=3D"http://lists.otrs.org/mailman/listinfo/dev" class=3D"" target=3D"=
_blank">http://lists.otrs.org/mailman/listinfo/dev</a><br class=3D""></div>=
</blockquote></div><br class=3D""></div></div><br>_________________________=
______________________<br>OTRS mailing list: dev - Webpage: http://otrs.org=
/<br>Archive: http://lists.otrs.org/pipermail/dev<br>To unsubscribe: http:/=
/lists.otrs.org/mailman/listinfo/dev<br></div></div></body></html>
--=_ec26b1cb-7379-4c6a-9dea-aad8932720bd--

--===============0465872441466208347==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
OTRS mailing list: dev - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/dev
To unsubscribe: http://lists.otrs.org/mailman/listinfo/dev

--===============0465872441466208347==--