Re: Linking javascript with templates

Juan Manuel Clavero Almirón <[email protected]> Thu, 15 Mar 2018 10:15:27 +0100
Newsgroups gmane.comp.otrs.devel
Message-ID <[email protected]>
--===============9168722064238873708==
Content-Type: multipart/signed;
	boundary="Apple-Mail=_9B191030-8B7C-4B6E-87C9-8259A90E1919";
	protocol="application/pgp-signature";
	micalg=pgp-sha256


--Apple-Mail=_9B191030-8B7C-4B6E-87C9-8259A90E1919
Content-Type: multipart/alternative;
	boundary="Apple-Mail=_BA05EC99-70E6-4724-9D35-CA364CBD60EC"


--Apple-Mail=_BA05EC99-70E6-4724-9D35-CA364CBD60EC
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

Hi,

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

Kind regards,
Juan

> On 15. Mar 2018, at 09:57, Alexis HAUSER =
<[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/
> Archive: http://lists.otrs.org/pipermail/dev
> To unsubscribe: http://lists.otrs.org/mailman/listinfo/dev


--Apple-Mail=_BA05EC99-70E6-4724-9D35-CA364CBD60EC
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=us-ascii

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3Dus-ascii"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;" =
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><br class=3D""><blockquote =
type=3D"cite" class=3D""><div class=3D"">On 15. Mar 2018, at 09:57, =
Alexis HAUSER &lt;<a href=3D"mailto:[email protected]" =
class=3D"">[email protected]</a>&gt; 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 =
data-mce-bogus=3D"1" 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 data-mce-bogus=3D"1" =
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 data-mce-bogus=3D"1" =
class=3D""></div><div class=3D""><br data-mce-bogus=3D"1" =
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 data-mce-bogus=3D"1" class=3D""></div><div =
class=3D""><br data-mce-bogus=3D"1" class=3D""></div><div class=3D"">Any =
clue ?<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"">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></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></div></body></html>=

--Apple-Mail=_BA05EC99-70E6-4724-9D35-CA364CBD60EC--

--Apple-Mail=_9B191030-8B7C-4B6E-87C9-8259A90E1919
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+NdBrCkc7elaNgcFAlqqOa8ACgkQrCkc7ela
NgcM3g//aI8kVN4EIw5EsJ45tUMke4oIQy3ZhXs2uq5cGyu1C9FTusxKVDXU/oiw
JjaAsevK3VCN3IHlJF1JIpx7/qrfH127RURc6YThl/PnLQQI1d/cjyot9whCRkdc
K2JVxKAeS9xsaEMfLsVjVboJR44gCFe1Z6ZemGNKL6qupp/Z1aD/1ezfjVBRltqX
PWQBBPmUnmwEZ+mUN+nIMKY9+N23lOzpSPBQvNcTVlNq96csOmD59lCQUdNgjNUf
hB8z8pPG0UW/7wnDjep87M1zU8vyL5hbblX89lNSWDc7AikyPKzi8v4zzu47w6fU
q0+SOm0nVOxEaQpQhqjwu5TqFw79fPrRrSEN9N3xpqp3en035KLkEmIRqWfkawKu
gF4nHAk9tQUtlkjAiIvtcHETi+ttwn/ohghoX92J1+uQe+MMbQKJC7EQaoiVrlbj
ac6858khVlZeCOdBvEKVLimidf3MmPvLjZM3QnlvsY22kHkVWV/w+ZjgPvJrOfhz
c39nZ0MtDXlIt+k8/syWWjb3NY5F8kdcq63agpbsAVxoEPSqTS9WqGrNqdfofDr8
D4rIvavdH2ec2uSwq4JXGpQXiJ2Cm/J7+IRDRr6k3Pl5QrbodOjYROZtBVG4xqm3
FQfluoiCcEi3j+/nI0M9KYZ8vjXa/cux5LC6IzyxOczayKFYOqE=
=CxLs
-----END PGP SIGNATURE-----

--Apple-Mail=_9B191030-8B7C-4B6E-87C9-8259A90E1919--

--===============9168722064238873708==
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

--===============9168722064238873708==--