spec/dummy/tmp/cache/assets/CEC/EF0/sprockets%2F4b24a74018f693c06088bd52f8cc9f86 in medivo-0.0.12 vs spec/dummy/tmp/cache/assets/CEC/EF0/sprockets%2F4b24a74018f693c06088bd52f8cc9f86 in medivo-0.0.13

- old
+ new

@@ -1,59 +1,27 @@ -o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1319811071.165895ž: @value{I" +o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1319993366.4108942L: @value{I" class:EFI"BundledAsset; FI"id; -F"%43d121cf467a8ef3ca2752ea2f237d0dI"logical_path; +F"%79de60d7e0a60008fee6f03129c252c1I"logical_path; FI"medivo/lab_list/models.js; FI" pathname; FI"l/Users/danielsudol/projects/medivo/medivo_resource/app/assets/javascripts/medivo/lab_list/models.coffee; FI"content_type; FI"application/javascript; FI" mtime; -FI"2011-10-27T12:25:53+01:00; +FI"2011-10-30T14:16:36+00:00; FI" body; -FI"(function() { - var isNumber; +FI"- (function() { var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; }; - isNumber = function(n) { - return !isNaN(parseFloat(n)) && isFinite(n); - }; - String.prototype.capitalize = function() { - return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase(); - }; - String.prototype.titleize = function() { - var parts, res; - res = []; - parts = this.split(" "); - $.each(parts, function(index, part) { - return res.push(part.capitalize()); - }); - return res.join(" "); - }; - Handlebars.registerHelper("rounded", function(number) { - if (isNumber(number)) { - return parseFloat(number).toFixed(2); - } - }); - Handlebars.registerHelper("titleize", function(string) { - if (string !== void 0) { - return string.titleize(); - } - }); - Handlebars.registerHelper("address_without_comma", function(lab) { - if (!(this.data && this.data.address)) { - return; - } - return this.data.address.replace(/(\s*,\s*$)/g, "").titleize(); - }); window.Lab = (function() { var index, marker, point; Lab.prototype.map_tooltip_template = Handlebars.compile("{{titleize name}}\n{{address_without_comma address}}\n{{titleize city}},{{state}} "); index = null; marker = null; @@ -98,11 +66,11 @@ function OrderedLab(data, index) { this.data = data; this.index = index; } OrderedLab.prototype.makeIcon = function() { - if (!isNumber(this.index)) { + if (!window.isNumber(this.index)) { OrderedLab.__super__.makeIcon.call(this); } return "/assets/medivo/marker" + this.makeLetter(this.index) + ".png"; }; OrderedLab.prototype.makeLetter = function(number) { @@ -118,70 +86,53 @@ return this.makeIcon(this.index); }; return OrderedLab; })(); window.LabList = (function() { - LabList.prototype.show_number = 3; - LabList.tracker_elem = $("<input type='hidden'>"); - function LabList(lab_info, show_number) { - this.labs = []; - if (show_number) { - this.show_number = show_number; + __extends(LabList, List); + function LabList(lab_info, show_number, model, tracker_id) { + if (!model) { + model = Lab; } - this.setLabs(lab_info); + if (!tracker_id) { + tracker_id = 'lab_list_tracker'; + } + LabList.__super__.constructor.call(this, lab_info, show_number, model, tracker_id); } - LabList.prototype.getLabs = function() { - return this.labs.slice(0, this.show_number); - }; - LabList.prototype.setLabs = function(lab_info) { + LabList.prototype.setList = function(lab_info) { this.clearMarkers(); - this.labs = []; - this.loadLabs(lab_info); - return LabList.tracker_elem.change(); + return LabList.__super__.setList.call(this, lab_info); }; LabList.prototype.clearMarkers = function() { - return $.each(this.labs, function(index, lab) { + return $.each(this.list, function(index, lab) { return lab.clearMarker(); }); }; - LabList.prototype.loadLabs = function(lab_info) { - var labs; - if (!lab_info) { - return; - } - labs = this.labs; - return $.each(lab_info, function(index, lab_data) { - return labs.push(new Lab(lab_data)); - }); - }; return LabList; })(); window.OrderedLabList = (function() { __extends(OrderedLabList, LabList); - function OrderedLabList() { - OrderedLabList.__super__.constructor.apply(this, arguments); + function OrderedLabList(lab_info, show_number) { + OrderedLabList.__super__.constructor.call(this, lab_info, show_number, OrderedLab, 'ordered_lab_list_tracker'); } - OrderedLabList.prototype.loadLabs = function(lab_info) { - var labs; - if (!lab_info) { - return; - } - labs = this.labs; - return $.each(lab_info, function(index, lab_data) { - return labs.push(new OrderedLab(lab_data, index)); - }); - }; return OrderedLabList; })(); }).call(this); ; TI"asset_paths; -F[I"l/Users/danielsudol/projects/medivo/medivo_resource/app/assets/javascripts/medivo/lab_list/models.coffee; +F[I"c/Users/danielsudol/projects/medivo/medivo_resource/app/assets/javascripts/medivo/models.coffee; +FI"l/Users/danielsudol/projects/medivo/medivo_resource/app/assets/javascripts/medivo/lab_list/models.coffee; FI"dependency_paths; -F[{I" path; +F[{I" path; FI"l/Users/danielsudol/projects/medivo/medivo_resource/app/assets/javascripts/medivo/lab_list/models.coffee; FI" mtime; -FIu: Time kç€Pg: @_zoneI"BST; -T: offsetiI"hexdigest; -F"%96ccf7b9808905d7883a31f75a668e66I" _version; +FIu: Time Ë瀠A: @_zoneI"GMT; +T: offsetiI"hexdigest; +F"%8beb2a692c9f0f139f959ad5c57c0967{I" path; +FI"c/Users/danielsudol/projects/medivo/medivo_resource/app/assets/javascripts/medivo/models.coffee; +FI" +mtime; +FIu; Îç€@B; I"GMT; +T; iI"hexdigest; +F"%839db657ef60e3f21440312719162e55I" _version; F"%ee50e40b36d7dc25c526aaff3fac8c9c \ No newline at end of file