Tweak sidebar styles and list structure to fix long table names on a single line

This commit is contained in:
Dan Sosedoff 2014-10-31 21:39:00 -05:00
parent 61ecc9e9a1
commit d075e9b1f9
3 changed files with 50 additions and 23 deletions

View File

@ -69,43 +69,59 @@
left: 0px; left: 0px;
top: 0px; top: 0px;
bottom: 0px; bottom: 0px;
background: #31373d;
font-size: 13px;
} }
#sidebar .wrapper { #sidebar .title {
height: 100%; position: absolute;
} top: 0;
width: 100%;
#sidebar .wrapper div.title {
line-height: 33px; line-height: 33px;
height: 33px; height: 33px;
padding: 0px 8px; padding: 0px 8px;
padding-left: 12px; padding-left: 12px;
color: #fff; color: #fff;
background: #31373d;
} }
#sidebar div.tables-list { #sidebar div.tables-list {
position: absolute; position: absolute;
width: 250px; right: 0;
top: 0px; top: 0px;
left: 0px; left: 0px;
bottom: 130px; bottom: 130px;
overflow: auto; overflow: auto;
background: #31373d;
} }
#sidebar div.table-information { #sidebar div.tables-list .wrap {
border-top: 1px solid #272c30; height: 100%;
background: #272c30;
position: absolute;
width: 250px;
left: 0px;
bottom: 0px;
height: 130px;
overflow: auto; overflow: auto;
} }
#sidebar div.tables-list #tables {
padding: 33px 0 0;
}
#sidebar div.table-information {
position: fixed;
width: 250px;
left: 0px;
height: 130px;
bottom: 0px;
background: #272c30;
}
#sidebar div.table-information .wrap {
height: 100%;
overflow-y: auto;
}
#sidebar div.table-information .title {
background: #272c30;
}
#sidebar div.table-information ul { #sidebar div.table-information ul {
padding: 33px 0 0;
font-size: 12px; font-size: 12px;
display: none; display: none;
} }
@ -113,12 +129,14 @@
#sidebar div.table-information ul li { #sidebar div.table-information ul li {
line-height: 24px; line-height: 24px;
height: 24px; height: 24px;
padding: 0 8px 0 12px;
cursor: default; cursor: default;
color: #637D94 !important; color: #637D94 !important;
} }
#sidebar div.table-information ul li span { #sidebar div.table-information ul li span {
color: #95a7b7; color: #95a7b7;
min-width: 0;
} }
#sidebar ul { #sidebar ul {
@ -130,8 +148,8 @@
list-style: none; list-style: none;
list-style-type: none; list-style-type: none;
line-height: 30px; line-height: 30px;
padding: 0px 8px; padding: 0px;
padding-left: 12px; margin: 0px;
cursor: pointer; cursor: pointer;
color: #95a7b7 !important; color: #95a7b7 !important;
white-space: nowrap; white-space: nowrap;
@ -144,10 +162,17 @@
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
} }
#sidebar ul li:hover { #sidebar ul li:hover span {
background: #272c30; background: #272c30;
} }
#sidebar ul li span {
padding: 0px 8px 0 12px;
display: inline-block;
width: auto;
min-width: 100%;
}
#body { #body {
position: fixed; position: fixed;
top: 50px; top: 50px;

View File

@ -23,12 +23,14 @@
</ul> </ul>
</div> </div>
<div id="sidebar"> <div id="sidebar">
<div class="wrapper">
<div class="tables-list"> <div class="tables-list">
<div class="wrap">
<div class="title">Database Tables</div> <div class="title">Database Tables</div>
<ul id="tables"></ul> <ul id="tables"></ul>
</div> </div>
</div>
<div class="table-information"> <div class="table-information">
<div class="wrap">
<div class="title">Table Information</div> <div class="title">Table Information</div>
<ul> <ul>
<li>Size: <span id="table_total_size"></span></li> <li>Size: <span id="table_total_size"></span></li>

View File

@ -31,7 +31,7 @@ function explainQuery(query, cb) {
function loadTables() { function loadTables() {
getTables(function(data) { getTables(function(data) {
data.forEach(function(item) { data.forEach(function(item) {
$("<li>" + item + "</li>").appendTo("#tables"); $("<li><span>" + item + "</span></li>").appendTo("#tables");
}); });
}); });
} }