[Proto-Scripty] Re: how can i turn on the inplaceeditor from javascript?

2009-01-07 Thread Niko Schwarz
i was realizing that i am redrawing large parts of the app anyway, so i came
up with something like

|editor|

editor:= self inPlaceEditorOn:html.

self isEditModeOnAndRest ifTrue: [ editor call: 'enterEditMode' ].

^ editor.

i am redrawing a little much currently, 33 ms respond time on localhost. i
had envisioned 7 ms. looks like i have to tune this.


2009/1/6 Walter Lee Davis wa...@wdstudio.com


 Have a look at the options here:

 http://github.com/madrobby/scriptaculous/wikis/ajax-inplaceeditor

 Basically, you can access the element a number of different ways. If
 you want to go at it from the direction I think you do, then you would
 make your options like this:

 var opts = {externalControlOnly: true};
 var editNode = new Ajax.InPlaceEditor('node','url_on_server.php',opts);

 And then somewhere else, you would do something like this:
 editNode.enterEditMode();

 The scripty way to do this would be to do the wiring to the external
 trigger from within the control itself:

 var opts = {externalControlOnly: true, externalControl: 'foo'};
 new Ajax.InPlaceEditor('node','url_on_server.php',opts);

 And now when you click on a#foo, the editor will open.

 Walter

 On Jan 6, 2009, at 5:45 AM, Niko Schwarz wrote:

  So, I am adding a inplaceeditor to a node. how do i find the editor,
  so i can turn the in place editing mode on? the method is called
  enterEditMode(), I think, but what to call it on?
 
 
  cheers,
 
 
  niko
 
 
  


 


--~--~-~--~~~---~--~~
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: how can i turn on the inplaceeditor from javascript?

2009-01-06 Thread Walter Lee Davis

Have a look at the options here:

http://github.com/madrobby/scriptaculous/wikis/ajax-inplaceeditor

Basically, you can access the element a number of different ways. If  
you want to go at it from the direction I think you do, then you would  
make your options like this:

var opts = {externalControlOnly: true};
var editNode = new Ajax.InPlaceEditor('node','url_on_server.php',opts);

And then somewhere else, you would do something like this:
editNode.enterEditMode();

The scripty way to do this would be to do the wiring to the external  
trigger from within the control itself:

var opts = {externalControlOnly: true, externalControl: 'foo'};
new Ajax.InPlaceEditor('node','url_on_server.php',opts);

And now when you click on a#foo, the editor will open.

Walter

On Jan 6, 2009, at 5:45 AM, Niko Schwarz wrote:

 So, I am adding a inplaceeditor to a node. how do i find the editor,  
 so i can turn the in place editing mode on? the method is called  
 enterEditMode(), I think, but what to call it on?


 cheers,


 niko


 


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