* code for task #89916.

This commit is contained in:
wangyidong
2023-04-06 11:25:08 +08:00
parent 16e4454805
commit 85f5056b33
4 changed files with 25 additions and 11 deletions
+2 -2
View File
@@ -577,8 +577,8 @@ class api extends control
$this->action->create('api', $api->id, 'Created');
if(isonlybody()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
return $this->sendSuccess(array('locate' => helper::createLink('api', 'index', "libID={$api->lib}&moduleID=0&apiID={$api->id}")));
if(isonlybody()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => 'true', 'callback' => "parentLocate({$api->id})"));
return $this->sendSuccess(array('locate' => helper::createLink('api', 'index', "libID={$api->lib}&moduleID={$api->module}&apiID={$api->id}")));
}
$libs = $this->doc->getLibs('api', '', $libID);
+14
View File
@@ -84,3 +84,17 @@ var app = new Vue({
}
}
})
/**
* locate link in parent.
*
* @param int $apiID
* @access public
* @return void
*/
function parentLocate(apiID)
{
config.onlybody = 'no';
var link = createLink('api', 'index', 'libID=0&moduleID=0&apiID=' + apiID) + '#app=doc';
window.parent.$.apps.open(link);
}
+1 -1
View File
@@ -9,7 +9,7 @@
*/
function redirectParentWindow(objectType, libID, moduleID, docType)
{
if(objectType == 'api')
if(docType == 'api')
{
parent.$.closeModal(function()
{