Update Saqel Platform: 2026-08-28 16:18:12
This commit is contained in:
@@ -199,7 +199,7 @@ class CurriculumStudio
|
||||
renderCurriculumTree(window.CURRICULUM_TREE);
|
||||
});
|
||||
|
||||
function renderCurriculumTree(tree) {
|
||||
function renderCurriculumTree(tree) {
|
||||
const container = document.getElementById('curriculum_tree_container');
|
||||
const entries = Object.entries(tree || {});
|
||||
|
||||
@@ -239,6 +239,32 @@ class CurriculumStudio
|
||||
`;
|
||||
}
|
||||
}
|
||||
|
||||
// NEW: Render Resources (Minhaji Style Categories)
|
||||
if (sem.resources && Object.keys(sem.resources).length > 0) {
|
||||
html += `<div style="margin-top: 15px; margin-bottom: 5px; font-weight: bold; color: var(--text-secondary); font-size: 11px; padding-right: 15px;">📂 مصادر المادة الإضافية:</div>`;
|
||||
html += `<div style="display: flex; flex-wrap: wrap; gap: 6px; padding-right: 15px; margin-bottom: 10px;">`;
|
||||
for (const [resKey, resourceGroup] of Object.entries(sem.resources)) {
|
||||
if (!resourceGroup.items || resourceGroup.items.length === 0) continue;
|
||||
|
||||
// Hexagon / Badge Style
|
||||
html += `<div style="flex: 1 1 45%; background: var(--bg-hover); border: 1px solid var(--border-color); border-radius: 6px; padding: 8px; text-align: center; cursor: pointer; transition: all 0.2s;" onmouseover="this.style.background='rgba(255,209,102,0.1)'" onmouseout="this.style.background='var(--bg-hover)'">
|
||||
<div style="font-size: 14px; margin-bottom: 4px;">📌</div>
|
||||
<div style="font-size: 10px; font-weight: bold; color: var(--text-primary);">${escapeHtml(resourceGroup.name)}</div>
|
||||
</div>`;
|
||||
|
||||
// Render actual files below the badge (hidden or just list them)
|
||||
for (const item of resourceGroup.items) {
|
||||
const activeClass = (item.file === currentFilePath) ? ' active' : '';
|
||||
html += `
|
||||
<div style="width: 100%;" class="tree-lesson${activeClass}" onclick="selectLesson('${item.file}', '${escapeHtml(item.title)}', '${escapeHtml(grade.name)} ⟵ ${escapeHtml(sub.name)} ⟵ ${escapeHtml(resourceGroup.name)}', ['مرفق إضافي'])">
|
||||
📎 ${escapeHtml(item.title)}
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
}
|
||||
html += `</div>`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -259,7 +285,6 @@ class CurriculumStudio
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function selectLesson(filePath, title, breadcrumb, outcomes) {
|
||||
currentFilePath = filePath;
|
||||
document.getElementById('empty_selection_view').style.display = 'none';
|
||||
|
||||
Reference in New Issue
Block a user