author | Giulio Cesare Solaroli <giulio.cesare@clipperz.com> | 2012-03-17 21:08:23 (UTC) |
---|---|---|
committer | Giulio Cesare Solaroli <giulio.cesare@clipperz.com> | 2012-03-17 21:08:23 (UTC) |
commit | 928f3f3ed3981f7f81b69ed94f2a315205db39fa (patch) (unidiff) | |
tree | 8a47229b56e4c906de8512baf0c5ca100bc03dfb /frontend/gamma/js/MochiKit/DOM.js | |
parent | bf7d8191a3a6dbd092a88911098a3e7f6cf30cf7 (diff) | |
download | clipperz-928f3f3ed3981f7f81b69ed94f2a315205db39fa.zip clipperz-928f3f3ed3981f7f81b69ed94f2a315205db39fa.tar.gz clipperz-928f3f3ed3981f7f81b69ed94f2a315205db39fa.tar.bz2 |
Fixed frontend properties and updated MochiKit version
Diffstat (limited to 'frontend/gamma/js/MochiKit/DOM.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/gamma/js/MochiKit/DOM.js | 165 |
1 files changed, 100 insertions, 65 deletions
diff --git a/frontend/gamma/js/MochiKit/DOM.js b/frontend/gamma/js/MochiKit/DOM.js index af5d46f..944ab78 100644 --- a/frontend/gamma/js/MochiKit/DOM.js +++ b/frontend/gamma/js/MochiKit/DOM.js | |||
@@ -1,35 +1,35 @@ | |||
1 | /*** | 1 | /*** |
2 | 2 | ||
3 | MochiKit.DOM 1.5 | 3 | MochiKit.DOM 1.5 |
4 | 4 | ||
5 | See <http://mochikit.com/> for documentation, downloads, license, etc. | 5 | See <http://mochikit.com/> for documentation, downloads, license, etc. |
6 | 6 | ||
7 | (c) 2005 Bob Ippolito. All rights Reserved. | 7 | (c) 2005 Bob Ippolito. All rights Reserved. |
8 | 8 | ||
9 | ***/ | 9 | ***/ |
10 | 10 | ||
11 | MochiKit.Base._module('DOM', '1.5', ['Base']); | 11 | MochiKit.Base.module(MochiKit, 'DOM', '1.5', ['Base']); |
12 | 12 | ||
13 | MochiKit.Base.update(MochiKit.DOM, { | 13 | MochiKit.Base.update(MochiKit.DOM, { |
14 | 14 | ||
15 | /** @id MochiKit.DOM.currentWindow */ | 15 | /** @id MochiKit.DOM.currentWindow */ |
16 | currentWindow: function () { | 16 | currentWindow: function () { |
17 | return MochiKit.DOM._window; | 17 | return MochiKit.DOM._window; |
18 | }, | 18 | }, |
19 | 19 | ||
20 | /** @id MochiKit.DOM.currentDocument */ | 20 | /** @id MochiKit.DOM.currentDocument */ |
21 | currentDocument: function () { | 21 | currentDocument: function () { |
22 | return MochiKit.DOM._document; | 22 | return MochiKit.DOM._document; |
23 | }, | 23 | }, |
24 | 24 | ||
25 | /** @id MochiKit.DOM.withWindow */ | 25 | /** @id MochiKit.DOM.withWindow */ |
26 | withWindow: function (win, func) { | 26 | withWindow: function (win, func) { |
27 | var self = MochiKit.DOM; | 27 | var self = MochiKit.DOM; |
28 | var oldDoc = self._document; | 28 | var oldDoc = self._document; |
29 | var oldWin = self._window; | 29 | var oldWin = self._window; |
30 | var rval; | 30 | var rval; |
31 | try { | 31 | try { |
32 | self._window = win; | 32 | self._window = win; |
33 | self._document = win.document; | 33 | self._document = win.document; |
34 | rval = func(); | 34 | rval = func(); |
35 | } catch (e) { | 35 | } catch (e) { |
@@ -276,103 +276,103 @@ MochiKit.Base.update(MochiKit.DOM, { | |||
276 | } | 276 | } |
277 | return null; | 277 | return null; |
278 | }, | 278 | }, |
279 | 279 | ||
280 | /** @id MochiKit.DOM.removeNodeAttribute */ | 280 | /** @id MochiKit.DOM.removeNodeAttribute */ |
281 | removeNodeAttribute: function (node, attr) { | 281 | removeNodeAttribute: function (node, attr) { |
282 | var self = MochiKit.DOM; | 282 | var self = MochiKit.DOM; |
283 | var rename = self.attributeArray.renames[attr]; | 283 | var rename = self.attributeArray.renames[attr]; |
284 | node = self.getElement(node); | 284 | node = self.getElement(node); |
285 | try { | 285 | try { |
286 | if (rename) { | 286 | if (rename) { |
287 | return node[rename]; | 287 | return node[rename]; |
288 | } | 288 | } |
289 | return node.removeAttribute(attr); | 289 | return node.removeAttribute(attr); |
290 | } catch (e) { | 290 | } catch (e) { |
291 | // pass | 291 | // pass |
292 | } | 292 | } |
293 | return null; | 293 | return null; |
294 | }, | 294 | }, |
295 | 295 | ||
296 | /** @id MochiKit.DOM.updateNodeAttributes */ | 296 | /** @id MochiKit.DOM.updateNodeAttributes */ |
297 | updateNodeAttributes: function (node, attrs) { | 297 | updateNodeAttributes: function (node, attrs) { |
298 | var elem = node; | 298 | var elem = node; |
299 | var self = MochiKit.DOM; | 299 | var self = MochiKit.DOM; |
300 | var base = MochiKit.Base; | ||
300 | if (typeof(node) == 'string') { | 301 | if (typeof(node) == 'string') { |
301 | elem = self.getElement(node); | 302 | elem = self.getElement(node); |
302 | } | 303 | } |
303 | if (attrs) { | 304 | if (attrs) { |
304 | var updatetree = MochiKit.Base.updatetree; | ||
305 | if (self.attributeArray.compliant) { | 305 | if (self.attributeArray.compliant) { |
306 | // not IE, good. | 306 | // not IE, good. |
307 | for (var k in attrs) { | 307 | for (var k in attrs) { |
308 | var v = attrs[k]; | 308 | var v = attrs[k]; |
309 | if (typeof(v) == 'object' && typeof(elem[k]) == 'object') { | 309 | if (typeof(v) == 'object' && typeof(elem[k]) == 'object') { |
310 | if (k == "style" && MochiKit.Style) { | 310 | if (k == "style" && MochiKit.Style) { |
311 | MochiKit.Style.setStyle(elem, v); | 311 | MochiKit.Style.setStyle(elem, v); |
312 | } else { | 312 | } else { |
313 | updatetree(elem[k], v); | 313 | base.updatetree(elem[k], v); |
314 | } | 314 | } |
315 | } else if (k.substring(0, 2) == "on") { | 315 | } else if (k.substring(0, 2) == "on") { |
316 | if (typeof(v) == "string") { | 316 | if (typeof(v) == "string") { |
317 | v = new Function(v); | 317 | v = new Function(v); |
318 | } | 318 | } |
319 | elem[k] = v; | 319 | elem[k] = v; |
320 | } else { | 320 | } else { |
321 | elem.setAttribute(k, v); | 321 | elem.setAttribute(k, v); |
322 | } | 322 | } |
323 | if (typeof(elem[k]) == "string" && elem[k] != v) { | 323 | if (base.isValue(elem[k]) && elem[k] != v) { |
324 | // Also set property for weird attributes (see #302) | 324 | // Also set property for weird attributes (see #302 & #335) |
325 | elem[k] = v; | 325 | elem[k] = v; |
326 | } | 326 | } |
327 | } | 327 | } |
328 | } else { | 328 | } else { |
329 | // IE is insane in the membrane | 329 | // IE is insane in the membrane |
330 | var renames = self.attributeArray.renames; | 330 | var renames = self.attributeArray.renames; |
331 | for (var k in attrs) { | 331 | for (var k in attrs) { |
332 | v = attrs[k]; | 332 | v = attrs[k]; |
333 | var renamed = renames[k]; | 333 | var renamed = renames[k]; |
334 | if (k == "style" && typeof(v) == "string") { | 334 | if (k == "style" && typeof(v) == "string") { |
335 | elem.style.cssText = v; | 335 | elem.style.cssText = v; |
336 | } else if (typeof(renamed) == "string") { | 336 | } else if (typeof(renamed) == "string") { |
337 | elem[renamed] = v; | 337 | elem[renamed] = v; |
338 | } else if (typeof(elem[k]) == 'object' | 338 | } else if (typeof(elem[k]) == 'object' |
339 | && typeof(v) == 'object') { | 339 | && typeof(v) == 'object') { |
340 | if (k == "style" && MochiKit.Style) { | 340 | if (k == "style" && MochiKit.Style) { |
341 | MochiKit.Style.setStyle(elem, v); | 341 | MochiKit.Style.setStyle(elem, v); |
342 | } else { | 342 | } else { |
343 | updatetree(elem[k], v); | 343 | base.updatetree(elem[k], v); |
344 | } | 344 | } |
345 | } else if (k.substring(0, 2) == "on") { | 345 | } else if (k.substring(0, 2) == "on") { |
346 | if (typeof(v) == "string") { | 346 | if (typeof(v) == "string") { |
347 | v = new Function(v); | 347 | v = new Function(v); |
348 | } | 348 | } |
349 | elem[k] = v; | 349 | elem[k] = v; |
350 | } else { | 350 | } else { |
351 | elem.setAttribute(k, v); | 351 | elem.setAttribute(k, v); |
352 | } | 352 | } |
353 | if (typeof(elem[k]) == "string" && elem[k] != v) { | 353 | if (base.isValue(elem[k]) && elem[k] != v) { |
354 | // Also set property for weird attributes (see #302) | 354 | // Also set property for weird attributes (see #302 & #335) |
355 | elem[k] = v; | 355 | elem[k] = v; |
356 | } | 356 | } |
357 | } | 357 | } |
358 | } | 358 | } |
359 | } | 359 | } |
360 | return elem; | 360 | return elem; |
361 | }, | 361 | }, |
362 | 362 | ||
363 | /** @id MochiKit.DOM.appendChildNodes */ | 363 | /** @id MochiKit.DOM.appendChildNodes */ |
364 | appendChildNodes: function (node/*, nodes...*/) { | 364 | appendChildNodes: function (node/*, nodes...*/) { |
365 | var elem = node; | 365 | var elem = node; |
366 | var self = MochiKit.DOM; | 366 | var self = MochiKit.DOM; |
367 | if (typeof(node) == 'string') { | 367 | if (typeof(node) == 'string') { |
368 | elem = self.getElement(node); | 368 | elem = self.getElement(node); |
369 | } | 369 | } |
370 | var nodeStack = [ | 370 | var nodeStack = [ |
371 | self.coerceToDOM( | 371 | self.coerceToDOM( |
372 | MochiKit.Base.extend(null, arguments, 1), | 372 | MochiKit.Base.extend(null, arguments, 1), |
373 | elem | 373 | elem |
374 | ) | 374 | ) |
375 | ]; | 375 | ]; |
376 | var concat = MochiKit.Base.concat; | 376 | var concat = MochiKit.Base.concat; |
377 | while (nodeStack.length) { | 377 | while (nodeStack.length) { |
378 | var n = nodeStack.shift(); | 378 | var n = nodeStack.shift(); |
@@ -969,176 +969,211 @@ MochiKit.Base.update(MochiKit.DOM, { | |||
969 | filtering out attributes that don't belong for | 969 | filtering out attributes that don't belong for |
970 | that are inserted by "Certain Browsers". | 970 | that are inserted by "Certain Browsers". |
971 | 971 | ||
972 | ***/ | 972 | ***/ |
973 | return filter(attributeArray.ignoreAttrFilter, node.attributes); | 973 | return filter(attributeArray.ignoreAttrFilter, node.attributes); |
974 | }; | 974 | }; |
975 | attributeArray.ignoreAttr = {}; | 975 | attributeArray.ignoreAttr = {}; |
976 | var attrs = __tmpElement.attributes; | 976 | var attrs = __tmpElement.attributes; |
977 | var ignoreAttr = attributeArray.ignoreAttr; | 977 | var ignoreAttr = attributeArray.ignoreAttr; |
978 | for (var i = 0; i < attrs.length; i++) { | 978 | for (var i = 0; i < attrs.length; i++) { |
979 | var a = attrs[i]; | 979 | var a = attrs[i]; |
980 | ignoreAttr[a.name] = a.value; | 980 | ignoreAttr[a.name] = a.value; |
981 | } | 981 | } |
982 | attributeArray.ignoreAttrFilter = function (a) { | 982 | attributeArray.ignoreAttrFilter = function (a) { |
983 | return (attributeArray.ignoreAttr[a.name] != a.value); | 983 | return (attributeArray.ignoreAttr[a.name] != a.value); |
984 | }; | 984 | }; |
985 | attributeArray.compliant = false; | 985 | attributeArray.compliant = false; |
986 | attributeArray.renames = { | 986 | attributeArray.renames = { |
987 | "class": "className", | 987 | "class": "className", |
988 | "checked": "defaultChecked", | 988 | "checked": "defaultChecked", |
989 | "usemap": "useMap", | 989 | "usemap": "useMap", |
990 | "for": "htmlFor", | 990 | "for": "htmlFor", |
991 | "readonly": "readOnly", | 991 | "readonly": "readOnly", |
992 | "colspan": "colSpan", | 992 | "colspan": "colSpan", |
993 | "rowspan": "rowSpan", | ||
993 | "bgcolor": "bgColor", | 994 | "bgcolor": "bgColor", |
994 | "cellspacing": "cellSpacing", | 995 | "cellspacing": "cellSpacing", |
995 | "cellpadding": "cellPadding" | 996 | "cellpadding": "cellPadding" |
996 | }; | 997 | }; |
997 | } else { | 998 | } else { |
998 | attributeArray = function (node) { | 999 | attributeArray = function (node) { |
999 | return node.attributes; | 1000 | return node.attributes; |
1000 | }; | 1001 | }; |
1001 | attributeArray.compliant = true; | 1002 | attributeArray.compliant = true; |
1002 | attributeArray.ignoreAttr = {}; | 1003 | attributeArray.ignoreAttr = {}; |
1003 | attributeArray.renames = {}; | 1004 | attributeArray.renames = {}; |
1004 | } | 1005 | } |
1005 | attributeArray.__export__ = false; | 1006 | attributeArray.__export__ = false; |
1006 | this.attributeArray = attributeArray; | 1007 | this.attributeArray = attributeArray; |
1007 | 1008 | ||
1008 | // Backwards compatibility aliases | 1009 | // Backwards compatibility aliases |
1009 | /** @id MochiKit.DOM.computedStyle */ | 1010 | /** @id MochiKit.DOM.computedStyle */ |
1010 | m._deprecated(this, 'computedStyle', 'MochiKit.Style.getStyle', '1.4'); | 1011 | m._deprecated(this, 'computedStyle', 'MochiKit.Style.getStyle', '1.4', true); |
1011 | /** @id MochiKit.DOM.elementDimensions */ | 1012 | /** @id MochiKit.DOM.elementDimensions */ |
1012 | m._deprecated(this, 'elementDimensions', 'MochiKit.Style.getElementDimensions', '1.4'); | 1013 | m._deprecated(this, 'elementDimensions', 'MochiKit.Style.getElementDimensions', '1.4'); |
1013 | /** @id MochiKit.DOM.elementPosition */ | 1014 | /** @id MochiKit.DOM.elementPosition */ |
1014 | m._deprecated(this, 'elementPosition', 'MochiKit.Style.getElementPosition', '1.4'); | 1015 | m._deprecated(this, 'elementPosition', 'MochiKit.Style.getElementPosition', '1.4'); |
1015 | /** @id MochiKit.DOM.getViewportDimensions */ | 1016 | /** @id MochiKit.DOM.getViewportDimensions */ |
1016 | m._deprecated(this, 'getViewportDimensions', 'MochiKit.Style.getViewportDimensions', '1.4'); | 1017 | m._deprecated(this, 'getViewportDimensions', 'MochiKit.Style.getViewportDimensions', '1.4'); |
1017 | /** @id MochiKit.DOM.hideElement */ | 1018 | /** @id MochiKit.DOM.hideElement */ |
1018 | m._deprecated(this, 'hideElement', 'MochiKit.Style.hideElement', '1.4'); | 1019 | m._deprecated(this, 'hideElement', 'MochiKit.Style.hideElement', '1.4'); |
1019 | /** @id MochiKit.DOM.makeClipping */ | 1020 | /** @id MochiKit.DOM.makeClipping */ |
1020 | m._deprecated(this, 'makeClipping', 'MochiKit.Style.makeClipping', '1.4.1'); | 1021 | m._deprecated(this, 'makeClipping', 'MochiKit.Style.makeClipping', '1.4.1'); |
1021 | /** @id MochiKit.DOM.makePositioned */ | 1022 | /** @id MochiKit.DOM.makePositioned */ |
1022 | m._deprecated(this, 'makePositioned', 'MochiKit.Style.makePositioned', '1.4.1'); | 1023 | m._deprecated(this, 'makePositioned', 'MochiKit.Style.makePositioned', '1.4.1'); |
1023 | /** @id MochiKit.DOM.setElementDimensions */ | 1024 | /** @id MochiKit.DOM.setElementDimensions */ |
1024 | m._deprecated(this, 'setElementDimensions', 'MochiKit.Style.setElementDimensions', '1.4'); | 1025 | m._deprecated(this, 'setElementDimensions', 'MochiKit.Style.setElementDimensions', '1.4'); |
1025 | /** @id MochiKit.DOM.setElementPosition */ | 1026 | /** @id MochiKit.DOM.setElementPosition */ |
1026 | m._deprecated(this, 'setElementPosition', 'MochiKit.Style.setElementPosition', '1.4'); | 1027 | m._deprecated(this, 'setElementPosition', 'MochiKit.Style.setElementPosition', '1.4'); |
1027 | /** @id MochiKit.DOM.setDisplayForElement */ | 1028 | /** @id MochiKit.DOM.setDisplayForElement */ |
1028 | m._deprecated(this, 'setDisplayForElement', 'MochiKit.Style.setDisplayForElement', '1.4'); | 1029 | m._deprecated(this, 'setDisplayForElement', 'MochiKit.Style.setDisplayForElement', '1.4'); |
1029 | /** @id MochiKit.DOM.setOpacity */ | 1030 | /** @id MochiKit.DOM.setOpacity */ |
1030 | m._deprecated(this, 'setOpacity', 'MochiKit.Style.setOpacity', '1.4'); | 1031 | m._deprecated(this, 'setOpacity', 'MochiKit.Style.setOpacity', '1.4'); |
1031 | /** @id MochiKit.DOM.showElement */ | 1032 | /** @id MochiKit.DOM.showElement */ |
1032 | m._deprecated(this, 'showElement', 'MochiKit.Style.showElement', '1.4'); | 1033 | m._deprecated(this, 'showElement', 'MochiKit.Style.showElement', '1.4'); |
1033 | /** @id MochiKit.DOM.undoClipping */ | 1034 | /** @id MochiKit.DOM.undoClipping */ |
1034 | m._deprecated(this, 'undoClipping', 'MochiKit.Style.undoClipping', '1.4.1'); | 1035 | m._deprecated(this, 'undoClipping', 'MochiKit.Style.undoClipping', '1.4.1'); |
1035 | /** @id MochiKit.DOM.undoPositioned */ | 1036 | /** @id MochiKit.DOM.undoPositioned */ |
1036 | m._deprecated(this, 'undoPositioned', 'MochiKit.Style.undoPositioned', '1.4.1'); | 1037 | m._deprecated(this, 'undoPositioned', 'MochiKit.Style.undoPositioned', '1.4.1'); |
1037 | /** @id MochiKit.DOM.Coordinates */ | 1038 | /** @id MochiKit.DOM.Coordinates */ |
1038 | m._deprecated(this, 'Coordinates', 'MochiKit.Style.Coordinates', '1.4'); | 1039 | m._deprecated(this, 'Coordinates', 'MochiKit.Style.Coordinates', '1.4'); |
1039 | /** @id MochiKit.DOM.Dimensions */ | 1040 | /** @id MochiKit.DOM.Dimensions */ |
1040 | m._deprecated(this, 'Dimensions', 'MochiKit.Style.Dimensions', '1.4'); | 1041 | m._deprecated(this, 'Dimensions', 'MochiKit.Style.Dimensions', '1.4'); |
1041 | 1042 | ||
1042 | // shorthand for createDOM syntax | 1043 | // shorthand for createDOM syntax |
1043 | var createDOMFunc = this.createDOMFunc; | 1044 | var createDOMFunc = this.createDOMFunc; |
1044 | /** @id MochiKit.DOM.UL */ | ||
1045 | this.UL = createDOMFunc("ul"); | ||
1046 | /** @id MochiKit.DOM.OL */ | ||
1047 | this.OL = createDOMFunc("ol"); | ||
1048 | /** @id MochiKit.DOM.LI */ | ||
1049 | this.LI = createDOMFunc("li"); | ||
1050 | /** @id MochiKit.DOM.DL */ | ||
1051 | this.DL = createDOMFunc("dl"); | ||
1052 | /** @id MochiKit.DOM.DT */ | ||
1053 | this.DT = createDOMFunc("dt"); | ||
1054 | /** @id MochiKit.DOM.DD */ | ||
1055 | this.DD = createDOMFunc("dd"); | ||
1056 | /** @id MochiKit.DOM.TD */ | ||
1057 | this.TD = createDOMFunc("td"); | ||
1058 | /** @id MochiKit.DOM.TR */ | ||
1059 | this.TR = createDOMFunc("tr"); | ||
1060 | /** @id MochiKit.DOM.TBODY */ | ||
1061 | this.TBODY = createDOMFunc("tbody"); | ||
1062 | /** @id MochiKit.DOM.THEAD */ | ||
1063 | this.THEAD = createDOMFunc("thead"); | ||
1064 | /** @id MochiKit.DOM.TFOOT */ | ||
1065 | this.TFOOT = createDOMFunc("tfoot"); | ||
1066 | /** @id MochiKit.DOM.TABLE */ | ||
1067 | this.TABLE = createDOMFunc("table"); | ||
1068 | /** @id MochiKit.DOM.TH */ | ||
1069 | this.TH = createDOMFunc("th"); | ||
1070 | /** @id MochiKit.DOM.INPUT */ | ||
1071 | this.INPUT = createDOMFunc("input"); | ||
1072 | /** @id MochiKit.DOM.SPAN */ | ||
1073 | this.SPAN = createDOMFunc("span"); | ||
1074 | /** @id MochiKit.DOM.A */ | 1045 | /** @id MochiKit.DOM.A */ |
1075 | this.A = createDOMFunc("a"); | 1046 | this.A = createDOMFunc("a"); |
1076 | /** @id MochiKit.DOM.DIV */ | 1047 | /** @id MochiKit.DOM.ARTICLE */ |
1077 | this.DIV = createDOMFunc("div"); | 1048 | this.ARTICLE = createDOMFunc("article"); |
1078 | /** @id MochiKit.DOM.IMG */ | 1049 | /** @id MochiKit.DOM.ASIDE */ |
1079 | this.IMG = createDOMFunc("img"); | 1050 | this.ASIDE = createDOMFunc("aside"); |
1051 | /** @id MochiKit.DOM.BR */ | ||
1052 | this.BR = createDOMFunc("br"); | ||
1080 | /** @id MochiKit.DOM.BUTTON */ | 1053 | /** @id MochiKit.DOM.BUTTON */ |
1081 | this.BUTTON = createDOMFunc("button"); | 1054 | this.BUTTON = createDOMFunc("button"); |
1082 | /** @id MochiKit.DOM.TT */ | 1055 | /** @id MochiKit.DOM.CANVAS */ |
1083 | this.TT = createDOMFunc("tt"); | 1056 | this.CANVAS = createDOMFunc("canvas"); |
1084 | /** @id MochiKit.DOM.PRE */ | 1057 | /** @id MochiKit.DOM.CAPTION */ |
1085 | this.PRE = createDOMFunc("pre"); | 1058 | this.CAPTION = createDOMFunc("caption"); |
1059 | /** @id MochiKit.DOM.DD */ | ||
1060 | this.DD = createDOMFunc("dd"); | ||
1061 | /** @id MochiKit.DOM.DIV */ | ||
1062 | this.DIV = createDOMFunc("div"); | ||
1063 | /** @id MochiKit.DOM.DL */ | ||
1064 | this.DL = createDOMFunc("dl"); | ||
1065 | /** @id MochiKit.DOM.DT */ | ||
1066 | this.DT = createDOMFunc("dt"); | ||
1067 | /** @id MochiKit.DOM.FIELDSET */ | ||
1068 | this.FIELDSET = createDOMFunc("fieldset"); | ||
1069 | /** @id MochiKit.DOM.FIGURE */ | ||
1070 | this.FIGURE = createDOMFunc("figure"); | ||
1071 | /** @id MochiKit.DOM.FIGCAPTION */ | ||
1072 | this.FIGCAPTION = createDOMFunc("figcaption"); | ||
1073 | /** @id MochiKit.DOM.FOOTER */ | ||
1074 | this.FOOTER = createDOMFunc("footer"); | ||
1075 | /** @id MochiKit.DOM.FORM */ | ||
1076 | this.FORM = createDOMFunc("form"); | ||
1086 | /** @id MochiKit.DOM.H1 */ | 1077 | /** @id MochiKit.DOM.H1 */ |
1087 | this.H1 = createDOMFunc("h1"); | 1078 | this.H1 = createDOMFunc("h1"); |
1088 | /** @id MochiKit.DOM.H2 */ | 1079 | /** @id MochiKit.DOM.H2 */ |
1089 | this.H2 = createDOMFunc("h2"); | 1080 | this.H2 = createDOMFunc("h2"); |
1090 | /** @id MochiKit.DOM.H3 */ | 1081 | /** @id MochiKit.DOM.H3 */ |
1091 | this.H3 = createDOMFunc("h3"); | 1082 | this.H3 = createDOMFunc("h3"); |
1092 | /** @id MochiKit.DOM.H4 */ | 1083 | /** @id MochiKit.DOM.H4 */ |
1093 | this.H4 = createDOMFunc("h4"); | 1084 | this.H4 = createDOMFunc("h4"); |
1094 | /** @id MochiKit.DOM.H5 */ | 1085 | /** @id MochiKit.DOM.H5 */ |
1095 | this.H5 = createDOMFunc("h5"); | 1086 | this.H5 = createDOMFunc("h5"); |
1096 | /** @id MochiKit.DOM.H6 */ | 1087 | /** @id MochiKit.DOM.H6 */ |
1097 | this.H6 = createDOMFunc("h6"); | 1088 | this.H6 = createDOMFunc("h6"); |
1098 | /** @id MochiKit.DOM.BR */ | 1089 | /** @id MochiKit.DOM.HEADER */ |
1099 | this.BR = createDOMFunc("br"); | 1090 | this.HEADER = createDOMFunc("header"); |
1091 | /** @id MochiKit.DOM.HGROUP */ | ||
1092 | this.HGROUP = createDOMFunc("hgroup"); | ||
1100 | /** @id MochiKit.DOM.HR */ | 1093 | /** @id MochiKit.DOM.HR */ |
1101 | this.HR = createDOMFunc("hr"); | 1094 | this.HR = createDOMFunc("hr"); |
1095 | /** @id MochiKit.DOM.IFRAME */ | ||
1096 | this.IFRAME = createDOMFunc("iframe"); | ||
1097 | /** @id MochiKit.DOM.IMG */ | ||
1098 | this.IMG = createDOMFunc("img"); | ||
1099 | /** @id MochiKit.DOM.INPUT */ | ||
1100 | this.INPUT = createDOMFunc("input"); | ||
1102 | /** @id MochiKit.DOM.LABEL */ | 1101 | /** @id MochiKit.DOM.LABEL */ |
1103 | this.LABEL = createDOMFunc("label"); | 1102 | this.LABEL = createDOMFunc("label"); |
1104 | /** @id MochiKit.DOM.TEXTAREA */ | 1103 | /** @id MochiKit.DOM.LEGEND */ |
1105 | this.TEXTAREA = createDOMFunc("textarea"); | 1104 | this.LEGEND = createDOMFunc("legend"); |
1106 | /** @id MochiKit.DOM.FORM */ | 1105 | /** @id MochiKit.DOM.LI */ |
1107 | this.FORM = createDOMFunc("form"); | 1106 | this.LI = createDOMFunc("li"); |
1107 | /** @id MochiKit.DOM.LINK */ | ||
1108 | this.LINK = createDOMFunc("link"); | ||
1109 | /** @id MochiKit.DOM.MARK */ | ||
1110 | this.MARK = createDOMFunc("mark"); | ||
1111 | /** @id MochiKit.DOM.METER */ | ||
1112 | this.METER = createDOMFunc("meter"); | ||
1113 | /** @id MochiKit.DOM.NAV */ | ||
1114 | this.NAV = createDOMFunc("nav"); | ||
1115 | /** @id MochiKit.DOM.OL */ | ||
1116 | this.OL = createDOMFunc("ol"); | ||
1117 | /** @id MochiKit.DOM.OPTGROUP */ | ||
1118 | this.OPTGROUP = createDOMFunc("optgroup"); | ||
1119 | /** @id MochiKit.DOM.OPTION */ | ||
1120 | this.OPTION = createDOMFunc("option"); | ||
1108 | /** @id MochiKit.DOM.P */ | 1121 | /** @id MochiKit.DOM.P */ |
1109 | this.P = createDOMFunc("p"); | 1122 | this.P = createDOMFunc("p"); |
1123 | /** @id MochiKit.DOM.PRE */ | ||
1124 | this.PRE = createDOMFunc("pre"); | ||
1125 | /** @id MochiKit.DOM.PROGRESS */ | ||
1126 | this.PROGRESS = createDOMFunc("progress"); | ||
1127 | /** @id MochiKit.DOM.SCRIPT */ | ||
1128 | this.SCRIPT = createDOMFunc("script"); | ||
1129 | /** @id MochiKit.DOM.SECTION */ | ||
1130 | this.SECTION = createDOMFunc("section"); | ||
1110 | /** @id MochiKit.DOM.SELECT */ | 1131 | /** @id MochiKit.DOM.SELECT */ |
1111 | this.SELECT = createDOMFunc("select"); | 1132 | this.SELECT = createDOMFunc("select"); |
1112 | /** @id MochiKit.DOM.OPTION */ | 1133 | /** @id MochiKit.DOM.SPAN */ |
1113 | this.OPTION = createDOMFunc("option"); | 1134 | this.SPAN = createDOMFunc("span"); |
1114 | /** @id MochiKit.DOM.OPTGROUP */ | ||
1115 | this.OPTGROUP = createDOMFunc("optgroup"); | ||
1116 | /** @id MochiKit.DOM.LEGEND */ | ||
1117 | this.LEGEND = createDOMFunc("legend"); | ||
1118 | /** @id MochiKit.DOM.FIELDSET */ | ||
1119 | this.FIELDSET = createDOMFunc("fieldset"); | ||
1120 | /** @id MochiKit.DOM.STRONG */ | 1135 | /** @id MochiKit.DOM.STRONG */ |
1121 | this.STRONG = createDOMFunc("strong"); | 1136 | this.STRONG = createDOMFunc("strong"); |
1122 | /** @id MochiKit.DOM.CANVAS */ | 1137 | /** @id MochiKit.DOM.STYLE */ |
1123 | this.CANVAS = createDOMFunc("canvas"); | 1138 | this.STYLE = createDOMFunc("style"); |
1124 | 1139 | /** @id MochiKit.DOM.TABLE */ | |
1140 | this.TABLE = createDOMFunc("table"); | ||
1141 | /** @id MochiKit.DOM.TBODY */ | ||
1142 | this.TBODY = createDOMFunc("tbody"); | ||
1143 | /** @id MochiKit.DOM.TD */ | ||
1144 | this.TD = createDOMFunc("td"); | ||
1145 | /** @id MochiKit.DOM.TEXTAREA */ | ||
1146 | this.TEXTAREA = createDOMFunc("textarea"); | ||
1147 | /** @id MochiKit.DOM.TFOOT */ | ||
1148 | this.TFOOT = createDOMFunc("tfoot"); | ||
1149 | /** @id MochiKit.DOM.TH */ | ||
1150 | this.TH = createDOMFunc("th"); | ||
1151 | /** @id MochiKit.DOM.THEAD */ | ||
1152 | this.THEAD = createDOMFunc("thead"); | ||
1153 | /** @id MochiKit.DOM.TR */ | ||
1154 | this.TR = createDOMFunc("tr"); | ||
1155 | /** @id MochiKit.DOM.TT */ | ||
1156 | this.TT = createDOMFunc("tt"); | ||
1157 | /** @id MochiKit.DOM.UL */ | ||
1158 | this.UL = createDOMFunc("ul"); | ||
1159 | /** @id MochiKit.DOM.NBSP */ | ||
1160 | this.NBSP = "\u00a0"; | ||
1125 | /** @id MochiKit.DOM.$ */ | 1161 | /** @id MochiKit.DOM.$ */ |
1126 | this.$ = this.getElement; | 1162 | this.$ = this.getElement; |
1127 | 1163 | ||
1128 | m.nameFunctions(this); | 1164 | m.nameFunctions(this); |
1129 | |||
1130 | } | 1165 | } |
1131 | }); | 1166 | }); |
1132 | 1167 | ||
1133 | 1168 | ||
1134 | MochiKit.DOM.__new__(((typeof(window) == "undefined") ? this : window)); | 1169 | MochiKit.DOM.__new__(((typeof(window) == "undefined") ? this : window)); |
1135 | 1170 | ||
1136 | // | 1171 | // |
1137 | // XXX: Internet Explorer blows | 1172 | // XXX: Internet Explorer blows |
1138 | // | 1173 | // |
1139 | if (MochiKit.__export__) { | 1174 | if (MochiKit.__export__) { |
1140 | withWindow = MochiKit.DOM.withWindow; | 1175 | withWindow = MochiKit.DOM.withWindow; |
1141 | withDocument = MochiKit.DOM.withDocument; | 1176 | withDocument = MochiKit.DOM.withDocument; |
1142 | } | 1177 | } |
1143 | 1178 | ||
1144 | MochiKit.Base._exportSymbols(this, MochiKit.DOM); | 1179 | MochiKit.Base._exportSymbols(this, MochiKit.DOM); |