[Proto-Scripty] Re: instanting and reinstanting a function: Ajax.PeriodicalUpdater

2009-11-17 Thread david

Bill,

just a precision (in Fact I did not understand that you still need to
get every minutes the result):
the stop() method is at 
http://api.prototypejs.org/ajax/ajax/periodicalupdater.html#stop-instance_method

normally, you could stop  start the peridical updater at will.

--
david

On 16 nov, 15:58, Alex McAuley webmas...@thecarmarketplace.com
wrote:
 Bill.

 You can assign the periodical to a variable and call stop on it if you wish
 ..

 EG.

 var myperiodical=new Ajax.Periodical..

 myperiodical.stop(); // stops it ...

 All this is defined but IMO unclear in the documentation

 HTH

 Alex Mcauley

 http://www.thevacancymarket.com

   - Original Message -
   From: bill
   To: prototype-scriptaculous@googlegroups.com
   Sent: Monday, November 16, 2009 2:31 PM
   Subject: [Proto-Scripty] Re: instanting and reinstanting a function: 
 Ajax.PeriodicalUpdater

   david wrote:
 Hi Bill,

 Isn't it just an Ajax.Request that you need, because the periodical
 executer is used 'generally' without the need of a user click. I mean,
 in your exemple, it's like you start at the begginning the periodical
 updater, and after it reload every time there is new message the
 target DIV.

 But in your case, it seems that the call is done only once on a uxer
 click. So just use AJAX.Request, and on click launch it. The only
 think you will do is to manually update the div with the result of the
 AJAX call.

   no, actually I want the div to be loaded when the user clicks, and reloaded 
 every minute it is visible.

 --
 david

 On 15 nov, 15:36, bill will...@techservsys.com wrote:
   When the user clicks a link it executes this function:
 function fPendingMail() { //set the mail div to show
     document.getElementById (maildiv).style.display = block;
     new Ajax.PeriodicalUpdater('maildiv', 'mail/pending_mail.php',
        {
        method: 'get',
         frequency: 60,
         decay: 1
       });
 return false; //inhibit the href

 }

 and the maildiv appears and loads a list of pending mail messages and
 all is good.

 When they are done the script executes
 document.getElementById (maildiv).style.display = none;

 I know the div is still updating and I don't need it to so:
   1) how do I stop the periodicalUpdater.
   2) should I be de-instanting (whatver the correct verb is) the object
 so that when the user clicks the link again it will not just keep
 creating more instances of the Ajax.PeriodicalUpdater ?

 bill

 --
 Bill Drescher
 william {at} TechServSys {dot} com

 --
 Bill Drescher
 william {at} TechServSys {dot} 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 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: onClick vs Element.observe

2009-11-17 Thread ColinFine



On Nov 16, 11:27 pm, phegaro pheg...@gmail.com wrote:
 Hi all,
   I have an app that is going to put out a list of items onto a page
 and each one has a number of click targets. Now i could setup the
 event handler in one of two ways.

 1. add it into the template that is rendered with the following code

 div onclick=doIt() id=item_1 class=itemItem Name 1/div

 or i could do the following

 2. Add it using a selector and a script

 $$(.item).each(function(element){element.observe('click', doIt);});

 Are there any issues with option 1 or 2 and which is more performant
 and cross browser compatible. I think 1 is more performant but not
 sure it works in all browsers.

Generally, the recommendation is not to use the old 'onClick=' method
of event handling: I don't know how it compares for performance, but
it's certainly less flexible.

You can simplify your 2) slightly:

$$(.item).invoke('observe', 'click', doIt);

A third alternative is to use delegation:

$(document).observe('click', doIt);

and then make doIt determine what was clicked:
function doIt(e) {
  var item = e.findElement('.item');
 ...
}

This is particularly good if you are going to be adding items
dynamically when the page has already been loaded.

Colin Fine

--~--~-~--~~~---~--~~
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 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: onClick vs Element.observe

2009-11-17 Thread david

Hi phegaro,

the difference is not about cross browser, because both method is
cross browser.
first method come the DOM0 specification and the second one is DOM2.

The big difference is that the DOM0 event could only have ONE
definition. But for the DOM2 event, you'll have the possibility to
accept more than one definition.

What I would recommend is to use the DOM2 event and I much more
recommend  using event delegation:
instead of observing each element, just observe the parent and get the
element on the the click is done. So you will have only one event, and
you could remove or insert element, it will always handle event for
all elements.

--
david

On 17 nov, 00:27, phegaro pheg...@gmail.com wrote:
 Hi all,
   I have an app that is going to put out a list of items onto a page
 and each one has a number of click targets. Now i could setup the
 event handler in one of two ways.

 1. add it into the template that is rendered with the following code

 div onclick=doIt() id=item_1 class=itemItem Name 1/div

 or i could do the following

 2. Add it using a selector and a script

 $$(.item).each(function(element){element.observe('click', doIt);});

 Are there any issues with option 1 or 2 and which is more performant
 and cross browser compatible. I think 1 is more performant but not
 sure it works in all browsers.
--~--~-~--~~~---~--~~
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 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: IE8 Invalid argument @ setStyle function

2009-11-17 Thread david

Hi Mostafa,

What line have an invalid argument ?
And what is the function trying to do? means which style is trying to
be modified ?

--
david

On 10 nov, 15:46, Mostafa ms.a...@gmail.com wrote:
 Hi,

 i have a problem when working with iGoogle style drag and drop
 portlets on ie8
 my code runs with no problems on FF, Chrome, Safari and IE7
 But on IE8  the widgets do not work when dropped and give the error
 Invalid argument..

 i digged alot and knew that the problem is in the function setStyle
 [the else part]

 plz help!
--~--~-~--~~~---~--~~
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 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Insert , Defer and Is there a better way?

2009-11-17 Thread T.J. Crowder

Hi,

   I'm sorry but are you asking for more than what is above? I can
 write a simple page that puts together the HTML and JS listed above.

Yes, there are a lot of details not included in that post, which may
be relevant. There are lots of good reasons to do a complete, stand-
alone test case, not least that it eliminates that problem (of missing
details). _Your_ doing it (rather than someone who isn't seeing the
problem) ensures that you create a test case that replicates the
behavior. Separately, when I'm seeing behavior that doesn't quite make
sense to me, when I do a separate isolated test case, I frequently
find that I did something _slightly_ wrong in the original. And if I
don't find that, I have something useful I can post here. :-)

So yes, I'd suggest doing that. FWIW, there's a starter page here:
http://proto-scripty.wikidot.com/self-contained-test-page

-- T.J.

On Nov 3, 12:41 am, phegaro pheg...@gmail.com wrote:
 HI T.J,
   I'm sorry but are you asking for more than what is above? I can
 write a simple page that puts together the HTML and JS listed above.
 Is that what you want?

 Kiran

 On Oct 30, 2:22 am, T.J. Crowder t...@crowdersoftware.com wrote:



  Hi Kiran,

  It sounds like you've already put together a minimalist test case,
  would you post it (e.g., to Pastie[1] or similar)?  I haven't run into
  a situation where a single defer wasn't sufficient, but I also haven't
  tested extensively on Mac OS.

  Cheers,
  --
  T.J. Crowder
  Independent Software Consultant
  tj / crowder software / comwww.crowdersoftware.com

  On Oct 30, 7:19 am, phegaro pheg...@gmail.com wrote:

   Hi all,
     This might be a more generic browser/javascript questions than a
   prototype specific quesiton but i thought it would better to ask here
   because you all tend to really understand javascript and browsers in a
   ton of detail. So here goes.

   If i execute the following code:

   HTML:

   div id=area/div

   Javascript:

   $('area').insert({bottom: div id=inserted/div});

   var count = 0;
   var f = function() {
         if ($('inserted') == null) {
               console.log(not there);
               count++;
               if (count  50) {
                     $('area'.insert({bottom: div id=inserted/
   div});
                     count = 0;
               }
               f.defer();
         } else {
           console.log(there);
        }

   };

   f();

   Result:

   Most of the time it just shows:

there

   but some of the time it does this

not there
not there
not there
there

   I am assuming because the insert is something that is queued and the
   browser then inserts the nodes into the DOM in its next event loop. I
   know that webkit is a single threaded so this makes sense that
   sometimes its not there and then it gets there, so really i guess i
   have to wait till its there before i can do the next thing on that
   inserted node. What about firefox and IE? Are they all single threaded
   in the same way? What happens in Chrome?

   Sometimes i see the following happen also which is really concerning
   to me:

not there
not there
... 50 times
not there
there

   It happens every so often on webkit (mac os) and on iPhone webkit and
   i can reproduce it pretty easily. I have built something simple that
   will do this but all this seems a little crazy to me because when i
   look at others code they dont even take this into account. They never
   way for DOM elements to show up when inserting HTML text into a DOM
   element.

   Any answers/suggestions would be super helpful.

   Kiran
--~--~-~--~~~---~--~~
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 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Ajax.Updater + Sortable.Create = nothing?

2009-11-17 Thread david

Hi,

I think that writing it this way will create the sortable at
compilation time, not at execution, so the sortable is create before
the update is (launch ?) finished.
You should write it inside an anonymous function:

Event.observe(window, 'load', function() {

new Ajax.Updater('issue_order1', '/inc/modules/
issue_order.php?
col=issue_order1', {
  parameters: { onComplete: function(){Sortable.create
('issue_order1') }}
});

});

and that should work. I think, but I did not test it

--
david

On 13 nov, 20:29, Ian R i...@fairmountfair.com wrote:
 Hey all!  I have 4 lists on a page, all if which are filled by an
 Ajax.Updater call.  I want them to be Sortable.  I have this code in
 my document HEAD:

 Event.observe(window, 'load', function() {

         new Ajax.Updater('issue_order1', '/inc/modules/issue_order.php?
 col=issue_order1', {
           parameters: { onComplete: Sortable.create('issue_order1') }
         });

 });

 ... of course I have 4 such calls which run at window load.

 But the lists aren't sortable.  I assume this has something to do with
 them being updated, because if I disable the Ajax.Updater for a list,
 and just make it Sortable, it works fine.  The docs say the onComplete
 callback runs at the very end of the Updater call, but replacing my
 Sortable.create call with an alert that happens onComplete shows that
 the list has yet to be updated and redrawn.

 Any ideas?  Any help would be IMMENSELY appreciated.

 Ian
--~--~-~--~~~---~--~~
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 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Extending a class

2009-11-17 Thread david

Hi greg,

try this:

Object.extend(Form.Methods,{
unserialize: function(element, source) {
  if (!(element = $(element)))
throw new Error('DOMElement is required');

  source = Object.isString(source)
? source.toQueryParams()
: source;

  element.getElements().each(function(element) {
for (var name in source) {
  if (name == element.name)
element.setValue(source[name]);
}
  })
  return element;
}
});


as you extend the Form.method, this method could not be used with the
$ utility, but with the $F utility, so call it with:
$F(form1).unserialize(form1,data)

verify the syntax, this is not tested.
If trouble, repost, I could do some test to set the correct syntax :))

-

david

On 13 nov, 00:31, greg g...@reservation-net.com wrote:
 Some kind soul out there has created a form unserialize method (below)
 that I would like to use.  Being a newbie I can't figure out how to do
 that.

 My first kick at the can was
 Object.extend(Form.Methods, Form.Methods.unserialize);
 and to use it was:
 $(form1).unserialize(form1,data)

 but that didn't work.  I've since tried various permutations and
 combinations of this, to no avail.

 I did get it to work by simply making it a function, but a method
 would be nicer.

 Can anyone point me in the right direction?

 Thank you!

 /**
 * Form#unserialize(@element, source) - Element
 * - @element(FormElement): Form element to fill with values
 * - source(Object | String): Source object where field values are
 taken from
 *
 * Fills form with values of a given object `source`.
 * Each propertie name of `source` is compared to name attribute of a
 form element.
 *
 * $('myForm').unserialize()
 *
 **/
 Form.Methods.unserialize = function(element, source) {
   if (!(element = $(element)))
     throw new Error('DOMElement is required');

   source = Object.isString(source)
     ? source.toQueryParams()
     : source;

   element.getElements().each(function(element) {
     for (var name in source) {
       if (name == element.name)
         element.setValue(source[name]);
     }
   })
   return element;

 };
--~--~-~--~~~---~--~~
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 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: instanting and reinstanting a function: Ajax.PeriodicalUpdater

2009-11-17 Thread Alex McAuley
No need to worry about multiple instances ... just check the variable before 
you initialise it...
Alex Mcauley
http://www.thevacancymarket.com
  - Original Message - 
  From: bill 
  To: prototype-scriptaculous@googlegroups.com 
  Sent: Tuesday, November 17, 2009 3:18 PM
  Subject: [Proto-Scripty] Re: instanting and reinstanting a function: 
Ajax.PeriodicalUpdater


  david wrote: 
Bill,

just a precision (in Fact I did not understand that you still need to
get every minutes the result):
the stop() method is at 
http://api.prototypejs.org/ajax/ajax/periodicalupdater.html#stop-instance_method

normally, you could stop  start the peridical updater at will.

--
david
  Thanks david and Alex,

  So what is the best practice:
  1) create the periodicalupdater when the page loads, stopping it immediately 
and then start it when the div becomes visible and stop it when the div becomes 
invisible.

  2) create the periodicalupdater when it becomes visible and stop it when it 
becomes invisible 

  Or is there any difference ?
  (I worry about multiple instanting the periodicalupdater )


-- 
Bill Drescher
william {at} TechServSys {dot} 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 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Animated Drop Down with Scrollbar won't display

2009-11-17 Thread Blue Hand Talking
I am using a script for an animated drop down menu with a scrollbar.

It will not display normally. If I run the following script in
Firebug:

scrollbar.recalculateLayout();

It works just fine. My problem,  not having in-depth javascript
knowledge,
is how I can have the above script called. I have tried 'onmouseover'
for the
div that contains everything, but nothing. Tried 'onload' in body, but
that
didn't work. Tried using the following for div
id=scrollbar_content :

$('scrollbar_content').observe('onmouseover',function(event) {
scrollbar.recalculateLayout();
event.stop();
});

But that did not work either.

I am currently using a self.init method for the window to fix broken
png files in IE 6, so that is not available.

Any ideas appreciated.

Thanks,

   Jet

--

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-scriptacul...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=.




[Proto-Scripty] Re: onClick vs Element.observe

2009-11-17 Thread phegaro
Delegation sounds like a good model for doing this although if i want
to pass parameters that are custom to each node like which id did it
click on then i assume i have store it as a property on the node and
pass arguments to the delgated function?

In the above example if doIt took a paramter of the id to work on,

doIt(id)  {
// do something to the object with id X
...
}

Then with the delegation model i would have to retreive the node using
findelement and then have an attribute on the node that held the id?
Is that right?

Kiran

On Nov 17, 5:06 am, david david.brill...@gmail.com wrote:
 Hi phegaro,

 the difference is not about cross browser, because both method is
 cross browser.
 first method come the DOM0 specification and the second one is DOM2.

 The big difference is that the DOM0 event could only have ONE
 definition. But for the DOM2 event, you'll have the possibility to
 accept more than one definition.

 What I would recommend is to use the DOM2 event and I much more
 recommend  using event delegation:
 instead of observing each element, just observe the parent and get the
 element on the the click is done. So you will have only one event, and
 you could remove or insert element, it will always handle event for
 all elements.

 --
 david

 On 17 nov, 00:27, phegaro pheg...@gmail.com wrote:

  Hi all,
    I have an app that is going to put out a list of items onto a page
  and each one has a number of click targets. Now i could setup the
  event handler in one of two ways.

  1. add it into the template that is rendered with the following code

  div onclick=doIt() id=item_1 class=itemItem Name 1/div

  or i could do the following

  2. Add it using a selector and a script

  $$(.item).each(function(element){element.observe('click', doIt);});

  Are there any issues with option 1 or 2 and which is more performant
  and cross browser compatible. I think 1 is more performant but not
  sure it works in all browsers.



--

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-scriptacul...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=.




[Proto-Scripty] Re: Insert , Defer and Is there a better way?

2009-11-17 Thread phegaro
Hi T.J.,
  I tried out creating a unit test case for this and doing stuff on
page load and i cant seem to reproduce this on Safari on the desktop
anymore. Its odd because i think it might have to do with timing and
how long the browser takes to render the content into the DOM but i
can reproduce in a simple unit test. I'll check that this unit test
works on iPhone and give you an update.

Thanks

Kiran

On Nov 17, 6:37 am, T.J. Crowder t...@crowdersoftware.com wrote:
 Hi,

    I'm sorry but are you asking for more than what is above? I can
  write a simple page that puts together the HTML and JS listed above.

 Yes, there are a lot of details not included in that post, which may
 be relevant. There are lots of good reasons to do a complete, stand-
 alone test case, not least that it eliminates that problem (of missing
 details). _Your_ doing it (rather than someone who isn't seeing the
 problem) ensures that you create a test case that replicates the
 behavior. Separately, when I'm seeing behavior that doesn't quite make
 sense to me, when I do a separate isolated test case, I frequently
 find that I did something _slightly_ wrong in the original. And if I
 don't find that, I have something useful I can post here. :-)

 So yes, I'd suggest doing that. FWIW, there's a starter page 
 here:http://proto-scripty.wikidot.com/self-contained-test-page

 -- T.J.

 On Nov 3, 12:41 am, phegaro pheg...@gmail.com wrote:

  HI T.J,
    I'm sorry but are you asking for more than what is above? I can
  write a simple page that puts together the HTML and JS listed above.
  Is that what you want?

  Kiran

  On Oct 30, 2:22 am, T.J. Crowder t...@crowdersoftware.com wrote:

   Hi Kiran,

   It sounds like you've already put together a minimalist test case,
   would you post it (e.g., to Pastie[1] or similar)?  I haven't run into
   a situation where a single defer wasn't sufficient, but I also haven't
   tested extensively on Mac OS.

   Cheers,
   --
   T.J. Crowder
   Independent Software Consultant
   tj / crowder software / comwww.crowdersoftware.com

   On Oct 30, 7:19 am, phegaro pheg...@gmail.com wrote:

Hi all,
  This might be a more generic browser/javascript questions than a
prototype specific quesiton but i thought it would better to ask here
because you all tend to really understand javascript and browsers in a
ton of detail. So here goes.

If i execute the following code:

HTML:

div id=area/div

Javascript:

$('area').insert({bottom: div id=inserted/div});

var count = 0;
var f = function() {
      if ($('inserted') == null) {
            console.log(not there);
            count++;
            if (count  50) {
                  $('area'.insert({bottom: div id=inserted/
div});
                  count = 0;
            }
            f.defer();
      } else {
        console.log(there);
     }

};

f();

Result:

Most of the time it just shows:

 there

but some of the time it does this

 not there
 not there
 not there
 there

I am assuming because the insert is something that is queued and the
browser then inserts the nodes into the DOM in its next event loop. I
know that webkit is a single threaded so this makes sense that
sometimes its not there and then it gets there, so really i guess i
have to wait till its there before i can do the next thing on that
inserted node. What about firefox and IE? Are they all single threaded
in the same way? What happens in Chrome?

Sometimes i see the following happen also which is really concerning
to me:

 not there
 not there
 ... 50 times
 not there
 there

It happens every so often on webkit (mac os) and on iPhone webkit and
i can reproduce it pretty easily. I have built something simple that
will do this but all this seems a little crazy to me because when i
look at others code they dont even take this into account. They never
way for DOM elements to show up when inserting HTML text into a DOM
element.

Any answers/suggestions would be super helpful.

Kiran



--

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-scriptacul...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=.




Re: [Proto-Scripty] Re: Help Prototype in a few minutes per day

2009-11-17 Thread Иван Жеков
on windows it's quite tricky to rake the stuff.

I was required to install maruku gem to rake doc and even then I wasn't able
to do so

syntax error, unexpected $end, expecting ')' obj.sub!('...', 'тАж') if
obj.is_a?(String)

or something like it.

I will reinstall the tools and see if I am able to fix things.

2009/11/17 T.J. Crowder t...@crowdersoftware.com


 Thank you Rumble for being the first to pitch in[1][2]!! Very much
 appreciated!

 [1] https://prototype.lighthouseapp.com/projects/8886/tickets/934
 [2] https://prototype.lighthouseapp.com/projects/8886/tickets/935

 -- T.J.

 On Nov 16, 3:49 pm, T.J. Crowder t...@crowdersoftware.com wrote:
  Hi all,
 
  As you know, the new API docs[1] are generated via PDoc[2][3] from the
  source code. Unfortunately, though, porting over the old docs[4] is a
  non-trivial process, just because of the volumes involved and because
  frankly the old docs were pretty out of date. (I cheerfully
  volunteered to do it -- I'm not Core, I just help out sometimes and
  help moderate the lists -- completely underestimating the size of the
  task; and then my Real Job got Real Busy and I'm just not going to get
  it done alone. In fact, I've done just about as much on it as I can.)
 
  Now YOU, in just a few minutes per day, can dramatically help
  Prototype's documentation by helping merge the old docs into the
  source (and updating them to be current as we go). There are a bunch
  of tickets in Lighthouse[5] related to merging the old docs in (that
  link will automatically search for them for you).
 
  The tickets have been divvied up into bite-sized chunks, so you can
  dip in and out quite easily, it's not a big commitment!
 
  Much of the work has already been done for you, by Tobie writing a
  script to reach into Mephisto (the CMS that handles the old API docs
  [and various other things]) and extracting the docs, automatically
  converting much of their markup into the new PDoc format. Those .pdoc
  files (which are just plain text) are attached to the tickets they
  relate to. So a lot of this is just copy-and-paste into the relevant
  source file.
 
  It's easy to get involved, especially if you're a Mac OS, Linux, or
  *nix user (but Windows users are welcome too!). Just:
 
  1. Grab a copy of the the source:
 
  $ git clone git://github.com/sstephenson/prototype.git
  $ cd prototype
 
  2. Build your local copy
 
  $ rake dist
  $ rake doc
 
  (You may need to install the bluecloth ruby-gem. If you find you need
  to install others, please post here so people know!)
 
  3. Grab one of the merge old docs tickets[5] from Lighthouse
 
  4. See if someone's already working on it (see the comments) and if
  not, add a comment saying you're working on it
 
  5. Make your changes to the source. Please do take time to make sure
  that what you're doing is in keeping with the new PDoc formatting and
  such.
 
  6. Check them by building your docs again (rake doc)
 
  7. Build a patch:
 
  $ git add src/blah/blah.js  (e.g., the file you modified)
  $ git commit -m doc: blah blah blah [#123 state:resolved]
  $ git format-patch origin
 
  (Note the doc: at the beginning of the commit line, and the [#123
  state:resolved] at the end. The 123 should be the issue # of the
  issue you're fixing.)
 
  8. Upload the patch file to the ticket.
 
  More info on getting the source and building patches and such on the
  Contribute page[6].
 
  Some things to look out for in the docs:
 
  * Do the parameter names match the source?
  * Do the parameters have their types?
  * Are the examples correct?
  * Are the examples...overdone, overly chatty, or unrealistic -- e.g.,
  in need of pruning?
  * Do all Examples headers use H5 (either by using an h5 element, or
  by using five has marks: #)?
 
  [1]http://api.prototypejs.org
  [2]http://pdoc.org
  [3]http://groups.google.com/group/pdoc
  [4]http://prototypejs.org/api
  [5]
 https://prototype.lighthouseapp.com/projects/8886-prototype/tickets?q...
  [6]http://prototypejs.org/contribute
 
  If we all pitch in a few minutes here and there, we'll get the new
  docs up-to-scratch in terms of information in no time!
 
  Many thanks in advance to anyone who pitches in.
 
  -- T.J. :-)
 --~--~-~--~~~---~--~~
 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
 prototype-scriptaculous+unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/prototype-scriptaculous?hl=en
 -~--~~~~--~~--~--~---



--

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-scriptacul...@googlegroups.com.
For more 

[Proto-Scripty] Hourglass cursor appear on whole page

2009-11-17 Thread JoJo
When the user clicks a button, I want to show an hourglass cursor
while its onclick handler is being run. I tried this:

$$('body').first().setStyle({cursor: 'progress'});

The hourglass only appears when I hover over the body background. When
hovering over the button itself (which is an a), the cursor does not
show the hourglass.  How do I get the hourglass to appear regardless
of where I'm pointing?

Thanks.

--

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-scriptacul...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=.