update identify dialog

This commit is contained in:
rlx 2016-01-11 20:05:53 +05:30
parent 10acaacbd9
commit f502a7ff49

View file

@ -4,8 +4,6 @@ oml.ui.identifyDialog = function(data) {
var ui = oml.user.ui,
selected = data.isbn ? 'isbn' : 'title',
$form = Ox.Element(),
$select = Ox.Select({
@ -18,7 +16,7 @@ oml.ui.identifyDialog = function(data) {
max: 1,
min: 1,
style: 'squared',
value: selected,
value: [data.isbn ? 'isbn' : 'title'],
width: 128
})
.bindEvent({
@ -183,7 +181,7 @@ oml.ui.identifyDialog = function(data) {
return key == 'title' ? Ox.decodeHTMLEntities(
[data.title || ''].concat(data.author || []).join(' ')
)
: data.value == 'isbn' ? (data.isbn || '')
: key == 'isbn' ? (data.isbn || '')
: data.id
}