PDA

View Full Version : Unwanted data-qtip attributes on gridpanel rows



Iveco
22 May 2013, 6:29 AM
Hello,

I am using ExtJs 4.0.2. I got the problem that I have unwanted data-qtip attributes on grid rows, which I didn't add.

I do initialize quicktips like this



// any tag-based quick tips will start working.
Ext.tip.QuickTipManager.init();
// init quicktips
Ext.apply(Ext.tip.QuickTipManager.getQuickTip(), {
// setup quicktip settings
maxWidth: 300,
minWidth: 120,
animate: true,
trackMouse: true,
showDelay: 50, // show after 50 ms
dismissDelay: 10000 // hide after 10 seconds hover
});


Then I've a treepanel menu with some qtips (in a different region).
But a gridpanel in a complete different region is getting qtips added, like this:



<tr tabindex="-1" data-qtip="I did not add this." class="x-grid-row x-grid-row-alt x-grid-data-row" data-recordindex="1" data-recordid="23" data-boundview="gridview-1040" id="gridview-1040-record-23"><td class="x-grid-cell x-grid-td x-grid-cell-gridcolumn-1035 x-grid-cell-first x-unselectable ">


Does anyone know about this problem or can tell a solution for non premium users too?

Iveco
22 May 2013, 11:27 PM
This might be related too http://www.sencha.com/forum/showthread.php?260302 (prem only).

I guess there is no workaround for non-premium users available?
Can someone tell me if there is any bugreport/fix in the official releases already?

makana
22 May 2013, 11:37 PM
It's an Ext.tree.View-Bug and fixed in 4.2.1 i guess.

Workaround we use:


/**
* @class Ext.override.tree.View
* @override Ext.tree.View
* BugFixes für Ext.tree.View
*/
Ext.define('Ext.override.tree.View', {
override: 'Ext.tree.View',

initComponent: function()
{
this.treeRowTpl = Ext.XTemplate.getTpl(this, 'treeRowTpl');
this.treeRowTpl.set([
'{%',
'this.processRowValues(values);',
'this.nextTpl.applyOut(values, out, parent);',
// diese beiden Zeilen sind der Fix. Ohne den wird in jede Grid-Zelle das zuletzt
// erstellte Tooltip eines beliebigen (anderen) Grids übernommen.
'delete values.rowAttr["data-qtip"];',
'delete values.rowAttr["data-qtitle"];',
'%}'].join(''), this.treeRowTpl.compiled);
this.callParent(arguments);
}
});

Iveco
23 May 2013, 1:56 AM
Excellent support, workaround works! Thank you very much for your information and help.