add label for code indentation

pull/1/head
ansuz 7 years ago
parent 7f2b7fc287
commit ae0b2ca1a8

@ -468,6 +468,8 @@ define(function () {
out.settings_logoutEverywhere = "Force log out of all other web sessions"; out.settings_logoutEverywhere = "Force log out of all other web sessions";
out.settings_logoutEverywhereConfirm = "Are you sure? You will need to log in with all your devices."; out.settings_logoutEverywhereConfirm = "Are you sure? You will need to log in with all your devices.";
out.settings_codeIndentation = 'Code editor indentation (spaces)';
out.upload_title = "File upload"; out.upload_title = "File upload";
out.upload_serverError = "Server Error: unable to upload your file at this time."; out.upload_serverError = "Server Error: unable to upload your file at this time.";
out.upload_uploadPending = "You already have an upload in progress. Cancel it and upload your new file?"; out.upload_uploadPending = "You already have an upload in progress. Cancel it and upload your new file?";

@ -129,10 +129,10 @@ define([
var createIndentUnitSelector = function (obj) { var createIndentUnitSelector = function (obj) {
var proxy = obj.proxy; var proxy = obj.proxy;
console.log('create indent unit selector');
var $div = $('<div>', { var $div = $('<div>', {
'class': 'indentUnit element' 'class': 'indentUnit element'
}); });
$('<label>').text(Messages.settings_codeIndentation).appendTo($div);
var $inputBlock = $('<div>', { var $inputBlock = $('<div>', {
'class': 'inputBlock', 'class': 'inputBlock',
@ -144,7 +144,6 @@ define([
type: 'number', type: 'number',
}).on('change', function () { }).on('change', function () {
var val = parseInt($input.val()); var val = parseInt($input.val());
console.log(val, typeof(val));
if (typeof(val) !== 'number') { return; } if (typeof(val) !== 'number') { return; }
proxy['cryptpad.indentUnit'] = val; proxy['cryptpad.indentUnit'] = val;
}).appendTo($inputBlock); }).appendTo($inputBlock);

Loading…
Cancel
Save