From 4e1a36384ce830bb6c62ce0ada86d7f0f08e9025 Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Mon, 22 Feb 2021 16:24:26 +0800 Subject: [PATCH] * Code for task #36041. --- module/product/control.php | 5 ++--- module/product/js/edit.js | 5 ----- module/product/view/all.html.php | 6 +++--- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/module/product/control.php b/module/product/control.php index 848b5971b5..c9a84a703a 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -357,7 +357,6 @@ class product extends control $this->lang->product->switcherMenu = $this->product->getSwitcher($productID); $this->lang->product->mainMenuAction = $this->product->getProductMainAction(); - /* Init vars. */ $product = $this->product->getById($productID); $notRemovePRJ = array(); @@ -480,7 +479,7 @@ class product extends control $this->view->rdUsers = $rdUsers; $this->view->users = $this->user->getPairs('nodeleted|noclosed'); $this->view->programs = array('') + $this->loadModel('program')->getTopPGMPairs(); - $this->view->lines = array('') + $this->product->getLinePairs($product->program); + $this->view->lines = $product->program ? array('') + $this->product->getLinePairs($product->program) : array(); $this->view->URSRPairs = $this->loadModel('custom')->getURSRPairs(); $this->view->canChangePGM = $canChangePGM; $this->view->singleLinkProjects = $singleLinkProjects; @@ -984,7 +983,7 @@ class product extends control $this->loadModel('program'); $this->session->set('productList', $this->app->getURI(true)); - /* Init vars. */ + /* Process product structure. */ $productStructure = array(); $productStats = $this->product->getStats($orderBy, '', $browseType, '', 'story'); diff --git a/module/product/js/edit.js b/module/product/js/edit.js index 367d94af08..9b7015931a 100644 --- a/module/product/js/edit.js +++ b/module/product/js/edit.js @@ -12,11 +12,6 @@ $(function() $('#program').trigger("chosen:updated"); } } - }) - - $('#program').change(function() - { - var programID = $(this).val(); $.get(createLink('product', 'ajaxGetLine', 'programID=' + programID), function(data) { diff --git a/module/product/view/all.html.php b/module/product/view/all.html.php index d710354b6b..f3e08c9b3b 100644 --- a/module/product/view/all.html.php +++ b/module/product/view/all.html.php @@ -80,9 +80,9 @@ $line):?> >