Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
3388e45
Comment out onZoomOut() call in WebView setup
sande11 Nov 13, 2025
2b7a558
Dynamically scale chapter icons with font size
sande11 Nov 14, 2025
9c4b5ab
Scale decorative line in paragraphs with text zoom
sande11 Nov 14, 2025
daff949
Fix font scaling and update bookmark dialog layout
sande11 Nov 17, 2025
e67a226
Merge branch '141-bookmark-container-doesnt-expand-with-content' into…
sande11 Dec 16, 2025
ea29bd6
Update tables, charts, and UI for TB guide
sande11 Jan 9, 2026
b2191ca
updated html content , home screen font size and word wrap fixes, sea…
sande11 Jan 16, 2026
1171bed
Add font size settings and privacy policy support
sande11 Jan 19, 2026
19fed6b
Improve subchapter navigation and toolbar sync
sande11 Jan 19, 2026
361c945
Update TB/HIV treatment guidelines and chart references
sande11 Jan 20, 2026
e7a8632
Merge branch '131-update-tb-guide-android-app-ui-with-new-figma-desig…
sande11 Jan 20, 2026
c7c2352
Improve tooltip styling and positioning in LTBI tables
sande11 Jan 20, 2026
e590fb6
Adjust info icon size and fix section reference
sande11 Jan 28, 2026
c935c89
Update content for tables and guidelines
sande11 Jan 30, 2026
879f421
Add toolbar back handling for WebView in BodyFragment
sande11 Jan 30, 2026
8e1710d
Sanitize search input for SQLite FTS queries
sande11 Jan 30, 2026
533e219
Remove injected highlights on WebView search clear
sande11 Jan 30, 2026
e2425f5
Remove redundant DOM-injection search highlighting
sande11 Jan 30, 2026
f7fad04
Update HIV/TB guideline source links to clinicalinfo.hiv.gov
sande11 Feb 2, 2026
31a9ac0
Enable full debug symbols for debug NDK builds
sande11 Feb 2, 2026
ba9b162
Improve WebView in-page search robustness
sande11 Feb 4, 2026
1508dde
Bump BUILD_VERSION to 13
sande11 Feb 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ android {
versionName "1.13"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

// 16KB page size support
ndk {
abiFilters 'arm64-v8a', 'x86_64'
Expand All @@ -37,6 +37,9 @@ android {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.debug
ndk {
debugSymbolLevel 'FULL'
}
}
}
compileOptions {
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/assets/assets/ic_chart.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
173 changes: 116 additions & 57 deletions app/src/main/assets/assets/main.js
Original file line number Diff line number Diff line change
@@ -1,77 +1,136 @@
// function to handle tab switching for any table
function activateTab(tableContainer, tabIndex) {
if (!tableContainer) return;
if (!tableContainer) return;

tableContainer.querySelectorAll('.tab-button, .tab, .tab, .tab').forEach(tab => {
tab.classList.remove('active-option', 'active-tab');
tableContainer
.querySelectorAll(".tab-button, .tab, .tab, .tab")
.forEach((tab) => {
tab.classList.remove("active-option", "active-tab");
});

tableContainer.querySelectorAll('.option-content, .tab-content, .tab-content, .tab-content').forEach(content => {
content.classList.remove('active-option', 'active-tab');

tableContainer
.querySelectorAll(
".option-content, .tab-content, .tab-content, .tab-content"
)
.forEach((content) => {
content.classList.remove("active-option", "active-tab");
});

// Add active class to selected tab and content
const selectedTab = tableContainer.querySelectorAll('.tab-button, .tab, .tab, .tab')[tabIndex];
const selectedContent = tableContainer.querySelectorAll('.option-content, .tab-content, .tab-content, .tab-content')[tabIndex];

if (selectedTab) {
if (selectedTab.classList.contains('tab')) {
selectedTab.classList.add('active-tab');
} else if (selectedTab.classList.contains('tab-button')) {
selectedTab.classList.add('active-option');
} else if (selectedTab.classList.contains('tab')) {
selectedTab.classList.add('active-tab');
} else if (selectedTab.classList.contains('tab')) {
selectedTab.classList.add('active-tab');
}
// Add active class to selected tab and content
const selectedTab = tableContainer.querySelectorAll(
".tab-button, .tab, .tab, .tab"
)[tabIndex];
const selectedContent = tableContainer.querySelectorAll(
".option-content, .tab-content, .tab-content, .tab-content"
)[tabIndex];

if (selectedTab) {
if (selectedTab.classList.contains("tab")) {
selectedTab.classList.add("active-tab");
} else if (selectedTab.classList.contains("tab-button")) {
selectedTab.classList.add("active-option");
} else if (selectedTab.classList.contains("tab")) {
selectedTab.classList.add("active-tab");
} else if (selectedTab.classList.contains("tab")) {
selectedTab.classList.add("active-tab");
}
if (selectedContent) {
if (selectedContent.classList.contains('tab-content')) {
selectedContent.classList.add('active-tab');
} else if (selectedContent.classList.contains('option-content')) {
selectedContent.classList.add('active-option');
} else if (selectedContent.classList.contains('tab-content')) {
selectedContent.classList.add('active-tab');
} else if (selectedContent.classList.contains('tab-content')) {
selectedContent.classList.add('active-tab');
}
}

if (selectedContent) {
if (selectedContent.classList.contains("tab-content")) {
selectedContent.classList.add("active-tab");
} else if (selectedContent.classList.contains("option-content")) {
selectedContent.classList.add("active-option");
} else if (selectedContent.classList.contains("tab-content")) {
selectedContent.classList.add("active-tab");
} else if (selectedContent.classList.contains("tab-content")) {
selectedContent.classList.add("active-tab");
}
}
}

// Function to handle tab switching with event
function handleTabSwitch(event, tabIndex) {
// Get the clicked button from the event
const clickedButton = event.currentTarget;

const tableContainer = clickedButton.closest('.uk-overflow-auto');
if (!tableContainer) return;

// Get all tab buttons in this container
const tabButtons = tableContainer.querySelectorAll('.tab-button, .tab, .tab, .tab');

// Find the index of the clicked button within its container
const clickedIndex = Array.from(tabButtons).indexOf(clickedButton);

// Generate a unique ID for the container if it doesn't have one
if (!tableContainer.id) {
tableContainer.id = 'table-' + Math.random().toString(36).substr(2, 9);
}

// Switch to the correct tab
activateTab(tableContainer, clickedIndex);
// Get the clicked button from the event
const clickedButton = event.currentTarget;

const tableContainer = clickedButton.closest(".uk-overflow-auto");
if (!tableContainer) return;

// Get all tab buttons in this container
const tabButtons = tableContainer.querySelectorAll(
".tab-button, .tab, .tab, .tab"
);

// Find the index of the clicked button within its container
const clickedIndex = Array.from(tabButtons).indexOf(clickedButton);

// Generate a unique ID for the container if it doesn't have one
if (!tableContainer.id) {
tableContainer.id = "table-" + Math.random().toString(36).substr(2, 9);
}

// Switch to the correct tab
activateTab(tableContainer, clickedIndex);
}

function switchTab(tabIndex, event) {
handleTabSwitch(event, tabIndex);
handleTabSwitch(event, tabIndex);
}

// For Dropdown Togglers
function toggleItem(clickedTitle) {
const itemContent = clickedTitle.nextElementSibling;

itemContent.classList.toggle('active');
const itemContent = clickedTitle.nextElementSibling;

itemContent.classList.toggle("active");

const chevronUp = clickedTitle.querySelector(".chevron-up");
chevronUp.classList.toggle("active");
}

document.addEventListener("DOMContentLoaded", function () {
const tooltips = document.querySelectorAll(".info-icon");

document.addEventListener("click", function (event) {
if (!event.target.closest(".info-icon")) {
document.querySelectorAll(".info-icon.active").forEach((activeIcon) => {
activeIcon.classList.remove("active");
});
}
});

const chevronUp = clickedTitle.querySelector('.chevron-up');
chevronUp.classList.toggle('active');
}
tooltips.forEach(function (icon) {
let tooltip = icon.querySelector(".tooltip");
if (!tooltip) {
tooltip = document.createElement("div");
tooltip.className = "tooltip";
tooltip.textContent =
icon.getAttribute("data-tooltip") || "Additional information";

// Get positioning class from data attribute
const positionClass =
icon.getAttribute("data-tooltip-position") || "tooltip-center";
tooltip.classList.add(positionClass);

icon.appendChild(tooltip);
}

let isTooltipVisible = false;

icon.addEventListener("click", function (event) {
event.stopPropagation();

document.querySelectorAll(".info-icon.active").forEach((activeIcon) => {
if (activeIcon !== icon) {
activeIcon.classList.remove("active");
const otherTooltip = activeIcon.querySelector(".tooltip");
if (otherTooltip) otherTooltip.style.display = "none";
}
});

isTooltipVisible = !this.classList.contains("active");
this.classList.toggle("active");
tooltip.style.display = isTooltipVisible ? "block" : "none";
});
});
});
Loading