Updates marked JS package. Adds more events to the compiler. Fix gh-841 database issue (IF NOT EXISTS). Update Agerix banner link. Adds more clone options.

This commit is contained in:
2022-01-15 19:52:09 +02:00
parent 9373b29bff
commit e5d599d5a5
36 changed files with 510 additions and 67 deletions

View File

@@ -31,12 +31,18 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin
'dashboard' => array(
'fullwidth' => array(
'note_php_dashboard_note',
'php_dashboard_methods',
'dashboard_tab'
'dashboard_tab',
'php_dashboard_methods'
),
'above' => array(
'joomla_component'
)
),
'clone' => array(
'left' => array(
'note_how_to_clone',
'clone_me'
)
)
);
@@ -927,6 +933,19 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin
$data['metadata'] = (string) $metadata;
}
// check if we have a clone moment
if (isset($data['clone_me']) && $data['clone_me'] > 0)
{
// get the following data from clone_me (component_dashboard)
$keys = array('php_dashboard_methods','dashboard_tab','params');
foreach ($keys as $key)
{
$data[$key] = ComponentbuilderHelper::getVar('component_dashboard', $data['clone_me'], 'joomla_component', $key);
}
}
// Set the dashboard_tab items to data.
if (isset($data['dashboard_tab']) && is_array($data['dashboard_tab']))
{

View File

@@ -39,6 +39,12 @@ class ComponentbuilderModelComponent_files_folders extends JModelAdmin
'joomla_component'
)
),
'clone' => array(
'left' => array(
'note_how_to_clone',
'clone_me'
)
),
'advance' => array(
'fullwidth' => array(
'note_add_files_fullpath',
@@ -872,6 +878,19 @@ class ComponentbuilderModelComponent_files_folders extends JModelAdmin
$data['metadata'] = (string) $metadata;
}
// check if we have a clone moment
if (isset($data['clone_me']) && $data['clone_me'] > 0)
{
// get the following data from clone_me (component_files_folders)
$keys = array('addfiles','addfolders','addfilesfullpath','addfoldersfullpath');
foreach ($keys as $key)
{
$data[$key] = ComponentbuilderHelper::getVar('component_files_folders', $data['clone_me'], 'joomla_component', $key);
}
}
// Set the addfoldersfullpath items to data.
if (isset($data['addfoldersfullpath']) && is_array($data['addfoldersfullpath']))
{

View File

@@ -36,6 +36,12 @@ class ComponentbuilderModelComponent_modules extends JModelAdmin
'above' => array(
'joomla_component'
)
),
'clone' => array(
'left' => array(
'note_how_to_clone',
'clone_me'
)
)
);
@@ -805,6 +811,15 @@ class ComponentbuilderModelComponent_modules extends JModelAdmin
$data['metadata'] = (string) $metadata;
}
// check if we have a clone moment
if (isset($data['clone_me']) && $data['clone_me'] > 0)
{
// get addjoomla_modules data from clone_me (component_modules)
$data['addjoomla_modules'] = ComponentbuilderHelper::getVar('component_modules', $data['clone_me'], 'joomla_component', 'addjoomla_modules');
}
// Set the addjoomla_modules items to data.
if (isset($data['addjoomla_modules']) && is_array($data['addjoomla_modules']))
{

View File

@@ -35,6 +35,12 @@ class ComponentbuilderModelComponent_placeholders extends JModelAdmin
'above' => array(
'joomla_component'
)
),
'clone' => array(
'left' => array(
'note_how_to_clone',
'clone_me'
)
)
);
@@ -804,6 +810,15 @@ class ComponentbuilderModelComponent_placeholders extends JModelAdmin
$data['metadata'] = (string) $metadata;
}
// check if we have a clone moment
if (isset($data['clone_me']) && $data['clone_me'] > 0)
{
// get addplaceholders data from clone_me (component_placeholders)
$data['addplaceholders'] = ComponentbuilderHelper::getVar('component_placeholders', $data['clone_me'], 'joomla_component', 'addplaceholders');
}
// Set the addplaceholders items to data.
if (isset($data['addplaceholders']) && is_array($data['addplaceholders']))
{

View File

@@ -36,6 +36,12 @@ class ComponentbuilderModelComponent_plugins extends JModelAdmin
'above' => array(
'joomla_component'
)
),
'clone' => array(
'left' => array(
'note_how_to_clone',
'clone_me'
)
)
);
@@ -805,6 +811,15 @@ class ComponentbuilderModelComponent_plugins extends JModelAdmin
$data['metadata'] = (string) $metadata;
}
// check if we have a clone moment
if (isset($data['clone_me']) && $data['clone_me'] > 0)
{
// get addjoomla_plugins data from clone_me (component_plugins)
$data['addjoomla_plugins'] = ComponentbuilderHelper::getVar('component_plugins', $data['clone_me'], 'joomla_component', 'addjoomla_plugins');
}
// Set the addjoomla_plugins items to data.
if (isset($data['addjoomla_plugins']) && is_array($data['addjoomla_plugins']))
{

View File

@@ -105,19 +105,19 @@
readonly="true"
button="false"
/>
<!-- Php_dashboard_methods Field. Type: Textarea. (joomla) -->
<!-- Clone_me Field. Type: Joomlacomponent. (custom) -->
<field
type="textarea"
name="php_dashboard_methods"
label="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_PHP_DASHBOARD_METHODS_LABEL"
rows="17"
cols="5"
description="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_PHP_DASHBOARD_METHODS_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_PHP_DASHBOARD_METHODS_HINT"
type="joomlacomponent"
name="clone_me"
label="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_CLONE_ME_LABEL"
class="list_class"
multiple="false"
default="0"
required="false"
button="false"
/>
<!-- Note_how_to_clone Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_how_to_clone" label="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_NOTE_HOW_TO_CLONE_LABEL" description="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_NOTE_HOW_TO_CLONE_DESCRIPTION" heading="h4" class="alert alert-info note_how_to_clone" />
<!-- Dashboard_tab Field. Type: Subform. (joomla) -->
<field
type="subform"
@@ -174,6 +174,19 @@
/>
</form>
</field>
<!-- Php_dashboard_methods Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="php_dashboard_methods"
label="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_PHP_DASHBOARD_METHODS_LABEL"
rows="17"
cols="5"
description="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_PHP_DASHBOARD_METHODS_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_PHP_DASHBOARD_METHODS_HINT"
required="false"
/>
<!-- Note_php_dashboard_note Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_php_dashboard_note" description="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_NOTE_PHP_DASHBOARD_NOTE_DESCRIPTION" class="note_php_dashboard_note" />
</fieldset>

View File

@@ -105,6 +105,19 @@
readonly="true"
button="false"
/>
<!-- Clone_me Field. Type: Joomlacomponent. (custom) -->
<field
type="joomlacomponent"
name="clone_me"
label="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_CLONE_ME_LABEL"
class="list_class"
multiple="false"
default="0"
required="false"
button="false"
/>
<!-- Note_how_to_clone Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_how_to_clone" label="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTE_HOW_TO_CLONE_LABEL" description="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTE_HOW_TO_CLONE_DESCRIPTION" heading="h4" class="alert alert-info note_how_to_clone" />
<!-- Note_constant_paths Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_constant_paths" label="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTE_CONSTANT_PATHS_LABEL" description="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTE_CONSTANT_PATHS_DESCRIPTION" heading="h4" class="alert alert-info note_constant_paths" />
<!-- Addfoldersfullpath Field. Type: Subform. (joomla) -->

View File

@@ -105,6 +105,19 @@
readonly="true"
button="false"
/>
<!-- Clone_me Field. Type: Joomlacomponent. (custom) -->
<field
type="joomlacomponent"
name="clone_me"
label="COM_COMPONENTBUILDER_COMPONENT_MODULES_CLONE_ME_LABEL"
class="list_class"
multiple="false"
default="0"
required="false"
button="false"
/>
<!-- Note_how_to_clone Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_how_to_clone" label="COM_COMPONENTBUILDER_COMPONENT_MODULES_NOTE_HOW_TO_CLONE_LABEL" description="COM_COMPONENTBUILDER_COMPONENT_MODULES_NOTE_HOW_TO_CLONE_DESCRIPTION" heading="h4" class="alert alert-info note_how_to_clone" />
<!-- Addjoomla_modules Field. Type: Subform. (joomla) -->
<field
type="subform"

View File

@@ -105,6 +105,19 @@
readonly="true"
button="false"
/>
<!-- Clone_me Field. Type: Joomlacomponent. (custom) -->
<field
type="joomlacomponent"
name="clone_me"
label="COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_CLONE_ME_LABEL"
class="list_class"
multiple="false"
default="0"
required="false"
button="false"
/>
<!-- Note_how_to_clone Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_how_to_clone" label="COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_NOTE_HOW_TO_CLONE_LABEL" description="COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_NOTE_HOW_TO_CLONE_DESCRIPTION" heading="h4" class="alert alert-info note_how_to_clone" />
<!-- Addplaceholders Field. Type: Subform. (joomla) -->
<field
type="subform"

View File

@@ -105,6 +105,19 @@
readonly="true"
button="false"
/>
<!-- Clone_me Field. Type: Joomlacomponent. (custom) -->
<field
type="joomlacomponent"
name="clone_me"
label="COM_COMPONENTBUILDER_COMPONENT_PLUGINS_CLONE_ME_LABEL"
class="list_class"
multiple="false"
default="0"
required="false"
button="false"
/>
<!-- Note_how_to_clone Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_how_to_clone" label="COM_COMPONENTBUILDER_COMPONENT_PLUGINS_NOTE_HOW_TO_CLONE_LABEL" description="COM_COMPONENTBUILDER_COMPONENT_PLUGINS_NOTE_HOW_TO_CLONE_DESCRIPTION" heading="h4" class="alert alert-info note_how_to_clone" />
<!-- Addjoomla_plugins Field. Type: Subform. (joomla) -->
<field
type="subform"

View File

@@ -658,7 +658,7 @@
buttons="add,remove,move"
description="COM_COMPONENTBUILDER_JOOMLA_MODULE_FIELDS_DESCRIPTION"
icon="list"
max="50"
max="100"
nested_depth="1">
<form hidden="true" name="list_fields_modal" repeat="true">
<!-- Field Field. Type: Fields. (custom) -->

View File

@@ -537,7 +537,7 @@
buttons="add,remove,move"
description="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_FIELDS_DESCRIPTION"
icon="list"
max="50"
max="100"
nested_depth="1">
<form hidden="true" name="list_fields_modal" repeat="true">
<!-- Field Field. Type: Fields. (custom) -->

View File

@@ -112,7 +112,7 @@ class ComponentbuilderModelJoomla_plugins extends JModelList
// extract the boilerplate class comment
$class['comment'] = ComponentbuilderHelper::extractBoilerplateClassComment($fooClass, $classExtends, 'plugins');
// set the extension type
$class['target_type'] = 'plugins';
$class['extension_type'] = 'plugins';
// store the class
$this->storePluginBoilerplate($tables['e'], $models['e'], $class, $app);
// work around