Skip to content

Commit

Permalink
Release of v5.0.4-alpha2
Browse files Browse the repository at this point in the history
Remove all backward compatibility issues, so JCB will not need the [Backward Compatibility] plugin to run. Added new import powers for custom import of spreadsheets. Move the setDocument and _prepareDocument above the display in the site view and custom admin view. Update the trashhelper layout to work in Joomla 5. Add AllowDynamicProperties (Joomla 4+5) to view class to allow Custom Dynamic Get methods to work without issues.
  • Loading branch information
aB0T committed Oct 7, 2024
1 parent 8e44695 commit 4ccc352
Show file tree
Hide file tree
Showing 179 changed files with 3,024 additions and 793 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# v5.0.4-alpha1
# v5.0.4-alpha2

- Remove all backward compatibility issues, so JCB will not need the [Backward Compatibility] plugin to run.
- Added new import powers for custom import of spreadsheets.
- Move the setDocument and _prepareDocument above the display in the site view and custom admin view.
- Update the trashhelper layout to work in Joomla 5.
- Add AllowDynamicProperties (Joomla 4+5) to view class to allow Custom Dynamic Get methods to work without issues.

# v5.0.4-alpha

- Add [AllowDynamicProperties] in the base view class for J5
- Move the _prepareDocument above the display call in the base view class
Expand Down
2 changes: 1 addition & 1 deletion ComponentbuilderInstallerScript.php
Original file line number Diff line number Diff line change
Expand Up @@ -3270,7 +3270,7 @@ public function postflight(string $type, InstallerAdapter $adapter): bool
echo '<div style="background-color: #fff;" class="alert alert-info"><a target="_blank" href="https://dev.vdm.io" title="Component Builder">
<img src="components/com_componentbuilder/assets/images/vdm-component.jpg"/>
</a>
<h3>Upgrade to Version 5.0.4-alpha1 Was Successful! Let us know if anything is not working as expected.</h3></div>';
<h3>Upgrade to Version 5.0.4-alpha2 Was Successful! Let us know if anything is not working as expected.</h3></div>';

// Add/Update component in the action logs extensions table.
$this->setActionLogsExtensions();
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo

Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have!

You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (5.0.4-alpha1) with **ALL** its features and **ALL** concepts totally open-source and free!
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (5.0.4-alpha2) with **ALL** its features and **ALL** concepts totally open-source and free!

> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
Expand Down Expand Up @@ -144,14 +144,14 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:[email protected])
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 29th September, 2024
+ *Version*: 5.0.4-alpha1
+ *Last Build*: 7th October, 2024
+ *Version*: 5.0.4-alpha2
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **861215**
+ *Line count*: **868100**
+ *Field count*: **2104**
+ *File count*: **5949**
+ *Folder count*: **631**
+ *File count*: **5997**
+ *Folder count*: **633**

> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:[email protected])
Expand Down
12 changes: 6 additions & 6 deletions admin/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo

Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have!

You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (5.0.4-alpha1) with **ALL** its features and **ALL** concepts totally open-source and free!
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (5.0.4-alpha2) with **ALL** its features and **ALL** concepts totally open-source and free!

> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)

Expand Down Expand Up @@ -144,14 +144,14 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:[email protected])
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 29th September, 2024
+ *Version*: 5.0.4-alpha1
+ *Last Build*: 7th October, 2024
+ *Version*: 5.0.4-alpha2
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **861215**
+ *Line count*: **868100**
+ *Field count*: **2104**
+ *File count*: **5949**
+ *Folder count*: **631**
+ *File count*: **5997**
+ *Folder count*: **633**

> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:[email protected])
Expand Down
9 changes: 4 additions & 5 deletions admin/assets/js/get_snippets.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function getLibraries(path) {
buildLibraries(_paths);
} else {
jQuery.get(path)
.success(function(paths) {
.done(function(paths) {
// load only this library paths
jQuery.jStorage.set('JCB-Snippets-Paths', paths, {TTL: expire});
buildLibraries(paths);
Expand Down Expand Up @@ -161,7 +161,7 @@ function getSnippets(path, libraryName) {
jQuery('#snippets-github').html('<h1>'+Joomla.JText._('COM_COMPONENTBUILDER_JCB_COMMUNITY_SNIPPETS')+'</h1>');
} else {
jQuery.get(path)
.success(function(paths) {
.done(function(paths) {
// load only this library paths
jQuery.jStorage.set('JCB-Snippets-Paths', paths, {TTL: expire});
setSnippets(paths, libraryName);
Expand Down Expand Up @@ -190,7 +190,7 @@ function setSnippets(paths, libraryName) {
fromLocal = true;
} else {
jQuery.get(snippetPath+value.path)
.success(function(snippet) {
.done(function(snippet) {
// convert the string to json.object
snippet = jQuery.parseJSON(snippet);
jQuery.jStorage.set(value.path, snippet, {TTL: expire});
Expand Down Expand Up @@ -469,7 +469,7 @@ function getSnippetModal(key, type) {
showSnippetModal(_snippet, type);
} else {
jQuery.get('https://raw.githubusercontent.com/vdm-io/Joomla-Component-Builder-Snippets/master/'+key)
.success(function(snippet) {
.done(function(snippet) {
// convert the string to json.object
snippet = jQuery.parseJSON(snippet);
jQuery.jStorage.set(key, snippet, {TTL: expire});
Expand Down Expand Up @@ -527,7 +527,6 @@ function getKeyID(key) {
// return the id build
return keyID;
}

// get key ID
function getKeyID(key) {
// get useful ID
Expand Down
5 changes: 5 additions & 0 deletions admin/compiler/joomla_3/HtmlView_edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@ public function escape($var)
*/
protected function setDocument()
{
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');

$isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT'));
Html::_('stylesheet', "administrator/components/com_###component###/assets/css/###view###.css", ['version' => 'auto']);###AJAXTOKE######LINKEDVIEWTABLESCRIPTS###
Expand Down
5 changes: 5 additions & 0 deletions admin/compiler/joomla_3/HtmlView_edit_site.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ public function escape($var)
*/
protected function setDocument()
{
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');

$isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT'));
// only add the ISIS template css & js if needed (default is 1 = true)
Expand Down
5 changes: 5 additions & 0 deletions admin/compiler/joomla_3/HtmlView_list.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@ protected function addToolBar()
*/
protected function setDocument()
{
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');

if (!isset($this->document))
{
$this->document = Factory::getDocument();
Expand Down
5 changes: 3 additions & 2 deletions admin/compiler/joomla_4/ADMIN_VIEWS_HTML.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* @since 1.6
*/
#[AllowDynamicProperties]
#[\AllowDynamicProperties]
class HtmlView extends BaseHtmlView
{
/**
Expand Down Expand Up @@ -90,9 +90,10 @@ class HtmlView extends BaseHtmlView
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return void
* @throws \Exception
* @since 1.6
*/
public function display($tpl = null)
public function display($tpl = null): void
{
// Assign data to the view
$this->items = $this->get('Items');
Expand Down
5 changes: 3 additions & 2 deletions admin/compiler/joomla_4/ADMIN_VIEW_HTML.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* @since 1.6
*/
#[AllowDynamicProperties]
#[\AllowDynamicProperties]
class HtmlView extends BaseHtmlView
{
/**
Expand Down Expand Up @@ -114,9 +114,10 @@ class HtmlView extends BaseHtmlView
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return void
* @throws \Exception
* @since 1.6
*/
public function display($tpl = null)
public function display($tpl = null): void
{
// set params
$this->params = ComponentHelper::getParams('com_###component###');
Expand Down
5 changes: 3 additions & 2 deletions admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS_HTML.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* @since 1.6
*/
#[AllowDynamicProperties]
#[\AllowDynamicProperties]
class HtmlView extends BaseHtmlView
{
/**
Expand Down Expand Up @@ -66,9 +66,10 @@ class HtmlView extends BaseHtmlView
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return void
* @throws \Exception
* @since 1.6
*/
public function display($tpl = null)
public function display($tpl = null): void
{
// get component params
$this->params = ComponentHelper::getParams('com_###component###');
Expand Down
5 changes: 3 additions & 2 deletions admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW_HTML.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* @since 1.6
*/
#[AllowDynamicProperties]
#[\AllowDynamicProperties]
class HtmlView extends BaseHtmlView
{
/**
Expand All @@ -34,9 +34,10 @@ class HtmlView extends BaseHtmlView
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return void
* @throws \Exception
* @since 1.6
*/
public function display($tpl = null)
public function display($tpl = null): void
{
// get component params
$this->params = ComponentHelper::getParams('com_###component###');
Expand Down
7 changes: 5 additions & 2 deletions admin/compiler/joomla_4/DASH_VIEW_HTML.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,17 @@
*
* @since 1.6
*/
#[AllowDynamicProperties]
#[\AllowDynamicProperties]
class HtmlView extends BaseHtmlView
{
/**
* View display method
*
* @return void
* @throws \Exception
* @since 1.6
*/
function display($tpl = null)
function display($tpl = null): void
{
// Assign data to the view
$this->icons = $this->get('Icons');
Expand Down
3 changes: 2 additions & 1 deletion admin/compiler/joomla_4/SITE_VIEWS_HTML.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,10 @@ class HtmlView extends BaseHtmlView
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return void
* @throws \Exception
* @since 1.6
*/
public function display($tpl = null)
public function display($tpl = null): void
{
// get combined params of both component and menu
$this->app ??= Factory::getApplication();
Expand Down
3 changes: 2 additions & 1 deletion admin/compiler/joomla_4/SITE_VIEW_HTML.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@ class HtmlView extends BaseHtmlView
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return void
* @throws \Exception
* @since 1.6
*/
public function display($tpl = null)
public function display($tpl = null): void
{
// get combined params of both component and menu
$this->app ??= Factory::getApplication();
Expand Down
8 changes: 7 additions & 1 deletion admin/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
buttons="add,remove,move"
description="COM_COMPONENTBUILDER_CONFIG_SUBFORM_LAYOUTS_DESCRIPTION"
icon="list"
max="9"
max="10"
min="1">
<form hidden="true" name="list_subform_layouts_modal" repeat="true">
<!-- View_field Field. Type: List. (joomla) -->
Expand All @@ -73,6 +73,8 @@
<!-- Option Set. -->
<option value="default">
COM_COMPONENTBUILDER_CONFIG_DEFAULT</option>
<option value="admin_view.ajax_input">
COM_COMPONENTBUILDER_CONFIG_ADMIN_VIEWS_AJAX_INPUT</option>
<option value="admin_custom_tabs.tabs">
COM_COMPONENTBUILDER_CONFIG_ADMIN_CUSTOM_TABS_TABS</option>
<option value="admin_fields.addfields">
Expand All @@ -93,6 +95,8 @@
COM_COMPONENTBUILDER_CONFIG_COMPONENT_CUSTOM_ADMIN_MENUS_ADDCUSTOMMENUS</option>
<option value="component_site_views.addsite_views">
COM_COMPONENTBUILDER_CONFIG_COMPONENT_SITE_VIEWS_ADDSITE_VIEWS</option>
<option value="custom_admin_view.ajax_input">
COM_COMPONENTBUILDER_CONFIG_CUSTOM_ADMIN_VIEWS_AJAX_INPUT</option>
<option value="dynamic_get.join_db_table">
COM_COMPONENTBUILDER_CONFIG_DYNAMIC_GET_JOIN_DB_TABLE</option>
<option value="dynamic_get.join_view_table">
Expand All @@ -103,6 +107,8 @@
COM_COMPONENTBUILDER_CONFIG_JOOMLA_MODULE_UPDATES_VERSION_UPDATE</option>
<option value="joomla_plugin_updates.version_update">
COM_COMPONENTBUILDER_CONFIG_JOOMLA_PLUGIN_UPDATES_VERSION_UPDATE</option>
<option value="site_view.ajax_input">
COM_COMPONENTBUILDER_CONFIG_SITE_VIEWS_AJAX_INPUT</option>
</field>
<!-- Layout Field. Type: List. (joomla) -->
<field
Expand Down
4 changes: 3 additions & 1 deletion admin/language/en-GB/en-GB.com_componentbuilder.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3345,6 +3345,7 @@ COM_COMPONENTBUILDER_CONFIG_ADMIN_CUSTOM_TABS_TABS="Admin Custom Tabs (tabs)"
COM_COMPONENTBUILDER_CONFIG_ADMIN_FIELDS_ADDFIELDS="Admin Fields (addfields)"
COM_COMPONENTBUILDER_CONFIG_ADMIN_FIELDS_CONDITIONS_ADDCONDITIONS="Admin Fields Conditions (addconditions)"
COM_COMPONENTBUILDER_CONFIG_ADMIN_FIELDS_RELATIONS_ADDRELATIONS="Admin Fields Relations (addrelations)"
COM_COMPONENTBUILDER_CONFIG_ADMIN_VIEWS_AJAX_INPUT="Admin Views (ajax_input)"
COM_COMPONENTBUILDER_CONFIG_ALMOST_FLAT_LOAD="Almost Flat"
COM_COMPONENTBUILDER_CONFIG_ALPHANUMERIC="Alphanumeric"
COM_COMPONENTBUILDER_CONFIG_ALPHANUMERICDOT="Alphanumeric+dot"
Expand Down Expand Up @@ -3411,6 +3412,7 @@ COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_SERVER_DESCRIPTION="Select your backu
COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_SERVER_LABEL="Cronjob Backup Server"
COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_TYPE_DESCRIPTION="Select how you would like to backup JCB"
COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_TYPE_LABEL="Cronjob Backup type"
COM_COMPONENTBUILDER_CONFIG_CUSTOM_ADMIN_VIEWS_AJAX_INPUT="Custom Admin Views (ajax_input)"
COM_COMPONENTBUILDER_CONFIG_CUSTOM_FOLDER_PATH_DESCRIPTION="Here you can set the path to the custom folder"
COM_COMPONENTBUILDER_CONFIG_CUSTOM_FOLDER_PATH_HINT="/home/user/custom"
COM_COMPONENTBUILDER_CONFIG_CUSTOM_FOLDER_PATH_LABEL="Custom Folder Path"
Expand Down Expand Up @@ -3612,6 +3614,7 @@ COM_COMPONENTBUILDER_CONFIG_SET_BROWSER_STORAGE_LABEL="Browser Storage"
COM_COMPONENTBUILDER_CONFIG_SHOW="Show"
COM_COMPONENTBUILDER_CONFIG_SHOW_ALL="Show All"
COM_COMPONENTBUILDER_CONFIG_SIMPLEXMLELEMENT_CLASS="SimpleXMLElement Class"
COM_COMPONENTBUILDER_CONFIG_SITE_VIEWS_AJAX_INPUT="Site Views (ajax_input)"
COM_COMPONENTBUILDER_CONFIG_SMTP="SMTP"
COM_COMPONENTBUILDER_CONFIG_SMTPAUTH_DESCRIPTION="Select yes if your SMTP host requires SMTP Authentication."
COM_COMPONENTBUILDER_CONFIG_SMTPAUTH_LABEL="SMTP Authentication"
Expand Down Expand Up @@ -7610,7 +7613,6 @@ COM_COMPONENTBUILDER_ONLY_ONE_COMPONENT_CAN_BE_CLONED_AT_A_TIME_PLEASE_SELECT_ON
COM_COMPONENTBUILDER_ONLY_SZIP_FILE_WAS_REMOVED_THE_FROM_TMP_FOLDER_DURING_INSTALLATION="Only (%s.zip) file was removed the from tmp folder during installation!"
COM_COMPONENTBUILDER_ONLY_USE_THE_BNONE_DBB_OPTION_IF_YOU_ARE_PLANNING_ON_TARGETING_THIS_FIELD_WITH_JAVASCRIPTCUSTOM_PHP_TO_MOVE_ITS_VALUE_INTO_ANOTHER_FIELD_THAT_DOES_GET_SAVED_TO_THE_DATABASE="Only use the <b>None DB</b> option if you are planning on targeting this field with JavaScript/Custom PHP to move its value into another field that does get saved to the database."
COM_COMPONENTBUILDER_OPEN_LIBRARY_SNIPPETS="Open Library Snippets"
COM_COMPONENTBUILDER_OPTIONS="Options"
COM_COMPONENTBUILDER_ORDER_BEFORE="Order Before"
COM_COMPONENTBUILDER_ORDER_IN_EDIT="Order in Edit"
COM_COMPONENTBUILDER_ORDER_IN_LIST_VIEWS="Order in list views"
Expand Down
Loading

0 comments on commit 4ccc352

Please sign in to comment.