redesign details and details buttons
This commit is contained in:
parent
8998617b3b
commit
bb689d306d
3 changed files with 21 additions and 14 deletions
|
@ -347,14 +347,15 @@ section.details > .details-head {
|
||||||
padding: 11px 10px 8px;
|
padding: 11px 10px 8px;
|
||||||
}
|
}
|
||||||
section.details > .details-head > .button {
|
section.details > .details-head > .button {
|
||||||
margin: -2px 0 0;
|
font-size: 30px;
|
||||||
|
line-height: 1.0;
|
||||||
|
color: $color-icon-light;
|
||||||
|
margin: -2px -2px 0 0;
|
||||||
-webkit-transition: none;
|
-webkit-transition: none;
|
||||||
-o-transition: none;
|
-o-transition: none;
|
||||||
transition: none;
|
transition: none;
|
||||||
line-height: 2.5;
|
|
||||||
}
|
}
|
||||||
#sidebar section.details > .details-body {
|
#sidebar section.details > .details-body {
|
||||||
border: 0;
|
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
-ms-scroll-chaining: none;
|
-ms-scroll-chaining: none;
|
||||||
overscroll-behavior: contain;
|
overscroll-behavior: contain;
|
||||||
|
@ -435,7 +436,7 @@ section.details {
|
||||||
}
|
}
|
||||||
|
|
||||||
#location-details .details-body {
|
#location-details .details-body {
|
||||||
padding: 0 10px;
|
padding: 10px 10px 0;
|
||||||
}
|
}
|
||||||
#location-details dl {
|
#location-details dl {
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
|
@ -536,11 +537,6 @@ main.show-options #resultswrapper #route-options {
|
||||||
-ms-flex-positive: 1;
|
-ms-flex-positive: 1;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
}
|
}
|
||||||
#route-options .details-head button {
|
|
||||||
font-size: 30px;
|
|
||||||
line-height: 1.0;
|
|
||||||
color: $color-icon-light;
|
|
||||||
}
|
|
||||||
|
|
||||||
.location {
|
.location {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -794,7 +790,7 @@ main:not([data-view=route-result]) #route-dots {
|
||||||
margin-left: -1px;
|
margin-left: -1px;
|
||||||
height: 3.3rem;
|
height: 3.3rem;
|
||||||
}
|
}
|
||||||
.buttons > button.button-clear {
|
.buttons > button.button-clear, .buttons > .button.button-clear {
|
||||||
width: 1px;
|
width: 1px;
|
||||||
-webkit-box-flex: 1;
|
-webkit-box-flex: 1;
|
||||||
-ms-flex-positive: 1;
|
-ms-flex-positive: 1;
|
||||||
|
@ -811,9 +807,9 @@ main:not([data-view=route-result]) #route-dots {
|
||||||
.buttons > *:hover, .buttons > *:active {
|
.buttons > *:hover, .buttons > *:active {
|
||||||
background-color: #eeeeee;
|
background-color: #eeeeee;
|
||||||
}
|
}
|
||||||
#search button, .leaflet-popup button, .details-head .button {
|
#search button, .leaflet-popup button, .details-head .button, .buttons.details-buttons button, .buttons.details-buttons .button {
|
||||||
font-size: 1.3rem;
|
font-size: 1.3rem;
|
||||||
line-height: 1.3;
|
line-height: 3.3rem;
|
||||||
height: 3.3rem;
|
height: 3.3rem;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -186,6 +186,8 @@ c3nav = {
|
||||||
$route_options.find('button').on('click', c3nav._route_options_submit);
|
$route_options.find('button').on('click', c3nav._route_options_submit);
|
||||||
$('#map').on('click', '.location-popup .button-clear', c3nav._popup_button_click);
|
$('#map').on('click', '.location-popup .button-clear', c3nav._popup_button_click);
|
||||||
|
|
||||||
|
$('.details .close').on('click', c3nav._buttons_details_close_click);
|
||||||
|
|
||||||
$('#modal').on('click', c3nav._modal_click)
|
$('#modal').on('click', c3nav._modal_click)
|
||||||
.on('click', 'a', c3nav._modal_link_click)
|
.on('click', 'a', c3nav._modal_link_click)
|
||||||
.on('submit', 'form', c3nav._modal_submit)
|
.on('submit', 'form', c3nav._modal_submit)
|
||||||
|
@ -349,6 +351,7 @@ c3nav = {
|
||||||
var $location_details = $('#location-details');
|
var $location_details = $('#location-details');
|
||||||
if ($location_details.attr('data-id') !== String(location.id)) {
|
if ($location_details.attr('data-id') !== String(location.id)) {
|
||||||
$location_details.addClass('loading').attr('data-id', location.id);
|
$location_details.addClass('loading').attr('data-id', location.id);
|
||||||
|
$location_details.find('.details-buttons').hide();
|
||||||
c3nav._clear_route_layers();
|
c3nav._clear_route_layers();
|
||||||
$.getJSON('/api/locations/'+location.id+'/details', c3nav._location_details_loaded).fail(function (data) {
|
$.getJSON('/api/locations/'+location.id+'/details', c3nav._location_details_loaded).fail(function (data) {
|
||||||
var $location_details = $('#location-details');
|
var $location_details = $('#location-details');
|
||||||
|
@ -391,6 +394,7 @@ c3nav = {
|
||||||
elem.append(loclist);
|
elem.append(loclist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$location_details.find('.details-buttons').show();
|
||||||
$location_details.find('.details-body').html('').append(elem);
|
$location_details.find('.details-body').html('').append(elem);
|
||||||
|
|
||||||
var $editor = $location_details.find('.editor');
|
var $editor = $location_details.find('.editor');
|
||||||
|
@ -716,6 +720,9 @@ c3nav = {
|
||||||
_buttons_details_click: function () {
|
_buttons_details_click: function () {
|
||||||
c3nav.update_state(null, null, !c3nav.state.details);
|
c3nav.update_state(null, null, !c3nav.state.details);
|
||||||
},
|
},
|
||||||
|
_buttons_details_close_click: function () {
|
||||||
|
c3nav.update_state(null, null, false);
|
||||||
|
},
|
||||||
_buttons_options_click: function () {
|
_buttons_options_click: function () {
|
||||||
c3nav.update_state(null, null, null, !c3nav.state.options);
|
c3nav.update_state(null, null, null, !c3nav.state.options);
|
||||||
},
|
},
|
||||||
|
|
|
@ -129,16 +129,20 @@
|
||||||
<section id="autocomplete"></section>
|
<section id="autocomplete"></section>
|
||||||
<section id="location-details" class="details">
|
<section id="location-details" class="details">
|
||||||
<div class="details-head">
|
<div class="details-head">
|
||||||
<a class="button button-clear editor float-right" target="_blank">
|
<button class="button close button-clear material-icons float-right">close</button>
|
||||||
|
<h2>{% trans 'Details' %}</h2>
|
||||||
|
</div>
|
||||||
|
<div class="details-buttons buttons">
|
||||||
|
<a class="button button-clear editor" target="_blank">
|
||||||
<i class="material-icons">edit</i>
|
<i class="material-icons">edit</i>
|
||||||
{% trans 'Open in Editor' %}
|
{% trans 'Open in Editor' %}
|
||||||
</a>
|
</a>
|
||||||
<h2>{% trans 'Details' %}</h2>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="details-body"></div>
|
<div class="details-body"></div>
|
||||||
</section>
|
</section>
|
||||||
<section id="route-details" class="details">
|
<section id="route-details" class="details">
|
||||||
<div class="details-head">
|
<div class="details-head">
|
||||||
|
<button class="button close button-clear material-icons float-right">close</button>
|
||||||
<h2>{% trans 'Details' %}</h2>
|
<h2>{% trans 'Details' %}</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="details-body"></div>
|
<div class="details-body"></div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue