make description editable
This commit is contained in:
parent
216cb411fe
commit
2ea25949ed
1 changed files with 19 additions and 6 deletions
|
@ -599,16 +599,29 @@ oml.ui.infoView = function(identifyData) {
|
|||
|
||||
// -------- Description
|
||||
|
||||
if (data.description) {
|
||||
if (data.description || isEditable) {
|
||||
$('<div>')
|
||||
.css({
|
||||
marginTop: '8px',
|
||||
textAlign: 'justify'
|
||||
}).append(
|
||||
Ox.EditableContent({
|
||||
clickLink: oml.clickLink,
|
||||
editable: isEditable,
|
||||
format: function(value) {
|
||||
return Ox.encodeHTMLEntities(value);
|
||||
},
|
||||
placeholder: formatLight('No Description'),
|
||||
tooltip: isEditable ? oml.getEditTooltip() : '',
|
||||
type: 'textarea',
|
||||
value: data.description || ''
|
||||
})
|
||||
.html(
|
||||
Ox.encodeHTMLEntities(data.description)
|
||||
)
|
||||
.appendTo($info);
|
||||
.bindEvent({
|
||||
submit: function(event) {
|
||||
editMetadata(key, event.value);
|
||||
}
|
||||
})
|
||||
).appendTo($info);
|
||||
}
|
||||
|
||||
$('<div>').css({height: '16px'}).appendTo($info);
|
||||
|
|
Loading…
Reference in a new issue