From 81f2c0863f2569fa9079e5c96f4c9b09ef4c26e2 Mon Sep 17 00:00:00 2001 From: Norbert Renner Date: Fri, 3 May 2019 21:23:46 +0200 Subject: [PATCH] Show line numbers in profile editor to help locating error message line --- js/control/Profile.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/control/Profile.js b/js/control/Profile.js index 3887876..da58f68 100644 --- a/js/control/Profile.js +++ b/js/control/Profile.js @@ -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();