* Add story for todo

This commit is contained in:
滔哥
2017-11-15 18:37:15 +08:00
parent 5e47b860d8
commit c417c2fd70
2 changed files with 22 additions and 1 deletions
+17
View File
@@ -1545,4 +1545,21 @@ class story extends control
$this->view->customExport = true;
$this->display();
}
/**
* AJAX: get storys of a user in html select.
*
* @param string $account
* @param string $id the id of the select control.
* @access public
* @return string
*/
public function ajaxGetUserStorys($account = '', $id = '')
{
if($account == '') $account = $this->app->user->account;
$storys = $this->story->getUserStoryPairs($account);
if($id) die(html::select("bugs[$id]", $storys, '', 'class="form-control"'));
die(html::select('bug', $storys, '', 'class=form-control'));
}
}
+5 -1
View File
@@ -33,8 +33,12 @@ function loadList(type, id)
{
link = createLink('task', 'ajaxGetUserTasks', param);
}
else if(type == 'story')
{
link = createLink('story', 'ajaxGetUserStorys', param);
}
if(type == 'bug' || type == 'task')
if(type == 'bug' || type == 'task' || type == 'story')
{
$.get(link, function(data, status)
{