Ticket #5753: 5753.html

File 5753.html, 2.3 kB (added by benschell, 11 months ago)

Test file exhibits correct behavior.

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 Bug #5753</title>
5        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
6<style>
7        @import "dojox/grid/_grid/Grid.css";
8        body {
9                font-family: Tahoma, Arial, Helvetica, sans-serif;
10                font-size: 11px;
11        }
12        .dojoxGrid-row-editing td {
13                background-color: #F4FFF4;
14        }
15        .dojoxGrid input, .dojoxGrid select, .dojoxGrid textarea {
16                margin: 0;
17                padding: 0;
18                border-style: none;
19                width: 100%;
20                font-size: 100%;
21                font-family: inherit;
22        }
23        .dojoxGrid input {
24        }
25        .dojoxGrid select {
26        }
27        .dojoxGrid textarea {
28        }
29        #controls {
30                padding: 6px 0;
31        }
32        #grid {
33                width: 850px;
34                height: 350px;
35                border: 1px solid silver;
36        }
37</style>
38        <script type="text/javascript" src="dojo/dojo.js" 
39                djConfig="isDebug: true, debugAtAllCosts: false, parseOnLoad: true"></script>
40        <script type="text/javascript">
41                dojo.require("dojox.grid.Grid");
42                dojo.require("dojox.grid._data.model");
43                dojo.require("dojo.data.ItemFileWriteStore");
44                dojo.require("dojo.parser");
45        </script>
46
47        <script type="text/javascript">
48                function getRow(inRowIndex){
49                        return ' ' + inRowIndex;
50                }
51               
52                var layoutCountries = [
53                        // view 0
54                        { type: 'dojox.GridRowView', width: '20px' },
55                        // view 1
56                        { cells: [[{ name: "Row", get: getRow, width: 5}]], noscroll: true},
57                        // view 2
58                        { cells: [[
59                                { field: 0, width: 'auto' },
60                                { width: 8 }
61                        ]]}
62                ];
63               
64                reExecuteQuery = function() {
65                        dataModel.query = {name: dojo.byId("queryValue").value};
66                        dataModel.refresh();
67                }
68        </script>
69</head>
70<body class="tundra">
71<h2>
72        Bug #5753
73</h2>
74<p>Try something like A* or U*</p>
75<div id="controls">
76        <label for="queryValue">Name: </label>
77        <input id="queryValue" name="queryValue" type="text" size="2" maxlength="2" value="1" />
78        <button onclick="reExecuteQuery()">Re-Execute Query</button>
79</div>
80<span dojoType="dojo.data.ItemFileWriteStore" 
81         jsId="jsonStore" url="dijit/tests/_data/countries.json">
82</span>
83<div id="dataModel" jsId="dataModel" dojoType="dojox.grid.data.DojoData" rowsPerPage="20"
84        store="jsonStore" query="{name: '*'}">
85</div>
86<div id="grid" jsId="grid2" dojoType="dojox.Grid" elasticView="2" 
87         model="dataModel" structure="layoutCountries">
88</div>
89</body>
90</html>