In the jQuery the $ function have two attributes the second is
context, and it is very useful, for example:
$("div").each(function(){
$("img",this).hide()
$(".",this).dosomething()
})
And in the Prototype there is also Selector.findChildElements and the
first attribute is the context, and this
On 10/17/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> I think is is good to create a new function
> called "$$$" or something like that to make a short selector function
> and supports context.
We use "Element#select" to constrain the lookup to a certain element:
$("foo").select("img
Currently, a template with an empty replacement variable gobbles up
the preceding character:
"##{}".interpolate({}) // => ""
"AB#{}".interpolate({}) // => "A"
Instead, I think the template should evaluate just like it does in
Ruby:
"##{}" #=> "#"
"AB#{}" #=> "AB"
A patch in Ticket #9
+1 for ignoring "pkg" and "dist/*", but keep the dist directory itself.
On 10/17/07, Ryan McGeary <[EMAIL PROTECTED]> wrote:
>
>
> What does the core team thinnk about svn:ignoring "pkg" and "dist/
> prototype.js?" Clean svn status messages make me happy :-)
>
> Ticket #9705 elaborates:
> http:/
What does the core team thinnk about svn:ignoring "pkg" and "dist/
prototype.js?" Clean svn status messages make me happy :-)
Ticket #9705 elaborates:
http://dev.rubyonrails.org/ticket/9705
Thanks,
Ryan
--~--~-~--~~~---~--~~
You received this message because yo
It may never have been intended to use this way, but I've found it
quite useful in the past to be able to use hashes as the source for
template variables. With the new restriction on accessing properties
directly this no longer works.
Looking at the code for Template, it looks like it might be as
On 10/17/07, G Jones <[EMAIL PROTECTED]> wrote:
>
>
> Looking at the code for Template, it looks like it might be as simple
> as giving Hash a 'toTemplateElements()' method that returns
> 'this.toObject()'
http://dev.rubyonrails.org/ticket/9903
I'm torn between teaching Hash to respond to "toTem
On 10/15/07, Matt Foster <[EMAIL PROTECTED]> wrote:
>
>
> I have developed a pretty smooth UI Control for handling
> client side pagination. It is composed of 3 classes that allow for
> maximum decoupling. In this manner the view is decoupled from the
> iteration control, such that the same itera
+1 for teaching Hash to respond to "toTemplateReplacements," because I find
this to be more self-documenting.
On 10/17/07, Mislav Marohnić <[EMAIL PROTECTED]> wrote:
>
> On 10/17/07, G Jones <[EMAIL PROTECTED]> wrote:
> >
> >
> > Looking at the code for Template, it looks like it might be as simp
Mislav Marohnić a écrit :
> I'm torn between teaching Hash to respond to "toTemplateElements" or
> teaching Template to try "toObject" after "toTemplateElements" is
> unavailable. What do you guys think?
The second version seems totally overreaching. If we do that AT ALL,
I'd favor:
Hash.pro
On 10/17/07, Christophe Porteneuve <[EMAIL PROTECTED]> wrote:
>
>
> This being said, I don't think there's a massive reason to add this
> orthogonal feature to Hash: people who want to use an actual Hash as a
> source object to a template should pass myHash.toObject() instead of
> just myHash...
> ... people who want to use an actual Hash as a
> source object to a template should pass myHash.toObject() instead of
> just myHash...
I tend to disagree. I think requiring myHash.toObject() violates the
POLS. Otherwise, why does Template#evaluate even try calling
toTemplateReplacements at a
We can stop arguing now. Sam has already fixed it in trunk:
http://dev.rubyonrails.org/changeset/7955
:)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Prototype: Core" group.
To post to this group, send email to p
Oh, the "select" method, I haven't use it, and the context is
important for the css selector, and in the case
Selector.findChildElements supports the context, So only change the $
$ function and to check whether the last argument is HTML element or
not is enough. And context is really very import
I recently stumbled upon http://dev.rubyonrails.org/ticket/
9465">this ticket
In a nutshell, element.select(' > foo') does not return the correct
result while element.select('foo') does.
I understand that combinator selector should be defined between two
simple ones (so it's not quite a valid ex
Please make it to be simple, look at the source code:
select: function() {
var args = $A(arguments), element = $(args.shift());
return Selector.findChildElements(element, args);
},
the "select" method is only a wrapper of the
Selector.findChildElements, and with different selector cont
I just discovered that if you call setOpacity in IE on an element that
was just created (and so hasn't been added to the DOM yet), an exception
will be thrown. It looks like the currentStyle object on the element is
not set until after it has been attached to the DOM. An example script is:
h
On 10/17/07, kangax <[EMAIL PROTECTED]> wrote:
>
>
> In a nutshell, element.select(' > foo') does not return the correct
> result
+1 for fixing it, regardless of the fact it may not be a valid selector ...
it's a valid fragment of a selector.
I want to be able to select immediate descendants thi
Today I updated to Prototype 1.6.0 RC1 from RC0. I am also using
Scriptaculous 1.8 preview.
Beyond changing my "contentloaded" to "dom:loaded" the transition
seemed to go fairly smoothly. Until I encountered the following error
in IE (6 and 7):
Drags created with "new Draggable(...)" no longer d
On 10/17/07, Bart Lewis <[EMAIL PROTECTED]> wrote:
>
>
> Looks like isLeftClick was significantly changed just yesterday:
> http://dev.rubyonrails.org/changeset/7926
... and it was fixed today: http://dev.rubyonrails.org/changeset/7954
Thanks for reporting, though. Everyone who has troubles with
I'm not crazy about it. Deviations from the CSS3 spec are troublesome
because they're not discoverable and they violate POLS. If we're going
to go down that slippery slope, selector.js will get even larger than
it already has.
The extended Enumerable#grep semantics in 1.6 make kangax's
alternativ
21 matches
Mail list logo