diff --git a/framework/control.class.php b/framework/control.class.php
index 6e99e59104..cd0670d59a 100644
--- a/framework/control.class.php
+++ b/framework/control.class.php
@@ -487,18 +487,19 @@ class control extends baseControl
if($type == 'html')
{
parse_str($extras, $result);
- $fields = $this->flow->buildExtendHtmlValue($object, zget($result, 'position', 'info'));
+ $html = $this->flow->buildExtendHtmlValue($object, zget($result, 'position', 'info'));
+ $html .= $this->appendExtendCssAndJS($moduleName, $methodName);
}
else
{
ob_start();
$this->flow->printFields($moduleName, $methodName, $object, $type, $extras);
- $fields = ob_get_contents();
+ $html = ob_get_contents();
ob_end_clean();
}
- if(!$print) return $fields;
- echo $fields;
+ if(!$print) return $html;
+ echo $html;
}
/**
@@ -540,7 +541,7 @@ class control extends baseControl
$moduleName = $moduleName ? $moduleName : $this->app->getModuleName();
$methodName = $methodName ? $moduleName : $this->app->getMethodName();
- $flow = $this->loadModel('workflow')->getByModule($moduleName);
+ $flow = $this->loadModel('workflow')->getByModule($moduleName);
if(!$flow) return '';
$action = $this->loadModel('workflowaction')->getByModuleAndAction($flow->module, $methodName);
@@ -550,8 +551,8 @@ class control extends baseControl
if(!empty($flow->css)) $html .= "";
if(!empty($action->css)) $html .= "";
- $html .= $this->getFormulaScript($moduleName, $action, $fieldList);
- if($action->linkages) $html .= $this->getLinkageScript($action, $fieldList);
+ $html .= $this->loadModel('flow')->getFormulaScript($moduleName, $action, $fieldList);
+ if($action->linkages) $html .= $this->flow->getLinkageScript($action, $fieldList);
if(!empty($flow->js)) $html .= "";
if(!empty($action->js)) $html .= "";
diff --git a/lib/zin/wg/detail/v1.php b/lib/zin/wg/detail/v1.php
index e0111769d2..9b19fc4ac0 100644
--- a/lib/zin/wg/detail/v1.php
+++ b/lib/zin/wg/detail/v1.php
@@ -502,6 +502,7 @@ CSS;
protected function build()
{
+ global $app;
list($objectType, $objectID, $layout) = $this->prop(array('objectType', 'objectID', 'layout'));
return div
@@ -511,7 +512,8 @@ CSS;
setData('type', $objectType),
$this->buildHeader(),
$this->buildBody(),
- $layout === 'simple' ? null : $this->buildPrevAndNext()
+ $layout === 'simple' ? null : $this->buildPrevAndNext(),
+ html($app->control->appendExtendCssAndJS())
);
}
}
diff --git a/lib/zin/wg/detailbody/v1.php b/lib/zin/wg/detailbody/v1.php
index f5caef08da..c34affa61e 100644
--- a/lib/zin/wg/detailbody/v1.php
+++ b/lib/zin/wg/detailbody/v1.php
@@ -88,7 +88,8 @@ class detailBody extends wg
$bottom,
empty($floating) ? null : center(setClass('pt-6 sticky bottom-0'), $floating)
),
- $side
+ $side,
+ html($app->control->appendExtendCssAndJS())
);
}