2 |
aperonnet |
1 |
<div class="body-wrap">
|
|
|
2 |
<div class="top-tools">
|
|
|
3 |
<a class="inner-link" href="#Ext.QuickTips-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>
|
|
|
4 |
<a class="inner-link" href="#Ext.QuickTips-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a>
|
|
|
5 |
<a class="inner-link" href="#Ext.QuickTips-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a>
|
|
|
6 |
<a class="bookmark" href="../docs/?class=Ext.QuickTips"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>
|
|
|
7 |
</div>
|
|
|
8 |
<h1>Class Ext.QuickTips</h1>
|
|
|
9 |
<table cellspacing="0">
|
|
|
10 |
<tr><td class="label">Package:</td><td class="hd-info">Ext</td></tr>
|
|
|
11 |
<tr><td class="label">Defined In:</td><td class="hd-info"><a href="../source/widgets/tips/QuickTips.js" target="_blank">QuickTips.js</a></td></tr>
|
|
|
12 |
<tr><td class="label">Class:</td><td class="hd-info">QuickTips</td></tr>
|
|
|
13 |
<tr><td class="label">Extends:</td><td class="hd-info">Object</td></tr>
|
|
|
14 |
</table>
|
|
|
15 |
<div class="description">
|
|
|
16 |
<p>Provides attractive and customizable tooltips for any element. The QuickTips
|
|
|
17 |
singleton is used to configure and manage tooltips globally for multiple elements
|
|
|
18 |
in a generic manner. To create individual tooltips with maximum customizability,
|
|
|
19 |
you should consider either <a ext:cls="Ext.Tip" href="output/Ext.Tip.html">Ext.Tip</a> or <a ext:cls="Ext.ToolTip" href="output/Ext.ToolTip.html">Ext.ToolTip</a>.</p>
|
|
|
20 |
<p>Quicktips can be configured via tag attributes directly in markup, or by
|
|
|
21 |
registering quick tips programmatically via the <a ext:cls="Ext.QuickTips" ext:member="register" href="output/Ext.QuickTips.html#register">register</a> method.</p>
|
|
|
22 |
<p>The singleton's instance of <a ext:cls="Ext.QuickTip" href="output/Ext.QuickTip.html">Ext.QuickTip</a> is available via
|
|
|
23 |
<a ext:cls="Ext.QuickTips" ext:member="getQuickTip" href="output/Ext.QuickTips.html#getQuickTip">getQuickTip</a>, and supports all the methods, and all the all the
|
|
|
24 |
configuration properties of Ext.QuickTip. These settings will apply to all
|
|
|
25 |
tooltips shown by the singleton.</p>
|
|
|
26 |
<p>Below is the summary of the configuration properties which can be used.
|
|
|
27 |
For detailed descriptions see <a ext:cls="Ext.QuickTips" ext:member="getQuickTip" href="output/Ext.QuickTips.html#getQuickTip">getQuickTip</a></p>
|
|
|
28 |
<p><b>QuickTips singleton configs (all are optional)</b></p>
|
|
|
29 |
<div class="mdetail-params"><ul><li>dismissDelay</li>
|
|
|
30 |
<li>hideDelay</li>
|
|
|
31 |
<li>maxWidth</li>
|
|
|
32 |
<li>minWidth</li>
|
|
|
33 |
<li>showDelay</li>
|
|
|
34 |
<li>trackMouse</li></ul></div>
|
|
|
35 |
<p><b>Target element configs (optional unless otherwise noted)</b></p>
|
|
|
36 |
<div class="mdetail-params"><ul><li>autoHide</li>
|
|
|
37 |
<li>cls</li>
|
|
|
38 |
<li>dismissDelay (overrides singleton value)</li>
|
|
|
39 |
<li>target (required)</li>
|
|
|
40 |
<li>text (required)</li>
|
|
|
41 |
<li>title</li>
|
|
|
42 |
<li>width</li></ul></div>
|
|
|
43 |
<p>Here is an example showing how some of these config options could be used:</p>
|
|
|
44 |
<pre><code><i>// Init the singleton. Any tag-based quick tips will start working.</i>
|
|
|
45 |
Ext.QuickTips.init();
|
|
|
46 |
|
|
|
47 |
<i>// Apply a set of config properties to the singleton</i>
|
|
|
48 |
Ext.apply(Ext.QuickTips.getQuickTip(), {
|
|
|
49 |
maxWidth: 200,
|
|
|
50 |
minWidth: 100,
|
|
|
51 |
showDelay: 50,
|
|
|
52 |
trackMouse: true
|
|
|
53 |
});
|
|
|
54 |
|
|
|
55 |
<i>// Manually register a quick tip <b>for</b> a specific element</i>
|
|
|
56 |
q.register({
|
|
|
57 |
target: <em>'my-div'</em>,
|
|
|
58 |
title: <em>'My Tooltip'</em>,
|
|
|
59 |
text: <em>'This tooltip was added <b>in</b> code'</em>,
|
|
|
60 |
width: 100,
|
|
|
61 |
dismissDelay: 20
|
|
|
62 |
});</code></pre>
|
|
|
63 |
<p>To register a quick tip in markup, you simply add one or more of the valid QuickTip attributes prefixed with
|
|
|
64 |
the <b>ext:</b> namespace. The HTML element itself is automatically set as the quick tip target. Here is the summary
|
|
|
65 |
of supported attributes (optional unless otherwise noted):</p>
|
|
|
66 |
<ul><li><b>hide</b>: Specifying "user" is equivalent to setting autoHide = false. Any other value will be the
|
|
|
67 |
same as autoHide = true.</li>
|
|
|
68 |
<li><b>qclass</b>: A CSS class to be applied to the quick tip (equivalent to the 'cls' target element config).</li>
|
|
|
69 |
<li><b>qtip (required)</b>: The quick tip text (equivalent to the 'text' target element config).</li>
|
|
|
70 |
<li><b>qtitle</b>: The quick tip title (equivalent to the 'title' target element config).</li>
|
|
|
71 |
<li><b>qwidth</b>: The quick tip width (equivalent to the 'width' target element config).</li></ul>
|
|
|
72 |
<p>Here is an example of configuring an HTML element to display a tooltip from markup:</p>
|
|
|
73 |
<pre><code><i>// Add a quick tip to an HTML button</i>
|
|
|
74 |
<input type=<em>"button"</em> value=<em>"OK"</em> ext:qtitle=<em>"OK Button"</em> ext:qwidth=<em>"100"</em>
|
|
|
75 |
ext:qtip=<em>"This is a quick tip from markup!"</em>></input></code></pre><br><br><i>This class is a singleton and cannot be created directly.</i> </div>
|
|
|
76 |
|
|
|
77 |
<div class="hr"></div>
|
|
|
78 |
<a id="Ext.QuickTips-props"></a>
|
|
|
79 |
<h2>Public Properties</h2>
|
|
|
80 |
<div class="no-members">This class has no public properties.</div> <a id="Ext.QuickTips-methods"></a>
|
|
|
81 |
<h2>Public Methods</h2>
|
|
|
82 |
<table cellspacing="0" class="member-table">
|
|
|
83 |
<tr>
|
|
|
84 |
<th class="sig-header" colspan="2">Method</th>
|
|
|
85 |
<th class="msource-header">Defined By</th>
|
|
|
86 |
</tr>
|
|
|
87 |
<tr class="method-row expandable">
|
|
|
88 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
89 |
<td class="sig">
|
|
|
90 |
<a id="Ext.QuickTips-disable"></a>
|
|
|
91 |
<b>disable</b>() : void <div class="mdesc">
|
|
|
92 |
<div class="short">Disable quick tips globally.</div>
|
|
|
93 |
<div class="long">
|
|
|
94 |
Disable quick tips globally. <div class="mdetail-params">
|
|
|
95 |
<strong>Parameters:</strong>
|
|
|
96 |
<ul><li>None.</li> </ul>
|
|
|
97 |
<strong>Returns:</strong>
|
|
|
98 |
<ul>
|
|
|
99 |
<li><code>void</code></li>
|
|
|
100 |
</ul>
|
|
|
101 |
</div>
|
|
|
102 |
</div>
|
|
|
103 |
</div>
|
|
|
104 |
</td>
|
|
|
105 |
<td class="msource">QuickTips</td>
|
|
|
106 |
</tr>
|
|
|
107 |
<tr class="method-row alt expandable">
|
|
|
108 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
109 |
<td class="sig">
|
|
|
110 |
<a id="Ext.QuickTips-enable"></a>
|
|
|
111 |
<b>enable</b>() : void <div class="mdesc">
|
|
|
112 |
<div class="short">Enable quick tips globally.</div>
|
|
|
113 |
<div class="long">
|
|
|
114 |
Enable quick tips globally. <div class="mdetail-params">
|
|
|
115 |
<strong>Parameters:</strong>
|
|
|
116 |
<ul><li>None.</li> </ul>
|
|
|
117 |
<strong>Returns:</strong>
|
|
|
118 |
<ul>
|
|
|
119 |
<li><code>void</code></li>
|
|
|
120 |
</ul>
|
|
|
121 |
</div>
|
|
|
122 |
</div>
|
|
|
123 |
</div>
|
|
|
124 |
</td>
|
|
|
125 |
<td class="msource">QuickTips</td>
|
|
|
126 |
</tr>
|
|
|
127 |
<tr class="method-row expandable">
|
|
|
128 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
129 |
<td class="sig">
|
|
|
130 |
<a id="Ext.QuickTips-getQuickTip"></a>
|
|
|
131 |
<b>getQuickTip</b>() : void <div class="mdesc">
|
|
|
132 |
<div class="short">Gets the global QuickTips instance.</div>
|
|
|
133 |
<div class="long">
|
|
|
134 |
Gets the global QuickTips instance. <div class="mdetail-params">
|
|
|
135 |
<strong>Parameters:</strong>
|
|
|
136 |
<ul><li>None.</li> </ul>
|
|
|
137 |
<strong>Returns:</strong>
|
|
|
138 |
<ul>
|
|
|
139 |
<li><code>void</code></li>
|
|
|
140 |
</ul>
|
|
|
141 |
</div>
|
|
|
142 |
</div>
|
|
|
143 |
</div>
|
|
|
144 |
</td>
|
|
|
145 |
<td class="msource">QuickTips</td>
|
|
|
146 |
</tr>
|
|
|
147 |
<tr class="method-row alt expandable">
|
|
|
148 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
149 |
<td class="sig">
|
|
|
150 |
<a id="Ext.QuickTips-init"></a>
|
|
|
151 |
<b>init</b>() : void <div class="mdesc">
|
|
|
152 |
<div class="short">Initialize the global QuickTips instance and prepare any quick tips.</div>
|
|
|
153 |
<div class="long">
|
|
|
154 |
Initialize the global QuickTips instance and prepare any quick tips. <div class="mdetail-params">
|
|
|
155 |
<strong>Parameters:</strong>
|
|
|
156 |
<ul><li>None.</li> </ul>
|
|
|
157 |
<strong>Returns:</strong>
|
|
|
158 |
<ul>
|
|
|
159 |
<li><code>void</code></li>
|
|
|
160 |
</ul>
|
|
|
161 |
</div>
|
|
|
162 |
</div>
|
|
|
163 |
</div>
|
|
|
164 |
</td>
|
|
|
165 |
<td class="msource">QuickTips</td>
|
|
|
166 |
</tr>
|
|
|
167 |
<tr class="method-row expandable">
|
|
|
168 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
169 |
<td class="sig">
|
|
|
170 |
<a id="Ext.QuickTips-isEnabled"></a>
|
|
|
171 |
<b>isEnabled</b>() : Boolean <div class="mdesc">
|
|
|
172 |
<div class="short">Returns true if quick tips are enabled, else false.</div>
|
|
|
173 |
<div class="long">
|
|
|
174 |
Returns true if quick tips are enabled, else false. <div class="mdetail-params">
|
|
|
175 |
<strong>Parameters:</strong>
|
|
|
176 |
<ul><li>None.</li> </ul>
|
|
|
177 |
<strong>Returns:</strong>
|
|
|
178 |
<ul>
|
|
|
179 |
<li><code>Boolean</code></li>
|
|
|
180 |
</ul>
|
|
|
181 |
</div>
|
|
|
182 |
</div>
|
|
|
183 |
</div>
|
|
|
184 |
</td>
|
|
|
185 |
<td class="msource">QuickTips</td>
|
|
|
186 |
</tr>
|
|
|
187 |
<tr class="method-row alt expandable">
|
|
|
188 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
189 |
<td class="sig">
|
|
|
190 |
<a id="Ext.QuickTips-register"></a>
|
|
|
191 |
<b>register</b>( <code>Object config</code> ) : void <div class="mdesc">
|
|
|
192 |
<div class="short">Configures a new quick tip instance and assigns it to a target element. See
|
|
|
193 |
<a ext:cls="Ext.QuickTip" ext:member="register" href="output/Ext.QuickTip.html#register">Ext.QuickTip.register</a> for details.</div>
|
|
|
194 |
<div class="long">
|
|
|
195 |
Configures a new quick tip instance and assigns it to a target element. See
|
|
|
196 |
<a ext:cls="Ext.QuickTip" ext:member="register" href="output/Ext.QuickTip.html#register">Ext.QuickTip.register</a> for details. <div class="mdetail-params">
|
|
|
197 |
<strong>Parameters:</strong>
|
|
|
198 |
<ul><li><code>config</code> : Object<div class="sub-desc">The config object</div></li> </ul>
|
|
|
199 |
<strong>Returns:</strong>
|
|
|
200 |
<ul>
|
|
|
201 |
<li><code>void</code></li>
|
|
|
202 |
</ul>
|
|
|
203 |
</div>
|
|
|
204 |
</div>
|
|
|
205 |
</div>
|
|
|
206 |
</td>
|
|
|
207 |
<td class="msource">QuickTips</td>
|
|
|
208 |
</tr>
|
|
|
209 |
<tr class="method-row expandable">
|
|
|
210 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
211 |
<td class="sig">
|
|
|
212 |
<a id="Ext.QuickTips-tips"></a>
|
|
|
213 |
<b>tips</b>( <code>Object config</code> ) : void <div class="mdesc">
|
|
|
214 |
<div class="short">Alias of <a ext:cls="Ext.QuickTips" ext:member="register" href="output/Ext.QuickTips.html#register">register</a>.</div>
|
|
|
215 |
<div class="long">
|
|
|
216 |
Alias of <a ext:cls="Ext.QuickTips" ext:member="register" href="output/Ext.QuickTips.html#register">register</a>. <div class="mdetail-params">
|
|
|
217 |
<strong>Parameters:</strong>
|
|
|
218 |
<ul><li><code>config</code> : Object<div class="sub-desc">The config object</div></li> </ul>
|
|
|
219 |
<strong>Returns:</strong>
|
|
|
220 |
<ul>
|
|
|
221 |
<li><code>void</code></li>
|
|
|
222 |
</ul>
|
|
|
223 |
</div>
|
|
|
224 |
</div>
|
|
|
225 |
</div>
|
|
|
226 |
</td>
|
|
|
227 |
<td class="msource">QuickTips</td>
|
|
|
228 |
</tr>
|
|
|
229 |
<tr class="method-row alt expandable">
|
|
|
230 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
231 |
<td class="sig">
|
|
|
232 |
<a id="Ext.QuickTips-unregister"></a>
|
|
|
233 |
<b>unregister</b>( <code>String/HTMLElement/Element el</code> ) : void <div class="mdesc">
|
|
|
234 |
<div class="short">Removes any registered quick tip from the target element and destroys it.</div>
|
|
|
235 |
<div class="long">
|
|
|
236 |
Removes any registered quick tip from the target element and destroys it. <div class="mdetail-params">
|
|
|
237 |
<strong>Parameters:</strong>
|
|
|
238 |
<ul><li><code>el</code> : String/HTMLElement/Element<div class="sub-desc">The element from which the quick tip is to be removed.</div></li> </ul>
|
|
|
239 |
<strong>Returns:</strong>
|
|
|
240 |
<ul>
|
|
|
241 |
<li><code>void</code></li>
|
|
|
242 |
</ul>
|
|
|
243 |
</div>
|
|
|
244 |
</div>
|
|
|
245 |
</div>
|
|
|
246 |
</td>
|
|
|
247 |
<td class="msource">QuickTips</td>
|
|
|
248 |
</tr>
|
|
|
249 |
</table>
|
|
|
250 |
<a id="Ext.QuickTips-events"></a>
|
|
|
251 |
<h2>Public Events</h2>
|
|
|
252 |
<div class="no-members">This class has no public events.</div>
|
|
|
253 |
</div>
|