Diffstat (limited to 'frontend/gamma/js/MochiKit/Style.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/gamma/js/MochiKit/Style.js | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/frontend/gamma/js/MochiKit/Style.js b/frontend/gamma/js/MochiKit/Style.js index 7f10117..740fd2f 100644 --- a/frontend/gamma/js/MochiKit/Style.js +++ b/frontend/gamma/js/MochiKit/Style.js | |||
@@ -7,7 +7,10 @@ See <http://mochikit.com/> for documentation, downloads, license, etc. | |||
7 | (c) 2005-2006 Bob Ippolito, Beau Hartshorne. All rights Reserved. | 7 | (c) 2005-2006 Bob Ippolito, Beau Hartshorne. All rights Reserved. |
8 | 8 | ||
9 | The MochiKit.Style.getElementPosition function is adapted from | ||
10 | YAHOO.util.Dom.getXY v0.9.0. which is copyrighted by Yahoo! Inc. | ||
11 | |||
9 | ***/ | 12 | ***/ |
10 | 13 | ||
11 | MochiKit.Base._module('Style', '1.5', ['Base', 'DOM']); | 14 | MochiKit.Base.module(MochiKit, 'Style', '1.5', ['Base', 'DOM']); |
12 | 15 | ||
13 | 16 | ||
@@ -180,5 +183,5 @@ MochiKit.Base.update(MochiKit.Style, { | |||
180 | typeof(o.x) == "number" && | 183 | typeof(o.x) == "number" && |
181 | typeof(o.y) == "number"; | 184 | typeof(o.y) == "number"; |
182 | } | 185 | }; |
183 | 186 | ||
184 | if (typeof(elem) == "string") { | 187 | if (typeof(elem) == "string") { |
@@ -198,5 +201,5 @@ MochiKit.Base.update(MochiKit.Style, { | |||
198 | var b = d.body; | 201 | var b = d.body; |
199 | 202 | ||
200 | if (!elem.parentNode && elem.x && elem.y) { | 203 | if (isCoordinates(elem)) { |
201 | /* it's just a MochiKit.Style.Coordinates object */ | 204 | /* it's just a MochiKit.Style.Coordinates object */ |
202 | c.x += elem.x || 0; | 205 | c.x += elem.x || 0; |
@@ -229,6 +232,6 @@ MochiKit.Base.update(MochiKit.Style, { | |||
229 | if (parent != elem) { | 232 | if (parent != elem) { |
230 | while (parent) { | 233 | while (parent) { |
231 | c.x += parseInt(parent.style.borderLeftWidth) || 0; | 234 | c.x += parseInt(parent.style.borderLeftWidth, 10) || 0; |
232 | c.y += parseInt(parent.style.borderTopWidth) || 0; | 235 | c.y += parseInt(parent.style.borderTopWidth, 10) || 0; |
233 | c.x += parent.offsetLeft; | 236 | c.x += parent.offsetLeft; |
234 | c.y += parent.offsetTop; | 237 | c.y += parent.offsetTop; |
@@ -391,5 +394,5 @@ MochiKit.Base.update(MochiKit.Style, { | |||
391 | var tableCell = 'colSpan' in elem && 'rowSpan' in elem; | 394 | var tableCell = 'colSpan' in elem && 'rowSpan' in elem; |
392 | var collapse = (tableCell && elem.parentNode && self.getStyle( | 395 | var collapse = (tableCell && elem.parentNode && self.getStyle( |
393 | elem.parentNode, 'borderCollapse') == 'collapse') | 396 | elem.parentNode, 'borderCollapse') == 'collapse'); |
394 | if (collapse) { | 397 | if (collapse) { |
395 | if (/MSIE/.test(navigator.userAgent)) { | 398 | if (/MSIE/.test(navigator.userAgent)) { |
@@ -544,6 +547,6 @@ MochiKit.Base.update(MochiKit.Style, { | |||
544 | 547 | ||
545 | // Backwards compatibility aliases | 548 | // Backwards compatibility aliases |
546 | m._deprecated(this, 'elementPosition', 'MochiKit.Style.getElementPosition', '1.3'); | 549 | m._deprecated(this, 'elementPosition', 'MochiKit.Style.getElementPosition', '1.3', true); |
547 | m._deprecated(this, 'elementDimensions', 'MochiKit.Style.getElementDimensions', '1.3'); | 550 | m._deprecated(this, 'elementDimensions', 'MochiKit.Style.getElementDimensions', '1.3', true); |
548 | 551 | ||
549 | this.hideElement = m.partial(this.setDisplayForElement, 'none'); | 552 | this.hideElement = m.partial(this.setDisplayForElement, 'none'); |