PDA

View Full Version : tooltip upgrade



Mthor
23 Apr 2008, 8:54 AM
ok i have one last thing to put in before my upgrade to 2.0 is complete. and as i am doing this i see 2.1 is out. lol but let me get this done first. can someone tell me or explain to me what I need to change in the code below to work in 2.0


<script type="text/javascript">
// Instantiate and render the menu bar and corresponding submenus
if (window.location.href.toLowerCase().indexOf("https") == 0) {
YAHOO.widget.Module.IMG_ROOT_SSL = "js/YUI/assets/container";
}
YAHOO.widget.Tooltip.CSS_TOOLTIP = "popuptext";
new YAHOO.widget.Tooltip("tt1", { context:"operator", text:"text goes here",autodismissdelay:10000 });
new YAHOO.widget.Tooltip("tt1", { context:"email", text:"text goes here.",autodismissdelay:10000 });
new YAHOO.widget.Tooltip("tt1", { context:"email2", text:"text goes here",autodismissdelay:10000 });
new YAHOO.widget.Tooltip("tt1", { context:"phone", text:"text goes here",autodismissdelay:10000 });
new YAHOO.widget.Tooltip("tt1", { context:"inoffice", text:"text goes here",autodismissdelay:10000 });
</script>

thanks and I should be good to go after this.

these forms are a blessing thanks for the help everyone!!

Animal
23 Apr 2008, 9:34 AM
Well, I just glanced at the API docs for ToolTip and it was very easy to figure out that it's:



<script type="text/javascript">
// Instantiate and render the menu bar and corresponding submenus
if (window.location.href.toLowerCase().indexOf("https") == 0) {
YAHOO.widget.Module.IMG_ROOT_SSL = "js/YUI/assets/container";
}
Ext.ToolTip.CSS_TOOLTIP = "popuptext"; // <-- What's this?
new Ext.ToolTip({ target:"operator", html:"text goes here", dismissDelay:10000 });
new Ext.ToolTip({ target:"email", html:"text goes here.", dismissDelay:10000 });
new Ext.ToolTip({ target:"email2", html:"text goes here", dismissDelay:10000 });
new Ext.ToolTip({ target:"phone", html:"text goes here", dismissDelay:10000 });
new Ext.ToolTip({ target:"inoffice", html:"text goes here", dismissDelay:10000 });
</script>


http://extjs.com/deploy/dev/docs/?class=Ext.ToolTip

Mthor
23 Apr 2008, 9:41 AM
your the man.. thanks I for some reason have problems in the Api. after this upgrade to 2.0 I am really going to get to know 2.0 better. and try and work with many examples in the API. thanks again for the help. I am one of those people that learn by looking at examples then I usually won't forget what i see.

but thanks Animal your a life saver , I am sure you hear that all the time but one more wont hurt

thanks for all the hard work guys!!

Mthor
23 Apr 2008, 9:43 AM
in response to your Ext.ToolTip.CSS_TOOLTIP = "popuptext"; // <-- What's this?

this is for when you rollover the ? i have o n my page that controlls the style of the box and text that pops up

Animal
23 Apr 2008, 9:44 AM
You should take some time to browse the docs at leisure. It sounds geeky, but it is interesting and you can learn a lot. They have been added to a LOT for the 2.1 release.

Also, if there are too many configs and it's confusing, click that "No Entry" button second from left at the top. It hides inherited members, so you just get to see what applies to that class.

Do that on the Ext.ToolTip page, and it becomes a lot easier to see how to configure it.

Animal
23 Apr 2008, 9:46 AM
In Ext, Ext.ToolTips are Ext.Panels, so you'd style them in the same way that you'd style a Panel: Using the cls config to apply an overall class name to the Panel's element, or perhaps with bodyStyle to apply CSS styles directly to the Panel's body element.

Mthor
23 Apr 2008, 9:50 AM
ok thanks. your advice is helping me greatly. much appreciated.