From 3670a61e3b5ac85de7e94d34ff3c1148ccfa36a3 Mon Sep 17 00:00:00 2001 From: Mark Williams <mark.williams@diamond.ac.uk> Date: Thu, 29 Feb 2024 11:52:09 +0000 Subject: [PATCH 1/2] LIMS-1204: Remove log area from the top of active visits --- client/src/css/partials/_content.scss | 11 ++++------- client/src/js/modules/dc/datacollections.js | 10 +--------- client/src/js/templates/dc/dclist.html | 1 - client/src/js/templates/status.html | 9 +++------ client/src/js/templates/types/gen/dc/dclist.html | 1 - client/src/js/templates/types/xpdf/dc/dclist.html | 3 +-- client/src/js/views/status.js | 12 +++++++++--- 7 files changed, 18 insertions(+), 29 deletions(-) diff --git a/client/src/css/partials/_content.scss b/client/src/css/partials/_content.scss index 99767d875..6a998ad1c 100644 --- a/client/src/css/partials/_content.scss +++ b/client/src/css/partials/_content.scss @@ -19,6 +19,10 @@ .content { padding-bottom: 1%; + .nopadding { + padding-bottom: 0%; + } + & > h1 { padding: 10px 0; margin-bottom: 15px; @@ -1506,13 +1510,6 @@ div.status { } } -.status.three { - .webcam { - @mixin cols 3,0,0.5%; - float: left; - } -} - .oav { display: block; margin: auto; diff --git a/client/src/js/modules/dc/datacollections.js b/client/src/js/modules/dc/datacollections.js index 1ba3d8e68..ff0e23713 100644 --- a/client/src/js/modules/dc/datacollections.js +++ b/client/src/js/modules/dc/datacollections.js @@ -3,7 +3,6 @@ define(['marionette', 'modules/dc/dclist', 'modules/dc/views/samplechanger', - 'modules/dc/views/dclog', 'views/status', 'views/search', @@ -21,7 +20,7 @@ define(['marionette', 'templates/dc/dclist.html', ], function(Marionette, Pages, DCListView, - SampleChanger, DCLogView, StatusView, Search, Filter, StackView, DialogView, QueueBuilderView, UserView, DewarsView, + SampleChanger, StatusView, Search, Filter, StackView, DialogView, QueueBuilderView, UserView, DewarsView, ReprocessOverview, template) { @@ -40,7 +39,6 @@ function(Marionette, Pages, DCListView, search: '.srch', type: '.type', sc: '.sc', - log: '.lg', status: '.st', use: '.usage', }, @@ -154,12 +152,6 @@ function(Marionette, Pages, DCListView, // Sample changer console.log('get sc', this.getOption('sampleChanger')) if (this.getOption('sampleChanger') && this.options.params.visit && !app.mobile()) this.sc.show(new SampleChanger({ visit: this.options.params.visit, dcs: this.collection, bl: this.model.get('BL') })) - - // Log View - this.log.show(new DCLogView({ collection: this.collection })) - - // Status Display - } if (this.model && this.model.get('CAMS') == 1) { diff --git a/client/src/js/templates/dc/dclist.html b/client/src/js/templates/dc/dclist.html index ba1a31e3f..68559ccec 100644 --- a/client/src/js/templates/dc/dclist.html +++ b/client/src/js/templates/dc/dclist.html @@ -50,7 +50,6 @@ <h1 class="message nou"><a class="button" href="/dc<% if (IS_VISIT) { %>/visit/< <div class="st"></div> <div class="sc"></div> - <div class="lg"></div> <div class="srch"></div> <div class="filter type"></div> diff --git a/client/src/js/templates/status.html b/client/src/js/templates/status.html index d4051c238..ddc72fbd2 100644 --- a/client/src/js/templates/status.html +++ b/client/src/js/templates/status.html @@ -1,11 +1,8 @@ -<h1 class="status"><%-BL%> Webcams & Beamline Status</h1> -<div class="status <% if (BL =='i02') { %>three<% } %>"> +<h1 class="status"><span class="showhide">Show</span> <%-BL%> Webcams & Beamline Status <span class="arrows">⮟</span></h1> +<div class="status"> <div class="pvs"></div> <div class="streamed-pvs"></div> <div class="webcam"><img src="#" alt="webcam1" /></div> <div class="webcam"><img src="#" alt="webcam2" /></div> - <% if (BL =='i02') { %> - <div class="webcam"><img src="#" alt="webcam3" /></div> - <% } %> -</div> \ No newline at end of file +</div> diff --git a/client/src/js/templates/types/gen/dc/dclist.html b/client/src/js/templates/types/gen/dc/dclist.html index e9f9d9078..6b1db9692 100644 --- a/client/src/js/templates/types/gen/dc/dclist.html +++ b/client/src/js/templates/types/gen/dc/dclist.html @@ -30,7 +30,6 @@ <h1 class="message nou"><a class="button" href="/dc<% if (IS_VISIT) { %>/visit/< <% if (IS_PJ) { %><h2>Processing Job</h2><% } %> <div class="st"></div> - <div class="lg"></div> <div class="srch clearfix"></div> diff --git a/client/src/js/templates/types/xpdf/dc/dclist.html b/client/src/js/templates/types/xpdf/dc/dclist.html index 1257e93e2..d5003779c 100644 --- a/client/src/js/templates/types/xpdf/dc/dclist.html +++ b/client/src/js/templates/types/xpdf/dc/dclist.html @@ -22,11 +22,10 @@ <h1 class="message nou"><a class="button" href="/dc<% if (IS_VISIT) { %>/visit/< <% if (IS_PJ) { %><h2>Processing Job</h2><% } %> <div class="st"></div> - <div class="lg"></div> <div class="srch clearfix"></div> <div class="page_wrap one"></div> <div class="data_collections"></div> <div class="page_wrap two"></div> - \ No newline at end of file + diff --git a/client/src/js/views/status.js b/client/src/js/views/status.js index 65543cb94..9e21ed831 100644 --- a/client/src/js/views/status.js +++ b/client/src/js/views/status.js @@ -8,7 +8,7 @@ define(['marionette', return Marionette.LayoutView.extend({ template: template, - className: 'content', + className: 'content nopadding', templateHelpers: function() { return { BL: this.getOption('bl'), @@ -22,11 +22,13 @@ define(['marionette', regions: { pvs: '.pvs', - 'streamed-pvs': '.streamed-pvs' + 'streamed-pvs': '.streamed-pvs', }, ui: { status: 'div.status', + showhide: '.showhide', + arrows: '.arrows', }, // Handler for the camera feed timeout function @@ -39,6 +41,8 @@ define(['marionette', this.ui.status.slideToggle('fast', 'swing', function() { if (self.ui.status.is(':visible')) { + self.ui.showhide.html('Hide') + self.ui.arrows.html('⮝') self.pvs.show(new PVView({ bl: self.getOption('bl') })) self['streamed-pvs'].show(new StreamedPVView({ bl: self.getOption('bl') })) self.$el.find('.webcam img').each(function(i,w) { @@ -59,6 +63,8 @@ define(['marionette', if (self.timeoutHandler) { clearTimeout(self.timeoutHandler) } + self.ui.showhide.html('Show') + self.ui.arrows.html('⮟') self.pvs.empty() self.$el.find('.webcam img').each(function(i,w) { $(w).attr('src', '') @@ -76,4 +82,4 @@ define(['marionette', }) -}) \ No newline at end of file +}) From 519547b017f2b38a02222f12cd270911ad6a6962 Mon Sep 17 00:00:00 2001 From: Mark Williams <mark.williams@diamond.ac.uk> Date: Thu, 29 Feb 2024 11:54:28 +0000 Subject: [PATCH 2/2] LIMS-1204: Remove dclog.js --- client/src/js/modules/dc/views/dclog.js | 40 ------------------------- 1 file changed, 40 deletions(-) delete mode 100644 client/src/js/modules/dc/views/dclog.js diff --git a/client/src/js/modules/dc/views/dclog.js b/client/src/js/modules/dc/views/dclog.js deleted file mode 100644 index 1fb1144a3..000000000 --- a/client/src/js/modules/dc/views/dclog.js +++ /dev/null @@ -1,40 +0,0 @@ -define(['marionette'], function(Marionette) { - - - var LogItem = Marionette.ItemView.extend({ - tagName: 'li', - getTemplate: function() { - var temps = { - data: '<span class="title">New data collection</span> <a href="#"><%-DIR%><%-FILETEMPLATE%></a>', - grid: '<span class="title">New grid scan</span> <a href="#"><%-DIR%><%-FILETEMPLATE%></a>', - edge: '<span class="title">New edge scan</span> <a href="#"><%-DIR%></a>', - mca: '<span class="title">New MCA fluorescence spectrum</span> <a href="#"><%-DIR%></a>', - load: '<span class="title">New sample loaded</span> <a href="#">Puck: <%-EXPOSURETIME%> Pin: <%-RESOLUTION%> Barcode: <%-DIR%></a>', - action: '<span class="title">New sample action</span> <a href="#"><%-IMP%></a>', - } - - return _.template(this.model.get('ST').replace(/\d+-\d+-\d+ /, '')+' - '+temps[this.model.get('TYPE')]) - }, - - events: { - 'click a': 'gotoEvent' - }, - - gotoEvent: function(e) { - e.preventDefault() - var pos = $('.data_collection[dcid="'+this.model.get('ID')+'"]').offset().top - $('body').animate({scrollTop: pos}, 300); - }, - }) - - - - return Marionette.CompositeView.extend({ - template: _.template('<h1>Log</h1><ul></ul>'), - className: 'log border', - childView: LogItem, - childViewContainer: 'ul', - }) - - -}) \ No newline at end of file