From eaa41c3256c811bff57b1e0f6887f073b0889f6e Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Sun, 10 May 2020 16:07:14 +0200 Subject: [PATCH] header is now collapsed by default; simpler javascript --- htdocs/css/openwebrx-header.css | 13 ++++++------- htdocs/include/header.include.html | 2 +- htdocs/lib/Header.js | 14 ++------------ 3 files changed, 9 insertions(+), 20 deletions(-) diff --git a/htdocs/css/openwebrx-header.css b/htdocs/css/openwebrx-header.css index c369fb1..09c1fed 100644 --- a/htdocs/css/openwebrx-header.css +++ b/htdocs/css/openwebrx-header.css @@ -2,6 +2,7 @@ { position: relative; z-index:1000; + background-color: #575757; } #webrx-top-photo @@ -13,7 +14,8 @@ #webrx-top-photo-clip { min-height: 67px; - max-height: 350px; + max-height: 67px; + height: 350px; overflow: hidden; position: relative; } @@ -101,18 +103,15 @@ cursor:pointer; position: absolute; left: 470px; - top: 51px; + top: 55px; } #openwebrx-rx-details-arrow a { margin: 0; padding: 0; -} - -#openwebrx-rx-details-arrow-down -{ - display:none; + line-height: 0; + display: block; } #openwebrx-main-buttons .button { diff --git a/htdocs/include/header.include.html b/htdocs/include/header.include.html index aa2275a..09fafa2 100644 --- a/htdocs/include/header.include.html +++ b/htdocs/include/header.include.html @@ -9,7 +9,7 @@
- +
diff --git a/htdocs/lib/Header.js b/htdocs/lib/Header.js index ebdc5b1..a81a682 100644 --- a/htdocs/lib/Header.js +++ b/htdocs/lib/Header.js @@ -17,10 +17,7 @@ Header.prototype.setDetails = function(details) { }; Header.prototype.init_rx_photo = function() { - var clip = this.el.find("#webrx-top-photo-clip")[0]; - this.rx_photo_height = clip.clientHeight; - clip.style.maxHeight = this.rx_photo_height + "px"; - this.rx_photo_state = 1; + this.rx_photo_state = 0; $.extend($.easing, { easeOutCubic:function(x) { @@ -28,13 +25,6 @@ Header.prototype.init_rx_photo = function() { } }); - window.setTimeout(function () { - $('#webrx-rx-photo-title').animate({opacity: 0}, 500); - }, 1000); - window.setTimeout(function () { - $('#webrx-rx-photo-desc').animate({opacity: 0}, 500); - }, 1500); - window.setTimeout(this.close_rx_photo.bind(this), 2500); $('#webrx-top-container').find('.openwebrx-photo-trigger').click(this.toggle_rx_photo.bind(this)); }; @@ -51,7 +41,7 @@ Header.prototype.open_rx_photo = function() { this.rx_photo_state = 1; this.el.find("#webrx-rx-photo-desc").animate({opacity: 1}); this.el.find("#webrx-rx-photo-title").animate({opacity: 1}); - this.el.find('#webrx-top-photo-clip').animate({maxHeight: this.rx_photo_height}, {duration: 1000, easing: 'easeOutCubic'}); + this.el.find('#webrx-top-photo-clip').animate({maxHeight: 350}, {duration: 1000, easing: 'easeOutCubic'}); this.el.find("#openwebrx-rx-details-arrow-down").hide(); this.el.find("#openwebrx-rx-details-arrow-up").show(); }