[mochikit] Re: Transforming a 2-element Array (from formContents) into an object

2007-02-20 Thread Aaron Faanes
. - Aaron On Feb 20, 1:35 pm, "Aaron Faanes" <[EMAIL PROTECTED]> wrote: > MochiKit.Iter.izip(array[0], array[1]) > > will give you what you want. > > - Aaron > > On Feb 20, 10:42 am, "paftek" <[EMAIL PROTECTED]> wrote: > > > Hello ther

[mochikit] Re: Transforming a 2-element Array (from formContents) into an object

2007-02-20 Thread Aaron Faanes
MochiKit.Iter.izip(array[0], array[1]) will give you what you want. - Aaron On Feb 20, 10:42 am, "paftek" <[EMAIL PROTECTED]> wrote: > Hello there, > > I need advice from experts ! What is the best way to convert the > output of DOM.formContents() ( an array like : [ ['name1', 'name2', > 'name

[mochikit] Re: removeElementClass

2007-02-18 Thread Aaron Faanes
(Sorry for the endless spam of fixes to this. :( ) --- element.className = cls.replace(className, ""); +++ element.className = cls.replace(className, " "); - Aaron On Feb 18, 6:57 am, "Aaron Faanes" <[EMAIL PROTECTED]> wrote: > or, rather, for (remo

[mochikit] Re: removeElementClass

2007-02-18 Thread Aaron Faanes
" "; var cls = " " + element.className + " " || ""; element.className = cls.replace(className, ""); // Returns true if a change was made, false otherwise. return cls.length > 0 && cls !== element.className; }

[mochikit] removeElementClass

2007-02-18 Thread Aaron Faanes
A much cleaner removeElementClass? /** @id MochiKit.DOM.removeElementClass */ removeElementClass: function (element, className) { element = MochiKit.DOM.getElement(element); var cls = element.className || ""; element.className = cls.replace(className, ""); // R

[mochikit] repr fix?

2007-02-15 Thread Aaron Faanes
Maybe this is an oversight, maybe it's by design so you always get some valid input from repr; I'm not sure but here's my suggestion. - Aaron === --- Base.js (revision 1269) +++ Base.js (working copy) @@ -742,6 +742,9 @@

[mochikit] Re: createDOM function: first element needs to be created twice?

2007-02-14 Thread Aaron Faanes
You have to make the element twice because foo.innerHTML returns the content _inside_ foo, so it doesn't include foo. That extend stuff isn't from MochiKit, so I'd assume it's coming from Prototype since they do some overloading of DOM stuff. Easiest solution to me would be to just use MochiKit

[mochikit] Re: removeElement

2007-02-11 Thread Aaron Faanes
ed in this case since one can always do this: > > map(removeElement, elements); > > Maybe someone needs to come up with the Zen of Mochikit. :o) > > Arnar > > On 2/11/07, Aaron Faanes <[EMAIL PROTECTED]> wrote: > > > > > should removeElement h

[mochikit] removeElement

2007-02-11 Thread Aaron Faanes
should removeElement have the ability to remove multiple elements? /** @id MochiKit.DOM.removeElement */ removeElement: function (elem) { if(elem instanceof Array) { for(var i=0;i 1) { for(var i=0;ihttp://groups.google.com/group/mochikit?hl=en -~--~

[mochikit] Re: findValue, findIdentical

2007-02-08 Thread Aaron Faanes
If you wanted to just see if an item's in an iterable, but don't really care about the location, just that it contains it. On Feb 8, 5:12 pm, "Bob Ippolito" <[EMAIL PROTECTED]> wrote: > On 2/8/07, Aaron Faanes <[EMAIL PROTECTED]> wrote: > > > > &g

[mochikit] findValue, findIdentical

2007-02-08 Thread Aaron Faanes
I dunno how much you guys like these changes. I figure findValue and findIdentical probably have some performance requirements, so this might be superfluous, but here it is (I copied the actual check directly from extend) I hope you guys don't mind the endless spam of noob questions and suggestio

[mochikit] Re: Visual.Move

2007-02-08 Thread Aaron Faanes
Er, disregard the link and the suggestion - this is Move, not Opacity, and I don't think Opacity would affect it anyway. This is what I get for working into the night. ;) On Feb 8, 5:40 am, "Aaron Faanes" <[EMAIL PROTECTED]> wrote: > In Visual.Move.prototype.setup, the

[mochikit] Visual.Move

2007-02-08 Thread Aaron Faanes
In Visual.Move.prototype.setup, there's the following (line 869) var s = this.element.style; var originalVisibility = s.visibility; var originalDisplay = s.display; if (originalDisplay == 'none') { s.visibility = 'hidden'; s.display = '';

[mochikit] Re: Bugfixes in Selector, DOM

2007-02-07 Thread Aaron Faanes
PROTECTED]> wrote: > On 7 fév, 11:44, "Aaron Faanes" <[EMAIL PROTECTED]> wrote: > > > The following is a couple bugfixes in Selector (just some unqualified > > names that have been lurking) > > OK corrected. > > > There's also a few times in

[mochikit] Bugfixes in Selector, DOM

2007-02-07 Thread Aaron Faanes
be used in MochiKit. Also a minor addition to DOM renames since IE blows and doesn't recognize cellspacing. Hope this is useful to you guys - Aaron Faanes === --- DOM.js (revision 1262) +++ DOM.js (working