Skip to content

Instantly share code, notes, and snippets.

@rathwell
Created November 13, 2011 05:35
Show Gist options
  • Save rathwell/1361656 to your computer and use it in GitHub Desktop.
Save rathwell/1361656 to your computer and use it in GitHub Desktop.
pinot.events.match_QMARK_ = function(a, b) {
for(var c = cljs.core.truth_(cljs.core.seq_QMARK_.call(null, a)) ? cljs.core.apply.call(null, cljs.core.hash_map, a) : a, d = cljs.core.get.call(null, c, "\ufdd0'pinotId"), e = cljs.core.get.call(null, c, "\ufdd0'pinotGroup"), f = cljs.core.get.call(null, c, "\ufdd0'elem"), g = b;;) {
var h = pinot.html.attr.call(null, g, "\ufdd0'pinotGroup"), i = pinot.html.attr.call(null, g, "\ufdd0'pinotId");
if(cljs.core.truth_(cljs.core.not_EQ_.call(null, g, pinot.html.parent.call(null, pinot.events.get_body.call(null))))) {
bootstrap.js:12495Uncaught TypeError: Cannot call method 'call' of undefined
if(cljs.core.truth_(function() {
var a = cljs.core.truth_(f) ? cljs.core._EQ_.call(null, f, g) : f;
return cljs.core.truth_(a) ? a : (a = cljs.core.truth_(e) ? cljs.core._EQ_.call(null, e, h) : e, cljs.core.truth_(a) ? a : cljs.core.truth_(d) ? cljs.core._EQ_.call(null, d, i) : d)
}())) {
return g
}else {
g = pinot.html.parent.call(null, g)
}
}else {
return null
}
}
};
pinot.events.on = function(a, b, c) {
for(var b = clojure.string.upper_case.call(null, cljs.core.name.call(null, b)), b = goog.events.EventType[b], d = pinot.events.get_body.call(null), e = cljs.core.seq.call(null, pinot.util.clj.__GT_coll.call(null, a));;) {
if(cljs.core.truth_(e)) {
var f = cljs.core.first.call(null, e), g = pinot.events.__GT_target.call(null, f);
goog.events.listen.call(null, d, b, function() {
return function(a) {
var b = pinot.events.match_QMARK_.call(null, g, a.target);
return cljs.core.truth_(b) ? c.call(null, b, a) : !0
}
}(e));
e = cljs.core.next.call(null, e)
}else {
break
}
}
return a
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment