Author: vmassol
Date: 2008-02-01 15:32:08 +0100 (Fri, 01 Feb 2008)
New Revision: 7263

Modified:
   xwiki-platform/skins/trunk/albatross/src/main/resources/albatross/macros.vm
Log:
XWIKI-2053: Provide CSS hooks to allow to style Panels selectively


Modified: 
xwiki-platform/skins/trunk/albatross/src/main/resources/albatross/macros.vm
===================================================================
--- xwiki-platform/skins/trunk/albatross/src/main/resources/albatross/macros.vm 
2008-02-01 14:10:21 UTC (rev 7262)
+++ xwiki-platform/skins/trunk/albatross/src/main/resources/albatross/macros.vm 
2008-02-01 14:32:08 UTC (rev 7263)
@@ -9,20 +9,28 @@
 #set($cookieName = "${context.user}_${panel}")
 #set($expanded = "expanded")
 #set($expanded = $xwiki.getUserPreferenceFromCookie($cookieName))
-<div class="panel $expanded">
+## Note: We pass the Panel name as an HTML class attribute so that it's 
possible to style
+## the Panels selectively using CSS.
+<div class="panel $expanded $util.convertToAlphaNumeric($paneldoc.name)">
 <h5 class="xwikipaneltitle" onclick="if(eltHasClass(this.parentNode, 
'expanded')) createCookie('$cookieName','collapsed', ''); else 
eraseCookie('$cookieName'); togglePanelVisibility(this.parentNode);">$title</h5>
 <div class="xwikipanelcontents">
 #end
+
 #macro(panelhiddenheader $title)
-<div class="panel expanded">
+## Note: We pass the Panel name as an HTML class attribute so that it's 
possible to style
+## the Panels selectively using CSS.
+<div class="panel expanded $util.convertToAlphaNumeric($paneldoc.name)">
 <h5 class="xwikipaneltitle hidden" 
onclick="togglePanelVisibility(this.parentNode);">$title</h5>
 <div class="xwikipanelcontents">
 #end
+
 #macro(largepanelheader $title)
 #set($cookieName = "${context.user}_${panel}")
 #set($expanded = "expanded")
 #set($expanded = $xwiki.getUserPreferenceFromCookie($cookieName))
-<div class="large panel $expanded">
+## Note: We pass the Panel name as an HTML class attribute so that it's 
possible to style
+## the Panels selectively using CSS.
+<div class="large panel $expanded $util.convertToAlphaNumeric($paneldoc.name)">
 <h5 class="xwikipaneltitle" onclick="if(eltHasClass(this.parentNode, 
'expanded')) createCookie('$cookieName','collapsed', ''); else 
eraseCookie('$cookieName'); togglePanelVisibility(this.parentNode);">$title</h5>
 <div class="xwikipanelcontents">
 #end

_______________________________________________
notifications mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/notifications

Reply via email to