Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: The One on July 11, 2005, 08:52:48 AM

Title: Bug with lists
Post by: The One on July 11, 2005, 08:52:48 AM
I tried using the list tags button to create list. I selected the text I wanted to be made a list and then clicked the list button.
This was the code that was generated
[list]
[li]test1
test2
test3[/li]
[li][/li]
[/list]

What I actually wanted after I typed the list is shown below
Input

[list]
[li]test1[/li]
[li]test2[/li]
[li]test3[/li]
[/list]


This looks like a bug.
Title: Re: Bug with lists
Post by: [Unknown] on July 11, 2005, 05:33:33 PM
It's not meant to make each line a li.  For that, I would suggest:


[*] line1
[*] line2
[*] line3


-[Unknown]
Title: Re: Bug with lists
Post by: The One on July 12, 2005, 09:15:06 AM
Then what else was it meant to do?
Title: Re: Bug with lists
Post by: [Unknown] on July 13, 2005, 04:02:31 AM
It's meant to surround the selected text with [li] bbc tags.

-[Unknown]
Title: Re: Bug with lists
Post by: The One on July 13, 2005, 04:48:26 AM
That doesn't look like a very good use of those tags.
In which files does the logic for modifying this lie? (Maybe I could try it out  ;))
Title: Re: Bug with lists
Post by: [Unknown] on July 13, 2005, 05:10:46 AM
Just the Post template, and script.js.  Every button uses basically the same code.

It would seem completely illogical and counter intuitive to me if the Bold and List buttons did entirely different things.  Plus it would make me think you couldn't have items in a list that are more than one line long.

-[Unknown]
Title: Re: Bug with lists
Post by: The One on July 13, 2005, 08:28:55 AM
Do you mean to say that each list element should have a
[list][li]row 1[/li]
[li][/li]
[/list]
surrounding it?
I don't think the [list][/list] is necessary for each element. also what do the blank 'li' tags do there?
Title: Re: Bug with lists
Post by: [Unknown] on July 13, 2005, 12:27:15 PM
It does a basic set to give you a template to create a list.  It still surrounds what you've selected like everything else.

-[Unknown]
Title: Re: Bug with lists
Post by: The One on July 14, 2005, 12:42:05 AM
Wouldn't it be better if it could give you the list with elements itself. Only for items that are more the one line long would we need to delete the 'li' tags.
Compared to the above, surrounding each item with the whole list, li and blank li tags that are generated right now seems like a waste of time.
Instead if we could have it just surround the whole list with 'list' tags and the lines with 'li' each, that would be more intutive (in fact that is what I expectd to do when I used it for the first time).
Title: Re: Bug with lists
Post by: The One on July 16, 2005, 08:54:01 AM
No?
Title: Re: Bug with lists
Post by: dcmouser on October 20, 2005, 08:24:02 PM
I agree 100%, altering the javascript to do this would be a really nice improvement.
Title: Re: Bug with lists
Post by: dcmouser on October 22, 2005, 10:51:33 PM
ok we've finally upgraded to rc1.1 and i've implemented feature and will be posting it along with a bunch of more significant smf modifications in the next week to www.donationcoder.com in our Site Downloads section.

-mouser
http://www.donationcoder.com