added interface of the new decoupled libraries concept gh-92

This commit is contained in:
Llewellyn van der Merwe 2017-11-26 02:29:08 +02:00
parent 9760ac86a3
commit 82df61aa4a
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
174 changed files with 11626 additions and 1094 deletions

View File

@ -10,7 +10,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 safe you lots of time and money. A real must have!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.6.5) with **ALL** its features and **ALL** concepts totally open-source and free!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.6.6) 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)
@ -111,13 +111,13 @@ Component Builder is mapped as a component in itself on my local development env
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Component Builder](http://vdm.bz/component-builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 21st November, 2017
+ *Version*: 2.6.5
+ *Last Build*: 26th November, 2017
+ *Version*: 2.6.6
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
+ *Line count*: **168387**
+ *File count*: **1073**
+ *Folder count*: **176**
+ *Line count*: **178893**
+ *File count*: **1139**
+ *Folder count*: **184**
> This **component** was build with a Joomla [Automated Component Builder](http://vdm.bz/component-builder).
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)

View File

@ -10,7 +10,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 safe you lots of time and money. A real must have!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.6.5) with **ALL** its features and **ALL** concepts totally open-source and free!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.6.6) 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)
@ -111,13 +111,13 @@ Component Builder is mapped as a component in itself on my local development env
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Component Builder](http://vdm.bz/component-builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 21st November, 2017
+ *Version*: 2.6.5
+ *Last Build*: 26th November, 2017
+ *Version*: 2.6.6
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
+ *Line count*: **168387**
+ *File count*: **1073**
+ *Folder count*: **176**
+ *Line count*: **178893**
+ *File count*: **1139**
+ *Folder count*: **184**
> This **component** was build with a Joomla [Automated Component Builder](http://vdm.bz/component-builder).
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)

View File

@ -297,12 +297,34 @@
<action name="layout.submenu" title="COM_COMPONENTBUILDER_LAYOUTS_SUBMENU" description="COM_COMPONENTBUILDER_LAYOUTS_SUBMENU_DESC" />
<action name="library.access" title="COM_COMPONENTBUILDER_LIBRARIES_ACCESS" description="COM_COMPONENTBUILDER_LIBRARIES_ACCESS_DESC" />
<action name="library.batch" title="COM_COMPONENTBUILDER_LIBRARIES_BATCH_USE" description="COM_COMPONENTBUILDER_LIBRARIES_BATCH_USE_DESC" />
<action name="library_config.access" title="COM_COMPONENTBUILDER_LIBRARIES_CONFIG_ACCESS" description="COM_COMPONENTBUILDER_LIBRARIES_CONFIG_ACCESS_DESC" />
<action name="library_config.batch" title="COM_COMPONENTBUILDER_LIBRARIES_CONFIG_BATCH_USE" description="COM_COMPONENTBUILDER_LIBRARIES_CONFIG_BATCH_USE_DESC" />
<action name="library_config.create" title="COM_COMPONENTBUILDER_LIBRARIES_CONFIG_CREATE" description="COM_COMPONENTBUILDER_LIBRARIES_CONFIG_CREATE_DESC" />
<action name="library_config.delete" title="COM_COMPONENTBUILDER_LIBRARIES_CONFIG_DELETE" description="COM_COMPONENTBUILDER_LIBRARIES_CONFIG_DELETE_DESC" />
<action name="library_config.edit" title="COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT" description="COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_DESC" />
<action name="library_config.edit.created_by" title="COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_CREATED_BY" description="COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_CREATED_BY_DESC" />
<action name="library_config.edit.created" title="COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_CREATED_DATE" description="COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_CREATED_DATE_DESC" />
<action name="library_config.edit.own" title="COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_OWN" description="COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_OWN_DESC" />
<action name="library_config.edit.state" title="COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_STATE" description="COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_STATE_DESC" />
<action name="library_config.version" title="COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_VERSION" description="COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_VERSION_DESC" />
<action name="library.create" title="COM_COMPONENTBUILDER_LIBRARIES_CREATE" description="COM_COMPONENTBUILDER_LIBRARIES_CREATE_DESC" />
<action name="library.dashboard_list" title="COM_COMPONENTBUILDER_LIBRARIES_DASHBOARD_LIST" description="COM_COMPONENTBUILDER_LIBRARIES_DASHBOARD_LIST_DESC" />
<action name="library.delete" title="COM_COMPONENTBUILDER_LIBRARIES_DELETE" description="COM_COMPONENTBUILDER_LIBRARIES_DELETE_DESC" />
<action name="library.edit" title="COM_COMPONENTBUILDER_LIBRARIES_EDIT" description="COM_COMPONENTBUILDER_LIBRARIES_EDIT_DESC" />
<action name="library.edit.own" title="COM_COMPONENTBUILDER_LIBRARIES_EDIT_OWN" description="COM_COMPONENTBUILDER_LIBRARIES_EDIT_OWN_DESC" />
<action name="library.edit.state" title="COM_COMPONENTBUILDER_LIBRARIES_EDIT_STATE" description="COM_COMPONENTBUILDER_LIBRARIES_EDIT_STATE_DESC" />
<action name="library.version" title="COM_COMPONENTBUILDER_LIBRARIES_EDIT_VERSION" description="COM_COMPONENTBUILDER_LIBRARIES_EDIT_VERSION_DESC" />
<action name="library_files_folders_urls.access" title="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_ACCESS" description="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_ACCESS_DESC" />
<action name="library_files_folders_urls.batch" title="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_BATCH_USE" description="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_BATCH_USE_DESC" />
<action name="library_files_folders_urls.create" title="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_CREATE" description="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_CREATE_DESC" />
<action name="library_files_folders_urls.delete" title="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_DELETE" description="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_DELETE_DESC" />
<action name="library_files_folders_urls.edit" title="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT" description="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_DESC" />
<action name="library_files_folders_urls.edit.created_by" title="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_CREATED_BY" description="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_CREATED_BY_DESC" />
<action name="library_files_folders_urls.edit.created" title="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_CREATED_DATE" description="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_CREATED_DATE_DESC" />
<action name="library_files_folders_urls.edit.own" title="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_OWN" description="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_OWN_DESC" />
<action name="library_files_folders_urls.edit.state" title="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_STATE" description="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_STATE_DESC" />
<action name="library_files_folders_urls.version" title="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_VERSION" description="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_VERSION_DESC" />
<action name="library.submenu" title="COM_COMPONENTBUILDER_LIBRARIES_SUBMENU" description="COM_COMPONENTBUILDER_LIBRARIES_SUBMENU_DESC" />
<action name="site_view.get_snippets" title="COM_COMPONENTBUILDER_SITE_VIEW_GET_SNIPPETS_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_SITE_VIEW_GET_SNIPPETS_BUTTON_ACCESS_DESC" />
<action name="site_view.access" title="COM_COMPONENTBUILDER_SITE_VIEWS_ACCESS" description="COM_COMPONENTBUILDER_SITE_VIEWS_ACCESS_DESC" />
<action name="site_view.batch" title="COM_COMPONENTBUILDER_SITE_VIEWS_BATCH_USE" description="COM_COMPONENTBUILDER_SITE_VIEWS_BATCH_USE_DESC" />
@ -418,6 +440,15 @@
<action name="custom_code.access" title="COM_COMPONENTBUILDER_CUSTOM_CODES_ACCESS" description="COM_COMPONENTBUILDER_CUSTOM_CODES_ACCESS_DESC" />
<action name="custom_code.version" title="COM_COMPONENTBUILDER_CUSTOM_CODES_EDIT_VERSION" description="COM_COMPONENTBUILDER_CUSTOM_CODES_EDIT_VERSION_DESC" />
</section>
<section name="library">
<action name="library.edit" title="COM_COMPONENTBUILDER_LIBRARIES_EDIT" description="COM_COMPONENTBUILDER_LIBRARIES_EDIT_DESC" />
<action name="library.edit.own" title="COM_COMPONENTBUILDER_LIBRARIES_EDIT_OWN" description="COM_COMPONENTBUILDER_LIBRARIES_EDIT_OWN_DESC" />
<action name="library.edit.state" title="COM_COMPONENTBUILDER_LIBRARIES_EDIT_STATE" description="COM_COMPONENTBUILDER_LIBRARIES_EDIT_STATE_DESC" />
<action name="library.create" title="COM_COMPONENTBUILDER_LIBRARIES_CREATE" description="COM_COMPONENTBUILDER_LIBRARIES_CREATE_DESC" />
<action name="library.delete" title="COM_COMPONENTBUILDER_LIBRARIES_DELETE" description="COM_COMPONENTBUILDER_LIBRARIES_DELETE_DESC" />
<action name="library.access" title="COM_COMPONENTBUILDER_LIBRARIES_ACCESS" description="COM_COMPONENTBUILDER_LIBRARIES_ACCESS_DESC" />
<action name="library.version" title="COM_COMPONENTBUILDER_LIBRARIES_EDIT_VERSION" description="COM_COMPONENTBUILDER_LIBRARIES_EDIT_VERSION_DESC" />
</section>
<section name="snippet">
<action name="core.edit" title="COM_COMPONENTBUILDER_SNIPPETS_EDIT" description="COM_COMPONENTBUILDER_SNIPPETS_EDIT_DESC" />
<action name="core.edit.state" title="COM_COMPONENTBUILDER_SNIPPETS_EDIT_STATE" description="COM_COMPONENTBUILDER_SNIPPETS_EDIT_STATE_DESC" />
@ -619,14 +650,27 @@
<action name="snippet_type.access" title="COM_COMPONENTBUILDER_SNIPPET_TYPES_ACCESS" description="COM_COMPONENTBUILDER_SNIPPET_TYPES_ACCESS_DESC" />
<action name="snippet_type.version" title="COM_COMPONENTBUILDER_SNIPPET_TYPES_EDIT_VERSION" description="COM_COMPONENTBUILDER_SNIPPET_TYPES_EDIT_VERSION_DESC" />
</section>
<section name="library">
<action name="library.edit" title="COM_COMPONENTBUILDER_LIBRARIES_EDIT" description="COM_COMPONENTBUILDER_LIBRARIES_EDIT_DESC" />
<action name="library.edit.own" title="COM_COMPONENTBUILDER_LIBRARIES_EDIT_OWN" description="COM_COMPONENTBUILDER_LIBRARIES_EDIT_OWN_DESC" />
<action name="library.edit.state" title="COM_COMPONENTBUILDER_LIBRARIES_EDIT_STATE" description="COM_COMPONENTBUILDER_LIBRARIES_EDIT_STATE_DESC" />
<action name="library.create" title="COM_COMPONENTBUILDER_LIBRARIES_CREATE" description="COM_COMPONENTBUILDER_LIBRARIES_CREATE_DESC" />
<action name="library.delete" title="COM_COMPONENTBUILDER_LIBRARIES_DELETE" description="COM_COMPONENTBUILDER_LIBRARIES_DELETE_DESC" />
<action name="library.access" title="COM_COMPONENTBUILDER_LIBRARIES_ACCESS" description="COM_COMPONENTBUILDER_LIBRARIES_ACCESS_DESC" />
<action name="library.version" title="COM_COMPONENTBUILDER_LIBRARIES_EDIT_VERSION" description="COM_COMPONENTBUILDER_LIBRARIES_EDIT_VERSION_DESC" />
<section name="library_config">
<action name="library_config.edit" title="COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT" description="COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_DESC" />
<action name="library_config.edit.own" title="COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_OWN" description="COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_OWN_DESC" />
<action name="library_config.edit.state" title="COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_STATE" description="COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_STATE_DESC" />
<action name="library_config.edit.created_by" title="COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_CREATED_BY" description="COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_CREATED_BY_DESC" />
<action name="library_config.edit.created" title="COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_CREATED_DATE" description="COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_CREATED_DATE_DESC" />
<action name="library_config.create" title="COM_COMPONENTBUILDER_LIBRARIES_CONFIG_CREATE" description="COM_COMPONENTBUILDER_LIBRARIES_CONFIG_CREATE_DESC" />
<action name="library_config.delete" title="COM_COMPONENTBUILDER_LIBRARIES_CONFIG_DELETE" description="COM_COMPONENTBUILDER_LIBRARIES_CONFIG_DELETE_DESC" />
<action name="library_config.access" title="COM_COMPONENTBUILDER_LIBRARIES_CONFIG_ACCESS" description="COM_COMPONENTBUILDER_LIBRARIES_CONFIG_ACCESS_DESC" />
<action name="library_config.version" title="COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_VERSION" description="COM_COMPONENTBUILDER_LIBRARIES_CONFIG_EDIT_VERSION_DESC" />
</section>
<section name="library_files_folders_urls">
<action name="library_files_folders_urls.edit" title="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT" description="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_DESC" />
<action name="library_files_folders_urls.edit.own" title="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_OWN" description="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_OWN_DESC" />
<action name="library_files_folders_urls.edit.state" title="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_STATE" description="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_STATE_DESC" />
<action name="library_files_folders_urls.edit.created_by" title="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_CREATED_BY" description="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_CREATED_BY_DESC" />
<action name="library_files_folders_urls.edit.created" title="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_CREATED_DATE" description="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_CREATED_DATE_DESC" />
<action name="library_files_folders_urls.create" title="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_CREATE" description="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_CREATE_DESC" />
<action name="library_files_folders_urls.delete" title="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_DELETE" description="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_DELETE_DESC" />
<action name="library_files_folders_urls.access" title="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_ACCESS" description="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_ACCESS_DESC" />
<action name="library_files_folders_urls.version" title="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_VERSION" description="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_VERSION_DESC" />
</section>
<section name="category.fields">
<action name="core.create" title="JACTION_CREATE" description="JACTION_CREATE_COMPONENT_DESC" />

View File

@ -24,4 +24,22 @@
/* CSS Document */
#jform_snippet_chzn {
width: 100% !important;
}
.jform_snippet_input_width {
width: 90% !important;
}
#jform_main_get_chzn {
width: 100% !important;
}
.jform_main_get_input_width {
width: 90% !important;
}
#jform_dynamic_get_chzn {
width: 100% !important;
}
.jform_dynamic_get_input_width {
width: 90% !important;
}

View File

@ -24,4 +24,16 @@
/* CSS Document */
#jform_snippet_chzn {
width: 100% !important;
}
.jform_snippet_input_width {
width: 90% !important;
}
#jform_dynamic_get_chzn {
width: 100% !important;
}
.jform_dynamic_get_input_width {
width: 90% !important;
}

View File

@ -0,0 +1,27 @@
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.6.x
@created 30th April, 2015
@package Component Builder
@subpackage libraries_config.css
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
/* CSS Document */

View File

@ -0,0 +1,27 @@
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.6.x
@created 30th April, 2015
@package Component Builder
@subpackage libraries_files_folders_urls.css
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
/* CSS Document */

View File

@ -0,0 +1,27 @@
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.6.x
@created 30th April, 2015
@package Component Builder
@subpackage library_config.css
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
/* CSS Document */

View File

@ -0,0 +1,30 @@
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.6.x
@created 30th April, 2015
@package Component Builder
@subpackage library_files_folders_urls.css
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
/* CSS Document */
.control-group, .controls, .controls input[type="url"], .controls input[type="text"], .controls input[type="number"], .controls input[type="email"], .controls select, .controls textarea {
max-width: 100%;
}

View File

@ -24,4 +24,22 @@
/* CSS Document */
#jform_snippet_chzn {
width: 100% !important;
}
.jform_snippet_input_width {
width: 90% !important;
}
#jform_main_get_chzn {
width: 100% !important;
}
.jform_main_get_input_width {
width: 90% !important;
}
#jform_dynamic_get_chzn {
width: 100% !important;
}
.jform_dynamic_get_input_width {
width: 90% !important;
}

View File

@ -24,4 +24,16 @@
/* CSS Document */
#jform_snippet_chzn {
width: 100% !important;
}
.jform_snippet_input_width {
width: 90% !important;
}
#jform_dynamic_get_chzn {
width: 100% !important;
}
.jform_dynamic_get_input_width {
width: 90% !important;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -82,7 +82,7 @@ class ###Component###Model###View### extends JModelAdmin
{###LICENSE_LOCKED_CHECK###
if ($item = parent::getItem($pk))
{
if (!empty($item->params))
if (!empty($item->params) && !is_array($item->params))
{
// Convert the params field to an array.
$registry = new Registry;

View File

@ -96,6 +96,7 @@ class ComponentbuilderController extends JControllerLegacy
'layout' => 'layouts',
'dynamic_get' => 'dynamic_gets',
'custom_code' => 'custom_codes',
'library' => 'libraries',
'snippet' => 'snippets',
'field' => 'fields',
'fieldtype' => 'fieldtypes',
@ -115,7 +116,8 @@ class ComponentbuilderController extends JControllerLegacy
'component_dashboard' => 'components_dashboard',
'component_files_folders' => 'components_files_folders',
'snippet_type' => 'snippet_types',
'library' => 'libraries'
'library_config' => 'libraries_config',
'library_files_folders_urls' => 'libraries_files_folders_urls'
);
// check if this is a list view
if (in_array($view,$views))

View File

@ -52,6 +52,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
$this->registerTask('getButton', 'ajax');
$this->registerTask('getButtonID', 'ajax');
$this->registerTask('getAjaxDisplay', 'ajax');
$this->registerTask('getSnippets', 'ajax');
$this->registerTask('templateDetails', 'ajax');
$this->registerTask('getLayoutDetails', 'ajax');
$this->registerTask('dbTableColumns', 'ajax');
@ -457,6 +458,44 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
}
}
break;
case 'getSnippets':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$librariesValue = $jinput->get('libraries', NULL, 'STRING');
if($librariesValue && $user->id != 0)
{
$result = $this->getModel('ajax')->getSnippets($librariesValue);
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback."(".json_encode($e).");";
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'templateDetails':
try
{

View File

@ -0,0 +1,48 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.6.x
@created 30th April, 2015
@package Component Builder
@subpackage libraries_config.php
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import Joomla controlleradmin library
jimport('joomla.application.component.controlleradmin');
/**
* Libraries_config Controller
*/
class ComponentbuilderControllerLibraries_config extends JControllerAdmin
{
protected $text_prefix = 'COM_COMPONENTBUILDER_LIBRARIES_CONFIG';
/**
* Proxy for getModel.
* @since 2.5
*/
public function getModel($name = 'Library_config', $prefix = 'ComponentbuilderModel', $config = array())
{
$model = parent::getModel($name, $prefix, array('ignore_request' => true));
return $model;
}
}

View File

@ -0,0 +1,48 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.6.x
@created 30th April, 2015
@package Component Builder
@subpackage libraries_files_folders_urls.php
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import Joomla controlleradmin library
jimport('joomla.application.component.controlleradmin');
/**
* Libraries_files_folders_urls Controller
*/
class ComponentbuilderControllerLibraries_files_folders_urls extends JControllerAdmin
{
protected $text_prefix = 'COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS';
/**
* Proxy for getModel.
* @since 2.5
*/
public function getModel($name = 'Library_files_folders_urls', $prefix = 'ComponentbuilderModel', $config = array())
{
$model = parent::getModel($name, $prefix, array('ignore_request' => true));
return $model;
}
}

View File

@ -320,6 +320,31 @@ class ComponentbuilderControllerLibrary extends JControllerForm
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
{
// get the state object (Joomla\CMS\Object\CMSObject)
$state = $model->get('state');
// if we save2copy we need to also copy linked tables found!
if ($state->task === 'save2copy' && $state->{'library.new'})
{
// get new ID
$newID = $state->{'library.id'};
// get old ID
$oldID = $this->input->get('id', 0, 'INT');
// linked tables to update
$_tablesArray = array(
'library_config',
'library_files_folders_urls'
);
foreach($_tablesArray as $_updateTable)
{
// get the linked ID
if ($_value = ComponentbuilderHelper::getVar($_updateTable, $oldID, 'library', 'id'))
{
// copy fields to new linked table
ComponentbuilderHelper::copyItem(/*id->*/ $_value, /*table->*/ $_updateTable, /*change->*/ array('library' => $newID));
}
}
}
return;
}

View File

@ -0,0 +1,326 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.6.x
@created 30th April, 2015
@package Component Builder
@subpackage library_config.php
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import Joomla controllerform library
jimport('joomla.application.component.controllerform');
/**
* Library_config Controller
*/
class ComponentbuilderControllerLibrary_config extends JControllerForm
{
/**
* Current or most recently performed task.
*
* @var string
* @since 12.2
* @note Replaces _task.
*/
protected $task;
public function __construct($config = array())
{
$this->view_list = 'Libraries_config'; // safeguard for setting the return view listing to the main view.
parent::__construct($config);
}
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
*
* @return boolean
*
* @since 1.6
*/
protected function allowAdd($data = array())
{
// Access check.
$access = JFactory::getUser()->authorise('library_config.access', 'com_componentbuilder');
if (!$access)
{
return false;
}
// In the absense of better information, revert to the component permissions.
return JFactory::getUser()->authorise('library_config.create', $this->option);
}
/**
* Method override to check if you can edit an existing record.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
*
* @since 1.6
*/
protected function allowEdit($data = array(), $key = 'id')
{
// get user object.
$user = JFactory::getUser();
// get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// Access check.
$access = ($user->authorise('library_config.access', 'com_componentbuilder.library_config.' . (int) $recordId) && $user->authorise('library_config.access', 'com_componentbuilder'));
if (!$access)
{
return false;
}
if ($recordId)
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('library_config.edit', 'com_componentbuilder.library_config.' . (int) $recordId);
if (!$permission)
{
if ($user->authorise('library_config.edit.own', 'com_componentbuilder.library_config.' . $recordId))
{
// Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
{
return false;
}
$ownerId = $record->created_by;
}
// If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('library_config.edit.own', 'com_componentbuilder'))
{
return true;
}
}
}
return false;
}
}
// Since there is no permission, revert to the component permissions.
return $user->authorise('library_config.edit', $this->option);
}
/**
* Gets the URL arguments to append to an item redirect.
*
* @param integer $recordId The primary key id for the item.
* @param string $urlVar The name of the URL variable for the id.
*
* @return string The arguments to append to the redirect URL.
*
* @since 12.2
*/
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
{
$tmpl = $this->input->get('tmpl');
$layout = $this->input->get('layout', 'edit', 'string');
$ref = $this->input->get('ref', 0, 'string');
$refid = $this->input->get('refid', 0, 'int');
// Setup redirect info.
$append = '';
if ($refid)
{
$append .= '&ref='.(string)$ref.'&refid='.(int)$refid;
}
elseif ($ref)
{
$append .= '&ref='.(string)$ref;
}
if ($tmpl)
{
$append .= '&tmpl=' . $tmpl;
}
if ($layout)
{
$append .= '&layout=' . $layout;
}
if ($recordId)
{
$append .= '&' . $urlVar . '=' . $recordId;
}
return $append;
}
/**
* Method to run batch operations.
*
* @param object $model The model.
*
* @return boolean True if successful, false otherwise and internal error is set.
*
* @since 2.5
*/
public function batch($model = null)
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('Library_config', '', array());
// Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=libraries_config' . $this->getRedirectToListAppend(), false));
return parent::batch($model);
}
/**
* Method to cancel an edit.
*
* @param string $key The name of the primary key of the URL variable.
*
* @return boolean True if access level checks pass, false otherwise.
*
* @since 12.2
*/
public function cancel($key = null)
{
// get the referal details
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
$cancel = parent::cancel($key);
if ($cancel)
{
if ($this->refid)
{
$redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view='.(string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
}
else
{
// Redirect to the items screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . '&view=' . $this->view_list, false
)
);
}
return $cancel;
}
/**
* Method to save a record.
*
* @param string $key The name of the primary key of the URL variable.
* @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
*
* @return boolean True if successful, false otherwise.
*
* @since 12.2
*/
public function save($key = null, $urlVar = null)
{
// get the referal details
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
if ($this->ref || $this->refid)
{
// to make sure the item is checkedin on redirect
$this->task = 'save';
}
$saved = parent::save($key, $urlVar);
if ($this->refid && $saved)
{
$redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref && $saved)
{
$redirect = '&view='.(string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
return $saved;
}
/**
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param JModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 11.1
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
{
return;
}
}

View File

@ -0,0 +1,326 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.6.x
@created 30th April, 2015
@package Component Builder
@subpackage library_files_folders_urls.php
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import Joomla controllerform library
jimport('joomla.application.component.controllerform');
/**
* Library_files_folders_urls Controller
*/
class ComponentbuilderControllerLibrary_files_folders_urls extends JControllerForm
{
/**
* Current or most recently performed task.
*
* @var string
* @since 12.2
* @note Replaces _task.
*/
protected $task;
public function __construct($config = array())
{
$this->view_list = 'Libraries_files_folders_urls'; // safeguard for setting the return view listing to the main view.
parent::__construct($config);
}
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
*
* @return boolean
*
* @since 1.6
*/
protected function allowAdd($data = array())
{
// Access check.
$access = JFactory::getUser()->authorise('library_files_folders_urls.access', 'com_componentbuilder');
if (!$access)
{
return false;
}
// In the absense of better information, revert to the component permissions.
return JFactory::getUser()->authorise('library_files_folders_urls.create', $this->option);
}
/**
* Method override to check if you can edit an existing record.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
*
* @since 1.6
*/
protected function allowEdit($data = array(), $key = 'id')
{
// get user object.
$user = JFactory::getUser();
// get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// Access check.
$access = ($user->authorise('library_files_folders_urls.access', 'com_componentbuilder.library_files_folders_urls.' . (int) $recordId) && $user->authorise('library_files_folders_urls.access', 'com_componentbuilder'));
if (!$access)
{
return false;
}
if ($recordId)
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('library_files_folders_urls.edit', 'com_componentbuilder.library_files_folders_urls.' . (int) $recordId);
if (!$permission)
{
if ($user->authorise('library_files_folders_urls.edit.own', 'com_componentbuilder.library_files_folders_urls.' . $recordId))
{
// Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
{
return false;
}
$ownerId = $record->created_by;
}
// If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('library_files_folders_urls.edit.own', 'com_componentbuilder'))
{
return true;
}
}
}
return false;
}
}
// Since there is no permission, revert to the component permissions.
return $user->authorise('library_files_folders_urls.edit', $this->option);
}
/**
* Gets the URL arguments to append to an item redirect.
*
* @param integer $recordId The primary key id for the item.
* @param string $urlVar The name of the URL variable for the id.
*
* @return string The arguments to append to the redirect URL.
*
* @since 12.2
*/
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
{
$tmpl = $this->input->get('tmpl');
$layout = $this->input->get('layout', 'edit', 'string');
$ref = $this->input->get('ref', 0, 'string');
$refid = $this->input->get('refid', 0, 'int');
// Setup redirect info.
$append = '';
if ($refid)
{
$append .= '&ref='.(string)$ref.'&refid='.(int)$refid;
}
elseif ($ref)
{
$append .= '&ref='.(string)$ref;
}
if ($tmpl)
{
$append .= '&tmpl=' . $tmpl;
}
if ($layout)
{
$append .= '&layout=' . $layout;
}
if ($recordId)
{
$append .= '&' . $urlVar . '=' . $recordId;
}
return $append;
}
/**
* Method to run batch operations.
*
* @param object $model The model.
*
* @return boolean True if successful, false otherwise and internal error is set.
*
* @since 2.5
*/
public function batch($model = null)
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('Library_files_folders_urls', '', array());
// Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=libraries_files_folders_urls' . $this->getRedirectToListAppend(), false));
return parent::batch($model);
}
/**
* Method to cancel an edit.
*
* @param string $key The name of the primary key of the URL variable.
*
* @return boolean True if access level checks pass, false otherwise.
*
* @since 12.2
*/
public function cancel($key = null)
{
// get the referal details
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
$cancel = parent::cancel($key);
if ($cancel)
{
if ($this->refid)
{
$redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view='.(string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
}
else
{
// Redirect to the items screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . '&view=' . $this->view_list, false
)
);
}
return $cancel;
}
/**
* Method to save a record.
*
* @param string $key The name of the primary key of the URL variable.
* @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
*
* @return boolean True if successful, false otherwise.
*
* @since 12.2
*/
public function save($key = null, $urlVar = null)
{
// get the referal details
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
if ($this->ref || $this->refid)
{
// to make sure the item is checkedin on redirect
$this->task = 'save';
}
$saved = parent::save($key, $urlVar);
if ($this->refid && $saved)
{
$redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref && $saved)
{
$redirect = '&view='.(string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
return $saved;
}
/**
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param JModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 11.1
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
{
return;
}
}

View File

@ -245,6 +245,11 @@ abstract class ComponentbuilderHelper
return false;
}
/**
* Locked Libraries (we can not have these change)
**/
public static $libraryNames = array(1 => 'No Library', 2 => 'Bootstrap v4', 3 => 'Uikit v3', 4 => 'Uikit v2', 5 => 'FooTable v2', 6 => 'FooTable v3');
/**
* The global params
**/
@ -319,6 +324,104 @@ abstract class ComponentbuilderHelper
return array('contributor_company' => self::$localCompany['company'] ,'contributor_name' => self::$localCompany['owner'], 'contributor_email' => self::$localCompany['email'], 'contributor_website' => self::$localCompany['website'], 'origin' => 'global');
}
/**
* Get the library files
*
* @param int $id The library id to target
*
* @return array On success the contributor details
*
*/
public static function getLibraryFiles($id)
{
// get the library files, folders, and urls
$files = array();
// Get a db connection.
$db = JFactory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
$query->select($db->quoteName(array('addurls','addfolders','addfiles')));
$query->from($db->quoteName('#__componentbuilder_library_files_folders_urls'));
$query->where($db->quoteName('library') . ' = ' . (int) $id);
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
// prepare the files
$result = $db->loadObject();
// first we load the URLs
if (self::checkJson($result->addurls))
{
// convert to array
$result->addurls = json_decode($result->addurls, true);
// set urls
if (self::checkArray($result->addurls))
{
foreach($result->addurls as $url)
{
if (isset($url['url']) && isset($url['type']))
{
switch ($url['type'])
{
case 1:
// link only
$files['1'.$url['url']] = '(' . JText::_('COM_COMPONENTBUILDER_URL') . ') ' . basename($url['url']) . ' - ' . JText::_('COM_COMPONENTBUILDER_LINK');
break;
case 2:
// local
$files['2'.$url['url']] = '(' . JText::_('COM_COMPONENTBUILDER_URL') . ') ' . basename($url['url']) . ' - ' . JText::_('COM_COMPONENTBUILDER_LOCAL');
break;
case 3:
// link and local
$files['1'.$url['url']] = '(' . JText::_('COM_COMPONENTBUILDER_URL') . ') ' . basename($url['url'