Added buttons to edit cutomcode directly from where it is added in other areas around the component. This will improve the customcode workflow in JCB.

This commit is contained in:
2019-01-31 23:44:21 +02:00
parent 8cdf056ad4
commit 1a538e71d7
52 changed files with 1407 additions and 236 deletions

View File

@ -50,6 +50,11 @@ class ComponentbuilderModelFieldtype extends JModelAdmin
$this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_componentbuilder/tables');
// get instance of the table
return JTable::getInstance($type, $prefix, $config);
}
public function getVDM()
{
return $this->vastDevMod;
}
/**
@ -89,6 +94,31 @@ class ComponentbuilderModelFieldtype extends JModelAdmin
$item->properties = $properties->toArray();
}
if (empty($item->id))
{
$id = 0;
}
else
{
$id = $item->id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('fieldtype__'.$id))
{
$this->vastDevMod = $vdm;
}
else
{
// set the vast development method key
$this->vastDevMod = ComponentbuilderHelper::randomkey(50);
ComponentbuilderHelper::set($this->vastDevMod, 'fieldtype__'.$id);
ComponentbuilderHelper::set('fieldtype__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = JFactory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
}
// check what type of properties array we have here (should be subform... but just incase)
// This could happen due to huge data sets
if (isset($item->properties) && isset($item->properties['name']))