add content, rename. Associated->Related
This commit is contained in:
parent
477d43d9de
commit
168fe02186
2 changed files with 43 additions and 4 deletions
13
config.jsonc
13
config.jsonc
|
@ -312,9 +312,9 @@
|
||||||
"columnWidth": 256
|
"columnWidth": 256
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "associatedpeople",
|
"id": "relatedpeople",
|
||||||
"operator": "+",
|
"operator": "+",
|
||||||
"title": "Associated people",
|
"title": "Related people",
|
||||||
"type": ["string"],
|
"type": ["string"],
|
||||||
"filter": true,
|
"filter": true,
|
||||||
"find": true,
|
"find": true,
|
||||||
|
@ -375,7 +375,14 @@
|
||||||
"title": "Description",
|
"title": "Description",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"find": true,
|
"find": true,
|
||||||
"sort": true,
|
"columnWidth": 256
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "content",
|
||||||
|
"operator": "+",
|
||||||
|
"title": "Content",
|
||||||
|
"type": "text",
|
||||||
|
"find": true,
|
||||||
"columnWidth": 256
|
"columnWidth": 256
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -232,7 +232,7 @@ pandora.ui.documentInfoView = function(data, isMixed) {
|
||||||
renderGroup(['author', 'date', 'format']);
|
renderGroup(['author', 'date', 'format']);
|
||||||
renderGroup(['publisher', 'place', 'series', 'volume', 'language']);
|
renderGroup(['publisher', 'place', 'series', 'volume', 'language']);
|
||||||
renderGroup(['source', 'links']);
|
renderGroup(['source', 'links']);
|
||||||
renderGroup(['movement', 'event', 'associatedgroups', 'associatedpeople']);
|
renderGroup(['movement', 'event', 'associatedgroups', 'relatedpeople']);
|
||||||
renderGroup(['tags']);
|
renderGroup(['tags']);
|
||||||
|
|
||||||
// Description -------------------------------------------------------------
|
// Description -------------------------------------------------------------
|
||||||
|
@ -269,6 +269,38 @@ pandora.ui.documentInfoView = function(data, isMixed) {
|
||||||
.appendTo($text);
|
.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
|
// Preview
|
||||||
if (data.extension == 'pdf' && !isMultiple) {
|
if (data.extension == 'pdf' && !isMultiple) {
|
||||||
var $div = $('<div>').css({
|
var $div = $('<div>').css({
|
||||||
|
|
Loading…
Reference in a new issue