update cities example
This commit is contained in:
parent
773311d8d7
commit
f364b2b1e0
1 changed files with 16 additions and 20 deletions
|
@ -164,22 +164,6 @@ Ox.load({UI: {showScreen: true}, Geo: {}}, function() {
|
|||
First of all, we define the columns.
|
||||
*/
|
||||
columns: [
|
||||
{
|
||||
/*
|
||||
We don't want to display the id, so we omit the
|
||||
`visible` attribute, which defaults to `false`. We
|
||||
still have to include the id in the list of columns,
|
||||
since it's the unique key of our table. In
|
||||
consequence, whenever the list fires a `select`
|
||||
event, it will reference this value as the item's
|
||||
id.
|
||||
*/
|
||||
id: 'id',
|
||||
operator: '+',
|
||||
title: 'ID',
|
||||
unique: true,
|
||||
width: 80
|
||||
},
|
||||
{
|
||||
/*
|
||||
We use the `format` function to display the region
|
||||
|
@ -329,6 +313,11 @@ Ox.load({UI: {showScreen: true}, Geo: {}}, function() {
|
|||
visible: true,
|
||||
width: 80
|
||||
},
|
||||
/*
|
||||
The elevation data is not very accurate, so we omit the
|
||||
`visible` attribute, which defaults to `false`. Still,
|
||||
the user can make the column visible.
|
||||
*/
|
||||
{
|
||||
align: 'right',
|
||||
format: function(value) {
|
||||
|
@ -341,15 +330,16 @@ Ox.load({UI: {showScreen: true}, Geo: {}}, function() {
|
|||
}
|
||||
],
|
||||
/*
|
||||
This allows the user to move the columns around
|
||||
This allows the user to move the columns around.
|
||||
*/
|
||||
columnsMovable: true,
|
||||
/*
|
||||
This enables the UI to show or hide specific columns
|
||||
This adds a menu that can be used to show or hide specific
|
||||
columns.
|
||||
*/
|
||||
columnsRemovable: true,
|
||||
/*
|
||||
This makes sure the column titles get displayed
|
||||
This makes sure the column titles get displayed.
|
||||
*/
|
||||
columnsVisible: true,
|
||||
/*
|
||||
|
@ -378,7 +368,13 @@ Ox.load({UI: {showScreen: true}, Geo: {}}, function() {
|
|||
In this case, the `init` event will have a `population`
|
||||
property that is the sum of the population of all items.
|
||||
*/
|
||||
sums: ['population']
|
||||
sums: ['population'],
|
||||
/*
|
||||
The 'id' property is the unique key of our table. In
|
||||
consequence, whenever the list fires a `select` event, it
|
||||
will reference this value as the item's unique id.
|
||||
*/
|
||||
unique: 'id'
|
||||
})
|
||||
.bindEvent({
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue