| From | Sent On | Attachments |
|---|---|---|
| Matthew Shirey | Oct 31, 2008 1:58 pm | |
| Matthew Shirey | Nov 3, 2008 1:58 pm | |
| Peter E Higgins | Nov 3, 2008 4:03 pm | |
| Mattew Shirey | Nov 3, 2008 4:32 pm | |
| Peter E Higgins | Nov 3, 2008 5:50 pm | |
| Giovanni Porcari | Nov 3, 2008 10:44 pm |
| Subject: | Re: [Dojo-interest] TooltipDialog with something other than DropDownButton? | |
|---|---|---|
| From: | Peter E Higgins (dan...@dojotoolkit.org) | |
| Date: | Nov 3, 2008 5:50:15 pm | |
| List: | org.dojotoolkit.dojo-interest | |
No, that was my point. TooltipDialog _doesn't_ have a .show() method and Dialog does, which doesn't make _much_ sense to me.
I did up a quick hack/test (all public APIs?), and this seems to work for me (tested: dojo 1.2, ff3, safari3):
<html> <head>
<link rel='stylesheet' href='../../dijit/themes/tundra/tundra.css' /> <script src="../../dojo/dojo.js"></script> <script> dojo.require("dijit.Dialog"); // for TooltipDialog - makes sense right? dojo.addOnLoad(function(){
// create a TooltipDialog from some node in the dom (id="dialogData") var tt = new dijit.TooltipDialog({}, "dialogData");
// open the tooltip when some node is clicked: var n = dojo.byId("thatNode"); dojo.query(n).onclick(function(e){ dijit.popup.open({ around: n, popup: tt }); });
// setup some close logic for this tooltipdialog: dojo.query("#closer").onclick(function(e){ dijit.popup.close(tt); });
}); </script>
</head> <body class="tundra">
<a href="#" id="thatNode">Show it</a>
<style type="text/css"> /* hide the tooltip initially */ #hidden { position: absolute; top:-999px; left:-999px; } </style> <div id="hidden"> <div id="dialogData" style="width:200px; height:100px;"> Hi. <a href="#" id="closer">I'm done</a> </div> </div>
</body> </html>
the dijit.popup.open/close calls are the core of what DropDownButton is addressing with it's a11y code.
Hope this helps.
Regards, Peter Higgins
Mattew Shirey wrote:
I tried "Show", but it doesn't seem to be a method of the TooltipDialog widget. I also checked the API and couldn't see anything. Is there another way to programmatically make it show/hide?
-- Matthew
On Nov 3, 2008, at 4:03 PM, Peter E Higgins wrote:
I honestly don't think it's possible.
http://dojotoolkit.org/book/dijit-functional-spec/other-widgets/tooltipdialog#comment-3482
Ultimately, I think it comes down to a11y. I [apparently in 2007 ...] agree it should work from any link or node, though limiting it to a focus-able node might be an understandable limitation for a11y.
As for removing the styles of a DropDownButton:
You might be able to set baseClass="custom" and eliminate _most_ of the themeing done, then create matching classes overriding anything that bleeds through. I've not tried this myself though, so am hesitant to attest to your chances of success :)
Ideally, you could just show() a TooltipDialog attached to some node.
Regards, Peter Higgins
Matthew Shirey wrote:
Anyone have anything on this? =(
-- Matthew
On Fri, Oct 31, 2008 at 12:58 PM, Matthew Shirey <mshi...@gmail.com> wrote:
Is there a way to use a TooltipDialog with something other than a DropDownButton? In my current interface it would be quite nice if I could link a TooltipDialog to a series of LI tags. Since all examples I've seen use a DropDownButton, I'm starting to think that's the only way to use it.
So if that's the case, is there a simple way to remove ALL style from a DropDownButton so it effectively looks just like normal text?
Thank you,
-- Matthew
_______________________________________________ FAQ: http://dojotoolkit.org/support/faq Book: http://dojotoolkit.org/docs/book Forums: http://dojotoolkit.org/forum Dojo...@dojotoolkit.org http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest
_______________________________________________ FAQ: http://dojotoolkit.org/support/faq Book: http://dojotoolkit.org/docs/book Forums: http://dojotoolkit.org/forum Dojo...@dojotoolkit.org http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest
_______________________________________________ FAQ: http://dojotoolkit.org/support/faq Book: http://dojotoolkit.org/docs/book Forums: http://dojotoolkit.org/forum Dojo...@dojotoolkit.org http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest
_______________________________________________ FAQ: http://dojotoolkit.org/support/faq Book: http://dojotoolkit.org/docs/book Forums: http://dojotoolkit.org/forum Dojo...@dojotoolkit.org http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest





