From 9383cc0779824b16591438d594904d49c8be4639 Mon Sep 17 00:00:00 2001 From: Darren Date: Sun, 24 Mar 2013 19:53:49 +0000 Subject: [PATCH] /set command converting values to ints/bools --- client/assets/dev/model_application.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/client/assets/dev/model_application.js b/client/assets/dev/model_application.js index bf48b7c..ba9313c 100644 --- a/client/assets/dev/model_application.js +++ b/client/assets/dev/model_application.js @@ -886,11 +886,24 @@ _kiwi.model.Application = function () { ev.params.shift(); value = ev.params.join(' '); + + // If we're setting a true boolean value.. + if (value === 'true') + value = true; + + // If we're setting a false boolean value.. + if (value === 'false') + value = false; + + // If we're setting a number.. + if (parseInt(value, 10).toString() === value) + value = parseInt(value, 10); + _kiwi.global.settings.set(setting, value); } // Read the value to the user - _kiwi.app.panels.active.addMsg('', setting + ' = ' + _kiwi.global.settings.get(setting)); + _kiwi.app.panels.active.addMsg('', setting + ' = ' + _kiwi.global.settings.get(setting).toString()); }); -- 2.25.1