IE8 fixes

This commit is contained in:
j 2012-05-25 21:42:10 +00:00
parent 12dcdf13fc
commit aa8f4133be
5 changed files with 11 additions and 10 deletions

View file

@ -14,8 +14,9 @@ Ox.Theme = (function() {
};
function getTheme() {
var theme = '';
Ox.forEach(Ox.UI.$body.attr('class').split(' '), function(className) {
var classNames = Ox.UI.$body.attr('class'),
theme = '';
classNames && Ox.forEach(classNames.split(' '), function(className) {
if (Ox.startsWith(className, 'OxTheme')) {
theme = className.replace('OxTheme', '').toLowerCase();
Ox.Break();

View file

@ -440,7 +440,7 @@ Ox.URL = function(options) {
}
function parseURL(str, callback) {
// fixme: removing trailing slash makes it impossible to search for '/'
// fixme: removing trailing slash makes it impossible to search for '/'
str = str.replace(/(^\/|\/$)/g, '');
var parts = str.split('/'),
state = {};

View file

@ -680,7 +680,8 @@ Ox.Input = function(options, self) {
} else {
end = isArray ? start[1] : (end ? end : 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);
}
}

View file

@ -357,7 +357,11 @@ if (
var type = Object.prototype.toString.call(
value
).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';
} else if (
type == 'htmlcollection' || (
@ -367,10 +371,6 @@ if (
)
) {
type = 'nodelist';
} else if (value === null) {
type = 'null';
} else if (value === void 0) {
type = 'undefined'
}
return type;
};

View file

@ -1,5 +1,4 @@
Ox.load({Geo: {}, UI: {}, Unicode: {}}, function() {
Ox.getJSON('../dev/Ox/json/Ox.json', function(files) {
var $body = $('body')