Update index_m.html
This commit is contained in:
@@ -28,11 +28,40 @@
|
||||
<!-- you have to define 2 functions in the global scope: -->
|
||||
<script type="text/javascript">
|
||||
|
||||
function initTabs(onchange, data) {
|
||||
if (!data) {
|
||||
data = {};
|
||||
$.each($('.modbus-grid'), function () {
|
||||
var id = $(this).attr('id');
|
||||
var key = id.split('_')[1];
|
||||
|
||||
if ($(this).data('JSGrid')._editingRow) {
|
||||
$(this).jsGrid('updateItem');
|
||||
}
|
||||
|
||||
data[key] = $(this).jsGrid('option', 'data');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// the function loadSettings has to exist ...
|
||||
function load(settings, onChange) {
|
||||
|
||||
//zhongjin
|
||||
|
||||
var data = {
|
||||
disInputs: settings.disInputs || [],
|
||||
coils: settings.coils || []
|
||||
}
|
||||
|
||||
initTabs(onchange, data);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//end zhongjin
|
||||
|
||||
|
||||
Reference in New Issue
Block a user