diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 21a953ef24..739513007b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -139,7 +139,7 @@ Start reading our code and you'll get the hang of it. We optimize for readabilit * Configuration variables are uppercase and can be called in all modules keeping the same name. For example, MAVAR = getattr(settings, "MAVAR", default value) * Global variables to a module are also in uppercase but are considered private to the module and therefore must be prefixed and suffixed with a double underscore - * We indent using two spaces (soft tabs) + * All .py files must be indented using 4 spaces, and all other files (.css, .html, .js) with 2 spaces (soft tabs) * This is open source software. Consider the people who will read your code, and make it look nice for them. It's sort of like driving a car: Perhaps you love doing donuts when you're alone, but with passengers the goal is to make the ride as smooth as possible. ### JavaScript Styleguide diff --git a/pod/dressing/templates/my_dressings.html b/pod/dressing/templates/my_dressings.html index 17bea727b5..3fa2f8e010 100644 --- a/pod/dressing/templates/my_dressings.html +++ b/pod/dressing/templates/my_dressings.html @@ -14,6 +14,7 @@ {% endblock %} {% block page_content %} +
@@ -124,6 +125,7 @@ {% endfor %} |
' + gettext('End the meeting') + '
'; + modalBody.innerHTML = generateHtml(data.info) + modalendlink + } + }).catch((error) => { + console.error(error); + }); + + // + // Update the modal's content. + const modalTitle = meetingModal.querySelector('.modal-title') + const modalBody = meetingModal.querySelector('.modal-body') + //const modalFooterEndLink = meetingModal.querySelector('.modal-footer a.endlink') + + modalTitle.textContent = title + modalBody.textContent = meeting_id + //modalFooterEndLink.setAttribute("href", endurl) + +}) + +/* TODO: check if level parameter can be removed. */ +/** + * Recursively generate an HTML unordered list version of data + * @param {Array} data Data to be displayed + * @param {Number} level level of recursion (useless?) + * @return {string} Generated HTML + */ +function generateHtml(data, level=0) { + html = "