spec/dummy/tmp/cache/assets/DD2/A50/sprockets%2Fecb5dd9066b50eb678cd8c9dbb21d229 in medivo-0.0.1 vs spec/dummy/tmp/cache/assets/DD2/A50/sprockets%2Fecb5dd9066b50eb678cd8c9dbb21d229 in medivo-0.0.2
- old
+ new
@@ -1,18 +1,36 @@
-o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1318514397.265234 ù˜:@value{ I"length:EFirI"digest;
-F"%242369c61c1ed4d46ec5b57a0d3f63b3I"source;
-FI"r(function() {
+o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1318535266.1601868 @€:@value{ I"length:EFiI"digest;
+F"%cd0617be0bb397f4ed73302f457470c1I"source;
+FI"(function() {
$(document).ready(function() {
- var data, lab_list, map_view;
+ 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);
- return map_view.render();
+ lab_list_view = new window.LabListView(lab_list);
+ map_view.render();
} else {
- return console.log('no data');
+ console.log('no data');
}
+ 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);
+ map_view.center_point = data.zip_location;
+ map_view.render();
+ return $('form#lab_data_search input[type=submit]').prop("disabled", false);
+ }).bind('ajax:complete', function(event, data) {});
});
}).call(this);
;
FI"
_version;
-F"%af69f2ce50424510fb30ecbfcd45c4fd
+F"%177abf75bd47cb7672c58b0620d4a3b8
\ No newline at end of file