(domRoot: JQuery, topBar: JQuery, hideable: JQuery)
| 41 | } |
| 42 | |
| 43 | export function updateAndCalcTopBarHeight(domRoot: JQuery, topBar: JQuery, hideable: JQuery): number { |
| 44 | let topBarHeight = 0; |
| 45 | if (!topBar.hasClass('d-none')) { |
| 46 | hideable.show(); |
| 47 | const topBarHeightMax = topBar.outerHeight(true) ?? 0; |
| 48 | hideable.hide(); |
| 49 | const topBarHeightMin = topBar.outerHeight(true) ?? 0; |
| 50 | topBarHeight = topBarHeightMin; |
| 51 | if (topBarHeightMin === topBarHeightMax) { |
| 52 | hideable.show(); |
| 53 | } |
| 54 | } |
| 55 | return topBarHeight; |
| 56 | } |
| 57 | |
| 58 | export function formatDateTimeWithSpaces(d: Date) { |
| 59 | const t = (x: string) => x.slice(-2); |
no test coverage detected