format ISBNs with dashes

This commit is contained in:
rlx 2016-01-16 20:48:14 +05:30
parent 386bfd2324
commit bc88615c31

View file

@ -633,13 +633,16 @@ oml.ui.infoView = function(externalData, isMixed) {
isMixed.isbn ? 'mixed' : 'unknown'
)),
tooltip: isEditable ? oml.getEditTooltip() : '',
value: data.isbn || ''
value: Ox.formatISBN(data.isbn || '', 13, true)
})
.bindEvent({
submit: function(event) {
var value = Ox.formatISBN(event.value, 13);
this.options({value: value});
editMetadata('isbn', value);
this.options({
value: Ox.formatISBN(event.value, 13, true)
});
editMetadata(
'isbn', Ox.formatISBN(event.value, 13)
);
}
})
.appendTo($div);