`;
+ const hashes_box = [];
+
for (iterKey in secObj) {
const article_data = secObj[iterKey];
const gen_div_id = this.unique_id();
const content_hash = Crypto.SHA256(article_data.content.trim());
+ if(!hashes_box.includes(content_hash)) {
+ hashes_box.push(content_hash);
+ } else continue;
let vc = article_data.vectorClock || "";
if (Number(article_data.score) > 0) {
@@ -10961,8 +10966,7 @@
Edit
- `;
+ Edit`;
}
},
@@ -10976,7 +10980,7 @@
sectionSettingsList.innerHTML = ``;
for (vals of Object.values(floGlobals.appObjects[this.SUBJECT][Topic].data)) {
sectionSettingsHtml += `
-
`;
+
`;
sec_counter++;
}
@@ -11215,7 +11219,6 @@
},
edit_onfocuout: function (parent) {
- debugger;
//if (floGlobals.subAdmins.includes(myFloID)) return;
let target = parent.firstElementChild;
const updated_content = target.innerText.trim();
@@ -11226,7 +11229,7 @@
if (previous_content_hash === updated_content_hash) return;
let detail_block = document.getElementById(_id).getAttribute('data-value');
let separate_data = detail_block.trim().split('__');
- debugger;
+
if (separate_data.length !== 2) return;
cloudArticleApp.addArticleContent(separate_data[0].trim(), separate_data[1].trim(), updated_content, myFloID);
@@ -11310,17 +11313,22 @@
let t = ``;
for (textContent of headings) {
+ t += `
+
`;
let snippets = Object.values(textContent.contents).sort((c, d) => c.rank < d.rank);
- t += `
${textContent.title}
`;
+ t += `
${textContent.title}
`;
for (snips of snippets) {
if (typeof snips !== "object") continue;
t += '
' + document.getElementById(snips.article_id).innerText + '
';
}
+ t += `
`;
}
+ let template = cloudArticleApp.html_template(t);
+
let file_name = "content_collaboration" + new Date().getTime();
- this.downloadInnerHtml(file_name, t, 'text/html');
+ this.downloadInnerHtml(file_name, template, 'text/html');
document.getElementById('context_menu').classList.add('hide')
},
@@ -11367,7 +11375,341 @@
.catch(error => {
console.log(error)
})
- }
+ },
+ html_template: function(mid_section='') {
+ let t = ``;
+ t += `
+
+
+
RanchiMall Content Collaboration Output
+
+
+
+
+
+
+
+
Exported by RanchiMall Content Collaboration on FLO Blockchain
+
+
`;
+ t += `${mid_section}`;
+ t += `
+
+ `;
+
+ return t;
+ },
}