Added another field to admin_view to add custom script to document method of component admin views.
This commit is contained in:
@ -1076,7 +1076,7 @@ class Get
|
||||
}
|
||||
|
||||
$this->lang = 'admin';
|
||||
$addArray = array('php_getitem','php_save','php_postsavehook','php_getitems','php_getlistquery','php_allowedit','php_before_delete','php_after_delete','php_batchcopy','php_batchmove');
|
||||
$addArray = array('php_getitem','php_save','php_postsavehook','php_getitems','php_getlistquery','php_allowedit','php_before_delete','php_after_delete','php_batchcopy','php_batchmove','php_document');
|
||||
foreach ($addArray as $scripter)
|
||||
{
|
||||
if (isset($view->{'add_'.$scripter}) && $view->{'add_'.$scripter} == 1)
|
||||
@ -1085,7 +1085,7 @@ class Get
|
||||
unset($view->$scripter);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// add_Ajax for this view
|
||||
if ($view->add_php_ajax == 1)
|
||||
{
|
||||
|
@ -255,7 +255,20 @@ class Infusion extends Interpretation
|
||||
|
||||
// ###AJAXTOKE### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$viewName_single]['###AJAXTOKE###'] = $this->setAjaxToke($viewName_single);
|
||||
|
||||
|
||||
if (isset($this->customScriptBuilder['php_document'][$viewName_single]) && ComponentbuilderHelper::checkString($this->customScriptBuilder['php_document'][$viewName_single]))
|
||||
{
|
||||
// ###DOCUMENT_CUSTOM_PHP### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$viewName_single]['###DOCUMENT_CUSTOM_PHP###']
|
||||
= str_replace(array_keys($this->placeholders),array_values($this->placeholders),$this->customScriptBuilder['php_document'][$viewName_single]);
|
||||
// clear some memory
|
||||
unset($this->customScriptBuilder['php_document'][$viewName_single]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->fileContentDynamic[$viewName_single]['###DOCUMENT_CUSTOM_PHP###'] = '';
|
||||
}
|
||||
|
||||
// ###LINKEDVIEWTABLESCRIPTS### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$viewName_single]['###LINKEDVIEWTABLESCRIPTS###'] = '';
|
||||
|
||||
|
Reference in New Issue
Block a user