fix display and logic for tab setting checkbox

pull/1/head
ansuz 7 years ago
parent 2a666e0ba3
commit 5b7d1cccd7

@ -176,7 +176,8 @@ define([
var $inputBlock = $('<div>', { var $inputBlock = $('<div>', {
'class': 'inputBlock', 'class': 'inputBlock',
}).appendTo($div); }).css('flex-flow', 'column')
.appendTo($div);
var $input = $('<input>', { var $input = $('<input>', {
type: 'checkbox', type: 'checkbox',
@ -186,16 +187,9 @@ define([
proxy[key] = val; proxy[key] = val;
}).appendTo($inputBlock); }).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; return $div;
}; };

Loading…
Cancel
Save