[Moo] HtmlTable

8 messages Options
Embed this post
Permalink
mmjaeger

[Moo] HtmlTable

Reply Threaded More More options
Print post
Permalink

Hello
I wanted to give the table sort a try but I can't get it to work - I'm
not getting any error but the sorting just never occurs - I must be
missing something:

setTableSort: function() {
                var el = $('tblDownload');
                if ($defined(el)) return false;
                var table = new HtmlTable(el, {
                        sortIndex: 1,
                        parsers: ['string', 'string', 'numberLax', 'date'],
                        classHeadSort: 'expand',
                        classHeadSortRev: 'collapse',
                        sortable: true,
                        onSort: function() {
                                console.log('done sorting');
                        }
                });

                table.sort(2, true);
        }

Thanks
mmjaeger

[Moo] Re: HtmlTable

Reply Threaded More More options
Print post
Permalink

got a little further - the sort script seems to do something but I'm
getting the following error:

this.get("text").format is not a function
[Break on this error] });this.sortSpans.empty
();this.sortEnabl...e.parse(this.get("text").format("db"));\n

am I still doing something wrong?

On Nov 6, 9:19 pm, mmjaeger <[hidden email]> wrote:

> Hello
> I wanted to give the table sort a try but I can't get it to work - I'm
> not getting any error but the sorting just never occurs - I must be
> missing something:
>
> setTableSort: function() {
>                 var el = $('tblDownload');
>                 if ($defined(el)) return false;
>                 var table = new HtmlTable(el, {
>                         sortIndex: 1,
>                         parsers: ['string', 'string', 'numberLax', 'date'],
>                         classHeadSort: 'expand',
>                         classHeadSortRev: 'collapse',
>                         sortable: true,
>                         onSort: function() {
>                                 console.log('done sorting');
>                         }
>                 });
>
>                 table.sort(2, true);
>         }
>
> Thanks
mmjaeger

[Moo] Re: HtmlTable

Reply Threaded More More options
Print post
Permalink

I've a column in my table with file sizes like:
985.01 kb
1.2 mb
42 kb
....

the number parser doesn't work on these kind of numbers

I guess we need some other parser for these kind of numbers
found something that might help - I'll give it a try
here is what I got: if(type == "KB")
  value = value*1024;
else if(type == "MB")
  value = value*[Math.pow(1024,2)];
else if(type == "GB")
  value = value*[Math.pow(1024,3)];
else
 return "error";

sorting on a "string" column works - the date colum I have fails
totally - I'm just getting a white area where the table was.

another issue I'm experiencing is that the column header that get's
sorted upon loading of the page has both css classes applied like: <th
class="txtR asc desc">???

On Nov 7, 9:25 pm, mmjaeger <[hidden email]> wrote:

> got a little further - the sort script seems to do something but I'm
> getting the following error:
>
> this.get("text").format is not a function
> [Break on this error] });this.sortSpans.empty
> ();this.sortEnabl...e.parse(this.get("text").format("db"));\n
>
> am I still doing something wrong?
>
> On Nov 6, 9:19 pm, mmjaeger <[hidden email]> wrote:
>
>
>
> > Hello
> > I wanted to give the table sort a try but I can't get it to work - I'm
> > not getting any error but the sorting just never occurs - I must be
> > missing something:
>
> > setTableSort: function() {
> >                 var el = $('tblDownload');
> >                 if ($defined(el)) return false;
> >                 var table = new HtmlTable(el, {
> >                         sortIndex: 1,
> >                         parsers: ['string', 'string', 'numberLax', 'date'],
> >                         classHeadSort: 'expand',
> >                         classHeadSortRev: 'collapse',
> >                         sortable: true,
> >                         onSort: function() {
> >                                 console.log('done sorting');
> >                         }
> >                 });
>
> >                 table.sort(2, true);
> >         }
>
> > Thanks
mmjaeger

[Moo] Re: HtmlTable

Reply Threaded More More options
Print post
Permalink

Still struggling with the table sort - I downloaded the latest
HtmlTable.Sort.js from github - this took care of the error message:
this.get("text").format is not a function
[Break on this error] });this.sortSpans.empty
();this.sortEnabl...e.parse(this.get("text").format("db"));\n


However, upon loading the page, the sort classes that get applied to
the table header are applied twice - firebug shows me this: "<th
class="txtR asc desc">"

clicking on the date column does some stuff to the table but the date
column is not doing anything?

Hope somebody has an idea how to fix this as my client awaits his new
page.
mmjaeger

[Moo] Re: HtmlTable

Reply Threaded More More options
Print post
Permalink

any idea when to expect a fix for this if it is a bug at all - my
customer is getting kind of un-patient - sorry for bumping.

On Nov 8, 7:35 am, mmjaeger <[hidden email]> wrote:

> Still struggling with the table sort - I downloaded the latest
> HtmlTable.Sort.js from github - this took care of the error message:
> this.get("text").format is not a function
> [Break on this error] });this.sortSpans.empty
> ();this.sortEnabl...e.parse(this.get("text").format("db"));\n
>
> However, upon loading the page, the sort classes that get applied to
> the table header are applied twice - firebug shows me this: "<th
> class="txtR asc desc">"
>
> clicking on the date column does some stuff to the table but the date
> column is not doing anything?
>
> Hope somebody has an idea how to fix this as my client awaits his new
> page.
nutron

[Moo] Re: HtmlTable

Reply Threaded More More options
Print post
Permalink

I can try and get to this today. Why not diagnose and fix the problem  
yourself and the push the fix back into the project? I'm not the only  
one here who knows JavaScript.

-Aaron

Sorry for any typos. Big fingers , tiny buttons.

On Nov 10, 2009, at 8:38 AM, mmjaeger <[hidden email]> wrote:

>
> any idea when to expect a fix for this if it is a bug at all - my
> customer is getting kind of un-patient - sorry for bumping.
>
> On Nov 8, 7:35 am, mmjaeger <[hidden email]> wrote:
>> Still struggling with the table sort - I downloaded the latest
>> HtmlTable.Sort.js from github - this took care of the error message:
>> this.get("text").format is not a function
>> [Break on this error] });this.sortSpans.empty
>> ();this.sortEnabl...e.parse(this.get("text").format("db"));\n
>>
>> However, upon loading the page, the sort classes that get applied to
>> the table header are applied twice - firebug shows me this: "<th
>> class="txtR asc desc">"
>>
>> clicking on the date column does some stuff to the table but the date
>> column is not doing anything?
>>
>> Hope somebody has an idea how to fix this as my client awaits his new
>> page.
mmjaeger

[Moo] Re: HtmlTable

Reply Threaded More More options
Print post
Permalink

Thanks Aaron
I was afraid that I did something wrong - by the way, are there any
plans for adding paging as well?

On Nov 11, 10:19 am, Aaron Newton <[hidden email]> wrote:

> I can try and get to this today. Why not diagnose and fix the problem  
> yourself and the push the fix back into the project? I'm not the only  
> one here who knows JavaScript.
>
> -Aaron
>
> Sorry for any typos. Big fingers , tiny buttons.
>
> On Nov 10, 2009, at 8:38 AM, mmjaeger <[hidden email]> wrote:
>
>
>
>
>
> > any idea when to expect a fix for this if it is a bug at all - my
> > customer is getting kind of un-patient - sorry for bumping.
>
> > On Nov 8, 7:35 am, mmjaeger <[hidden email]> wrote:
> >> Still struggling with the table sort - I downloaded the latest
> >> HtmlTable.Sort.js from github - this took care of the error message:
> >> this.get("text").format is not a function
> >> [Break on this error] });this.sortSpans.empty
> >> ();this.sortEnabl...e.parse(this.get("text").format("db"));\n
>
> >> However, upon loading the page, the sort classes that get applied to
> >> the table header are applied twice - firebug shows me this: "<th
> >> class="txtR asc desc">"
>
> >> clicking on the date column does some stuff to the table but the date
> >> column is not doing anything?
>
> >> Hope somebody has an idea how to fix this as my client awaits his new
> >> page.
anutron

[Moo] Re: HtmlTable

Reply Threaded More More options
Print post
Permalink
sure, if you write it.

On Wed, Nov 11, 2009 at 10:31 AM, mmjaeger <[hidden email]> wrote:

Thanks Aaron
I was afraid that I did something wrong - by the way, are there any
plans for adding paging as well?

On Nov 11, 10:19 am, Aaron Newton <[hidden email]> wrote:
> I can try and get to this today. Why not diagnose and fix the problem  
> yourself and the push the fix back into the project? I'm not the only  
> one here who knows JavaScript.
>
> -Aaron
>
> Sorry for any typos. Big fingers , tiny buttons.
>
> On Nov 10, 2009, at 8:38 AM, mmjaeger <[hidden email]> wrote:
>
>
>
>
>
> > any idea when to expect a fix for this if it is a bug at all - my
> > customer is getting kind of un-patient - sorry for bumping.
>
> > On Nov 8, 7:35 am, mmjaeger <[hidden email]> wrote:
> >> Still struggling with the table sort - I downloaded the latest
> >> HtmlTable.Sort.js from github - this took care of the error message:
> >> this.get("text").format is not a function
> >> [Break on this error] });this.sortSpans.empty
> >> ();this.sortEnabl...e.parse(this.get("text").format("db"));\n
>
> >> However, upon loading the page, the sort classes that get applied to
> >> the table header are applied twice - firebug shows me this: "<th
> >> class="txtR asc desc">"
>
> >> clicking on the date column does some stuff to the table but the date
> >> column is not doing anything?
>
> >> Hope somebody has an idea how to fix this as my client awaits his new
> >> page.

The MooTools Tutorial: www.mootorial.com Clientcide: www.clientcide.com