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' isMixed.isbn ? 'mixed' : 'unknown'
)), )),
tooltip: isEditable ? oml.getEditTooltip() : '', tooltip: isEditable ? oml.getEditTooltip() : '',
value: data.isbn || '' value: Ox.formatISBN(data.isbn || '', 13, true)
}) })
.bindEvent({ .bindEvent({
submit: function(event) { submit: function(event) {
var value = Ox.formatISBN(event.value, 13); this.options({
this.options({value: value}); value: Ox.formatISBN(event.value, 13, true)
editMetadata('isbn', value); });
editMetadata(
'isbn', Ox.formatISBN(event.value, 13)
);
} }
}) })
.appendTo($div); .appendTo($div);