spec/dummy/tmp/cache/assets/D84/210/sprockets%2Fabd0103ccec2b428ac62c94e4c40b384 in medivo-0.0.7 vs spec/dummy/tmp/cache/assets/D84/210/sprockets%2Fabd0103ccec2b428ac62c94e4c40b384 in medivo-0.0.8
- old
+ new
@@ -1,8 +1,8 @@
-o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1319563272.0933702 ùÇ:@value{ I"length:EFië¹I"digest;
-F"%d3cc30460411311add72c834e6247065I"source;
-FI"ë¹/*!
+o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1319714643.809608 О:@value{ I"length:EFi(½I"digest;
+F"%3d4b0fffe6e3fe0f7a152cf59448cd9cI"source;
+FI"(½/*!
* jQuery JavaScript Library v1.6.4
* http://jquery.com/
*
* Copyright 2011, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
@@ -10909,96 +10909,10 @@
}
};
Handlebars.compile = Handlebars.VM.compile;;
(function() {
- window.LabListView = (function() {
- LabListView.prototype.el = null;
- LabListView.prototype.template = null;
- function LabListView(lab_list) {
- this.lab_list = lab_list;
- this.el = $('#lab_list');
- this.template = Handlebars.compile($('#lab_item_template').html());
- this.render();
- }
- LabListView.prototype.render = function() {
- var view;
- view = this;
- view.el.empty();
- return $.each(this.lab_list.getLabs(), function(index, lab) {
- return view.el.append($(view.template(lab)));
- });
- };
- return LabListView;
- })();
- window.MapView = (function() {
- function MapView(collection, center_point) {
- this.collection = collection;
- this.center_point = center_point;
- if (!this.collection) {
- throw "you need a collection to make a MapView";
- }
- }
- MapView.prototype.el = $('#map_canvas');
- MapView.prototype.center_point = null;
- MapView.prototype.center_marker = null;
- MapView.prototype.view = null;
- MapView.prototype.markerBounds = new google.maps.LatLngBounds();
- MapView.prototype.markerBoundsZoomOut = 0.1;
- MapView.prototype.options = {
- mapTypeId: google.maps.MapTypeId.ROADMAP,
- mapTypeControl: false
- };
- MapView.prototype.prepareMap = function() {
- if (!this.view) {
- return this.view = new google.maps.Map(document.getElementById("map_canvas"), this.options);
- }
- };
- MapView.prototype.createCenterMarker = function() {
- var point;
- if (this.center_point) {
- point = new google.maps.LatLng(this.center_point.lat, this.center_point.lng);
- this.center_marker = new google.maps.Marker({
- position: point,
- map: this.view,
- title: this.center_point.title,
- icon: "/assets/medivo/arrow.png"
- });
- }
- if (this.markerBounds && this.center_marker) {
- return this.markerBounds.extend(this.center_marker.position);
- }
- };
- MapView.prototype.setMarkers = function(map, markerBounds) {
- return $.each(this.collection.getLabs(), function(index, model) {
- return model.setMarker(map, markerBounds);
- });
- };
- MapView.prototype.clear = function() {
- this.collection.clearMarkers();
- if (this.center_marker) {
- this.center_marker.setMap(null);
- this.center_marker = null;
- }
- return this.markerBounds = new google.maps.LatLngBounds();
- };
- MapView.prototype.render = function() {
- var extendPoint;
- this.clear();
- this.prepareMap();
- this.createCenterMarker();
- this.setMarkers(this.view, this.markerBounds);
- if (this.markerBounds.getNorthEast().equals(this.markerBounds.getSouthWest())) {
- extendPoint = new google.maps.LatLng(this.markerBounds.getNorthEast().lat() + this.markerBoundsZoomOut, this.markerBounds.getNorthEast().lng() + this.markerBoundsZoomOut);
- this.markerBounds.extend(extendPoint);
- }
- return this.view.fitBounds(this.markerBounds);
- };
- return MapView;
- })();
-}).call(this);
-(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;
@@ -11036,16 +10950,17 @@
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;
- this.index = null;
- this.marker = null;
- this.point = null;
}
Lab.prototype.clearMarker = function() {
if (this.marker) {
this.marker.setMap(null);
return this.marker = null;
@@ -11077,13 +10992,13 @@
};
return Lab;
})();
window.OrderedLab = (function() {
__extends(OrderedLab, Lab);
- function OrderedLab(index, data) {
- this.index = index;
+ function OrderedLab(data, index) {
this.data = data;
+ this.index = index;
}
OrderedLab.prototype.makeIcon = function() {
if (!isNumber(this.index)) {
OrderedLab.__super__.makeIcon.call(this);
}
@@ -11103,10 +11018,11 @@
};
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;
}
@@ -11114,81 +11030,193 @@
}
LabList.prototype.getLabs = function() {
return this.labs.slice(0, this.show_number);
};
LabList.prototype.setLabs = function(lab_info) {
- var labs;
this.clearMarkers();
- labs = this.labs = [];
- if (lab_info !== void 0) {
- return $.each(lab_info, function(index, lab_data) {
- return labs.push(new Lab(lab_data));
- });
- }
+ this.labs = [];
+ this.loadLabs(lab_info);
+ return LabList.tracker_elem.change();
};
LabList.prototype.clearMarkers = function() {
return $.each(this.labs, 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);
}
- OrderedLabList.prototype.setLabs = function(lab_info) {
+ OrderedLabList.prototype.loadLabs = function(lab_info) {
var labs;
- this.clearMarkers();
- labs = this.labs = [];
- if (lab_info !== void 0) {
- return $.each(lab_info, function(index, lab_data) {
- return labs.push(new OrderedLab(index, lab_data));
- });
+ 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);
(function() {
- $(document).ready(function() {
- var data, lab_list, lab_list_view, map_view;
- map_view = null;
- lab_list = null;
- data = $('#lab_list_container').data('labs');
- if (data) {
- lab_list = new window.LabList(data.labs);
- map_view = new window.MapView(lab_list, data.zip_location);
- lab_list_view = new window.LabListView(lab_list);
- map_view.render();
- } else {
- console.log('no data');
+ window.LabListView = (function() {
+ function LabListView(lab_list) {
+ var view;
+ this.lab_list = lab_list;
+ this.el = $('#lab_list');
+ this.template = null;
+ if (this.lab_list) {
+ this.render();
+ }
+ view = this;
+ LabList.tracker_elem.change(function() {
+ return view.render();
+ });
}
+ LabListView.prototype.render = function() {
+ var view;
+ if (!this.template) {
+ this.template = Handlebars.compile($('#lab_item_template').html());
+ }
+ view = this;
+ view.el.empty();
+ return $.each(this.lab_list.getLabs(), function(index, lab) {
+ return view.el.append($(view.template(lab)));
+ });
+ };
+ return LabListView;
+ })();
+ window.MapView = (function() {
+ function MapView(collection, center_point) {
+ var view;
+ this.collection = collection;
+ this.center_point = center_point;
+ this.render();
+ view = this;
+ LabList.tracker_elem.change(function() {
+ return view.render();
+ });
+ }
+ MapView.prototype.el = $('#map_canvas');
+ MapView.prototype.center_marker = null;
+ MapView.prototype.view = null;
+ MapView.prototype.markerBounds = new google.maps.LatLngBounds();
+ MapView.prototype.markerBoundsZoomOut = 0.1;
+ MapView.prototype.options = {
+ mapTypeId: google.maps.MapTypeId.ROADMAP,
+ mapTypeControl: false
+ };
+ MapView.prototype.prepareMap = function() {
+ if (!this.view) {
+ return this.view = new google.maps.Map(document.getElementById("map_canvas"), this.options);
+ }
+ };
+ MapView.prototype.createCenterMarker = function() {
+ var point;
+ if (this.center_point) {
+ point = new google.maps.LatLng(this.center_point.lat, this.center_point.lng);
+ this.center_marker = new google.maps.Marker({
+ position: point,
+ map: this.view,
+ title: this.center_point.title,
+ icon: "/assets/medivo/arrow.png"
+ });
+ }
+ if (this.markerBounds && this.center_marker) {
+ return this.markerBounds.extend(this.center_marker.position);
+ }
+ };
+ MapView.prototype.setMarkers = function(map, markerBounds) {
+ return $.each(this.collection.getLabs(), function(index, model) {
+ return model.setMarker(map, markerBounds);
+ });
+ };
+ MapView.prototype.clear = function() {
+ this.collection.clearMarkers();
+ if (this.center_marker) {
+ this.center_marker.setMap(null);
+ this.center_marker = null;
+ }
+ return this.markerBounds = new google.maps.LatLngBounds();
+ };
+ MapView.prototype.render = function() {
+ var extendPoint;
+ if (!this.collection) {
+ return;
+ }
+ this.clear();
+ this.prepareMap();
+ this.createCenterMarker();
+ this.setMarkers(this.view, this.markerBounds);
+ if (this.markerBounds.getNorthEast().equals(this.markerBounds.getSouthWest())) {
+ extendPoint = new google.maps.LatLng(this.markerBounds.getNorthEast().lat() + this.markerBoundsZoomOut, this.markerBounds.getNorthEast().lng() + this.markerBoundsZoomOut);
+ this.markerBounds.extend(extendPoint);
+ }
+ return this.view.fitBounds(this.markerBounds);
+ };
+ return MapView;
+ })();
+}).call(this);
+(function() {
+ $(document).ready(function() {
+ window.lab_list = new window.OrderedLabList([]);
+ window.map_view = new window.MapView(lab_list);
+ window.lab_list_view = new window.LabListView(lab_list);
return $("form#lab_data_search").bind('ajax:beforeSend', function(event, data) {
var span, zip_code;
zip_code = $(this).find('#zip_code').val();
if (!zip_code.match(/\d{5}/)) {
span = $('<span>Zip code should be 5 digits</span>');
$('form#lab_data_search .error_message').append(span);
span.fadeOut(4000);
return false;
}
}).bind('ajax:success', function(event, data) {
- lab_list.setLabs(data.labs);
- lab_list_view.render();
- map_view.center_point = data.zip_location;
- map_view.render();
+ window.map_view.center_point = data.zip_location;
+ window.lab_list.setLabs(data.labs);
return $('form#lab_data_search input[type=submit]').prop("disabled", false);
}).bind('ajax:complete', function(event, data) {});
});
}).call(this);
// This is a manifest file that'll be compiled into including all the files listed below.
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
// be included in the compiled file accessible from http://example.com/assets/application.js
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
+;
+(function() {
+ $(document).ready(function() {
+ var data;
+ data = $('#lab_list_container').data('labs');
+ if (data.labs) {
+ window.map_view.center_point = data.zip_location;
+ return window.lab_list.setLabs(data.labs);
+ } else {
+ return console.log('no data');
+ }
+ });
+}).call(this);
+// This is a manifest file that'll be compiled into including all the files listed below.
+// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
+// be included in the compiled file accessible from http://example.com/assets/application.js
+// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
+// the compiled file.
//
;
;
FI"
_version;
-F"%6c7e812f545fc9c2513afea83de4f4c2
+F"%58eb7d5a3fa8eca70d52c64c5321b967
\ No newline at end of file