On InplaceEditor code (controls.js) there is this declaration:
onLeaveEditMode: function() {},
I''d like to redefine that method (hook) from ajax object declaration,
could you help me?
Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---
Takanori Ishikawa
2007-Jul-14 15:06 UTC
Re: InplaceEditor: onLeaveEditMode hook redefinition
I''m using Object.extend.
Object.extend(Ajax.InPlaceEditor.prototype, {
onLeaveEditMode: function() {
alert("onLeaveEditMode");
}
});
new Ajax.InPlaceEditor(''editme'', ''#'',
{rows: 15, cols:40});
or
var editor = new Ajax.InPlaceEditor(''editme'',
''#'', {rows: 15, cols:
40});
Object.extend(editor, {
onLeaveEditMode: function() {
alert("onLeaveEditMode");
}
});
Hope this help.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---
It''s perfect, thanks my friend! On Jul 14, 5:06 pm, Takanori Ishikawa <takanori.ishik...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m using Object.extend. > > Object.extend(Ajax.InPlaceEditor.prototype, { > onLeaveEditMode: function() { > alert("onLeaveEditMode"); > } > }); > new Ajax.InPlaceEditor(''editme'', ''#'', {rows: 15, cols:40}); > > or > > var editor = new Ajax.InPlaceEditor(''editme'', ''#'', {rows: 15, cols: > 40}); > Object.extend(editor, { > onLeaveEditMode: function() { > alert("onLeaveEditMode"); > } > }); > > Hope this help.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---