PDA

View Full Version : [FIXED-EXTJSIV-2509]4.0.2 Ext.Panel.tool "qtip" string do not work



pkli
14 Jun 2011, 1:09 AM
There is a bug in panel tool "qtip" option if we use a simple string as param.

In documentation :
Ext.panel.Tool > Config options : "tooltip" is mentioned, old param no longer valid.

In src > panel/Tool.js : qtip is tested in "afterRender" but do not work.


Do not work :


afterRender: function() {
var me = this;
me.callParent(arguments);
if (me.qtip) {
if (Ext.isObject(me.qtip)) {
Ext.tip.QuickTipManager.register(Ext.apply({
target: me.id
}, me.qtip));
}
else {
/////////////////////////////////////////////////////////////
me.toolEl.dom.qtip = me.qtip;
/////////////////////////////////////////////////////////////
}
}

me.mon(me.toolEl, {
click: me.onClick,
mousedown: me.onMouseDown,
mouseover: me.onMouseOver,
mouseout: me.onMouseOut,
scope: me
});
}



Work fine :


afterRender: function() {
var me = this;
me.callParent(arguments);
if (me.qtip) {
if (Ext.isObject(me.qtip)) {
Ext.tip.QuickTipManager.register(Ext.apply({
target: me.id
}, me.qtip));
}
else {
/////////////////////////////////////////////////////////////
Ext.create('Ext.tip.ToolTip', {
target: me.id,
html: me.qtip
});
/////////////////////////////////////////////////////////////
}
}

me.mon(me.toolEl, {
click: me.onClick,
mousedown: me.onMouseDown,
mouseover: me.onMouseOver,
mouseout: me.onMouseOut,
scope: me
});
}

evant
14 Jun 2011, 3:34 AM
Thanks for the report, the correct option is tooltip, I've added an alias for qtip for the time being. Also fixed up the docs in Panel.

pkli
14 Jun 2011, 6:56 AM
Thanks.

If correct one is "tooltip", in live doc Ext.panel.Panel> Config options > tools > "Example usage" : option is still "qtip".
May be just not already updated ...

terrycursh
16 Jun 2011, 7:29 PM
I used tooltip, but it still doesn`t work! Am I wrong?


Ext.QuickTips.init();
var p = Ext.create('Ext.panel.Panel',{
title : 'Framed panel with normal child',
width : 300,
height: 100,
html : null,
frame: true,
layout: 'fit',
items: [
{
xtype: 'panel',
title: 'Non-framed child',
html : 'Hello'
}
],
tools: [
{
type: 'help',
tooltip:'111',
handler: function(){
// show help here
}
},
{
type: 'refresh',
tooltip:'222',
handler: function(){
// do refresh
}
},
{
type: 'search',
tooltip:'333',
handler: function(event, target, owner, tool){

}
}]
});