From 5b7d1cccd7b148a7d2684dc52b08c38347d06e65 Mon Sep 17 00:00:00 2001 From: ansuz Date: Wed, 16 Aug 2017 15:32:42 +0200 Subject: [PATCH] fix display and logic for tab setting checkbox --- www/settings/main.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/www/settings/main.js b/www/settings/main.js index c36e6cf0c..bc65e10fa 100644 --- a/www/settings/main.js +++ b/www/settings/main.js @@ -176,7 +176,8 @@ define([ var $inputBlock = $('
', { 'class': 'inputBlock', - }).appendTo($div); + }).css('flex-flow', 'column') + .appendTo($div); var $input = $('', { type: 'checkbox', @@ -186,16 +187,9 @@ define([ proxy[key] = val; }).appendTo($inputBlock); - proxy.on('change', [key], function (o, n) { $input.val(n); }); + $input[0].checked = !!proxy[key]; + proxy.on('change', [key], function (o, n) { $input[0].checked = !!n; }); - Cryptpad.getAttribute('indentUnit', function (e, val) { - if (e) { return void console.error(e); } - if (typeof(val) !== 'number') { - $input.val(2); - } else { - $input.val(val); - } - }); return $div; };