oxjstmp/demos/test/list.js
2010-06-25 17:55:25 +02:00

51 lines
1.5 KiB
JavaScript

$(function() {
Ox.theme("modern");
var $body = $("body"),
app = new Ox.App({
requestURL: "http://blackbook.local:8000/api/"
}),
$list = new Ox.TextList({
columns: [
{
align: "left",
id: "title",
operator: "+",
title: "Title",
width: 160
},
{
align: "left",
id: "director",
operator: "+",
title: "Director",
width: 160
},
{
align: "right",
id: "year",
operator: "-",
title: "Year",
width: 80
}
],
request: function(options) {
app.request("find", $.extend(options, {
query: {
conditions: [
{
key: "country",
value: "france",
operator: ""
}
],
operator: ""
}
}), options.callback);
},
sort: {
key: "year",
operator: "-"
}
}).appendTo($body);
});