Files
EasySoft-ZenTaoPMS/module/story/view/header.html.php
2015-10-22 17:18:34 +08:00

58 lines
1.9 KiB
PHP

<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<script language='Javascript'>
function loadProduct(productID)
{
loadProductBranches(productID)
loadProductModules(productID);
loadProductPlans(productID);
}
function loadBranch()
{
var branch = $('#branch').val();
if(typeof(branch) == 'undefined') branch = 0;
loadProductModules($('#product').val(), branch);
loadProductPlans($('#product').val(), branch);
}
function loadProductBranches(productID)
{
$('#branch').remove();
$.get(createLink('branch', 'ajaxGetBranches', "productID=" + productID), function(data)
{
if(data)
{
$('#product').closest('.input-group').append(data);
$('#branch').css('width', '65px');
}
})
}
function loadProductModules(productID, branch)
{
if(typeof(branch) == 'undefined') branch = 0;
if(!branch) branch = 0;
moduleLink = createLink('tree', 'ajaxGetOptionMenu', 'productID=' + productID + '&viewtype=story&branch=' + branch + '&rootModuleID=0&returnType=html&needManage=true');
$('#moduleIdBox').load(moduleLink, function()
{
$('#moduleIdBox #module').chosen(defaultChosenOptions);
if(typeof(storyModule) == 'string') $('#moduleIdBox').prepend("<span class='input-group-addon'>" + storyModule + "</span>")
});
}
function loadProductPlans(productID, branch)
{
if(typeof(branch) == 'undefined') branch = 0;
if(!branch) branch = 0;
planLink = createLink('product', 'ajaxGetPlans', 'productID=' + productID + '&branch=' + branch + '&planID=' + $('#plan').val() + '&needCreate=true');
$('#planIdBox').load(planLink, function(){$('#planIdBox #plan').chosen(defaultChosenOptions);});
}
$(function()
{
$("#reviewedBy").chosen(defaultChosenOptions);
$("#mailto").chosen(defaultChosenOptions);
})
</script>