replace absolute positioning with flexbox layout for profile and data tabs
This commit is contained in:
parent
21cd1fbf2a
commit
0168dbb541
2 changed files with 48 additions and 38 deletions
|
|
@ -15,11 +15,6 @@ html, body, #map {
|
||||||
div.elevation {
|
div.elevation {
|
||||||
margin-bottom: -2px !important;
|
margin-bottom: -2px !important;
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
.info, div.elevation {
|
|
||||||
display:table-row;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
.hidden {
|
.hidden {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
@ -44,8 +39,6 @@ div.elevation {
|
||||||
}
|
}
|
||||||
.title {
|
.title {
|
||||||
padding-top: 4px;
|
padding-top: 4px;
|
||||||
/* normalize height, for absolute Profile control positioning */
|
|
||||||
height: 21px;
|
|
||||||
}
|
}
|
||||||
.title-name {
|
.title-name {
|
||||||
font-size: larger;
|
font-size: larger;
|
||||||
|
|
@ -75,8 +68,6 @@ div.elevation {
|
||||||
|
|
||||||
select {
|
select {
|
||||||
max-width: 176px;
|
max-width: 176px;
|
||||||
/* normalize height, for absolute Profile control positioning */
|
|
||||||
height: 24px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
table {
|
table {
|
||||||
|
|
@ -126,32 +117,51 @@ td {
|
||||||
|
|
||||||
/* Profile Control */
|
/* Profile Control */
|
||||||
|
|
||||||
.leaflet-leftpane .leaflet-control:last-child {
|
/* flexbox layout: maximize textarea and data table (nested container/box path) */
|
||||||
position: absolute;
|
.flex_container,
|
||||||
top: 461px;
|
.leaflet-leftpane,
|
||||||
bottom: 0px;
|
.leaflet-leftpane .leaflet-control:last-child,
|
||||||
|
#tabs_div,
|
||||||
|
.tab-content,
|
||||||
|
.tab-pane.active,
|
||||||
|
#profile_upload,
|
||||||
|
#datatable_wrapper,
|
||||||
|
.dataTables_scroll,
|
||||||
|
.dataTables_scrollBody {
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
-webkit-flex-direction: column;
|
||||||
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-content {
|
.flex_box_none,
|
||||||
padding: 5px 0px;
|
.leaflet-leftpane .leaflet-control,
|
||||||
|
#tab,
|
||||||
|
.dataTables_scrollHead {
|
||||||
|
-webkit-flex: none;
|
||||||
|
flex: none;
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
#profile_upload input {
|
|
||||||
position: absolute;
|
|
||||||
top: 6px;
|
|
||||||
right: 8px;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* http://snook.ca/archives/html_and_css/absolute-position-textarea */
|
|
||||||
#textarea_container {
|
|
||||||
position: absolute;
|
|
||||||
top: 64px;
|
|
||||||
bottom: 6px;
|
|
||||||
left: 8px;
|
|
||||||
right: 8px;
|
|
||||||
|
|
||||||
|
.flex_box,
|
||||||
|
.leaflet-leftpane .leaflet-control:last-child,
|
||||||
|
#tabs_div,
|
||||||
|
.tab-content,
|
||||||
|
.tab-pane.active,
|
||||||
|
#profile_upload,
|
||||||
|
textarea,
|
||||||
|
#datatable_wrapper,
|
||||||
|
.dataTables_scroll,
|
||||||
|
.dataTables_scrollBody,
|
||||||
|
#datatable {
|
||||||
|
-webkit-flex: auto;
|
||||||
|
flex: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#profile_buttons {
|
||||||
|
padding-top: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
textarea {
|
textarea {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
|
||||||
16
index.html
16
index.html
|
|
@ -61,14 +61,14 @@
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
<div class="tab-pane active" id="tab_profile">
|
<div class="tab-pane active" id="tab_profile">
|
||||||
<form id="profile_upload" name="profile_upload">
|
<form id="profile_upload" name="profile_upload">
|
||||||
<div class="btn-group">
|
<textarea type="text" name="profile" spellcheck="false" wrap="off" maxlength="100000" placeholder="... paste your custom routing profile here ..."></textarea>
|
||||||
<button type="submit" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-upload"></span> Upload</button>
|
<div id="profile_buttons">
|
||||||
<!-- TODO type="reset" -->
|
<div class="btn-group">
|
||||||
<button id="clear" type="button" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-ban-circle"></span> Clear</button>
|
<button type="submit" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-upload"></span> Upload</button>
|
||||||
</div>
|
<!-- TODO type="reset" -->
|
||||||
<a href="http://brouter.de/brouter/costfunctions.html" target="_blank" class="btn-xs">Help</a>
|
<button id="clear" type="button" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-ban-circle"></span> Clear</button>
|
||||||
<div id="textarea_container">
|
</div>
|
||||||
<textarea type="text" name="profile" spellcheck="false" wrap="off" maxlength="100000" placeholder="... paste your custom routing profile here ..."></textarea>
|
<a href="http://brouter.de/brouter/costfunctions.html" target="_blank" class="btn-xs">Help</a>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue