This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
coll.insert ({"type"=>"breeding", "doe"=>"C3", "buck"=>"C4", "date"=>to_utc(2014,11,7), | |
"exposures" => [ | |
{"type"=>"exposure", "date" => to_utc(2014,11,7), "notes"=>"not interested"}, | |
{"type"=>"exposure", "date" => to_utc(2014,11,8), "notes"=>"success"} | |
] } | |
) | |
coll.insert({"type"=>"breeding", "doe"=>"NZW8", "buck"=>"C4", "date"=>to_utc(2014,11,7), | |
"exposures" => [ | |
{"type"=>"exposure", "date" => to_utc(2014,11,7), "notes"=>"success"}, | |
{"type"=>"exposure", "date" =>to_utc(2014,11,8), "notes"=>"very upset!"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I started with | |
{ :weight => 2.24, :count => 2, :date => to_utc(2014,11,10), :notes => "" } | |
then | |
{ :weight => 1.14, :date => to_utc(2014,11,10), :notes => "" } | |
{ :weight => 1.10, :date => to_utc(2014,11,10), :notes => "" } | |
But I only want one "thing" for each date, with the details stored inside. I tried: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"_id": {"$oid": "546396c27e12bd7eab000007"}, | |
"id": "43", | |
"doe": "3BL", | |
"buck": "C16", | |
"birth_date": "2014-10-24 04:00:00 UTC", | |
"kindled": 2, | |
"survived": 2, | |
"weights": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function hideShippingAddressFields() | |
{ | |
$('#subscription_customer_attributes_address').hide(); | |
$('#subscription_customer_attributes_address_2').hide(); | |
$('#subscription_customer_attributes_city').hide(); | |
$('#subscription_customer_attributes_state').hide(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
var countryLabel = $('label[for="subscription_customer_attributes_country"]'); | |
countryLabel.text("* " + countryLabel.text()); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body style="background: pink;"> | |
<!-- start of email content --> | |
{{main_content}} | |
<!-- end of email content --> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function changeNextRenewalHtml() { | |
var nextRenewal = $('#next-renewal-charge'); | |
nextRenewal.html("(then $35.00 on November 1st each year)"); | |
}; | |
$(document).bind("afterSummaryRefresh", changeNextRenewalHtml); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function removeCouponSuccessMessage() { | |
coupon_text = $('#long_coupon_message').find(".success_message"); | |
coupon_text.text(""); | |
}; | |
$(document).bind("afterSummaryRefresh", removeCouponSuccessMessage); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.field-error { | |
color: #b94a48 !important; | |
background: #f2dede !important; | |
border: solid 1px #eed3d7 !important; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function () { | |
var component1 = $("#component_allocated_quantity_XXXXX"); | |
component1.val(1); | |
$("#subscription_submit").click(function(){ | |
if ( component1.val() <= 0 ) { | |
component1.addClass("field-error"); | |
return false; |
OlderNewer