www/js/global.js

changeset 703
344470c6bb1c
parent 697
685f20ad87ed
child 714
24749c296a50
equal deleted inserted replaced
702:d77891f8915d 703:344470c6bb1c
54 ], 54 ],
55 url: 'drop_tempsensors.php' 55 url: 'drop_tempsensors.php'
56 }, 56 },
57 tempsensorlist = new $.jqx.dataAdapter(tempsensorSource), 57 tempsensorlist = new $.jqx.dataAdapter(tempsensorSource),
58 58
59 // Switches dropdown list
60 switchesSource = {
61 datatype: 'json',
62 datafields: [
63 { name: 'uuid', type: 'string' },
64 { name: 'name', type: 'string' }
65 ],
66 url: 'drop_switches.php'
67 },
68 switcheslist = new $.jqx.dataAdapter(switchesSource),
69
70 // Contacts dropdown list
71 contactsSource = {
72 datatype: 'json',
73 datafields: [
74 { name: 'uuid', type: 'string' },
75 { name: 'name', type: 'string' }
76 ],
77 url: 'drop_contacts.php'
78 },
79 contactslist = new $.jqx.dataAdapter(contactsSource),
80
81
59 // options for editors 82 // options for editors
60 83
61 Show0dec = { inputMode: 'simple', theme: theme, width: 90, height: 23, readOnly: true, decimalDigits: 0 }, 84 Show0dec = { inputMode: 'simple', theme: theme, width: 90, height: 23, readOnly: true, decimalDigits: 0 },
62 Show1dec = { inputMode: 'simple', theme: theme, width: 90, height: 23, readOnly: true, decimalDigits: 1 }, 85 Show1dec = { inputMode: 'simple', theme: theme, width: 90, height: 23, readOnly: true, decimalDigits: 1 },
63 Spin0dec = { inputMode: 'simple', theme: theme, width: 110, height: 23, min: 0, decimalDigits: 0, spinButtons: true }, 86 Spin0dec = { inputMode: 'simple', theme: theme, width: 110, height: 23, min: 0, decimalDigits: 0, spinButtons: true },
87 Spin1dec = { inputMode: 'simple', theme: theme, width: 110, height: 23, min: 0, decimalDigits: 1, spinButtons: true },
88 Spin2dec = { inputMode: 'simple', theme: theme, width: 110, height: 23, min: 0, decimalDigits: 2, spinButtons: true },
89 Spin3dec = { inputMode: 'simple', theme: theme, width: 110, height: 23, min: 0, decimalDigits: 3, spinButtons: true },
64 PosInt = { inputMode: 'simple', theme: theme, width: 110, height: 23, min: 0, decimalDigits: 0, spinButtons: true }, 90 PosInt = { inputMode: 'simple', theme: theme, width: 110, height: 23, min: 0, decimalDigits: 0, spinButtons: true },
65 SubInt = { inputMode: 'simple', theme: theme, width: 110, height: 23, min: 0, max: 63, decimalDigits: 0, spinButtons: true }, 91 SubInt = { inputMode: 'simple', theme: theme, width: 110, height: 23, min: 0, max: 63, decimalDigits: 0, spinButtons: true },
66 GPIOInt = { inputMode: 'simple', theme: theme, width: 110, height: 23, min: -1, max:31, decimalDigits: 0, spinButtons: true }; 92 GPIOInt = { inputMode: 'simple', theme: theme, width: 110, height: 23, min: -1, max:31, decimalDigits: 0, spinButtons: true },
93 Perc1dec = { inputMode: 'simple', theme: theme, width: 110, height: 23, min: 0, max: 100, decimalDigits: 1, spinButtons: true },
94 Perc0 = { inputMode: 'simple', theme: theme, width: 110, height: 23, min: 0, max: 100, decimalDigits: 0, spinButtons: true };
67 95
68 96
69 /* Websocket interface. Place "websocket.onmessage = function(evt) {}" in the user script. */ 97 /* Websocket interface. Place "websocket.onmessage = function(evt) {}" in the user script. */
70 var websocket = new ReconnectingWebSocket('ws://'+location.hostname+'/ws'); 98 var websocket = new ReconnectingWebSocket('ws://'+location.hostname+'/ws');
71 99

mercurial