diff -r 480bbe88ce0e -r f2f45c44942f www-thermferm/js/maintenance_panel.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www-thermferm/js/maintenance_panel.js Wed Jul 23 21:14:20 2014 +0200 @@ -0,0 +1,53 @@ +/***************************************************************************** + * Copyright (C) 2014 + * + * Michiel Broek + * + * This file is part of ThermFerm + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * ThermFerm is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with ThermFerm; see the file COPYING. If not, write to the Free + * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + *****************************************************************************/ + +$(document).ready(function () { + var source_bus = { + datatype: "json", + datafields: [ + { name: 'Address', type: 'string' }, + { name: 'Refcnt', type: 'int' }, + { name: 'Chip', type: 'string' }, + { name: 'Description', type: 'string' } + ], + url: 'getbus.php', + sortcolumn: 'Address', + sortdirection: 'asc' + }; + var dataAdapter_bus = new $.jqx.dataAdapter(source_bus,{ + downloadComplete: function (data, status, xhr) { }, + loadComplete: function (data) { }, + loadError: function (xhr, status, error) { } + }); + $("#jqxgrid_bus").jqxGrid( { + width: 770, height: 280, + source: dataAdapter_bus, + theme: 'ui-redmond', + columnsresize: true, + columns: [ + { text: 'Address', datafield: 'Address', width: 150 }, + { text: 'References', datafield: 'Refcnt', width: 100 }, + { text: 'Chipset', datafield: 'Chip', width: 120 }, + { text: 'Description', datafield: 'Description', minwidth: 120 } + ] + }); +});