make description editable

This commit is contained in:
j 2015-11-30 17:59:23 +01:00
parent 216cb411fe
commit 2ea25949ed

View file

@ -599,16 +599,29 @@ oml.ui.infoView = function(identifyData) {
// -------- Description // -------- Description
if (data.description) { if (data.description || isEditable) {
$('<div>') $('<div>')
.css({ .css({
marginTop: '8px', marginTop: '8px',
textAlign: 'justify' textAlign: 'justify'
}) }).append(
.html( Ox.EditableContent({
Ox.encodeHTMLEntities(data.description) clickLink: oml.clickLink,
) editable: isEditable,
.appendTo($info); format: function(value) {
return Ox.encodeHTMLEntities(value);
},
placeholder: formatLight('No Description'),
tooltip: isEditable ? oml.getEditTooltip() : '',
type: 'textarea',
value: data.description || ''
})
.bindEvent({
submit: function(event) {
editMetadata(key, event.value);
}
})
).appendTo($info);
} }
$('<div>').css({height: '16px'}).appendTo($info); $('<div>').css({height: '16px'}).appendTo($info);