mirror of
https://github.com/ha7ilm/openwebrx.git
synced 2026-04-04 22:17:34 +00:00
clean up header styles
This commit is contained in:
parent
c23acc1513
commit
53faca64c0
6 changed files with 54 additions and 64 deletions
|
|
@ -1,7 +1,7 @@
|
|||
function Header(el) {
|
||||
this.el = el;
|
||||
|
||||
var $buttons = this.el.find('#openwebrx-main-buttons').find('[data-toggle-panel]').filter(function(){
|
||||
var $buttons = this.el.find('.openwebrx-main-buttons').find('[data-toggle-panel]').filter(function(){
|
||||
// ignore buttons when the corresponding panel is not in the DOM
|
||||
return $('#' + $(this).data('toggle-panel'))[0];
|
||||
});
|
||||
|
|
@ -15,10 +15,10 @@ function Header(el) {
|
|||
};
|
||||
|
||||
Header.prototype.setDetails = function(details) {
|
||||
this.el.find('#webrx-rx-title').html(details['receiver_name']);
|
||||
this.el.find('#webrx-rx-desc').html(details['receiver_location'] + ' | Loc: ' + details['locator'] + ', ASL: ' + details['receiver_asl'] + ' m');
|
||||
this.el.find('#webrx-rx-photo-title').html(details['photo_title']);
|
||||
this.el.find('#webrx-rx-photo-desc').html(details['photo_desc']);
|
||||
this.el.find('.webrx-rx-title').html(details['receiver_name']);
|
||||
this.el.find('.webrx-rx-desc').html(details['receiver_location'] + ' | Loc: ' + details['locator'] + ', ASL: ' + details['receiver_asl'] + ' m');
|
||||
this.el.find('.webrx-rx-photo-title').html(details['photo_title']);
|
||||
this.el.find('.webrx-rx-photo-desc').html(details['photo_desc']);
|
||||
};
|
||||
|
||||
Header.prototype.init_rx_photo = function() {
|
||||
|
|
@ -30,21 +30,19 @@ Header.prototype.init_rx_photo = function() {
|
|||
}
|
||||
});
|
||||
|
||||
$('#webrx-top-container').find('.openwebrx-photo-trigger').click(this.toggle_rx_photo.bind(this));
|
||||
$('.webrx-top-container').find('.openwebrx-photo-trigger').click(this.toggle_rx_photo.bind(this));
|
||||
};
|
||||
|
||||
Header.prototype.close_rx_photo = function() {
|
||||
this.rx_photo_state = 0;
|
||||
this.el.find('#openwebrx-description-container').removeClass('expanded');
|
||||
this.el.find("#openwebrx-rx-details-arrow-down").show();
|
||||
this.el.find("#openwebrx-rx-details-arrow-up").hide();
|
||||
this.el.find('.openwebrx-description-container').removeClass('expanded');
|
||||
this.el.find(".openwebrx-rx-details-arrow").removeClass('openwebrx-rx-details-arrow--up').addClass('openwebrx-rx-details-arrow--down');
|
||||
}
|
||||
|
||||
Header.prototype.open_rx_photo = function() {
|
||||
this.rx_photo_state = 1;
|
||||
this.el.find('#openwebrx-description-container').addClass('expanded');
|
||||
this.el.find("#openwebrx-rx-details-arrow-down").hide();
|
||||
this.el.find("#openwebrx-rx-details-arrow-up").show();
|
||||
this.el.find('.openwebrx-description-container').addClass('expanded');
|
||||
this.el.find(".openwebrx-rx-details-arrow").removeClass('openwebrx-rx-details-arrow--down').addClass('openwebrx-rx-details-arrow--up');
|
||||
}
|
||||
|
||||
Header.prototype.toggle_rx_photo = function(ev) {
|
||||
|
|
@ -73,5 +71,5 @@ $.fn.header = function() {
|
|||
};
|
||||
|
||||
$(function(){
|
||||
$('#webrx-top-container').header();
|
||||
$('.webrx-top-container').header();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue