From b1d7ef2a0a0a0ad8e2bbc1acdc8b4b267df080b1 Mon Sep 17 00:00:00 2001 From: Sai Raj <39055732+sairajzero@users.noreply.github.com> Date: Fri, 12 Jun 2020 14:19:50 +0530 Subject: [PATCH] Feature to add new sections to existing Article --- index.html | 46 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 27c9c4a..ec100c6 100644 --- a/index.html +++ b/index.html @@ -9976,7 +9976,6 @@ Bitcoin.Util = { diff: findDifference(JSON.parse(this.util.lastCommit[objectName]), floGlobals .appObjects[objectName]) } - debugger; this.sendApplicationData(message, `${objectName}@Update`, options).then(result => { this.util.lastCommit[objectName] = JSON.stringify(floGlobals.appObjects[ objectName]) @@ -10722,8 +10721,50 @@ Bitcoin.Util = { await this.retrieveLatestContent(); }, + addSections: async function (sections) { + showMessage(`Adding sections...`); + + let number_of_sections, section_names = []; + + if(Array.isArray(sections)){ + number_of_sections = sections.length; + section_names = sections + } else if(typeof sections == 'number'){ + number_of_sections = sections + for(let k=0; k current.y) ? prev : current }); - debugger; let oldArticle = article.data[section]["section_iters"][`iteration${iterNumber}`]; let iterNum = Number(iterNumber) + 1;