You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

88 lines
2.4 KiB

2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. This file is part of Ext JS 3.4
  3. Copyright (c) 2011-2013 Sencha Inc
  4. Contact: http://www.sencha.com/contact
  5. GNU General Public License Usage
  6. This file may be used under the terms of the GNU General Public License version 3.0 as
  7. published by the Free Software Foundation and appearing in the file LICENSE included in the
  8. packaging of this file.
  9. Please review the following information to ensure the GNU General Public License version 3.0
  10. requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  11. If you are unsure which license is appropriate for your use, please contact the sales department
  12. at http://www.sencha.com/contact.
  13. Build date: 2013-04-03 15:07:25
  14. */
  15. Ext.onReady(function(){
  16. new Ext.ToolTip({
  17. target: 'tip1',
  18. html: 'A very simple tooltip'
  19. });
  20. new Ext.ToolTip({
  21. target: 'ajax-tip',
  22. width: 200,
  23. autoLoad: {url: 'ajax-tip.html'},
  24. dismissDelay: 15000 // auto hide after 15 seconds
  25. });
  26. new Ext.ToolTip({
  27. target: 'tip2',
  28. html: 'Click the X to close me',
  29. title: 'My Tip Title',
  30. autoHide: false,
  31. closable: true,
  32. draggable:true
  33. });
  34. new Ext.ToolTip({
  35. target: 'track-tip',
  36. title: 'Mouse Track',
  37. width:200,
  38. html: 'This tip will follow the mouse while it is over the element',
  39. trackMouse:true
  40. });
  41. new Ext.ToolTip({
  42. title: '<a href="#">Rich Content Tooltip</a>',
  43. id: 'content-anchor-tip',
  44. target: 'leftCallout',
  45. anchor: 'left',
  46. html: null,
  47. width: 415,
  48. autoHide: false,
  49. closable: true,
  50. contentEl: 'content-tip', // load content from the page
  51. listeners: {
  52. 'render': function(){
  53. this.header.on('click', function(e){
  54. e.stopEvent();
  55. Ext.Msg.alert('Link', 'Link to something interesting.');
  56. Ext.getCmp('content-anchor-tip').hide();
  57. }, this, {delegate:'a'});
  58. }
  59. }
  60. });
  61. new Ext.ToolTip({
  62. target: 'bottomCallout',
  63. anchor: 'top',
  64. anchorOffset: 85, // center the anchor on the tooltip
  65. html: 'This tip\'s anchor is centered'
  66. });
  67. new Ext.ToolTip({
  68. target: 'trackCallout',
  69. anchor: 'right',
  70. trackMouse: true,
  71. html: 'Tracking while you move the mouse'
  72. });
  73. Ext.QuickTips.init();
  74. });