spec/dummy/tmp/cache/assets/CEE/250/sprockets%2F96688f33f2f8aa261bf6701c1d6d7575 in medivo-0.0.12 vs spec/dummy/tmp/cache/assets/CEE/250/sprockets%2F96688f33f2f8aa261bf6701c1d6d7575 in medivo-0.0.13
- old
+ new
@@ -1,187 +1,63 @@
-o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1319712231.8007109 >Ù:@value{I"
+o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1319993366.408942 ,:@value{I"
class:EFI"BundledAsset;
FI"id;
-F"%698b211addc6da876391de78a9bed676I"logical_path;
+F"%3135435310de63f33c85a74c1c75fdedI"logical_path;
FI"medivo/models.js;
FI"
pathname;
FI"c/Users/danielsudol/projects/medivo/medivo_resource/app/assets/javascripts/medivo/models.coffee;
FI"content_type;
FI"application/javascript;
FI"
mtime;
-FI"2011-10-27T11:43:50+01:00;
+FI"2011-10-30T14:16:36+00:00;
FI" body;
-FI"(function() {
- var isNumber;
- 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;
- point = null;
- function Lab(data) {
- this.data = data;
- }
- Lab.prototype.clearMarker = function() {
- if (this.marker) {
- this.marker.setMap(null);
- return this.marker = null;
- }
- };
- Lab.prototype.setMarker = function(map, markerBounds, index) {
- this.point = new google.maps.LatLng(this.data.lat, this.data.lng);
- this.marker = this.makeMarker(map, index);
- if (markerBounds) {
- return markerBounds.extend(this.point);
- }
- };
- Lab.prototype.makeMarker = function(map, index) {
- return new google.maps.Marker({
- position: this.point,
- map: map,
- title: this.map_tooltip_template(this.data),
- icon: this.makeIcon(index)
- });
- };
- Lab.prototype.makeIcon = function() {
- return "/assets/medivo/lab.png";
- };
- Lab.prototype.icon = function() {
- if (this.marker) {
- return this.marker.icon;
- }
- return this.makeIcon();
- };
- return Lab;
- })();
- window.OrderedLab = (function() {
- __extends(OrderedLab, Lab);
- function OrderedLab(data, index) {
- this.data = data;
- this.index = index;
- }
- OrderedLab.prototype.makeIcon = function() {
- if (!isNumber(this.index)) {
- OrderedLab.__super__.makeIcon.call(this);
- }
- return "/assets/medivo/marker" + this.makeLetter(this.index) + ".png";
- };
- OrderedLab.prototype.makeLetter = function(number) {
- if (number >= 0 && number <= 26) {
- return String.fromCharCode(number + 65);
- }
- return '';
- };
- OrderedLab.prototype.icon = function() {
- if (this.marker) {
- return this.marker.icon;
- }
- 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 = [];
+FI"H(function() {
+ window.List = (function() {
+ List.prototype.show_number = 3;
+ function List(list_data, show_number, model, tracker_id) {
+ this.list = [];
if (show_number) {
this.show_number = show_number;
}
- this.setLabs(lab_info);
+ this.model = model;
+ this.tracker_elem = $("<input id='" + tracker_id + "' type='hidden'>");
+ this.setList(list_data);
}
- LabList.prototype.getLabs = function() {
- return this.labs.slice(0, this.show_number);
+ List.prototype.getList = function() {
+ return this.list.slice(0, this.show_number);
};
- LabList.prototype.setLabs = function(lab_info) {
- this.clearMarkers();
- this.labs = [];
- this.loadLabs(lab_info);
- return LabList.tracker_elem.change();
+ List.prototype.setList = function(list_info) {
+ this.list = [];
+ this.loadList(list_info);
+ return this.tracker_elem.change();
};
- LabList.prototype.clearMarkers = function() {
- return $.each(this.labs, function(index, lab) {
- return lab.clearMarker();
- });
+ List.prototype.setShowNumber = function(num) {
+ this.show_number = num;
+ return this.tracker_elem.change();
};
- LabList.prototype.loadLabs = function(lab_info) {
- var labs;
- if (!lab_info) {
+ List.prototype.loadList = function(list_info) {
+ var list, model;
+ if (!list_info) {
return;
}
- labs = this.labs;
- return $.each(lab_info, function(index, lab_data) {
- return labs.push(new Lab(lab_data));
+ list = this.list;
+ model = this.model;
+ return $.each(list_info, function(index, data) {
+ return list.push(new model(data, index));
});
};
- return LabList;
+ return List;
})();
- window.OrderedLabList = (function() {
- __extends(OrderedLabList, LabList);
- function OrderedLabList() {
- OrderedLabList.__super__.constructor.apply(this, arguments);
- }
- 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"c/Users/danielsudol/projects/medivo/medivo_resource/app/assets/javascripts/medivo/models.coffee;
FI"dependency_paths;
F[{I" path;
FI"c/Users/danielsudol/projects/medivo/medivo_resource/app/assets/javascripts/medivo/models.coffee;
FI"
mtime;
-FIu: Time
jç€ ¯:@_zoneI"BST;
-T:offsetiI"hexdigest;
-F"%c2a72d900ea70a7511e45e09055efa6fI"
_version;
-F"%46dde6621c301f4928e3b34efee9e3b5
+FIu: Time
Îç€ @B:@_zoneI"GMT;
+T:offseti I"hexdigest;
+F"%839db657ef60e3f21440312719162e55I"
_version;
+F"%ee50e40b36d7dc25c526aaff3fac8c9c
\ No newline at end of file