* Fix create a bug navgation when the system don't have any product.

This commit is contained in:
tianshujie
2023-11-17 10:45:36 +08:00
parent 3a416e129c
commit 08f426893d
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ class bug extends control
$products = $this->product->getPairs($mode, 0, '', 'all');
}
if(empty($products) and !helper::isAjaxRequest()) $this->locate($this->createLink('product', 'showErrorNone', "moduleName=$tab&activeMenu=bug&objectID=$objectID"));
if(empty($products) and substr($this->app->rawMethod, 0, 4) != 'ajax') $this->locate($this->createLink('product', 'showErrorNone', "moduleName=$tab&activeMenu=bug&objectID=$objectID"));
}
else
{
+1 -1
View File
@@ -42,7 +42,7 @@ div
(
setClass('btn ghost text-primary'),
set::href($link),
set('data-app', $app->tab),
setData('app', $tab),
icon('plus'),
$text
)
+2 -2
View File
@@ -530,10 +530,10 @@ class productZen extends product
$moduleName = $tab == 'program' ? 'program' : $this->moduleName;
$methodName = $tab == 'program' ? 'product' : 'browse';
$param = $tab == 'program' ? "programID=$programID" : "productID=$productID";
$location = isonlybody() ? 'true' : $this->createLink($moduleName, $methodName, $param);
$location = isInModal() ? 'true' : $this->createLink($moduleName, $methodName, $param);
if($tab == 'doc') $location = $this->createLink('doc', 'productSpace', "objectID=$productID");
return array('result' => 'success', 'message' => $this->lang->saveSuccess, 'load' => $location);
return array('result' => 'success', 'message' => $this->lang->saveSuccess, 'load' => $location, 'closeModal' => true);
}
/**