Merge branch 'sprint/235_dongli_bug27225' into 'master'
* Fix bug #27225. See merge request easycorp/zentaopms!5249
This commit is contained in:
@@ -314,6 +314,7 @@ function setBudgetTipsAndAclList(parentID)
|
||||
|
||||
budgetNotes = programBudget != 0 ? (PGMParentBudget + PGMBudgetUnit + data.availableBudget) : '';
|
||||
$('#budget').attr('placeholder', budgetNotes);
|
||||
refreshBudgetUnit(data);
|
||||
});
|
||||
$('.aclBox').html($('#subPGMAcl').html());
|
||||
}
|
||||
|
||||
@@ -145,17 +145,7 @@ function setParentProgram(parentProgram)
|
||||
}
|
||||
budgetOverrunTips();
|
||||
outOfDateTip();
|
||||
$('#budgetUnit').val(data.budgetUnit).trigger('chosen:updated');
|
||||
if(typeof(data.availableBudget) == 'undefined')
|
||||
{
|
||||
$('#budget').removeAttr('placeholder').attr('disabled', true);
|
||||
$('#future').prop('checked', true);
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#budget').removeAttr('disabled')
|
||||
$('#future').prop('checked', false);
|
||||
}
|
||||
refreshBudgetUnit(data);
|
||||
});
|
||||
|
||||
$('#parent').attr('data-lastSelected', parentProgram);
|
||||
|
||||
@@ -1307,3 +1307,25 @@ function setCustomFieldsStyle(maxFieldCount, $name, nameMinWidth)
|
||||
|
||||
if($name.width() < nameMinWidth) $name.width(200);
|
||||
}
|
||||
|
||||
/**
|
||||
* Refresh budget units of the project.
|
||||
*
|
||||
* @param object $data
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function refreshBudgetUnit(data)
|
||||
{
|
||||
$('#budgetUnit').val(data.budgetUnit).trigger('chosen:updated');
|
||||
if(typeof(data.availableBudget) == 'undefined')
|
||||
{
|
||||
$('#budget').removeAttr('placeholder').attr('disabled', true);
|
||||
$('#future').prop('checked', true);
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#budget').removeAttr('disabled');
|
||||
$('#future').prop('checked', false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user