* Fix bug#3533.
This commit is contained in:
@@ -228,6 +228,7 @@ $lang->story->noStory = "暂时没有{$lang->storyCommon}。";
|
||||
$lang->story->ignoreChangeStage = "{$lang->storyCommon} %s 为草稿状态或已关闭状态,没有修改其阶段。";
|
||||
$lang->story->cannotDeleteParent = "不能删除父{$lang->storyCommon}";
|
||||
$lang->story->moveChildrenTips = "修改父{$lang->storyCommon}的所属产品会将其下的子{$lang->storyCommon}也移动到所选产品下。";
|
||||
$lang->story->changeBranchTips = "修改父{$lang->storyCommon}的所属分支会将其下的子{$lang->storyCommon}也移动到所选分支下。";
|
||||
|
||||
$lang->story->form = new stdclass();
|
||||
$lang->story->form->area = "该{$lang->storyCommon}所属范围";
|
||||
|
||||
@@ -619,6 +619,11 @@ class storyModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
if($oldStory->parent == '-1' and $story->branch != $oldStory->branch)
|
||||
{
|
||||
$this->dao->update(TABLE_STORY)->set('branch')->eq($story->branch)->where('parent')->eq($storyID)->exec();
|
||||
}
|
||||
|
||||
$this->loadModel('action');
|
||||
$changed = $story->parent != $oldStory->parent;
|
||||
if($oldStory->parent > 0)
|
||||
|
||||
@@ -12,8 +12,10 @@
|
||||
?>
|
||||
<?php include './header.html.php';?>
|
||||
<?php js::set('oldProductID', $story->product);?>
|
||||
<?php js::set('oldBranch', $story->branch);?>
|
||||
<?php js::set('parentStory', !empty($story->children));?>
|
||||
<?php js::set('moveChildrenTips', $lang->story->moveChildrenTips);?>
|
||||
<?php js::set('changeBranchTips', $lang->story->changeBranchTips);?>
|
||||
<div class='main-content' id='mainContent'>
|
||||
<form method='post' enctype='multipart/form-data' target='hiddenwin' id='dataform'>
|
||||
<div class='main-header'>
|
||||
|
||||
@@ -34,6 +34,17 @@ function loadProduct(productID)
|
||||
|
||||
function loadBranch()
|
||||
{
|
||||
if(typeof parentStory != 'undefined' && parentStory)
|
||||
{
|
||||
confirmLoadBranch = confirm(changeBranchTips);
|
||||
if(!confirmLoadBranch)
|
||||
{
|
||||
$('#branch').val(oldBranch);
|
||||
$('#branch').trigger("chosen:updated");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
var branch = $('#branch').val();
|
||||
if(typeof(branch) == 'undefined') branch = 0;
|
||||
loadProductModules($('#product').val(), branch);
|
||||
|
||||
Reference in New Issue
Block a user