Hi Lukek,

I took an other approach to this.

Check out: http://tablesorter.com/docs/example-extending-defaults.html

Regards
Christian

2007/8/20, lukek <[EMAIL PROTECTED]>:
>
>
> Been having a further poke around.
>
> I have done what Christian suggested and merged the widgets and parser
> arrays of this.config with those in settings. However now I have
> realised the constructor is being called twice - or the number of
> levels of inheritance.
>
> So many options not sure what to do...
>
>
>
> On Aug 20, 9:33 am, lukek <[EMAIL PROTECTED]> wrote:
> > Thanks for getting back Christian - only just seen you post.
> >
> > I look forward to the fix. I will tinker with it and see what I come
> > up with until then.
> >
> > By the way I had another question. -- In the unpacked version of the
> > latest script your comment on line 555 says "apply easy methods that
> > trigger binded events".
> >
> > Does this mean I can insert function calls in here - ie around line
> > 560?
> >
> > I say this because I have added a call to applyWidget() as I reckon
> > all the widgets should be reloaded when the update event is triggered
> > - eg after I insert rows I want to reapply the zebra widget. Unless I
> > missed something or your plan was to control this action in some other
> > way.
> >
> > Thanks
> >
> > Luke
> >
> > On Aug 17, 10:36 pm, "Christian Bach" <[EMAIL PROTECTED]>
> > wrote:
> >
> > > Lukek,
> >
> > > I will supply a fix for this after the weekend. If you cant wait that
> > > long a tip is that if this.config exists that should be extended
> > > instead of the defaults. /christian
> > > 2007/8/17, lukek <[EMAIL PROTECTED]>:
> >
> > > > Hi,
> >
> > > > I have just been playing with the newTablesorter2.0. Thanks Mr Bach!
> > > > Great piece of work.
> >
> > > > I am having problems getting tables to inherit widgets. I am not
> sure
> > > > if its the way $.extend() merges arrays when passing the settings
> > > > object to thetablesorter.construct() function or what but when I add
> > > > more widgets it seems to overwrite the ones I added previously.
> >
> > > > EXAMPLE:
> >
> > > > <table class="data" id="myTable1"> ...</table>
> >
> > > > <table class="data" id="myTable2"> ...</table>
> >
> > > > <script>
> >
> > > > $("table.data").tablesorter( { widgets: [ 'zebra', 'someWidget',
> > > > 'anotherWidget'] } );
> >
> > > > $("#myTable2").tablesorter( { widgets: [ 'completelyDiffWidget' ] }
> );
> >
> > > > </script>
> >
> > > > Do you see what I'm doing? "#myTable2" should now have all four
> > > > widgets.
> >
> > > > But that's not what happens.
> >
> > > > Can anyone kindle point me in the right direction
> >
> > > > cheers
> >
> > > > Luke
>
>

Reply via email to