AW 2.5.5 Mac Safari
I am running the latest version but the sort does not work on Safari 3 on a MAC. Any suggestiosn?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Verify</title>
<style type="text/css">
.aw-quirks * {
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
body {font: 12px Tahoma}
</style>
<!-- ActiveWidgets stylesheet and scripts -->
<script src="../runtime/lib/aw.js" type="text/javascript"></script>
<link href="../runtime/styles/xp/aw.css" rel="stylesheet">
<style type="text/css">
#myGrid {height: 98%; width: 100%;}
#myGrid .aw-row-selector {text-align: center}
#myGrid .aw-grid-row {border-bottom: 1px solid threedlightshadow;}
#myGrid .aw-grid-footers .aw-grid-footer { border-right: 1px solid threedlightshadow;}
#myGrid .aw-grid-cell {border-right: 2px solid white}
#myGrid .aw-grid-row {border-bottom: 2px solid white;}
#button1 {left: 900px; top: 1px; width: 60px;}
#myGrid .aw-footer-0 {border-top: 0px solid black; background: lightgrey; border-right: 0px solid threedlightshadow;}
#myGrid .aw-column-0 {width: 200px; text-align: left;}
#myGrid .aw-column-1 {width: 80px; text-align: right;}
#myGrid .aw-column-2 {width: 80px; text-align: right;}
#myGrid .aw-column-3 {width: 60px; text-align: right;}
#myGrid .aw-column-4 {width: 70px; text-align: right;}
#myGrid .aw-column-5 {width: 35px; text-align: right;}
#myGrid .aw-column-6 {width: 35px; text-align: right;}
#myGrid .aw-column-7 {width: 35px; text-align: right;}
#myGrid .aw-column-8 {width: 40px; text-align: left;}
#myGrid .aw-column-9 {width: 110px; text-align: left;}
#myGrid .aw-column-10 {width: 40px; text-align: left;}
#myGrid .aw-column-11 {width: 40px; text-align: left;}
#myGrid .aw-column-12 {width: 40px; text-align: left;}
#myGrid .aw-column-13 {width: 40px; text-align: left;}
#myGrid .aw-column-14 {width: 40px; text-align: left;}
#myGrid .aw-column-15 {width: 40px; text-align: left;}
#myGrid .aw-column-16 {width: 40px; text-align: left;}
#myGrid .aw-column-17 {width: 110px; text-align: left;}
#myGrid .aw-column-18 {width: 35px; text-align: right;}
/* box model fix for strict doctypes, safari */
.aw-strict #myGrid .aw-grid-cell {padding-right: 3px;}
.aw-strict #myGrid .aw-grid-row {padding-bottom: 3px;}
</style>
</head>
<body style="background-color:#000099;overflow:hidden;">
<!-- Island xml section modified for firefox and safari support -->
<script id="xmlDataIsland" type="xml/data">
<records>
<r bc="#009933" fc="#ffffff" ft="Arial" fs="12" fw="Bold" ><Destination f_hl="/cgi-bin/worldclock.pl?requestName=TimeZone&drillPath=custDestination,&sessionid=2pvi7w" f_hlwt="_blank"></Destination><Call_Attempts >17</Call_Attempts><Call_Connects >8</Call_Connects><Call_Errors >5</Call_Errors><Minutes >10</Minutes><ASR >48</ASR><ABR >48</ABR><PDD >5</PDD><ALOC >1:18</ALOC><LastCall >2009-11-11 03:02:51</LastCall><Link1 f_hl="/cgi-bin/redirect.pl?requestName=ASR_DISC_CODE&requestType=list&drillPath=custDestination,&sessionid=2pvi7w" f_hlwt="">ABEN</Link1><Link2 f_hl="/cgi-bin/redirect.pl?requestName=ASRcust&requestType=list&drillPath=custDestination,&sessionid=2pvi7w" f_hlwt="">Cust</Link2><Link3 f_hl="/cgi-bin/redirect.pl?requestName=ASRsupp&requestType=list&drillPath=custDestination,&sessionid=2pvi7w" f_hlwt="">Supp</Link3><Link4 f_hl="/cgi-bin/redirect.pl?requestName=ASRhour&requestType=list&drillPath=custDestination,&sessionid=2pvi7w" f_hlwt="">Hourly</Link4><Link5 f_hl="/cgi-bin/redirect.pl?requestName=LiveCallSumDest&requestType=list&drillPath=custDestination,&sessionid=2pvi7w" f_hlwt="">Live</Link5><Link6 f_hl="/cgi-bin/redirect.pl?requestName=PERFcountry&requestType=list&drillPath=custDestination,&sessionid=2pvi7w" f_hlwt="">Notes</Link6><Link7 f_hl="/cgi-bin/redirect.pl?requestName=ASRdebug&requestType=list&drillPath=custDestination,&sessionid=2pvi7w" f_hlwt="">Debug</Link7><FirstCall >2009-11-11 01:00:00</FirstCall><PSC >75</PSC></r>
</records>
</script>
<script>
var table = new AW.XML.Table;
var xml = document.getElementById("xmlDataIsland");
// extract xml string modified for island support in firefox and safari.
var xmlString = xml.innerHTML;
table.setColumns(["Destination","Call_Attempts","Call_Connects","Call_Errors","Minutes","ASR","ABR","PDD","ALOC","LastCall","Link1","Link2","Link3","Link4","Link5","Link6","Link7","FirstCall","PSC","@bc","@fc","@ft","@fw","@hl","More/@f_hl"]);
// assign xml data
table.setXML(xmlString);
table.getLink = function(col, row){return this.getNode(col, row).getAttribute("f_hl");};
table.getTooltip = function(col, row){return this.getNode(col, row).getAttribute("f_ro");};
var obj = new AW.UI.Grid;
obj.setId("myGrid");
obj.setColumnCount(19);
obj.setRowCount(144);
obj.setCellModel(table);
obj.setHeaderText(["Destination","Call_Attempts","Call_Connects","Call_Errors","Minutes","ASR","ABR","PDD","ALOC","LastCall","Link1","Link2","Link3","Link4","Link5","Link6","Link7","FirstCall","PSC","@bc","@fc","@ft","@fw","@hl","More/@f_hl"]);
obj.defineRowProperty("background", function(r){return this.getCellText(19, r);});
obj.defineRowProperty("color", function(r){return this.getCellText(19+1, r);});
obj.defineRowProperty("font-family", function(r){return this.getCellText(19+2, r);});
obj.defineRowProperty("font-weight", function(r){return this.getCellText(19+3, r);});
obj.setFooterVisible(true);
obj.setSelectionMode("multi-cell");
obj.setVirtualMode(true);
obj.getSelectedText = function(){
var c, r, a, text = [];
var cols = this.getSelectedColumns();
var rows = this.getSelectedRows();
// build columns array for row selections
if (this.getCurrentSelection() == "row"){
cols = [];
var count = this.getColumnCount();
var indices = this.getColumnIndices();
for (c=0; c<count; c++){
cols[c] = indices ? indices[c] : c;
}
}
// push column headers
if ( cols.length > 1 || rows.length > 1 ){
a = [];
for (c=0; c<cols.length; c++){
a[c] = this.getHeaderText(cols[c]);
}
text.push(a.join("\t"));
}
// push cell text
for (r=0; r<rows.length; r++){
a = [];
for (c=0; c<cols.length; c++){
a[c] = this.getCellText(cols[c], rows[r]);
}
text.push(a.join("\t"));
}
return text.join("\r\n");
};
var myRow = new AW.Grid.Row;
myRow.setStyle("background", function(){return this.getRowProperty("background");});
myRow.setStyle("color", function(){return this.getRowProperty("color");});
myRow.setStyle("font-family", function(){return this.getRowProperty("font-family");});
myRow.setStyle("font-weight", function(){return this.getRowProperty("font-weight");});
obj.setRowTemplate(myRow);
var label = new AW.UI.Label;
label.setId("myLabel");
label.setControlText("Destination: ");
label.setStyle("color", "black");
label.setStyle("font-weight", "bold");
label.setStyle("background", "#ddd");
label.setStyle("text-align", "left");
label.setStyle("width", "100%");
var button1 = new AW.UI.Button;
button1.setId("button1");
button1.setControlText("Add…");
var str = new AW.Formats.String;
var num = new AW.Formats.Number;
var floatFormat = new AW.Formats.Number;
var cur = new AW.Formats.Number;
var rate = new AW.Formats.Number;
floatFormat.setTextFormat("#,###.###");
num.setTextFormat("#,###.");
cur.setTextFormat("#,###.##");
rate.setTextFormat("##.#####");
obj.setFooterText(function(c, r){
var format = this.getFooterFormat(c, r);
var data = this.getFooterData(c, r);
return format ? format.dataToText(data) : data;
});
// enable row selectors
obj.setSelectorVisible(true);
obj.setSelectorText(function(i){return this.getRowPosition(i)+1});
// set headers width/height
obj.setSelectorWidth(28);
obj.setHeaderHeight(20);
// set row selection
//####################################################new version
// set click action handler
obj.onCellClicked = function(event, col, row) { var url = this.getCellLink(col, row);
var txt = this.getCellText(col, row);
var wt = table.getNode(col, row).getAttribute("f_hlwt");
if (url)
{
if (wt)
{
window.open(url,wt,'status=0, toolbar=0, location=0, menubar=0, directories=0, resizable=0, scrollbars=0, height=30, width=600' );
}
else
{
window.location = url; //open in parent
//filterForm.submit(); // shiraz form submit
}
}
//if (url){window.open(url);} //open in _blank
// else {alert(txt);}
};
button1.onClick = function(){window.location = ""};
//set cell formats obj.setCellFormat([str, str, num, num, num]);
obj.setCellFormat([str,num,num,num,num,num,num,num,str,str,str,str,str,str,str,str,str,str,num]);
//set footer text
obj.setFooterText(["-","1,229,013","27,362","380,488","233,587","6","3","0","8:33","-","-","-","-","-","-","-","-","-","43"]);
// set display indices
obj.setColumnIndices([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]);
// write grid html to the page
// provide external model as a grid data source
obj.setCellModel(table);
document.write(label);
document.write(obj);
</script>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Verify</title>
<style type="text/css">
.aw-quirks * {
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
body {font: 12px Tahoma}
</style>
<!-- ActiveWidgets stylesheet and scripts -->
<script src="../runtime/lib/aw.js" type="text/javascript"></script>
<link href="../runtime/styles/xp/aw.css" rel="stylesheet">
<style type="text/css">
#myGrid {height: 98%; width: 100%;}
#myGrid .aw-row-selector {text-align: center}
#myGrid .aw-grid-row {border-bottom: 1px solid threedlightshadow;}
#myGrid .aw-grid-footers .aw-grid-footer { border-right: 1px solid threedlightshadow;}
#myGrid .aw-grid-cell {border-right: 2px solid white}
#myGrid .aw-grid-row {border-bottom: 2px solid white;}
#button1 {left: 900px; top: 1px; width: 60px;}
#myGrid .aw-footer-0 {border-top: 0px solid black; background: lightgrey; border-right: 0px solid threedlightshadow;}
#myGrid .aw-column-0 {width: 200px; text-align: left;}
#myGrid .aw-column-1 {width: 80px; text-align: right;}
#myGrid .aw-column-2 {width: 80px; text-align: right;}
#myGrid .aw-column-3 {width: 60px; text-align: right;}
#myGrid .aw-column-4 {width: 70px; text-align: right;}
#myGrid .aw-column-5 {width: 35px; text-align: right;}
#myGrid .aw-column-6 {width: 35px; text-align: right;}
#myGrid .aw-column-7 {width: 35px; text-align: right;}
#myGrid .aw-column-8 {width: 40px; text-align: left;}
#myGrid .aw-column-9 {width: 110px; text-align: left;}
#myGrid .aw-column-10 {width: 40px; text-align: left;}
#myGrid .aw-column-11 {width: 40px; text-align: left;}
#myGrid .aw-column-12 {width: 40px; text-align: left;}
#myGrid .aw-column-13 {width: 40px; text-align: left;}
#myGrid .aw-column-14 {width: 40px; text-align: left;}
#myGrid .aw-column-15 {width: 40px; text-align: left;}
#myGrid .aw-column-16 {width: 40px; text-align: left;}
#myGrid .aw-column-17 {width: 110px; text-align: left;}
#myGrid .aw-column-18 {width: 35px; text-align: right;}
/* box model fix for strict doctypes, safari */
.aw-strict #myGrid .aw-grid-cell {padding-right: 3px;}
.aw-strict #myGrid .aw-grid-row {padding-bottom: 3px;}
</style>
</head>
<body style="background-color:#000099;overflow:hidden;">
<!-- Island xml section modified for firefox and safari support -->
<script id="xmlDataIsland" type="xml/data">
<records>
<r bc="#009933" fc="#ffffff" ft="Arial" fs="12" fw="Bold" ><Destination f_hl="/cgi-bin/worldclock.pl?requestName=TimeZone&drillPath=custDestination,&sessionid=2pvi7w" f_hlwt="_blank"></Destination><Call_Attempts >17</Call_Attempts><Call_Connects >8</Call_Connects><Call_Errors >5</Call_Errors><Minutes >10</Minutes><ASR >48</ASR><ABR >48</ABR><PDD >5</PDD><ALOC >1:18</ALOC><LastCall >2009-11-11 03:02:51</LastCall><Link1 f_hl="/cgi-bin/redirect.pl?requestName=ASR_DISC_CODE&requestType=list&drillPath=custDestination,&sessionid=2pvi7w" f_hlwt="">ABEN</Link1><Link2 f_hl="/cgi-bin/redirect.pl?requestName=ASRcust&requestType=list&drillPath=custDestination,&sessionid=2pvi7w" f_hlwt="">Cust</Link2><Link3 f_hl="/cgi-bin/redirect.pl?requestName=ASRsupp&requestType=list&drillPath=custDestination,&sessionid=2pvi7w" f_hlwt="">Supp</Link3><Link4 f_hl="/cgi-bin/redirect.pl?requestName=ASRhour&requestType=list&drillPath=custDestination,&sessionid=2pvi7w" f_hlwt="">Hourly</Link4><Link5 f_hl="/cgi-bin/redirect.pl?requestName=LiveCallSumDest&requestType=list&drillPath=custDestination,&sessionid=2pvi7w" f_hlwt="">Live</Link5><Link6 f_hl="/cgi-bin/redirect.pl?requestName=PERFcountry&requestType=list&drillPath=custDestination,&sessionid=2pvi7w" f_hlwt="">Notes</Link6><Link7 f_hl="/cgi-bin/redirect.pl?requestName=ASRdebug&requestType=list&drillPath=custDestination,&sessionid=2pvi7w" f_hlwt="">Debug</Link7><FirstCall >2009-11-11 01:00:00</FirstCall><PSC >75</PSC></r>
</records>
</script>
<script>
var table = new AW.XML.Table;
var xml = document.getElementById("xmlDataIsland");
// extract xml string modified for island support in firefox and safari.
var xmlString = xml.innerHTML;
table.setColumns(["Destination","Call_Attempts","Call_Connects","Call_Errors","Minutes","ASR","ABR","PDD","ALOC","LastCall","Link1","Link2","Link3","Link4","Link5","Link6","Link7","FirstCall","PSC","@bc","@fc","@ft","@fw","@hl","More/@f_hl"]);
// assign xml data
table.setXML(xmlString);
table.getLink = function(col, row){return this.getNode(col, row).getAttribute("f_hl");};
table.getTooltip = function(col, row){return this.getNode(col, row).getAttribute("f_ro");};
var obj = new AW.UI.Grid;
obj.setId("myGrid");
obj.setColumnCount(19);
obj.setRowCount(144);
obj.setCellModel(table);
obj.setHeaderText(["Destination","Call_Attempts","Call_Connects","Call_Errors","Minutes","ASR","ABR","PDD","ALOC","LastCall","Link1","Link2","Link3","Link4","Link5","Link6","Link7","FirstCall","PSC","@bc","@fc","@ft","@fw","@hl","More/@f_hl"]);
obj.defineRowProperty("background", function(r){return this.getCellText(19, r);});
obj.defineRowProperty("color", function(r){return this.getCellText(19+1, r);});
obj.defineRowProperty("font-family", function(r){return this.getCellText(19+2, r);});
obj.defineRowProperty("font-weight", function(r){return this.getCellText(19+3, r);});
obj.setFooterVisible(true);
obj.setSelectionMode("multi-cell");
obj.setVirtualMode(true);
obj.getSelectedText = function(){
var c, r, a, text = [];
var cols = this.getSelectedColumns();
var rows = this.getSelectedRows();
// build columns array for row selections
if (this.getCurrentSelection() == "row"){
cols = [];
var count = this.getColumnCount();
var indices = this.getColumnIndices();
for (c=0; c<count; c++){
cols[c] = indices ? indices[c] : c;
}
}
// push column headers
if ( cols.length > 1 || rows.length > 1 ){
a = [];
for (c=0; c<cols.length; c++){
a[c] = this.getHeaderText(cols[c]);
}
text.push(a.join("\t"));
}
// push cell text
for (r=0; r<rows.length; r++){
a = [];
for (c=0; c<cols.length; c++){
a[c] = this.getCellText(cols[c], rows[r]);
}
text.push(a.join("\t"));
}
return text.join("\r\n");
};
var myRow = new AW.Grid.Row;
myRow.setStyle("background", function(){return this.getRowProperty("background");});
myRow.setStyle("color", function(){return this.getRowProperty("color");});
myRow.setStyle("font-family", function(){return this.getRowProperty("font-family");});
myRow.setStyle("font-weight", function(){return this.getRowProperty("font-weight");});
obj.setRowTemplate(myRow);
var label = new AW.UI.Label;
label.setId("myLabel");
label.setControlText("Destination: ");
label.setStyle("color", "black");
label.setStyle("font-weight", "bold");
label.setStyle("background", "#ddd");
label.setStyle("text-align", "left");
label.setStyle("width", "100%");
var button1 = new AW.UI.Button;
button1.setId("button1");
button1.setControlText("Add…");
var str = new AW.Formats.String;
var num = new AW.Formats.Number;
var floatFormat = new AW.Formats.Number;
var cur = new AW.Formats.Number;
var rate = new AW.Formats.Number;
floatFormat.setTextFormat("#,###.###");
num.setTextFormat("#,###.");
cur.setTextFormat("#,###.##");
rate.setTextFormat("##.#####");
obj.setFooterText(function(c, r){
var format = this.getFooterFormat(c, r);
var data = this.getFooterData(c, r);
return format ? format.dataToText(data) : data;
});
// enable row selectors
obj.setSelectorVisible(true);
obj.setSelectorText(function(i){return this.getRowPosition(i)+1});
// set headers width/height
obj.setSelectorWidth(28);
obj.setHeaderHeight(20);
// set row selection
//####################################################new version
// set click action handler
obj.onCellClicked = function(event, col, row) { var url = this.getCellLink(col, row);
var txt = this.getCellText(col, row);
var wt = table.getNode(col, row).getAttribute("f_hlwt");
if (url)
{
if (wt)
{
window.open(url,wt,'status=0, toolbar=0, location=0, menubar=0, directories=0, resizable=0, scrollbars=0, height=30, width=600' );
}
else
{
window.location = url; //open in parent
//filterForm.submit(); // shiraz form submit
}
}
//if (url){window.open(url);} //open in _blank
// else {alert(txt);}
};
button1.onClick = function(){window.location = ""};
//set cell formats obj.setCellFormat([str, str, num, num, num]);
obj.setCellFormat([str,num,num,num,num,num,num,num,str,str,str,str,str,str,str,str,str,str,num]);
//set footer text
obj.setFooterText(["-","1,229,013","27,362","380,488","233,587","6","3","0","8:33","-","-","-","-","-","-","-","-","-","43"]);
// set display indices
obj.setColumnIndices([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]);
// write grid html to the page
// provide external model as a grid data source
obj.setCellModel(table);
document.write(label);
document.write(obj);
</script>
</body>
</html>
Shiraz
November 11,