[jQuery] Javascript, or only Javascript-inna-browser?

2008-11-30 Thread Rodent of Unusual Size

Is jQuery supposed to be specifically targeted at Web client-side
(i.e., browser) usage?  Or to make Javascript easier in general? Most
of its functionality seems aimed at the former, but there are a number
of aspects that I can see would be useful in now-client environments.

I ask because currently jquery.js is dependent on 'window' being
globally defined, which of course isn't the case for, say, a Rhino
environment.

Thanks again..


[jQuery] Re: [jEditable] select editinplace has empty pulldown

2008-11-30 Thread Rodent of Unusual Size

Bingo.  Thanks again!


[jQuery] [jEditable] select editinplace has empty pulldown

2008-11-30 Thread Rodent of Unusual Size

I'm trying to set up some  form elements for in-place editing
using jEditable, but in every case the pulldown is always empty.
Firebug doesn't reports any errors or problems.

As far as I can tell, I'm doing this according to the documentation at
the jEditable site.  Is this me again?

Test case at http://apache.pastebin.ca/1271389
Content-type is application/xhtml+xml;charset=UTF-8, but it doesn't
seem to make a difference if I change it to text/html.


[jQuery] Re: Appending text works; appending element doesn't

2008-11-29 Thread Rodent of Unusual Size

On Nov 29, 1:26 pm, ricardobeat <[EMAIL PROTECTED]> wrote:
> Ha, there it is. Yes, I never use the 'application/xhtml+xml' mime,
> because of this and other incompatibilities. Is there anything you can
> do with it that you can't with text/html?

Sure.  Embedded SVG, math, et cetera.. and you're assured that the
document is valid XML when it comes to parsing.  (At least in proper
browsers.. ;-)


[jQuery] Re: jeditable tooltip for empty table cell becomes content

2008-11-29 Thread Rodent of Unusual Size

On Nov 29, 1:32 pm, Mika Tuupola <[EMAIL PROTECTED]> wrote:
>
> "Click to edit" is also default value for parameter "placeholder".
> Jeditable inserts the placeholder to element if it is empty (otherwise
> there is nothing to click). If you really want the empty you can do
> something like.
>
> $('.edit').editable('http://www.example.com/save.php', {
>  placeholder : ""

Good enough -- except that in the case of a table cell, or (I presume)
any other element, with a non-zero width, there *is* something
clickable.

Any road, that solved my problem there.  Thanks!


[jQuery] jeditable tooltip for empty table cell becomes content

2008-11-28 Thread Rodent of Unusual Size

New demonstration case for another problem I've noticed with
jeditable:

http://apache.pastebin.ca/1270021

I'm making cells in a table editable, and passing jeditable a string
for the hover tooltip.  However, if the cell in question has no
content (e.g., ) jeditable stuffs the tooltip into the
element as its value.

Once again, am I doing something wrong, or is this a bug I should
report?

Thanks..


[jQuery] Re: Appending text works; appending element doesn't

2008-11-28 Thread Rodent of Unusual Size

On Nov 25, 11:24 am, ricardobeat <[EMAIL PROTECTED]> wrote:
> Your code, exactly as it is, works perfectly for me. I didn't include
> the tablesorter plugin in my test.

Removing the tablesorter artifact (left over when I trimmed to a
minimum test case) had no effect.

Changing the document's IMT from 'application/xhtml+xml;charset=UTF-8'
to 'text/html' allowed it to work.  Changing the content type of my
documents isn't an option.

Can you verify that yours works with the XHTML content type?  Or not?

If not, this sounds like a bug, and I suspect it's either in jQuery
itself or in how jeditable is calling jQuery.  (I'm probably wrong,
but that's how it feels.)  If it *is* a bug (and not a 'not yet
supported feature') where should I log it?

Thanks!


[jQuery] Re: Appending text works; appending element doesn't

2008-11-24 Thread Rodent of Unusual Size

I still can't find anything wrong, and someone on the #jquery channel
confirmed it.

So does _anyone_ have any idea what's going on here?

Thanks..


[jQuery] Re: Appending text works; appending element doesn't

2008-11-20 Thread Rodent of Unusual Size

Sorry about the markup; forgot this group/forum doesn't like it..


[jQuery] Re: Appending text works; appending element doesn't

2008-11-20 Thread Rodent of Unusual Size

I can't see anything I'm doing wrong here, but it still won't work.
I've tried this:


var span = $('Elem');
span.appendTo(this);


but then Firebug says:


Node cannot be inserted at the specified point in the hierarchy" code:
"3
  this.appendChild( elem ); [jquery.js line 238]


I'm lost here..


[jQuery] Appending text works; appending element doesn't

2008-11-18 Thread Rodent of Unusual Size

Test case at http://apache.pastebin.ca/1261109

When the H1 is edited and the OK button clicked, the callback is
invoked.  It *should* add some plaintext to the end of the H1 content,
and also a  element.  However, it doesn't add the .

I have run through this with Firebug and set a breakpoint in the
callback.  I haven't stepped into the actual jQuery code because I'd
get lost ;-) but I verify that plaintext gets added but 
doesn't.

However, while halted in the callback, I can manually (in the Firebug
console) issue the identical $(this).append('foo') -- and
it works.

What's going on?  I'm doing something really obvious wrong, aren't I?


[jQuery] Re: jeditable and XHTML?

2008-11-14 Thread Rodent of Unusual Size

On Nov 14, 1:45 pm, Mika Tuupola <[EMAIL PROTECTED]> wrote:
> On Nov 14, 2008, at 1:23 AM, Rodent of Unusual Size wrote:
>
> Can you try latest from github:
>
> http://github.com/tuupola/jquery_jeditable/tree/master/jquery.jeditab...

Brilliant!  Works a treat now.

> Thanks for the heads up!

You betcha.  Who closes the tracker item?

Thanks!


[jQuery] Re: jeditable and XHTML?

2008-11-14 Thread Rodent of Unusual Size

On Nov 14, 5:58 am, mbraybrook <[EMAIL PROTECTED]> wrote:
> I can't see anything wrong with the JS, can you perhaps provide a more
> complete picture?
> .: Are you calling the JS when the DOM is ready?

Yes.

> .: Are you posting the changes to a URL that is prepared to handle it?

It never gets to that point.

> .: Are you using the latest versions of the scripts?

Yes.

Complete example/test case at http://plugins.jquery.com/node/4830


[jQuery] jeditable and XHTML?

2008-11-13 Thread Rodent of Unusual Size

Is there a known problem with jQuery/jeditable and
XHTML?  I keep running into this 'invalid string'
message with JS and XHTML.  First Dojo, now here..
it's getting discouraging.  What am I doing wrong?

Anyway, is there anything obviously wrong with
the fragment at http://apache.pastebin.ca/1254469 ?
When I click in an appropriately-classed element,
the current text disappears, but then the error
crops up.

I want to use jeditable to edit fields in a table,
but right now I'm trying to get it to work on any
old XHTML..

And yes, I know IE doesn't do XHTML well/at all.
And no, I don't care. :-/

Thanks!
-- 
#kenP-)}

Ken Coar, Sanagendamgagwedweinini  http://Ken.Coar.Org/
Author, developer, opinionist  http://Apache-Server.Com/

"Millennium hand and shrimp!"



[jQuery] Re: Custom sorter/parser for tablesorter

2008-11-11 Thread Rodent of Unusual Size

On Nov 11, 9:37 am, MorningZ <[EMAIL PROTECTED]> wrote:
> Here's an example if my question above is answered by "yes, that's
> correct"
>
> http://paste.pocoo.org/show/90863/

That only handles the aspect of ignoring the alpha characters.  It
does
*not* appear to handle the issue of sorting 40125 before 7400..


[jQuery] Re: Custom sorter/parser for tablesorter

2008-11-11 Thread Rodent of Unusual Size

On Nov 11, 8:33 am, MorningZ <[EMAIL PROTECTED]> wrote:
> Yuck, why "patch" the js file when a custom parser could just be
> built?
>
> before that can happen though, something needs to be made more clear
>
> in the examples above, you pretty much are just ignoring letters for
> sorting purposes?

Yup, as I said.  And 40123 should sort lower than 7400.


[jQuery] Re: Custom sorter/parser for tablesorter

2008-11-10 Thread Rodent of Unusual Size

On Nov 11, 12:29 am, Mike Nichols <[EMAIL PROTECTED]> wrote:
> I submitted a patch a long time ago to do this that implemented a
> natural sorting algorithm for this but it would never get applied and
> I couldn't get a response..I assumed the project was light or dead.
> I can send you the patched .js i had if you like.

Sure.  To what file(s) is it a patch, and does it still apply?

Thanks!


[jQuery] Custom sorter/parser for tablesorter

2008-11-10 Thread Rodent of Unusual Size

I'm just discovering jQuery and finding it really interesting.
Usual sort of 'learn by doing' thing.  I've been playing with
the tablesorter plugin, but I've run into a wall.  Particularly
since I'm far from expert in Javascript. :-)

I want to be able to sort a table on a column containing
integrated circuit numbers (such as 7400, LM555, 74LS50
4026, et cetera).  I want the technology (i.e., the 'LS'
in '74LS50') to be ignored for sorting purposes, so 74LS50
and 74H50 would be juxtaposed.  I also want the series
to be grouped together (e.g., 7400 series together,
4000 series together, et cetera).

Unfortunately, this is possibly a little more complex than
it might seem.  Given the following part numbers,

7400
4010
74C10
4026
74257
4012
74LS174
40257

the correct ascending order should be

4010
4012
4026
40257
7400
74C10
74LS174
74257

I'm used to custom sorting callbacks that are given two arguments
and return whether ab -- but I'm not finding how
to do the equivalent with tablesorter.

Is it even possible?

Thanks!
-- 
#kenP-)}

Ken Coar, Sanagendamgagwedweinini  http://Ken.Coar.Org/
Author, developer, opinionist  http://Apache-Server.Com/

"Millennium hand and shrimp!"