X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/b37ceabb82336ee82757cd32efe353cfab8ec267..0494b8d9b9bb03ab6c22b34dae81261e3cd7e3e6:/pkgs/pkg-tips-debug.js diff --git a/pkgs/pkg-tips-debug.js b/pkgs/pkg-tips-debug.js index 9a86d275..b26d6399 100644 --- a/pkgs/pkg-tips-debug.js +++ b/pkgs/pkg-tips-debug.js @@ -1,8 +1,8 @@ /*! - * Ext JS Library 3.2.2 - * Copyright(c) 2006-2010 Ext JS, Inc. - * licensing@extjs.com - * http://www.extjs.com/license + * Ext JS Library 3.3.1 + * Copyright(c) 2006-2010 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license */ /** * @class Ext.Tip @@ -555,8 +555,8 @@ myGrid.on('render', function(grid) { this.showAt(this.getTargetXY()); if(this.anchor){ - this.syncAnchor(); this.anchorEl.show(); + this.syncAnchor(); this.constrainPosition = this.origConstrainPosition; }else{ this.anchorEl.hide(); @@ -917,7 +917,7 @@ Ext.reg('quicktip', Ext.QuickTip);/** * configuration properties of Ext.QuickTip. These settings will apply to all * tooltips shown by the singleton.
*Below is the summary of the configuration properties which can be used. - * For detailed descriptions see {@link #getQuickTip}
+ * For detailed descriptions see the config options for the {@link Ext.QuickTip QuickTip} class *QuickTips singleton configs (all are optional)
*To register a quick tip in markup, you simply add one or more of the valid QuickTip attributes prefixed with @@ -973,7 +973,9 @@ Ext.QuickTips.register({ * @singleton */ Ext.QuickTips = function(){ - var tip, locks = []; + var tip, + disabled = false; + return { /** * Initialize the global QuickTips instance and prepare any quick tips. @@ -987,23 +989,40 @@ Ext.QuickTips = function(){ }); return; } - tip = new Ext.QuickTip({elements:'header,body'}); + tip = new Ext.QuickTip({ + elements:'header,body', + disabled: disabled + }); if(autoRender !== false){ tip.render(Ext.getBody()); } } }, + + // Protected method called by the dd classes + ddDisable : function(){ + // don't disable it if we don't need to + if(tip && !disabled){ + tip.disable(); + } + }, + + // Protected method called by the dd classes + ddEnable : function(){ + // only enable it if it hasn't been disabled + if(tip && !disabled){ + tip.enable(); + } + }, /** * Enable quick tips globally. */ enable : function(){ if(tip){ - locks.pop(); - if(locks.length < 1){ - tip.enable(); - } + tip.enable(); } + disabled = false; }, /** @@ -1013,7 +1032,7 @@ Ext.QuickTips = function(){ if(tip){ tip.disable(); } - locks.push(1); + disabled = true; }, /** @@ -1025,7 +1044,8 @@ Ext.QuickTips = function(){ }, /** - * Gets the global QuickTips instance. + * Gets the single {@link Ext.QuickTip QuickTip} instance used to show tips from all registered elements. + * @return {Ext.QuickTip} */ getQuickTip : function(){ return tip; @@ -1052,10 +1072,10 @@ Ext.QuickTips = function(){ * Alias of {@link #register}. * @param {Object} config The config object */ - tips :function(){ + tips : function(){ tip.register.apply(tip, arguments); } - } + }; }();/** * @class Ext.slider.Tip * @extends Ext.Tip