forked from 0x2620/oxjs
change the signature of Ox.pad to match Ox.truncate
This commit is contained in:
parent
24bbf95bd5
commit
a5c6747b57
10 changed files with 62 additions and 29 deletions
|
|
@ -140,7 +140,7 @@ Ox.DateInput = function(options, self) {
|
|||
autocomplete: Ox.range(1, days + 1).map(function(i) {
|
||||
return self.options.format == 'short' ? Ox.pad(i, 2) : i.toString();
|
||||
}),
|
||||
value: self.options.format == 'short' ? Ox.pad(day, 2) : day.toString()
|
||||
value: self.options.format == 'short' ? Ox.pad(parseInt(day), 2) : day.toString()
|
||||
});
|
||||
self.options.value = join();
|
||||
}
|
||||
|
|
|
|||
4
source/Ox.UI/js/List/Chart.js
vendored
4
source/Ox.UI/js/List/Chart.js
vendored
|
|
@ -74,7 +74,7 @@ Ox.Chart = function(options, self) {
|
|||
});
|
||||
}
|
||||
self.sort[key] = key.replace(/(\d+)/g, function(number) {
|
||||
return Ox.pad(number, 16);
|
||||
return Ox.pad(parseInt(number), 16);
|
||||
});
|
||||
});
|
||||
self.max = Ox.max(self.totals);
|
||||
|
|
@ -83,7 +83,7 @@ Ox.Chart = function(options, self) {
|
|||
if (self.subData) {
|
||||
Ox.forEach(self.subData, function(subValue, subKey) {
|
||||
self.sort[subKey] = subKey.replace(/(\d+)/g, function(number) {
|
||||
return Ox.pad(number, 16);
|
||||
return Ox.pad(parseInt(number), 16);
|
||||
});
|
||||
});
|
||||
self.subKeys = Object.keys(self.subData).sort(function(a, b) {
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ Ox.MapImage = function(options, self) {
|
|||
|
||||
function formatColor(color) {
|
||||
return color.map(function(c) {
|
||||
return Ox.pad(c.toString(16), 2);
|
||||
return Ox.pad(c.toString(16), 'left', 2, '0');
|
||||
}).join('')
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue