From eda39dafe88319ba88177b7a93770ac5333caad4 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Tue, 31 Aug 2021 14:09:55 +0800 Subject: [PATCH 1/7] * Add the setTutorialConfig method to open method. --- config/zentaopms.php | 1 + 1 file changed, 1 insertion(+) diff --git a/config/zentaopms.php b/config/zentaopms.php index fe193d98ca..bc2ecfea74 100644 --- a/config/zentaopms.php +++ b/config/zentaopms.php @@ -139,6 +139,7 @@ $config->openMethods[] = 'index.changelog'; $config->openMethods[] = 'my.preference'; $config->openMethods[] = 'my.changepassword'; $config->openMethods[] = 'my.profile'; +$config->openMethods[] = 'my.settutorialconfig'; /* Define the tables. */ define('TABLE_COMPANY', '`' . $config->db->prefix . 'company`'); From 2754933fb6cfae9240d5ce0b61f769d98d69452d Mon Sep 17 00:00:00 2001 From: zenggang Date: Tue, 31 Aug 2021 14:26:33 +0800 Subject: [PATCH 2/7] * Finish bug#14753 --- module/project/js/managemembers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/project/js/managemembers.js b/module/project/js/managemembers.js index 8868e0a9f8..8f9332d9cb 100644 --- a/module/project/js/managemembers.js +++ b/module/project/js/managemembers.js @@ -51,7 +51,7 @@ function saveMemebers() function setRole(account, roleID) { role = roles[account]; // get role according the account. - roleOBJ = $('#role' + roleID); // get role object. + roleOBJ = $(document.getElementById('roles[' + roleID + ']')); // get role object. roleOBJ.val(role) // set the role. } From 189cca6b75450caa21ff47e5edfea02733360a51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=80=A1=E6=A0=8B?= Date: Tue, 31 Aug 2021 14:33:25 +0800 Subject: [PATCH 3/7] * finish task #40874. --- module/program/control.php | 13 +++++-------- module/program/view/product.html.php | 12 ++++++------ module/project/view/edit.html.php | 2 +- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/module/program/control.php b/module/program/control.php index e7e252260d..266260265b 100644 --- a/module/program/control.php +++ b/module/program/control.php @@ -96,9 +96,6 @@ class program extends control $this->program->setMenu($programID); - $program = $this->program->getByID($programID); - if(empty($program) || $program->type != 'program') die(js::error($this->lang->notFound) . js::locate('back')); - /* Load pager and get tasks. */ $this->app->loadClass('pager', $static = true); $pager = new pager($recTotal, $recPerPage, $pageID); @@ -106,6 +103,7 @@ class program extends control /* Get the top programID. */ if($programID) { + $program = $this->program->getByID($programID); $path = explode(',', $program->path); $path = array_filter($path); $programID = current($path); @@ -113,7 +111,7 @@ class program extends control $this->view->title = $this->lang->program->product; $this->view->position[] = $this->lang->program->product; - $this->view->program = $program; + $this->view->programID = $programID; $this->view->browseType = $browseType; $this->view->orderBy = $orderBy; $this->view->pager = $pager; @@ -386,12 +384,12 @@ class program extends control { $programID = $this->program->saveState($programID, $this->program->getPairs()); setCookie("lastProgram", $programID, $this->config->cookieLife, $this->config->webRoot, '', false, true); - if(!$programID) $this->locate($this->createLink('program', 'browse')); $this->program->setMenu($programID); - $this->app->session->set('programProject', $this->app->getURI(true), 'program'); - $this->app->session->set('projectList', $this->app->getURI(true), 'project'); + $uri = $this->app->getURI(true); + $this->app->session->set('programProject', $uri, 'program'); + $this->app->session->set('projectList', $uri, 'program'); $this->loadModel('datatable'); @@ -410,7 +408,6 @@ class program extends control $this->view->projectStats = $projectStats; $this->view->pager = $pager; $this->view->programID = $programID; - $this->view->program = $this->program->getByID($programID); $this->view->users = $this->loadModel('user')->getPairs('noletter|pofirst|nodeleted'); $this->view->browseType = $browseType; $this->view->orderBy = $orderBy; diff --git a/module/program/view/product.html.php b/module/program/view/product.html.php index 008e690738..6618fc12d3 100644 --- a/module/program/view/product.html.php +++ b/module/program/view/product.html.php @@ -17,11 +17,11 @@ product->featureBar['all'] as $key => $label):?> {$pager->recTotal}";?> - id&browseType=$key&orderBy=$orderBy"), "{$label}", '', "class='btn btn-link $active'");?> + {$label}", '', "class='btn btn-link $active'");?>
- id", ' ' . $lang->product->create, '', 'class="btn btn-primary"');?> + ' . $lang->product->create, '', 'class="btn btn-primary"');?>
@@ -32,11 +32,11 @@
-
id");?>'> + '> - id&browseType=$browseType&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?> + recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
@@ -104,7 +104,7 @@ plans;?> releases;?> - id&action=edit&extra=&programID=$program->id", $product, 'list', 'edit');?> + id&action=edit&extra=&programID=$programID", $product, 'list', 'edit');?> @@ -129,7 +129,7 @@ -id)?> +