From 1951cd0294c2e6a37d61cbaf61bbded4a3b778e7 Mon Sep 17 00:00:00 2001 From: Mark Williams Date: Tue, 17 Sep 2024 16:52:25 +0100 Subject: [PATCH 1/3] LIMS-380: Fix position of autoPROC images --- client/src/js/views/log.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/client/src/js/views/log.js b/client/src/js/views/log.js index 88db1ab96..b9fab18f2 100644 --- a/client/src/js/views/log.js +++ b/client/src/js/views/log.js @@ -7,8 +7,15 @@ define(['marionette', 'views/dialog', 'utils'], function(Marionette, DialogView, initialize: function(options) { this.url = options.url this.load() - this.iframe = $( - ``) + this.iframe = $(``) + $(window).on("resize", this, this.onResize); + }, + + onResize: function(event) { + parent_el = document.getElementById('dialog') + iframe_el = event.data.iframe[0] + iframe_el.style.height = parseInt(parent_el.style.height)-10+'px' + iframe_el.style.width = parseInt(parent_el.style.width)-10+'px' }, // Override existing dialogOptions of Dialog View @@ -124,4 +131,4 @@ define(['marionette', 'views/dialog', 'utils'], function(Marionette, DialogView, }) -}) \ No newline at end of file +}) From dae3ef6e0df1c8094aa0dbf0a014306b1be5217a Mon Sep 17 00:00:00 2001 From: Mark Williams Date: Thu, 19 Sep 2024 17:30:46 +0100 Subject: [PATCH 2/3] LIMS-380: Just use iframe size of 98% --- client/src/js/views/log.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/client/src/js/views/log.js b/client/src/js/views/log.js index b9fab18f2..e23dd7af0 100644 --- a/client/src/js/views/log.js +++ b/client/src/js/views/log.js @@ -7,15 +7,7 @@ define(['marionette', 'views/dialog', 'utils'], function(Marionette, DialogView, initialize: function(options) { this.url = options.url this.load() - this.iframe = $(``) - $(window).on("resize", this, this.onResize); - }, - - onResize: function(event) { - parent_el = document.getElementById('dialog') - iframe_el = event.data.iframe[0] - iframe_el.style.height = parseInt(parent_el.style.height)-10+'px' - iframe_el.style.width = parseInt(parent_el.style.width)-10+'px' + this.iframe = $(``) }, // Override existing dialogOptions of Dialog View From 8dd30c7ac98272d34b5311259b42bbcbb2018724 Mon Sep 17 00:00:00 2001 From: Guilherme Francisco Date: Fri, 20 Sep 2024 09:38:53 +0100 Subject: [PATCH 3/3] Set width/height to percentage value (#838) --- client/src/js/views/log.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/client/src/js/views/log.js b/client/src/js/views/log.js index e23dd7af0..54d25ae47 100644 --- a/client/src/js/views/log.js +++ b/client/src/js/views/log.js @@ -7,7 +7,7 @@ define(['marionette', 'views/dialog', 'utils'], function(Marionette, DialogView, initialize: function(options) { this.url = options.url this.load() - this.iframe = $(``) + this.iframe = $(``) }, // Override existing dialogOptions of Dialog View @@ -116,9 +116,8 @@ define(['marionette', 'views/dialog', 'utils'], function(Marionette, DialogView, onRender: function() { this.$el.append(this.iframe) - this.$el.find('iframe').css('width', $(window).width()*(app.mobile() ? 0.8 : 0.5)) - this.$el.find('iframe').css('height', $(window).height()*(app.mobile() ? 0.8 : 0.5)) - + this.$el.find('iframe').css('width', "99%") + this.$el.find('iframe').css('height', "98%") } })