]>
git.proxmox.com Git - extjs.git/blob - extjs/examples/classic/qtips/qtips.js
4 'Ext.window.MessageBox'
7 Ext
.onReady(function() {
8 // Generate the buttons
9 var defaultButtonConfig
= {
12 "margin-right": '10px'
18 text
: 'Basic ToolTip',
22 text
: 'autoHide disabled',
26 text
: 'Ajax ToolTip',
34 text
: 'Anchor right, rich content',
38 text
: 'Anchor below',
43 text
: 'Anchor with tracking',
47 Ext
.each(buttons
, function(config
) {
48 var btn
= Ext
.create('Ext.Button', Ext
.apply({}, config
, defaultButtonConfig
));
53 html
: 'A very simple tooltip'
61 dismissDelay
: 15000 // auto hide after 15 seconds
64 title
: 'My Tip Title',
65 html
: 'Click the X to close me',
73 html
: 'This tip will follow the mouse while it is over the element',
76 title
: '<a href="#">Rich Content Tooltip</a>',
77 id
: 'content-anchor-tip',
78 target
: 'leftCallout',
84 contentEl
: 'content-tip', // load content from the page
87 this.header
.on('click', function(header
, e
){
89 Ext
.Msg
.alert('Link', 'Link to something interesting.');
90 Ext
.getCmp('content-anchor-tip').hide();
91 }, this, {delegate
:'a'});
95 target
: 'bottomCallout',
97 anchorOffset
: 85, // center the anchor on the tooltip
98 html
: 'This tip\'s anchor is centered'
100 target
: 'trackCallout',
103 html
: 'Tracking while you move the mouse'
106 Ext
.each(tooltips
, function(config
) {
107 Ext
.create('Ext.tip.ToolTip', config
);
110 Ext
.QuickTips
.init();