* code for task#1657.

This commit is contained in:
xia0ta0
2013-07-31 17:07:51 +08:00
parent d2874f11f5
commit 3053c2d248
2 changed files with 2 additions and 32 deletions
-30
View File
@@ -16,33 +16,3 @@ function changeAction(formName, actionName, actionLink)
{
$('#' + formName).attr('action', actionLink).submit();
}
/**
* unlink story.
*
* @param int $projectID
* @param int $storyID
* @access public
* @return void
*/
function unlink(projectID, storyID)
{
if(confirm(confirmUnlinkStory))
{
url = createLink('project', 'unlinkStory','projectID=' + projectID + '&storyID=' + storyID + '&confrim=yes');
$.ajax(
{
type: 'GET',
url: url,
dataType: 'json',
success: function(data)
{
if(data.result == 'success')
{
url = createLink('project', 'story', 'projectID=' + projectID);
$('#projectStoryForm').load(url + ' #storyList', function(){sortTable();});
}
}
});
}
}
+2 -2
View File
@@ -87,8 +87,8 @@
$lang->testcase->batchCreate = $lang->testcase->create;
if($productID) common::printIcon('testcase', 'batchCreate', "productID=$story->product&moduleID=$story->module&storyID=$story->id", '', 'list');
$lang->project->unlinkStory = $lang->unlink;
echo html::a("javascript:unlink($project->id,$story->id)", ' ', '', "class='icon-green-project-unlinkStory' title='$lang->unlink'");
$unlinkURL = $this->createLink('project', 'unlinkStory', "projectID=$project->id&storyID=$story->id&confirm=yes");
echo html::a("javascript:ajaxDelete(\"$unlinkURL\",\"storyList\",confirmUnlinkStory)", ' ', '', "class='icon-green-productplan-unlinkStory' title='{$lang->project->unlinkStory}'");
?>
</td>
</tr>