From 168fe02186999b8315bcc5a1d988f6e16ca53fb3 Mon Sep 17 00:00:00 2001 From: j Date: Mon, 14 Oct 2019 15:48:16 +0100 Subject: [PATCH] add content, rename. Associated->Related --- config.jsonc | 13 +++++++++--- static/js/documentInfoView.mdr.js | 34 ++++++++++++++++++++++++++++++- 2 files changed, 43 insertions(+), 4 deletions(-) diff --git a/config.jsonc b/config.jsonc index 9fc68d6..922afd7 100644 --- a/config.jsonc +++ b/config.jsonc @@ -312,9 +312,9 @@ "columnWidth": 256 }, { - "id": "associatedpeople", + "id": "relatedpeople", "operator": "+", - "title": "Associated people", + "title": "Related people", "type": ["string"], "filter": true, "find": true, @@ -375,7 +375,14 @@ "title": "Description", "type": "text", "find": true, - "sort": true, + "columnWidth": 256 + }, + { + "id": "content", + "operator": "+", + "title": "Content", + "type": "text", + "find": true, "columnWidth": 256 }, { diff --git a/static/js/documentInfoView.mdr.js b/static/js/documentInfoView.mdr.js index 29d7ebd..bfbb16b 100644 --- a/static/js/documentInfoView.mdr.js +++ b/static/js/documentInfoView.mdr.js @@ -232,7 +232,7 @@ pandora.ui.documentInfoView = function(data, isMixed) { renderGroup(['author', 'date', 'format']); renderGroup(['publisher', 'place', 'series', 'volume', 'language']); renderGroup(['source', 'links']); - renderGroup(['movement', 'event', 'associatedgroups', 'associatedpeople']); + renderGroup(['movement', 'event', 'associatedgroups', 'relatedpeople']); renderGroup(['tags']); // Description ------------------------------------------------------------- @@ -269,6 +269,38 @@ pandora.ui.documentInfoView = function(data, isMixed) { .appendTo($text); } + if (canEdit || data.content) { + $('
') + .append( + Ox.EditableContent({ + clickLink: pandora.clickLink, + editable: canEdit, + format: function(value) { + return value.replace( + /').css({