Initial commit
This commit is contained in:
26
static/js/debug.js
Normal file
26
static/js/debug.js
Normal file
@ -0,0 +1,26 @@
|
||||
console.log('Testing toggle button functionality');
|
||||
|
||||
// Debug script to inspect template loading
|
||||
console.log("Debug script loaded");
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
console.log("DOM loaded in debug script");
|
||||
|
||||
// Log raw templates
|
||||
console.log("Raw Protocol Templates:", typeof rawProtocolTemplates !== 'undefined' ? rawProtocolTemplates.length : "undefined");
|
||||
if (typeof rawProtocolTemplates !== 'undefined') {
|
||||
console.log("Template titles:", rawProtocolTemplates.map(t => t.title));
|
||||
}
|
||||
|
||||
// Log processed templates
|
||||
setTimeout(() => {
|
||||
const templateSelect = document.getElementById('protocol-template');
|
||||
if (templateSelect) {
|
||||
console.log("Template options:", templateSelect.options.length);
|
||||
const options = Array.from(templateSelect.options).map(o => o.textContent);
|
||||
console.log("Option texts:", options);
|
||||
} else {
|
||||
console.log("Template select element not found");
|
||||
}
|
||||
}, 1000);
|
||||
});
|
Reference in New Issue
Block a user