-
Notifications
You must be signed in to change notification settings - Fork 36
/
TooltipDialog.js
61 lines (54 loc) · 1.57 KB
/
TooltipDialog.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/** @module deliteful/TooltipDialog */
define([
"delite/register",
"delite/Dialog",
"./Tooltip",
"delite/handlebars!./TooltipDialog/TooltipDialog.html",
"requirejs-dplugins/i18n!./Dialog/nls/Dialog",
"requirejs-dplugins/css!./TooltipDialog/TooltipDialog.css",
"delite/a11yclick", // TooltipDialog.html uses d-keyboard-click
"delite/uacss" // TooltipDialog.less uses d-ie class
], function (
register,
Dialog,
Tooltip,
template,
messages
) {
/**
* A tooltip dialog widget, to be used as a popup.
* Meant to contain forms or interactive controls (ex: links, buttons).
*
* @class module:deliteful/TooltipDialog
* @augments module:delite/Dialog
* @augments module:deliteful/Tooltip
*/
return register("d-tooltip-dialog", [Tooltip, Dialog], /** @lends module:deliteful/TooltipDialog# */ {
/**
* The name of the CSS class of this widget.
* @member {string}
* @default "d-tooltip d-tooltip-dialog"
*/
baseClass: "d-tooltip d-tooltip-dialog",
template: template,
nls: messages,
/**
* The title of the TooltipDialog, displayed at the top, above the content.
* @member {string}
*/
label: "",
/**
* Class to display the close button icon.
* @member {string}
* @default "d-tooltip-dialog-close-icon"
*/
closeButtonIconClass: "d-tooltip-dialog-close-icon",
closeButtonClickHandler: function () {
this.emit("cancel");
},
// Override Tooltip#onOpen() and onClose() to *not* set aria-describedby,
// because it shouldn't be set for TooltipDialog, but only for Tooltip.
onOpen: function () {},
onClose: function () {}
});
});