[Proto-Scripty] updating prototype and script.aculo.us - ROR

2010-03-05 Thread jb
I've been trying to run the following command to get the latest
version of prototype and script.aculo.us for my Ruby on Rails project:

rake rails:update:javascripts

But the scripts under /public/javascrips/ are not being updated.

I'm using ruby 1.8.7, rails 2.3.5 on mac OS X 10.6

Is there another way to keep current with the latest javascript
libraries?

-- 
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.
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: updating prototype and script.aculo.us - ROR

2010-03-05 Thread T.J. Crowder
Hi,

I think you're more likely to get a good answer in the ROR Talk group:

http://groups.google.com/group/rubyonrails-talk

A lot of us here don't use Ruby or Rails.

FWIW,
--
T.J. Crowder
Independent Software Consultant
tj / crowder software / com
www.crowdersoftware.com


On Mar 5, 12:19 am, jb mini...@gmail.com wrote:
 I've been trying to run the following command to get the latest
 version of prototype and script.aculo.us for my Ruby on Rails project:

 rake rails:update:javascripts

 But the scripts under /public/javascrips/ are not being updated.

 I'm using ruby 1.8.7, rails 2.3.5 on mac OS X 10.6

 Is there another way to keep current with the latest javascript
 libraries?

-- 
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.
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] colorpickerjs using callbacks

2010-03-05 Thread Tonypm
Hi,

Need help about using callbacks I don't know if anyone has used
colorpickerjs

http://code.google.com/p/colorpickerjs/

It seems to be a great little colorpicker utility based on
scriptaculous.

I have got it working, but would like to hook into one of the
callbacks to dynamically change the color of a text element on the
page.  The summary page refers to four callbacks, but I cant for the
life of me figure out how to access them.

I have tried accessing the callbacks from the button or the input, but
suspect I need to directly access the control but don't know how.

My js knowledge is a bit limited; I have done some reading on
callbacks but have to admit to being somewhat befuddled.

Thanks for any help
Tonypm

-- 
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.
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: Disabling ajax.autocompleter (new way) when updating field

2010-03-05 Thread Eric
Just give the focus to something else.

Eric

On Feb 24, 11:02 pm, Jinsa jf.wesq...@gmail.com wrote:
 Hi all!

 Sorry for digging up such an old thread (see Disabling Scriptaculous
 autocomplete at the bottom of my thread)  but I'm working on the same
 problem (more or less).

 I have an input field using autocompleter and I must disable it when I
 modify the div wich contains the input field (it deletes the input and
 cause an error because the oberver on the autocompleter observe
 nothing)

 So, one solution seems to focus out the input field (doing manualy it
 dodge the error), it makes it stop the observer (wich is good! :))
 but... mmhhh... I don't even know how to focus out an input field ^^.
 I tried element.toogle, element.focus(0), element.hide()... nothing
 works.

 So, maybe someone have a clue in order to make it work (btw I may not
 want to modify controls.js... because I don't see how to disable it
 with the modifications)

 Enjoy your night!

 Jinsa.

 Original 
 thread:http://groups.google.com/group/prototype-scriptaculous/browse_thread/...

-- 
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.
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: Having Effect.Opacity work with a Class and not an ID

2010-03-05 Thread Eric
Hi,

David from the list wrote a class for doing this (an effect that
actually modify the CSS style's style and by side effect all DOM
objects belonging to the same class:
http://scripteka.com/script/effect-onclass

Note that you'll need to be sure that your CSS style has an explicit
opacity value before calling the effect.

Eric

On Mar 5, 9:44 am, T.J. Crowder t...@crowdersoftware.com wrote:
 Hi,

 You can use Effect.multiple[1] to apply the same effect to multiple
 elements. So:

     Effect.multiple($$('.fade-in'), Effect.Opacity, { from: 0, to: 1,
 duration: 1.5 });

 [1]http://wiki.github.com/madrobby/scriptaculous/effect-multiple

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

 On Mar 3, 5:27 pm, CaptainNoob jacobl...@gmail.com wrote:

  ul id=menu
          li id=nav_home class=fade-ina href=/Home/a/li
          li id=nav_archivesa href=/archivesArchives/a/li
          li id=nav_contact class=fade-ina href=/contactContact Me/
  a/li
          li id=nav_googlea href=http://google.com;
  rel=externalGoogle/a/li
  /ul

  --

  new Effect.Opacity('fade-in', { from: 0, to: 1, duration: 1.5 });

  Is it possible to fire scriptaculous effects with a class name rather
  than an ID? I tried putting $$('fade-in') , but that did not seem to
  work.

  Thank you for the help.
  Jacob



-- 
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.
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.



Re: [Proto-Scripty] Re: How would I get a closer set of siblings?

2010-03-05 Thread Walter Lee Davis
Thanks, yes that might work. But I am trying to write something which  
is structure-agnostic, since it goes in a plug-in for a Web design  
application, and I have no idea how people will want to use it. Alex's  
suggestion allows me to do the very least (and therefore resist the  
urge to screw up) while still offering an unsurprising result in a  
wide range of layout situations.


Walter

On Mar 5, 2010, at 8:08 AM, Eric wrote:


Hi,

All the proposed solutions are very nice example of coding, but
however you may ask yourself this question:
If there is no easy way to do the processing I want with my data
structure, am I sure I am using the right data structure?

In other words, instead of coding heavy processing functions couldn't
you just change your DOM structure to optimize whatever processing you
need to do with them.

In your case, adding a DIV around each H3-P-P-P... sequence would do
the trick.

Alex: Very nice implementation!

Eric

On Feb 23, 6:20 pm, Walter Lee Davis wa...@wdstudio.com wrote:

Wow, thanks very much Alex!

Walter

On Feb 23, 2010, at 11:28 AM, Alex Wallace wrote:


Here's a slightly better version, as it crawls the tree itself
instead of grabbing and filtering all of the element's
nextSiblings(). Since it avoids the call to recursivelyCollect()
it's a bit faster (with 10 siblings after the requested node, it's
about 20% faster - when I upped it to about 40 elements after the
node, it ran well over 250% faster). If you have a lot of nodes to
filter for the accordion, I'd definitely use this version.



function fasterSameTagSiblings(element) {
   element = $(element);
   var results = [], node = element.nextSibling, tag;
   while (node = node.nextSibling) {
   if (node.nodeType === 1) {
   tag = tag || node.tagName.toLowerCase();
   if (node.tagName.toLowerCase() === tag)
   results.push(node)
   else
   break;
   }
   }
   return results;
}



Cheers,
Alex



Micro-optimization for sure, but it was bugging me. :)



   function fasterSameTagSiblings(element) {
   element = $(element);
   var results = [], node = element.nextSibling, tag;
   while (node = node.nextSibling) {
   if (node.nodeType === 1) {
   tag = tag || node.tagName.toLowerCase();
   if (node.tagName.toLowerCase() === tag)
   results.push(node)
   else
   break;
   }
   }
   return results;
   }



On Mon, Feb 22, 2010 at 8:24 PM, Walter Lee Davis
wa...@wdstudio.com wrote:
The heads and the paragraphs are all at the same level, and I don't
want all the paragraphs, just the ones between this head and the
next head. (It's for an accordion effect.) So while
up('div').select('p') would do exactly what you say, it would leave
me where I started.



Thanks,



Walter



On Feb 22, 2010, at 5:46 PM, Matt Foster wrote:


This is probably too obvious to be right but if you're simply  
looking
for all of the paragraph tags at that level could you simply go up  
to

the parent and select down from there?



On Feb 22, 12:57 pm, Paul Kim kimba...@gmail.com wrote:
Hi Alex, thanks for the tip. I've modified the function based on
your tip
and your example function:



   function consecutiveSameTagSiblings(element) {
   var element = $(element);
   var nextSiblings = element.nextSiblings();
   var similarElements = [];
   similarElements.push(element);
   for (var i=0; i nextSiblings.length; i++) {
   if (element.tagName == nextSiblings[i].tagName) {
   similarElements.push(nextSiblings[i]);
   }
   else {
   break;
   }
   }
   return similarElements;
   }



On Mon, Feb 22, 2010 at 9:50 AM, Alex Wallace
alexmlwall...@gmail.comwrote:



Paul, one recommendation: store the results of
element.nextSiblings() in a
local variable outside of the loop. DOM traversals are pretty slow.



Best,
Alex


On Mon, Feb 22, 2010 at 12:28 PM, Paul Kim kimba...@gmail.com  
wrote:



Hi Walter, if you want to get all similar elements up to but not
including
the next head, I would use Prototype's Element.nextSiblings() to  
loop

through all elements with the same tagName and break when the
tagName is
different. Here is a function I created just now that would
hopefully do
what you want:



function getSimilarElements(element) {
   var element = $(element);
   var similarElements = new Array();
   for (var i=0; i element.nextSiblings().length; i++) {
   if (element.tagName == element.nextSiblings()[i].tagName) {
   similarElements[i] = element.nextSiblings()[i];
   }
   else {
   break;
   }
   }
   return similarElements;
}



Here is the entire example as well:



!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 

[Proto-Scripty] Re: Ajax.Autocompleter doesnt work on firefox

2010-03-05 Thread Eric
Do you have any error/warning message in the Firefox console ?
If you're using Firebug's debuger, I've noticed that it sometimes just
stop code execution when reaching a line that will fail.
To see the error, you may go on script tab and click on Continue
execution (the VCR Play button like icon).

On Mar 4, 2:21 pm, Virginia virginianbar...@gmail.com wrote:
 I have a jsp where i include this:

 script src=js/scriptaculous/prototype.js type=text/javascript/
 script
 script src=js/scriptaculous/effects.js type=text/javascript/
 script
 script src=js/scriptaculous/controls.js type=text/javascript/
 script

 then i use it like this:

 input name=apellido  autocomplete='off' id=apellidoId size=40
 type=text value= /
 div class=autoComplete id=apellidoIdAutoComplete/div
  script type=text/javascript
              new Ajax.Autocompleter('apellidoId',
 'apellidoIdAutoComplete', autoComplete.do?tipoComplete=apellido,
 {paramName: valor, minChars: 3})
 /script

 then i have a class which loads de collectiion (colAutoComplete ... it
 loads the collection correctly) an then goes to a jsp that looks like
 this:

 ul
         logic:iterate id=elemento name=colAutoComplete
 indexId=indice
                 libean:write name=elemento //li
         /logic:iterate
 /ul

 any idea? thanks!

 On Mar 4, 9:51 am, green greenlaw...@gmail.com wrote:

  I have used that control before, never found it not work in firefox. what's
  ur code exactly?

  On Thu, Mar 4, 2010 at 3:54 AM, Virginia virginianbar...@gmail.com wrote:
   hi all,
   I'm having a problem with autocomplete on firefox,
   I'm using Ajax.Autocompleter and it works fine on IE but it doesn't
   show anything on firefox (3.6)
   Does anyone know which could be the problem? I'm using last
   scriptaculous version.

   Thanks a lot!

   --
   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.
   To unsubscribe from this group, send email to
   prototype-scriptaculous+unsubscr...@googlegroups.comprototype-scriptaculou­s%2bunsubscr...@googlegroups.com
   .
   For more options, visit this group at
  http://groups.google.com/group/prototype-scriptaculous?hl=en.-Hide quoted 
  text -

  - Show quoted text -



-- 
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.
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] FF 3.5, can't parse gzip'd response?

2010-03-05 Thread Hank
Hi guys,

I'm having some difficulties here. Am trying to query a webservice via
Ajax.Request. The server returns XML, but decides to gzip-compress it.
This is properly indicated in the response headers. Under Safari, the
response is properly understood and returned. Under Firefox 3.5 I'm
getting nothing... Firebug shows no response...

Here's the code (xmlString is contains the XML request to the
webservice):

var req = new Ajax.Request(this.url, {
asynchronous: false,
contentType: 'text/xml',
method: 'post',
postBody: xmlString,
onSuccess: function(t) {
// debug only, place responseText in textarea
$('responseText').value = t.responseText;
}
});

Here's what I see when I trace the response from the server (via
ngrep):

HTTP/1.1 200 OK.
Date: Fri, 05 Mar 2010 13:38:30 GMT.
Server: Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny6 with Suhosin-Patch.
X-Powered-By: PHP/5.2.6-1+lenny6.
Vary: Accept-Encoding.
Content-Encoding: gzip.
Content-Length: 2104.
Keep-Alive: timeout=15, max=99.
Connection: Keep-Alive.
Content-Type: text/xml.
.
]s..W`.3...HA.$.Q.^[.:@.
$ ..HQ../k..V.E..XA..s..9BI0g..F.{..M.4..
{Kf{..}.v{{1...h..{.gY.
{.Zv.le.e...M.qY}.GR0uT.|d.vr.q..MS.
9f..Z..WCj:-..=0..N...=.y..wo..bK..dF=h;.8W..
{.1WVYKd.\_t|8q..C.!.#h|tq.yry[..?|.{?.._~.
0:..{.08p.O
(... and more of this)


Any idea what the problem is? I would have thought the browser handles
all of the decompression at lower layers.

Thanks for your help!
Cheers,
Hank

-- 
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.
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.



Re: [Proto-Scripty] FF 3.5, can't parse gzip'd response?

2010-03-05 Thread Jeffrey Peck
What kind of response do you get when you try to access the web  
services directly from firefox (i.e. entering in the address bar)?


Also, do you have any control over the web service to be able to have  
it not gzip the response?


- Jeff

On Mar 5, 2010, at 8:45 AM, Hank wrote:


Hi guys,

I'm having some difficulties here. Am trying to query a webservice via
Ajax.Request. The server returns XML, but decides to gzip-compress it.
This is properly indicated in the response headers. Under Safari, the
response is properly understood and returned. Under Firefox 3.5 I'm
getting nothing... Firebug shows no response...

Here's the code (xmlString is contains the XML request to the
webservice):

var req = new Ajax.Request(this.url, {
asynchronous: false,
contentType: 'text/xml',
method: 'post',
postBody: xmlString,
onSuccess: function(t) {
// debug only, place responseText in textarea
$('responseText').value = t.responseText;
}
});

Here's what I see when I trace the response from the server (via
ngrep):

HTTP/1.1 200 OK.
Date: Fri, 05 Mar 2010 13:38:30 GMT.
Server: Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny6 with Suhosin-Patch.
X-Powered-By: PHP/5.2.6-1+lenny6.
Vary: Accept-Encoding.
Content-Encoding: gzip.
Content-Length: 2104.
Keep-Alive: timeout=15, max=99.
Connection: Keep-Alive.
Content-Type: text/xml.
.
]s..W`.3...HA.$.Q.^[.:@.
$ ..HQ../k..V.E..XA..s..9BI0g..F.{..M.4..
{Kf{..}.v{{1...h..{.gY.
{.Zv.le.e...M.qY}.GR0uT.|d.vr.q..MS.
9f..Z..WCj:-..=0..N...=.y..wo..bK..dF=h;. 
8W..

{.1WVYKd.\_t|8q..C.!.#h|tq.yry[..?|.{?.._~.
0:..{.08p.O
(... and more of this)


Any idea what the problem is? I would have thought the browser handles
all of the decompression at lower layers.

Thanks for your help!
Cheers,
Hank

--
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 
.




--
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.
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.



Re: [Proto-Scripty] FF 3.5, can't parse gzip'd response?

2010-03-05 Thread Jeffrey Peck
One more question... you are checking t.responseText ... have you  
tried t.responseXML?


- Jeff


On Mar 5, 2010, at 8:45 AM, Hank wrote:


Hi guys,

I'm having some difficulties here. Am trying to query a webservice via
Ajax.Request. The server returns XML, but decides to gzip-compress it.
This is properly indicated in the response headers. Under Safari, the
response is properly understood and returned. Under Firefox 3.5 I'm
getting nothing... Firebug shows no response...

Here's the code (xmlString is contains the XML request to the
webservice):

var req = new Ajax.Request(this.url, {
asynchronous: false,
contentType: 'text/xml',
method: 'post',
postBody: xmlString,
onSuccess: function(t) {
// debug only, place responseText in textarea
$('responseText').value = t.responseText;
}
});

Here's what I see when I trace the response from the server (via
ngrep):

HTTP/1.1 200 OK.
Date: Fri, 05 Mar 2010 13:38:30 GMT.
Server: Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny6 with Suhosin-Patch.
X-Powered-By: PHP/5.2.6-1+lenny6.
Vary: Accept-Encoding.
Content-Encoding: gzip.
Content-Length: 2104.
Keep-Alive: timeout=15, max=99.
Connection: Keep-Alive.
Content-Type: text/xml.
.
]s..W`.3...HA.$.Q.^[.:@.
$ ..HQ../k..V.E..XA..s..9BI0g..F.{..M.4..
{Kf{..}.v{{1...h..{.gY.
{.Zv.le.e...M.qY}.GR0uT.|d.vr.q..MS.
9f..Z..WCj:-..=0..N...=.y..wo..bK..dF=h;. 
8W..

{.1WVYKd.\_t|8q..C.!.#h|tq.yry[..?|.{?.._~.
0:..{.08p.O
(... and more of this)


Any idea what the problem is? I would have thought the browser handles
all of the decompression at lower layers.

Thanks for your help!
Cheers,
Hank

--
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 
.




--
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.
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: FF 3.5, can't parse gzip'd response?

2010-03-05 Thread Hank
Thanks for the quick response, Jeff!

On Mar 5, 7:44 pm, Jeffrey Peck jeff.p...@snet.net wrote:
 One more question... you are checking t.responseText ... have you  
 tried t.responseXML?

 - Jeff

Yep, doesn't work either, object is null.

I do have control over the webservice and will try to disable
compression to see if it improves. But long term, this is not what I
want -- the XML response can be rather large, and in the above
example, compression reduces it from ~12k to 2k. Also, other browsers
(ok, only tested Safari so far) seem to have it under control.

What I'm surprised about is the fact that I can't find much mentioning
of this on the interwebs. Surely most application servers are
configured to gzip their output, how come noone has a problem with
that?!

Cheers,
Hank

-- 
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.
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.