*Fix bug #66226.
This commit is contained in:
@@ -591,21 +591,6 @@ class build extends control
|
||||
{
|
||||
$this->build->unlinkStory($buildID, $storyID);
|
||||
|
||||
/* if ajax request, send result. */
|
||||
if($this->server->ajax)
|
||||
{
|
||||
if(dao::isError())
|
||||
{
|
||||
$response['result'] = 'fail';
|
||||
$response['message'] = dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
$response['result'] = 'success';
|
||||
$response['message'] = '';
|
||||
}
|
||||
return $this->send($response);
|
||||
}
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ tbody tr td:first-child input {display: none;}
|
||||
if($canBeChanged and common::hasPriv('build', 'unlinkStory'))
|
||||
{
|
||||
$unlinkURL = inlink('unlinkStory', "buildID=$build->id&story=$story->id");
|
||||
echo html::a("###", '<i class="icon-unlink"></i>', '', "onclick='ajaxDelete(\"$unlinkURL\", \"storyList\", confirmUnlinkStory)' class='btn' title='{$lang->build->unlinkStory}'");
|
||||
echo html::a($unlinkURL, '<i class="icon-unlink"></i>', 'hiddenwin', "class='btn' title='{$lang->build->unlinkStory}'");
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
||||
@@ -725,29 +725,14 @@ class productplan extends control
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
return print(js::confirm($this->lang->productplan->confirmUnlinkStory, $this->createLink('productplan', 'unlinkstory', "storyID=$storyID&planID=$planID&confirm=yes")));
|
||||
return print(js::confirm($this->lang->productplan->confirmUnlinkStory, inlink('unlinkstory', "storyID=$storyID&planID=$planID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->productplan->unlinkStory($storyID, $planID);
|
||||
$this->loadModel('action')->create('productplan', $planID, 'unlinkstory', '', $storyID);
|
||||
|
||||
/* if ajax request, send result. */
|
||||
if($this->server->ajax)
|
||||
{
|
||||
if(dao::isError())
|
||||
{
|
||||
$response['result'] = 'fail';
|
||||
$response['message'] = dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
$response['result'] = 'success';
|
||||
$response['message'] = '';
|
||||
}
|
||||
return $this->send($response);
|
||||
}
|
||||
return print(js::reload('parent'));
|
||||
echo js::locate($this->createLink('productplan', 'view', "planID=$planID&type=story"), 'parent');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -867,28 +852,13 @@ class productplan extends control
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
return print(js::confirm($this->lang->productplan->confirmUnlinkBug, $this->createLink('productplan', 'unlinkbug', "bugID=$bugID&confirm=yes")));
|
||||
return print(js::confirm($this->lang->productplan->confirmUnlinkBug, inlink('unlinkbug', "bugID=$bugID&planID=$planID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->productplan->unlinkBug($bugID);
|
||||
$this->loadModel('action')->create('productplan', $planID, 'unlinkbug', '', $bugID);
|
||||
|
||||
/* if ajax request, send result. */
|
||||
if($this->server->ajax)
|
||||
{
|
||||
if(dao::isError())
|
||||
{
|
||||
$response['result'] = 'fail';
|
||||
$response['message'] = dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
$response['result'] = 'success';
|
||||
$response['message'] = '';
|
||||
}
|
||||
return $this->send($response);
|
||||
}
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,8 +205,8 @@
|
||||
<?php
|
||||
if($canBeChanged and common::hasPriv('productplan', 'unlinkStory'))
|
||||
{
|
||||
$unlinkURL = $this->createLink('productplan', 'unlinkStory', "story=$story->id&plan=$plan->id&confirm=yes");
|
||||
echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"storyList\", confirmUnlinkStory)", '<i class="icon-unlink"></i>', '', "class='btn' title='{$lang->productplan->unlinkStory}'");
|
||||
$unlinkURL = $this->createLink('productplan', 'unlinkStory', "story=$story->id&plan=$plan->id");
|
||||
echo html::a($unlinkURL, '<i class="icon-unlink"></i>', 'hiddenwin', "class='btn' title='{$lang->productplan->unlinkStory}'");
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
@@ -473,8 +473,8 @@
|
||||
<?php
|
||||
if($canBeChanged and common::hasPriv('productplan', 'unlinkBug'))
|
||||
{
|
||||
$unlinkURL = $this->createLink('productplan', 'unlinkBug', "bugID=$bug->id&planID=$plan->id&confirm=yes");
|
||||
echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"bugList\", confirmUnlinkBug)", '<i class="icon-unlink"></i>', '', "class='btn' title='{$lang->productplan->unlinkBug}'");
|
||||
$unlinkURL = $this->createLink('productplan', 'unlinkBug', "bugID=$bug->id&planID=$plan->id");
|
||||
echo html::a($unlinkURL, '<i class="icon-unlink"></i>', 'hiddenwin', "class='btn' title='{$lang->productplan->unlinkBug}'");
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user