Merge pull request #202 from sosedoff/always-show-sidedebar
Display empty sidebar
This commit is contained in:
commit
20a5646a53
File diff suppressed because one or more lines are too long
@ -124,8 +124,6 @@ function buildSchemaSection(name, objects) {
|
||||
section += "<div class='schema-container'>";
|
||||
|
||||
for (group of ["table", "view", "materialized_view", "sequence"]) {
|
||||
if (objects[group].length == 0) continue;
|
||||
|
||||
group_klass = "";
|
||||
if (name == "public" && group == "table") group_klass = "expanded";
|
||||
|
||||
@ -133,6 +131,8 @@ function buildSchemaSection(name, objects) {
|
||||
section += "<div class='schema-group-title'><i class='fa fa-chevron-right'></i><i class='fa fa-chevron-down'></i> " + titles[group] + " (" + objects[group].length + ")</div>";
|
||||
section += "<ul>"
|
||||
|
||||
if (!objects[group]) continue;
|
||||
|
||||
for (item of objects[group]) {
|
||||
var id = name + "." + item;
|
||||
section += "<li class='schema-" + group + "' data-type='" + group + "' data-id='" + id + "'>" + icons[group] + " " + item + "</li>";
|
||||
@ -149,6 +149,15 @@ function loadSchemas() {
|
||||
$("#objects").html("");
|
||||
|
||||
getObjects(function(data) {
|
||||
if (Object.keys(data).length == 0) {
|
||||
data["public"] = {
|
||||
table: [],
|
||||
view: [],
|
||||
materialized_view: [],
|
||||
sequence: []
|
||||
};
|
||||
}
|
||||
|
||||
for (schema in data) {
|
||||
$(buildSchemaSection(schema, data[schema])).appendTo("#objects");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user