Skip to content

Commit e2bbc56

Browse files
committed
Grid: Add custom spreadsheet demo
1 parent ca903ef commit e2bbc56

File tree

1 file changed

+84
-0
lines changed

1 file changed

+84
-0
lines changed

grid-editing/spreadsheet.html

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Grid: Editing, Inline Grid</title>
6+
<link rel="stylesheet" href="../themes/base/jquery.ui.all.css">
7+
<link rel="stylesheet" href="../grid-spf/grid.css">
8+
<script src="../jquery-1.6.2.js"></script>
9+
<script src="../external/globalize.js"></script>
10+
<script src="../external/jquery.tmpl.js"></script>
11+
<script src="../external/jquery.mousewheel-3.0.4.js"></script>
12+
<script src="../ui/jquery.ui.core.js"></script>
13+
<script src="../ui/jquery.ui.widget.js"></script>
14+
<script src="../ui/jquery.ui.button.js"></script>
15+
<script src="../ui/jquery.ui.spinner.js"></script>
16+
<script src="../ui/jquery.ui.position.js"></script>
17+
<script src="../ui/jquery.ui.tooltip.js"></script>
18+
<script src="../ui/jquery.ui.autocomplete.js"></script>
19+
<script src="../ui/jquery.ui.menu.js"></script>
20+
<script src="../grid-spf/dataview.js"></script>
21+
<script src="../grid-spf/dataview-local.js"></script>
22+
<script src="../grid-spf/grid.js"></script>
23+
<script src="../grid-spf/pager.js"></script>
24+
<script src="observable.js"></script>
25+
<script src="editor.js"></script>
26+
<script src="grid-editor.js"></script>
27+
<script src="editor-countrycomplete.js"></script>
28+
<script src="editor-randomspinner.js"></script>
29+
<script src="navigator.js"></script>
30+
<script src="localstore.js"></script>
31+
<script src="helpers.js"></script>
32+
<script>
33+
if ( !window.console ) {
34+
window.console = {
35+
log: function() {
36+
var message = Array.prototype.slice.call( arguments, 1 ).join( ", " );
37+
$("<div>").text( message ).appendTo("body");
38+
}
39+
}
40+
}
41+
42+
$(function() {
43+
var columns = [],
44+
i, j;
45+
for (i = 65; i <= 90; i++) {
46+
columns.push(String.fromCharCode(i));
47+
}
48+
var source = [];
49+
for (j = 0; j < 50; j++) {
50+
source.push({});
51+
}
52+
53+
$( "#spreadsheet" ).grid({
54+
columns: columns,
55+
source: source
56+
})
57+
.gridEditor()
58+
.navigator()
59+
.grid("refresh");
60+
});
61+
</script>
62+
<style>
63+
.navigator-active { background: rgba(0,0,255,0.2); }
64+
#spreadsheet {
65+
width: 100%;
66+
}
67+
thead td { text-align: center; }
68+
</style>
69+
</head>
70+
<body>
71+
72+
<h1>Grid based custom spreadsheet (experimental)</h1>
73+
74+
<table id="spreadsheet">
75+
<thead>
76+
<tr>
77+
</tr>
78+
</thead>
79+
<tbody>
80+
</tbody>
81+
</table>
82+
83+
</body>
84+
</html>

0 commit comments

Comments
 (0)