1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
function page_init() {
create_flexigrid('grid-projects', {
url: '/api/4/projects/all',
colModel: [
{ display: '<%= h(@trans.t.taginfo.project) %>', name: 'name', width: 400, sortable: true },
{ display: '<%= h(@trans.t.misc.description) %>', name: 'description', width: 800, sortable: false }
],
searchitems: [
{ display: '<%= h(@trans.t.taginfo.project) %>/<%= h(@trans.t.misc.description) %>', name: 'name' }
],
sortname: 'name',
sortorder: 'asc',
preProcess: function(data) {
data.rows = jQuery.map(data.data, function(row, i) {
return { 'cell': [
link_to_project(row.id, row.name, row.icon_url),
html_escape(row.description)
] };
});
return data;
}
});
}
|