PDA

View Full Version : [DUP] Status of bug EXTJSIV-9341



anton.dimitrov
17 Dec 2013, 8:41 AM
What is the status of bug EXTJSIV-9341?
It was fixed in 4.2.1 but appeared again in 4.2.2.

Gary Schlosberg
17 Dec 2013, 8:51 AM
The bug ticket says that it was fixed for 4.2.1. There's no test case in it to test against 4.2.2 -- do you have a test case I can use? If it is still an issue, I'll file a new bug so we can get it handled (again). Thanks.

anton.dimitrov
17 Dec 2013, 9:04 AM
If you just run the test case in the original bug post :
http://www.sencha.com/forum/showthread.php?260302-4.2-Unwanted-data-qtip-injected-into-all-GridPanel-rows
(http://www.sencha.com/forum/showthread.php?260302-4.2-Unwanted-data-qtip-injected-into-all-GridPanel-rows)
You will get the bug:
47253

anton.dimitrov
17 Dec 2013, 9:06 AM
Here is the test case: provided by miti


<!DOCTYPE html>
<!-- tree-qtip.html -->
<html>
<head>
<title>Example by Saki</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="js/extjs4/resources/css/ext-all.css" />

<script type="text/javascript" src="js/extjs4/ext-all-debug.js"></script>
<script type="text/javascript">

// entry point
Ext.onReady(function() {
Ext.tip.QuickTipManager.init();

var tree = new Ext.tree.Panel({
width: 400,
height: 200,
renderTo: document.body,
root: {
text: 'Foo',
expanded: true,
children: [{
text: 'A',
leaf: true
}, {
text: 'B',
leaf: true
}, {
text: 'C',
leaf: true
}]
}
});

Ext.define('Company', {
extend: 'Ext.data.Model',
fields: [
{name: 'company'},
{name: 'price', type: 'float', convert: null, defaultValue: undefined},
{name: 'change', type: 'float', convert: null, defaultValue: undefined},
{name: 'pctChange', type: 'float', convert: null, defaultValue: undefined},
{name: 'lastChange', type: 'date', dateFormat: 'n/j h:ia', defaultValue: undefined}
],
idProperty: 'company'
});

// sample static data for the store
var myData = [
['3m Co', 71.72, 0.02, 0.03, '9/1 12:00am'],
['Alcoa Inc', 29.01, 0.42, 1.47, '9/1 12:00am'],
['Altria Group Inc', 83.81, 0.28, 0.34, '9/1 12:00am'],
['American Express Company', 52.55, 0.01, 0.02, '9/1 12:00am'],
['American International Group, Inc.', 64.13, 0.31, 0.49, '9/1 12:00am'],
['AT&T Inc.', 31.61, -0.48, -1.54, '9/1 12:00am'],
['Boeing Co.', 75.43, 0.53, 0.71, '9/1 12:00am'],
['Caterpillar Inc.', 67.27, 0.92, 1.39, '9/1 12:00am'],
['Citigroup, Inc.', 49.37, 0.02, 0.04, '9/1 12:00am'],
['E.I. du Pont de Nemours and Company', 40.48, 0.51, 1.28, '9/1 12:00am']
];

/**
* Custom function used for column renderer
* @param {Object} val
*/
function change(val) {
if (val > 0) {
return '<span style="color:green;">' + val + '</span>';
} else if (val < 0) {
return '<span style="color:red;">' + val + '</span>';
}
return val;
}

/**
* Custom function used for column renderer
* @param {Object} val
*/
function pctChange(val) {
if (val > 0) {
return '<span style="color:green;">' + val + '%</span>';
} else if (val < 0) {
return '<span style="color:red;">' + val + '%</span>';
}
return val;
}

// create the data store
var store = Ext.create('Ext.data.ArrayStore', {
model: 'Company',
data: myData
});

// create the Grid
var grid = Ext.create('Ext.grid.Panel', {
store: store,
collapsible: true,
multiSelect: true,
columns: [
{
text : 'Company',
flex : 1,
sortable : false,
dataIndex: 'company'
},
{
text : 'Price',
width : 75,
sortable : true,
renderer : 'usMoney',
dataIndex: 'price'
},
{
text : 'Change',
width : 75,
sortable : true,
renderer : change,
dataIndex: 'change'
},
{
text : '% Change',
width : 75,
sortable : true,
renderer : pctChange,
dataIndex: 'pctChange'
},
{
text : 'Last Updated',
width : 85,
sortable : true,
renderer : Ext.util.Format.dateRenderer('m/d/Y'),
dataIndex: 'lastChange'
},
{
menuDisabled: true,
sortable: false,
xtype: 'actioncolumn',
width: 50,
items: [{
icon : '../shared/icons/fam/delete.gif', // Use a URL in the icon config
tooltip: 'Sell stock',
handler: function(grid, rowIndex, colIndex) {
var rec = store.getAt(rowIndex);
alert("Sell " + rec.get('company'));
}
}, {
getClass: function(v, meta, rec) { // Or return a class from a function
if (rec.get('change') < 0) {
return 'alert-col';
} else {
return 'buy-col';
}
},
getTip: function(v, meta, rec) {
if (rec.get('change') < 0) {
return 'Hold stock';
} else {
return 'Buy stock';
}
},
handler: function(grid, rowIndex, colIndex) {
var rec = store.getAt(rowIndex);
alert((rec.get('change') < 0 ? "Hold " : "Buy ") + rec.get('company'));
}
}]
}
],
height: 350,
width: 600,
title: 'Array Grid',
renderTo: document.body,
viewConfig: {
stripeRows: true,
enableTextSelection: true
}
});

tree.getRootNode().childNodes[1].set('qtip', 'Tip c');
}); // eo onReady

</script>
</head>
<body>
</body>
</html>
<!-- eof -->

Gary Schlosberg
7 Feb 2014, 12:42 AM
Thanks for the report! I've moved this thread to the Bugs forum and (re)opened a bug in our bug tracker.