forked from 0x2620/oxjs
IE8 fixes
This commit is contained in:
parent
12dcdf13fc
commit
aa8f4133be
5 changed files with 11 additions and 10 deletions
|
|
@ -14,8 +14,9 @@ Ox.Theme = (function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
function getTheme() {
|
function getTheme() {
|
||||||
var theme = '';
|
var classNames = Ox.UI.$body.attr('class'),
|
||||||
Ox.forEach(Ox.UI.$body.attr('class').split(' '), function(className) {
|
theme = '';
|
||||||
|
classNames && Ox.forEach(classNames.split(' '), function(className) {
|
||||||
if (Ox.startsWith(className, 'OxTheme')) {
|
if (Ox.startsWith(className, 'OxTheme')) {
|
||||||
theme = className.replace('OxTheme', '').toLowerCase();
|
theme = className.replace('OxTheme', '').toLowerCase();
|
||||||
Ox.Break();
|
Ox.Break();
|
||||||
|
|
|
||||||
|
|
@ -680,7 +680,8 @@ Ox.Input = function(options, self) {
|
||||||
} else {
|
} else {
|
||||||
end = isArray ? start[1] : (end ? end : start);
|
end = isArray ? start[1] : (end ? end : start);
|
||||||
start = isArray ? start[0] : start;
|
start = isArray ? start[0] : start;
|
||||||
self.$input[0].setSelectionRange(start, end);
|
//IE8 does not have setSelectionRange
|
||||||
|
self.$input[0].setSelectionRange && self.$input[0].setSelectionRange(start, end);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -357,7 +357,11 @@ if (
|
||||||
var type = Object.prototype.toString.call(
|
var type = Object.prototype.toString.call(
|
||||||
value
|
value
|
||||||
).slice(8, -1).toLowerCase();
|
).slice(8, -1).toLowerCase();
|
||||||
if (type == 'object' && typeof value.callee == 'function') {
|
if (value === null) {
|
||||||
|
type = 'null';
|
||||||
|
} else if (value === void 0) {
|
||||||
|
type = 'undefined'
|
||||||
|
} else if (type == 'object' && typeof value.callee == 'function') {
|
||||||
type = 'arguments';
|
type = 'arguments';
|
||||||
} else if (
|
} else if (
|
||||||
type == 'htmlcollection' || (
|
type == 'htmlcollection' || (
|
||||||
|
|
@ -367,10 +371,6 @@ if (
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
type = 'nodelist';
|
type = 'nodelist';
|
||||||
} else if (value === null) {
|
|
||||||
type = 'null';
|
|
||||||
} else if (value === void 0) {
|
|
||||||
type = 'undefined'
|
|
||||||
}
|
}
|
||||||
return type;
|
return type;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
Ox.load({Geo: {}, UI: {}, Unicode: {}}, function() {
|
Ox.load({Geo: {}, UI: {}, Unicode: {}}, function() {
|
||||||
|
|
||||||
Ox.getJSON('../dev/Ox/json/Ox.json', function(files) {
|
Ox.getJSON('../dev/Ox/json/Ox.json', function(files) {
|
||||||
|
|
||||||
var $body = $('body')
|
var $body = $('body')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue