diff --git a/data/scripts.js b/data/scripts.js index de56c29..4554c40 100644 --- a/data/scripts.js +++ b/data/scripts.js @@ -105,7 +105,12 @@ var $ = function(selector){ }; Sui.select(actuator.selector).forEach( (domEl) =>{ let handle = function(event) { - update.call(this, actuator.api, 'GET', actuator.data ? actuator.data.call(this) : undefined ); + update.call(this, + actuator.api, + 'GET', + actuator.data ? + actuator.data.call(this) : [this.value] + ); } $(domEl).on(actuator.event, handle) }); @@ -173,9 +178,6 @@ var $ = function(selector){ method: 'GET', selector: '.laser.slider', event: 'change', - data: function(){ - return [this.value]; - }, onResponse: debugResponse }].forEach(Sui.link({ api: { diff --git a/frontend/scripts/sui.js b/frontend/scripts/sui.js index f1b4f27..363e974 100644 --- a/frontend/scripts/sui.js +++ b/frontend/scripts/sui.js @@ -18,7 +18,12 @@ var Sui = { }; Sui.select(actuator.selector).forEach( (domEl) =>{ let handle = function(event) { - update.call(this, actuator.api, 'GET', actuator.data ? actuator.data.call(this) : undefined ); + update.call(this, + actuator.api, + 'GET', + actuator.data ? + actuator.data.call(this) : [this.value] + ); } $(domEl).on(actuator.event, handle) }); diff --git a/frontend/scripts/zMain.js b/frontend/scripts/zMain.js index 9b26482..9603fea 100644 --- a/frontend/scripts/zMain.js +++ b/frontend/scripts/zMain.js @@ -16,9 +16,6 @@ Sui.ready(() => { method: 'GET', selector: '.laser.slider', event: 'change', - data: function(){ - return [this.value]; - }, onResponse: debugResponse }].forEach(Sui.link({ api: {