Commit bdd8caa1 authored by Martyn Smith's avatar Martyn Smith Committed by Martyn Smith
Browse files

Sync with upstream

parent dd68340f
......@@ -36,14 +36,27 @@ if (typeof(MochiKit.Selector) == 'undefined') {
}
MochiKit.Selector.NAME = "MochiKit.Selector";
MochiKit.Selector.VERSION = "1.4";
MochiKit.Selector.__repr__ = function () {
return "[" + this.NAME + " " + this.VERSION + "]";
};
MochiKit.Selector.toString = function () {
return this.__repr__();
};
MochiKit.Selector.EXPORT = [
"Selector",
"findChildElements",
"findDocElements",
"$$"
];
MochiKit.Selector.EXPORT_OK = [
];
MochiKit.Selector.Selector = function (expression) {
this.params = {classNames: [], pseudoClassNames: []};
this.expression = expression.toString().replace(/(^\s+|\s+$)/g, '');
......@@ -392,11 +405,27 @@ MochiKit.Base.update(MochiKit.Selector, {
}
}, expression.replace(/(^\s+|\s+$)/g, '').split(/\s+/), [null]);
}, expressions));
}
},
findDocElements: function () {
return MochiKit.Selector.findChildElements(MochiKit.DOM.currentDocument(), arguments);
},
__new__: function () {
var m = MochiKit.Base;
this.$$ = this.findDocElements;
this.EXPORT_TAGS = {
":common": this.EXPORT,
":all": m.concat(this.EXPORT, this.EXPORT_OK)
};
m.nameFunctions(this);
}
});
function $$() {
return MochiKit.Selector.findChildElements(MochiKit.DOM.currentDocument(), arguments);
}
MochiKit.Selector.__new__();
MochiKit.Base._exportSymbols(this, MochiKit.Selector);
......@@ -175,7 +175,7 @@ MochiKit.Base.update(MochiKit.Style, {
var self = MochiKit.Style;
if (o == 1) {
var toSet = /Gecko/.test(navigator.userAgent) && !(/Konqueror|Safari|KHTML/.test(navigator.userAgent));
elem.style[name] = toSet ? 0.999999 : 1.0;
elem.style["opacity"] = toSet ? 0.999999 : 1.0;
if (/MSIE/.test(navigator.userAgent)) {
elem.style['filter'] =
self.getStyle(elem, 'filter').replace(/alpha\([^\)]*\)/gi, '');
......@@ -184,7 +184,7 @@ MochiKit.Base.update(MochiKit.Style, {
if (o < 0.00001) {
o = 0;
}
elem.style[name] = o;
elem.style["opacity"] = o;
if (/MSIE/.test(navigator.userAgent)) {
elem.style['filter'] =
self.getStyle(elem, 'filter').replace(/alpha\([^\)]*\)/gi, '') + 'alpha(opacity=' + o * 100 + ')';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment