support formatting of values in lists

This commit is contained in:
rolux 2011-01-05 14:53:38 +00:00
parent a93d12ee9a
commit e0ad1f9e24
2 changed files with 8 additions and 4 deletions

View file

@ -88,13 +88,12 @@
{"id": "numberofkeywords", "title": "Number of Keywords", "width": 60, "key": "keyword", "type": "length"},
{"id": "wordsinsummary", "title": "Words in Summary", "width": 60, "key": "summary", "type": "words"},
{"id": "wordsintrivia", "title": "Words in Trivia", "width": 60, "key": "trivia", "type": "words"},
{"id": "releasedate", "title": "Release Date", "width": 90, "type": "date"},
{"id": "releasedate", "title": "Release Date", "width": 120, "type": "date"},
{"id": "budget", "title": "Budget", "width": 90, "type": "integer", "format": "currency"},
{"id": "gross", "title": "Gross", "width": 90, "type": "integer", "format": "currency"},
{"id": "profit", "title": "Profit", "width": 90, "type": "integer", "format": "currency"},
{"id": "rating", "title": "Rating", "width": 60, "type": "float"},
{"id": "votes", "title": "Votes", "width": 90, "type": "integer"},
{"id": "votes", "title": "Votes", "width": 60, "type": "integer"},
{"id": "id", "title": "ID", "width": 90, "type": "string"},
{"id": "aspectratio", "title": "Aspect Ratio", "width": 90, "type": "float"},
{"id": "duration", "title": "Duration", "width": 90, "type": "float"},
@ -130,7 +129,7 @@
"preferences": {},
"ui": {
"annotationsSize": 256,
"columns": ["id", "title", "director", "country", "year", "language", "genre"],
"columns": ["id", "title", "director", "country", "year", "language", "runtime", "genre"],
"findQuery": {"conditions": [], "operator": ""},
"groups": ["director", "country", "year", "language", "genre"],
"groupsQuery": {"conditions": [], "operator": "|"},

View file

@ -1118,6 +1118,11 @@ var pandora = new Ox.App({
columnsMovable: true,
columnsRemovable: true,
columnsResizable: true,
format: {
releasedate: {type: 'date', args: ['%a, %b %e, %Y']},
runtime: {type: 'duration', args: [0, 'medium']},
votes: {type: 'percent', args: [403824, 2]}
},
id: 'list',
request: function(data, callback) {
Ox.print('data, Query.toObject', data, Query.toObject())