source: Dev/trunk/src/client/dojox/grid/tests/test_grid_messages.html

Last change on this file was 483, checked in by hendrikvanantwerpen, 11 years ago

Added Dojo 1.9.3 release.

File size: 3.3 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<html>
3<head>
4        <title>Test Grid Messaging</title>
5        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
6        <style type="text/css">
7                @import "../../../dojo/resources/dojo.css";
8                @import "../resources/Grid.css";
9                @import "../resources/tundraGrid.css";
10                body {
11                        font-size: 0.9em;
12                        font-family: Geneva, Arial, Helvetica, sans-serif;
13                }
14                .heading {
15                        font-weight: bold;
16                        padding-bottom: 0.25em;
17                }
18                .grid {
19                        width: 65em;
20                        padding: 1px;
21                }
22        </style>
23        <script type="text/javascript" src="../../../dojo/dojo.js"
24                data-dojo-config="isDebug:false, parseOnLoad: true"></script>
25        <script type="text/javascript">
26                dojo.require("dijit.dijit"); // optimize: load dijit layer
27                dojo.require("dojox.grid.DataGrid");
28                dojo.require("dojo.data.ItemFileWriteStore");
29                dojo.require("dojo.parser");
30               
31                dojo.declare("dojox.grid.SlowFileWriteStore", dojo.data.ItemFileWriteStore, {
32                        _fetchItems: function(  /*Object*/ keywordArgs,
33                                                                        /*Function*/ findCallback,
34                                                                        /*Function*/ errorCallback){
35                                setTimeout(dojo.hitch(this, function(){
36                                        dojo.data.ItemFileWriteStore.prototype._fetchItems.call(this, keywordArgs, findCallback, errorCallback);
37                                }), 10000);
38                        }
39                });
40        </script>
41        <script type="text/javascript" src="support/test_data.js"></script>
42</head>
43<body class="tundra">
44        <span dojoType="dojo.data.ItemFileWriteStore"
45                data-dojo-id="jsonStore" url="../../../dijit/tests/_data/countries.json">
46        </span>
47        <span dojoType="dojox.grid.SlowFileWriteStore"
48                data-dojo-id="jsonStore1" url="../../../dijit/tests/_data/countries.json">
49        </span>
50        <span dojoType="dojo.data.ItemFileWriteStore"
51                data-dojo-id="jsonStore2" url="../../../dijit/tests/_data/countries-no.json">
52        </span>
53        <div class="heading">Grid Messaging Test - Standard</div>
54        <table dojoType="dojox.grid.DataGrid"
55                data-dojo-id="grid" id="grid" class="grid"
56                store="jsonStore" query="{ name: 'A*' }" rowsPerPage="20" rowSelector="20px">
57                <thead>
58                        <tr>
59                                <th field="name" width="300px">Country/Continent Name</th>
60                                <th field="type" width="auto">Type</th>
61                        </tr>
62                </thead>
63        </table><br>
64        <div class="heading">Grid Messaging Test - Loading</div>
65        <table dojoType="dojox.grid.DataGrid"
66                data-dojo-id="grid1" id="grid1" class="grid"
67                store="jsonStore1" query="{ name: 'A*' }" rowsPerPage="20" rowSelector="20px">
68                <thead>
69                        <tr>
70                                <th field="name" width="300px">Country/Continent Name</th>
71                                <th field="type" width="auto">Type</th>
72                        </tr>
73                </thead>
74        </table><br>
75        <div class="heading">Grid Messaging Test - Empty</div>
76        <table dojoType="dojox.grid.DataGrid"
77                data-dojo-id="grid2" id="grid2" class="grid"
78                store="jsonStore" query="{ name: 'nonexist' }" rowsPerPage="20" rowSelector="20px">
79                <thead>
80                        <tr>
81                                <th field="name" width="300px">Country/Continent Name</th>
82                                <th field="type" width="auto">Type</th>
83                        </tr>
84                </thead>
85        </table>
86        <div class="heading">Grid Messaging Test - Error</div>
87        <table dojoType="dojox.grid.DataGrid"
88                data-dojo-id="grid3" id="grid3" class="grid"
89                store="jsonStore2" query="{ name: '*' }" rowsPerPage="20" rowSelector="20px">
90                <thead>
91                        <tr>
92                                <th field="name" width="300px">Country/Continent Name</th>
93                                <th field="type" width="auto">Type</th>
94                        </tr>
95                </thead>
96        </table>
97</body>
98</html>
Note: See TracBrowser for help on using the repository browser.