mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-12 19:21:33 +00:00
The official image from streamline does not currently work for the arm64 platform. As a temporary measure, the source code and docker build scripts have been lifted from the official images and are used to build locally. Some additional modifications are made to reduce overall image size, these are documented in docker/README.md
67 lines
1.8 KiB
JavaScript
Executable File
Vendored
67 lines
1.8 KiB
JavaScript
Executable File
Vendored
/**
|
|
* Creates `rowspan` cells in a column when there are two or more cells in a
|
|
* row with the same content, effectively grouping them together visually.
|
|
*
|
|
* **Note** - this plug-in currently only operates correctly with
|
|
* **server-side processing**.
|
|
*
|
|
* @name fnFakeRowspan
|
|
* @summary Create a rowspan for cells which share data
|
|
* @author Fredrik Wendel
|
|
*
|
|
* @param {interger} iColumn Column index to have row span
|
|
* @param {boolean} [bCaseSensitive=true] If the data check should be case
|
|
* sensitive or not.
|
|
* @returns {jQuery} jQuery instance
|
|
*
|
|
* @example
|
|
* $('#example').dataTable().fnFakeRowspan(3);
|
|
*/
|
|
|
|
jQuery.fn.dataTableExt.oApi.fnFakeRowspan = function ( oSettings, iColumn, bCaseSensitive ) {
|
|
/* Fail silently on missing/errorenous parameter data. */
|
|
if (isNaN(iColumn)) {
|
|
return false;
|
|
}
|
|
|
|
if (iColumn < 0 || iColumn > oSettings.aoColumns.length-1) {
|
|
alert ('Invalid column number choosen, must be between 0 and ' + (oSettings.aoColumns.length-1));
|
|
return false;
|
|
}
|
|
|
|
bCaseSensitive = (typeof(bCaseSensitive) != 'boolean' ? true : bCaseSensitive);
|
|
|
|
function fakeRowspan () {
|
|
var firstOccurance = null,
|
|
value = null,
|
|
rowspan = 0;
|
|
jQuery.each(oSettings.aoData, function (i, oData) {
|
|
var val = oData._aData[iColumn],
|
|
cell = oData.nTr.childNodes[iColumn];
|
|
/* Use lowercase comparison if not case-sensitive. */
|
|
if (!bCaseSensitive) {
|
|
val = val.toLowerCase();
|
|
}
|
|
/* Reset values on new cell data. */
|
|
if (val != value) {
|
|
value = val;
|
|
firstOccurance = cell;
|
|
rowspan = 0;
|
|
}
|
|
|
|
if (val == value) {
|
|
rowspan++;
|
|
}
|
|
|
|
if (firstOccurance !== null && val == value && rowspan > 1) {
|
|
oData.nTr.removeChild(cell);
|
|
firstOccurance.rowSpan = rowspan;
|
|
}
|
|
});
|
|
}
|
|
|
|
oSettings.aoDrawCallback.push({ "fn": fakeRowspan, "sName": "fnFakeRowspan" });
|
|
|
|
return this;
|
|
};
|