add content, rename. Associated->Related

This commit is contained in:
j 2019-10-14 15:48:16 +01:00
parent f9ba1e000e
commit 6bd1f5969f
2 changed files with 43 additions and 4 deletions

View file

@ -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
},
{

View file

@ -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) {
$('<div>')
.append(
Ox.EditableContent({
clickLink: pandora.clickLink,
editable: canEdit,
format: function(value) {
return value.replace(
/<img src=/g,
'<img style="float: left; max-width: 256px; max-height: 256px; margin: 0 16px 16px 0" src='
);
},
maxHeight: Infinity,
placeholder: formatLight(Ox._('No Content')),
tooltip: canEdit ? pandora.getEditTooltip() : '',
type: 'textarea',
value: data.content || ''
})
.css(css)
.css({
marginTop: '12px',
overflow: 'hidden'
})
.bindEvent({
submit: function(event) {
editMetadata('content', event.value);
}
})
)
.appendTo($text);
}
// Preview
if (data.extension == 'pdf' && !isMultiple) {
var $div = $('<div>').css({