Update index_m.html

This commit is contained in:
2018-09-26 09:28:29 +08:00
parent 40deefa345
commit 553ac66702
+29
View File
@@ -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