diff --git a/module/account/control.php b/module/account/control.php
index 5a9f60d56c..58380d3261 100644
--- a/module/account/control.php
+++ b/module/account/control.php
@@ -67,7 +67,7 @@ class account extends control
$this->loadModel('action')->create('account', $id, 'created');
- if(isonlybody()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'load' => true));
+ if(isInModal()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'load' => true));
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'callback' => 'loadCurrentPage()', 'closeModal' => true));
}
@@ -187,7 +187,7 @@ class account extends control
$this->account->updateStatus($accountID, $accountStatus);
$this->loadModel('action')->create('account', $id, $accountStatus, $postData->reason);
- if(isonlybody()) return print(js::reload('parent.parent'));
+ if(isInModal()) return print(js::reload('parent.parent'));
return print(js::reload('parent'));
}
diff --git a/module/action/model.php b/module/action/model.php
index 5447868409..b30787c278 100755
--- a/module/action/model.php
+++ b/module/action/model.php
@@ -483,7 +483,7 @@ class actionModel extends model
$mrAction = str_replace('mr', '', $action->action) . 'Action';
list($mrDate, $mrActor, $mrLink) = explode('::', $action->extra);
- if(isonlybody()) $mrLink .= ($this->config->requestType == 'GET' ? '&onlybody=yes' : '?onlybody=yes');
+ if(isInModal()) $mrLink .= ($this->config->requestType == 'GET' ? '&onlybody=yes' : '?onlybody=yes');
$this->app->loadLang('mr');
$desc = sprintf($this->lang->mr->{$mrAction}, $mrDate, $mrActor, $mrLink);
diff --git a/module/api/control.php b/module/api/control.php
index fdcebd940e..5a89c4fdfc 100755
--- a/module/api/control.php
+++ b/module/api/control.php
@@ -553,7 +553,7 @@ class api extends control
else
{
$this->doc->delete(TABLE_DOCLIB, $libID);
- if(isonlybody())
+ if(isInModal())
{
unset($_GET['onlybody']);
return print(js::locate($this->createLink('api', 'index'), 'parent.parent'));
@@ -625,7 +625,7 @@ class api extends control
$this->action->create('api', $api->id, 'Created');
- if(isonlybody()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => 'true', 'callback' => "parentLocate({$api->id}, {$api->lib}, {$api->module})"));
+ if(isInModal()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => 'true', 'callback' => "parentLocate({$api->id}, {$api->lib}, {$api->module})"));
return $this->sendSuccess(array('locate' => helper::createLink('api', 'index', "libID={$api->lib}&moduleID={$api->module}&apiID={$api->id}")));
}
diff --git a/module/caselib/control.php b/module/caselib/control.php
index f2768f0988..a50b2d7886 100644
--- a/module/caselib/control.php
+++ b/module/caselib/control.php
@@ -216,7 +216,7 @@ class caselib extends control
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
/* If link from no head then reload. */
- if(isonlybody()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true));
+ if(isInModal()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true));
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'load' => $this->createLink('caselib', 'browse', "libID={$libID}&browseType=byModule¶m={$_POST['module']}")));
}
/* Set lib menu. */
@@ -261,7 +261,7 @@ class caselib extends control
foreach($cases as $case) $this->testcase->create($case);
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
- if(isonlybody()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true));
+ if(isInModal()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true));
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'load' => $this->createLink('caselib', 'browse', "libID={$libID}&browseType=byModule¶m={$moduleID}"), 'closeModal' => true));
}
diff --git a/module/common/model.php b/module/common/model.php
index 1a3dccfda4..d709dd7eef 100644
--- a/module/common/model.php
+++ b/module/common/model.php
@@ -1675,10 +1675,10 @@ EOF;
*/
public static function buildIconButton($module, $method, $vars = '', $object = '', $type = 'button', $icon = '', $target = '', $extraClass = '', $onlyBody = false, $misc = '', $title = '', $programID = 0, $extraEnabled = '')
{
- if(isonlybody() and strpos($extraClass, 'showinonlybody') === false) return false;
+ if(isInModal() and strpos($extraClass, 'showinonlybody') === false) return false;
/* Remove iframe for operation button in modal. Prevent pop up in modal. */
- if(isonlybody() and strpos($extraClass, 'showinonlybody') !== false) $extraClass = str_replace('iframe', '', $extraClass);
+ if(isInModal() and strpos($extraClass, 'showinonlybody') !== false) $extraClass = str_replace('iframe', '', $extraClass);
global $app, $lang, $config;
@@ -1903,7 +1903,7 @@ EOF;
public static function printRPN($backLink, $preAndNext = '', $linkTemplate = '')
{
global $lang, $app;
- if(isonlybody()) return false;
+ if(isInModal()) return false;
$title = $lang->goback . $lang->backShortcutKey;
echo html::a($backLink, '', '', "id='back' class='btn' title={$title}");
@@ -1939,7 +1939,7 @@ EOF;
public static function printBack($backLink, $class = '', $misc = '')
{
global $lang, $app;
- if(isonlybody()) return false;
+ if(isInModal()) return false;
if(empty($class)) $class = 'btn';
$title = $lang->goback . $lang->backShortcutKey;
@@ -1958,7 +1958,7 @@ EOF;
public static function printPreAndNext($preAndNext = '', $linkTemplate = '')
{
global $lang, $app;
- if(isonlybody()) return false;
+ if(isInModal()) return false;
$moduleName = ($app->getModuleName() == 'story' and $app->tab == 'project') ? 'projectstory' : $app->getModuleName();
echo "