PDA

View Full Version : Dropzone notifyover on IE



John Sourcer
20 Oct 2009, 1:08 AM
Can anybody see why the alert doesn't fire on IE?



<script type="text/javascript">

Ext.onReady(function() {

Ext.BLANK_IMAGE_URL = 'images/s.gif';

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']
];

var store = new Ext.data.ArrayStore({
fields: [
{name: 'company'},
{name: 'price', type: 'float'},
{name: 'change', type: 'float'},
{name: 'pctChange', type: 'float'},
{name: 'lastChange', type: 'date', dateFormat: 'n/j h:ia'}
]
});

store.loadData(myData);

var grid = new Ext.grid.GridPanel({
store: store,
columns: [
{id:'company',header: 'Company', width: 160, sortable: true, dataIndex: 'company'},
{header: 'Price', width: 75, sortable: true, renderer: 'usMoney', dataIndex: 'price'},
{header: 'Change', width: 75, sortable: true, dataIndex: 'change'},
{header: '% Change', width: 75, sortable: true, dataIndex: 'pctChange'},
{header: 'Last Updated', width: 85, sortable: true, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}
],
stripeRows: true,
autoExpandColumn: 'company',
height: 350,
width: 600,
title: 'Array Grid',
enableDragDrop: true
});

grid.on( 'viewready', function(grid, view) {

if (grid.enableDragDrop != false) {

var ddGroupId = grid.id + '-dd-group';
var dragZone = new Ext.grid.GridDragZone(grid, {
ddGroup: ddGroupId
});

var dropZone = new Ext.dd.DropZone(view.scroller, {
ddGroup: ddGroupId,
notifyOver: function(dd, evt, data) {
alert('over');
}.createDelegate(grid)
});
grid.dropZone = dropZone;
}
});

grid.render('grid-example');
});

</script>
<div id="grid-example">
</div>