[Erp5-dev] css and js list - refactoring?
Jean-Paul Smets
jp at nexedi.com
Tue Apr 1 19:22:41 CEST 2008
Hi,
I understand the requirement and I think it is already possible to do
with existing xhtml_style because the global variables which contain the
list of CSS or JS can be updated by any component which is used in the
HTML renderer (ex. a listbox renderer).
I do not agree with the ERP5Site_getCSSList approach. We used to have
some time ago a kind of script like this in erp5_web and it was not a
really good solution because it lead to a central definition of CSS or
JS list rather than a distributed one (at the level of each component
which participates in the rendering).
I would prefer
a- either keeping the current approach if it is possible (because it
does not require accessing yet another object in the rendering process)
b- or implement a tool in charge of registering CSS and JSS required
for rendering a page and then return either a list of registered CSS /
JS or a minimised version of the concatenation of all CSS. Some CMS
systems use this approach to accelerate the rendering of pages by the
Web Browser.
Regards,
JPS.
bartek a écrit :
> Hello,
>
> Would there be any objections agains factoring css list and js list out
> of global_definitions, into scripts like:
> ERP5Site_getCSSList
> ERP5Site_getJSList
> ?
>
> RATIONALE: When doing experimental stuff there is often a need to add
> something there - at the moment one has to either overwrite
> global_definitions or do weird hacks to put two dtml docs of the same
> name together. Such small refactoring make it much, much easier.
>
> Bartek
>
>
--
Jean-Paul Smets-Solanes, Nexedi CEO - Tel. +33(0)6 62 05 76 14
ERP5 Enterprise: Free / Open Source ERP for Critical Applications
http://www.erp5.com
ERP5 Express: Hosted Open Source ERP for small companies
http://www.myerp5.com
Nexedi: Consulting and Development of Free / Open Source Software
http://www.nexedi.com
More information about the Erp5-dev
mailing list