diff --git a/module/api/control.php b/module/api/control.php
index bd0944e0dc..a307a4f3db 100755
--- a/module/api/control.php
+++ b/module/api/control.php
@@ -394,7 +394,7 @@ class api extends control
setCookie("objectType", $this->post->libType, $this->config->cookieLife, $this->config->webRoot, '', false, true);
setCookie("objectID", $this->post->libType == 'project' ? $this->post->project : $this->post->product, $this->config->cookieLife, $this->config->webRoot, '', false, true);
-
+ if(isonlybody()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
if(!helper::isAjaxRequest()) return print(js::locate($this->createLink('api', 'index', "libID=$libID"), 'parent.parent'));
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('api', 'index', "libID=$libID")));
}
diff --git a/module/api/view/apilist.html.php b/module/api/view/apilist.html.php
index d8dc48e07a..5ecfc6cc9a 100644
--- a/module/api/view/apilist.html.php
+++ b/module/api/view/apilist.html.php
@@ -91,7 +91,14 @@
' . $lang->api->createApi, '', 'class="btn btn-info"');
+ if($app->rawModule == 'doc')
+ {
+ echo html::a($this->createLink('api', 'create', "libID=$libID&moduleID=$moduleID", '', true), ' ' . $lang->api->createApi, '', 'class="btn btn-info iframe" data-width="95%"');
+ }
+ else
+ {
+ echo html::a(helper::createLink('api', 'create', "libID={$libID}&moduleID=$moduleID"), ' ' . $lang->api->createApi, '', 'class="btn btn-info"');
+ }
}
?>
diff --git a/module/doc/view/tablecontents.html.php b/module/doc/view/tablecontents.html.php
index a61f06b9d6..b3a2c0c9fe 100644
--- a/module/doc/view/tablecontents.html.php
+++ b/module/doc/view/tablecontents.html.php
@@ -46,7 +46,7 @@
else
{
if(common::hasPriv('api', 'createLib')) echo html::a($this->createLink('api', 'createLib', "type=$type"), ' ' . $lang->api->createLib, '', 'class="btn btn-secondary iframe" data-width="800px"');
- if(common::hasPriv('api', 'create')) echo html::a($this->createLink('api', 'create', "libID=$libID&moduleID=$moduleID"), ' ' . $lang->api->createApi, '', 'class="btn btn-primary"');
+ if(common::hasPriv('api', 'create')) echo html::a($this->createLink('api', 'create', "libID=$libID&moduleID=$moduleID", '', true), ' ' . $lang->api->createApi, '', 'class="btn btn-primary iframe" data-width="95%"');
}
?>