more info/edit view formatting fixes
This commit is contained in:
parent
214e6a7e36
commit
29435355cb
2 changed files with 24 additions and 10 deletions
|
@ -160,7 +160,7 @@ oml.ui.editDialog = function() {
|
|||
Ox.EditableContent({
|
||||
editable: true,
|
||||
format: function(value) {
|
||||
return formatValue(value.split(separator), 'author');
|
||||
return formatValue(splitValue(value), 'author');
|
||||
},
|
||||
placeholder: formatLight(Ox._('Unknown Author')),
|
||||
tooltip: tooltip,
|
||||
|
@ -197,7 +197,7 @@ oml.ui.editDialog = function() {
|
|||
editable: true,
|
||||
format: function(value) {
|
||||
return formatValue(
|
||||
key == 'place' ? value.split(separator) : value,
|
||||
key == 'place' ? splitValue(value) : value,
|
||||
key
|
||||
);
|
||||
},
|
||||
|
@ -234,7 +234,7 @@ oml.ui.editDialog = function() {
|
|||
editable: true,
|
||||
format: function(value) {
|
||||
return formatValue(
|
||||
key == 'language' ? value.split(separator) : value,
|
||||
key == 'language' ? splitValue(value) : value,
|
||||
key
|
||||
);
|
||||
},
|
||||
|
@ -262,6 +262,9 @@ oml.ui.editDialog = function() {
|
|||
}).append(
|
||||
Ox.EditableContent({
|
||||
editable: true,
|
||||
format: function(value) {
|
||||
return value.replace(/\n/g, '<br>');
|
||||
},
|
||||
placeholder: formatLight('No Description'),
|
||||
tooltip: tooltip,
|
||||
type: 'textarea',
|
||||
|
@ -283,6 +286,12 @@ oml.ui.editDialog = function() {
|
|||
|
||||
}
|
||||
|
||||
function splitValue(value) {
|
||||
return Ox.encodeHTMLEntities(
|
||||
Ox.decodeHTMLEntities(value).split(separator)
|
||||
);
|
||||
}
|
||||
|
||||
return that;
|
||||
|
||||
};
|
||||
|
|
|
@ -318,6 +318,10 @@ oml.ui.infoView = function(identifyData) {
|
|||
return $element;
|
||||
}
|
||||
|
||||
function splitValue(value) {
|
||||
return Ox.encodeHTMLEntities(Ox.decodeHTMLEntities(value).split('; '));
|
||||
}
|
||||
|
||||
function toggleCoverSize(ratio) {
|
||||
var css;
|
||||
iconSize = iconSize == 256 ? 512 : 256,
|
||||
|
@ -485,7 +489,7 @@ oml.ui.infoView = function(identifyData) {
|
|||
clickLink: oml.clickLink,
|
||||
editable: isEditable,
|
||||
format: function(value) {
|
||||
return formatValue(value.split('; '), 'author');
|
||||
return formatValue(splitValue(value), 'author');
|
||||
},
|
||||
placeholder: formatLight(Ox._('Unknown Author')),
|
||||
tooltip: isEditable ? oml.getEditTooltip() : '',
|
||||
|
@ -524,7 +528,7 @@ oml.ui.infoView = function(identifyData) {
|
|||
format: function(value) {
|
||||
return formatValue(
|
||||
Ox.contains(arrayKeys, key)
|
||||
? value.split('; ') : value,
|
||||
? splitValue(value) : value,
|
||||
key
|
||||
);
|
||||
},
|
||||
|
@ -561,11 +565,9 @@ oml.ui.infoView = function(identifyData) {
|
|||
clickLink: oml.clickLink,
|
||||
editable: isEditable,
|
||||
format: function(value) {
|
||||
return formatValue(
|
||||
Ox.contains(arrayKeys, key)
|
||||
? value.split('; ') : value,
|
||||
key
|
||||
);
|
||||
return key == 'language'
|
||||
? formatValue(splitValue(value), key)
|
||||
: value;
|
||||
},
|
||||
placeholder: formatLight('unknown'),
|
||||
tooltip: isEditable ? oml.getEditTooltip() : '',
|
||||
|
@ -631,6 +633,9 @@ oml.ui.infoView = function(identifyData) {
|
|||
Ox.EditableContent({
|
||||
clickLink: oml.clickLink,
|
||||
editable: isEditable,
|
||||
format: function(value) {
|
||||
return value.replace(/\n/g, '<br>');
|
||||
},
|
||||
placeholder: formatLight('No Description'),
|
||||
tooltip: isEditable ? oml.getEditTooltip() : '',
|
||||
type: 'textarea',
|
||||
|
|
Loading…
Reference in a new issue