Extract ACE editor initialization into separate method
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
var editor;
|
||||||
|
|
||||||
function apiCall(method, path, params, cb) {
|
function apiCall(method, path, params, cb) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: path,
|
url: path,
|
||||||
@@ -247,13 +249,16 @@ function exportToCSV() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var editor;
|
function initEditor() {
|
||||||
|
|
||||||
$(document).ready(function() {
|
|
||||||
editor = ace.edit("custom_query");
|
editor = ace.edit("custom_query");
|
||||||
|
|
||||||
editor.getSession().setMode("ace/mode/pgsql");
|
editor.getSession().setMode("ace/mode/pgsql");
|
||||||
editor.getSession().setTabSize(2);
|
editor.getSession().setTabSize(2);
|
||||||
editor.getSession().setUseSoftTabs(true);
|
editor.getSession().setUseSoftTabs(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
initEditor();
|
||||||
|
|
||||||
$("#table_content").on("click", function() { showTableContent(); });
|
$("#table_content").on("click", function() { showTableContent(); });
|
||||||
$("#table_structure").on("click", function() { showTableStructure(); });
|
$("#table_structure").on("click", function() { showTableStructure(); });
|
||||||
|
|||||||
Reference in New Issue
Block a user