| 1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" |
| 2 |
"http://www.w3.org/TR/html4/strict.dtd"> |
| 3 |
<html> |
| 4 |
<head> |
| 5 |
<title>TabContainer Demo</title> |
| 6 |
|
| 7 |
|
| 8 |
<link id="themeStyles" rel="stylesheet" href="../../../../dijit/themes/tundra/tundra.css"> |
| 9 |
|
| 10 |
<style type="text/css"> |
| 11 |
@import "../../../../dojo/resources/dojo.css"; |
| 12 |
@import "../../../../dijit/tests/css/dijitTests.css"; |
| 13 |
|
| 14 |
@import "../../resources/Grid.css"; |
| 15 |
@import "../../resources/tundraGrid.css"; |
| 16 |
</style> |
| 17 |
|
| 18 |
|
| 19 |
<script type="text/javascript" src="../../../../dojo/dojo.js" |
| 20 |
data-dojo-config="isDebug: true, parseOnLoad: true"></script> |
| 21 |
|
| 22 |
|
| 23 |
<script type="text/javascript" src="../../../../dijit/tests/_testCommon.js"></script> |
| 24 |
|
| 25 |
<script type="text/javascript"> |
| 26 |
dojo.require("dijit.dijit"); // optimize: load dijit layer |
| 27 |
dojo.require("dijit.layout.ContentPane"); |
| 28 |
dojo.require("dijit.layout.TabContainer"); |
| 29 |
dojo.require("dijit.layout.SplitContainer"); |
| 30 |
dojo.require("dijit.Tooltip"); |
| 31 |
dojo.require("dijit.Menu"); |
| 32 |
dojo.require("dijit.layout.LinkPane"); |
| 33 |
dojo.require("dijit.form.Button"); |
| 34 |
dojo.require("dojox.grid.DataGrid"); |
| 35 |
dojo.require("dojo.data.ItemFileWriteStore"); |
| 36 |
dojo.require("dojo.dnd.Source"); |
| 37 |
dojo.require("dojo.parser"); // scan page for widgets and instantiate them |
| 38 |
formatCurrency = function(inDatum){ |
| 39 |
return isNaN(inDatum) ? '...' : dojo.currency.format(inDatum, this.constraint); |
| 40 |
} |
| 41 |
formatDate = function(inDatum){ |
| 42 |
return dojo.date.locale.format(new Date(inDatum), this.constraint); |
| 43 |
} |
| 44 |
</script> |
| 45 |
<script type="text/javascript" src="structures.js"></script> |
| 46 |
<script type="text/javascript" src="stores.js"></script> |
| 47 |
</head> |
| 48 |
<body class="tundra"> |
| 49 |
|
| 50 |
<h1 dojoType="dojo.dnd.Target" class="testTitle">dojox.grid.DataGrid tests</h1> |
| 51 |
<input id="initialfocus"></input> |
| 52 |
<div dojoType="dijit.Menu" data-dojo-id="gridMenu" id="gridMenu" style="display: none;"> |
| 53 |
<div dojoType="dijit.MenuItem" >Item One</div> |
| 54 |
<div dojoType="dijit.MenuItem" >Item Two</div> |
| 55 |
<div dojoType="dijit.MenuItem" >Item Three</div> |
| 56 |
</div> |
| 57 |
<div id="mainTabContainer" dojoType="dijit.layout.TabContainer" tabStrip="true" style="width: 100%; height: 20em;"> |
| 58 |
|
| 59 |
<div dojoType="dijit.layout.ContentPane" title="Markup 1"> |
| 60 |
<h1>Editable DataGrid, markup, pane shown on init, context menu on header</h1> |
| 61 |
<div id="markup_grid_1" dojoType="dojox.grid.DataGrid" columnReordering="true" store="structure1_store1" query="{ id: '*' }" structure="structure1" rowSelector="20px" headerMenu="gridMenu" style="width: 100%;height:19em;"></div> |
| 62 |
</div> |
| 63 |
|
| 64 |
<div dojoType="dijit.layout.ContentPane" title="Markup 2"> |
| 65 |
<h1>Editable DataGrid, markup, pane hidden on init. This grid should be identical to the first tab.</h1> |
| 66 |
<div id="markup_grid_2" dojoType="dojox.grid.DataGrid" columnReordering="true" store="structure1_store2" query="{ id: '*' }" structure="structure1" rowSelector="20px" headerMenu="gridMenu" style="width: 100%;height:19em;"></div> |
| 67 |
</div> |
| 68 |
|
| 69 |
<div dojoType="dijit.layout.ContentPane" title="Markup 3"> |
| 70 |
<h1>Some filler text</h1> |
| 71 |
<h1>More filler text</h1> |
| 72 |
<h1>Even more filler text</h1> |
| 73 |
<h1>Editable DataGrid, markup, pane hidden on init. This grid should be identical to the first tab.</h1> |
| 74 |
<div id="markup_grid_3" dojoType="dojox.grid.DataGrid" columnReordering="true" store="structure1_store3" query="{ id: '*' }" structure="structure1" rowSelector="20px" headerMenu="gridMenu" style="width: 100%;height:19em;"></div> |
| 75 |
</div> |
| 76 |
<div dojoType="dijit.layout.ContentPane" title="Markup structure"><table id="markup_grid_markup_structure" dojoType="dojox.grid.DataGrid" columnReordering="true" store="structure1_store4" query="{ id: '*' }" rowSelector="20px" headerMenu="gridMenu" style="width: 100%;"> |
| 77 |
<h1>Editable DataGrid, markup structure, pane hidden on init. This grid should be identical to the first tab.</h1> |
| 78 |
<thead> |
| 79 |
<tr> |
| 80 |
<th field="id" width="8em" styles='text-align: right;'>Id</th> |
| 81 |
<th cellType="dojox.grid.cells.DateTextBox" field="col8" formatter="formatDate" constraint="{formatLength: 'long', selector: 'date'}" editable="true" width="10em" styles='text-align: right;'>Date</th> |
| 82 |
<th cellType="dojox.grid.cells.ComboBox" field="col1" options="normal,note,important" editable="true" width="10em" styles='text-align: center;'>Priority</th> |
| 83 |
<th cellType="dojox.grid.cells.CheckBox" field="col2" editable="true" width="3em" styles='text-align: center;'>Mark</th> |
| 84 |
<th cellType="dojox.grid.cells.Select" field="col3" options="new,read,replied" editable="true" width="8em" styles='text-align: center;'>Status</th> |
| 85 |
<th cellType="dojox.grid.cells.Editor" field="col4" editorToolbar="true" editable="true" width="auto" styles=''>Message</th> |
| 86 |
<th cellType="dojox.grid.cells._Widget" widgetClass="dijit.form.CurrencyTextBox" field="col5" formatter="formatCurrency" constraint="{currency:'EUR'}" editable="true" width="8em" styles='text-align: right;'>Amount</th> |
| 87 |
<th cellType="dojox.grid.cells._Widget" widgetClass="dijit.form.HorizontalSlider" field="col6" formatter="formatCurrency" constraint="{currency:'EUR'}" editable="true" width="10em" styles='text-align: right;'>Amount</th> |
| 88 |
</tr> |
| 89 |
</thead> |
| 90 |
</table> |
| 91 |
</div> |
| 92 |
</div> |
| 93 |
<h1>Space for creating grids (grid should appear as part of the robot test)</h1> |
| 94 |
<div id="prog_grid_1" rowSelector="20px" style="width: 100%;height:100px;"></div> |
| 95 |
</body> |
| 96 |
</html> |