Ok, Good work! I have not yet had any success in creating a custom info tip with re- using the existing Net info tip.
If this is going into the project I can do a checkout and try it out. Also, if needed I can add a feature request to the project issue list Thomas On Feb 28, 4:23 pm, "Honza (Jan Odvarko)" <[email protected]> wrote: > Just wanted to note that I have made a good progress on this over the > weekend > and I have running example on my machine. > > Honza > > On Feb 27, 1:49 pm, "Honza (Jan Odvarko)" <[email protected]> wrote: > > > On Feb 27, 12:53 am, tan <[email protected]> wrote:> I have a module that > > adds a new tab to the request entry (based on the > > > tutorial on your blog) > > > > In my tab body I need to display an info tip (with custom info) when > > > the user mouse hover particular elements in my tab body. > > > Since the module is not a full Fb panel, but a module that adds a Net > > > request tab I do not get an InfoTip element and not the showInfoTip > > > function. > > > Yep, exactly. > > > > I see the logic for the info tip in the Fb Net.js code, but I can not > > > see there are any way for me to populate the Net info tip with custom > > > info. > > > You should be able to call populateTimeInfoTip or populateSizeInfoTip > > and pass data in the second parameter (file). The tip template > > (domplate) is reading data from this object. > > > > I have looked at the InfoTip.js code, but I can not see that I can > > > create a new InfoTip on my own (or am I wrong here) > > > > In short, what I need is a custom Info tip for my Net request tab. > > > > Off-course this can be done creating my own info tip, but I was just > > > looking at my options first ;) > > > I don't think you can easily show the tip (reused from the panel or > > your own) within the custom tab. > > As you correctly mentioned, you don't have a new panel and so, you > > don't have showInfoTip method. > > Firebug.InfoTip is distribution the "showInfoTip" event only to the > > currently selected panel. > > > I think we should distribute the "showInfoTip" also to registered > > listeners through "dispatch", which is a mechanism already used on > > many places in Firebug so, shortly, here is the showInfoTip in InfoTip > > object: > > > Firebug.InfoTip = extend(Firebug.Module, > > { > > showInfoTip: function(infoTip, panel, target, x, y, rangeParent, > > rangeOffset) > > { > > if (!Firebug.showInfoTips) > > return; > > > if (panel.showInfoTip(infoTip, target, scrollX, y, > > rangeParent, rangeOffset)) > > { > > // panel.showInfoTip returns true, which means the panel > > is displaying a tip for the given target. > > } > > else > > { > > // info tip is not displayed, give a chance to the other > > listeners. > > var result = dispatch2(this.fbListeners, "showInfoTip", > > [infoTip, target, scrollX, y, rangeParent, rangeOffset]); > > } > > } > > > }); > > > In your case you would register the custom net tab as a listener > > > Firebug.InfoTip.addListener(...) > > > and handle the event. > > > If you thing this is the correct way for you, please report a new bug > > and I'll prepare a patch! > > > As soon as this concept is properly designed we can solve the problem > > how to reuse tips in the net panel (I guess it'll be simple, if not > > working already) > > > Honza -- You received this message because you are subscribed to the Google Groups "Firebug" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/firebug?hl=en.
