Il giorno gio, 08/04/2010 alle 14.26 +0200, Yuri ha scritto:
> Gio anche a voi, sicuramente avrete affrontato la questione...
>
> su italian skin ho trovato questo:
>
>
> <?xml version="1.0"?>
> <object name="portal_css">
>
> <stylesheet title="Plone Default (contrast improved)"
> id="italianskin.css"
> media="screen" rel="stylesheet" rendering="import"
> cacheable="True" compression="safe" cookable="True"
> enabled="1" expression=""/>
> <stylesheet title="high contrast (background black)"
> id="highcontrast.css"
> media="screen" rel="stylesheet" rendering="import"
> cacheable="True" compression="safe" cookable="True"
> enabled="1" expression=""/>
> <stylesheet title="high contrast (background black and padding/fonts
> modified)"
> id="highcontrast_padding.css"
> media="screen" rel="stylesheet" rendering="import"
> cacheable="True" compression="safe" cookable="True"
> enabled="1" expression=""/>
>
> </object>
>
> però non ho ben capito qual è il javascript che agisce, potete
> indicarmelo? Grazie :)
Ciao Yuri,
quella parte necessita una bella ripulita e prossimamente verrà
ampiamente modernizzata e riorganizzata.
Era stato pensato in modo tale da non richiedere javascript.
Il tutto è basato su una classe applicata al body e settata usando uno
script. Più o meno suona così:
main_template:
<body tal:attributes="class string:${here/getSectionFromURL}
template-${template/id} ${request/cookies/fontsize|nothing};
dir python:test(isRTL, 'rtl', 'ltr')">
change_style.py
## Script (Python) "change_style"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=style
##title=
##
request = container.REQUEST
response = request.RESPONSE
response.setCookie("fontsize", style)
return response.redirect(request.HTTP_REFERER)
--
Davide Moro
Redomino S.r.l.
Largo Valgioie 14,
10146 Torino Italy
Tel: +39 0117499875
http://redomino.com
_______________________________________________
Plone-IT mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/plone-it
http://www.nabble.com/Plone---Italy-f21728.html