From 68ed99df235d8e0ebb03a50c7a7630667161256a Mon Sep 17 00:00:00 2001 From: j Date: Wed, 5 Dec 2018 12:29:49 +0100 Subject: [PATCH] get latest presets --- static/js/cccc.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/static/js/cccc.js b/static/js/cccc.js index 7e507a6..ffb8675 100644 --- a/static/js/cccc.js +++ b/static/js/cccc.js @@ -481,12 +481,15 @@ $('button.export_presets').on({click: function() { }); }}) $('button.all_presets').on({click: function() { - loadData(presets.map(function(preset) { - return { - preset: preset.id, - speed: parseInt($('input.default_speed').val(), 10) - } - })) + api('getPresets', {}, function(response) { + presets = response.result.presets + loadData(presets.map(function(preset) { + return { + preset: preset.id, + speed: parseInt($('input.default_speed').val(), 10) + } + })) + }) }}) $('input.import_sequence').on({change: function() {