diff --git a/module/my/control.php b/module/my/control.php index 3850eda41f..42e999364f 100755 --- a/module/my/control.php +++ b/module/my/control.php @@ -695,10 +695,11 @@ EOF; * @param int $recTotal * @param int $recPerPage * @param int $pageID + * @param string $orderBy * @access public * @return void */ - public function project($status = 'doing', $recTotal = 0, $recPerPage = 15, $pageID = 1) + public function project($status = 'doing', $recTotal = 0, $recPerPage = 15, $pageID = 1, $orderBy = 'id_desc') { $this->loadModel('program'); $this->app->loadLang('project'); @@ -713,7 +714,7 @@ EOF; /* Get PM id list. */ $accounts = array(); - $projects = $this->user->getObjects($this->app->user->account, 'project', $status, 'id_desc', $pager); + $projects = $this->user->getObjects($this->app->user->account, 'project', $status, $orderBy, $pager); foreach($projects as $project) { if(!empty($project->PM) and !in_array($project->PM, $accounts)) $accounts[] = $project->PM; @@ -727,6 +728,10 @@ EOF; $this->view->PMList = $PMList; $this->view->pager = $pager; $this->view->status = $status; + $this->view->recTotal = $recTotal; + $this->view->recPerPage = $recPerPage; + $this->view->pageID = $pageID; + $this->view->orderBy = $orderBy; $this->display(); } diff --git a/module/my/view/project.html.php b/module/my/view/project.html.php index 918f2b33e5..5b57199850 100644 --- a/module/my/view/project.html.php +++ b/module/my/view/project.html.php @@ -30,18 +30,19 @@
- +
+ - - + + - + - - - - + + + + diff --git a/module/task/js/create.js b/module/task/js/create.js index 1511c7354d..c91c18c14d 100644 --- a/module/task/js/create.js +++ b/module/task/js/create.js @@ -490,7 +490,7 @@ $(document).ready(function() }); }); -$(document).on('click', '#testStory_chosen,#story_chosen', function() +$(document).on('click', '#testStory_chosen', function() { var $obj = $(this).prev('select'); var value = $obj.val(); diff --git a/module/task/view/create.html.php b/module/task/view/create.html.php index 52b2033e03..63faa82135 100644 --- a/module/task/view/create.html.php +++ b/module/task/view/create.html.php @@ -98,7 +98,7 @@
idAB;?>project->name;?>idAB);?>project->name);?> project->status;?>project->status);?> project->begin;?>project->end;?>project->budget;?>project->PM;?>project->begin);?>project->end);?>project->budget);?>project->PM);?> actions;?>
task->noticeLinkStory, html::a($this->createLink('execution', 'linkStory', "executionID=$execution->id"), $lang->execution->linkStory, '', 'class="text-primary"'), html::a("javascript:loadStories($execution->id)", $lang->refresh, '', 'class="text-primary"'));?>
- story => (empty($stories) or !isset($stories[$task->story])) ? '': $stories[$task->story]), $task->story, "class='form-control chosen' onchange='setStoryRelated();'");?> + story, "class='form-control chosen' onchange='setStoryRelated();'");?> preview;?>