diff --git a/index.html b/index.html
index 86199c4..31608a9 100644
--- a/index.html
+++ b/index.html
@@ -224,6 +224,7 @@
Logout
+ Back
@@ -759,9 +760,14 @@
hidePopup()
} */
- function showArticle(articleId) {
+ function backArticle() {
+ showArticle(cloudArticleApp.SUBJECT)
+ }
+
+ async function showArticle(articleId) {
+ document.getElementById("back-article-btn").classList.remove("hide")
+ await cloudArticleApp.retrieveLatestContent(true, articleId);
cloudArticleApp.setLocalDefault(articleId);
- cloudArticleApp.retrieveLatestContent(true);
}
async function incScore(value){
@@ -972,10 +978,10 @@
getRef('article_list').append(frag);
}
- document.getElementById('article_list_popup').addEventListener('click', e => {
+ document.getElementById('article_list_popup').addEventListener('click', async e => {
if(e.target.closest('.article-list__item')){
const articleId = e.target.closest('.article-list__item').dataset.uniqueId
- showArticle(articleId)
+ await showArticle(articleId)
hidePopup()
}
})
@@ -10168,11 +10174,11 @@
showMessage('only subAdmins can update the default Article')
},
- showFullContentOfArticle: function (obj) {
+ showFullContentOfArticle: function (obj, subject) {
const full_data_div = document.getElementById('current_data'),
- articleSubject = floGlobals.appObjects[this.SUBJECT];
+ articleSubject = floGlobals.appObjects[subject];
- const new_generalData = floDapps.getNextGeneralData(this.SUBJECT, '0');// floGlobals.generalData[JSON.stringify({ application: floGlobals.application, type: cloudArticleApp.CONTENT_TYPE })]
+ const new_generalData = floDapps.getNextGeneralData(subject, '0');// floGlobals.generalData[JSON.stringify({ application: floGlobals.application, type: cloudArticleApp.CONTENT_TYPE })]
let new_entries_array = [];
@@ -10302,10 +10308,10 @@
hideLoader();
//section_settings
if (!floGlobals.subAdmins.includes(myFloID)) return false;
- if (typeof floGlobals.appObjects[this.SUBJECT] !== "object") return false;
+ if (typeof floGlobals.appObjects[subject] !== "object") return false;
let topics = document.querySelectorAll('.edit-article');
- for (let i = 0; i < Object.keys(floGlobals.appObjects[this.SUBJECT]).length; i++) {
- topics[i].innerHTML = `