spec/dummy/tmp/cache/assets/D84/210/sprockets%2Fabd0103ccec2b428ac62c94e4c40b384 in medivo-0.2.21 vs spec/dummy/tmp/cache/assets/D84/210/sprockets%2Fabd0103ccec2b428ac62c94e4c40b384 in medivo-0.2.24

- old
+ new

@@ -1,8 +1,8 @@ -o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1321489176.7810249P: @value{ I" length:EFi{I" digest; -F"%f9edffb4cee5bef428fc24a29de9bb3bI" source; -FI"{/*! +o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1322611695.28419780L: @value{ I" length:EFiρI" digest; +F"%67f144e56511ea56bfe589c8825c5b64I" source; +FI"ρ/*! * jQuery JavaScript Library v1.7 * http://jquery.com/ * * Copyright 2011, John Resig * Dual licensed under the MIT or GPL Version 2 licenses. @@ -11196,15 +11196,17 @@ return this.data.address.replace(/(\s*,\s*$)/g, "").titleize(); }); window.List = (function() { - List.prototype.show_number = 3; + List.prototype.min_show_number = 3; - function List(list_data, show_number, model, tracker_id) { + List.prototype.show_number = List.min_show_number; + + function List(list_data, min_show_number, model, tracker_id) { this.list = []; - if (show_number) this.show_number = show_number; + if (min_show_number) this.min_show_number = min_show_number; this.model = model; this.tracker_elem = $("<input id='" + tracker_id + "' type='hidden'>"); this.setList(list_data); } @@ -11212,26 +11214,25 @@ return this.list.slice(0, this.show_number); }; List.prototype.setList = function(list_info) { this.list = []; + this.show_number = this.min_show_number; 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; + var _this = this; 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 _this.list.push(new _this.model(data, index)); }); }; return List; @@ -11240,11 +11241,11 @@ 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}} "); + Lab.prototype.map_tooltip_template = Handlebars.compile("{{lab_name}}\n{{titleize address}}\n{{titleize city}},{{state}} "); index = null; marker = null; @@ -11357,27 +11358,25 @@ }).call(this); window.ListView = (function() { function ListView(list, element_id, template_id) { - var view; + var _this = this; this.list = list; this.el = $("#" + element_id); this.template = Handlebars.compile($("#" + template_id).html()); if (this.list) this.render(); - view = this; this.list.tracker_elem.change(function() { - return view.render(); + return _this.render(); }); } ListView.prototype.render = function() { - var view; - view = this; - view.el.empty(); + var _this = this; + this.el.empty(); return $.each(this.list.getList(), function(index, item) { - return view.el.append($(view.template(item))); + return _this.el.append($(_this.template(item))); }); }; return ListView; @@ -11409,17 +11408,16 @@ MapView.prototype.markerBounds = new google.maps.LatLngBounds(); MapView.prototype.markerBoundsZoomOut = 0.1; function MapView(list, center_point) { - var map_view; + var _this = this; this.list = list; this.center_point = center_point; this.render(); - map_view = this; this.list.tracker_elem.change(function() { - return map_view.render(); + return _this.render(); }); } MapView.prototype.options = { mapTypeId: google.maps.MapTypeId.ROADMAP, @@ -11800,11 +11798,12 @@ if (data.times.length === 0) { Appointment.ErrorHandler(form, 200, "No times available for that date"); return; } window.appointment_list.setList(data.times); - return $('input:radio[name=appointment_time]:first').prop('checked', true); + $('input:radio[name=appointment_time]:first').prop('checked', true); + return $('#schedule_appointment').show(); }; Appointment.ErrorHandler = function(form, status, message) { var span; if (message.match(/Connection refused/i)) { message = "Unable to make appointments at this time. Try walk-in instead"; @@ -11824,15 +11823,56 @@ 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); }); + + $(document).ready(function() { + var user; + if (!$("button#schedule_appointment")) return; + user = { + first_name: 'dude', + last_name: 'dudely', + email_address: 'dude@dude.com', + phone_number: '4155551212', + date_of_birth: '11/12/1990' + }; + $("button#schedule_appointment").click(function(e) { + var appointment_date_time, date, lab_code, params, time; + e.preventDefault(); + appointment_date_time = $('form#appointment_data_search input:radio[name=appointment_time]:checked').val(); + date = Date.parseExact(appointment_date_time.replace('|', ' '), 'M/d/yyyy hh:mm tt'); + time = date.toString('yyyy-M-d hh:mm tt'); + lab_code = $('#lab_list_container input:radio:checked').val(); + params = { + lab_code: lab_code, + time: time, + user: user + }; + console.log(params); + return $("button#schedule_appointment").insertAfter("<button id='cancel_appointment' data-confirmation='" + lab_code + "'>Cancel Appointment</button>"); + }); + return $('button#cancel_appointment').live('click', function(e) { + var button, confirmation, first_name, last_name, params; + e.preventDefault(); + button = $(this); + confirmation = button.data('confirmation'); + first_name = button.data('first_name'); + last_name = button.data('last_name'); + params = { + first_name: first_name, + last_name: last_name, + confirmation: confirmation + }; + return console.log(params); + }); + }); // 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"%2dfc83d347fa2a8872d19eff5a6cd78c +F"%7618f0f6dd02859ca4a685e703b2b0f6 \ No newline at end of file