Skip to content
This repository has been archived by the owner on Jan 9, 2019. It is now read-only.

Commit

Permalink
Cleaned out cruft.
Browse files Browse the repository at this point in the history
Fixes #177
  • Loading branch information
Alex Honor committed Jul 26, 2012
1 parent 4751ada commit 00d5c30
Showing 1 changed file with 1 addition and 108 deletions.
109 changes: 1 addition & 108 deletions grails-app/views/nodeType/create.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -4,114 +4,7 @@
<head>
<meta name="layout" content="main">
<g:set var="entityName" value="${message(code: 'nodeType.label', default: 'NodeType')}" />
<title><g:message code="default.create.label" args="[entityName]" /></title>

<script type="text/javascript">
$(document).ready(function(){
$("#addNewRow").click(function(){
// Gets the counter value to increment value while adding each row
var newid = parseInt($("#counter").val());
var seriescount = parseInt($("#seriescount").val());
var cloneTheRow = $("#invoiceDetails tr:last").clone();
$(cloneTheRow).insertAfter("#invoiceDetails tr:last");
seriescount = seriescount + 1;
// clone the existing row to create new rows
newid = newid + 1;
$("#counter").val(newid);
$("#seriescount").val(seriescount);
$("#seriesno").val(seriescount);
var total = 0.0;
$("input[name*='detailAmount']").each(function() {
total += parseFloat($(this).val().replace(/\s/g,'').replace(',','.'));
});
document.getElementById('detailTotal').innerHTML = formatDollar(total);
document.getElementById('totalamountdue').innerHTML = formatDollar(total);
});
$("#recalc").click(function(){
var total = 0.0;
$("input[name*='detailAmount']").each(function() {
total += parseFloat($(this).val().replace(/\s/g,'').replace(',','.'));
});
document.getElementById('detailTotal').innerHTML = formatDollar(total);
document.getElementById('totalamountdue').innerHTML = formatDollar(total);
});
$("#bonddatelist").datepicker({ minDate: new Date(2011,1,1) , maxDate: "+8M" });
$("#billingdate").datepicker({ minDate: new Date(2011,1,1) , maxDate: "+8M" });
$("#duedate").datepicker({ minDate: new Date(2011,1,1) , maxDate: "+8M" });
$("#delete_all").click(function(){
var checked_status = this.checked;
$("input[name=delete]").each(function(){
this.checked = checked_status;
});
});
$("#memo").resizable({ disabled: true });
$("#notes").resizable({ disabled: true });
$("#detailDesc").resizable({ disabled: true });
if($("#voidval").val()=='true'){
document.getElementById("voidsubmit").disabled = true;
$("#voidsubmit").addClass("inactive");
}else{
document.getElementById("voidsubmit").disabled = false;
$('#voidsubmit').attr('enabled', 'enabled');
}
if($("#credits").val()){
document.getElementById("applycredit").disabled = true
}else{
$('#applycredit').attr('enabled', 'enabled');
}
$("#contact").change(function(){
var contact = $(this).val();
$.ajaxSetup({contentType:"application/json"});
$.getJSON("${request.contextPath}/bondInvoice/getContactInfo",{id:contact,ajax:'true'},function(json){
if(json){
var output = ""
var phone = ""
output += json.fname + ' ' + json.lname + '<br/>'
if(json.title){
output += json.title + '<br/>'
}
output += json.firm + '<br/>'
if(json.dept){
output += json.dept + '<br/>'
}
if(json.division){
output += json.division + '<br/>'
}
output += json.street
if(json.suite){
output += ', ' +json.suite + '<br/>'
}
output += json.city + ', ' + json.state + ' ' + json.zip
phone = json.phone
if(json.phoneExt){
phone += " EXT. " + json.phoneExt
}
document.getElementById('contactInfo').innerHTML = output;
document.getElementById('contactPhone').innerHTML = phone;
document.getElementById('contactEmail').innerHTML = json.email;
}
})
});
});
</script>

<title><g:message code="default.create.label" args="[entityName]" /></title>
</head>
<body>

Expand Down

0 comments on commit 00d5c30

Please sign in to comment.