[Proto-Scripty] Re: Editing Multiple Fields Simultaneously with InPlaceEditor

2009-03-11 Thread david

Hi Darryl,

I'm completelly agree with the solution of Walter.
But I still try to do what you want wITH autocompleter.

I made some tests and it results in:

 this is my test1 text 
 this is my test2 text 
Edit
Save


[Proto-Scripty] Re: Editing Multiple Fields Simultaneously with InPlaceEditor

2009-03-10 Thread Walter Lee Davis

I think the easiest way to do this will be to write your own editor  
view, and substitute that for a portion of your regular page using  
Ajax.Updater. That way you'll be able to customize it to the thing  
you're editing pretty directly. It's a long slog extending the  
InPlaceEditor to give it extra custom form elements.

Let's say you had:


Headline here

buncha text
buncha text
buncha text




You could access this like so:

$$('div.item img.edit_me').each(function(elm){
elm.observe('click',function(evt){
Event.stop(evt);
var block = this.up('div.item');
var item = block.id.replace(/post_/,'');
new Ajax.Updater(block,'get_editor.php',{
parameters:{id:item},
evalScripts:true
});
});
});

get_editor.php would get the details of post #123, present an HTML  
form laid out to match, and would include the requisite Prototype code  
to submit via Ajax (read up on the request() method) and to replace  
its parent DIV with the results of a successful submission (or a  
meaningful error message).

$('form_123').observe('submit',function(evt){
Event.stop(evt);
this.request({
evalScripts:true,
onComplete: function(transport){
$('post_123').update(transport.responseText);
}
});
});

That's how I would do it, I'd certainly like to learn another way if  
anyone has a better idea.

Walter

On Mar 10, 2009, at 8:18 AM, Darryl wrote:

>
> Hi David,
>
> I would like to be able to click the edit button on one field, for
> example the title and then edit the title, description and other
> fields at the same time and then save them using a single 'Save'
> button and save all the fields.

--~--~-~--~~~---~--~~
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: Editing Multiple Fields Simultaneously with InPlaceEditor

2009-03-10 Thread Darryl

Hi David,

I would like to be able to click the edit button on one field, for
example the title and then edit the title, description and other
fields at the same time and then save them using a single 'Save'
button and save all the fields.

Many thanks,

Darryl

On Mar 10, 12:00 pm, david  wrote:
> Hi Darryl,
>
> what is the desired wanted effect, because I did not know Basecamp :((
> is it :
> - on a click on a button, open multiple element to be editable
> - On an edit of one element, update multiple other elements depending
> on the inputed value.
>
> --
> david
>
> On 9 mar, 16:57, Darryl  wrote:
>
> > Hi,
>
> > I am looking to edit multiple fields simultaneously with the inplace
> > editor, I've only seen this accomplished on Basecamp so far and I'm
> > not entirely sure how's its done. Have spent a good hour Googling for
> > a tutorial on it, but can't find anything. Anyone know of one or is
> > anyone able to point me in the right direction?
>
> > Many thanks in advance,
>
> > Darryl
--~--~-~--~~~---~--~~
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: Editing Multiple Fields Simultaneously with InPlaceEditor

2009-03-10 Thread david

Hi Darryl,

what is the desired wanted effect, because I did not know Basecamp :((
is it :
- on a click on a button, open multiple element to be editable
- On an edit of one element, update multiple other elements depending
on the inputed value.

--
david


On 9 mar, 16:57, Darryl  wrote:
> Hi,
>
> I am looking to edit multiple fields simultaneously with the inplace
> editor, I've only seen this accomplished on Basecamp so far and I'm
> not entirely sure how's its done. Have spent a good hour Googling for
> a tutorial on it, but can't find anything. Anyone know of one or is
> anyone able to point me in the right direction?
>
> Many thanks in advance,
>
> Darryl
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---