* Finish task#7948.
This commit is contained in:
@@ -415,14 +415,15 @@ function loadProjectBuilds(projectID)
|
||||
*
|
||||
* @param moduleID $moduleID
|
||||
* @param productID $productID
|
||||
* @param storyID $storyID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function setStories(moduleID, productID)
|
||||
function setStories(moduleID, productID, storyID)
|
||||
{
|
||||
var branch = $('#branch').val();
|
||||
if(typeof(branch) == 'undefined') branch = 0;
|
||||
link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID + '&branch=' + branch + '&moduleID=' + moduleID);
|
||||
link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID + '&branch=' + branch + '&moduleID=' + moduleID + '&storyID=' + storyID);
|
||||
$.get(link, function(stories)
|
||||
{
|
||||
if(!stories) stories = '<select id="story" name="story" class="form-control"></select>';
|
||||
|
||||
@@ -42,8 +42,9 @@ function loadModuleRelated()
|
||||
{
|
||||
var moduleID = $('#module').val();
|
||||
var productID = $('#product').val();
|
||||
var storyID = $('#story').val();
|
||||
setAssignedTo(moduleID, productID);
|
||||
setStories(moduleID, productID);
|
||||
setStories(moduleID, productID, storyID);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -52,5 +52,6 @@ function loadModuleRelated()
|
||||
{
|
||||
moduleID = $('#module').val();
|
||||
productID = $('#product').val();
|
||||
setStories(moduleID, productID);
|
||||
storyID = $('#story').val();
|
||||
setStories(moduleID, productID, storyID);
|
||||
}
|
||||
|
||||
@@ -1503,6 +1503,8 @@ class story extends control
|
||||
}
|
||||
|
||||
$stories = $this->story->getProductStoryPairs($productID, $branch ? "0,$branch" : $branch, $moduleID, $storyStatus, 'id_desc', $limit, $type, 'story', $hasParent);
|
||||
|
||||
$storyID = isset($stories[$storyID]) ? $storyID : 0;
|
||||
$select = html::select('story', empty($stories) ? array('' => '') : $stories, $storyID, "class='form-control'");
|
||||
|
||||
/* If only need options, remove select wrap. */
|
||||
|
||||
Reference in New Issue
Block a user