diff --git a/apps/Info.html b/apps/Info.html index 0d5c7ba6c..49f68f817 100644 --- a/apps/Info.html +++ b/apps/Info.html @@ -1,12 +1,16 @@ - + - + + + + @@ -19,6 +23,8 @@ integrity="sha384-wEmeIV1mKuiNpC+IOBjI7aAzPcEZeedi5yW5f2yOq55WWLwNGmvvx4Um1vskeMj0" crossorigin="anonymous"> + + + - .btns { - display: flex; - margin: 0 20px; - } - .btnn{ - margin: 10px 180px; - } - .file { - margin-top: 20px; - } - .slide { - margin:5px; - } -
diff --git a/apps/redir.html b/apps/redir.html index f0f5b9d5b..3c121d4da 100644 --- a/apps/redir.html +++ b/apps/redir.html @@ -1,4 +1,4 @@ - + diff --git a/apps/segment/segment.css b/apps/segment/segment.css index 63031bf5a..111a345b3 100644 --- a/apps/segment/segment.css +++ b/apps/segment/segment.css @@ -28,7 +28,7 @@ input:focus:invalid { } .error{ - color: yellow; + color: red; } .switch { diff --git a/apps/segment/segment.html b/apps/segment/segment.html index d151c635c..b6debc055 100644 --- a/apps/segment/segment.html +++ b/apps/segment/segment.html @@ -1,5 +1,5 @@ - + diff --git a/apps/segment/segment.js b/apps/segment/segment.js index e164cbb06..46c92240f 100644 --- a/apps/segment/segment.js +++ b/apps/segment/segment.js @@ -313,7 +313,7 @@ async function initUIcomponents() { value: 'bugs', type: 'btn', callback: () => { - window.open('https://goo.gl/forms/mgyhx4ADH0UuEQJ53', '_blank').focus(); + window.open('https://github.com/camicroscope/caMicroscope/issues', '_blank').focus(); }, }, { @@ -371,6 +371,10 @@ function initCore() { } else { $D.params.data = e; } + $CAMIC.viewer.addHandler('open-failed', function(e) { + console.error(e.message, e); + redirect($D.pages.table, e.message, 5); + }); }); $CAMIC.viewer.addOnceHandler('open', function(e) { diff --git a/apps/signup/signup.css b/apps/signup/signup.css index 40d071bfb..2ee121828 100644 --- a/apps/signup/signup.css +++ b/apps/signup/signup.css @@ -98,6 +98,7 @@ body { nav li{ transition: background 0.5s; border-radius: 3px; + margin-left: 15px; } @@ -115,8 +116,20 @@ nav li:not(.active):hover a{ } .text-center{ + font-weight: bold; + font-size: 14pt; + color: black; cursor: pointer; } +#info{ + color: black; +} +#sub{ + font-weight:bold; + font-size: 14pt; + background-color: #17a2b8; + +} @media screen and (max-width:736px) { .signup-form { diff --git a/apps/signup/signup.html b/apps/signup/signup.html index 10243698a..ab7ddf4ff 100644 --- a/apps/signup/signup.html +++ b/apps/signup/signup.html @@ -1,11 +1,11 @@ - + - + CaMicroscope - User Signup @@ -16,6 +16,9 @@ integrity="sha384-wEmeIV1mKuiNpC+IOBjI7aAzPcEZeedi5yW5f2yOq55WWLwNGmvvx4Um1vskeMj0" crossorigin="anonymous"> + + + @@ -30,8 +33,6 @@ - - @@ -49,12 +50,12 @@ Slides -
@@ -97,23 +98,25 @@

User Signup



-
+ +
+
Already have an account?
-

+

Non-admin users have to submit a request ticket to admins to get their approval to signup new users. If you are an Admin, you can directly signup users.

-
Already have an account?
+
Already have an account?
+
- + + @@ -121,6 +124,13 @@

User Signup

integrity="sha384-p34f1UUtsS3wqzfto5wAAmdvj+osOnFyQFpp4Ua3gs/ZVWx6oOypYoCJhGGScy+8" crossorigin="anonymous"> + + + + + + + diff --git a/apps/table.css b/apps/table.css index 7653bb41e..d11cd8d75 100644 --- a/apps/table.css +++ b/apps/table.css @@ -87,8 +87,8 @@ nav li:not(.active):hover a { color: black !important; } -nav li:not(.active):hover{ - background: white; +nav li:not(.active):hover { + background: white; } .overall { @@ -100,11 +100,11 @@ nav li:not(.active):hover{ padding: 0 4px; } -.btn2{ - display: flex; - align-items: center; +.btn2 { + display: flex; + align-items: center; } -@media screen and (min-width: 480px){ +@media screen and (min-width: 480px) { .reload { display: block; } @@ -235,3 +235,29 @@ nav li:not(.active):hover{ .p { margin-bottom: 0; } + +.table { + border-collapse: separate; + border-spacing: 0; /* Adjust the value to control the spacing between cells */ +} + +td { + text-align: center; /* or left, right, justify, etc. */ +======= + +.d-md-inline-flex{ + display: flex; + justify-content: space-between; +} + +.close { + background-color: transparent; + border: none; +} + +.close > span { + line-height: 1; + font-size: 24px; + +} + diff --git a/apps/table.html b/apps/table.html index 0ad2b8cb1..8ac3b819d 100644 --- a/apps/table.html +++ b/apps/table.html @@ -1,12 +1,12 @@ - + + content='width=device-width, initial-scale=1, minimum-scale=1.0, maximum-scale=2.0'> @@ -24,7 +24,7 @@ - + CaMicroscope Data Table + + diff --git a/apps/user/user.css b/apps/user/user.css index b19c0ac44..9cf98df66 100644 --- a/apps/user/user.css +++ b/apps/user/user.css @@ -27,3 +27,8 @@ table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_1 { background-color: #007bff; opacity: 0.5; }*/ + + +#table { + width: 100%; +} diff --git a/apps/user/user.html b/apps/user/user.html index fbd28ec2e..484d71f6c 100644 --- a/apps/user/user.html +++ b/apps/user/user.html @@ -43,7 +43,7 @@
-
+
+ + + + + + + - - - - - - + diff --git a/apps/viewer/init.js b/apps/viewer/init.js index c948b229b..94f89c2b0 100644 --- a/apps/viewer/init.js +++ b/apps/viewer/init.js @@ -195,6 +195,10 @@ function initCore() { } $CAMIC.loadImg(function(e) { + $CAMIC.viewer.addHandler('open-failed', function(e) { + console.error(e.message, e); + redirect($D.pages.table, e.message, 5); + }); // image loaded if (e.hasError) { // if this is a retry, assume normal behavior (one retry per slide) @@ -253,6 +257,13 @@ function initCore() { attributes = data.properties.annotations; if (area) attributes.area = area; if (circumference) attributes.circumference = circumference; + + const states = StatesHelper.getCurrentStates(isImageCoordinate = true); + if (!states) return; + attributes.X = states.x; + attributes.Y = states.y; + attributes.zoom = states.z; + body = convertHumanAnnotationToPopupBody(attributes); if ( data.geometries && diff --git a/apps/viewer/viewer.html b/apps/viewer/viewer.html index 522ab8cd5..72b3fa822 100644 --- a/apps/viewer/viewer.html +++ b/apps/viewer/viewer.html @@ -1,5 +1,5 @@ - + diff --git a/common/PathdbMods.js b/common/PathdbMods.js index ee59ad32c..6e93c4786 100644 --- a/common/PathdbMods.js +++ b/common/PathdbMods.js @@ -57,14 +57,12 @@ async function PathDbMods() { throw "no iip path in pathdb data" } // identifier fields for display name - var subject_id = "" var image_id = "" - var study_id = "" if(data.field_subject_id && data.field_subject_id.length >= 1){ - subject_id = data.field_subject_id[0].value + x.specimen = data.field_subject_id[0].value } if(data.clinicaltrialsubjectid && data.clinicaltrialsubjectid.length >= 1){ - subject_id = data.clinicaltrialsubjectid[0].value + x.specimen = data.clinicaltrialsubjectid[0].value } if(data.field_image_id && data.field_image_id.length >=1){ image_id = data.field_image_id[0].value @@ -73,14 +71,14 @@ async function PathDbMods() { image_id = data.imageid[0].value } if(data.field_study_id && data.field_study_id.length >=1){ - study_id = data.field_study_id[0].value + x.study = data.field_study_id[0].value } if(data.studyid && data.studyid.length >=1){ - study_id = data.studyid[0].value + x.study = data.studyid[0].value } // if we have the triple, add it - if (subject_id && image_id && study_id){ - x.name = study_id + ' | ' + subject_id + ' | ' + image_id; + if (x.specimen && image_id && x.study){ + x.name = x.study + ' | ' + x.specimen + ' | ' + image_id; } return x } diff --git a/common/footer.js b/common/footer.js new file mode 100644 index 000000000..bf88171cd --- /dev/null +++ b/common/footer.js @@ -0,0 +1 @@ +$('#copy-right-text').html(`Copyright © ${new Date().getFullYear()} caMicroscope`) \ No newline at end of file diff --git a/common/util.js b/common/util.js index 30cc6473a..c695c5af0 100644 --- a/common/util.js +++ b/common/util.js @@ -343,6 +343,34 @@ function clickInsideElement(e, className) { return false; } + +function getUrlVars() { + var vars = {}; + window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function( + m, + key, + value, + ) { + vars[key.toLowerCase()] = value; + }); + + var state = Object.assign({}, vars); // Copy the initial state from vars + + return new Proxy({}, { + get: function(target, prop) { + return state[prop.toLowerCase()]; + }, + set: function(target, prop, value) { + state[prop.toLowerCase()] = value; + return true; + }, + deleteProperty: function(target, prop) { + delete state[prop.toLowerCase()]; + return true; + } + }); +} +/** function getUrlVars() { var vars = {}; var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function( @@ -354,6 +382,7 @@ function getUrlVars() { }); return vars; } +*/ function ImageFeaturesToVieweportFeatures(viewer, geometries) { const rs = { @@ -1013,6 +1042,11 @@ class Tracker { this.__period = period; this.__userId = userId; this.__slide = slide; + this.__viewId = this.generateViewId(); + } + + generateViewId() { + return crypto.randomUUID(); } start() { if (!this.__time) { @@ -1035,6 +1069,7 @@ class Tracker { ); this.__camic.store.addLog({ + viewId: this.__viewId, slide: this.__slide, user: this.__userId, x: Math.round(x), @@ -1347,3 +1382,17 @@ async function captureScreen(camic, { return canvas; } + +// footer content layout +const currentYear = new Date().getFullYear(); + +const footerContent = ` +

U24 CA18092401A1, Tools to Analyze Morphology and Spatially Mapped Molecular Data

+

Spot a Bug? Report it!

+
+ +`; + +function insertFooterLayout() { + document.getElementById('footer-layout').innerHTML = footerContent; +} diff --git a/core/CaMic.js b/core/CaMic.js index b9cf3daf5..55d3a5e5b 100644 --- a/core/CaMic.js +++ b/core/CaMic.js @@ -196,10 +196,14 @@ class CaMic { this.slideId = data['_id']['$oid']; this.slideName = data['name']; + // encode special characters but not dir slashes + let loc = data['location']; + loc = encodeURIComponent(loc); + loc = loc.replaceAll('%2F', '/'); // insert token if present - let iipSrvUrl = '../../img/IIP/raw/?DeepZoom='+ data['location'] + '.dzi'; + let iipSrvUrl = '../../img/IIP/raw/?DeepZoom='+ loc + '.dzi'; if (getCookie('token')) { - iipSrvUrl = '../../img/IIP/raw/?token=' + getCookie('token') + '&DeepZoom='+ data['location'] + '.dzi'; + iipSrvUrl = '../../img/IIP/raw/?token=' + getCookie('token') + '&DeepZoom='+ loc + '.dzi'; } this.viewer.open(iipSrvUrl); // set mpp diff --git a/index.html b/index.html index 3d29d9f3e..f0de0d86a 100644 --- a/index.html +++ b/index.html @@ -1,3 +1,3 @@ - +