Re: [Rails-spinoffs] migration to rails

2006-05-26 Thread Robin Haswell
Just to add my $0.02 to this, not that it matters, but my background is PHP with bits of .NET and lots of Python (but no Ruby/RoR), and I do disagree with this. My preference is Python, and I find it gives me nearly everything I need - web programming through TurboGears, right up to GUI program

Re: [Rails-spinoffs] prototype-based color picker

2006-04-25 Thread Robin Haswell
As in beer, not in speech. Gregory Hill wrote: Um... http://www.colourmod.com/plugnplay/ It says it's free and has a download link. Greg -Original Message- From: [EMAIL PROTECTED] [mailto:rails-spinoffs- [EMAIL PROTECTED] On Behalf Of Raymond Brigleb Sent: Monday, April 24, 2006 11

Re: [Rails-spinoffs] prototype-based color picker

2006-04-24 Thread Robin Haswell
Hah as it happens I did one this very morning. I can't open source it yet (although we will be planning to on a free branded / paid non-branded license soon), but I can tell you it's very easy. The one I implemented was identical to Google Adsense's colour picker, with fade in/out and a configurab

[Rails-spinoffs] Removing all event listeners

2006-03-16 Thread Robin Haswell
Hey guys What would you say would be the "Prototype way" of removing all event listeners from an element? Thanks -Rob ___ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Re: [Rails-spinoffs] [Prototype] understanding evalScripts

2006-03-10 Thread Robin Haswell
I'm not a language expert but this looks like a scope problem. Have you tried replacing "page" with "window.page" everywhere? -Rob Ben Anderson wrote: > Hi, > I have a misunderstanding of what I though evalScripts would do vs > what it actually does. I'm wondering if there's a way that I can mak

Re: [Rails-spinoffs] [prototype] how i send Dynamic form field values??

2006-03-09 Thread Robin Haswell
I've definitely made this work before, I think you should inspect your application closer for bugs. Got a demo? -Rob Renso Vargas wrote: I want to know how can i send the values of form fields build dynamic with prototype. i have the form as follow: with prototype i fill the dynamicFie

Re: [Rails-spinoffs] Comet support?

2006-03-09 Thread Robin Haswell
I think he's talking about HTTP/1.1 persistent connections with multiple parts, which is about as portable as you get. I don't think the client can send any more data to the server after the initial request though. My understanding of this method is that it uses something like multipart MIME t

Re: [Rails-spinoffs] [Prototype] Ajax.Request include form fields?

2006-03-09 Thread Robin Haswell
Event.observe(form, "submit", function(ev) { el = Event.element(ev); data = Form.serialize(el); new Ajax.Request(el.getAttribute("action"), { method:"post", postBody:data }); Event.stop(ev); }); Something like that. -Rob Ben Anderson wrote: >Hi, >Is it possible

[Rails-spinoffs] [FEATURE] Effect.Accordion

2006-03-09 Thread Robin Haswell
Hey guys Attached is probably the final version of my Effect.Accordion. I don't know how it compares to the previous Effect.Accoridon submitted. It still flickers a bit, however there is a hack which fixes the container's height, so it doesn't flicker the rest of the elements on the page. It's al

Re: [Rails-spinoffs] [PATCH] Allow Ajax.InPlaceCollectionEditor to load collection externally

2006-03-07 Thread Robin Haswell
nent(value); } -Rob Robin Haswell wrote: > Attached is a patch to allow Ajax.InPlaceCollectionEditor to load the > collection using AJAX. > > It adds a new option, loadOptionsURL, which is the URL used to load the > values over the interweb. It expects the server to return

Re: [Rails-spinoffs] [PATCH] Allow Ajax.InPlaceCollectionEditor to load collection externally

2006-03-07 Thread Robin Haswell
Sorry, I get paid to write code, not to document it. I can paste what I'm using though: new Ajax.InPlaceCollectionEditor(el, "___relations.saveRelation.ajax", { okText:"Save", cancelText:"Cancel", externalControl:control, externalControlOnly:true, loadOption

Re: [Rails-spinoffs] [PATCH] Allow Ajax.InPlaceCollectionEditor to load collection externally

2006-03-07 Thread Robin Haswell
Thanks. I might do that. Andrew Kaspick wrote: > Patches can be submitted at http://dev.rubyonrails.org/ for > scriptaculous if you want a better shot at getting it into the main > trunk. > > Just mentioning for those who may not know. > > On 3/7/06, Robin Haswell <

[Rails-spinoffs] [PATCH] Allow Ajax.InPlaceCollectionEditor to load collection externally

2006-03-07 Thread Robin Haswell
Attached is a patch to allow Ajax.InPlaceCollectionEditor to load the collection using AJAX. It adds a new option, loadOptionsURL, which is the URL used to load the values over the interweb. It expects the server to return values. If one of them has a selected="selected" attribute, it will probab

Re: [Rails-spinoffs] event.keyCode broken in prototype?

2006-03-03 Thread Robin Haswell
Because that's what you get when you produce a product which is a just a series of dirty hacks added on to the last version. Honestly, I would bet any money that is the real answer. -Rob Ryan Gahl wrote: This is another case of what we were talking about yesterday. Browser inconsistencies. Wh

Re: [Rails-spinoffs] event.keyCode broken in prototype?

2006-03-03 Thread Robin Haswell
I'd say, returning letters consistently cased makes sense. element.nodeName is always returned in capital letters for the same reason - because 99% of the time the case doesn't matter, and you really don't want to be calling case-conversion functions when you just want to see if something == a

Re: [Rails-spinoffs] [PATCH] Effect.Accordion (not from the wiki)

2006-03-03 Thread Robin Haswell
butt-ugly but it at least shows the different elements in action. also, I made the h3 use a link cursor - that's not actually part of the accordian code. - Danger On 3/3/06, *Robin Haswell* < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: Sorry, it would be unprofes

Re: [Rails-spinoffs] [PATCH] Effect.Accordion (not from the wiki)

2006-03-03 Thread Robin Haswell
rdion) to the maximum size of the content, or use overflow:auto on the bodies. -Rob Nicolas Terray wrote: I love real live examples, do you have one ? :) On 3/3/06, Robin Haswell <[EMAIL PROTECTED]> wrote: Oops, should provide an example:

Re: [Rails-spinoffs] [PATCH] Effect.Accordion (not from the wiki)

2006-03-03 Thread Robin Haswell
ent Rinse, repeat new Effect.Accordion("accordion"); -Rob Robin Haswell wrote: Hello boys and girls In the ever-loving spirit of OSS, here's another feature for s.a.u. In particular it's called Effect.Accordion, and is a scr

[Rails-spinoffs] [PATCH] Effect.Accordion (not from the wiki)

2006-03-03 Thread Robin Haswell
Hello boys and girls In the ever-loving spirit of OSS, here's another feature for s.a.u. In particular it's called Effect.Accordion, and is a scriptaculified version of openrico's Accordion. Work in progress, I'll submit further modifications as the come in, but this is 90% of what needs to be d

Re: [Rails-spinoffs] Serializing Forms with disabled fields

2006-03-03 Thread Robin Haswell
Because that's how form behaviour is defined? I don't know what browser you're using, but anything I've ever seen sends disabled elements along just like every other element. In my experience the only deviation between a browser's normal behaviour and the Form.serialize function is the handling of

Re: [Rails-spinoffs] Delayed input posting

2006-03-02 Thread Robin Haswell
Yeah that's the one, but I did re-forward this yesterday as well :-) Janko Mivšek wrote: Hi Rob, I'm looking back for your patch. I this a right one? [PATCH] Allow generic autocompleter (Ajax.Watcher) 13feb06 http://threebit.net/mail-archive/rails-spinoffs/msg00215.html Thanks Jan

Re: [Rails-spinoffs] Question about $F()

2006-03-02 Thread Robin Haswell
Tried $F('name').value = "foo"; ? I'd assume $F returns the first form element it finds. -Rob Alex Duffield wrote: > I also have a question about $F() while we are on the topic.. > > am I correct in assuming that $F() is read only? > > I have never been able to set a forms elements value u

[Rails-spinoffs] [PATCH] small correction to allow editing of html with Ajax.InPlaceEditor

2006-03-02 Thread Robin Haswell
Ajax.InPlaceEditor will not let you edit HTML as it strips all tags coming from the loadTextURL Ajax callback. Bug or feature? I say bug. The patch below fixes this. -Rob --- js/controls.js.old 2006-03-02 13:46:26.0 + +++ js/controls.js 2006-03-02 13:46:29.0 + @@ -6

Re: [Rails-spinoffs] [Fwd: [PATCH] Allow generic autocompleter (Ajax.Watcher)]

2006-03-02 Thread Robin Haswell
don't even require me to return my modifications. -Rob Todd Ross wrote: > On 3/2/06, Robin Haswell <[EMAIL PROTECTED]> wrote: > >>Yeah it was a typical "get it working and clean it up as you go along" >>job. If I re-visit that code any time soon I'll ta

Re: [Rails-spinoffs] [Fwd: [PATCH] Allow generic autocompleter (Ajax.Watcher)]

2006-03-02 Thread Robin Haswell
Yeah it was a typical "get it working and clean it up as you go along" job. If I re-visit that code any time soon I'll take your suggestions onboard and submit another patch. -Rob Martin Bialasinski wrote: > On 3/1/06, Robin Haswell <[EMAIL PROTECTED]> wrote: >

[Rails-spinoffs] [Fwd: [PATCH] Allow generic autocompleter (Ajax.Watcher)]

2006-03-01 Thread Robin Haswell
Patch to allow generic Ajax.Autocompleter-style textbox watchers. Forwarded for "[Rails-spinoffs] Delayed input posting" -Rob --- Begin Message --- Hey. Below is a patch to allow generic Ajax.Autocompleters. Basically it's for people who wanna be able to watch an input for changes, but don't wan

Re: [Rails-spinoffs] Delayed input posting

2006-03-01 Thread Robin Haswell
What you need is exactly the patch that I posted to this mailling list a month ago, and got no comments on. I can find you the patch but it won't make a lot of sense to you, I'd ask the dev team to put my patch in to the CVS, then get a copy of it. I'll re-send the patch after this E-mail -Rob

Re: [Rails-spinoffs] Disabling anchor clicking in a draggable

2006-02-27 Thread Robin Haswell
I think this would work, I can set the onclick to evaluate a false function, this is my stanrd method of doing things like this. Strangely I don't think the event.observe(el, "click") method works for this. Cheers -Rob Chris Lear wrote: * Robin Haswell wrote

Re: [Rails-spinoffs] Disabling anchor clicking in a draggable

2006-02-27 Thread Robin Haswell
Yeah I'm aware of this option. It's not ideal, as this is a CMS and I don't want the admin view of the site to be too different. Plus these elements are really small. I'd rather get a proper solution rather than a hack :-/ -Rob Todd Ross wrote: > On 2/27/06, Robin Ha

[Rails-spinoffs] Disabling anchor clicking in a draggable

2006-02-27 Thread Robin Haswell
Hey guys I have an interesting problem - I have some draggable elements (sortable actually), with links () inside them. I want the user to be able to click on the link, however if the user drags the element I don't want the link to get fired. Can anyone think of a way to do this? It only needs to

Re: [Rails-spinoffs] question about getElementsByClassName

2006-02-23 Thread Robin Haswell
Louis Walch wrote: > i would like to detect classnames of input_(ANYTHING) is this possible > with getElementsByClassName? Looking at the source code you could do getELementsByClassName("input_.+");, although it's undocumented behaviour so it might mysteriously break after a prototype upgrade on

Re: [Rails-spinoffs] Sortable Tree Addition [PATCH]

2006-02-17 Thread Robin Haswell
Why does it matter how a tab is displayed in a different editor? A tab is a tab, it denotes "indent". Furthermore, tabs are semantically accurate, allowing different users to choose how much indentation they want. For people with keen eyesight they can set tabs to be displayed at one-space. Peo

Re: [Rails-spinoffs] Draggables and overflow:auto

2006-02-15 Thread Robin Haswell
plication... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robin Haswell Sent: Wednesday, February 15, 2006 3:16 PM To: rails-spinoffs@lists.rubyonrails.org Subject: [Rails-spinoffs] Draggables and overflow:auto Hey guys. I'm trying to drag betwe

[Rails-spinoffs] Draggables and overflow:auto

2006-02-15 Thread Robin Haswell
Hey guys. I'm trying to drag between two lists, except one list is really long so I set a height on the with overflow:auto. Unfortunately when I drag between the lists I can't drag items outside of the with the overflow on. Does anyone know how I can make this work? I think I might be able to

Re: [Rails-spinoffs] onFailure fails?

2006-02-14 Thread Robin Haswell
Does anyone know what the serer should respond with to initiate onFailure? Douglas Livingstone wrote: 2006/2/14, Martin Ström <[EMAIL PROTECTED]>: There's a on404 event you could catch: new Ajax.Request('non_existant.file', { onSuccess: function(){alert("yay");}, on404: functio

Re: [Rails-spinoffs] problem with sortable lists and IE

2006-02-14 Thread Robin Haswell
You should keep your "url" variables local only = eg "/ajax/order". That will make sure you use the right script on the right page. Have you tried using Tamper Data? -Rob Joe Hudson wrote: > Thank you very much for your reply, Cam. > > Actually I am having the opposite problem. I can successful

[Rails-spinoffs] Where do you want patches sending?

2006-02-13 Thread Robin Haswell
I've sent two patches to this mailing list now with not so much as a word from the devs. Is this the right place to send them, and if not, why wasn't it easy for me to find the place on that "bug tracker" ? -Rob ___ Rails-spinoffs mailing list Rails-s

Re: [Rails-spinoffs] Autocomplete shows up behind td in firefox - fixable?

2006-02-13 Thread Robin Haswell
I'm not gonna bother trying to work out that HTML, but have you tried placing the autocomplete div after the offending table? Apologies if it already is. -Rob Dylan Greene wrote: With Ajax Autocomplete the autocomplete div is overlaped by the next TD in the table in Firefox only (both PC/Mac)

Re: [Rails-spinoffs] [PATCH] Allow generic autocompleter (Ajax.Watcher)

2006-02-13 Thread Robin Haswell
ed on instantiation or not. Default not. -Rob Deco Rior wrote: Do have an example for this On Feb 13, 2006, at 10:10 AM, Robin Haswell wrote: Hey. Below is a patch to allow generic Ajax.Autocompleters. Basically it's for people who wanna be able to watch an input for changes, but don't wa

[Rails-spinoffs] [PATCH] Allow generic autocompleter (Ajax.Watcher)

2006-02-13 Thread Robin Haswell
Hey. Below is a patch to allow generic Ajax.Autocompleters. Basically it's for people who wanna be able to watch an input for changes, but don't want it to pop up an autocompleter box below. Useful for live previews, that kind of thing. Someone's gonna have to fix the tabstops. I couldn't be arse

Re: [Rails-spinoffs] Length of parameters in Autocompleter.Local()

2006-02-10 Thread Robin Haswell
Nice. As I say, I don't have a need to pass anything other than straight-up strings at the moment, but that certainly is worth remembering. Cheers. -Rob Jeremy Kitchen wrote: On Friday 10 February 2006 15:58, Robin Haswell wrote: Oh I see! Sorry. That seems, well, bloody interesti

Re: [Rails-spinoffs] Length of parameters in Autocompleter.Local()

2006-02-10 Thread Robin Haswell
aping of quotes and newlines. Cheers -Rob Jeremy Kitchen wrote: On Friday 10 February 2006 14:52, Robin Haswell wrote: I think that's a bit overkill. My fix should work fine for anything that doesn't include newlines. If this were my application I'd dump the data in a hidden

Re: [Rails-spinoffs] Length of parameters in Autocompleter.Local()

2006-02-10 Thread Robin Haswell
There are a few mistakes in this but yeah that would solve it for the meantime. -Rob Sebastian Kurt wrote: thanks to all of you! this sign was the seed of all evil. move it into an JS-Array helped to solve it var temp_rezept_array = new Array(); //Schleife thx sebastian Todd Ross schrieb:

Re: [Rails-spinoffs] Length of parameters in Autocompleter.Local()

2006-02-10 Thread Robin Haswell
(don't use JSON myself), it translates directly into _javascript_ objects when eval'ed. var myObj = eval(myJSONstring); -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Robin Haswell Sent: Friday, February 10, 2006 5:02 PM To: rails-spinoffs@list

Re: [Rails-spinoffs] Length of parameters in Autocompleter.Local()

2006-02-10 Thread Robin Haswell
Michael Peters wrote: Robin Haswell wrote: Hm I may be mistaken. AFAIU JSON is a JS-compatible serialization form? Do browsers have built-in JSON deserializers? Well, they'd have to if they have JS interpreters right? Um no, I mean can you convert a JSON object into a memory cons

Re: [Rails-spinoffs] Length of parameters in Autocompleter.Local()

2006-02-10 Thread Robin Haswell
ent to PHP serialize()). IE probably even parses XML in kernel space, but that's only a guess. -Rob Michael Peters wrote: Robin Haswell wrote: I think that's a bit overkill. My fix should work fine for anything that doesn't include newlines. If this were my application I'd

Re: [Rails-spinoffs] Length of parameters in Autocompleter.Local()

2006-02-10 Thread Robin Haswell
I think that's a bit overkill. My fix should work fine for anything that doesn't include newlines. If this were my application I'd dump the data in a hidden or maybe as an xml string and parse it with the built-in DOM parser. Much better parse something in XML than *shudder* javascript. JS sho

Re: [Rails-spinoffs] Length of parameters in Autocompleter.Local()

2006-02-10 Thread Robin Haswell
Your PHP-built list has quotes in it which is breaking the JS. Try: '\''.str_replace("'", "\\'", $rezept_vorgabe[$i]).'\'' Also you know you can loop through an array with http://www.php.net/foreach ? Prints: foo bar baz boo You should use the JavaScript console in Firefox 1.5, it alerts

Re: [Rails-spinoffs] Sortable + Draggable : doesn't follow the mouse horizontally

2006-02-10 Thread Robin Haswell
Yes, use the constraints options of Sortable.create Alain Ravet wrote: When a 'draggable' element is made 'sortable', it no longer follows the mouse horizontally when you drag it. Is there a solution/workaround? TIA Alain ___

Re: [Rails-spinoffs] Ajax.Updater not populating element - please help

2006-02-09 Thread Robin Haswell
Hey Hm.. can we see your code for this? I have a feeling you're doing too many levels of HTML escaping. -Rob Kevin Old wrote: On 2/9/06, Kevin Old <[EMAIL PROTECTED]> wrote: Hi Tom, On 2/9/06, Tom Riley <[EMAIL PROTECTED]> wrote: The above line looks wrong - the

Re: [Rails-spinoffs] drag drop safari

2006-02-09 Thread Robin Haswell
It might have been the method I was using to activate the effect. FYI the site was I should update that to the latest s.a.u really. Might fix the annoying FF bugs. -Rob Gregory Hill wrote: Really? I've used both several times and they've worked fine. The demos on the wiki work too

Re: [Rails-spinoffs] drag drop safari

2006-02-09 Thread Robin Haswell
I disagree with this, I find Effect.Appear and Effect.BlindDown don't work with Safari -Rob Tom Riley wrote: > > > > On 8 Feb 2006, at 23:02, Louis Walch wrote: > >> does it not work? >> works fine for me on all other browsers and platforms. > > > I'm using sortables and they work great on safar

Re: [Rails-spinoffs] InPlaceEditor - IMG for OK / Cancel?

2006-02-09 Thread Robin Haswell
How did you create that patch? I can't get `diff` to make patches which include the preceeding and succeeding lines, like cvs diff does. -Rob Todd Ross wrote: >On 2/8/06, Todd Ross <[EMAIL PROTECTED]> wrote: > > >>Do either of you have a sample (live site) using InPlaceEditor? I've >>never us

Re: [Rails-spinoffs] drag drop safari

2006-02-08 Thread Robin Haswell
I've had mixed responses with scriptaculous and Safari. That's why we only use AJAX for client CMS/other website UI, and internal/private use. -Rob Louis Walch wrote: does it not work? works fine for me on all other browsers and platforms. ___ Rails-

Re: [Rails-spinoffs] Autocomplete and Firefox

2006-02-08 Thread Robin Haswell
till no go with form tags on page Richard Thomas - CEO Cyberlot Technologies Group Inc. 507.398.4124 - Voice Robin Haswell wrote: Try moving the script tags outside the form, or better, in a body onload. Richard Thomas wrote: Doh.. Thanks for pointing that out. I changed that to size=

Re: [Rails-spinoffs] Autocomplete and Firefox

2006-02-08 Thread Robin Haswell
;tt>'contact_name_auto_complete', '/event.php?method=autocomplete', </tt><tt>{}) Still no go in Firefox 1.0.7 on my linux box. With form tags I can still only do a single search and click, then the textfield "locks" up and a second later the page goes bla

Re: [Rails-spinoffs] Autocomplete and Firefox

2006-02-08 Thread Robin Haswell
Hey dude I don't think this problem has much to do with the form tags. Try removing the script from within the form - place it afterwards. I just noticed your last "" is actually a "" - not going to help. What doctype are you sending here? Either way it's not going to validate. I sometimes f

[Rails-spinoffs] [PATCH] Allow InPlaceEditor to only be activated by externalControls

2006-02-08 Thread Robin Haswell
Hey guys. I was builing an application with which I wanted to use InPlaceEditor, but it was preventing navigation because sometimes the bits the admin could edit were the only ways to follow a link. Etc. So I patched controls.js to have a new option "externalControlOnly", to that only the externalC