more info/edit view formatting fixes

This commit is contained in:
Rolux 2016-01-08 15:41:24 +05:30
commit 29435355cb
2 changed files with 24 additions and 10 deletions

View file

@ -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;
};