From 9c1f5b4733126507e9ae5b873d00e3f54cfec508 Mon Sep 17 00:00:00 2001 From: kor Date: Wed, 31 Oct 2018 14:53:42 +1300 Subject: [PATCH] Add support for multiple authors. --- README.md | 14 +++++++------- docs/logic/view.js | 5 ++++- docs/logic/wrap.js | 1 + 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 3180bc6..bacd019 100644 --- a/README.md +++ b/README.md @@ -55,18 +55,18 @@ Stored in a human-readable, flat-file database called [Indental](https://wiki.xx - SHOWUPPER = toggle display of upper entry elements - SHOWTITLE = toggle display of entry title - SHOWAUTH = toggle display of entry author -- SHOWTYPE = toggle display of entry type -- SHOWLINK = toggle display of entry link +- SHOWTYPE = toggle display of entry type(s) +- SHOWLINK = toggle display of entry link(s) - SHOWLOWER = toggle display of lower entry elements -- SHOWTAGS = toggle display of entry tags -- SHOWPROJ = toggle display of entry project +- SHOWTAGS = toggle display of entry tag(s) +- SHOWPROJ = toggle display of entry project(s) - SHOWNOTE = toggle display of entry notes -- SHOWQOTE = toggle display of entry quotes -- SHOWTERM = toggle display of entry terms +- SHOWQOTE = toggle display of entry quote(s) +- SHOWTERM = toggle display of entry term(s) - SHOWDONE = toggle display of menu done (tick/cross) - SHOWPROG = toggle display of entry progress notes - SHOWIMAG = toggle display of entry image -- SHOWFILE = toggle display of entry file +- SHOWFILE = toggle display of entry file(s) - SHOWOVERLAY = toggle display of dark overlay on hover of image type entry ### Web Development diff --git a/docs/logic/view.js b/docs/logic/view.js index 5c51138..e65fcc5 100644 --- a/docs/logic/view.js +++ b/docs/logic/view.js @@ -181,7 +181,10 @@ function View() // AUTHOR if (SETTINGS.SHOWAUTH && this.isDefined(value.AUTH)) { - entry += `
${value.AUTH}
`; + for (var i = 0; i < value.AUTH.length; i++) + { + entry += `
${value.AUTH[i].to_properCase()}
`; + } } // TAGS diff --git a/docs/logic/wrap.js b/docs/logic/wrap.js index 74f8a05..d1a9386 100644 --- a/docs/logic/wrap.js +++ b/docs/logic/wrap.js @@ -16,6 +16,7 @@ function Wrap() { let value = this.database[this.keys[i]]; + this.database[this.keys[i]].AUTH = this.commaSplit(value.AUTH); this.database[this.keys[i]].TAGS = this.commaSplit(value.TAGS); this.database[this.keys[i]].TYPE = this.commaSplit(value.TYPE); this.database[this.keys[i]].PROJ = this.commaSplit(value.PROJ);