From 5b612b7844597c77930dee8a975835cea56cb1f6 Mon Sep 17 00:00:00 2001 From: j Date: Sun, 3 Jan 2016 21:49:24 +0530 Subject: [PATCH] edit classification, fixes #10 --- static/js/infoView.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/static/js/infoView.js b/static/js/infoView.js index cfcc69d..fbc26bb 100644 --- a/static/js/infoView.js +++ b/static/js/infoView.js @@ -587,13 +587,24 @@ oml.ui.infoView = function(identifyData) { // -------- Classification - if (data.classification) { + if (data.classification || isEditable) { $('
') .css({ marginTop: '8px', }) - .html( - formatValue(data.classification, 'classification') + .append( + Ox.EditableContent({ + clickLink: oml.clickLink, + editable: isEditable, + placeholder: formatLight('No Classification'), + tooltip: isEditable ? oml.getEditTooltip() : '', + value: data.classification || '', + }) + .bindEvent({ + submit: function(event) { + editMetadata('classification', event.value); + } + }) ) .appendTo($info); }