Commit 47975bc3 authored by David Gonçalves's avatar David Gonçalves 📖

select language

parent beef49a9
......@@ -122,7 +122,11 @@
<script src="ace/mode-xml.js" type="text/javascript" charset="utf-8"></script>
<!-- Editor - End -->
<output id="lines"></output>
<output id="lines">
<strong id="editor_ln">Ln:</strong> <span id=lines_ln></span>
<strong id="editor_ch">Ch:</strong> <span id=lines_ch></span> |
<strong id="editor_ttln">Total Ln:</strong> <span id=lines_total></span>
</output>
<input type="submit" value="Save as..." id="save_as" />
<input type="submit" value="Generate EXE" id="generate_exe"><br/>
......
......@@ -58,9 +58,9 @@ class Editor {
setLines() {
let lines = this.editor.session.getLength();
let linecol = this.editor.selection.getCursor();
$('#lines').html(`<strong>${window.lang.editor_line}<\/strong> ${linecol.row+1}
<strong>${window.lang.editor_ch}<\/strong>${linecol.column} |
<strong>${window.lang.editor_totalline}<\/strong> ${lines}`);
$('#lines_ln').html(linecol.row+1);
$('#lines_ch').html(linecol.column);
$('#lines_total').html(lines);
}
changeTheme(theme) {
......
......@@ -54,9 +54,6 @@ class Languages {
this._lang = this._lang_arr[i];
window.lang = this._lang;
if (window.editor) {
window.editor.setLines();
}
$("title").text(this._lang.title);
$("#title").text(this._lang.title);
......
......@@ -16,7 +16,7 @@ $(document).ready(function () {
window.lang_obj.setLanguage("English");
// Initialize editor
window.editor = new Editor(ace);
let editor = new Editor(ace);
// Events
$('#fileInput').on('change', function(e) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment