infopage fixes

This commit is contained in:
j 2020-06-06 19:07:49 +02:00
parent 05d5ce213f
commit 231f519ed9

View file

@ -174,8 +174,7 @@ pandora.ui.infoView = function(data, isMixed) {
width: iconSize + 'px', width: iconSize + 'px',
height: Math.round(iconSize / 2) + 'px' height: Math.round(iconSize / 2) + 'px'
}) })
.appendTo($reflection), .appendTo($reflection);
} }
var $data = $('<div>') var $data = $('<div>')
.addClass('OxTextPage') .addClass('OxTextPage')
@ -185,7 +184,7 @@ pandora.ui.infoView = function(data, isMixed) {
top: margin + iconHeight + margin + 'px', top: margin + iconHeight + margin + 'px',
width: iconSize + 'px', width: iconSize + 'px',
}) })
.appendTo($left) .appendTo($left),
$text = Ox.Element() $text = Ox.Element()
.addClass('OxTextPage') .addClass('OxTextPage')
@ -295,9 +294,9 @@ pandora.ui.infoView = function(data, isMixed) {
.append( .append(
Ox.EditableContent({ Ox.EditableContent({
editable: canEdit, editable: canEdit,
placeholder: formatLight(Ox._('No Title')), placeholder: formatLight(Ox._(isMixed ? 'Mixed title' : 'No title')),
tooltip: canEdit ? pandora.getEditTooltip() : '', tooltip: canEdit ? pandora.getEditTooltip() : '',
value: data.title value: data.title || ''
}) })
.css({ .css({
fontWeight: 'bold', fontWeight: 'bold',
@ -428,7 +427,7 @@ pandora.ui.infoView = function(data, isMixed) {
renderRightsLevel(); renderRightsLevel();
// User and Groups --------------------------------------------------------- // User and Groups ---------------------------------------------------------
if (!isMultiple) {
['user', 'groups'].forEach(function(key) { ['user', 'groups'].forEach(function(key) {
(canEdit || data[key] && data[key].length) && $('<div>') (canEdit || data[key] && data[key].length) && $('<div>')
.css({marginBottom: '4px'}) .css({marginBottom: '4px'})
@ -452,9 +451,11 @@ pandora.ui.infoView = function(data, isMixed) {
) )
.appendTo($statistics); .appendTo($statistics);
}); });
}
// Created and Modified ---------------------------------------------------- // Created and Modified ----------------------------------------------------
if (!isMultiple) {
['created', 'modified'].forEach(function(key) { ['created', 'modified'].forEach(function(key) {
$('<div>') $('<div>')
.css({marginBottom: '4px'}) .css({marginBottom: '4px'})
@ -464,6 +465,7 @@ pandora.ui.infoView = function(data, isMixed) {
) )
.appendTo($statistics); .appendTo($statistics);
}); });
}
// Notes -------------------------------------------------------------------- // Notes --------------------------------------------------------------------