support formatting of values in lists

This commit is contained in:
rlx 2011-01-05 14:53:38 +00:00
parent 1192e7c09c
commit e37657436b
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": "numberofkeywords", "title": "Number of Keywords", "width": 60, "key": "keyword", "type": "length"},
{"id": "wordsinsummary", "title": "Words in Summary", "width": 60, "key": "summary", "type": "words"}, {"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": "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": "budget", "title": "Budget", "width": 90, "type": "integer", "format": "currency"},
{"id": "gross", "title": "Gross", "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": "profit", "title": "Profit", "width": 90, "type": "integer", "format": "currency"},
{"id": "rating", "title": "Rating", "width": 60, "type": "float"}, {"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": "id", "title": "ID", "width": 90, "type": "string"},
{"id": "aspectratio", "title": "Aspect Ratio", "width": 90, "type": "float"}, {"id": "aspectratio", "title": "Aspect Ratio", "width": 90, "type": "float"},
{"id": "duration", "title": "Duration", "width": 90, "type": "float"}, {"id": "duration", "title": "Duration", "width": 90, "type": "float"},
@ -130,7 +129,7 @@
"preferences": {}, "preferences": {},
"ui": { "ui": {
"annotationsSize": 256, "annotationsSize": 256,
"columns": ["id", "title", "director", "country", "year", "language", "genre"], "columns": ["id", "title", "director", "country", "year", "language", "runtime", "genre"],
"findQuery": {"conditions": [], "operator": ""}, "findQuery": {"conditions": [], "operator": ""},
"groups": ["director", "country", "year", "language", "genre"], "groups": ["director", "country", "year", "language", "genre"],
"groupsQuery": {"conditions": [], "operator": "|"}, "groupsQuery": {"conditions": [], "operator": "|"},

View file

@ -1118,6 +1118,11 @@ var pandora = new Ox.App({
columnsMovable: true, columnsMovable: true,
columnsRemovable: true, columnsRemovable: true,
columnsResizable: 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', id: 'list',
request: function(data, callback) { request: function(data, callback) {
Ox.print('data, Query.toObject', data, Query.toObject()) Ox.print('data, Query.toObject', data, Query.toObject())