Page Menu
Home
Code
Search
Configure Global Search
Log In
Files
F886151
test_keyboard.html
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Subscribers
None
test_keyboard.html
View Options
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<
html
>
<
head
>
<
title
>
Test dojox.Grid Basic
</
title
>
<
meta
http-equiv
=
"Content-Type"
content
=
"text/html; charset=utf-8"
></
meta
>
<
style
type
=
"text/css"
>
@
import
"../_grid/Grid.css"
;
body
{
font-size
:
0.9
em
;
font-family
:
Geneva
,
Arial
,
Helvetica
,
sans-serif
;
}
.
heading
{
font-weight
:
bold
;
padding-bottom
:
0.25
em
;
}
#
grid
{
border
:
1
px
solid
#333
;
width
:
35
em
;
height
:
30
em
;
}
</
style
>
<
script
type
=
"text/javascript"
src
=
"../../../dojo/dojo.js"
djConfig
=
"isDebug:true, parseOnLoad: true"
></
script
>
<!--<script type="text/javascript">
dojo.require("dojox.grid.Grid");
dojo.require("dojox.grid._data.model");
dojo.require("dojo.parser");
</script>-->
<!-- Debugging -->
<
script
type
=
"text/javascript"
src
=
"../_grid/lib.js"
></
script
>
<
script
type
=
"text/javascript"
src
=
"../_grid/drag.js"
></
script
>
<
script
type
=
"text/javascript"
src
=
"../_grid/scroller.js"
></
script
>
<
script
type
=
"text/javascript"
src
=
"../_grid/builder.js"
></
script
>
<
script
type
=
"text/javascript"
src
=
"../_grid/cell.js"
></
script
>
<
script
type
=
"text/javascript"
src
=
"../_grid/layout.js"
></
script
>
<
script
type
=
"text/javascript"
src
=
"../_grid/rows.js"
></
script
>
<
script
type
=
"text/javascript"
src
=
"../_grid/focus.js"
></
script
>
<
script
type
=
"text/javascript"
src
=
"../_grid/selection.js"
></
script
>
<
script
type
=
"text/javascript"
src
=
"../_grid/edit.js"
></
script
>
<
script
type
=
"text/javascript"
src
=
"../_grid/view.js"
></
script
>
<
script
type
=
"text/javascript"
src
=
"../_grid/views.js"
></
script
>
<
script
type
=
"text/javascript"
src
=
"../_grid/rowbar.js"
></
script
>
<
script
type
=
"text/javascript"
src
=
"../_grid/publicEvents.js"
></
script
>
<
script
type
=
"text/javascript"
src
=
"../VirtualGrid.js"
></
script
>
<
script
type
=
"text/javascript"
src
=
"../_data/fields.js"
></
script
>
<
script
type
=
"text/javascript"
src
=
"../_data/model.js"
></
script
>
<
script
type
=
"text/javascript"
src
=
"../_data/editors.js"
></
script
>
<
script
type
=
"text/javascript"
src
=
"../Grid.js"
></
script
>
<
script
type
=
"text/javascript"
src
=
"support/test_data.js"
></
script
>
<
script
type
=
"text/javascript"
>
// a grid view is a group of columns
var
view1
=
{
cells
:
[[
{
name
:
'Column 0'
},
{
name
:
'Column 1'
},
{
name
:
'Column 2'
},
{
name
:
'Column 3'
,
width
:
"150px"
},
{
name
:
'Column 4'
},
{
name
:
'Column 5'
},
{
name
:
'Column 6'
},
{
name
:
'Column 7'
,
field
:
0
},
{
name
:
'Column 8'
},
{
name
:
'Column 9'
},
{
name
:
'Column 10'
},
{
name
:
'Column 11'
,
field
:
0
},
{
name
:
'Column 12'
,
width
:
"150px"
},
{
name
:
'Column 13'
},
{
name
:
'Column 14'
},
{
name
:
'Column 15'
},
{
name
:
'Column 16'
,
field
:
0
},
{
name
:
'Column 17'
}
]]
};
// a grid layout is an array of views.
var
layout
=
[
view1
];
function
keyDown
(
e
)
{
switch
(
e
.
keyCode
){
case
dojo
.
keys
.
LEFT_ARROW
:
console
.
log
(
'left arrow!'
);
break
;
case
dojo
.
keys
.
RIGHT_ARROW
:
console
.
log
(
'right arrow!'
);
break
;
case
dojo
.
keys
.
ENTER
:
console
.
log
(
'enter!'
);
break
;
}
}
dojo
.
addOnLoad
(
function
()
{
window
[
"grid"
]
=
dijit
.
byId
(
"grid"
);
dojo
.
connect
(
grid
,
"onKeyDown"
,
keyDown
);
});
</
script
>
</
head
>
<
body
>
<
div
class
=
"heading"
>
dojox.Grid Basic Test
</
div
>
<
div
id
=
"grid"
dojoType
=
"dojox.Grid"
model
=
"model"
structure
=
"layout"
></
div
>
</
body
>
</
html
>
File Metadata
Details
Attached
Mime Type
text/html
Expires
Sun, Apr 6, 22:55 (2 w, 2 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26779
Default Alt Text
test_keyboard.html (3 KB)
Attached To
rZEDHG ZedLegacy
Event Timeline
Log In to Comment