Lines 728-734
for (i=1;i<=2;i++) {
Link Here
|
728 |
url: url, |
728 |
url: url, |
729 |
mimeType: 'text/xml', |
729 |
mimeType: 'text/xml', |
730 |
success: function (data, textStatus, xmlhttp) { |
730 |
success: function (data, textStatus, xmlhttp) { |
731 |
// rc = eval ( xmlhttp.responseText ); |
|
|
732 |
var retRootType = jQuery(xmlhttp.responseXML).children().first().get(0).nodeName.toLowerCase(); |
731 |
var retRootType = jQuery(xmlhttp.responseXML).children().first().get(0).nodeName.toLowerCase(); |
733 |
var hasInputs = $sort_zone.has('input').length > 0; |
732 |
var hasInputs = $sort_zone.has('input').length > 0; |
734 |
if (hasInputs && retRootType == 'input') { |
733 |
if (hasInputs && retRootType == 'input') { |
Lines 754-763
function totalExceedsBudget(budgetId, total) {
Link Here
|
754 |
var ret = undefined; |
753 |
var ret = undefined; |
755 |
jQuery.ajax({ |
754 |
jQuery.ajax({ |
756 |
url: url, |
755 |
url: url, |
757 |
mimeType: 'text/xml', |
|
|
758 |
async: false, // non-async because we need to return a value based on the result |
756 |
async: false, // non-async because we need to return a value based on the result |
759 |
success: function(data, textStatus, xmlhttp) { |
757 |
success: function(data, textStatus, xmlhttp) { |
760 |
actTotal = eval ( xmlhttp.responseText ); |
758 |
actTotal = data.actTotal; |
761 |
|
759 |
|
762 |
if ( Math.abs(actTotal) < Math.abs(total) ) { |
760 |
if ( Math.abs(actTotal) < Math.abs(total) ) { |
763 |
// if budget is to low :( |
761 |
// if budget is to low :( |
Lines 785-794
if ( newBudgetParent ) { url += '&parent_id=' + newBudgetParent};
Link Here
|
785 |
var ret = undefined; |
783 |
var ret = undefined; |
786 |
jQuery.ajax({ |
784 |
jQuery.ajax({ |
787 |
url: url, |
785 |
url: url, |
788 |
mimeType: 'text/xml', |
|
|
789 |
async: false, // non-async because we need to return a value based on the result |
786 |
async: false, // non-async because we need to return a value based on the result |
790 |
success: function(data, textStatus, xmlhttp) { |
787 |
success: function(data, textStatus, xmlhttp) { |
791 |
var result = eval ( xmlhttp.responseText ); |
788 |
var result = data.returncode; |
792 |
|
789 |
|
793 |
if (result == '1') { |
790 |
if (result == '1') { |
794 |
ret = _("- Budget total exceeds parent allocation\n"); |
791 |
ret = _("- Budget total exceeds parent allocation\n"); |
Lines 811-820
function checkBudgetParent(budgetId, newBudgetParent) {
Link Here
|
811 |
var ret = undefined; |
808 |
var ret = undefined; |
812 |
jQuery.ajax({ |
809 |
jQuery.ajax({ |
813 |
url: url, |
810 |
url: url, |
814 |
mimeType: 'text/xml', |
|
|
815 |
async: false, // non-async because we need to return a value based on the result |
811 |
async: false, // non-async because we need to return a value based on the result |
816 |
success: function(data, textStatus, xmlhttp) { |
812 |
success: function(data, textStatus, xmlhttp) { |
817 |
var result = eval ( xmlhttp.responseText ); |
813 |
var result = data.result; |
818 |
|
814 |
|
819 |
if (result == '1') { |
815 |
if (result == '1') { |
820 |
ret = _("- New budget-parent is beneath budget\n"); |
816 |
ret = _("- New budget-parent is beneath budget\n"); |
821 |
- |
|
|