Author Topic: New code: Advanced tables (Now with sorting)  (Read 24355 times)

Offline Nanshork

  • Homebrew Reviewer
  • Administrator
  • *****
  • Posts: 13393
    • View Profile
Re: New code: Advanced tables (Now with sorting)
« Reply #40 on: September 18, 2012, 05:03:23 PM »
I'm using Firefox, however it apparently works in IE.   :???

Offline Maat Mons

  • DnD Handbook Writer
  • ****
  • Posts: 1203
  • What is a smile but a grimace of happiness?
    • View Profile
Re: New code: Advanced tables (Now with sorting)
« Reply #41 on: September 18, 2012, 07:01:43 PM »
I'm using Firefox.  It didn't work when I looked the first time, but it does now. 

Offline veekie

  • Spinner of Fortunes
  • Epic Member
  • ****
  • Posts: 5423
  • Chaos Dice
    • View Profile
Re: New code: Advanced tables (Now with sorting)
« Reply #42 on: September 19, 2012, 04:02:26 AM »
Odd, not working on my 'fox either.
Everything is edible. Just that there are things only edible once per lifetime.
It's a god-eat-god world.

Procrastination is the thief of time; Year after year it steals, till all are fled,
And to the mercies of a moment leaves; The vast concerns of an eternal scene.

Offline Prime32

  • Over-Underling
  • Retired Admin
  • *****
  • Posts: 2914
    • View Profile
Re: New code: Advanced tables (Now with sorting)
« Reply #43 on: September 19, 2012, 09:12:45 AM »
Probably an issue with cache or cookies; you haven't loaded the updated files yet.

Offline Nanshork

  • Homebrew Reviewer
  • Administrator
  • *****
  • Posts: 13393
    • View Profile
Re: New code: Advanced tables (Now with sorting)
« Reply #44 on: September 19, 2012, 10:00:34 AM »
Probably an issue with cache or cookies; you haven't loaded the updated files yet.

Confirmed, I'm back at my work computer and it's working fine.

Offline sirpercival

  • Epic Member
  • ****
  • Posts: 10855
  • you can't escape the miles
    • View Profile
Re: New code: Advanced tables (Now with sorting)
« Reply #45 on: September 19, 2012, 12:14:00 PM »
Now it's working.  Yay!
I am the assassin of productivity

(member in good standing of the troll-feeders guild)

It's begun — my things have overgrown the previous sig.

Offline Nanshork

  • Homebrew Reviewer
  • Administrator
  • *****
  • Posts: 13393
    • View Profile
Re: New code: Advanced tables (Now with sorting)
« Reply #46 on: September 19, 2012, 06:11:46 PM »
I just want to say that I love the BBC Code thread.   :D

Offline Garryl

  • DnD Handbook Writer
  • ****
  • Posts: 4508
    • View Profile
Re: New code: Advanced tables (Now with sorting)
« Reply #47 on: September 19, 2012, 11:25:18 PM »
I just want to say that I love the BBC Code thread.   :D

Bulletin Board Code Code or British Broadcasting Corporation Code?


Offline sirpercival

  • Epic Member
  • ****
  • Posts: 10855
  • you can't escape the miles
    • View Profile
Re: New code: Advanced tables (Now with sorting)
« Reply #49 on: September 20, 2012, 03:53:22 PM »
:huh

The new Bulletin Board Code thread in the Board Business section.

(BBC means Bulletin Board Code.  You said BBC Code, which is essentially like saying ATM Machine.)
I am the assassin of productivity

(member in good standing of the troll-feeders guild)

It's begun — my things have overgrown the previous sig.

Offline Halinn

  • Legendary Member
  • ****
  • Posts: 2067
  • My personal text is impersonal.
    • View Profile
Re: New code: Advanced tables (Now with sorting)
« Reply #50 on: September 20, 2012, 04:23:03 PM »
:huh

The new Bulletin Board Code thread in the Board Business section.

(BBC means Bulletin Board Code.  You said BBC Code, which is essentially like saying ATM Machine.)
It's still better than a recursive acronym, ala GNU (short for "GNU's Not Unix!")

Offline Nanshork

  • Homebrew Reviewer
  • Administrator
  • *****
  • Posts: 13393
    • View Profile
Re: New code: Advanced tables (Now with sorting)
« Reply #51 on: September 20, 2012, 04:57:02 PM »
:huh

The new Bulletin Board Code thread in the Board Business section.

(BBC means Bulletin Board Code.  You said BBC Code, which is essentially like saying ATM Machine.)

I realize that I typed it wrong, it was still a very silly question.   :P

Offline Bozwevial

  • Epic Member
  • ****
  • Posts: 3052
  • Developing a relaxed attitude toward danger
    • View Profile
Homebrew Compendiums: D&D 3.5 4e/PF
IRC: #mmxgeneral on Rizon

Offline Nanshork

  • Homebrew Reviewer
  • Administrator
  • *****
  • Posts: 13393
    • View Profile
Re: New code: Advanced tables (Now with sorting)
« Reply #53 on: September 20, 2012, 09:19:09 PM »
There is something wrong with you people.   :P

Offline FireInTheSky

  • Epic Member
  • ****
  • Posts: 3870
  • "Insight is the sudden cessation of stupidity."
    • View Profile
Re: New code: Advanced tables (Now with sorting)
« Reply #54 on: October 01, 2012, 04:41:59 PM »
Second, there is now a [tablesort] tag which works in the same way as [table2]. Using it lets you click on the table's headings to sort it in ascending or descending order (and also makes headings bold). Be warned, when the rows sort they bring their background colours with them, so it will screw up alternating row colours if you're using them. In the Preview window it will just render as [table2].


Example of both below, borrowed from sirpercival's thread here (which is the reason I looked into this).
(click to show/hide)

Interestingly, it doesn't sort it totally alphabetically.  It sorts everything with the first letter uppercase A-Z, and then everything with the first letter lowercase a-z.

Is there an easy way to get the sorting mechanism to treat uppercase and lowercase the same?

Offline Prime32

  • Over-Underling
  • Retired Admin
  • *****
  • Posts: 2914
    • View Profile
Re: New code: Advanced tables (Now with sorting)
« Reply #55 on: October 02, 2012, 10:27:39 AM »
Should be fixed now, but it could take a while for it to update on your end.

Offline FireInTheSky

  • Epic Member
  • ****
  • Posts: 3870
  • "Insight is the sudden cessation of stupidity."
    • View Profile
Re: New code: Advanced tables (Now with sorting)
« Reply #56 on: September 19, 2013, 04:05:03 AM »
Hey Prime, I noticed that with a sortable table, if you edit the post using the modify button in the lower right corner, when you save, the table is no longer sortable. However, if you edit the post using the modify button in the upper right corner, it's fine. (And if you did it using the lower right corner, saved, and then re-edited using the upper right modify, it sorts again). Does that make sense? (If it matters, I'm using Chrome.)

Assuming that's not an easily fixable bug in either the tablesort code or the modify code, you might want to put a note about that in the Extra BBCode Tags thread.

Offline FireInTheSky

  • Epic Member
  • ****
  • Posts: 3870
  • "Insight is the sudden cessation of stupidity."
    • View Profile
Re: New code: Advanced tables (Now with sorting)
« Reply #57 on: January 05, 2014, 08:37:20 PM »
The two tables below are identical except that the first uses [tablesort] and the second uses [table2]:

Tablesort
StuffStatsOther Stuff
SDCIWC
asdfas122331zxcvzxc
bvxcbb213123yuioyui
cvbncv331212xcvbxcv

(click to show/hide)

Table2
StuffStatsOther Stuff
SDCIWC
asdfas122331zxcvzxc
bvxcbb213123yuioyui
cvbncv331212xcvbxcv

(click to show/hide)

I'm not surprised that that [cellspan2=HEIGHT] doesn't currently work with [tablesort], since it has the potential to interact very strangely.

What I'd like to be able to do is create a sortable table that looks like the second table above, where I could sort by Stuff, Other Stuff, or the individual stats (S/D/C/I/W/C). Is that possible? Can you think of some other way I can achieve this besides using [cellspan2=HEIGHT]? The problem is that if I try to do a header separately from the table, there's no way to guarantee the header lining up with the columns it's supposed to head.


EDIT: Actually, one possible solution is to align the tables to the right, and then stick the Individual Stats section at the right-hand side. That way, I'd always know where it is. However, it appears that tables don't play well with [right] or [float=right]:

Right
StuffOther Stuff
AB
BA

(click to show/hide)

Float=right

StuffOther Stuff
AB
BA
[/float]

(click to show/hide)

Are any of the issues/questions in this post easyeasier to fix than another?
« Last Edit: January 05, 2014, 08:57:23 PM by FireInTheSky »