adding List object
This commit is contained in:
parent
b5cf89ce73
commit
bd08670324
5 changed files with 730 additions and 1 deletions
13
demos/test/list.html
Normal file
13
demos/test/list.html
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<link rel="stylesheet" type="text/css" href="../../build/css/ox.ui.css"/>
|
||||
<script type="text/javascript" src="../../build/js/jquery-1.4.2.js"></script>
|
||||
<script type="text/javascript" src="../../build/js/ox.js"></script>
|
||||
<script type="text/javascript" src="../../build/js/ox.ui.js"></script>
|
||||
<script type="text/javascript" src="list.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
50
demos/test/list.js
Normal file
50
demos/test/list.js
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
$(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);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue