[pLog-svn] r3457 - plog/trunk/js/ui

Jon Daley plogworld at jon.limedaley.com
Mon Jun 5 23:37:47 GMT 2006


 	Oh, I take that back.  I get a javascript error if I leave the 
code the way you have it.  Can you confirm that you don't have a 
javascript error now?  Can you try it on Firefox?
 	Additionally, though I can remove all users from the box (either 
with your comment or not), when I hit "update", I get a failure if the box 
is empty.

On Mon, 5 Jun 2006, Jon Daley wrote:
> 	I checked this again.  Mine works either way, though with your way 
> the loop runs an extra time, but it doesn't seem to cause any problems, so I 
> can leave it the way you did it.
>
> On Wed, 24 May 2006, Jon Daley wrote:
>> 	I will try it.  Leaving the last user was part of what I had 
>> originally fixed.  Maybe I didn't try it with erasing all users from the 
>> blog, but just removing 2 of 3.  I will check.
>> 
>> On Wed, 24 May 2006, Oscar Renalias wrote:
>> 
>>> Try this:
>>> 
>>> 1) undo my change
>>> 2) edit one blog
>>> 3) in the list at the bottom of the page, add 3 users
>>> 4) select them all and try to remove them
>>> 
>>> You should get one left, even though you wanted to remove them all.
>>> 
>>> Now put my change by back and try again, all users should be gone now.
>>> 
>>> I was at least able to reproduce this behaviour.
>>> 
>>> Oscar
>>> 
>>> On 5/24/06, Jon Daley <plogworld at jon.limedaley.com> wrote:
>>>>         Why did you remove the length field?  Was it not working for you?
>>>> try printing out 'userList.options.length' each time through the loop.
>>>> And I think you will see that it is decremented when an item is set to
>>>> null.  Not decrementing length will not break anything, but it will loop
>>>> through non-existent items.
>>>> 
>>>> On Wed, 24 May 2006, oscar at devel.lifetype.net wrote:
>>>> 
>>>> > Author: oscar
>>>> > Date: 2006-05-24 08:25:33 +0000 (Wed, 24 May 2006)
>>>> > New Revision: 3457
>>>> >
>>>> > Modified:
>>>> >   plog/trunk/js/ui/common.js
>>>> > Log:
>>>> > This fix was introduced in revision r3441 but it broke removing 
>>>> multiple users because it always left the last one behind (it removed 
>>>> everything else except the last one)
>>>> > Jon, since you made the original fix, can you check if this breaks it 
>>>> again?
>>>> >
>>>> >
>>>> > Modified: plog/trunk/js/ui/common.js
>>>> > ===================================================================
>>>> > --- plog/trunk/js/ui/common.js        2006-05-24 08:06:21 UTC (rev 
>>>> 3456)
>>>> > +++ plog/trunk/js/ui/common.js        2006-05-24 08:25:33 UTC (rev 
>>>> 3457)
>>>> > @@ -435,7 +435,8 @@
>>>> >       for( i = 0; i < length; i++ ) {
>>>> >               if( userList.options[i].selected ){
>>>> >                       userList.options[i] = null;
>>>> > -            i--; length--;
>>>> > +            i--;
>>>> > +            //length--;
>>>> >         }
>>>> >       }
>>>> >       return( true );
>>>> >
>>>> > _______________________________________________
>>>> > pLog-svn mailing list
>>>> > pLog-svn at devel.lifetype.net
>>>> > http://devel.lifetype.net/mailman/listinfo/plog-svn
>>>> >
>>>> 
>>>> **************************************
>>>> Jon Daley
>>>> http://jon.limedaley.com/
>>>> 
>>>> Any tool, when dropped, will roll into the least accessible corner.
>>>> -- Anthony's Law of the Workshop
>>>> _______________________________________________
>>>> pLog-svn mailing list
>>>> pLog-svn at devel.lifetype.net
>>>> http://devel.lifetype.net/mailman/listinfo/plog-svn
>>>> 
>>> _______________________________________________
>>> pLog-svn mailing list
>>> pLog-svn at devel.lifetype.net
>>> http://devel.lifetype.net/mailman/listinfo/plog-svn
>>> 
>> 
>> **************************************
>> Jon Daley
>> http://jon.limedaley.com/
>> 
>> Worship isn't a noun, it's a verb.
>> -- Unknown
>> _______________________________________________
>> pLog-svn mailing list
>> pLog-svn at devel.lifetype.net
>> http://devel.lifetype.net/mailman/listinfo/plog-svn
>> 
>
> **************************************
> Jon Daley
> http://jon.limedaley.com/
>
> I was unhappy...but that's over, done, water under the dam.
> -- Cal Ripkin Sr.
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://devel.lifetype.net/mailman/listinfo/plog-svn
>

**************************************
Jon Daley
http://jon.limedaley.com/

Your mind is like a parachute.  It only works if it is open.
-- Anthony D'Angelo


More information about the pLog-svn mailing list