<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Wialon Playground - Unit edit fields</title>
<script type="text/javascript" src="//code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript" src="//hst-api.wialon.com/wsdk/script/wialon.js"></script>
</head>
<body>
<p>
Select unit:
<select id="units">
#log, td{ border: 1px solid #c6c6c6; padding:5px;}
table select, table input { width:100%; }
var cur_unit = null; // global variable
var cur_prop = null; // global variable
var sess = null;
// Print message to log
function msg(text) { $("#log").prepend(text + "<br/>"); }
function init() { // Execute after login succeed
$unitsSelect = $("#units");
sess = wialon.core.Session.getInstance(); // get instance of current Session
// flags to specify what kind of data should be returned
var flags = wialon.item.Item.dataFlag.base;
sess.updateDataFlags( // load items to current session
[{type: "type", data: "avl_unit", flags: flags, mode: 0}], // Items specification
/*source*/