|
1 /***************************************************************************** |
|
2 * Copyright (C) 2014 |
|
3 * |
|
4 * Michiel Broek <mbroek at mbse dot eu> |
|
5 * |
|
6 * This file is part of ThermFerm |
|
7 * |
|
8 * This is free software; you can redistribute it and/or modify it |
|
9 * under the terms of the GNU General Public License as published by the |
|
10 * Free Software Foundation; either version 2, or (at your option) any |
|
11 * later version. |
|
12 * |
|
13 * ThermFerm is distributed in the hope that it will be useful, but |
|
14 * WITHOUT ANY WARRANTY; without even the implied warranty of |
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
16 * General Public License for more details. |
|
17 * |
|
18 * You should have received a copy of the GNU General Public License |
|
19 * along with ThermFerm; see the file COPYING. If not, write to the Free |
|
20 * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
|
21 *****************************************************************************/ |
|
22 |
|
23 $(document).ready(function () { |
|
24 var source_bus = { |
|
25 datatype: "json", |
|
26 datafields: [ |
|
27 { name: 'Address', type: 'string' }, |
|
28 { name: 'Refcnt', type: 'int' }, |
|
29 { name: 'Chip', type: 'string' }, |
|
30 { name: 'Description', type: 'string' } |
|
31 ], |
|
32 url: 'getbus.php', |
|
33 sortcolumn: 'Address', |
|
34 sortdirection: 'asc' |
|
35 }; |
|
36 var dataAdapter_bus = new $.jqx.dataAdapter(source_bus,{ |
|
37 downloadComplete: function (data, status, xhr) { }, |
|
38 loadComplete: function (data) { }, |
|
39 loadError: function (xhr, status, error) { } |
|
40 }); |
|
41 $("#jqxgrid_bus").jqxGrid( { |
|
42 width: 770, height: 280, |
|
43 source: dataAdapter_bus, |
|
44 theme: 'ui-redmond', |
|
45 columnsresize: true, |
|
46 columns: [ |
|
47 { text: 'Address', datafield: 'Address', width: 150 }, |
|
48 { text: 'References', datafield: 'Refcnt', width: 100 }, |
|
49 { text: 'Chipset', datafield: 'Chip', width: 120 }, |
|
50 { text: 'Description', datafield: 'Description', minwidth: 120 } |
|
51 ] |
|
52 }); |
|
53 }); |