[Proto-Scripty] Script.aculo.us 2

2008-10-05 Thread Baglan

Hello!

Browsing thru the GIT repository for the Script.aculo.us, I've found
this phrase on the Contributions page (http://github.com/madrobby/
scriptaculous/wikis/Contribute):

As script.aculo.us 1.xx is feature-frozen, this development trunk is
for bugfixes only (new features will only happen for script.aculo.us
2).

Does that mean that Script.aculo.us 2 is in works?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Question regarding Element.observe and Element.stopObserving

2008-10-05 Thread labs2.0

Still not like what it does to the Event.cache. If you plan an app
that should work 8 hours a day, without browser refresh - hey, we are
moving on to the browser or what ;) - I think that every bit should be
considered, and in an interface with 3 or 4 active windows at time,
each one with dozens of comps listening god knows what, and a create/
destroy cycle of about two or tree windows per minute... I dont
know...

One other thing that maybe fits beter in fresh new topic:
element.visible()
Its just not ok. When I want to know if that element is visible, I
mean by the users point of view, so, if its display is not none but
its div container is, well, thats pretty unvisible to me.

So...

isVisible: function(element) {
var ok = $(element).visible();
if (!ok) return false;
$(element).ancestors().each(
function(obj){
if (!obj.visible()) throw $break;
}
);
return ok;
}

...or please a better optimized way to do that ;)

[]'s
Labs


On Oct 4, 6:09 pm, kangax [EMAIL PROTECTED] wrote:
 On Oct 3, 7:26 pm, Lea Hayes [EMAIL PROTECTED] wrote:



  This works great, until a form or input element, is within the element
  hierarchy.  It is mainly a problem with the HTML input tag, because
  most of the time (especially in ASP.NET) everything is contained
  within the form.

  html
  head
          titleTest Page/title
          script type=text/javascript src=prototype.js/script
          script type=text/javascript
                  Object.extend(Element.Methods, {
                          stopObservingNested: function(element) {
                                  element.stopObserving();
                                  
  element.descendants().each(Element.stopObserving);
                          }
                  });
                  Element.addMethods();

                  window.onload = function() {
                          $('testDiv').observe('click', function(event) { 
  alert('clicked div'); });
                          $('testSpan').observe('click', function(event) { 
  alert('clicked span'); });
                          $('testClear').observe('click', function(event) {
                                  var el = $('testDiv');
                                  el.stopObservingNested();
                          });
                  }
          /script
  /head
  body
          div id=testDiv
                  !-- Form causes eventName.include is not a function 
  prototype.js Line: 3942
                  form
                          span id=testSpan
                                  Hello World!
                          /span
                  /form
                  nbsp;-nbsp;Div Part!
          /div

          input id=testClear type=button value=Clear Events /
  /body
  /html

 I'm an idiot : )
 This error has nothing to do with the form, but is due to the way
 `stopObserving` works. We had this issue fixed in a trunk but then
 it was temporarily removed before 1.6.0.3 release. The problem is that
 `stopObserving` accepts optional 2nd and 3rd arguments and when passed
 as an iterator (to `each`) it gets called with `value` and `index`
 arguments that are being passed to an iterator.

 You can use `invoke` meanwhile (don't forget to extend an element
 first and then return it from the method):

 Element.addMethods({
   stopObservingNested: function(element) {
     element = $(element);
     element.descendants().invoke('stopObserving');
     return element.stopObserving();
   }

 });

 --
 kangax
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Prototype wiki?

2008-10-05 Thread T.J. Crowder

Hi folks,

script.aculo.us is using github's wiki stuff these days:
http://github.com/madrobby/scriptaculous/wikis

I can't help but notice this:
http://github.com/sstephenson/prototype/wikis

It currently just says Welcome to the Prototype wiki!

Is it meant to be / become an official wiki for Prototype?
--
T.J. Crowder
tj / crowder software / com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Question regarding Element.observe and Element.stopObserving

2008-10-05 Thread Lea Hayes

Yes, that solves the problem, it now works in IE7/8+FF3.

Sadly in Chrome it doesn't appear to work at all. Clicking the stop
button does absolutely nothing, yet the method is being called because
I tried sticking a test message box in there. The box appears, but the
events are simply not stopped. I tried going to the Chrome console to
find out if any errors were being reported, and it breaks even earlier
saying that '.observe' is not a function.

html
head
titleTest Page/title
script type=text/javascript src=prototype.js/script
script type=text/javascript
Object.extend(Element.Methods, {
stopObservingNested: function(element) {
alert('about to stop events...');
element.descendants().invoke('stopObserving');
element.stopObserving();
alert('stopped events! - supposidly');
return element;
}
});
Element.addMethods();

window.onload = function() {
$('testDiv').observe('click', function(event) { 
alert('clicked div'); });
$('testSpan').observe('click', function(event) { 
alert('clicked span'); });
$('testClear').observe('click', function(event) {
var el = $('testDiv');
el.stopObservingNested();
});
}
/script
/head
body
div id=testDiv
form
span id=testSpan
Hello World!
/span
/form
nbsp;-nbsp;Div Part!
/div

input id=testClear type=button value=Clear Events /
/body
/html

2008/10/4 kangax [EMAIL PROTECTED]:

 On Oct 3, 7:26 pm, Lea Hayes [EMAIL PROTECTED] wrote:
 This works great, until a form or input element, is within the element
 hierarchy.  It is mainly a problem with the HTML input tag, because
 most of the time (especially in ASP.NET) everything is contained
 within the form.

 html
 head
 titleTest Page/title
 script type=text/javascript src=prototype.js/script
 script type=text/javascript
 Object.extend(Element.Methods, {
 stopObservingNested: function(element) {
 element.stopObserving();
 
 element.descendants().each(Element.stopObserving);
 }
 });
 Element.addMethods();

 window.onload = function() {
 $('testDiv').observe('click', function(event) { 
 alert('clicked div'); });
 $('testSpan').observe('click', function(event) { 
 alert('clicked span'); });
 $('testClear').observe('click', function(event) {
 var el = $('testDiv');
 el.stopObservingNested();
 });
 }
 /script
 /head
 body
 div id=testDiv
 !-- Form causes eventName.include is not a function 
 prototype.js Line: 3942
 form
 span id=testSpan
 Hello World!
 /span
 /form
 nbsp;-nbsp;Div Part!
 /div

 input id=testClear type=button value=Clear Events /
 /body
 /html

 I'm an idiot : )
 This error has nothing to do with the form, but is due to the way
 `stopObserving` works. We had this issue fixed in a trunk but then
 it was temporarily removed before 1.6.0.3 release. The problem is that
 `stopObserving` accepts optional 2nd and 3rd arguments and when passed
 as an iterator (to `each`) it gets called with `value` and `index`
 arguments that are being passed to an iterator.

 You can use `invoke` meanwhile (don't forget to extend an element
 first and then return it from the method):

 Element.addMethods({
  stopObservingNested: function(element) {
element = $(element);
element.descendants().invoke('stopObserving');
return element.stopObserving();
  }
 });

 --
 kangax
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: problem: select-one and events

2008-10-05 Thread buda

Tom, thanks for detail explanation

On 1 окт, 21:34, Tom [EMAIL PROTECTED] wrote:
 buda,
    Custom events work just like normal events (they're built on the
 dataavailable event) - so you watch for an event on a specific
 element.   For that event to be caught you need to fire it on the
 element you're listening on, or on a descendant of that element so
 that it bubbles up to the element you are observing on.  As I said
 before Hectors example shows one way of doing this

 $('Select1').observe('change', function()
 { $('Select2').fire('Select1:changed') });

 $('Select2').observe('Select1:changed', function()
 { alert('changed'); });

 here, you listen on Select1 for a change event, and when that is
 received you fire the Event Select1:changed on Select2, which is
 where you are listening for it, and the alert will be displayed.
 Obviously this method doesnt scale very well for multiple dependant
 selects and may not be the best solution.  Also in this case using
 custom events doesnt make a lot of sense since you could just do
 $('Select1').observe('change', function() { alert('changed'); }))
 and have the same behavior

 On Oct 1, 2:15 am, buda [EMAIL PROTECTED] wrote:



  I'm disappointed

  On 30 сент, 11:33, buda [EMAIL PROTECTED] wrote:

   You have definitively confused me - show how it would be right

   On 30 сент, 03:21, Tom [EMAIL PROTECTED] wrote:

Custom events are built on top of the dataavailable event, so they
behave just let any other standard bubbling event.   That means if you
want to be able to catch the event you need to be observing on an
element that it would bubble to.
In your code
  $('Select2').observe('Select1:changed', function()
{ alert('changed'); });
it listens at the select2 event for your custom event named
Select1:changed - (note the name of the event is strictly arbitrary
and doesnt actually tie it in any way to Select1)  Because of this if
you fire the event on Select1 it will never bubble to Select2.  As
Hector pointed out if you fire the Event on select2 then your observer
will catch it - { $('Select2').fire('Select1:changed') }

Tom- Скрыть цитируемый текст -

   - Показать цитируемый текст -- Скрыть цитируемый текст -

 - Показать цитируемый текст -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Prototype wiki?

2008-10-05 Thread T.J. Crowder

 What would go in this wiki ?

Whatever the community comes up with -- that's the joy of community
content! ;-)  The FAQ that kangax and I wrote, for a start; it's been
more than three months since we turned it over in markdown format and
it still hasn't appeared on prototypejs.org as discussed because
people are too busy -- and even if it did, there are probably 18 edits
that really need to get made that people would make if it were open
and editable by the community (like, for instance, adding Andrew's
book that's come out in the meantime to the where can I read more
section).  That's the issue with gatekeepig; gatekeepers tend to get
too busy...
--
T.J. Crowder
tj / crowder software / com

On Oct 5, 9:39 pm, Tobie Langel [EMAIL PROTECTED] wrote:
 What would go in this wiki ?

 On Oct 5, 10:34 pm, T.J. Crowder [EMAIL PROTECTED] wrote:

  Hey Tobie,

  So there's no plan to host a Prototype wiki there?
  --
  T.J. Crowder
  tj / crowder software / com

  On Oct 5, 6:46 pm, Tobie Langel [EMAIL PROTECTED] wrote:

   That's the github default.

   Best,

   Tobie

   On Oct 5, 3:53 pm, T.J. Crowder [EMAIL PROTECTED] wrote:

Hi folks,

script.aculo.us is using github's wiki stuff these 
days:http://github.com/madrobby/scriptaculous/wikis

I can't help but notice 
this:http://github.com/sstephenson/prototype/wikis

It currently just says Welcome to the Prototype wiki!

Is it meant to be / become an official wiki for Prototype?
--
T.J. Crowder
tj / crowder software / com


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Prototype wiki?

2008-10-05 Thread Tobie Langel

What would go in this wiki ?

On Oct 5, 10:34 pm, T.J. Crowder [EMAIL PROTECTED] wrote:
 Hey Tobie,

 So there's no plan to host a Prototype wiki there?
 --
 T.J. Crowder
 tj / crowder software / com

 On Oct 5, 6:46 pm, Tobie Langel [EMAIL PROTECTED] wrote:

  That's the github default.

  Best,

  Tobie

  On Oct 5, 3:53 pm, T.J. Crowder [EMAIL PROTECTED] wrote:

   Hi folks,

   script.aculo.us is using github's wiki stuff these 
   days:http://github.com/madrobby/scriptaculous/wikis

   I can't help but notice this:http://github.com/sstephenson/prototype/wikis

   It currently just says Welcome to the Prototype wiki!

   Is it meant to be / become an official wiki for Prototype?
   --
   T.J. Crowder
   tj / crowder software / com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Prototype wiki?

2008-10-05 Thread Jerod Venema
Here's another vote for a prototype.js wiki...

It'd be great to have a central place where we could put all the extra
bits of code people have written in their libraries rather than having to
search through the google archives.

Also, there have been a couple times that I've wanted to update the docs
with a bit more info. Explain an example a bit more, show perhaps a this is
a good pattern to use for situation XYZ, etc. I've replied back to the
appropriate lists with suggestions once or twice, but as TJ mentioned, I
think the gatekeepers might have just had a bit too much going on, so the
suggestions fell to the wayside.

-Jerod

On Sun, Oct 5, 2008 at 5:04 PM, T.J. Crowder [EMAIL PROTECTED] wrote:


  What would go in this wiki ?

 Whatever the community comes up with -- that's the joy of community
 content! ;-)  The FAQ that kangax and I wrote, for a start; it's been
 more than three months since we turned it over in markdown format and
 it still hasn't appeared on prototypejs.org as discussed because
 people are too busy -- and even if it did, there are probably 18 edits
 that really need to get made that people would make if it were open
 and editable by the community (like, for instance, adding Andrew's
 book that's come out in the meantime to the where can I read more
 section).  That's the issue with gatekeepig; gatekeepers tend to get
 too busy...
 --
 T.J. Crowder
 tj / crowder software / com

 On Oct 5, 9:39 pm, Tobie Langel [EMAIL PROTECTED] wrote:
  What would go in this wiki ?
 
  On Oct 5, 10:34 pm, T.J. Crowder [EMAIL PROTECTED] wrote:
 
   Hey Tobie,
 
   So there's no plan to host a Prototype wiki there?
   --
   T.J. Crowder
   tj / crowder software / com
 
   On Oct 5, 6:46 pm, Tobie Langel [EMAIL PROTECTED] wrote:
 
That's the github default.
 
Best,
 
Tobie
 
On Oct 5, 3:53 pm, T.J. Crowder [EMAIL PROTECTED] wrote:
 
 Hi folks,
 
 script.aculo.us is using github's wiki stuff these days:
 http://github.com/madrobby/scriptaculous/wikis
 
 I can't help but notice this:
 http://github.com/sstephenson/prototype/wikis
 
 It currently just says Welcome to the Prototype wiki!
 
 Is it meant to be / become an official wiki for Prototype?
 --
 T.J. Crowder
 tj / crowder software / com
 
 
 



-- 
Jerod Venema
Senior Software Engineer
Nth Penguin, LLC
http://www.nthpenguin.com
(919) 368-5105
---
WebWidgetry.com / MashupStudio.com
Future Home of the World's First Complete Web Platform

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Prototype wiki?

2008-10-05 Thread Tobie Langel

There are some security issues with the github wiki which currently
makes it improper to be used as a community wiki.

Regarding the FAQ, I remember clearly requesting a number of changes
to it before publishing it and haven't heard about it since then.

I'd love to have it online asap.

Best,

Tobie


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---