* Add story for todo
This commit is contained in:
@@ -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'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user