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

- old
+ new

@@ -1,8 +1,8 @@ -o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1319993367.8961549Zš: @value{ I" length:EFiØPI" digest; -F"%1e3400c904881705ffdc98be981430a4I" source; -FI"ØP/*! +o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1320143956.595834"%: @value{ I" length:EFiqSI" digest; +F"%f74312e78822e6b1e4ed562bfd529453I" source; +FI"qS/*! * jQuery JavaScript Library v1.6.4 * http://jquery.com/ * * Copyright 2011, John Resig * Dual licensed under the MIT or GPL Version 2 licenses. @@ -12379,12 +12379,29 @@ }).call(this); (function() { $(document).ready(function() { $('input:radio[name=appointment_time]:checked').val(); $("form#appointment_data_search").bind('ajax:beforeSend', function(event, data) { - var date; - return date = $(this).find('#appointment_date').val(); + var date, lab_code, messages, span, valid_date; + alert(1); + messages = []; + date = $(this).find('form#appointment_data_search input#date').val(); + valid_date = Date.parseExact(date, "M/d/yyyy"); + console.log(valid_date); + if (!valid_date) { + messages.push("Date is invalid, must be mm/dd/yyyy format"); + } + lab_code = $(this).find('form#appointment_data_search input#lab_code').val(); + if (!lab_code) { + messages.push("Labcode is missing"); + } + if (messages.length > 0) { + span = $("<span>" + (messages.join("<br>")) + "</span>"); + $('form#appointment_data_search .error_message').append(span); + span.fadeOut(4000); + return false; + } }).bind('ajax:success', function(event, data) { window.appointment_list.setList(data.times); $('input:radio[name=appointment_time]:first').prop('checked', true); return $('form#appointment_data_search input[type=submit]').prop("disabled", false); }).bind('ajax:complete', function(event, data) {}); @@ -12410,6 +12427,6 @@ // the compiled file. // ; ; FI" _version; -F"%845fa6437eff70fa84b8fa6fd7b12a29 +F"%32f4b36d06a06f9dba98c59492f758a8 \ No newline at end of file