Updated
This commit is contained in:
99
master/examples/test_grid_messages_autoheight.html
Normal file
99
master/examples/test_grid_messages_autoheight.html
Normal file
@@ -0,0 +1,99 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Test Grid Messaging - autoHeight</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
|
||||
<style type="text/css">
|
||||
@import "../../../dojo/resources/dojo.css";
|
||||
@import "../resources/Grid.css";
|
||||
@import "../resources/tundraGrid.css";
|
||||
body {
|
||||
font-size: 0.9em;
|
||||
font-family: Geneva, Arial, Helvetica, sans-serif;
|
||||
}
|
||||
.heading {
|
||||
font-weight: bold;
|
||||
padding-bottom: 0.25em;
|
||||
}
|
||||
.grid {
|
||||
width: 65em;
|
||||
padding: 1px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript" src="../../../dojo/dojo.js"
|
||||
djConfig="isDebug:false, parseOnLoad: true"></script>
|
||||
<script type="text/javascript">
|
||||
dojo.require("dijit.dijit"); // optimize: load dijit layer
|
||||
dojo.require("dojox.grid.DataGrid");
|
||||
dojo.require("dojo.data.ItemFileWriteStore");
|
||||
dojo.require("dojo.parser");
|
||||
|
||||
dojo.declare("dojox.grid.SlowFileWriteStore", dojo.data.ItemFileWriteStore, {
|
||||
_fetchItems: function( /*Object*/ keywordArgs,
|
||||
/*Function*/ findCallback,
|
||||
/*Function*/ errorCallback){
|
||||
setTimeout(dojo.hitch(this, function(){
|
||||
dojo.data.ItemFileWriteStore.prototype._fetchItems.call(this, keywordArgs, findCallback, errorCallback);
|
||||
}), 10000);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" src="support/test_data.js"></script>
|
||||
</head>
|
||||
<body class="tundra">
|
||||
<span dojoType="dojo.data.ItemFileWriteStore"
|
||||
jsId="jsonStore" url="../../../dijit/tests/_data/countries.json">
|
||||
</span>
|
||||
<span dojoType="dojox.grid.SlowFileWriteStore"
|
||||
jsId="jsonStore1" url="../../../dijit/tests/_data/countries.json">
|
||||
</span>
|
||||
<span dojoType="dojo.data.ItemFileWriteStore"
|
||||
jsId="jsonStore2" url="../../../dijit/tests/_data/countries-no.json">
|
||||
</span>
|
||||
<div class="heading">Grid Messaging Test - Standard</div>
|
||||
<table dojoType="dojox.grid.DataGrid"
|
||||
jsid="grid" id="grid" class="grid" autoHeight="true"
|
||||
store="jsonStore" query="{ name: 'A*' }" rowsPerPage="20" rowSelector="20px">
|
||||
<thead>
|
||||
<tr>
|
||||
<th field="name" width="300px">Country/Continent Name</th>
|
||||
<th field="type" width="auto">Type</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table><br>
|
||||
<div class="heading">Grid Messaging Test - Loading</div>
|
||||
<table dojoType="dojox.grid.DataGrid"
|
||||
jsid="grid1" id="grid1" class="grid" autoHeight="true"
|
||||
store="jsonStore1" query="{ name: 'A*' }" rowsPerPage="20" rowSelector="20px">
|
||||
<thead>
|
||||
<tr>
|
||||
<th field="name" width="300px">Country/Continent Name</th>
|
||||
<th field="type" width="auto">Type</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table><br>
|
||||
<div class="heading">Grid Messaging Test - Empty</div>
|
||||
<table dojoType="dojox.grid.DataGrid"
|
||||
jsid="grid2" id="grid2" class="grid" autoHeight="true"
|
||||
store="jsonStore" query="{ name: 'nonexist' }" rowsPerPage="20" rowSelector="20px">
|
||||
<thead>
|
||||
<tr>
|
||||
<th field="name" width="300px">Country/Continent Name</th>
|
||||
<th field="type" width="auto">Type</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<div class="heading">Grid Messaging Test - Error</div>
|
||||
<table dojoType="dojox.grid.DataGrid"
|
||||
jsid="grid3" id="grid3" class="grid" autoHeight="true"
|
||||
store="jsonStore2" query="{ name: '*' }" rowsPerPage="20" rowSelector="20px">
|
||||
<thead>
|
||||
<tr>
|
||||
<th field="name" width="300px">Country/Continent Name</th>
|
||||
<th field="type" width="auto">Type</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user