﻿<?xml-stylesheet type="text/xsl" href="../../src/ricoSimpleGrid.xsl"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>SimpleGrid Demo</title>

<script src="../../src/rico.js" type="text/javascript"></script>
<link href="../client/css/demo.css" type="text/css" rel="stylesheet" />
<link href="../../src/css/greenHdg.css" type="text/css" rel="stylesheet" />

<script type="text/javascript">
//<![CDATA[

function ricoInit() {
  try {
  Rico.loadModule('SimpleGrid');
  Rico.onLoad(ricoInit2);
  } catch(e) { alert(e.message); }
}

var grid1,grid2,grid3,grid4
function ricoInit2() {
  try {
  //alert('ricoInit2');
  grid1=new Rico.SimpleGrid ('test1',{maxHt:180});
  grid2=new Rico.SimpleGrid ('test2',{maxHt:180});
  grid3=new Rico.SimpleGrid ('test3',{maxHt:120});
  grid4=new Rico.SimpleGrid ('test4',{maxHt:120});
  } catch(e) { alert(e.message); }
}

function excel1() {
  alert('This function has been disabled while I wait for my host provider to enable the PHP XSLT extension');
  if (window.location.hostname.match(/dowdybrown.com/i)) return;
  var src='php';  // or 'asp'
  var xlscript='../'+src+'/excel.'+src;
  var axslpath=window.location.pathname.split('/');
  var l=axslpath.length-1;
  axslpath[l]='ricoSimpleGrid';
  axslpath[l-1]='xsl';
  window.open(xlscript+'?xsl='+escape(axslpath.join('/'))+'&xml='+escape(window.location.pathname)+'&name='+document.title.replace(/\W/g,'_'));
}

function excel2() {
  grid1.printVisible('plain');
}

function excel3() {
  if (Rico.isIE)
    grid1.printVisible('owc');
  else
    alert('OWC is only supported by Internet Explorer');
}

//]]>
</script>

<style type="text/css">
table#container td {
  vertical-align:top;
  width:50%;
  background-color:#F4F4F4;
}
table#container {
  width:98%;
  background-color:#CCC;
}
</style>

</head>

<body>

<h2>Rico SimpleGrid Demo</h2>

<button onclick='excel1()'>Export to Excel using XSLT</button>
<button onclick='excel2()'>Export to web page</button>
<button onclick='excel3()'>Export to OWC Spreadsheet</button>

<table id='container' border='2' cellspacing='7' cellpadding='0'>
<tr>
<td>

<table id='test1' class='ricoSimpleGrid' cellspacing='0' cellpadding='0'>
<thead>
<tr>
<td colspan='2' class='ricoFrozen'>Table with thead/tbody</td>
<td colspan='3'>Main row marked with ricoHeading class</td>
</tr>
<tr>
<td colspan='2' class='ricoFrozen'>Test of a really, really long heading</td>
<td colspan='3'>Test</td>
</tr>
<tr class='ricoHeading'>
<td class='ricoFrozen'>Heading 1</td>
<td class='ricoFrozen'>Heading 2</td>
<td>Heading 3</td>
<td>Heading 4</td>
<td>Heading 5</td>
</tr>
<tr>
<td colspan='2' class='ricoFrozen'>Test of a really, really long heading</td>
<td colspan='3'>Test</td>
</tr>
</thead>
<tbody>
<tr>
<td>Test row 1</td>
<td>Test column 2</td>
<td>This is some really, really long content</td>
<td>Test column 4</td>
<td>Test column 5</td>
</tr>
<tr>
<td>Test row 2</td>
<td>Test column 2</td>
<td>This is some really, really long content</td>
<td>Test column 4</td>
<td>Test column 5</td>
</tr>
<tr>
<td>Test row 3</td>
<td>Test column 2</td>
<td>This is some really, really long content</td>
<td>Test column 4</td>
<td>Test column 5</td>
</tr>
<tr>
<td>Test row 4 - Test row 4</td>
<td>Test column 2</td>
<td>This is some really, really long content</td>
<td>Test column 4</td>
<td>Test column 5</td>
</tr>
<tr>
<td>Test row 5</td>
<td>Test column 2</td>
<td>This is some really, really long content</td>
<td>Test column 4</td>
<td>Test column 5</td>
</tr>
<tr>
<td>Test row 6</td>
<td>Test column 2</td>
<td>This is some really, really long content</td>
<td>Test column 4</td>
<td>Test column 5</td>
</tr>
<tr>
<td>Test row 7</td>
<td>Test column 2</td>
<td>This is some really, really long content</td>
<td>Test column 4</td>
<td>Test column 5</td>
</tr>
</tbody>
</table>

</td>
<td>

<table id='test2' class='ricoSimpleGrid' cellspacing='0' cellpadding='0'>
<thead>
<tr>
<td colspan='2' class='ricoFrozen'>Table with thead/tbody</td>
<td colspan='3'>No row with ricoHeading class</td>
</tr>
<tr>
<td colspan='2' class='ricoFrozen'>Test of a really, really long heading</td>
<td colspan='3'>Test 2</td>
</tr>
<tr>
<td class='ricoFrozen'>Heading 1</td>
<td class='ricoFrozen'>Heading 2</td>
<td>Heading 3</td>
<td>Heading 4</td>
<td>Heading 5</td>
</tr>
</thead>
<tbody>
<tr>
<td>Test row 1</td>
<td>Test column 2</td>
<td>This is some really, really long content</td>
<td>Test column 4</td>
<td>Test column 5</td>
</tr>
<tr>
<td>Test row 2</td>
<td>Test column 2</td>
<td>This is some really, really long content</td>
<td>Test column 4</td>
<td>Test column 5</td>
</tr>
<tr>
<td>Test row 3</td>
<td>Test column 2</td>
<td>This is some really, really long content</td>
<td>Test column 4</td>
<td>Test column 5</td>
</tr>
<tr>
<td>Test row 4 - Test row 4</td>
<td>Test column 2</td>
<td>This is some really, really long content</td>
<td>Test column 4</td>
<td>Test column 5</td>
</tr>
<tr>
<td>Test row 5</td>
<td>Test column 2</td>
<td>This is some really, really long content</td>
<td>Test column 4</td>
<td>Test column 5</td>
</tr>
<tr>
<td>Test row 6</td>
<td>Test column 2</td>
<td>This is some really, really long content</td>
<td>Test column 4</td>
<td>Test column 5</td>
</tr>
<tr>
<td>Test row 7</td>
<td>Test column 2</td>
<td>This is some really, really long content</td>
<td>Test column 4</td>
<td>Test column 5</td>
</tr>
</tbody>
</table>

</td>
</tr>
<tr>
<td>

<table id='test3' class='ricoSimpleGrid' cellspacing='0' cellpadding='0'>
<tbody>
<tr>
<td class='ricoFrozen'>tbody</td>
<td>no thead</td>
<td>Heading 3</td>
<td>Heading 4</td>
<td>Heading 5</td>
</tr>
<tr>
<td>Test row 1</td>
<td>Test column 2</td>
<td>This is some really, really long content</td>
<td>Test column 4</td>
<td>Test column 5</td>
</tr>
<tr>
<td>Test row 2</td>
<td>Test column 2</td>
<td>This is some really, really long content</td>
<td>Test column 4</td>
<td>Test column 5</td>
</tr>
<tr>
<td>Test row 3</td>
<td>Test column 2</td>
<td>This is some really, really long content</td>
<td>Test column 4</td>
<td>Test column 5</td>
</tr>
<tr>
<td>Test row 4 - Test row 4</td>
<td>Test column 2</td>
<td>This is some really, really long content</td>
<td>Test column 4</td>
<td>Test column 5</td>
</tr>
<tr>
<td>Test row 5</td>
<td>Test column 2</td>
<td>This is some really, really long content</td>
<td>Test column 4</td>
<td>Test column 5</td>
</tr>
</tbody>
</table>

</td>
<td>

<table id='test4' class='ricoSimpleGrid' cellspacing='0' cellpadding='0'>
<tr>
<td class='ricoFrozen'>no thead</td>
<td class='ricoFrozen'>no tbody</td>
<td>Heading 3</td>
<td>Heading 4</td>
<td>Heading 5</td>
</tr>
<tr>
<td>Test row 1</td>
<td>Test column 2</td>
<td>This is some really, really long content</td>
<td>Test column 4</td>
<td>Test column 5</td>
</tr>
<tr>
<td>Test row 2</td>
<td>Test column 2</td>
<td>This is some really, really long content</td>
<td>Test column 4</td>
<td>Test column 5</td>
</tr>
<tr>
<td>Test row 3</td>
<td>Test column 2</td>
<td>This is some really, really long content</td>
<td>Test column 4</td>
<td>Test column 5</td>
</tr>
<tr>
<td>Test row 4 - Test row 4</td>
<td>Test column 2</td>
<td>This is some really, really long content</td>
<td>Test column 4</td>
<td>Test column 5</td>
</tr>
<tr>
<td>Test row 5</td>
<td>Test column 2</td>
<td>This is some really, really long content</td>
<td>Test column 4</td>
<td>Test column 5</td>
</tr>
<tr>
<td>Test row 6</td>
<td>Test column 2</td>
<td>This is some really, really long content</td>
<td>Test column 4</td>
<td>Test column 5</td>
</tr>
</table>

</td>
</tr>
</table>

</body>
</html>
