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:
@ -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']))
|
||||
|
Reference in New Issue
Block a user