incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dirk Frederickx (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (JSPWIKI-34) %%collapse causes bullets at same level to be increasingly indented
Date Sat, 25 Jun 2011 09:04:47 GMT

     [ https://issues.apache.org/jira/browse/JSPWIKI-34?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Dirk Frederickx updated JSPWIKI-34:
-----------------------------------

    Comment: was deleted

(was: 
Something is going wrong in the function clickBullet() (only) in Chrome.
Normally clickBullet should receive 3 parameters.
But in chrome it receives an array with those 3 parameters.


You can try following fix:

Original code
> clickBullet: function( ck, bulletidx, bodyfx){
>               var collapse = this.hasClass('collapseOpen'),
>                       bodyHeight = bodyfx.element.scrollHeight;
>
>               if(collapse) bodyfx.start(bodyHeight, 0); else bodyfx.start(bodyHeight);
>
>               ck.value = ck.value.substring(0,bulletidx) + (collapse ? 'c' : 'o')
> + ck.value.substring(bulletidx+1) ;
>               if(ck.name) Cookie.set(ck.name, ck.value, {path:Wiki.BasePath, duration:20});
>       },

Corrected code
> clickBullet: function( ck, bulletidx, bodyfx){
>
>                 //protective GOOGLE CHROME fix
>                 if($type(ck) == 'array'){
>                     bulletidx = ck[1];
>                     bodyfx = ck[2];
>                     ck = ck[0];
>                 }
>
>               var collapse = this.hasClass('collapseOpen'),
>                       bodyHeight = bodyfx.element.scrollHeight;
>
>               if(collapse) bodyfx.start(bodyHeight, 0); else bodyfx.start(bodyHeight);
>
>               ck.value = ck.value.substring(0,bulletidx) + (collapse ? 'c' : 'o')
> + ck.value.substring(bulletidx+1) ;
>               if(ck.name) Cookie.set(ck.name, ck.value, {path:Wiki.BasePath, duration:20});
>       },


If you are changing the compressed JS code, you probably need something like this:

     //protective GOOGLE CHROME fix
       if($type(ck) == 'array'){
           _ec = ck[1];
           _ed = ck[2];
           ck = ck[0];
       }


I need to check in which version of JSPWiki this is already resolved.  So for the time, leave
this issue open.

dirk

)

> %%collapse causes bullets at same level to be increasingly indented
> -------------------------------------------------------------------
>
>                 Key: JSPWIKI-34
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-34
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Default template
>    Affects Versions: 2.6.0
>         Environment: jspwiki.org, currently running 2.5.152-cvs
>            Reporter: Dave Wolf
>            Assignee: Dirk Frederickx
>            Priority: Minor
>             Fix For: 2.6.0
>
>         Attachments: Picture 1.png, Picture 2.png, screen shot.png
>
>
> I noticed my long-existing "My Favorites" page was being rendered with each bullet increasingly
indented below other bullets at the same level. When I removed the %%collapse directive, the
formating was corrected, but of course the collapsable list functionality was removed.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message