oGrid.onHeaderClicked = function(event, col){
event.cancelBubble = true;
event = Event.extend(event); // http://api.prototypejs.org/dom/Event/extend/
if(event.isLeftClick()){
col = parseInt(col, 10);
var result, dynCC;
if (typeof row !== 'undefined') {
row = parseInt(row, 10);
dynCC = this.getCellCurrentControl(col,row);
}
switch (col){
case 00: result = FoxInCloud.gridHeaderClicked(event, $('pagedgrid_scx-awgrd1-awgrd1'), 'pagedgrid_scx-awgrd1-awgrd1-column1-header1');break;
case 01: result = FoxInCloud.gridHeaderClicked(event, $('pagedgrid_scx-awgrd1-awgrd1'), 'pagedgrid_scx-awgrd1-awgrd1-column2-header1');break;
case 02: result = FoxInCloud.gridHeaderClicked(event, $('pagedgrid_scx-awgrd1-awgrd1'), 'pagedgrid_scx-awgrd1-awgrd1-column3-header1');break;
}
return result;
}
if(event.isRightClick()){ // http://api.prototypejs.org/dom/Event/isRightClick/
event.preventDefault(); // HERE
col = parseInt(col, 10);
var result, dynCC;
if (typeof row !== 'undefined') {
row = parseInt(row, 10);
dynCC = this.getCellCurrentControl(col,row);
}
switch (col){
case 00: result = FoxInCloud.gridHeaderClicked(event, $('pagedgrid_scx-awgrd1-awgrd1'), 'pagedgrid_scx-awgrd1-awgrd1-column1-header1');break;
case 01: result = FoxInCloud.gridHeaderClicked(event, $('pagedgrid_scx-awgrd1-awgrd1'), 'pagedgrid_scx-awgrd1-awgrd1-column2-header1');break;
case 02: result = FoxInCloud.gridHeaderClicked(event, $('pagedgrid_scx-awgrd1-awgrd1'), 'pagedgrid_scx-awgrd1-awgrd1-column3-header1');break;
}
return result;
}
};
event.preventDefault(); // HERE
$('aw36-header-2-box-text').observe('contextmenu', function(event){event.preventDefault()})
var headerID = oGrid.getHeaderID(col); // does this method exist?
$(headerID).observe('contextmenu', function(event){event.preventDefault()});
obj.getHeader().setEvent("oncontextmenu", function(event){
AW.setReturnValue(event, false);
});
event.preventDefault()
// These methods should be added _only_ to legacy IE event objects.
var additionalMethods = {
stopPropagation: function() { this.cancelBubble = true },
preventDefault: function() { this.returnValue = false },
inspect: function() { return '[object Event]' }
};
$(grid.getHeader(col).getId()).descendants().each(function(el){el.observe('contextmenu', function(event){event.preventDefault();})})
var obj = $('pagedgrid_scx-grd-grd').oGrid; // reference to the AW grid object
obj.getHeader(1).setEvent("oncontextmenu", function(event){
AW.setReturnValue(event, false);
});
var obj = $('pagedgrid_scx-grd-grd').oGrid; // reference to the AW grid object
obj.descendants().each(function(el){el.observe('contextmenu', function(event){event.preventDefault();})})
var obj = $('pagedgrid_scx-grd-grd').oGrid; // reference to the AW grid object
$(obj.getHeader(1).getId()).descendants().each(function(el){el.observe('contextmenu', function(event){event.preventDefault();})})
This topic is archived.