* Finish task #36019.

This commit is contained in:
tianshujie98
2021-02-22 14:07:16 +08:00
parent 183ee6bbc8
commit d4d819073a
12 changed files with 137 additions and 28 deletions
+19 -1
View File
@@ -1059,18 +1059,35 @@ class program extends control
*/
public function PRJBatchEdit($from = 'prjbrowse', $programID = 0)
{
/* Navigation stay in program when enter from program list. */
if($from == 'pgmproject')
{
$this->app->rawMethod = 'pgmproject';
$this->lang->program->switcherMenu = $this->program->getPGMSwitcher($programID, true);
$this->program->setPGMViewMenu($programID);
}
if($from == 'prjbrowse')
{
$this->lang->program->menu = $this->lang->PRJ->menu;
}
if($this->post->names)
{
$allChanges = $this->program->PRJBatchUpdate();
if(!empty($allChanges))
{
foreach($allChanges as $projectID => $changes)
{
if(empty($changes)) continue;
$actionID = $this->loadModel('action')->create('project', $projectID, 'Edited');
$this->action->logHistory($actionID, $changes);
}
}
die(js::locate($this->session->projectList, 'parent'));
}
$projectIdList = $this->post->projectIdList ? $this->post->projectIdList : die(js::locate($this->session->projectList, 'parent'));
$projects = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->in($projectIdList)->fetchAll('id');
@@ -1831,6 +1848,7 @@ class program extends control
*/
public function ajaxCheckProduct($programID, $projectID)
{
/* Set vars. */
$project = $this->program->getPRJByID($projectID);
$oldTopPGM = $this->program->getTopPGMByID($project->parent);
$newTopPGM = $this->program->getTopPGMByID($programID);