spec/dummy/tmp/cache/assets/D84/210/sprockets%2Fabd0103ccec2b428ac62c94e4c40b384 in medivo-0.2.7 vs spec/dummy/tmp/cache/assets/D84/210/sprockets%2Fabd0103ccec2b428ac62c94e4c40b384 in medivo-0.2.8
- old
+ new
@@ -1,8 +1,8 @@
-o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1321114286.9218571 ÿµ:@value{ I"length:EFi߃I"digest;
-F"%7119bec171e8ae42a42353cbeed9f599I"source;
-FI"߃/*!
+o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1321313798.192642 T?:@value{ I"length:EFiÚ‚I"digest;
+F"%2aa9fc0fe4406c01227547ba7db7010cI"source;
+FI"Ú‚/*!
* jQuery JavaScript Library v1.7
* http://jquery.com/
*
* Copyright 2011, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
@@ -11162,258 +11162,279 @@
}
}
};
Handlebars.compile = Handlebars.VM.compile;;
-(function() {
+
window.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);
- }
+ if (isNumber(number)) return parseFloat(number).toFixed(2);
});
+
Handlebars.registerHelper("titleize", function(string) {
- if (string !== void 0) {
- return string.titleize();
- }
+ if (string !== void 0) return string.titleize();
});
+
Handlebars.registerHelper("address_without_comma", function(lab) {
- if (!(this.data && this.data.address)) {
- return;
- }
+ if (!(this.data && this.data.address)) return;
return this.data.address.replace(/(\s*,\s*$)/g, "").titleize();
});
-}).call(this);
-(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;
- }
+ if (show_number) this.show_number = show_number;
this.model = model;
this.tracker_elem = $("<input id='" + tracker_id + "' type='hidden'>");
this.setList(list_data);
}
+
List.prototype.getList = function() {
return this.list.slice(0, this.show_number);
};
+
List.prototype.setList = function(list_info) {
this.list = [];
this.loadList(list_info);
return this.tracker_elem.change();
};
+
List.prototype.setShowNumber = function(num) {
this.show_number = num;
return this.tracker_elem.change();
};
+
List.prototype.loadList = function(list_info) {
var list, model;
- if (!list_info) {
- return;
- }
+ if (!list_info) return;
list = this.list;
model = this.model;
return $.each(list_info, function(index, data) {
return list.push(new model(data, index));
});
};
+
return List;
+
})();
-}).call(this);
(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;
- };
+ 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; };
+
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);
- }
+ 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;
- }
+ 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 (!window.isNumber(this.index)) {
- OrderedLab.__super__.makeIcon.call(this);
- }
+ if (!window.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);
- }
+ if (number >= 0 && number <= 26) return String.fromCharCode(number + 65);
return '';
};
+
OrderedLab.prototype.icon = function() {
- if (this.marker) {
- return this.marker.icon;
- }
+ if (this.marker) return this.marker.icon;
return this.makeIcon(this.index);
};
+
return OrderedLab;
+
})();
+
window.LabList = (function() {
+
__extends(LabList, List);
+
function LabList(lab_info, show_number, model, tracker_id) {
- if (!model) {
- model = Lab;
- }
- if (!tracker_id) {
- tracker_id = 'lab_list_tracker';
- }
+ if (!model) model = Lab;
+ if (!tracker_id) tracker_id = 'lab_list_tracker';
LabList.__super__.constructor.call(this, lab_info, show_number, model, tracker_id);
}
+
LabList.prototype.setList = function(lab_info) {
this.clearMarkers();
return LabList.__super__.setList.call(this, lab_info);
};
+
LabList.prototype.clearMarkers = function() {
return $.each(this.list, function(index, lab) {
return lab.clearMarker();
});
};
+
return LabList;
+
})();
+
window.OrderedLabList = (function() {
+
__extends(OrderedLabList, LabList);
+
function OrderedLabList(lab_info, show_number) {
OrderedLabList.__super__.constructor.call(this, lab_info, show_number, OrderedLab, 'ordered_lab_list_tracker');
}
+
return OrderedLabList;
+
})();
+
}).call(this);
-(function() {
+
window.ListView = (function() {
+
function ListView(list, element_id, template_id) {
var view;
this.list = list;
this.el = $("#" + element_id);
this.template = Handlebars.compile($("#" + template_id).html());
- if (this.list) {
- this.render();
- }
+ if (this.list) this.render();
view = this;
this.list.tracker_elem.change(function() {
return view.render();
});
}
+
ListView.prototype.render = function() {
var view;
view = this;
view.el.empty();
return $.each(this.list.getList(), function(index, item) {
return view.el.append($(view.template(item)));
});
};
+
return ListView;
+
})();
-}).call(this);
(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;
- };
+ 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; };
+
window.LabListView = (function() {
+
__extends(LabListView, ListView);
+
function LabListView(list) {
this.list = list;
LabListView.__super__.constructor.call(this, this.list, 'lab_list', 'lab_item_template');
}
+
return LabListView;
+
})();
+
window.MapView = (function() {
+
MapView.prototype.el = $('#map_canvas');
+
MapView.prototype.center_marker = null;
+
MapView.prototype.map = null;
+
MapView.prototype.markerBounds = new google.maps.LatLngBounds();
+
MapView.prototype.markerBoundsZoomOut = 0.1;
+
function MapView(list, center_point) {
var map_view;
this.list = list;
this.center_point = center_point;
this.render();
map_view = this;
this.list.tracker_elem.change(function() {
return map_view.render();
});
}
+
MapView.prototype.options = {
mapTypeId: google.maps.MapTypeId.ROADMAP,
mapTypeControl: false
};
+
MapView.prototype.prepareMap = function() {
- if (!document.getElementById("map_canvas")) {
- return;
- }
+ if (!document.getElementById("map_canvas")) return;
if (!this.map) {
return this.map = 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({
@@ -11425,45 +11446,47 @@
}
if (this.markerBounds && this.center_marker) {
return this.markerBounds.extend(this.center_marker.position);
}
};
+
MapView.prototype.setMarkers = function(map, markerBounds) {
return $.each(this.list.getList(), function(index, model) {
return model.setMarker(map, markerBounds);
});
};
+
MapView.prototype.clear = function() {
this.list.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.list) {
- return;
- }
+ if (!this.list) return;
this.clear();
this.prepareMap();
- if (!this.map) {
- return;
- }
+ if (!this.map) return;
this.createCenterMarker();
this.setMarkers(this.map, 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.map.fitBounds(this.markerBounds);
};
+
return MapView;
+
})();
+
}).call(this);
-(function() {
+
$(document).ready(function() {
$("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}/)) {
@@ -11482,18 +11505,17 @@
window.lab_list.setShowNumber(window.max_lab_show_number);
$('input:radio[name=selected_lab]:first').prop('checked', true);
return $("#more_labs_list_toggler").hide();
});
});
-}).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, lab_show_number;
lab_show_number = 3;
window.max_lab_show_number = 6;
window.lab_list = new window.OrderedLabList([], lab_show_number);
@@ -11506,11 +11528,10 @@
return $('input:radio[name=selected_lab]:first').prop('checked', true);
} else {
return console.log('no data');
}
});
-}).call(this);
/**
* Version: 1.0 Alpha-1
* Build Date: 13-Nov-2007
* Copyright (c) 2006-2007, Coolite Inc. (http://www.coolite.com/). All rights reserved.
* License: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
@@ -12587,57 +12608,61 @@
};
Date.parseExact = function(s, fx) {
return Date.getParseFunction(fx)(s);
};
(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;
- };
+ 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; };
+
window.Appointment = (function() {
+
function Appointment(data) {
this.data = data;
}
+
Appointment.prototype.formattedDate = function() {
var date;
date = this.data.replace('|', ' ');
return Date.parse(date).toString("dddd, MMMM d, yyyy hh:mm tt");
};
+
return Appointment;
+
})();
+
window.AppointmentList = (function() {
+
__extends(AppointmentList, List);
+
function AppointmentList(appointment_info, show_number) {
AppointmentList.__super__.constructor.call(this, appointment_info, show_number, Appointment, 'appointment_list_tracker');
}
+
return AppointmentList;
+
})();
+
}).call(this);
(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;
- };
+ 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; };
+
window.AppointmentListView = (function() {
+
__extends(AppointmentListView, ListView);
+
function AppointmentListView(list) {
this.list = list;
AppointmentListView.__super__.constructor.call(this, this.list, 'appointment_list', 'appointment_item_template');
}
+
return AppointmentListView;
+
})();
+
}).call(this);
-(function() {
+
$(document).ready(function() {
+ if (!$("form#appointment_data_search")) return;
$("#find_appointments").bind('click', function() {
var lab_code, selected_lab;
selected_lab = $('#lab_list_container input:radio:checked');
lab_code = $('#lab_list_container input:radio:checked').parent('li').find('form input#lab_code').val();
return $("form#appointment_data_search input#lab_code").val(lab_code);
@@ -12645,37 +12670,40 @@
$("form#appointment_data_search").bind('ajax:beforeSend', function(event, data) {
var form;
form = $(this);
return Appointment.BeforeSendHandler(form);
}).bind('ajax:success', function(event, data) {
- return Appointment.SuccessHandler(event, data);
- }).bind('ajax:complete', function(event, data) {}).bind('ajax:error', function(xhr, status, error) {
+ var form;
+ form = $(this);
+ return Appointment.SuccessHandler(form, event, data);
+ }).bind('ajax:complete', function(event, data) {
+ var form;
+ form = $(this);
+ return form.find('.spinner_elem').hide();
+ }).bind('ajax:error', function(xhr, status, error) {
var form, response;
form = $(this);
response = JSON.parse(status.responseText);
return Appointment.ErrorHandler(form, status.status, response.message);
});
Appointment.BeforeSendHandler = function(form) {
var date, lab_code, messages, span, valid_date;
messages = [];
date = form.find('input#date').val();
valid_date = Date.parseExact(date, "M/d/yyyy");
- if (!valid_date) {
- messages.push("Date is invalid, must be mm/dd/yyyy format");
- }
+ if (!valid_date) messages.push("Date is invalid, must be mm/dd/yyyy format");
lab_code = form.find('input#lab_code').val();
- if (!lab_code) {
- messages.push("Labcode is missing");
- }
+ if (!lab_code) messages.push("Labcode is missing");
if (messages.length > 0) {
span = $("<span>" + (messages.join("<br>")) + "</span>");
form.find('.error_message').append(span);
span.fadeOut(4000);
- return false;
+ false;
}
+ return form.find('.spinner_elem').show();
};
- Appointment.SuccessHandler = function(event, data) {
+ Appointment.SuccessHandler = function(form, event, data) {
if (data.times.length === 0) {
Appointment.ErrorHandler($(this), 200, "No times available for that date");
return;
}
window.appointment_list.setList(data.times);
@@ -12683,37 +12711,35 @@
return $('form#appointment_data_search input[type=submit]').prop("disabled", false);
};
Appointment.ErrorHandler = function(form, status, message) {
var span;
if (message.match(/Connection refused/i)) {
- message = "Appointment server not responding";
+ message = "Unable to make appointments at this time. Try walk-in instead";
}
span = $("<span>" + message + "</span>");
form.find('.error_message').append(span);
- return span.fadeOut(4000);
+ return span.fadeOut(5000);
};
return $("#more_appointments_list_toggler").live("click", function() {
window.appointment_list.setShowNumber(window.max_appointment_show_number);
$('input:radio[name=appointment_time]:first').prop('checked', true);
return $("#more_appointments_list_toggler").hide();
});
});
-}).call(this);
-(function() {
+
$(document).ready(function() {
var appointment_show_number;
appointment_show_number = 5;
window.max_appointment_show_number = 10;
window.appointment_list = new window.AppointmentList([], appointment_show_number);
return window.appointment_list_view = new window.AppointmentListView(appointment_list);
});
-}).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.
//
;
;
TI"
_version;
-F"%d979c701420fdcbc4183ab5501369dd8
+F"%dad371338a4d6b28df6bb2215aabce13
\ No newline at end of file