Debian Codegraph @

dojox/grid/tests/robot/structures.js

raw symbols SCIP
1 (function(){
2 dojo.require("dojo.date.locale");
3 dojo.require("dojo.currency");
4 dojo.require("dijit.form.HorizontalSlider");
5 dojo.require("dijit.form.CurrencyTextBox");
6 dojo.require("dojox.grid.cells.dijit");
7 formatCurrency = function(inDatum){
8 return isNaN(inDatum) ? '...' : dojo.currency.format(inDatum, this.constraint);
9 }
10 formatDate = function(inDatum){
11 return dojo.date.locale.format(new Date(inDatum), this.constraint);
12 }
13 structure1 = [{
14 defaultCell: { width: 8, editable: true, type: dojox.grid.cells._Widget, styles: 'text-align: right;' },
15 rows: [
16 { name: 'Id', field: 'id', editable: false /* Can't edit ID's of dojo.data items */ },
17 { name: 'Date', field: 'col8', width: 10,
18 type: dojox.grid.cells.DateTextBox,
19 formatter: formatDate,
20 constraint: {formatLength: 'long', selector: "date"}},
21 { name: 'Priority', styles: 'text-align: center;', field: 'col1',
22 type: dojox.grid.cells.ComboBox,
23 options: ["normal", "note", "important"], width: 10},
24 { name: 'Mark', field: 'col2', width: 3, styles: 'text-align: center;',
25 type: dojox.grid.cells.CheckBox},
26 {
27 field: 'col3', name: 'Status',
28 styles: 'text-align: center;',
29 type: dojox.grid.cells.Select,
30 options: [ "new", "read", "replied" ]
31 },
32 { name: 'Message', field: 'col4', styles: '', width: 'auto',
33 type: dojox.grid.cells.Editor, editorToolbar: true },
34 { name: 'Amount', field: 'col5', formatter: formatCurrency, constraint: {currency: 'EUR'},
35 widgetClass: dijit.form.CurrencyTextBox },
36 { name: 'Amount', field: 'col6', formatter: formatCurrency, constraint: {currency: 'EUR'},
37 widgetClass: dijit.form.HorizontalSlider, width: 10}
38 ]
39 }];
40 })();