From c52f37d63b719a4e354609ca526239804b315788 Mon Sep 17 00:00:00 2001 From: j Date: Tue, 5 Jan 2016 10:59:09 +0530 Subject: [PATCH] update primaryid and find by name --- static/js/identifyDialog.js | 2 +- static/js/infoView.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/static/js/identifyDialog.js b/static/js/identifyDialog.js index aa8228b..af2f748 100644 --- a/static/js/identifyDialog.js +++ b/static/js/identifyDialog.js @@ -87,7 +87,7 @@ oml.ui.identifyDialog = function(data) { label: Ox._('Title, Author etc.'), labelWidth: 128, width: 608, - value: [data.title].concat(data.author || []).join(' ') + value: Ox.decodeHTMLEntities([data.title].concat(data.author || []).join(' ')) }) .bindEvent({ submit: findMetadata diff --git a/static/js/infoView.js b/static/js/infoView.js index fbc26bb..03a8b3f 100644 --- a/static/js/infoView.js +++ b/static/js/infoView.js @@ -170,7 +170,7 @@ oml.ui.infoView = function(identifyData) { id: ui.item, primaryid: data.value ? data.value.split(':') : '' }, function(result) { - that.updateElement(result.data, [$data]); + that.updateElement(result.data, [$info, $data]); }); } }) @@ -724,6 +724,9 @@ oml.ui.infoView = function(identifyData) { oml.$ui.browser.value( result.data.id, key, result.data[key] ); + if (Ox.contains(['title', 'author'], key)) { + that.updateElement(result.data, [$data]); + } }); } }