Hi, Ricardo I've tested your macro and it behaves just as before.. I guess I'll try to upgrade the wiki and see if it is one of the solved bugs.
regards, Joao On 13/03/2008, Joao Henrique Silva Santos <[EMAIL PROTECTED]> wrote: > Hi. > Thanks again for the detailed reply and your macro > > I tested different browsers (IE 7 , IE6, Firefox) in different > machines (1 browser <> 1 machine). > Also, i've modified the macros.vm to include the new macro. > > I will test your macro and post again when I'm done with testing. > > regard, > Joao > > On 13/03/2008, [Ricardo Rodriguez] Your EPEC Network ICT Team > > <[EMAIL PROTECTED]> wrote: > > Hi Joao, > > > > > > Joao Henrique Silva Santos wrote: > > > > > Finally, even a panel which uses the standard panelheader does not > > > behave properly. > > > Does anybody have a possible explanation / common problems? > > > > > > > > > > > > I am not able to reproduce what you are describing. The macro works fine > > for me. I've modified it a bit. Perhaps it is clearer now. See this... > > > > #set($initialState= "collapsed") > > #set($alternativeState="expanded") > > > > #macro(panelheaderc $title) > > > > #set($cookieName = "${context.user}_${panel}") > > > > #set($expanded = $initialState) > > > > #set($expanded = $xwiki.getUserPreferenceFromCookie($cookieName)) > > ## Note: We pass the Panel name as an HTML class attribute so that it's > > possible to style > > ## the Panels selectively using CSS. > > #set ($specialClassAttribute = "") > > #if ($paneldoc && $paneldoc != "") > > #set ($specialClassAttribute = > > $util.convertToAlphaNumeric($paneldoc.name)) > > #end > > <div class="panel $expanded $specialClassAttribute"> > > <h5 class="xwikipaneltitle" onclick="if(eltHasClass(this.parentNode, > > > > '$initialState')) createCookie('$cookieName','$alternativeState', ''); > > > > else eraseCookie('$cookieName'); > > togglePanelVisibility(this.parentNode);">$title</h5> > > <div class="xwikipanelcontents"> > > #end > > > > > > Initial state can be easily moved to each panel content. Alternative > > state can be easily set with a if-else-end structure. I am falling while > > evaluating the value of $initialState, but this is only a matter of > > looking for the right syntax. > > > > If you are using a modified macros.vm including the customized macros, I > > am not able to figure out any problem other than a malfunction at your > > browser level. Have you tried with several browsers from the same box? > > Could you try this version I am proposing? It works fine here. > > > > But if you are using a #includemacros("macrosFile") statement, it could > > be a matter of where you use it. I don't know how to put it this macro's > > call to affect the whole site without modifying macro.vm. I don't know > > if this is possible or we must include it in all and any documents > > needing the macros included there. I will do some more research prior to > > posting a question about this. Any input will be welcome!!!! Thanks. > > > > Best, > > > > > > Ricardo > > > > -- > > Ricardo RodrÃguez > > Your EPEC Network ICT Team > > > > _______________________________________________ > > users mailing list > > users@xwiki.org > > http://lists.xwiki.org/mailman/listinfo/users > > > _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users