added another fields to admin view to target list controller and model. Also improve compiler to add these new custom script to correct areas

This commit is contained in:
2017-03-02 02:55:04 +02:00
parent a1ff74f157
commit 4d47f8292f
270 changed files with 1010 additions and 852 deletions

View File

@ -1266,14 +1266,24 @@ class Get
// add the custom buttons
if (isset($view->add_custom_button) && $view->add_custom_button == 1)
{
if (ComponentbuilderHelper::checkString($view->php_model) && $view->php_mode !== '//')
// set for the edit views
if (ComponentbuilderHelper::checkString($view->php_model))
{
$view->php_model = $this->setDynamicValues(base64_decode($view->php_model));
}
if (ComponentbuilderHelper::checkString($view->php_controller) && trim($view->php_controller) !== '//')
if (ComponentbuilderHelper::checkString($view->php_controller))
{
$view->php_controller = $this->setDynamicValues(base64_decode($view->php_controller));
}
// set for the list views
if (isset($view->php_model_list) && ComponentbuilderHelper::checkString($view->php_model_list))
{
$view->php_model_list = $this->setDynamicValues(base64_decode($view->php_model_list));
}
if (isset($view->php_controller_list) && ComponentbuilderHelper::checkString($view->php_controller_list))
{
$view->php_controller_list = $this->setDynamicValues(base64_decode($view->php_controller_list));
}
// set the button array
$buttons = json_decode($view->custom_button,true);
unset($view->custom_button);