Hello, I''d like to disable the highlight effect on text that''s embedded in the inPlaceEditor. I''ve seen other posts on this idea where they''ve suggested modifiying the control.js code. To that end I''ve found this bit in control.js.. ************ onLeaveHover: function(ipe) { ipe._effect = new Effect.Highlight(ipe.element, { startcolor: ipe.options.highlightColor, endcolor: ipe.options.highlightEndColor, restorecolor: ipe._originalBackground, keepBackgroundImage: true }); ************ which seems like I could comment that out. Is that still the generally accepted way to accomplish this? Or is there a setting, like [highlight = false] - or maybe I could just add one? also, the real reason I want this is because on FF2 - if I click text to open the editor - then I click cancel - the text remains highlighted, there is no fade. So figuring out why it doesn''t fade is the real problem - but my needs are met by doing without the highlight. Thank You --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
What about using transparent? http://webdesign.about.com/od/styleproperties/p/blspbgcolor.htm On Jan 15, 2008 2:49 PM, Andy Koch <andy.koch-sBIqA0PYact54TAoqtyWWQ@public.gmane.org> wrote:> > Hello, > > I''d like to disable the highlight effect on text that''s embedded in > the inPlaceEditor. I''ve seen other posts on this idea where they''ve > suggested modifiying the control.js code. To that end I''ve found this > bit in control.js.. > ************ > onLeaveHover: function(ipe) { > ipe._effect = new Effect.Highlight(ipe.element, { > startcolor: ipe.options.highlightColor, endcolor: > ipe.options.highlightEndColor, > restorecolor: ipe._originalBackground, keepBackgroundImage: > true > }); > ************ > > which seems like I could comment that out. > > Is that still the generally accepted way to accomplish this? > > Or is there a setting, like [highlight = false] - or maybe I could > just add one? > > also, the real reason I want this is because on FF2 - if I click text > to open the editor - then I click cancel - the text remains > highlighted, there is no fade. So figuring out why it doesn''t fade is > the real problem - but my needs are met by doing without the > highlight. > > Thank You > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
yes, that worked, thank you plus it''s noninvasive to the library code, here''s what I did for reference... Ajax.InPlaceEditor.DefaultOptions.highlightEndColor = ''transparent''; Ajax.InPlaceEditor.DefaultOptions.highlightColor = ''transparent''; Ajax.InPlaceCollectionEditor.DefaultOptions.highlightEndColor ''transparent''; Ajax.InPlaceCollectionEditor.DefaultOptions.highlightColor ''transparent''; The only time I see any hint of highlight now is when it''s external control working on a textarea - but I can live with it. On Jan 15, 11:57 am, "Brian Williams" <brianw1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> What about using transparent? > > http://webdesign.about.com/od/styleproperties/p/blspbgcolor.htm > > On Jan 15, 2008 2:49 PM, Andy Koch <andy.k...-sBIqA0PYact54TAoqtyWWQ@public.gmane.org> wrote: > > > > > Hello, > > > I''d like to disable the highlight effect on text that''s embedded in > > the inPlaceEditor. I''ve seen other posts on this idea where they''ve > > suggested modifiying the control.js code. To that end I''ve found this > > bit in control.js.. > > ************ > > onLeaveHover: function(ipe) { > > ipe._effect = new Effect.Highlight(ipe.element, { > > startcolor: ipe.options.highlightColor, endcolor: > > ipe.options.highlightEndColor, > > restorecolor: ipe._originalBackground, keepBackgroundImage: > > true > > }); > > ************ > > > which seems like I could comment that out. > > > Is that still the generally accepted way to accomplish this? > > > Or is there a setting, like [highlight = false] - or maybe I could > > just add one? > > > also, the real reason I want this is because on FF2 - if I click text > > to open the editor - then I click cancel - the text remains > > highlighted, there is no fade. So figuring out why it doesn''t fade is > > the real problem - but my needs are met by doing without the > > highlight. > > > Thank You--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Jan 15, 2008 1:49 PM, Andy Koch <andy.koch-sBIqA0PYact54TAoqtyWWQ@public.gmane.org> wrote:> > I''d like to disable the highlight effect on text that''s embedded in > the inPlaceEditor.Without changing the existing behavior, there really isn''t a way to just flat-out disable the hover effect, however there are a few options you can tweak to make the hover effect invisible. Take a look at highlightColor and highlightEndColor (defaults to #ff9 and #fff, respectively). Also you can pass in a hoverClassName, which will be applied to the span (or whatever your element is) when you are hovering over the control. You might be able to use some additional CSS to target that case and override any other effects.> I''ve seen other posts on this idea where they''ve > suggested modifiying the control.js code.As an alternative to modifying the scriptaculous source code, you may want to look into subclassing the InPlaceEditor or using function wrapping to apply your changes to the library without corrupting the code. That way when you update your library, you won''t lose any changes you have made. -justin --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Andy Koch a écrit :> Hello, > > I''d like to disable the highlight effect on text that''s embedded inJust pass onEnterHover: false, onLeaveHover: false among the options… Those callbacks provide the default hover behavior, which is the highlight thing. You also have a highlight at IPE completion time, which you can disable with onComplete: false. -- Christophe Porteneuve aka TDD tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Jan 15, 2008 2:55 PM, Christophe Porteneuve <tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> wrote:> Just pass onEnterHover: false, onLeaveHover: false among the options… > Those callbacks provide the default hover behavior, which is the > highlight thing.D''oh! Of course you can override all those DefaultCallbacks in controls.js with options, sorry about the bad advice earlier in the thread. -justin --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
itsme213-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org
2008-Jan-17 00:54 UTC
Re: disable highlight for inPlaceEditor
Is there a way to just make the fade out fast? I find the highlight useful, but it becomes distracting due to the quite slow fade-out. 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 -~----------~----~----~----~------~----~------~--~---
Just override the relevant callbacks in the options you pass the constructor with custom versions that use a shorter effect duration. -- Christophe Porteneuve aka TDD tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---