Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Request Tracker: Devel

CSS/JS Files adding from Plugin

 

 

Request Tracker devel RSS feed   Index | Next | Previous | View Threaded


torsten.brumm at Kuehne-Nagel

Jun 7, 2013, 5:52 AM

Post #1 of 4 (158 views)
Permalink
CSS/JS Files adding from Plugin

Hi Developers,
whats the best way to add custom css/js files from a plugin into RT?

From customizing doc (http://bestpractical.com/rt/docs/4.0/customizing/styling_rt.html) it is recommended to

Set( @CSSFiles, ('my-site.css') );


But in many Extensions I find this way:

RT->AddStyleSheets('module.css')

RT->AddJavaScript("module.js");

Called from the Extension::Module.pm

Are both working the same way? Will both ways minified?

Greetins

Torsten

K?hne + Nagel (AG & Co.) KG, Gesch?ftsleitung: Hans-Georg Brinkmann (Vors.), Dirk Blesius, Reiner Heiken, Holger Ketz (Stellv.), Jan-Hendrik K?stergarten (Stellv.), Bruno Mang, Christian Marnett?, Jens Wollesen, Sitz: Bremen, Registergericht: Bremen, HRA 21928, USt-IdNr.: DE 812773878, Pers?nlich haftende Gesellschaft: K?hne & Nagel A.G., Sitz: Contern/Luxemburg Gesch?ftsf?hrender Verwaltungsrat: Karl Gernandt


falcone at bestpractical

Jun 7, 2013, 9:27 AM

Post #2 of 4 (149 views)
Permalink
Re: CSS/JS Files adding from Plugin [In reply to]

On Fri, Jun 07, 2013 at 12:52:25PM +0000, Brumm, Torsten / Kuehne + Nagel / Ham GI-ID wrote:
> whats the best way to add custom css/js files from a plugin into RT?
>
> From customizing doc ([1]http://bestpractical.com/rt/docs/4.0/customizing/styling_rt.html) it
> is recommended to
>
> Set( @CSSFiles, ('my-site.css') );
>
> But in many Extensions I find this way:
>
> RT->AddStyleSheets('module.css')
>
> RT->AddJavaScript("module.js");
>
> Called from the Extension::Module.pm
>
> Are both working the same way? Will both ways minified?

Those docs should also be linking to
http://bestpractical.com/rt/docs/latest/RT.html#AddStyleSheets
which is RT->AddStyleSheets

If you're an admin who is just adding a new css or js file, but not
writing an extension, then use @CSSFiles. If you're writing an
extension, use the RT-> methods.

They both minify.

-kevin


ruz at bestpractical

Jun 7, 2013, 10:01 AM

Post #3 of 4 (150 views)
Permalink
Re: CSS/JS Files adding from Plugin [In reply to]

Hi,

Use methods in extensions. That doc you referenced is more for admins to do
local and quick customizations.


On Fri, Jun 7, 2013 at 4:52 PM, Brumm, Torsten / Kuehne + Nagel / Ham GI-ID
<torsten.brumm [at] kuehne-nagel> wrote:

> Hi Developers,
>
> whats the best way to add custom css/js files from a plugin into RT?
>
>
>
> From customizing doc (
> http://bestpractical.com/rt/docs/4.0/customizing/styling_rt.html) it is
> recommended to
>
>
>
> Set( @CSSFiles, ('my-site.css') );
>
>
>
>
>
> But in many Extensions I find this way:
>
>
>
> RT->AddStyleSheets('module.css')
>
>
>
> RT->AddJavaScript("module.js");
>
>
>
> Called from the Extension::Module.pm
>
>
>
> Are both working the same way? Will both ways minified?
>
>
>
> Greetins
>
>
> Torsten
>
>
> Kühne + Nagel (AG & Co.) KG, Geschäftsleitung: Hans-Georg Brinkmann
> (Vors.), Dirk Blesius, Reiner Heiken, Holger Ketz (Stellv.), Jan-Hendrik
> Köstergarten (Stellv.), Bruno Mang, Christian Marnetté, Jens Wollesen,
> Sitz: Bremen, Registergericht: Bremen, HRA 21928, USt-IdNr.: DE 812773878,
> Persönlich haftende Gesellschaft: Kühne & Nagel A.G., Sitz:
> Contern/Luxemburg Geschäftsführender Verwaltungsrat: Karl Gernandt
>
>
>
> --
> RT Training in Seattle, June 19-20: http://bestpractical.com/training
>



--
Best regards, Ruslan.


tbrumm at mac

Jun 7, 2013, 10:18 AM

Post #4 of 4 (151 views)
Permalink
Re: CSS/JS Files adding from Plugin [In reply to]

Thanks Ruslan & Kevin,

Torsten
Am 07.06.2013 um 19:01 schrieb Ruslan Zakirov:

> Hi,
>
> Use methods in extensions. That doc you referenced is more for admins to do local and quick customizations.
>
>
> On Fri, Jun 7, 2013 at 4:52 PM, Brumm, Torsten / Kuehne + Nagel / Ham GI-ID <torsten.brumm [at] kuehne-nagel> wrote:
> Hi Developers,
>
> whats the best way to add custom css/js files from a plugin into RT?
>
>
> From customizing doc (http://bestpractical.com/rt/docs/4.0/customizing/styling_rt.html) it is recommended to
>
>
> Set( @CSSFiles, ('my-site.css') );
>
>
>
> But in many Extensions I find this way:
>
>
> RT->AddStyleSheets('module.css')
>
>
> RT->AddJavaScript("module.js");
>
>
> Called from the Extension::Module.pm
>
>
> Are both working the same way? Will both ways minified?
>
>
> Greetins
>
>
> Torsten
>
>
> Kühne + Nagel (AG & Co.) KG, Geschäftsleitung: Hans-Georg Brinkmann (Vors.), Dirk Blesius, Reiner Heiken, Holger Ketz (Stellv.), Jan-Hendrik Köstergarten (Stellv.), Bruno Mang, Christian Marnetté, Jens Wollesen, Sitz: Bremen, Registergericht: Bremen, HRA 21928, USt-IdNr.: DE 812773878, Persönlich haftende Gesellschaft: Kühne & Nagel A.G., Sitz: Contern/Luxemburg Geschäftsführender Verwaltungsrat: Karl Gernandt
>
>
>
>
> --
> RT Training in Seattle, June 19-20: http://bestpractical.com/training
>
>
>
> --
> Best regards, Ruslan.
>
>
> --
> RT Training in Seattle, June 19-20: http://bestpractical.com/training

Request Tracker devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.