o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1314578809.1482382: @value{I" class:EFI"BundledAsset; FI"id; F"%665c715759a332807287b638c9f19cc3I"logical_path; F")alpha_simprini/coffee_kup/binding.jsI" pathname; FI"m/Users/collin/Code/alpha-simprini-engine/app/assets/javascripts/alpha_simprini/coffee_kup/binding.coffee; TI"content_type; FI"application/javascript; FI" mtime; FI"2011-08-28T19:46:46-05:00; FI" body; FI"Ô(function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; module("AS.CK", function() { return this.Binding = { bind: function(model, property, getter) { var id; id = AS.CK.Helpers.autoId(); model.bind("destroy", function() { return id.query().remove(); }); if (getter) { model.bind("change:" + property, function() { return id.query().text(getter.call(model.get(property)) || ""); }); return span({ id: id.string }, function() { return getter.call(model.get(property)); }); } else { model.bind("change:" + property, function() { return id.query().text(model.get(property) || ""); }); return span({ id: id.string }, function() { return model.get(property); }); } }, bound_input: function(model, property, options) { var id; if (options == null) { options = {}; } id = AS.CK.Helpers.autoId(); model.bind("change:" + property, function() { return id.query().val(model.get(property)); }); id.query().live('change', function() { var data; data = {}; data[property] = id.query().val(); return model.set(data); }); id.query().live('keyup', function() { var data; data = {}; data[property] = id.query().val(); return model.set(data); }); return input(_.extend(options, { id: id.string, value: model.get(property) })); }, bind_collection: function(container_tagname, collection, templateName) { var id; id = AS.CK.Helpers.autoId(); collection.bind("add", __bind(function(item) { console.error("FIXME: add item at correct position"); return id.query().append(CoffeeKup.renderTemplate(templateName, this, { item: item })); }, this)); collection.bind("remove", function(item) { return id.query().find("[id=" + item.cid + "]").remove(); }); return tag(container_tagname, { id: id.string }, function() { var item, _i, _len, _ref, _results; _ref = collection.models; _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { item = _ref[_i]; _results.push(text(CoffeeKup.renderTemplate(templateName, this, { item: item }))); } return _results; }); }, bound_select: function(model, property, options, option_value_key, config) { var id, selection; if (config == null) { config = {}; } id = AS.CK.Helpers.autoId(); model.bind("change:" + property, function() { return id.query().val(model.get(property).cid); }); id.query().live("change", function() { var data; data = {}; data[property] = options.getByCid(id.query().val()); return model.set(data); }); options.bind("change:" + option_value_key, function(_option) { return id.query().find("[value=" + _option.cid + "]").text(_option.get(option_value_key)); }); options.bind("add", __bind(function(_option) { var compiled, template, _ref; console.error("FIXME: add option at correct position"); template = function() { return bound_select_option(_option, option_value_key); }; compiled = CoffeeKup.compile(template, { locals: true, hardcode: AS.TemplateHelpers }); if ((_ref = this.locals) == null) { this.locals = {}; } this.locals.option_value_key = option_value_key; this.locals._option = _option; return id.query().append(compiled(this)); }, this)); options.bind("remove", function(_option) { id.query().find("[value=" + _option.cid + "]").remove(); return id.query().change(); }); selection = model.get(property); return select({ id: id.string }, function() { var _i, _len, _option, _ref, _results; if (config.blank) { option(function() { return config.blank; }); } _ref = options.models; _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { _option = _ref[_i]; _results.push(bound_select_option(_option, option_value_key, _option === selection)); } return _results; }); }, bound_select_option: function(model, property, selected) { var id; id = AS.CK.Helpers.autoId(); model.bind("change:" + property, function() { return id.query().text(model.get(property)); }); return option({ id: id.string, value: model.cid, selected: selected }, function() { return model.get(property); }); } }; }); }).call(this); ; TI"asset_paths; F[I"m/Users/collin/Code/alpha-simprini-engine/app/assets/javascripts/alpha_simprini/coffee_kup/binding.coffee; TI"dependency_paths; F[{I" path; FI"m/Users/collin/Code/alpha-simprini-engine/app/assets/javascripts/alpha_simprini/coffee_kup/binding.coffee; TI" mtime; FIu: Time  ß€àº: @_zoneI"CDT; T: offsetiþ°¹I"hexdigest; F"%1506a34a643fae128d2ad08276eb1d8bI" _version; F"%a697d8e69dd5bf8f3a29159773d6c5f5