From ee73d34b8c5126ba8fa77b345f4fea8c9130e6ab Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Mon, 19 Aug 2013 13:44:04 +0000 Subject: add sliders to settings page, and show current values (nw) --- web/index.html | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) (limited to 'web/index.html') diff --git a/web/index.html b/web/index.html index 0bfda89104d..087be401fd6 100644 --- a/web/index.html +++ b/web/index.html @@ -26,9 +26,9 @@ document.getElementById('main').innerHTML = '
'; } - function loadCommands() + function loadContent(htmlName) { - $("#main").load('commands.html', function () { + $("#main").load(htmlName+'.html', function () { $(this).trigger('create'); }); } @@ -44,6 +44,26 @@ }); } + function executeSlider() + { + $.ajax({ + url: "/json/slider", + cache: false, + dataType: "json", + success: function(data) { + var items = []; + for (var i in data) { + items.push(''); + items.push(''); + } + $('#main').html(''); + $('#main').append(items.join('')).trigger('create'); + + }, + error: function (request, status, error) { alert(status + ", " + error); } + }); + } + function startWebSocket() { var url = 'ws://localhost:8080/foo'; @@ -95,16 +115,16 @@
@@ -115,10 +135,10 @@