*[misc] add comment.

This commit is contained in:
songchenxuan
2024-10-23 14:42:21 +08:00
committed by 周鑫
parent e4caac4c25
commit 8ebce51a0c
2 changed files with 42 additions and 17 deletions
-5
View File
@@ -984,9 +984,6 @@ class doc extends control
if(!common::hasPriv('api', 'create')) unset($spaceList['api'], $typeList['api']);
if($this->config->vision == 'lite') unset($spaceList['api'], $spaceList['product'], $typeList['api']);
$products = $this->loadModel('product')->getPairs();
$projects = $this->project->getPairsByProgram(0, 'all', false, 'order_asc');
$params = helper::safe64Decode($params);
parse_str($params, $params);
$this->view->params = $params;
@@ -994,8 +991,6 @@ class doc extends control
$this->view->objectType = $objectType;
$this->view->spaceList = $spaceList;
$this->view->typeList = $typeList;
$this->view->products = $products;
$this->view->projects = $projects;
$this->display();
}
+42 -12
View File
@@ -3,6 +3,24 @@ window.getSpaceType = function()
return $('.modal-body [name=rootSpace]:checked').val();
}
/**
* Change space.
*
* @access public
* @return void
*/
window.changeSpace = function()
{
const objectType = getSpaceType();
if(objectType) loadModal($.createLink('doc', 'selectLibType', `objectType=${objectType}`));
}
/**
* Reload select mineandcustom page.
*
* @access public
* @return void
*/
window.reloadMineAndCustom = function()
{
const objectType = getSpaceType();
@@ -13,6 +31,12 @@ window.reloadMineAndCustom = function()
loadModal($.createLink('doc', 'selectLibType', `objectType=${objectType}&params=${params}`));
}
/**
* Reload select product page.
*
* @access public
* @return void
*/
window.reloadProduct = function()
{
const objectType = getSpaceType();
@@ -24,6 +48,12 @@ window.reloadProduct = function()
loadModal($.createLink('doc', 'selectLibType', `objectType=${objectType}&params=${params}`));
}
/**
* Reload select project page.
*
* @access public
* @return void
*/
window.reloadProject = function()
{
const objectType = getSpaceType();
@@ -36,6 +66,12 @@ window.reloadProject = function()
loadModal($.createLink('doc', 'selectLibType', `objectType=${objectType}&params=${params}`));
}
/**
* Reload select api page by apiType.
*
* @access public
* @return void
*/
window.reloadApiByApiType = function()
{
const objectType = getSpaceType();
@@ -44,6 +80,12 @@ window.reloadApiByApiType = function()
loadModal($.createLink('doc', 'selectLibType', `objectType=${objectType}&params=${params}`));
}
/**
* Reload select api page.
*
* @access public
* @return void
*/
window.reloadApi = function()
{
const objectType = getSpaceType();
@@ -70,18 +112,6 @@ window.reloadApi = function()
loadModal($.createLink('doc', 'selectLibType', `objectType=${objectType}&params=${params}`));
}
/**
* Change space.
*
* @access public
* @return void
*/
window.changeSpace = function()
{
const objectType = getSpaceType();
if(objectType) loadModal($.createLink('doc', 'selectLibType', `objectType=${objectType}`));
}
/**
* Redirect the parent window.
*