[#4178] Adding JS and CSS assets.

This commit is contained in:
Eric Davis
2010-08-03 13:12:20 -07:00
parent 84c679dc67
commit ea00b89af5
2 changed files with 512 additions and 0 deletions
+42
View File
@@ -1,4 +1,23 @@
jQuery(function($) {
$('#contract-terms .finance tr td:nth-child ~ td, .c_overview table.right tr td:nth-child ~ td, #deliverables table tr.click td:nth-child(5) ~ td, .deliverable_finance_table tr.aright td:nth-child ~ td').after().css("text-align", "right");
$("#deliverables table tbody tr td:contains('---')").css("text-align", "center");
$("#texpand").jExpand();
$("#texpand").find("tr.even").next('tr:first').addClass("even");
$(window).resize(function() {
});
$('#expand_terms').click( function(){
$(this).next().slideToggle();
$(this).toggleClass('alt');
});
toggleSpecificDeliverableFields = function(form) {
var deliverableType = form.find('.type').val();
@@ -17,3 +36,26 @@ jQuery(function($) {
toggleSpecificDeliverableFields($('form.deliverable'));
});
});
/* Jquery Table Expander Plugin */
(function($){
$.fn.jExpand = function(){
var element = this;
$(element).find("tr.ign").hide();
$(element).find("tr.click").click(function() {
$(this).toggleClass("noborder");
$(this).next("tr").toggle();
$(this).find('.arrow').toggleClass("alt");
var box_height = $(this).next().find('.expanded').height();
var table_height = $(this).next().find('.finance table').height();
if(box_height-table_height > 0){
$(this).next().find('.finance table .fill td').css("padding-top", box_height-table_height+2);
}
});
}
})(jQuery);