From a37e5ac93f7a966a5b3f184d05441dd77e1fb8c4 Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Sun, 10 May 2020 16:07:14 +0200 Subject: [PATCH 1/3] 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(); } From 508ea2cf9627479dcd8fe8100ce50315adc204e3 Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Sun, 10 May 2020 16:12:37 +0200 Subject: [PATCH 2/3] create a javascript profile for the map, too --- htdocs/map.html | 5 +---- owrx/controllers/assets.py | 6 ++++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/htdocs/map.html b/htdocs/map.html index dbfd13d..08e40b4 100644 --- a/htdocs/map.html +++ b/htdocs/map.html @@ -3,11 +3,8 @@ OpenWebRX Map - - - + - diff --git a/owrx/controllers/assets.py b/owrx/controllers/assets.py index f0bf6ac..59a532f 100644 --- a/owrx/controllers/assets.py +++ b/owrx/controllers/assets.py @@ -81,6 +81,12 @@ class CompiledAssetsController(Controller): "lib/Js8Threads.js", "lib/Modes.js", ], + "map.js": [ + "lib/jquery-3.2.1.min.js", + "lib/chroma.min.js", + "lib/Header.js", + "map.js", + ], } def indexAction(self): From 813474b5d6b6e5678e2040f65fbd5cc3503af7c7 Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Sun, 10 May 2020 16:23:05 +0200 Subject: [PATCH 3/3] make the header work on all pages --- htdocs/css/admin.css | 5 ----- htdocs/css/features.css | 5 ----- htdocs/css/login.css | 6 ------ htdocs/features.html | 1 + htdocs/generalsettings.html | 1 + htdocs/lib/Header.js | 6 +++++- htdocs/login.html | 2 ++ htdocs/openwebrx.js | 1 - htdocs/sdrsettings.html | 2 +- htdocs/settings.html | 2 +- 10 files changed, 11 insertions(+), 20 deletions(-) diff --git a/htdocs/css/admin.css b/htdocs/css/admin.css index fa2b020..4dd3f80 100644 --- a/htdocs/css/admin.css +++ b/htdocs/css/admin.css @@ -1,11 +1,6 @@ @import url("openwebrx-header.css"); @import url("openwebrx-globals.css"); -/* expandable photo not implemented in admin area page */ -#webrx-top-photo-clip { - max-height: 67px; -} - body { background-color: #2e2e2e; color: #DDD; diff --git a/htdocs/css/features.css b/htdocs/css/features.css index 8131da6..d52cae9 100644 --- a/htdocs/css/features.css +++ b/htdocs/css/features.css @@ -1,11 +1,6 @@ @import url("openwebrx-header.css"); @import url("openwebrx-globals.css"); -/* expandable photo not implemented on features page */ -#webrx-top-photo-clip { - max-height: 67px; -} - h1 { text-align: center; margin: 50px 0; diff --git a/htdocs/css/login.css b/htdocs/css/login.css index 84a2430..c50341e 100644 --- a/htdocs/css/login.css +++ b/htdocs/css/login.css @@ -1,12 +1,6 @@ @import url("openwebrx-header.css"); @import url("openwebrx-globals.css"); -/* expandable photo not implemented on login page */ -#webrx-top-photo-clip { - max-height: 67px; -} - - body { background-color: #2e2e2e; } diff --git a/htdocs/features.html b/htdocs/features.html index 8ddc941..2a97cd1 100644 --- a/htdocs/features.html +++ b/htdocs/features.html @@ -6,6 +6,7 @@ + ${header} diff --git a/htdocs/generalsettings.html b/htdocs/generalsettings.html index edd52e7..ae0656c 100644 --- a/htdocs/generalsettings.html +++ b/htdocs/generalsettings.html @@ -6,6 +6,7 @@ + diff --git a/htdocs/lib/Header.js b/htdocs/lib/Header.js index a81a682..d1c6a30 100644 --- a/htdocs/lib/Header.js +++ b/htdocs/lib/Header.js @@ -62,4 +62,8 @@ $.fn.header = function() { this.data('header', new Header(this)); } return this.data('header'); -}; \ No newline at end of file +}; + +$(function(){ + $('#webrx-top-container').header(); +}); diff --git a/htdocs/login.html b/htdocs/login.html index b86efd9..9cbeacc 100644 --- a/htdocs/login.html +++ b/htdocs/login.html @@ -5,6 +5,8 @@ + + diff --git a/htdocs/openwebrx.js b/htdocs/openwebrx.js index a6771f8..dadd7e3 100644 --- a/htdocs/openwebrx.js +++ b/htdocs/openwebrx.js @@ -1328,7 +1328,6 @@ function openwebrx_init() { $('.webrx-mouse-freq').frequencyDisplay(); $('#openwebrx-panel-receiver').demodulatorPanel(); window.addEventListener("resize", openwebrx_resize); - $('#webrx-top-container').header(); bookmarks = new BookmarkBar(); initSliders(); } diff --git a/htdocs/sdrsettings.html b/htdocs/sdrsettings.html index 51de0f0..08664fe 100644 --- a/htdocs/sdrsettings.html +++ b/htdocs/sdrsettings.html @@ -6,7 +6,7 @@ - + diff --git a/htdocs/settings.html b/htdocs/settings.html index 00fbe9e..6e6bd89 100644 --- a/htdocs/settings.html +++ b/htdocs/settings.html @@ -6,7 +6,7 @@ - +