Show line numbers in profile editor to help locating error message line

This commit is contained in:
Norbert Renner 2019-05-03 21:23:46 +02:00
parent dff36a36bd
commit 81f2c0863f

View file

@ -3,7 +3,9 @@ BR.Profile = L.Evented.extend({
initialize: function () {
var textArea = L.DomUtil.get('profile_upload');
this.editor = CodeMirror.fromTextArea(textArea, {});
this.editor = CodeMirror.fromTextArea(textArea, {
lineNumbers: true
});
L.DomUtil.get('upload').onclick = L.bind(this._upload, this);
L.DomUtil.get('clear').onclick = L.bind(this.clear, this);
@ -76,7 +78,7 @@ BR.Profile = L.Evented.extend({
}
});
},
_setValue: function(profileText) {
this.editor.setValue(profileText);
this.editor.markClean();