* Finish task#8665.

This commit is contained in:
hufangzhou
2020-12-17 09:26:32 +08:00
parent bb8556a296
commit 27006dfc8e
2 changed files with 6 additions and 7 deletions
+5 -6
View File
@@ -1997,22 +1997,21 @@ class story extends control
}
/**
* AJAX: get storys of a user in html select.
* AJAX: get stories of a user in html select.
*
* @param int $userID
* @param string $id the id of the select control.
* @access public
* @return string
*/
public function ajaxGetUserStorys($userID = '', $id = '')
public function ajaxGetUserStories($userID = '', $id = '')
{
if($userID == '') $userID = $this->app->user->id;
$user = $this->loadModel('user')->getById($userID, 'id');
$account = $user->account;
$storys = $this->story->getUserStoryPairs($account);
$stories = $this->story->getUserStoryPairs($user->account);
if($id) die(html::select("storys[$id]", $storys, '', 'class="form-control"'));
die(html::select('story', $storys, '', 'class=form-control'));
if($id) die(html::select("stories[$id]", $stories, '', 'class="form-control"'));
die(html::select('story', $stories, '', 'class=form-control'));
}
/**
+1 -1
View File
@@ -35,7 +35,7 @@ function loadList(type, id)
}
else if(type == 'story')
{
link = createLink('story', 'ajaxGetUserStorys', param);
link = createLink('story', 'ajaxGetUserStories', param);
}
if(type == 'bug' || type == 'task' || type == 'story')