Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Uid fix #65

Merged
merged 2 commits into from

1 participant

@jonlb
Owner

No description provided.

@jonlb jonlb merged commit ec0e939 into JxLib:master
@jonlb jonlb referenced this pull request from a commit in jonlb/JxLib
@jonlb jonlb fix to issue #65 [#65 status:resolved] 9a6b658
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 35 additions and 34 deletions.
  1. +34 −33 src/Source/Base/object.js
  2. +1 −1  vendor/mootools-core
View
67 src/Source/Base/object.js
@@ -466,7 +466,7 @@ Jx.Object = new Class({
*/
generateId: function(prefix){
prefix = (prefix) ? prefix : 'jx-';
- var uid = $uid(this);
+ var uid = Slick.uidOf(this);
delete this.uid;
return prefix + uid;
}
@@ -483,38 +483,39 @@ Document.implement({
var types = {
- string: function(id, nocash, doc){
- id = Slick.find(doc, '#' + id.replace(/(\W)/g, '\\$1'));
- return (id) ? types.element(id, nocash) : null;
- },
-
- element: function(el, nocash){
- $uid(el);
- if (!nocash && !el.$family && !(/^(?:object|embed)$/i).test(el.tagName)){
- Object.append(el, Element.Prototype);
- }
- return el;
- },
-
- object: function(obj, nocash, doc){
- if (obj.toElement) return types.element(obj.toElement(doc), nocash);
- return null;
- }
-
- };
-
- types.textnode = types.whitespace = types.window = types.document = function(zero){
- return zero;
- };
-
- return function(el, nocash, doc){
- if (el && el.$family && el.uid) return el;
- if (el && instanceOf(el, Jx.Object)) {
- return types.element(el.toElement(doc || document), nocash);
- }
- var type = typeOf(el);
- return (types[type]) ? types[type](el, nocash, doc || document) : null;
- };
+ string: function(id, nocash, doc){
+ id = Slick.find(doc, '#' + id.replace(/(\W)/g, '\\$1'));
+ return (id) ? types.element(id, nocash) : null;
+ },
+
+ element: function(el, nocash){
+ Slick.uidOf(el);
+ if (!nocash && !el.$family && !(/^(?:object|embed)$/i).test(el.tagName)){
+ el._fireEvent = el.fireEvent;
+ Object.append(el, Element.Prototype);
+ }
+ return el;
+ },
+
+ object: function(obj, nocash, doc){
+ if (obj.toElement) return types.element(obj.toElement(doc), nocash);
+ return null;
+ }
+
+ };
+
+ types.textnode = types.whitespace = types.window = types.document = function(zero){
+ return zero;
+ };
+
+ return function(el, nocash, doc){
+ if (el && instanceOf(el, Jx.Object)) {
+ return types.element(el.toElement(doc || document), nocash);
+ }
+ if (el && el.$family && el.uniqueNumber) return el;
+ var type = typeOf(el);
+ return (types[type]) ? types[type](el, nocash, doc || document) : null;
+ };
})()
});
2  vendor/mootools-core
@@ -1 +1 @@
-Subproject commit f43daf0c116f885863f96e04e125729c0d8db9fd
+Subproject commit 4d1e7dfe4e79287b81360e1caa017d65c91eb2f9
Something went wrong with that request. Please try again.