Branded UI Fixed

This commit is contained in:
2025-09-28 04:32:17 +00:00
parent 0f0087d756
commit 3c281adb2c
193 changed files with 19151 additions and 0 deletions

Binary file not shown.

View File

@@ -0,0 +1,4 @@
{
"index-version" : 2,
"files" : []
}

View File

@@ -0,0 +1,2 @@
anchors.options.visible = 'hover'
anchors.add()

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,30 @@
// Tooltip
$('.btn-copy').tooltip({
trigger: 'hover',
placement: 'bottom'
});
function setTooltip(message) {
button = $(event.target)
oldMsg = button.tooltip().attr('data-original-title')
button.tooltip()
.attr('data-original-title', message)
.tooltip('show');
setTimeout(function() {
button.tooltip()
.attr('data-original-title', oldMsg)
.tooltip('hide');
}, 1000);
}
// Clipboard
var clipboard = new ClipboardJS('.btn-copy');
clipboard.on('success', function(e) {
setTooltip('Copied!');
});
clipboard.on('error', function(e) {
setTooltip('Failed :( - copy manually');
});

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,186 @@
let fhirTableLoading = false;
function getCollapsed(store, row) {
return sessionStorage.getItem("ft-"+store+row);
}
function setCollapsed(store, row, value) {
if (!fhirTableLoading) {
if (value == 'collapsed') {
sessionStorage.setItem("ft-"+store+row, value);
} else {
sessionStorage.removeItem("ft-"+store+row);
}
}
}
function fhirTableRowExpand(table, id) {
var rows = table.getElementsByTagName('tr');
var row, i;
var noex = null;
for (i = 0; i < rows.length; i++) {
row = rows[i];
if (row.id.startsWith(id)) {
if (noex && row.id.startsWith(noex)) {
// do nothing
} else {
noex = null;
if (row.id != id) {
row.style.display = "";
if (row.className == 'closed') {
noex = row.id;
}
}
}
}
}
}
function fhirTableRowCollapse(table, id) {
var rows = table.getElementsByTagName('tr');
var row, i;
for (i = 0; i < rows.length; i++) {
row = rows[i];
if (row.id.startsWith(id) && row.id != id) {
row.style.display = "none";
}
}
}
function findElementFromFocus(src, name) {
e = src;
while (e && e.tagName != name) {
e = e.parentNode;
}
return e;
}
// src - a handle to an element in a row in the table
function tableRowAction(src) {
let table = findElementFromFocus(src, "TABLE");
let row = findElementFromFocus(src, "TR");
let td = row.firstElementChild;
let state = row.className;
if (state == "closed") {
fhirTableRowExpand(table, row.id);
row.className = "open";
src.src = src.src.replace("-closed", "-open");
td.style.backgroundImage = td.style.backgroundImage.replace('0.png', '1.png');
setCollapsed(table.id, row.id, 'expanded');
} else {
fhirTableRowCollapse(table, row.id);
row.className = "closed";
src.src = src.src.replace("-open", "-closed");
td.style.backgroundImage = td.style.backgroundImage.replace('1.png', '0.png');
setCollapsed(table.id, row.id, 'collapsed');
}
}
// src - a handle to an element in a row in the table
function fhirTableInit(src) {
let table = findElementFromFocus(src, "TABLE");
var rows = table.getElementsByTagName('tr');
var row, i;
fhirTableLoading = true;
for (i = 0; i < rows.length; i++) {
row = rows[i];
var id = row.id;
if (getCollapsed(table.id, id) == 'collapsed') {
let td = row.firstElementChild;
let e = td.firstElementChild;
while (e.tagName != "IMG" || !(e.src.includes("join"))) {
e = e.nextSibling;
}
tableRowAction(e);
}
}
fhirTableLoading = false;
}
function filterTree(table, text) {
if (!text) {
for (let i = 1; i < table.rows.length-1; i++) {
const row = table.rows[i];
row.style.display = '';
const cell = row.cells[4];
cell.style.display = '';
}
} else if (text.startsWith('.')) {
text = text.substring(1);
for (let i = 1; i < table.rows.length-1; i++) {
const row = table.rows[i];
let rowText = row.textContent || row.innerText
rowText = rowText.toLowerCase();
// Check if row contains the search text
if (rowText.includes(text)) {
let id = row.id;
while (id) {
document.getElementById(id).style.display = '';
id = id.substring(0, id.length - 1);
}
} else {
// Hide the row
row.style.display = 'none';
}
}
} else {
for (let i = 1; i < table.rows.length-1; i++) {
const row = table.rows[i];
const cell = row.cells[4];
let cellText = cell.textContent || cell.innerText
cellText = cellText.toLowerCase();
// Check if row contains the search text
if (cellText.includes(text)) {
// Show the row
cell.style.display = '';
} else {
// Hide the row
cell.style.display = 'none';
}
}
}
}
function filterDesc(table, prop, value, panel) {
let v = 'none';
if (value) {
v = '';
}
panel.style.display = 'none';
localStorage.setItem('ht-table-states-'+prop, value);
for (let i = 1; i < table.rows.length-1; i++) {
const row = table.rows[i];
const cell = row.cells[4];
if (cell) {
for (let i = 0; i < cell.children.length; i++) {
const childElement = cell.children[i];
let classes = childElement.getAttribute('class');
if (classes.includes(prop)) {
childElement.style.display = v;
}
}
}
}
}
function hide() {
if (visiblePanel) {
visiblePanel.style.display = 'none';
visiblePanel = null;
}
}
function showPanel(button, table, panel) {
const rect1 = button.getBoundingClientRect();
panel.style.top = (rect1.bottom+10) + 'px';
panel.style.left = (rect1.left) + 'px';
panel.style.display = 'block';
visiblePanel = panel;
window.addEventListener('scroll', hide);
window.addEventListener('click', hide);
event.stopPropagation();
}

View File

@@ -0,0 +1,2 @@
// IT'S ALL JUST FOR FHIR SITE!
// ++++++++++++++++++++++++++++++++++++++++++

View File

@@ -0,0 +1,8 @@
/*
HTML5 Shiv v3.6.2pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
*/
(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();
a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x<style>article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}</style>";
c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="<xyz></xyz>";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||
"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",version:"3.6.2pre",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);if(g)return a.createDocumentFragment();
for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d<h;d++)c.createElement(e[d]);return c}};l.html5=e;q(f)})(this,document);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,12 @@
document.addEventListener('DOMContentLoaded', function() {
const mermaidCodes = document.querySelectorAll('pre.language-mermaid code.language-mermaid');
Array.from(mermaidCodes).forEach(function(code) {
const pre = code.parentNode;
const content = code.textContent;
const mermaidDiv = document.createElement('div');
mermaidDiv.className = 'mermaid';
mermaidDiv.textContent = content;
pre.parentNode.replaceChild(mermaidDiv, pre);
});
mermaid.initialize({ securityLevel: 'sandbox' });
});

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,67 @@
/* eslint-disable regexp/prefer-d */
// https://hl7.org/fhirpath
Prism.languages.fhirpath = {
'comment': {
pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,
greedy: true
},
'constant': [
// This is where I'm going to put in the literals for datetime/date/time/quantity
/@[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9](:[0-9][0-9])?(\.[0-9]+)?(Z|[+\-][0-9][0-9]:[0-9][0-9])?/,
/@[0-9][0-9][0-9][0-9](-[0-9][0-9](-[0-9][0-9])?)?/,
/@T[0-9][0-9]:[0-9][0-9](:[0-9][0-9])?(\.[0-9]+)?/,
/\b\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b\s+(years|months|weeks|days|hours|minutes|seconds|milliseconds|year|month|week|day|hour|minute|second|millisecond)\b/
],
'number': [
/\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,
/\b\d+(?:\.\d+)?L\b/i
],
'string': {
pattern: /(^|[^\\])'(?:\\.|[^\\'\r\n])*'(?!\s*:)/,
lookbehind: true,
greedy: true
},
'punctuation': /[()[\],.]/,
'operator': /(>=|<=|!=|!~|[|\\+\-=<>~/*&])/,
'keyword': [
/\b(and|as|contains|day|days|div|hour|hours|implies|in|\$index|is|millisecond|milliseconds|minute|minutes|mod|month|months|or|second|seconds|\$this|\$total|week|weeks|xor|year|years)\b/,
/\{\s*\}/
],
'boolean': /\b(?:false|true)\b/,
'builtin': [
// section 5.1 http://hl7.org/fhirpath/#existence
/\b(empty|exists|all|allTrue|anyTrue|allFalse|anyFalse|subsetOf|supersetOf|count|distinct|isDistinct)\b/,
// section 5.2 http://hl7.org/fhirpath/#filtering-and-projection
/\b(where|select|repeat|ofType)\b/,
// section 5.3 http://hl7.org/fhirpath/#subsetting
/\b(single|first|last|tail|skip|take|intersect|exclude)\b/,
// section 5.4
/\b(union|combine)\b/,
// section 5.5
/\b(iif|toBoolean|convertsToBoolean|toInteger|convertsToInteger|toDate|convertsToDate|toDateTime|convertsToDateTime|toDecimal|convertsToDecimal|toQuantity|convertsToQuantity|toString|convertsToString|toTime|convertsToTime)\b/,
// section 5.6
/\b(indexOf|substring|startsWith|endsWith|contains|upper|lower|replace|matches|replaceMatches|length|toChars|split|join|encode|decode)\b/,
// section 5.7
/\b(abs|ceiling|exp|floor|ln|log|power|round|sqrt|truncate)\b/,
// section 5.8
/\b(children|descendants)\b/,
// section 5.9 (not is in section 6.5)
/\b(trace|now|timeOfDay|today|not)\b/,
// section 6.3
/\b(as|is)\b/,
// section 7
/\b(aggregate)\b/
],
'variable': [
/(%\w+)\b/,
/(%`(?:\w|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[ \-\."\\\/fnrt])+`)/ // this isn;t quite right, but it's a start
],
'identifier': [
{
pattern: /`(?:\w|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[ \-\."\\\/fnrt])+`/,
// lookbehind: true,
greedy: true
},
/\b([A-Za-z]|_)([A-Za-z0-9]|_)*\b/,
]
};

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
fhir-table-scripts.js and fhir.js are not used in the base template, however they're needed by the FHIR-extensions IG, and are included here because this is the 'trusted' ig that defines them

View File

@@ -0,0 +1,6 @@
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */
window.matchMedia=window.matchMedia||function(a){"use strict";var c,d=a.documentElement,e=d.firstElementChild||d.firstChild,f=a.createElement("body"),g=a.createElement("div");return g.id="mq-test-1",g.style.cssText="position:absolute;top:-100em",f.style.background="none",f.appendChild(g),function(a){return g.innerHTML='&shy;<style media="'+a+'"> #mq-test-1 { width: 42px; }</style>',d.insertBefore(f,e),c=42===g.offsetWidth,d.removeChild(f),{matches:c,media:a}}}(document);
/*! Respond.js v1.1.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */
(function(a){"use strict";function x(){u(!0)}var b={};a.respond=b,b.update=function(){},b.mediaQueriesSupported=a.matchMedia&&a.matchMedia("only all").matches,b.mediaQueriesSupported;var q,r,t,c=a.document,d=c.documentElement,e=[],f=[],g=[],h={},i=30,j=c.getElementsByTagName("head")[0]||d,k=c.getElementsByTagName("base")[0],l=j.getElementsByTagName("link"),m=[],n=function(){for(var b=0;l.length>b;b++){var c=l[b],d=c.href,e=c.media,f=c.rel&&"stylesheet"===c.rel.toLowerCase();d&&f&&!h[d]&&(c.styleSheet&&c.styleSheet.rawCssText?(p(c.styleSheet.rawCssText,d,e),h[d]=!0):(!/^([a-zA-Z:]*\/\/)/.test(d)&&!k||d.replace(RegExp.$1,"").split("/")[0]===a.location.host)&&m.push({href:d,media:e}))}o()},o=function(){if(m.length){var a=m.shift();v(a.href,function(b){p(b,a.href,a.media),h[a.href]=!0,setTimeout(function(){o()},0)})}},p=function(a,b,c){var d=a.match(/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi),g=d&&d.length||0;b=b.substring(0,b.lastIndexOf("/"));var h=function(a){return a.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+b+"$2$3")},i=!g&&c;b.length&&(b+="/"),i&&(g=1);for(var j=0;g>j;j++){var k,l,m,n;i?(k=c,f.push(h(a))):(k=d[j].match(/@media *([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1,f.push(RegExp.$2&&h(RegExp.$2))),m=k.split(","),n=m.length;for(var o=0;n>o;o++)l=m[o],e.push({media:l.split("(")[0].match(/(only\s+)?([a-zA-Z]+)\s?/)&&RegExp.$2||"all",rules:f.length-1,hasquery:l.indexOf("(")>-1,minw:l.match(/\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:l.match(/\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},s=function(){var a,b=c.createElement("div"),e=c.body,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",e||(e=f=c.createElement("body"),e.style.background="none"),e.appendChild(b),d.insertBefore(e,d.firstChild),a=b.offsetWidth,f?d.removeChild(e):e.removeChild(b),a=t=parseFloat(a)},u=function(a){var b="clientWidth",h=d[b],k="CSS1Compat"===c.compatMode&&h||c.body[b]||h,m={},n=l[l.length-1],o=(new Date).getTime();if(a&&q&&i>o-q)return clearTimeout(r),r=setTimeout(u,i),void 0;q=o;for(var p in e)if(e.hasOwnProperty(p)){var v=e[p],w=v.minw,x=v.maxw,y=null===w,z=null===x,A="em";w&&(w=parseFloat(w)*(w.indexOf(A)>-1?t||s():1)),x&&(x=parseFloat(x)*(x.indexOf(A)>-1?t||s():1)),v.hasquery&&(y&&z||!(y||k>=w)||!(z||x>=k))||(m[v.media]||(m[v.media]=[]),m[v.media].push(f[v.rules]))}for(var B in g)g.hasOwnProperty(B)&&g[B]&&g[B].parentNode===j&&j.removeChild(g[B]);for(var C in m)if(m.hasOwnProperty(C)){var D=c.createElement("style"),E=m[C].join("\n");D.type="text/css",D.media=C,j.insertBefore(D,n.nextSibling),D.styleSheet?D.styleSheet.cssText=E:D.appendChild(c.createTextNode(E)),g.push(D)}},v=function(a,b){var c=w();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))},w=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}();n(),b.update=n,a.addEventListener?a.addEventListener("resize",x,!1):a.attachEvent&&a.attachEvent("onresize",x)})(this);

View File

@@ -0,0 +1,20 @@
try {
var currentTabIndex = sessionStorage.getItem('fhir-resource-tab-index');
} catch(exception) {
}
if (!currentTabIndex)
currentTabIndex = '0';
$( '#tabs' ).tabs({
active: currentTabIndex,
activate: function( event, ui ) {
var active = $('.selector').tabs('option', 'active');
currentTabIndex = ui.newTab.index();
document.activeElement.blur();
try {
sessionStorage.setItem('fhir-resource-tab-index', currentTabIndex);
} catch(exception) {
}
}
});

View File

@@ -0,0 +1,20 @@
$(document).ready(function(){
$(window).scroll(function () {
if ($(this).scrollTop() > 50) {
$('#back-to-top').fadeIn();
} else {
$('#back-to-top').fadeOut();
}
});
// scroll body to 0px on click
$('#back-to-top').click(function () {
$('#back-to-top').tooltip('hide');
$('body,html').animate({
scrollTop: 0
}, 800);
return false;
});
$('#back-to-top').tooltip('show');
});

View File

@@ -0,0 +1,5 @@
$(document).ready(function(){
if(window.location.hash != "") {
$('a[href="' + window.location.hash + '"]').click()
}
});

File diff suppressed because one or more lines are too long