Re: Linking javascript with templates
Juan Manuel Clavero Almirón <[email protected]> Thu, 15 Mar 2018 10:53:46 +0100
| Newsgroups | gmane.comp.otrs.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============6458181501640526621== Content-Type: multipart/signed; boundary="Apple-Mail=_B360EFFF-D33A-4A4A-AD50-B534C42B8EE7"; protocol="application/pgp-signature"; micalg=pgp-sha256 --Apple-Mail=_B360EFFF-D33A-4A4A-AD50-B534C42B8EE7 Content-Type: multipart/alternative; boundary="Apple-Mail=_F4F31173-660D-40D9-9FC2-1F420ADE898E" --Apple-Mail=_F4F31173-660D-40D9-9FC2-1F420ADE898E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi, sorry, I have no idea about that > On 15. Mar 2018, at 10:32, Alexis HAUSER = <[email protected]> wrote: >=20 > 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 ticket). > Do you have any idea how it would be possible to do that ? >=20 > =46rom what I can see, in the rendered page, it looks like : >=20 > = Core.Config.AddConfig({"Action":"AgentTicketCompose","Autocomplete":{"Cust= omerSearch":{"AutoCompleteActive":"1","ButtonText":"Search = Customer","MaxResultsDisplayed":"20","MinQueryLength":"2","QueryDelay":"10= 0"},"Default":{"AutoCompleteActive":"1"........... >=20 > Best regards > Alexis >=20 >=20 >=20 >=20 > De: "Juan Manuel Clavero Almir=C3=B3n" <[email protected]> > =C3=80: "dev" <[email protected]> > Envoy=C3=A9: Jeudi 15 Mars 2018 10:15:27 > Objet: Re: [dev] Linking javascript with templates >=20 > Hi, >=20 > you have to declare it in the config > 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-Framework' config entry. If it's only = for a module, then you should do it in it's ModuleRegistration config = entry >=20 > Kind regards, > Juan >=20 > On 15. Mar 2018, at 09:57, Alexis HAUSER = <[email protected] = <mailto:[email protected]>> wrote: >=20 > Hi, >=20 > I would like to add some javascript from Agent interface to Customer = interface. >=20 > In css, you only have to use the class names of HTML templates to = choose what you do. >=20 > But how do you tell OTRS, "I want to load this javascript file for = this page"... > I don't see the same class name from OTRS templates in javascript = files... >=20 > Any clue ? >=20 >=20 > Best regards > Alexis >=20 > _______________________________________________ > OTRS mailing list: dev - Webpage: http://otrs.org/ <http://otrs.org/> > Archive: http://lists.otrs.org/pipermail/dev = <http://lists.otrs.org/pipermail/dev> > 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/ > Archive: http://lists.otrs.org/pipermail/dev > To unsubscribe: http://lists.otrs.org/mailman/listinfo/dev > _______________________________________________ > OTRS mailing list: dev - Webpage: http://otrs.org/ > Archive: http://lists.otrs.org/pipermail/dev > To unsubscribe: http://lists.otrs.org/mailman/listinfo/dev --Apple-Mail=_F4F31173-660D-40D9-9FC2-1F420ADE898E Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; = charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; line-break: after-white-space;" = class=3D"">Hi,<div class=3D"">sorry, I have no idea about that<br = class=3D""><div><br class=3D""><blockquote type=3D"cite" class=3D""><div = class=3D"">On 15. Mar 2018, at 10:32, Alexis HAUSER <<a = href=3D"mailto:[email protected]" = class=3D"">[email protected]</a>> wrote:</div><br = class=3D"Apple-interchange-newline"><div class=3D""><div class=3D""><div = style=3D"font-family: arial, helvetica, sans-serif; font-size: 12pt;" = class=3D""><div class=3D"">Thank you, I've checked in = 'Loader::Customer::CommonJS###000-Framework' and it seems it's already = in. (autocomplete.js)<br class=3D""></div><div class=3D""><br = data-mce-bogus=3D"1" class=3D""></div><div class=3D"">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 ticket).<br = data-mce-bogus=3D"1" class=3D""></div><div class=3D"">Do you have any = idea how it would be possible to do that ?<br data-mce-bogus=3D"1" = class=3D""></div><div class=3D""><br data-mce-bogus=3D"1" = class=3D""></div><div class=3D"">=46rom what I can see, in the rendered = page, it looks like : <br data-mce-bogus=3D"1" class=3D""></div><div = class=3D""><br data-mce-bogus=3D"1" class=3D""></div><div class=3D""><pre = id=3D"line1" class=3D""><span = class=3D"">Core.Config.AddConfig({"Action":"AgentTicketCompose","Autocompl= ete":{"CustomerSearch":{"AutoCompleteActive":"1","ButtonText":"Search = Customer","MaxResultsDisplayed":"20","MinQueryLength":"2","QueryDelay":"10= 0"},"Default":{"AutoCompleteActive":"1"</span>...........</pre></div><div = class=3D""><br data-mce-bogus=3D"1" class=3D""></div><div class=3D"">Best = regards<br data-mce-bogus=3D"1" class=3D""></div><div class=3D"">Alexis<br= data-mce-bogus=3D"1" class=3D""></div><div class=3D""><br = data-mce-bogus=3D"1" class=3D""></div><div class=3D""><br = data-mce-bogus=3D"1" class=3D""></div><div class=3D""><br = data-mce-bogus=3D"1" class=3D""></div><div class=3D""><br = data-mce-bogus=3D"1" class=3D""></div><hr id=3D"zwchr" = data-marker=3D"__DIVIDER__" class=3D""><div data-marker=3D"__HEADERS__" = class=3D""><b class=3D"">De: </b>"Juan Manuel Clavero Almir=C3=B3n" = <<a href=3D"mailto:[email protected]" = class=3D"">[email protected]</a>><br class=3D""><b = class=3D"">=C3=80: </b>"dev" <<a href=3D"mailto:[email protected]" = class=3D"">[email protected]</a>><br class=3D""><b class=3D"">Envoy=C3= =A9: </b>Jeudi 15 Mars 2018 10:15:27<br class=3D""><b class=3D"">Objet: = </b>Re: [dev] Linking javascript with templates<br class=3D""></div><div = class=3D""><br class=3D""></div><div data-marker=3D"__QUOTED_TEXT__" = class=3D"">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 library that = should be available in the hole customer interface, then you should = 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 = ModuleRegistration config entry</div><div class=3D""><br = class=3D""></div><div class=3D"">Kind regards,</div><div = class=3D"">Juan<br class=3D""><div class=3D""><br class=3D""><blockquote = class=3D""><div class=3D"">On 15. Mar 2018, at 09:57, Alexis HAUSER = <<a href=3D"mailto:[email protected]" class=3D"" = target=3D"_blank">[email protected]</a>> = wrote:</div><br class=3D"Apple-interchange-newline"><div class=3D""><div = class=3D""><div style=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 interface 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 load 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 files...<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.org/" 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"_blank">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 = class=3D"">_______________________________________________<br = class=3D"">OTRS mailing list: dev - Webpage: <a href=3D"http://otrs.org/" = class=3D"">http://otrs.org/</a><br class=3D"">Archive: <a = href=3D"http://lists.otrs.org/pipermail/dev" = class=3D"">http://lists.otrs.org/pipermail/dev</a><br class=3D"">To = unsubscribe: <a href=3D"http://lists.otrs.org/mailman/listinfo/dev" = class=3D"">http://lists.otrs.org/mailman/listinfo/dev</a><br = class=3D""></div></div></div>_____________________________________________= __<br class=3D"">OTRS mailing list: dev - Webpage: <a = href=3D"http://otrs.org/" class=3D"">http://otrs.org/</a><br = class=3D"">Archive: <a href=3D"http://lists.otrs.org/pipermail/dev" = class=3D"">http://lists.otrs.org/pipermail/dev</a><br class=3D"">To = unsubscribe: <a href=3D"http://lists.otrs.org/mailman/listinfo/dev" = class=3D"">http://lists.otrs.org/mailman/listinfo/dev</a><br = class=3D""></div></blockquote></div><br class=3D""></div></body></html>= --Apple-Mail=_F4F31173-660D-40D9-9FC2-1F420ADE898E-- --Apple-Mail=_B360EFFF-D33A-4A4A-AD50-B534C42B8EE7 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEESvTK4LQ/IfdB+NdBrCkc7elaNgcFAlqqQqoACgkQrCkc7ela NgcWwg/+PspFgeY26Nl/FzYvNQAWYTdvcqZCupGbXD0xu+QzuXd9Cd1/4A9cUyaO 5acCC9t0OnJSvY6f0NPV8snuK2pXpiO2W/HIFuWp833us/Jvam+MZUacuydSP7mc A1tTSanlnwWrac43VOHAWF8F1WaEYV+mD5yg2ahAg0zjonJziTNO+raeGMHiM14r USxTkcLcBjfGLJ6EVH7kRL7VBOB4NdjVKPir/dd6EGwBWCX/chMYmhRitgoxOhNV mxeUrgAWS0mpqAK3qaHLdFbLcu7qg/ZpK0CMXl31urHE/zPyJ+kS+rcE82M2NXdN tXa+9cQjxl93VMpdMwAYKo4eV9iRR8BtMsUOeRi+W7cRsiZaYgOi35iyx+l0c0xz rOSz8nJXMtyCv7xcVB0cnhBoOgSC1Tf6fvLnu8i615N7ddBwDJ1xzJN3PdIKmca4 i1Os5Jf5DBoHaoTn0QeccvmlzrCu4AU+1npqKzB25ILBu2q5fqZk4rmFxxwepveH 4mskxZQUgU66G508V+Cv1UYbyV0pCylgJHf6+LNAnWIbQgonV4xR9QnhoM8g96mB bAzZdRZ3C27nmHGeAkjCSXjnt3Zlp+whVyi/Xb6KwkZbhJDeH2trHgEDSymdAHyU TzUUalYPBz8TLgmTYlVuwkpQTYXiSqvzbyY7YK3G8m8lS9BOmqw= =3Edn -----END PGP SIGNATURE----- --Apple-Mail=_B360EFFF-D33A-4A4A-AD50-B534C42B8EE7-- --===============6458181501640526621== 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 --===============6458181501640526621==--