{:uriI"file:///Users/himn1/dev/rails/engines/loco/lib/assets/javascripts/loco/ui/tabs.coffee?type=application/javascript&pipeline=self&id=dd9d1ea3d139a9925c740a62881bc94d236b9c6d4bef62b4025aed6b9ad353d5:ET:load_pathI"?/Users/himn1/dev/rails/engines/loco/lib/assets/javascripts;T: filenameI"S/Users/himn1/dev/rails/engines/loco/lib/assets/javascripts/loco/ui/tabs.coffee;T: nameI"loco/ui/tabs;T:logical_pathI"loco/ui/tabs.self.js;T:content_typeI"application/javascript;T: sourceI"(function() { App.UI.Tabs = (function() { function Tabs(node, delegator, opts) { var ref; if (opts == null) { opts = {}; } this.sel = $(node); this.delegator = delegator; this.animFunc = (ref = opts.animFunc) != null ? ref : 'animate'; this.handle(); } Tabs.prototype.handle = function() { var elementsSize; elementsSize = this.sel.find('a').size(); return this.sel.find('a').click((function(_this) { return function(e) { var child, i, index, left, len, ref, width; e.preventDefault(); if ($(e.target).hasClass("active")) { return; } index = 0; ref = $(e.target).parent().children('a'); for (i = 0, len = ref.length; i < len; i++) { child = ref[i]; if ($(child).text() === $(e.target).text()) { break; } index += 1; } width = parseInt(_this.sel.css('width')); left = width / elementsSize * index; _this.sel.find('a.active').removeClass('active'); $(e.target).addClass('active'); _this.sel.find('div.background')[_this.animFunc]({ left: left }, 200); return _this.delegator[$(e.target).data("action")](); }; })(this)); }; return Tabs; })(); }).call(this); ;T: metadata{ :dependencieso:Set: @hash} I"environment-version;TTI"environment-paths;TTI"jprocessors:type=application/javascript&file_type=application/javascript&engines=.coffee&pipeline=self;TTI"afile-digest:///Users/himn1/dev/rails/engines/loco/lib/assets/javascripts/loco/ui/tabs.coffee;TTF: requiredo;;}F: stubbedo;;}F: linkso;;}F: charsetI" utf-8;F: digest"%' 'eFnGP}מ74]vmvP p[&: lengthi:dependencies_digest"%2QgILQ޸߱C(ak!:idI"Edd9d1ea3d139a9925c740a62881bc94d236b9c6d4bef62b4025aed6b9ad353d5;F: mtimel+V