[Proto-Scripty] Re: License question

2009-07-27 Thread Tobie Langel

Hi,

You'll find the exact terms of the Prototype license here:
http://github.com/sstephenson/prototype/blob/add69978e09653808aedec43ed551df22818ee30/LICENSE

It's an MIT license.

Hope this clarifies your issue.

Best,

Tobie

On Jul 26, 8:37 pm, hussayn hussayn.dabb...@saxess.com wrote:
 Hi;

 I am investigating in using Prototype within another open source
 application (the Scarab issue tracking system). Scarab is distributed
 under the apache-2 license. I do not see any contradictions with the
 Prototype license, but in order to be sure that i am acting correctly,
 i would like to get an explicit grant to use and redistribute
 Prototype with Scarab. Only then we can use Prototype to enhance our
 frontend.

 But i can't figure out, whom i should ask for such a grant. So maybe
 you are listening here and can help ?

 thanks,
 Regards,
 Hussayn
--~--~-~--~~~---~--~~
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: what causes this? prototype/javascript/php ?!

2009-07-27 Thread Richard Quadling

2009/7/26 Alex McAuley webmas...@thecarmarketplace.com:

 php's json_encode/decode functions... you may need to install them.

 Good luck


 Alex Mcauley
 http://www.thevacancymarket.com


 - Original Message -
 From: geoffcox75 g...@freeuk.com
 To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
 Sent: Sunday, July 26, 2009 6:23 PM
 Subject: [Proto-Scripty] Re: what causes this? prototype/javascript/php ?!





 On Jul 26, 5:26 pm, Alex McAuley webmas...@thecarmarketplace.com
 wrote:
 because its being sent as an array.. php cannot directly read javascript
 arrays and as such you have to json encode/decode it

 Thanks Alex - I have not so far used json - can you suggest a good
 site for help on this? Simple, sample code would be very helpful to
 help me get started.

 Cheers,

 Geoff


 Alex Mcauleyhttp://www.thevacancymarket.com

 - Original Message -
 From: geoffcox g...@freeuk.com
 To: Prototype  script.aculo.us
 prototype-scriptaculous@googlegroups.com
 Sent: Sunday, July 26, 2009 5:22 PM
 Subject: [Proto-Scripty] what causes this? prototype/javascript/php ?!

  Hello,

  I am not clear where the problem is with this situation.

  The html/javascript used Ajax.Updater to send data to a php file which
  inserts the data into mysql.

  Oddly, to me ay any rate, print_r($_POST) and echo give different
  results with chrome/safari and firefox.

  With firefox I get the extra empty element and would like to know why.

  Cheers,

  Geoff

  1. with chrome/safari I get

  (a) print_r($_POST) gives

  Array ( [firstnum] = 1 [lastnum] = 3 [groupname] = test [usercode]
  = A1 [mysql_p11] = 10 [mysql_p12] = 20 [mysql_p13] = 30 [_] = )

  (b) echo gives

  'test',
  'test','A1',
  'test','A1','10',
  'test','A1','10','20',
  'test','A1','10','20','30',
  'test','A1','10','20','30','',

  2. with Firefox/IE the [_] = and the '', are not present.

  3. The Javascript code

  script type=text/javascript

  var startValue = 1;
  var endValue = 3;
  var p1 = [];
  var group = test;
  var code_given = A1;

  var params = {};

  params[firstnum] = startValue;
  params[lastnum] = endValue;
  params[groupname] = group;
  params[usercode] = code_given;

  p1[1] = 10;
  p1[2] = 20;
  p1[3] = 30;

  for (i=startValue;i(endValue+1);i++) {
  params[mysql_p1 + i] = p1[i];
  }

  new Ajax.Updater(
  'updateDiv',
  'fv-p1-arrays4-mysql-test.php',
  {
  asynchronous:true,
  method:'post',
  parameters: params
  }
  );

  /script



 


JSON Is now built into PHP as standard as of V5.3.0. Prior to that you
would have to either include the pre-built library (Windows) or
rebuild PHP (non-windows).

The '_' comes from Prototype and is a requirement for some reason. Not
exactly sure why, but you can ignore it in PHP.

What are you echo-ing to get the list you see?

If you want mysql_p1 as an array in PHP, try changing ...

params[mysql_p1 + i] = p1[i];

to

params['mysql_p1[' + i + ']'] = p1[i];

Regards,

Richard.
-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731
Standing on the shoulders of some very clever giants!
ZOPA : http://uk.zopa.com/member/RQuadling

--~--~-~--~~~---~--~~
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: Calling more than one effect fails (script.aculo.us)

2009-07-27 Thread Diodeus

Don't use the onload event in the body tag. Your script starts running
before the DOM is ready.

Use this instead in a script block:

document.observe(dom:loaded, function() {
  start()
});

See: http://www.prototypejs.org/api/document/observe


On Jul 25, 8:16 am, bill stefan@googlemail.com wrote:
 Hi,

 I'm new in using javascript and script.aculo.us so please patient with
 me =)

 I guess the best thing to do is to start with some code:

 script type=text/javascript language=javascript
                 function start()
                 {
                         Effect.Pulsate('warning', { pulses: 5, duration: 4 , 
 from: 0.4});
                         Effect.Fade('info', { duration: 6});
                 }
 /script

 body onload=start();

 div id='info'
         Some info text
 /div

 div id='warning'
         Some warning text
 /div

 I guess it's pretty obvious what I'm trying to do: after the page is
 loaded, I want to start trigger two effects for the boxes info and
 warning. But non of the effect actually happen. If I just try to
 start one effect (I deleting one of function calls in start()) the
 remaining one is executed as expected.

 So why aren't both working at the same time?

 Thank you for any advice,
 bill
--~--~-~--~~~---~--~~
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: Calling more than one effect fails (script.aculo.us) - Correction

2009-07-27 Thread mr_justin

Do not call the Effect method with a non-existent element ID.

if ($('foo')) new Effect.Highlight('foo'); // or: $('foo').highlight();
--~--~-~--~~~---~--~~
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: IE autocompleter out of place. Firefox works ok.

2009-07-27 Thread G. Sharon Yang

There are quite a few  threads regarding this issue, just search
autocomplete in this group. For example:
http://groups.google.com/group/prototype-scriptaculous/browse_thread/thread/8aac295a1affa481


-S.

On Fri, Jul 24, 2009 at 2:02 PM, ror-dev244mma...@gmail.com wrote:

 Hi, I'm using prototype 1.6 and scriptaculous 1.8.2 on top of my Ruby
 on Rails app.
 I'm using Autocompleter.local and it works great for Firefox 3.0.12
 but when I use IE8 to
 see it, the suggestion box is out of place. See screenshot links below

 IE8 (broken)
 http://tinypic.com/r/11t51tz/3
 ff3 (works)
 http://tinypic.com/r/2epn3wm/3

 Have you seen this before? The CSS are as follows:
 div.auto_complete {
  margin:0px;
  padding:0px;
  width:350px !important ;
  background:#fff;
  border:1px solid #888;
  position:absolute;
 }

 div.auto_complete ul {
  margin:0px;
  padding:0px;
  list-style-type:none;
 }

 div.auto_complete ul li.selected {
  background-color:#ffb;
 }

 div.auto_complete ul li {
  margin:0;
  padding:2px;
  height:32px;
  display:block;
  list-style-type:none;
  cursor:pointer;
 }

 


--~--~-~--~~~---~--~~
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] Drop Zone for Sortables?

2009-07-27 Thread mr_justin

I was just looking at the wiki page for creating sortables here:
http://wiki.github.com/madrobby/scriptaculous/sortable-create

And saw that somebody has patched Scripty to insert drop zone
placeholders while dragging:
http://tanrikut.blogspot.com/search/label/Scriptaculous

However the last update to this was over a year ago and we've got a
new scripty since then. Any thoughts on creating dropzone markers with
a sortable?
--~--~-~--~~~---~--~~
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] javascript slider value to php form post

2009-07-27 Thread autocat

js noob here... how do I pass a slider's changed value into a
querystring or form? I want to reload the page and use the slider's
changed value to set image widths. This is the slider script I'm
using:

script type=text/javascript
   window.onload = function() {
   new Control.Slider('handle1' , 'track1',
  {
   range: $R(1,410),
   sliderValue: 100,
   onChange: function(v){
   $('changed').innerHTML = 'Changed Value : '+v;
   },
   onSlide: function(v) {
   $('sliding').innerHTML = 'Sliding Value: '+v;
  }
   } );
  new Control.Slider('handle2' , 'track2',
  {
   range: $R(75,410),
   axis:'vertical',
   sliderValue: 410,
   onChange: function(v){
 $('changed').innerHTML = 'Changed Value : '+v;
   },
   onSlide: function(v) {
 $('sliding').innerHTML = 'Sliding Value: '+v;
  }
   } );

}
/script

Thanks in advance.

--~--~-~--~~~---~--~~
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: RJS-Template and link_to_remote

2009-07-27 Thread T.J. Crowder

Hi,

This group is for discussing Prototype and script.aculo.us, most of us
have never used Ruby or Rails.  You're probably better off posting to
the Rails group[1].

[1] http://groups.google.com/group/rubyonrails-talk

Good luck with it,
--
T.J. Crowder
tj / crowder software / com
Independent Software Engineer, consulting services available


On Jul 27, 6:49 pm, Drr cran...@web.de wrote:
 Hi, I am quite new to rails and can't use any rjs-templates.
 The problem is, that he can't use/find the methods in that template
 e.g. 'page' or 'replace_html'. I get an error message on these
 methods.

 Here's what I got so far in my example:

 Controller:
 
 class AjaxTestController  ApplicationController
   layout 'application', :except = :say_hello

   def index
   end

   def say_hello
     @message = Hello World
     respond_to do |format|
       format.js
     end
   end

 end
 

 Layout
 
 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN
 http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd;

 html xmlns=http://www.w3.org/1999/xhtml; xml:lang='en'
 head
 titleAjax/title
   %= javascript_include_tag :defaults %
 /head
 body
   %= yield %
 /body
 /html
 

 index.html.erb
 
 h1Helloworld#index/h1

 %= link_to_remote Click,
      :url = {:action = say_hello} %

 p id='message'.../p
 

 say_hello.rjs
 ---
 page.replace_html 'message', @message
 page.visual_effect(:highlight, 'message', :duration = 0.5)
 ---

 its quite simple but does not work anyway. I don't guess why it
 behaves like this. If I use the controller for that ajax request,
 everything is ok...it's just that template thing i can't fix. Anyone
 got an idea where the problem might be?
--~--~-~--~~~---~--~~
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: javascript slider value to php form post

2009-07-27 Thread Alex McAuley

save it in a window variable or somehting then get it



onChange: function(v){
   $('changed').innerHTML = 'Changed Value : '+v;
window.sliderValue=v;
},
   onSlide: function(v) {
   $('sliding').innerHTML = 'Sliding Value: '+v;
window.sliderValue=v;

}


then you can add it to params easily

params: {
sliderValue: window.sliderValue;
}
Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: autocat jim.m...@gmail.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Monday, July 27, 2009 7:43 PM
Subject: [Proto-Scripty] javascript slider value to php form post



 js noob here... how do I pass a slider's changed value into a
 querystring or form? I want to reload the page and use the slider's
 changed value to set image widths. This is the slider script I'm
 using:

 script type=text/javascript
   window.onload = function() {
   new Control.Slider('handle1' , 'track1',
  {
   range: $R(1,410),
   sliderValue: 100,
   onChange: function(v){
   $('changed').innerHTML = 'Changed Value : '+v;
   },
   onSlide: function(v) {
   $('sliding').innerHTML = 'Sliding Value: '+v;
  }
   } );
  new Control.Slider('handle2' , 'track2',
  {
   range: $R(75,410),
   axis:'vertical',
   sliderValue: 410,
   onChange: function(v){
 $('changed').innerHTML = 'Changed Value : '+v;
   },
   onSlide: function(v) {
 $('sliding').innerHTML = 'Sliding Value: '+v;
  }
   } );

 }
 /script

 Thanks in advance.

 
 


--~--~-~--~~~---~--~~
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: Use Sortable for reordering two-column design

2009-07-27 Thread mr_justin

Looks like Sortable supports this behavior out of the box. Maybe if
the documentation was up to date this would have been obvious. Zing!
Maybe I should update the documentation then, eh? :)

The key to making this work in a container with multiple columns is
creating the sortable on the container element, clearing out the
constraint option and then most importantly, supplying a containment
collection (child elements of your container that represent the
columns).

Here is the Sortable#create call that works for me:

Sortable.create('column-container-element', {constraint:'',
containment:['main', 'sidebar'], ghosting:true});
--~--~-~--~~~---~--~~
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: Drop Zone for Sortables?

2009-07-27 Thread mr_justin

Update: got it figured out, at least for the most part. I found that
patched code to be overkill for the current version of scriptaculous
(1.8.2) which is maybe why it hasn't been updated since 1.8.1.

I still had to patch the Sortable#mark method (function wrapping to
the rescue) but other than that, was able to leverage existing
sortable callbacks. If the onChange callback just passed over the
dropon and position variables then this would all work out of the box.

My fix is a total hack, but it works. I store the dropon and position
variables as properties on the sortable object so that I can access
them in my custom onChange callback:

//
**
Sortable.mark = Sortable.mark.wrap(function(){
  var args = $A(arguments), proceed = args.shift();
  proceed.apply(this, args);

  var sortable = Sortable.options(args[0]);
  sortable.markedElement = args[0];
  sortable.markedPosition = args[1];
});
//
**

Then in the onChange callback for your sortable you can do something
like:

//
**
function sortableOnChangeCallback(element){
  var sortable = Sortable.options(element); // fetch the sortable
object
  $('content').select('.placeholder-block').invoke('remove'); //
remove any existing placeholders
  var placeholder = new Element('div', {'class':'placeholder-
block'}).update('h3I am a placeholder/h3'); // create the
placeholder

  if (sortable.markedPosition == 'before'){
// insert the placeholder before the marked element if applicable
element.parentNode.insertBefore(placeholder,
sortable.markedElement);
  } else {
// otherwise insert the placeholder after the marked element or at
the end of the list if the marked element is the last element in the
list
if (sortable.markedElement.nextSibling)
element.parentNode.insertBefore(placeholder,
sortable.markedElement.nextSibling);
else element.parentNode.appendChild(placeholder);
  }
}
//
**

Then you just need to make sure that you remove the placeholder in
your onUpdate callback (invoked when the list is reordered)

//
**
function sortableOnUpdate(sortableElement){
  sortableElement.select('.placeholder-block').invoke('remove');
}
//
**

Hope this helps somebody who is messing around with sortables. 
--~--~-~--~~~---~--~~
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] Autocompleter inconsistently assigning class 'selected'

2009-07-27 Thread ror-dev244

Hi,

I'm using the latest script.aculo.us (1.8.2) and prototype version
with Ruby on Rails app. I am implementing autocomplete on two pages
(browse and queue), on queue page, my autocomplete text form works
fine. However in browse it doesn't although I call it the same way. In
browse, no highlight is present, so I can't use the keyboard to select
multiple options. This is the inner HTML of browse. Notice that class
'' is attributed to ul tag
--browse.html---
div
ul class=
listrongmot/strongher...@worthless.id/li
lito@strongmot/strongher.biz/li
liin@strongmot/strongherwas.cz/li
lisaid@strongmot/strongherspurpose.cn/li
/ul
/div

queue.html--
ul
li class=selectedstrongmot/strongher...@worthless.id/li
li class=to@strongmot/strongher.biz/li
li class=in@strongmot/strongherwas.cz/li
li class=said@strongmot/strongherspurpose.cn/li
/ul

both div looks like

new Autocompleter.Local('mailbox_name', 'mailbox_auto_complete_list',
mailboxes_email, { fullSearch: true, frequency:0, minChars: 1,
ignoreCase: true });

Do you know why autocompleter didn't assign class=selected to li
tag in browse.html? Instead it assigns blank class to ul tag.


--~--~-~--~~~---~--~~
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] problem with ajax IE8 encoding

2009-07-27 Thread Miguel Beltran R.
Hi list

I load data using AJAX calls, work fine on FF, but on IE8 show bad
characters.

The header docuement:
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
http://www.w3.org/TR/html4/loose.dtd;
html
head
meta http-equiv=Content-Type content=text/html; charset=utf-8
 meta http-equiv=X-UA-Compatible content=IE=8 /


[Headers from server using Firebug]
Encabezados de la Respuesta
Server  Zope/(Zope 2.11.1-final, python 2.4.4, win32) ZServer/1.1
Date Tue, 28 Jul 2009 01:08:28 GMT
Content-Length  2254
Content-Type  text/html; charset=utf-8


[Response from server using Firebug]
div id=objetivo_busqueda_resultado class=tabla_resultado
form class=tabla_encabezadoul
   li class=titulolabelRenlon/label/li
   li class=titulo noimprimirlabelAcción/label/li
   li class=titulolabelProyecto/label/li
   li class=titulolabelObjetivo/label/li
   li class=titulolabelNombre/label/li
/ul/form
/div

IE8 show _Acción_ instance _Acción_


[Ajax call]
document.observe('sic:proyecto',function(evt){
   var s = evt.memo.campo_llenar || '';
   var a = new Ajax.Updater('estado', 'carga_datos.htm', {
  evalScripts: true,
  parameters: {control: 'datos_proyecto',
   ejercicio_id:$F('ejercicio_id')
  ,campo_llenar:  s
  ,proyecto: $F('proyecto'+s)}
   });
   a=null;
});

why IE8 show the incorrect response with encoding utf8?

--

Lo bueno de vivir un dia mas
es saber que nos queda un dia menos de vida

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