JavaScript
require({
packages: [{
name: "dgrid",
location: "http://dojofoundation.org/packages/dgrid/js/dgrid"
}, {
name: "put-selector",
location: "http://dojofoundation.org/packages/dgrid/js/put-selector"
}, {
name: "xstyle",
location: "http://dojofoundation.org/packages/dgrid/js/xstyle"
}]
});
require([
"dojo/on",
"dojo/_base/declare",
"dojo/store/Memory",
"dijit/form/Form",
"dijit/form/TextBox",
"dijit/layout/ContentPane",
"dijit/layout/TabContainer",
"dgrid/Keyboard",
"dgrid/OnDemandGrid",
"dgrid/ColumnSet",
"dgrid/extensions/DijitRegistry",
"dojo/domReady!"], function (on, declare, Memory, Form, TextBox, ContentPane, TabContainer, Keyboard, OnDemandGrid, ColumnSet, DijitRegistry) {
var tabPane = new TabContainer({
region: 'center'
}, 'mainPane'),
search = new ContentPane({
id: 'searchTab',
title: 'Search',
closable: false,
content: '<div id="grid"></div>'
}),
c = 0,
colors, columns, content, grid, listener;
tabPane.startup();
tabPane.addChild(search);
colors = new Memory({
data: [{
id: '#FE2712',
color: 'Red',
pos: 'Primary',
R: 254,
G: 39,
B: 18
}, {
id: '#FF110B',
color: 'Scarlet',
pos: 'Quaternary',
R: 255,
G: 17,
B: 11
}, {
id: '#FF5B31',
color: 'Vermilion',
pos: 'Tertiary',
R: 255,
G: 91,
B: 49
}, {
id: '#FFA040',
color: 'Orange',
pos: 'Secondary',
R: 255,
G: 160,
B: 64
}, {
id: '#FFD631',
color: 'Amber',
pos: 'Tertiary',
R: 255,
G: 214,
B: 49
}, {
...