Filter: handle formatISBN

This commit is contained in:
rlx 2016-01-17 16:44:59 +05:30
parent 94262efd60
commit 731c2e88fe

View file

@ -466,7 +466,6 @@ Ox.Filter = function(options, self) {
var key, that = this;
that.focus(); // make input trigger change
setTimeout(function() {
Ox.print(self.options.value.conditions.length, that.parent().data('subposition') == -1);
if (self.options.value.conditions.length == 1) {
key = self.options.findKeys[0];
self.options.value.conditions = [{
@ -739,7 +738,7 @@ Ox.Filter = function(options, self) {
width: 288
});
} else if (findKey.format) {
formatArgs = findKey.format.args
formatArgs = findKey.format.args;
formatType = findKey.format.type;
if (formatType == 'color') {
isHue = formatArgs[0] == 'hue';
@ -777,6 +776,12 @@ Ox.Filter = function(options, self) {
value: value,
width: {hours: 38, minutes: 37, seconds: 37}
});
} else if (formatType == 'ISBN') {
$input = Ox.Input({
type: type,
value: Ox.formatISBN.apply(null, [value].concat(formatArgs)),
width: 288
});
} else if (formatType == 'number') {
$input = Ox.Input({
type: type,