Skip to content

Commit

Permalink
radio
Browse files Browse the repository at this point in the history
  • Loading branch information
5HT committed Nov 12, 2019
1 parent 8c6fb02 commit 7b61870
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ defmodule N2O.Mixfile do
def application, do: [mod: {:n2o, []}, applications: [:syn]]
def project do
[ app: :n2o,
version: "6.11.1",
version: "6.11.2",
description: "N2O MQTT TCP WebSocket",
package: package(),
deps: deps()]
Expand Down
1 change: 1 addition & 0 deletions priv/n2o.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ function client() { return ''; }
function token() { return sessionStorage.getItem("token") || ''; };
function qi(name) { return document.getElementById(name); }
function qs(name) { return document.querySelector(name); }
function qa(name) { return document.querySelectorAll(name); }
function qn(name) { return document.createElement(name); }
function is(x, num, name) { return x == undefined ? false : (x.t == 106 ? false : (x.v.length === num && x.v[0].v === name)); }
function co(name) { match = document.cookie.match(new RegExp(name + '=([^;]+)')); return match ? match[1] : undefined; }
Expand Down
12 changes: 6 additions & 6 deletions priv/nitro.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ function direct(term) { ws.send(enc(tuple(atom('direct'),term))); }
function validateSources() { return true; }
function querySourceRaw(Id) {
var val, el = document.getElementById(Id);
if (!el) return "";
switch (el.tagName) {
case 'FIELDSET': val = document.querySelector('[id="' + Id + '"] :checked');
val = val ? val.value : ""; break;
if (!el) {
val = qs('input[name='+Id+']:checked'); val = val ? val.value : "";
} else switch (el.tagName) {
case 'FIELDSET': val = qs('[id="'+Id+'"]:checked'); val = val ? val.value : ""; break;
case 'INPUT':
switch (el.getAttribute("type")) {
case 'radio': case 'checkbox': val = el.checked ? el.value : ""; break;
case 'radio': case 'checkbox': val = qs('input[name='+Id+']:checked'); val = val ? val.value : ""; break;
case 'date': val = Date.parse(el.value); val = val && new Date(val) || ""; break;
case 'calendar': val = pickers[el.id]._d || ""; break; //only 4 nitro #calendar{}
case 'calendar': val = pickers[el.id]._d || ""; break;
default: var edit = el.contentEditable;
if (edit && edit === 'true') val = el.innerHTML;
else val = el.value;
Expand Down
2 changes: 1 addition & 1 deletion src/n2o.app.src
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{application,n2o,
[{description,"N2O MQTT TCP WebSocket"},
{vsn,"6.11.1"},
{vsn,"6.11.2"},
{registered,[]},
{applications,[kernel,stdlib]},
{mod, {n2o, []}}]}.

0 comments on commit 7b61870

Please sign in to comment.