* code for task #89916.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*/
|
||||
function redirectParentWindow(objectType, libID, moduleID, docType)
|
||||
{
|
||||
if(objectType == 'api')
|
||||
if(docType == 'api')
|
||||
{
|
||||
parent.$.closeModal(function()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user