Release of v3.2.5-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.
This commit is contained in:
Robot 2024-10-08 00:31:55 +02:00
parent c75883fb8f
commit ce55b353ec
Signed by: Robot
GPG Key ID: 14DECD44E7E1BB95
1311 changed files with 127169 additions and 46070 deletions

View File

@ -1,4 +1,12 @@
# v3.2.5-alpha1 # v3.2.5-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.
# v3.2.5-alpha
- Add [AllowDynamicProperties] in the base view class for J5 - Add [AllowDynamicProperties] in the base view class for J5
- Move the _prepareDocument above the display call in the base view class - Move the _prepareDocument above the display call in the base view class

View File

@ -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! 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 (3.2.5-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 (3.2.5-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) > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
@ -144,13 +144,13 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder) + *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
+ *First Build*: 30th April, 2015 + *First Build*: 30th April, 2015
+ *Last Build*: 29th September, 2024 + *Last Build*: 7th October, 2024
+ *Version*: 3.2.5-alpha1 + *Version*: 3.2.5-alpha2
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt + *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **853809** + *Line count*: **857064**
+ *Field count*: **2098** + *Field count*: **2098**
+ *File count*: **5807** + *File count*: **5808**
+ *Folder count*: **505** + *Folder count*: **505**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com). > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com).

View File

@ -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! 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 (3.2.5-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 (3.2.5-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) > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
@ -144,13 +144,13 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder) + *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
+ *First Build*: 30th April, 2015 + *First Build*: 30th April, 2015
+ *Last Build*: 29th September, 2024 + *Last Build*: 7th October, 2024
+ *Version*: 3.2.5-alpha1 + *Version*: 3.2.5-alpha2
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt + *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **853809** + *Line count*: **857064**
+ *Field count*: **2098** + *Field count*: **2098**
+ *File count*: **5807** + *File count*: **5808**
+ *Folder count*: **505** + *Folder count*: **505**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com). > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com).

View File

@ -113,6 +113,11 @@ class ###Component###View###View### extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1); $isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT')); $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### Html::_('stylesheet', "administrator/components/com_###component###/assets/css/###view###.css", ['version' => 'auto']);###AJAXTOKE######LINKEDVIEWTABLESCRIPTS###

View File

@ -114,6 +114,11 @@ class ###Component###View###View### extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1); $isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT')); $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) // only add the ISIS template css & js if needed (default is 1 = true)

View File

@ -151,6 +151,11 @@ class ###Component###View###Views### extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
if (!isset($this->document)) if (!isset($this->document))
{ {
$this->document = Factory::getDocument(); $this->document = Factory::getDocument();

View File

@ -25,7 +25,7 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator
* *
* @since 1.6 * @since 1.6
*/ */
#[AllowDynamicProperties] #[\AllowDynamicProperties]
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/** /**
@ -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. * @param string $tpl The name of the template file to parse; automatically searches through the template paths.
* *
* @return void * @return void
* @throws \Exception
* @since 1.6 * @since 1.6
*/ */
public function display($tpl = null) public function display($tpl = null): void
{ {
// Assign data to the view // Assign data to the view
$this->items = $this->get('Items'); $this->items = $this->get('Items');

View File

@ -25,7 +25,7 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator
* *
* @since 1.6 * @since 1.6
*/ */
#[AllowDynamicProperties] #[\AllowDynamicProperties]
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/** /**
@ -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. * @param string $tpl The name of the template file to parse; automatically searches through the template paths.
* *
* @return void * @return void
* @throws \Exception
* @since 1.6 * @since 1.6
*/ */
public function display($tpl = null) public function display($tpl = null): void
{ {
// set params // set params
$this->params = ComponentHelper::getParams('com_###component###'); $this->params = ComponentHelper::getParams('com_###component###');

View File

@ -25,7 +25,7 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator
* *
* @since 1.6 * @since 1.6
*/ */
#[AllowDynamicProperties] #[\AllowDynamicProperties]
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/** /**
@ -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. * @param string $tpl The name of the template file to parse; automatically searches through the template paths.
* *
* @return void * @return void
* @throws \Exception
* @since 1.6 * @since 1.6
*/ */
public function display($tpl = null) public function display($tpl = null): void
{ {
// get component params // get component params
$this->params = ComponentHelper::getParams('com_###component###'); $this->params = ComponentHelper::getParams('com_###component###');

View File

@ -25,7 +25,7 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator
* *
* @since 1.6 * @since 1.6
*/ */
#[AllowDynamicProperties] #[\AllowDynamicProperties]
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/** /**
@ -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. * @param string $tpl The name of the template file to parse; automatically searches through the template paths.
* *
* @return void * @return void
* @throws \Exception
* @since 1.6 * @since 1.6
*/ */
public function display($tpl = null) public function display($tpl = null): void
{ {
// get component params // get component params
$this->params = ComponentHelper::getParams('com_###component###'); $this->params = ComponentHelper::getParams('com_###component###');

View File

@ -25,14 +25,17 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator
* *
* @since 1.6 * @since 1.6
*/ */
#[AllowDynamicProperties] #[\AllowDynamicProperties]
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/** /**
* View display method * View display method
*
* @return void * @return void
* @throws \Exception
* @since 1.6
*/ */
function display($tpl = null) function display($tpl = null): void
{ {
// Assign data to the view // Assign data to the view
$this->icons = $this->get('Icons'); $this->icons = $this->get('Icons');

View File

@ -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. * @param string $tpl The name of the template file to parse; automatically searches through the template paths.
* *
* @return void * @return void
* @throws \Exception
* @since 1.6 * @since 1.6
*/ */
public function display($tpl = null) public function display($tpl = null): void
{ {
// get combined params of both component and menu // get combined params of both component and menu
$this->app ??= Factory::getApplication(); $this->app ??= Factory::getApplication();

View File

@ -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. * @param string $tpl The name of the template file to parse; automatically searches through the template paths.
* *
* @return void * @return void
* @throws \Exception
* @since 1.6 * @since 1.6
*/ */
public function display($tpl = null) public function display($tpl = null): void
{ {
// get combined params of both component and menu // get combined params of both component and menu
$this->app ??= Factory::getApplication(); $this->app ??= Factory::getApplication();

View File

@ -57,7 +57,7 @@
buttons="add,remove,move" buttons="add,remove,move"
description="COM_COMPONENTBUILDER_CONFIG_SUBFORM_LAYOUTS_DESCRIPTION" description="COM_COMPONENTBUILDER_CONFIG_SUBFORM_LAYOUTS_DESCRIPTION"
icon="list" icon="list"
max="9" max="10"
min="1"> min="1">
<form hidden="true" name="list_subform_layouts_modal" repeat="true"> <form hidden="true" name="list_subform_layouts_modal" repeat="true">
<!-- View_field Field. Type: List. (joomla) --> <!-- View_field Field. Type: List. (joomla) -->
@ -73,6 +73,8 @@
<!-- Option Set. --> <!-- Option Set. -->
<option value="default"> <option value="default">
COM_COMPONENTBUILDER_CONFIG_DEFAULT</option> 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"> <option value="admin_custom_tabs.tabs">
COM_COMPONENTBUILDER_CONFIG_ADMIN_CUSTOM_TABS_TABS</option> COM_COMPONENTBUILDER_CONFIG_ADMIN_CUSTOM_TABS_TABS</option>
<option value="admin_fields.addfields"> <option value="admin_fields.addfields">
@ -93,6 +95,8 @@
COM_COMPONENTBUILDER_CONFIG_COMPONENT_CUSTOM_ADMIN_MENUS_ADDCUSTOMMENUS</option> COM_COMPONENTBUILDER_CONFIG_COMPONENT_CUSTOM_ADMIN_MENUS_ADDCUSTOMMENUS</option>
<option value="component_site_views.addsite_views"> <option value="component_site_views.addsite_views">
COM_COMPONENTBUILDER_CONFIG_COMPONENT_SITE_VIEWS_ADDSITE_VIEWS</option> 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"> <option value="dynamic_get.join_db_table">
COM_COMPONENTBUILDER_CONFIG_DYNAMIC_GET_JOIN_DB_TABLE</option> COM_COMPONENTBUILDER_CONFIG_DYNAMIC_GET_JOIN_DB_TABLE</option>
<option value="dynamic_get.join_view_table"> <option value="dynamic_get.join_view_table">
@ -103,6 +107,8 @@
COM_COMPONENTBUILDER_CONFIG_JOOMLA_MODULE_UPDATES_VERSION_UPDATE</option> COM_COMPONENTBUILDER_CONFIG_JOOMLA_MODULE_UPDATES_VERSION_UPDATE</option>
<option value="joomla_plugin_updates.version_update"> <option value="joomla_plugin_updates.version_update">
COM_COMPONENTBUILDER_CONFIG_JOOMLA_PLUGIN_UPDATES_VERSION_UPDATE</option> COM_COMPONENTBUILDER_CONFIG_JOOMLA_PLUGIN_UPDATES_VERSION_UPDATE</option>
<option value="site_view.ajax_input">
COM_COMPONENTBUILDER_CONFIG_SITE_VIEWS_AJAX_INPUT</option>
</field> </field>
<!-- Layout Field. Type: List. (joomla) --> <!-- Layout Field. Type: List. (joomla) -->
<field <field

View File

@ -136,7 +136,7 @@ class ComponentbuilderControllerSnippets extends AdminController
$input = Factory::getApplication()->input; $input = Factory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array'); $pks = $input->post->get('cid', array(), 'array');
// Sanitize the input // Sanitize the input
JArrayHelper::toInteger($pks); ArrayHelper::toInteger($pks);
// check if there is any selections // check if there is any selections
if (!UtilitiesArrayHelper::check($pks)) if (!UtilitiesArrayHelper::check($pks))
{ {

View File

@ -3298,6 +3298,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_ADDFIELDS="Admin Fields (addfields)"
COM_COMPONENTBUILDER_CONFIG_ADMIN_FIELDS_CONDITIONS_ADDCONDITIONS="Admin Fields Conditions (addconditions)" 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_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_ALMOST_FLAT_LOAD="Almost Flat"
COM_COMPONENTBUILDER_CONFIG_ALPHANUMERIC="Alphanumeric" COM_COMPONENTBUILDER_CONFIG_ALPHANUMERIC="Alphanumeric"
COM_COMPONENTBUILDER_CONFIG_ALPHANUMERICDOT="Alphanumeric+dot" COM_COMPONENTBUILDER_CONFIG_ALPHANUMERICDOT="Alphanumeric+dot"
@ -3364,6 +3365,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_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_DESCRIPTION="Select how you would like to backup JCB"
COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_TYPE_LABEL="Cronjob Backup type" 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_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_HINT="/home/user/custom"
COM_COMPONENTBUILDER_CONFIG_CUSTOM_FOLDER_PATH_LABEL="Custom Folder Path" COM_COMPONENTBUILDER_CONFIG_CUSTOM_FOLDER_PATH_LABEL="Custom Folder Path"
@ -3565,6 +3567,7 @@ COM_COMPONENTBUILDER_CONFIG_SET_BROWSER_STORAGE_LABEL="Browser Storage"
COM_COMPONENTBUILDER_CONFIG_SHOW="Show" COM_COMPONENTBUILDER_CONFIG_SHOW="Show"
COM_COMPONENTBUILDER_CONFIG_SHOW_ALL="Show All" COM_COMPONENTBUILDER_CONFIG_SHOW_ALL="Show All"
COM_COMPONENTBUILDER_CONFIG_SIMPLEXMLELEMENT_CLASS="SimpleXMLElement Class" 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_SMTP="SMTP"
COM_COMPONENTBUILDER_CONFIG_SMTPAUTH_DESCRIPTION="Select yes if your SMTP host requires SMTP Authentication." COM_COMPONENTBUILDER_CONFIG_SMTPAUTH_DESCRIPTION="Select yes if your SMTP host requires SMTP Authentication."
COM_COMPONENTBUILDER_CONFIG_SMTPAUTH_LABEL="SMTP Authentication" COM_COMPONENTBUILDER_CONFIG_SMTPAUTH_LABEL="SMTP Authentication"
@ -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_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_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_OPEN_LIBRARY_SNIPPETS="Open Library Snippets"
COM_COMPONENTBUILDER_OPTIONS="Options"
COM_COMPONENTBUILDER_ORDER_BEFORE="Order Before" COM_COMPONENTBUILDER_ORDER_BEFORE="Order Before"
COM_COMPONENTBUILDER_ORDER_IN_EDIT="Order in Edit" COM_COMPONENTBUILDER_ORDER_IN_EDIT="Order in Edit"
COM_COMPONENTBUILDER_ORDER_IN_LIST_VIEWS="Order in list views" COM_COMPONENTBUILDER_ORDER_IN_LIST_VIEWS="Order in list views"

View File

@ -799,6 +799,9 @@ class ComponentbuilderModelAdmin_view extends AdminModel
} }
} }
// update the ajax_input (sub form) layout
$form->setFieldAttribute('ajax_input', 'layout', ComponentbuilderHelper::getSubformLayout('admin_view', 'ajax_input'));
// update all editors to use this components global editor // update all editors to use this components global editor
$global_editor = ComponentHelper::getParams('com_componentbuilder')->get('editor', 'none'); $global_editor = ComponentHelper::getParams('com_componentbuilder')->get('editor', 'none');
// now get all the editor fields // now get all the editor fields

View File

@ -21,6 +21,10 @@ use Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Componentbuilder\Compiler\Helper\Compiler; use VDM\Joomla\Componentbuilder\Compiler\Helper\Compiler;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\JsonHelper; use VDM\Joomla\Utilities\JsonHelper;
use Joomla\CMS\Filesystem\Folder;
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Installer\InstallerHelper;
use Joomla\CMS\Installer\Installer;
/** /**
* Componentbuilder List Model for Compiler * Componentbuilder List Model for Compiler
@ -162,7 +166,7 @@ class ComponentbuilderModelCompiler extends ListModel
jimport('joomla.filesystem.folder'); jimport('joomla.filesystem.folder');
jimport('joomla.filesystem.file'); jimport('joomla.filesystem.file');
if (JFolder::exists($dir)) if (is_dir($dir))
{ {
$it = new RecursiveDirectoryIterator($dir); $it = new RecursiveDirectoryIterator($dir);
$it = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::CHILD_FIRST); $it = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::CHILD_FIRST);
@ -171,19 +175,19 @@ class ComponentbuilderModelCompiler extends ListModel
if ('.' === $file->getBasename() || '..' === $file->getBasename()) continue; if ('.' === $file->getBasename() || '..' === $file->getBasename()) continue;
if ($file->isDir()) if ($file->isDir())
{ {
JFolder::delete($file->getPathname()); Folder::delete($file->getPathname());
} }
else else
{ {
if ($file->getBasename() !== 'index.html') if ($file->getBasename() !== 'index.html')
{ {
JFile::delete($file->getPathname()); File::delete($file->getPathname());
} }
} }
} }
if ($removeDir) if ($removeDir)
{ {
if (JFolder::delete($dir)) if (Folder::delete($dir))
{ {
return true; return true;
} }
@ -228,7 +232,7 @@ class ComponentbuilderModelCompiler extends ListModel
$tmp_dest = $config->get('tmp_path'); $tmp_dest = $config->get('tmp_path');
// Unpack the downloaded package file. // Unpack the downloaded package file.
$package = JInstallerHelper::unpack($tmp_dest . '/' . $p_file, true); $package = InstallerHelper::unpack($tmp_dest . '/' . $p_file, true);
// insure the install type is folder (JCB zip file is in the folder) // insure the install type is folder (JCB zip file is in the folder)
$installType = 'folder'; $installType = 'folder';
@ -253,7 +257,7 @@ class ComponentbuilderModelCompiler extends ListModel
} }
// Get an installer instance. // Get an installer instance.
$installer = JInstaller::getInstance(); $installer = Installer::getInstance();
// Install the package. // Install the package.
if (!$installer->install($package['dir'])) if (!$installer->install($package['dir']))
@ -290,7 +294,7 @@ class ComponentbuilderModelCompiler extends ListModel
$package['packagefile'] = $config->get('tmp_path') . '/' . $package['packagefile']; $package['packagefile'] = $config->get('tmp_path') . '/' . $package['packagefile'];
} }
JInstallerHelper::cleanupInstall($package['packagefile'], $package['extractdir']); InstallerHelper::cleanupInstall($package['packagefile'], $package['extractdir']);
// Clear the cached extension data and menu cache // Clear the cached extension data and menu cache
$this->cleanCache('_system', 0); $this->cleanCache('_system', 0);

View File

@ -503,6 +503,9 @@ class ComponentbuilderModelCustom_admin_view extends AdminModel
} }
} }
// update the ajax_input (sub form) layout
$form->setFieldAttribute('ajax_input', 'layout', ComponentbuilderHelper::getSubformLayout('custom_admin_view', 'ajax_input'));
// update all editors to use this components global editor // update all editors to use this components global editor
$global_editor = ComponentHelper::getParams('com_componentbuilder')->get('editor', 'none'); $global_editor = ComponentHelper::getParams('com_componentbuilder')->get('editor', 'none');
// now get all the editor fields // now get all the editor fields

View File

@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory; use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text; use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Filesystem\Folder;
// import the list field type // import the list field type
jimport('joomla.form.helper'); jimport('joomla.form.helper');
@ -44,12 +45,12 @@ class JFormFieldCustomfilelist extends JFormFieldList
// set the default // set the default
$options[] = Html::_('select.option', '', Text::sprintf('COM_COMPONENTBUILDER_PLEASE_ADD_FILES_TO_S',$localfolder)); $options[] = Html::_('select.option', '', Text::sprintf('COM_COMPONENTBUILDER_PLEASE_ADD_FILES_TO_S',$localfolder));
// setup the folder if it does not exist // setup the folder if it does not exist
if (!\JFolder::exists($localfolder)) if (!is_dir($localfolder))
{ {
\JFolder::create($localfolder); Folder::create($localfolder);
} }
// now check if there are files in the folder // now check if there are files in the folder
if ($files = \JFolder::files($localfolder)) if ($files = Folder::files($localfolder))
{ {
$options = array(); $options = array();
foreach ($files as $file) foreach ($files as $file)

View File

@ -201,7 +201,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
// set auto loader // set auto loader
ComponentbuilderHelper::autoLoader('smart'); ComponentbuilderHelper::autoLoader('smart');
// get install folder // get install folder
$dir = JFile::stripExt($package['dir']); $dir = File::stripExt($package['dir']);
// remove unziped folder // remove unziped folder
ComponentbuilderHelper::removeFolder($dir); ComponentbuilderHelper::removeFolder($dir);
} }
@ -307,7 +307,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
// set auto loader // set auto loader
ComponentbuilderHelper::autoLoader('smart'); ComponentbuilderHelper::autoLoader('smart');
// extract the package // extract the package
if (JFile::exists($package['dir'])) if (is_file($package['dir']))
{ {
// does this package pass a checksum // does this package pass a checksum
$checksum = false; $checksum = false;
@ -355,12 +355,12 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
// get the zip adapter // get the zip adapter
$zip = JArchive::getAdapter('zip'); $zip = JArchive::getAdapter('zip');
// set the directory name // set the directory name
$this->dir = JFile::stripExt($package['dir']); $this->dir = File::stripExt($package['dir']);
// unzip the package // unzip the package
$zip->extract($package['dir'], $this->dir); $zip->extract($package['dir'], $this->dir);
// check for database file // check for database file
$infoFile = $this->dir . '/info.vdm'; $infoFile = $this->dir . '/info.vdm';
if (JFile::exists($infoFile)) if (is_file($infoFile))
{ {
// load the data // load the data
if ($info = FileHelper::getContent($infoFile)) if ($info = FileHelper::getContent($infoFile))
@ -631,13 +631,13 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
// set auto loader // set auto loader
ComponentbuilderHelper::autoLoader('smart'); ComponentbuilderHelper::autoLoader('smart');
// extract the package // extract the package
if (JFile::exists($package['dir'])) if (is_file($package['dir']))
{ {
// set the directory name // set the directory name
$this->dir = JFile::stripExt($package['dir']); $this->dir = File::stripExt($package['dir']);
// check for database file // check for database file
$dbFile = $this->dir . '/db.vdm'; $dbFile = $this->dir . '/db.vdm';
if (!JFile::exists($dbFile)) if (!is_file($dbFile))
{ {
// get the zip adapter // get the zip adapter
$zip = JArchive::getAdapter('zip'); $zip = JArchive::getAdapter('zip');
@ -645,7 +645,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
$zip->extract($package['dir'], $this->dir); $zip->extract($package['dir'], $this->dir);
} }
// check again // check again
if (JFile::exists($dbFile)) if (is_file($dbFile))
{ {
// load the data // load the data
if ($data = FileHelper::getContent($dbFile)) if ($data = FileHelper::getContent($dbFile))
@ -938,10 +938,10 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
$success = true; $success = true;
// check if we have custom files // check if we have custom files
$customDir = str_replace('//', '/', $this->dir . '/custom'); $customDir = str_replace('//', '/', $this->dir . '/custom');
if (JFolder::exists($customDir)) if (is_dir($customDir))
{ {
// great we have some custom stuff lets move it // great we have some custom stuff lets move it
if (!JFolder::copy($customDir, $customPath,'',true)) if (!Folder::copy($customDir, $customPath,'',true))
{ {
$this->app->enqueueMessage(Text::_('COM_COMPONENTBUILDER_BCUSTOM_FILESB_NOT_MOVED_TO_CORRECT_LOCATION'), 'error'); $this->app->enqueueMessage(Text::_('COM_COMPONENTBUILDER_BCUSTOM_FILESB_NOT_MOVED_TO_CORRECT_LOCATION'), 'error');
$success = false; $success = false;
@ -954,10 +954,10 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
} }
// check if we have images // check if we have images
$imageDir = str_replace('//', '/', $this->dir . '/images'); $imageDir = str_replace('//', '/', $this->dir . '/images');
if (JFolder::exists($imageDir)) if (is_dir($imageDir))
{ {
// great we have some images lets move them // great we have some images lets move them
if (!JFolder::copy($imageDir, $imagesPath,'',true)) if (!Folder::copy($imageDir, $imagesPath,'',true))
{ {
$this->app->enqueueMessage(Text::_('COM_COMPONENTBUILDER_BIMAGESB_NOT_MOVED_TO_CORRECT_LOCATION'), 'error'); $this->app->enqueueMessage(Text::_('COM_COMPONENTBUILDER_BIMAGESB_NOT_MOVED_TO_CORRECT_LOCATION'), 'error');
$success = false; $success = false;
@ -970,10 +970,10 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
} }
// now move the dynamic files if found // now move the dynamic files if found
$dynamicDir = str_replace('//', '/', $this->dir . '/dynamic'); $dynamicDir = str_replace('//', '/', $this->dir . '/dynamic');
if (JFolder::exists($dynamicDir)) if (is_dir($dynamicDir))
{ {
// get a list of folders // get a list of folders
$folders = JFolder::folders($dynamicDir); $folders = Folder::folders($dynamicDir);
// check if we have files // check if we have files
if(UtilitiesArrayHelper::check($folders)) if(UtilitiesArrayHelper::check($folders))
{ {
@ -981,7 +981,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
{ {
$destination = $this->setDynamicPath($folder); $destination = $this->setDynamicPath($folder);
$fullPath = str_replace('//', '/', $dynamicDir . '/' . $folder); $fullPath = str_replace('//', '/', $dynamicDir . '/' . $folder);
if (!JFolder::exists($fullPath) || !JFolder::copy($fullPath, $destination,'',true)) if (!is_dir($fullPath) || !Folder::copy($fullPath, $destination,'',true))
{ {
$this->app->enqueueMessage(Text::sprintf('COM_COMPONENTBUILDER_FOLDER_BSB_WAS_NOT_MOVED_TO_BSB', $folder, $destination), 'error'); $this->app->enqueueMessage(Text::sprintf('COM_COMPONENTBUILDER_FOLDER_BSB_WAS_NOT_MOVED_TO_BSB', $folder, $destination), 'error');
$success = false; $success = false;
@ -994,7 +994,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
} }
} }
// get a list of files // get a list of files
$files = JFolder::files($dynamicDir); $files = Folder::files($dynamicDir);
// check if we have files // check if we have files
if(UtilitiesArrayHelper::check($files)) if(UtilitiesArrayHelper::check($files))
{ {
@ -1002,7 +1002,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
{ {
$destination = $this->setDynamicPath($file); $destination = $this->setDynamicPath($file);
$fullPath = str_replace('//', '/', $dynamicDir . '/' . $file); $fullPath = str_replace('//', '/', $dynamicDir . '/' . $file);
if (!JFile::exists($fullPath) || !JFile::copy($fullPath, $destination)) if (!is_file($fullPath) || !File::copy($fullPath, $destination))
{ {
$this->app->enqueueMessage(Text::sprintf('COM_COMPONENTBUILDER_FILE_BSB_WAS_NOT_MOVED_TO_BSB', $file, $destination), 'error'); $this->app->enqueueMessage(Text::sprintf('COM_COMPONENTBUILDER_FILE_BSB_WAS_NOT_MOVED_TO_BSB', $file, $destination), 'error');
$success = false; $success = false;
@ -1037,7 +1037,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
{ {
$subPath = str_replace('//', '/', $this->dir . '/' . $folder); $subPath = str_replace('//', '/', $this->dir . '/' . $folder);
// go to the package sub folder if found // go to the package sub folder if found
if (JFolder::exists($subPath)) if (is_dir($subPath))
{ {
$this->unLockFile($subPath); $this->unLockFile($subPath);
} }
@ -1057,7 +1057,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
// we are changing the working directory to the tmp path (important) // we are changing the working directory to the tmp path (important)
chdir($tmpPath); chdir($tmpPath);
// get a list of files in the current directory tree (all) // get a list of files in the current directory tree (all)
$files = JFolder::files('.', '.', true, true); $files = Folder::files('.', '.', true, true);
// read in the file content // read in the file content
foreach ($files as $file) foreach ($files as $file)
{ {

View File

@ -28,6 +28,8 @@ use VDM\Joomla\Utilities\Base64Helper;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\StringHelper; use VDM\Joomla\Utilities\StringHelper;
use VDM\Joomla\FOF\Encrypt\AES; use VDM\Joomla\FOF\Encrypt\AES;
use Joomla\CMS\Filesystem\Folder;
use Joomla\CMS\Filesystem\File;
/** /**
* Joomla_components List Model * Joomla_components List Model
@ -205,7 +207,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
} }
// create the folders // create the folders
JFolder::create($this->packagePath); Folder::create($this->packagePath);
// update $pks with returned IDs // update $pks with returned IDs
$pks = array(); $pks = array();
@ -1347,10 +1349,10 @@ class ComponentbuilderModelJoomla_components extends ListModel
$this->lockFiles(); $this->lockFiles();
// remove old zip files with the same name // remove old zip files with the same name
if (JFile::exists($this->zipPath)) if (is_file($this->zipPath))
{ {
// remove file if found // remove file if found
JFile::delete($this->zipPath); File::delete($this->zipPath);
} }
// zip the folder // zip the folder
@ -1372,7 +1374,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
} }
// remove the local file // remove the local file
JFile::delete($this->zipPath); File::delete($this->zipPath);
} }
// remove the folder // remove the folder
@ -1431,7 +1433,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
chdir($tmpPath); chdir($tmpPath);
// get a list of files in the current directory tree (all) // get a list of files in the current directory tree (all)
$files = JFolder::files('.', '.', true, true); $files = Folder::files('.', '.', true, true);
// read in the file content // read in the file content
foreach ($files as $file) foreach ($files as $file)
@ -1486,7 +1488,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
if (!FileHelper::exists($tmpPath)) if (!FileHelper::exists($tmpPath))
{ {
// create the folders if not found // create the folders if not found
JFolder::create($tmpPath); Folder::create($tmpPath);
} }
// now move it // now move it
@ -1510,10 +1512,10 @@ class ComponentbuilderModelJoomla_components extends ListModel
$customFilePath = str_replace('//', '/', $this->customPath.'/'.$item); $customFilePath = str_replace('//', '/', $this->customPath.'/'.$item);
} }
// now check if file exist // now check if file exist
if (!JFile::exists($tmpFilePath) && JFile::exists($customFilePath)) if (!is_file($tmpFilePath) && is_file($customFilePath))
{ {
// move the file to its place // move the file to its place
JFile::copy($customFilePath, $tmpFilePath); File::copy($customFilePath, $tmpFilePath);
} }
} }
@ -1528,14 +1530,14 @@ class ComponentbuilderModelJoomla_components extends ListModel
if (!FileHelper::exists($imageFolderPath)) if (!FileHelper::exists($imageFolderPath))
{ {
// create the folders if not found // create the folders if not found
JFolder::create($imageFolderPath); Folder::create($imageFolderPath);
} }
$tmpImagePath = str_replace('//', '/', $this->packagePath.'/'.$item); $tmpImagePath = str_replace('//', '/', $this->packagePath.'/'.$item);
$customImagePath = str_replace('//', '/', JPATH_ROOT.'/'.$item); $customImagePath = str_replace('//', '/', JPATH_ROOT.'/'.$item);
if (!JFile::exists($tmpImagePath) && JFile::exists($customImagePath)) if (!is_file($tmpImagePath) && is_file($customImagePath))
{ {
// move the file to its place // move the file to its place
JFile::copy($customImagePath, $tmpImagePath); File::copy($customImagePath, $tmpImagePath);
} }
} }
@ -1557,7 +1559,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
if (!FileHelper::exists($tmpFolderPath) && FileHelper::exists($customFolderPath)) if (!FileHelper::exists($tmpFolderPath) && FileHelper::exists($customFolderPath))
{ {
// move the folder to its place // move the folder to its place
JFolder::copy($customFolderPath, $tmpFolderPath,'',true); Folder::copy($customFolderPath, $tmpFolderPath,'',true);
} }
} }
} }

View File

@ -524,6 +524,9 @@ class ComponentbuilderModelSite_view extends AdminModel
} }
} }
// update the ajax_input (sub form) layout
$form->setFieldAttribute('ajax_input', 'layout', ComponentbuilderHelper::getSubformLayout('site_view', 'ajax_input'));
// update all editors to use this components global editor // update all editors to use this components global editor
$global_editor = ComponentHelper::getParams('com_componentbuilder')->get('editor', 'none'); $global_editor = ComponentHelper::getParams('com_componentbuilder')->get('editor', 'none');
// now get all the editor fields // now get all the editor fields

View File

@ -22,6 +22,8 @@ use Joomla\CMS\Helper\TagsHelper;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\ObjectHelper; use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\StringHelper; use VDM\Joomla\Utilities\StringHelper;
use Joomla\CMS\Filesystem\Folder;
use Joomla\CMS\Filesystem\File;
/** /**
* Snippets List Model * Snippets List Model
@ -112,20 +114,20 @@ class ComponentbuilderModelSnippets extends ListModel
// get the shared paths // get the shared paths
$this->fullPath = rtrim(ComponentbuilderHelper::getFolderPath('path', 'sharepath', Factory::getConfig()->get('tmp_path')), '/') . '/snippets'; $this->fullPath = rtrim(ComponentbuilderHelper::getFolderPath('path', 'sharepath', Factory::getConfig()->get('tmp_path')), '/') . '/snippets';
// remove old folder with the same name // remove old folder with the same name
if (JFolder::exists($this->fullPath)) if (is_dir($this->fullPath))
{ {
// remove if old folder is found // remove if old folder is found
ComponentbuilderHelper::removeFolder($this->fullPath); ComponentbuilderHelper::removeFolder($this->fullPath);
} }
// create the full path // create the full path
JFolder::create($this->fullPath); Folder::create($this->fullPath);
// set zip path // set zip path
$this->zipPath = $this->fullPath .'.zip'; $this->zipPath = $this->fullPath .'.zip';
// remove old zip files with the same name // remove old zip files with the same name
if (JFile::exists($this->zipPath)) if (is_file($this->zipPath))
{ {
// remove file if found // remove file if found
JFile::delete($this->zipPath); File::delete($this->zipPath);
} }
// prep the item // prep the item
foreach($items as $item) foreach($items as $item)

View File

@ -0,0 +1 @@

View File

@ -195,6 +195,11 @@ class ComponentbuilderViewAdmin_custom_tabs extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1); $isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_NEW' : 'COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_EDIT')); $this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_NEW' : 'COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_EDIT'));
Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/admin_custom_tabs.css", ['version' => 'auto']); Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/admin_custom_tabs.css", ['version' => 'auto']);

View File

@ -195,6 +195,11 @@ class ComponentbuilderViewAdmin_fields extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1); $isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_ADMIN_FIELDS_NEW' : 'COM_COMPONENTBUILDER_ADMIN_FIELDS_EDIT')); $this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_ADMIN_FIELDS_NEW' : 'COM_COMPONENTBUILDER_ADMIN_FIELDS_EDIT'));
Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/admin_fields.css", ['version' => 'auto']); Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/admin_fields.css", ['version' => 'auto']);

View File

@ -195,6 +195,11 @@ class ComponentbuilderViewAdmin_fields_conditions extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1); $isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_NEW' : 'COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_EDIT')); $this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_NEW' : 'COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_EDIT'));
Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/admin_fields_conditions.css", ['version' => 'auto']); Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/admin_fields_conditions.css", ['version' => 'auto']);

View File

@ -195,6 +195,11 @@ class ComponentbuilderViewAdmin_fields_relations extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1); $isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_NEW' : 'COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_EDIT')); $this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_NEW' : 'COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_EDIT'));
Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/admin_fields_relations.css", ['version' => 'auto']); Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/admin_fields_relations.css", ['version' => 'auto']);
@ -209,9 +214,9 @@ class ComponentbuilderViewAdmin_fields_relations extends HtmlView
Html::_('script', 'media/com_componentbuilder/uikit-v2/js/uikit.min.js', ['version' => 'auto']); Html::_('script', 'media/com_componentbuilder/uikit-v2/js/uikit.min.js', ['version' => 'auto']);
// add var key // add var key
$this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';"); $this->getDocument()->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
// add return_here // add return_here
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';"); $this->getDocument()->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';");
Text::script('view not acceptable. Error'); Text::script('view not acceptable. Error');
} }

View File

@ -195,6 +195,11 @@ class ComponentbuilderViewAdmin_view extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1); $isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_ADMIN_VIEW_NEW' : 'COM_COMPONENTBUILDER_ADMIN_VIEW_EDIT')); $this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_ADMIN_VIEW_NEW' : 'COM_COMPONENTBUILDER_ADMIN_VIEW_EDIT'));
Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/admin_view.css", ['version' => 'auto']); Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/admin_view.css", ['version' => 'auto']);
@ -215,9 +220,9 @@ class ComponentbuilderViewAdmin_view extends HtmlView
Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', ['version' => 'auto']); Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', ['version' => 'auto']);
Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/notify.min.js', ['version' => 'auto']); Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/notify.min.js', ['version' => 'auto']);
// add var key // add var key
$this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';"); $this->getDocument()->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
// add return_here // add return_here
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';"); $this->getDocument()->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';");
Text::script('view not acceptable. Error'); Text::script('view not acceptable. Error');
} }

View File

@ -301,6 +301,11 @@ class ComponentbuilderViewAdmin_views extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
if (!isset($this->document)) if (!isset($this->document))
{ {
$this->document = Factory::getDocument(); $this->document = Factory::getDocument();

View File

@ -191,6 +191,11 @@ class ComponentbuilderViewAdmins_custom_tabs extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
if (!isset($this->document)) if (!isset($this->document))
{ {
$this->document = Factory::getDocument(); $this->document = Factory::getDocument();

View File

@ -191,6 +191,11 @@ class ComponentbuilderViewAdmins_fields extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
if (!isset($this->document)) if (!isset($this->document))
{ {
$this->document = Factory::getDocument(); $this->document = Factory::getDocument();

View File

@ -191,6 +191,11 @@ class ComponentbuilderViewAdmins_fields_conditions extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
if (!isset($this->document)) if (!isset($this->document))
{ {
$this->document = Factory::getDocument(); $this->document = Factory::getDocument();

View File

@ -191,6 +191,11 @@ class ComponentbuilderViewAdmins_fields_relations extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
if (!isset($this->document)) if (!isset($this->document))
{ {
$this->document = Factory::getDocument(); $this->document = Factory::getDocument();

View File

@ -211,6 +211,11 @@ class ComponentbuilderViewClass_extendings extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
if (!isset($this->document)) if (!isset($this->document))
{ {
$this->document = Factory::getDocument(); $this->document = Factory::getDocument();

View File

@ -195,6 +195,11 @@ class ComponentbuilderViewClass_extends extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1); $isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_CLASS_EXTENDS_NEW' : 'COM_COMPONENTBUILDER_CLASS_EXTENDS_EDIT')); $this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_CLASS_EXTENDS_NEW' : 'COM_COMPONENTBUILDER_CLASS_EXTENDS_EDIT'));
Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/class_extends.css", ['version' => 'auto']); Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/class_extends.css", ['version' => 'auto']);
@ -215,9 +220,9 @@ class ComponentbuilderViewClass_extends extends HtmlView
Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', ['version' => 'auto']); Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', ['version' => 'auto']);
Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/notify.min.js', ['version' => 'auto']); Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/notify.min.js', ['version' => 'auto']);
// add var key // add var key
$this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';"); $this->getDocument()->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
// add return_here // add return_here
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';"); $this->getDocument()->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';");
Text::script('view not acceptable. Error'); Text::script('view not acceptable. Error');
} }

View File

@ -195,6 +195,11 @@ class ComponentbuilderViewClass_method extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1); $isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_CLASS_METHOD_NEW' : 'COM_COMPONENTBUILDER_CLASS_METHOD_EDIT')); $this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_CLASS_METHOD_NEW' : 'COM_COMPONENTBUILDER_CLASS_METHOD_EDIT'));
Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/class_method.css", ['version' => 'auto']); Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/class_method.css", ['version' => 'auto']);
@ -215,9 +220,9 @@ class ComponentbuilderViewClass_method extends HtmlView
Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', ['version' => 'auto']); Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', ['version' => 'auto']);
Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/notify.min.js', ['version' => 'auto']); Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/notify.min.js', ['version' => 'auto']);
// add var key // add var key
$this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';"); $this->getDocument()->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
// add return_here // add return_here
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';"); $this->getDocument()->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';");
Text::script('view not acceptable. Error'); Text::script('view not acceptable. Error');
} }

View File

@ -241,6 +241,11 @@ class ComponentbuilderViewClass_methods extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
if (!isset($this->document)) if (!isset($this->document))
{ {
$this->document = Factory::getDocument(); $this->document = Factory::getDocument();

View File

@ -241,6 +241,11 @@ class ComponentbuilderViewClass_properties extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
if (!isset($this->document)) if (!isset($this->document))
{ {
$this->document = Factory::getDocument(); $this->document = Factory::getDocument();

View File

@ -195,6 +195,11 @@ class ComponentbuilderViewClass_property extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1); $isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_CLASS_PROPERTY_NEW' : 'COM_COMPONENTBUILDER_CLASS_PROPERTY_EDIT')); $this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_CLASS_PROPERTY_NEW' : 'COM_COMPONENTBUILDER_CLASS_PROPERTY_EDIT'));
Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/class_property.css", ['version' => 'auto']); Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/class_property.css", ['version' => 'auto']);
@ -215,9 +220,9 @@ class ComponentbuilderViewClass_property extends HtmlView
Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', ['version' => 'auto']); Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', ['version' => 'auto']);
Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/notify.min.js', ['version' => 'auto']); Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/notify.min.js', ['version' => 'auto']);
// add var key // add var key
$this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';"); $this->getDocument()->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
// add return_here // add return_here
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';"); $this->getDocument()->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';");
Text::script('view not acceptable. Error'); Text::script('view not acceptable. Error');
} }

View File

@ -195,6 +195,11 @@ class ComponentbuilderViewComponent_admin_views extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1); $isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_EDIT')); $this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_EDIT'));
Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/component_admin_views.css", ['version' => 'auto']); Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/component_admin_views.css", ['version' => 'auto']);

View File

@ -195,6 +195,11 @@ class ComponentbuilderViewComponent_config extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1); $isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_CONFIG_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_CONFIG_EDIT')); $this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_CONFIG_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_CONFIG_EDIT'));
Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/component_config.css", ['version' => 'auto']); Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/component_config.css", ['version' => 'auto']);

View File

@ -195,6 +195,11 @@ class ComponentbuilderViewComponent_custom_admin_menus extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1); $isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_EDIT')); $this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_EDIT'));
Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/component_custom_admin_menus.css", ['version' => 'auto']); Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/component_custom_admin_menus.css", ['version' => 'auto']);

View File

@ -195,6 +195,11 @@ class ComponentbuilderViewComponent_custom_admin_views extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1); $isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_EDIT')); $this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_EDIT'));
Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/component_custom_admin_views.css", ['version' => 'auto']); Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/component_custom_admin_views.css", ['version' => 'auto']);

View File

@ -195,6 +195,11 @@ class ComponentbuilderViewComponent_dashboard extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1); $isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_EDIT')); $this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_EDIT'));
Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/component_dashboard.css", ['version' => 'auto']); Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/component_dashboard.css", ['version' => 'auto']);
@ -215,9 +220,9 @@ class ComponentbuilderViewComponent_dashboard extends HtmlView
Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', ['version' => 'auto']); Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', ['version' => 'auto']);
Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/notify.min.js', ['version' => 'auto']); Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/notify.min.js', ['version' => 'auto']);
// add var key // add var key
$this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';"); $this->getDocument()->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
// add return_here // add return_here
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';"); $this->getDocument()->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';");
Text::script('view not acceptable. Error'); Text::script('view not acceptable. Error');
} }

View File

@ -195,6 +195,11 @@ class ComponentbuilderViewComponent_files_folders extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1); $isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_EDIT')); $this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_EDIT'));
Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/component_files_folders.css", ['version' => 'auto']); Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/component_files_folders.css", ['version' => 'auto']);

View File

@ -195,6 +195,11 @@ class ComponentbuilderViewComponent_modules extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1); $isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_MODULES_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_MODULES_EDIT')); $this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_MODULES_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_MODULES_EDIT'));
Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/component_modules.css", ['version' => 'auto']); Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/component_modules.css", ['version' => 'auto']);

View File

@ -195,6 +195,11 @@ class ComponentbuilderViewComponent_mysql_tweaks extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1); $isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_EDIT')); $this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_EDIT'));
Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/component_mysql_tweaks.css", ['version' => 'auto']); Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/component_mysql_tweaks.css", ['version' => 'auto']);

View File

@ -195,6 +195,11 @@ class ComponentbuilderViewComponent_placeholders extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1); $isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_EDIT')); $this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_EDIT'));
Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/component_placeholders.css", ['version' => 'auto']); Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/component_placeholders.css", ['version' => 'auto']);

View File

@ -195,6 +195,11 @@ class ComponentbuilderViewComponent_plugins extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1); $isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_PLUGINS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_PLUGINS_EDIT')); $this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_PLUGINS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_PLUGINS_EDIT'));
Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/component_plugins.css", ['version' => 'auto']); Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/component_plugins.css", ['version' => 'auto']);

View File

@ -195,6 +195,11 @@ class ComponentbuilderViewComponent_router extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1); $isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_ROUTER_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_ROUTER_EDIT')); $this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_ROUTER_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_ROUTER_EDIT'));
Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/component_router.css", ['version' => 'auto']); Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/component_router.css", ['version' => 'auto']);

View File

@ -195,6 +195,11 @@ class ComponentbuilderViewComponent_site_views extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1); $isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_EDIT')); $this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_EDIT'));
Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/component_site_views.css", ['version' => 'auto']); Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/component_site_views.css", ['version' => 'auto']);

View File

@ -195,6 +195,11 @@ class ComponentbuilderViewComponent_updates extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1); $isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_UPDATES_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_UPDATES_EDIT')); $this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_UPDATES_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_UPDATES_EDIT'));
Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/component_updates.css", ['version' => 'auto']); Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/component_updates.css", ['version' => 'auto']);

View File

@ -191,6 +191,11 @@ class ComponentbuilderViewComponents_admin_views extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
if (!isset($this->document)) if (!isset($this->document))
{ {
$this->document = Factory::getDocument(); $this->document = Factory::getDocument();

View File

@ -191,6 +191,11 @@ class ComponentbuilderViewComponents_config extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
if (!isset($this->document)) if (!isset($this->document))
{ {
$this->document = Factory::getDocument(); $this->document = Factory::getDocument();

View File

@ -191,6 +191,11 @@ class ComponentbuilderViewComponents_custom_admin_menus extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
if (!isset($this->document)) if (!isset($this->document))
{ {
$this->document = Factory::getDocument(); $this->document = Factory::getDocument();

View File

@ -191,6 +191,11 @@ class ComponentbuilderViewComponents_custom_admin_views extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
if (!isset($this->document)) if (!isset($this->document))
{ {
$this->document = Factory::getDocument(); $this->document = Factory::getDocument();

View File

@ -191,6 +191,11 @@ class ComponentbuilderViewComponents_dashboard extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
if (!isset($this->document)) if (!isset($this->document))
{ {
$this->document = Factory::getDocument(); $this->document = Factory::getDocument();

View File

@ -191,6 +191,11 @@ class ComponentbuilderViewComponents_files_folders extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
if (!isset($this->document)) if (!isset($this->document))
{ {
$this->document = Factory::getDocument(); $this->document = Factory::getDocument();

View File

@ -191,6 +191,11 @@ class ComponentbuilderViewComponents_modules extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
if (!isset($this->document)) if (!isset($this->document))
{ {
$this->document = Factory::getDocument(); $this->document = Factory::getDocument();

View File

@ -191,6 +191,11 @@ class ComponentbuilderViewComponents_mysql_tweaks extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
if (!isset($this->document)) if (!isset($this->document))
{ {
$this->document = Factory::getDocument(); $this->document = Factory::getDocument();

View File

@ -191,6 +191,11 @@ class ComponentbuilderViewComponents_placeholders extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
if (!isset($this->document)) if (!isset($this->document))
{ {
$this->document = Factory::getDocument(); $this->document = Factory::getDocument();

View File

@ -191,6 +191,11 @@ class ComponentbuilderViewComponents_plugins extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
if (!isset($this->document)) if (!isset($this->document))
{ {
$this->document = Factory::getDocument(); $this->document = Factory::getDocument();

View File

@ -251,6 +251,11 @@ class ComponentbuilderViewComponents_routers extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
if (!isset($this->document)) if (!isset($this->document))
{ {
$this->document = Factory::getDocument(); $this->document = Factory::getDocument();

View File

@ -191,6 +191,11 @@ class ComponentbuilderViewComponents_site_views extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
if (!isset($this->document)) if (!isset($this->document))
{ {
$this->document = Factory::getDocument(); $this->document = Factory::getDocument();

View File

@ -191,6 +191,11 @@ class ComponentbuilderViewComponents_updates extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
if (!isset($this->document)) if (!isset($this->document))
{ {
$this->document = Factory::getDocument(); $this->document = Factory::getDocument();

View File

@ -315,40 +315,27 @@ jQuery('#adminForm').on('change', '#jform_add_php_ajax',function (e)
jQuery(function() { document.addEventListener("DOMContentLoaded", function() {
jQuery('#open-libraries').html('<a href="index.php?option=com_componentbuilder&view=libraries"><?php echo JText::_('COM_COMPONENTBUILDER_LIBRARIES'); ?></a>'); document.querySelector('#open-libraries').innerHTML = '<a href="index.php?option=com_componentbuilder&view=libraries"><?php echo Text::_('COM_COMPONENTBUILDER_LIBRARIES'); ?></a>';
}); });
jQuery('#jform_snippet').closest('.input-append').addClass('jform_snippet_input_width'); jQuery('#jform_snippet').closest('.input-append').addClass('jform_snippet_input_width');
jQuery('#jform_main_get').closest('.input-append').addClass('jform_main_get_input_width'); jQuery('#jform_main_get').closest('.input-append').addClass('jform_main_get_input_width');
jQuery('#jform_dynamic_get').closest('.input-append').addClass('jform_dynamic_get_input_width'); jQuery('#jform_dynamic_get').closest('.input-append').addClass('jform_dynamic_get_input_width');
jQuery(function() { jQuery(function() {
jQuery("code").click(function() { // make sure the code bocks are active
jQuery(this).selText().addClass("selected"); document.querySelectorAll("code").forEach(function(codeBlock) {
}); codeBlock.addEventListener("click", function() {
codeBlock.selText(); // Call the custom selText function
codeBlock.classList.add("selected"); // Add the "selected" class
});
});
}); });
jQuery('#adminForm').on('change', '#jform_libraries',function (e) { jQuery('#adminForm').on('change', '#jform_libraries',function (e) {
e.preventDefault(); e.preventDefault();
getSnippets(); getSnippets();
}); });
jQuery.fn.selText = function() {
var obj = this[0];
if (jQuery.browser.msie) {
var range = obj.offsetParent.createTextRange();
range.moveToElementText(obj);
range.select();
} else if (jQuery.browser.mozilla || $.browser.opera) {
var selection = obj.ownerDocument.defaultView.getSelection();
var range = obj.ownerDocument.createRange();
range.selectNodeContents(obj);
selection.removeAllRanges();
selection.addRange(range);
} else if (jQuery.browser.safari) {
var selection = obj.ownerDocument.defaultView.getSelection();
selection.setBaseAndExtent(obj, 0, obj, 1);
}
return this;
}
jQuery('#adminForm').on('change', '#jform_snippet',function (e) { jQuery('#adminForm').on('change', '#jform_snippet',function (e) {
e.preventDefault(); e.preventDefault();
@ -384,6 +371,22 @@ jQuery(document).ready(function() {
// some lang strings // some lang strings
var select_a_snippet = '<?php echo Text::_('COM_COMPONENTBUILDER_SELECT_A_SNIPPET'); ?>'; var select_a_snippet = '<?php echo Text::_('COM_COMPONENTBUILDER_SELECT_A_SNIPPET'); ?>';
var create_a_snippet = '<?php echo Text::_('COM_COMPONENTBUILDER_CREATE_A_SNIPPET'); ?>'; var create_a_snippet = '<?php echo Text::_('COM_COMPONENTBUILDER_CREATE_A_SNIPPET'); ?>';
HTMLElement.prototype.selText = function() {
var obj = this;
// For modern browsers, handle the selection
var selection = window.getSelection();
var range = document.createRange();
// Select the content of the element
range.selectNodeContents(obj);
selection.removeAllRanges(); // Clear any previous selections
selection.addRange(range); // Add the new selection range
return this;
};
document.addEventListener("DOMContentLoaded", function() { document.addEventListener("DOMContentLoaded", function() {
document.querySelectorAll(".loading-dots").forEach(function(loading_dots) { document.querySelectorAll(".loading-dots").forEach(function(loading_dots) {

View File

@ -195,6 +195,11 @@ class ComponentbuilderViewCustom_admin_view extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1); $isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NEW' : 'COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_EDIT')); $this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NEW' : 'COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_EDIT'));
Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/custom_admin_view.css", ['version' => 'auto']); Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/custom_admin_view.css", ['version' => 'auto']);
@ -215,9 +220,9 @@ class ComponentbuilderViewCustom_admin_view extends HtmlView
Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', ['version' => 'auto']); Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', ['version' => 'auto']);
Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/notify.min.js', ['version' => 'auto']); Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/notify.min.js', ['version' => 'auto']);
// add var key // add var key
$this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';"); $this->getDocument()->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
// add return_here // add return_here
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';"); $this->getDocument()->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';");
Text::script('view not acceptable. Error'); Text::script('view not acceptable. Error');
} }

View File

@ -266,6 +266,11 @@ class ComponentbuilderViewCustom_admin_views extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
if (!isset($this->document)) if (!isset($this->document))
{ {
$this->document = Factory::getDocument(); $this->document = Factory::getDocument();

View File

@ -195,6 +195,11 @@ class ComponentbuilderViewCustom_code extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1); $isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_CUSTOM_CODE_NEW' : 'COM_COMPONENTBUILDER_CUSTOM_CODE_EDIT')); $this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_CUSTOM_CODE_NEW' : 'COM_COMPONENTBUILDER_CUSTOM_CODE_EDIT'));
Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/custom_code.css", ['version' => 'auto']); Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/custom_code.css", ['version' => 'auto']);
@ -215,9 +220,9 @@ class ComponentbuilderViewCustom_code extends HtmlView
Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', ['version' => 'auto']); Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', ['version' => 'auto']);
Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/notify.min.js', ['version' => 'auto']); Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/notify.min.js', ['version' => 'auto']);
// add var key // add var key
$this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';"); $this->getDocument()->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
// add return_here // add return_here
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';"); $this->getDocument()->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';");
// need to add some language strings // need to add some language strings
Text::script('COM_COMPONENTBUILDER_FUNCTION_NAME_ALREADY_TAKEN_PLEASE_TRY_AGAIN'); Text::script('COM_COMPONENTBUILDER_FUNCTION_NAME_ALREADY_TAKEN_PLEASE_TRY_AGAIN');
Text::script('COM_COMPONENTBUILDER_YOU_MUST_ADD_AN_UNIQUE_FUNCTION_NAME'); Text::script('COM_COMPONENTBUILDER_YOU_MUST_ADD_AN_UNIQUE_FUNCTION_NAME');

View File

@ -286,6 +286,11 @@ class ComponentbuilderViewCustom_codes extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
if (!isset($this->document)) if (!isset($this->document))
{ {
$this->document = Factory::getDocument(); $this->document = Factory::getDocument();

View File

@ -195,6 +195,11 @@ class ComponentbuilderViewDynamic_get extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1); $isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_DYNAMIC_GET_NEW' : 'COM_COMPONENTBUILDER_DYNAMIC_GET_EDIT')); $this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_DYNAMIC_GET_NEW' : 'COM_COMPONENTBUILDER_DYNAMIC_GET_EDIT'));
Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/dynamic_get.css", ['version' => 'auto']); Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/dynamic_get.css", ['version' => 'auto']);
@ -215,9 +220,9 @@ class ComponentbuilderViewDynamic_get extends HtmlView
Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', ['version' => 'auto']); Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', ['version' => 'auto']);
Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/notify.min.js', ['version' => 'auto']); Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/notify.min.js', ['version' => 'auto']);
// add var key // add var key
$this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';"); $this->getDocument()->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
// add return_here // add return_here
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';"); $this->getDocument()->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';");
Text::script('view not acceptable. Error'); Text::script('view not acceptable. Error');
} }

View File

@ -241,6 +241,11 @@ class ComponentbuilderViewDynamic_gets extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
if (!isset($this->document)) if (!isset($this->document))
{ {
$this->document = Factory::getDocument(); $this->document = Factory::getDocument();

View File

@ -286,32 +286,16 @@ jQuery('#adminForm').on('change', '#jform_add_javascript_views_footer',function
jQuery(function() { jQuery(function() {
setTimeout( setTimeout(
function() { function() {
// load the on click event // make sure the code bocks are active
jQuery("code").click(function() { document.querySelectorAll("code").forEach(function(codeBlock) {
jQuery(this).selText().addClass("selected"); codeBlock.addEventListener("click", function() {
codeBlock.selText();
codeBlock.classList.add("selected");
});
}); });
}, 2000); }, 2000);
}); });
jQuery.fn.selText = function() {
var obj = this[0];
if (jQuery.browser.msie) {
var range = obj.offsetParent.createTextRange();
range.moveToElementText(obj);
range.select();
} else if (jQuery.browser.mozilla || $.browser.opera) {
var selection = obj.ownerDocument.defaultView.getSelection();
var range = obj.ownerDocument.createRange();
range.selectNodeContents(obj);
selection.removeAllRanges();
selection.addRange(range);
} else if (jQuery.browser.safari) {
var selection = obj.ownerDocument.defaultView.getSelection();
selection.setBaseAndExtent(obj, 0, obj, 1);
}
return this;
}
jQuery('#adminForm').on('change', '#jform_fieldtype',function (e) { jQuery('#adminForm').on('change', '#jform_fieldtype',function (e) {
e.preventDefault(); e.preventDefault();
// get type value // get type value
@ -324,6 +308,21 @@ jQuery('#adminForm').on('change', '#jform_fieldtype',function (e) {
}); });
HTMLElement.prototype.selText = function() {
var obj = this;
// For modern browsers, handle the selection
var selection = window.getSelection();
var range = document.createRange();
// Select the content of the element
range.selectNodeContents(obj);
selection.removeAllRanges(); // Clear any previous selections
selection.addRange(range); // Add the new selection range
return this;
};
<?php <?php
$app = Factory::getApplication(); $app = Factory::getApplication();
?> ?>

View File

@ -195,6 +195,11 @@ class ComponentbuilderViewField extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1); $isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_FIELD_NEW' : 'COM_COMPONENTBUILDER_FIELD_EDIT')); $this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_FIELD_NEW' : 'COM_COMPONENTBUILDER_FIELD_EDIT'));
Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/field.css", ['version' => 'auto']); Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/field.css", ['version' => 'auto']);
@ -215,9 +220,9 @@ class ComponentbuilderViewField extends HtmlView
Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', ['version' => 'auto']); Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', ['version' => 'auto']);
Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/notify.min.js', ['version' => 'auto']); Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/notify.min.js', ['version' => 'auto']);
// add var key // add var key
$this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';"); $this->getDocument()->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
// add return_here // add return_here
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';"); $this->getDocument()->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';");
// add the libs for subform (since not adding it via xml but ajax) // add the libs for subform (since not adding it via xml but ajax)
Html::_('jquery.ui', array('core', 'sortable')); Html::_('jquery.ui', array('core', 'sortable'));
Html::_('script', 'system/subform-repeatable.js', array('version' => 'auto', 'relative' => true)); Html::_('script', 'system/subform-repeatable.js', array('version' => 'auto', 'relative' => true));

View File

@ -311,6 +311,11 @@ class ComponentbuilderViewFields extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
if (!isset($this->document)) if (!isset($this->document))
{ {
$this->document = Factory::getDocument(); $this->document = Factory::getDocument();

View File

@ -208,6 +208,11 @@ class ComponentbuilderViewFieldtype extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1); $isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_FIELDTYPE_NEW' : 'COM_COMPONENTBUILDER_FIELDTYPE_EDIT')); $this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_FIELDTYPE_NEW' : 'COM_COMPONENTBUILDER_FIELDTYPE_EDIT'));
Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/fieldtype.css", ['version' => 'auto']); Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/fieldtype.css", ['version' => 'auto']);
@ -276,9 +281,9 @@ class ComponentbuilderViewFieldtype extends HtmlView
Html::_('script', 'media/com_componentbuilder/uikit-v3/js/uikit-icons'.$size.'.js', ['version' => 'auto']); Html::_('script', 'media/com_componentbuilder/uikit-v3/js/uikit-icons'.$size.'.js', ['version' => 'auto']);
} }
// add var key // add var key
$this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';"); $this->getDocument()->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
// add return_here // add return_here
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';"); $this->getDocument()->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';");
Text::script('view not acceptable. Error'); Text::script('view not acceptable. Error');
} }

View File

@ -226,6 +226,11 @@ class ComponentbuilderViewFieldtypes extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
if (!isset($this->document)) if (!isset($this->document))
{ {
$this->document = Factory::getDocument(); $this->document = Factory::getDocument();

View File

@ -177,20 +177,20 @@ class ComponentbuilderViewGet_snippets extends HtmlView
$expire = 30000; // only 30 seconds $expire = 30000; // only 30 seconds
} }
// Set the Time To Live To JavaScript // Set the Time To Live To JavaScript
$this->document->addScriptDeclaration("var expire = ". (int) $expire.";"); $this->getDocument()->addScriptDeclaration("var expire = ". (int) $expire.";");
// set snippet path // set snippet path
$this->document->addScriptDeclaration("var snippetPath = '". ComponentbuilderHelper::$snippetPath ."';"); $this->getDocument()->addScriptDeclaration("var snippetPath = '". ComponentbuilderHelper::$snippetPath ."';");
$this->document->addScriptDeclaration("var snippetsPath = '". ComponentbuilderHelper::$snippetsPath ."';"); $this->getDocument()->addScriptDeclaration("var snippetsPath = '". ComponentbuilderHelper::$snippetsPath ."';");
// token // token
$this->document->addScriptDeclaration("var token = '". Session::getFormToken() ."';"); $this->getDocument()->addScriptDeclaration("var token = '". Session::getFormToken() ."';");
// add some global items buckets for bulk updating // add some global items buckets for bulk updating
$this->document->addScriptDeclaration("var bulkItems = {};"); $this->getDocument()->addScriptDeclaration("var bulkItems = {};");
$this->document->addScriptDeclaration("bulkItems.new = [];"); $this->getDocument()->addScriptDeclaration("bulkItems.new = [];");
$this->document->addScriptDeclaration("bulkItems.diverged = [];"); $this->getDocument()->addScriptDeclaration("bulkItems.diverged = [];");
$this->document->addScriptDeclaration("bulkItems.ahead = [];"); $this->getDocument()->addScriptDeclaration("bulkItems.ahead = [];");
$this->document->addScriptDeclaration("bulkItems.behind = [];"); $this->getDocument()->addScriptDeclaration("bulkItems.behind = [];");
// set an error message if needed // set an error message if needed
$this->document->addScriptDeclaration("var returnError = '<div class=\"uk-alert uk-alert-warning\"><h1>".Text::_('COM_COMPONENTBUILDER_AN_ERROR_HAS_OCCURRED')."!</h1><p>".Text::_('COM_COMPONENTBUILDER_PLEASE_TRY_AGAIN_LATER').".</p></div>';"); $this->getDocument()->addScriptDeclaration("var returnError = '<div class=\"uk-alert uk-alert-warning\"><h1>".Text::_('COM_COMPONENTBUILDER_AN_ERROR_HAS_OCCURRED')."!</h1><p>".Text::_('COM_COMPONENTBUILDER_PLEASE_TRY_AGAIN_LATER').".</p></div>';");
// need to add some language strings // need to add some language strings
Text::script('COM_COMPONENTBUILDER_JCB_COMMUNITY_SNIPPETS'); Text::script('COM_COMPONENTBUILDER_JCB_COMMUNITY_SNIPPETS');
Text::script('COM_COMPONENTBUILDER_SNIPPETS'); Text::script('COM_COMPONENTBUILDER_SNIPPETS');
@ -225,7 +225,7 @@ class ComponentbuilderViewGet_snippets extends HtmlView
Text::script('COM_COMPONENTBUILDER_AVAILABLE_LIBRARIES'); Text::script('COM_COMPONENTBUILDER_AVAILABLE_LIBRARIES');
Text::script('COM_COMPONENTBUILDER_OPEN_LIBRARY_SNIPPETS'); Text::script('COM_COMPONENTBUILDER_OPEN_LIBRARY_SNIPPETS');
// add some lang verfy messages // add some lang verfy messages
$this->document->addScriptDeclaration(" $this->getDocument()->addScriptDeclaration("
// set the snippet from gitHub // set the snippet from gitHub
function getConfirmUpdate(status) { function getConfirmUpdate(status) {
switch(status) { switch(status) {
@ -251,7 +251,7 @@ class ComponentbuilderViewGet_snippets extends HtmlView
if (ArrayHelper::check($this->items)) if (ArrayHelper::check($this->items))
{ {
// Set the local snippets array // Set the local snippets array
$this->document->addScriptDeclaration("var local_snippets = ". json_encode($local_snippets).";"); $this->getDocument()->addScriptDeclaration("var local_snippets = ". json_encode($local_snippets).";");
} }
// add the document default css file // add the document default css file
Html::_('stylesheet', 'administrator/components/com_componentbuilder/assets/css/get_snippets.css', ['version' => 'auto']); Html::_('stylesheet', 'administrator/components/com_componentbuilder/assets/css/get_snippets.css', ['version' => 'auto']);

View File

@ -195,6 +195,11 @@ class ComponentbuilderViewHelp_document extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1); $isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_HELP_DOCUMENT_NEW' : 'COM_COMPONENTBUILDER_HELP_DOCUMENT_EDIT')); $this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_HELP_DOCUMENT_NEW' : 'COM_COMPONENTBUILDER_HELP_DOCUMENT_EDIT'));
Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/help_document.css", ['version' => 'auto']); Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/help_document.css", ['version' => 'auto']);

View File

@ -271,6 +271,11 @@ class ComponentbuilderViewHelp_documents extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
if (!isset($this->document)) if (!isset($this->document))
{ {
$this->document = Factory::getDocument(); $this->document = Factory::getDocument();

View File

@ -163,10 +163,10 @@ class ComponentbuilderViewImport_joomla_components extends HtmlView
} }
// Set the Time To Live To JavaScript // Set the Time To Live To JavaScript
$this->document->addScriptDeclaration("var expire = ". (int) $expire.";"); $this->getDocument()->addScriptDeclaration("var expire = ". (int) $expire.";");
$this->document->addScriptDeclaration("var all_is_good = '".Text::_('COM_COMPONENTBUILDER_ALL_IS_GOOD_THERE_IS_NO_NOTICE_AT_THIS_TIME')."';"); $this->getDocument()->addScriptDeclaration("var all_is_good = '".Text::_('COM_COMPONENTBUILDER_ALL_IS_GOOD_THERE_IS_NO_NOTICE_AT_THIS_TIME')."';");
// add a token on the page for javascript // add a token on the page for javascript
$this->document->addScriptDeclaration("var token = '".Session::getFormToken()."';"); $this->getDocument()->addScriptDeclaration("var token = '".Session::getFormToken()."';");
// add the Uikit v2 style sheets // add the Uikit v2 style sheets

View File

@ -195,6 +195,11 @@ class ComponentbuilderViewJoomla_component extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1); $isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NEW' : 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EDIT')); $this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NEW' : 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EDIT'));
Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/joomla_component.css", ['version' => 'auto']); Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/joomla_component.css", ['version' => 'auto']);

View File

@ -266,6 +266,11 @@ class ComponentbuilderViewJoomla_components extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
if (!isset($this->document)) if (!isset($this->document))
{ {
$this->document = Factory::getDocument(); $this->document = Factory::getDocument();

View File

@ -379,9 +379,13 @@ jQuery('#adminForm').on('change', '#jform_add_update_server',function (e)
jQuery('#jform_snippet').closest('.input-append').addClass('jform_snippet_input_width'); jQuery('#jform_snippet').closest('.input-append').addClass('jform_snippet_input_width');
jQuery(function() { jQuery(function() {
jQuery("code").click(function() { // make sure the code bocks are active
jQuery(this).selText().addClass("selected"); document.querySelectorAll("code").forEach(function(codeBlock) {
}); codeBlock.addEventListener("click", function() {
codeBlock.selText(); // Call the custom selText function
codeBlock.classList.add("selected"); // Add the "selected" class
});
});
}); });
jQuery('#adminForm').on('change', '#jform_custom_get',function (e) { jQuery('#adminForm').on('change', '#jform_custom_get',function (e) {
e.preventDefault(); e.preventDefault();
@ -400,25 +404,6 @@ jQuery('#adminForm').on('change', '#jform_libraries',function (e) {
// load the dynamic media placeholders if needed // load the dynamic media placeholders if needed
setModuleCode(); setModuleCode();
}); });
jQuery.fn.selText = function() {
var obj = this[0];
if (jQuery.browser.msie) {
var range = obj.offsetParent.createTextRange();
range.moveToElementText(obj);
range.select();
} else if (jQuery.browser.mozilla || $.browser.opera) {
var selection = obj.ownerDocument.defaultView.getSelection();
var range = obj.ownerDocument.createRange();
range.selectNodeContents(obj);
selection.removeAllRanges();
selection.addRange(range);
} else if (jQuery.browser.safari) {
var selection = obj.ownerDocument.defaultView.getSelection();
selection.setBaseAndExtent(obj, 0, obj, 1);
}
return this;
}
jQuery('#adminForm').on('change', '#jform_snippet',function (e) { jQuery('#adminForm').on('change', '#jform_snippet',function (e) {
e.preventDefault(); e.preventDefault();
@ -435,6 +420,22 @@ jQuery(document).ready(function() {
// some lang strings // some lang strings
var select_a_snippet = '<?php echo Text::_('COM_COMPONENTBUILDER_SELECT_A_SNIPPET'); ?>'; var select_a_snippet = '<?php echo Text::_('COM_COMPONENTBUILDER_SELECT_A_SNIPPET'); ?>';
var create_a_snippet = '<?php echo Text::_('COM_COMPONENTBUILDER_CREATE_A_SNIPPET'); ?>'; var create_a_snippet = '<?php echo Text::_('COM_COMPONENTBUILDER_CREATE_A_SNIPPET'); ?>';
HTMLElement.prototype.selText = function() {
var obj = this;
// For modern browsers, handle the selection
var selection = window.getSelection();
var range = document.createRange();
// Select the content of the element
range.selectNodeContents(obj);
selection.removeAllRanges(); // Clear any previous selections
selection.addRange(range); // Add the new selection range
return this;
};
<?php <?php
$app = Factory::getApplication(); $app = Factory::getApplication();

View File

@ -195,6 +195,11 @@ class ComponentbuilderViewJoomla_module extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1); $isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_JOOMLA_MODULE_NEW' : 'COM_COMPONENTBUILDER_JOOMLA_MODULE_EDIT')); $this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_JOOMLA_MODULE_NEW' : 'COM_COMPONENTBUILDER_JOOMLA_MODULE_EDIT'));
Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/joomla_module.css", ['version' => 'auto']); Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/joomla_module.css", ['version' => 'auto']);
@ -219,9 +224,9 @@ class ComponentbuilderViewJoomla_module extends HtmlView
Html::_('script', 'media/com_componentbuilder/js/jstorage.min.js', ['version' => 'auto']); Html::_('script', 'media/com_componentbuilder/js/jstorage.min.js', ['version' => 'auto']);
Html::_('script', 'media/com_componentbuilder/js/strtotime.js', ['version' => 'auto']); Html::_('script', 'media/com_componentbuilder/js/strtotime.js', ['version' => 'auto']);
// add var key // add var key
$this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';"); $this->getDocument()->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
// add return_here // add return_here
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';"); $this->getDocument()->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';");
// check if we should use browser storage // check if we should use browser storage
$setBrowserStorage = $this->params->get('set_browser_storage', null); $setBrowserStorage = $this->params->get('set_browser_storage', null);
if ($setBrowserStorage) if ($setBrowserStorage)
@ -252,7 +257,7 @@ class ComponentbuilderViewJoomla_module extends HtmlView
$expire = 30000; // only 30 seconds $expire = 30000; // only 30 seconds
} }
// Set the Time To Live To JavaScript // Set the Time To Live To JavaScript
$this->document->addScriptDeclaration("var expire = ". (int) $expire.";"); $this->getDocument()->addScriptDeclaration("var expire = ". (int) $expire.";");
Text::script('view not acceptable. Error'); Text::script('view not acceptable. Error');
} }

View File

@ -195,6 +195,11 @@ class ComponentbuilderViewJoomla_module_files_folders_urls extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1); $isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_JOOMLA_MODULE_FILES_FOLDERS_URLS_NEW' : 'COM_COMPONENTBUILDER_JOOMLA_MODULE_FILES_FOLDERS_URLS_EDIT')); $this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_JOOMLA_MODULE_FILES_FOLDERS_URLS_NEW' : 'COM_COMPONENTBUILDER_JOOMLA_MODULE_FILES_FOLDERS_URLS_EDIT'));
Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/joomla_module_files_folders_urls.css", ['version' => 'auto']); Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/joomla_module_files_folders_urls.css", ['version' => 'auto']);

View File

@ -195,6 +195,11 @@ class ComponentbuilderViewJoomla_module_updates extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1); $isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_JOOMLA_MODULE_UPDATES_NEW' : 'COM_COMPONENTBUILDER_JOOMLA_MODULE_UPDATES_EDIT')); $this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_JOOMLA_MODULE_UPDATES_NEW' : 'COM_COMPONENTBUILDER_JOOMLA_MODULE_UPDATES_EDIT'));
Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/joomla_module_updates.css", ['version' => 'auto']); Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/joomla_module_updates.css", ['version' => 'auto']);

View File

@ -226,6 +226,11 @@ class ComponentbuilderViewJoomla_modules extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
if (!isset($this->document)) if (!isset($this->document))
{ {
$this->document = Factory::getDocument(); $this->document = Factory::getDocument();

View File

@ -191,6 +191,11 @@ class ComponentbuilderViewJoomla_modules_files_folders_urls extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
if (!isset($this->document)) if (!isset($this->document))
{ {
$this->document = Factory::getDocument(); $this->document = Factory::getDocument();

View File

@ -191,6 +191,11 @@ class ComponentbuilderViewJoomla_modules_updates extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
if (!isset($this->document)) if (!isset($this->document))
{ {
$this->document = Factory::getDocument(); $this->document = Factory::getDocument();

View File

@ -196,6 +196,11 @@ class ComponentbuilderViewJoomla_plugin extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1); $isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_JOOMLA_PLUGIN_NEW' : 'COM_COMPONENTBUILDER_JOOMLA_PLUGIN_EDIT')); $this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_JOOMLA_PLUGIN_NEW' : 'COM_COMPONENTBUILDER_JOOMLA_PLUGIN_EDIT'));
Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/joomla_plugin.css", ['version' => 'auto']); Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/joomla_plugin.css", ['version' => 'auto']);
@ -220,9 +225,9 @@ class ComponentbuilderViewJoomla_plugin extends HtmlView
Html::_('script', 'media/com_componentbuilder/js/jstorage.min.js', ['version' => 'auto']); Html::_('script', 'media/com_componentbuilder/js/jstorage.min.js', ['version' => 'auto']);
Html::_('script', 'media/com_componentbuilder/js/strtotime.js', ['version' => 'auto']); Html::_('script', 'media/com_componentbuilder/js/strtotime.js', ['version' => 'auto']);
// add var key // add var key
$this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';"); $this->getDocument()->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
// add return_here // add return_here
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';"); $this->getDocument()->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';");
// set some lang // set some lang
Text::script('COM_COMPONENTBUILDER_ALREADY_SELECTED_TRY_ANOTHER'); Text::script('COM_COMPONENTBUILDER_ALREADY_SELECTED_TRY_ANOTHER');
Text::script('COM_COMPONENTBUILDER_TYPE_OR_SELECT_SOME_OPTIONS'); Text::script('COM_COMPONENTBUILDER_TYPE_OR_SELECT_SOME_OPTIONS');
@ -259,8 +264,8 @@ class ComponentbuilderViewJoomla_plugin extends HtmlView
$expire = 30000; // only 30 seconds $expire = 30000; // only 30 seconds
} }
// Set the Time To Live To JavaScript // Set the Time To Live To JavaScript
$this->document->addScriptDeclaration("var expire = ". (int) $expire.";"); $this->getDocument()->addScriptDeclaration("var expire = ". (int) $expire.";");
$this->document->addScriptDeclaration("selectionArray = {'property':{},'method':{}};"); $this->getDocument()->addScriptDeclaration("selectionArray = {'property':{},'method':{}};");
// add a few field options via PHP // add a few field options via PHP
\JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields'); \JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
$tmp_ = \JFormHelper::loadFieldType('joomlaplugingroups')->options; $tmp_ = \JFormHelper::loadFieldType('joomlaplugingroups')->options;
@ -272,7 +277,7 @@ class ComponentbuilderViewJoomla_plugin extends HtmlView
$_tmp[$item->value] = $item->text; $_tmp[$item->value] = $item->text;
} }
// Set the values to JavaScript // Set the values to JavaScript
$this->document->addScriptDeclaration("selectionArray['joomla_plugin_group'] = ". json_encode($_tmp) . ";"); $this->getDocument()->addScriptDeclaration("selectionArray['joomla_plugin_group'] = ". json_encode($_tmp) . ";");
} }
$tmp_ = \JFormHelper::loadFieldType('pluginsclassproperties')->options; $tmp_ = \JFormHelper::loadFieldType('pluginsclassproperties')->options;
if (ArrayHelper::check($tmp_)) if (ArrayHelper::check($tmp_))
@ -283,7 +288,7 @@ class ComponentbuilderViewJoomla_plugin extends HtmlView
$_tmp[$item->value] = $item->text; $_tmp[$item->value] = $item->text;
} }
// Set the values to JavaScript // Set the values to JavaScript
$this->document->addScriptDeclaration("selectionArray['property'] = ". json_encode($_tmp) . ";"); $this->getDocument()->addScriptDeclaration("selectionArray['property'] = ". json_encode($_tmp) . ";");
} }
$tmp_ = \JFormHelper::loadFieldType('pluginsclassmethods')->options; $tmp_ = \JFormHelper::loadFieldType('pluginsclassmethods')->options;
if (ArrayHelper::check($tmp_)) if (ArrayHelper::check($tmp_))
@ -294,7 +299,7 @@ class ComponentbuilderViewJoomla_plugin extends HtmlView
$_tmp[$item->value] = $item->text; $_tmp[$item->value] = $item->text;
} }
// Set the values to JavaScript // Set the values to JavaScript
$this->document->addScriptDeclaration("selectionArray['method'] = ". json_encode($_tmp) . ";"); $this->getDocument()->addScriptDeclaration("selectionArray['method'] = ". json_encode($_tmp) . ";");
} }
Text::script('view not acceptable. Error'); Text::script('view not acceptable. Error');
} }

View File

@ -195,6 +195,11 @@ class ComponentbuilderViewJoomla_plugin_files_folders_urls extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1); $isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_JOOMLA_PLUGIN_FILES_FOLDERS_URLS_NEW' : 'COM_COMPONENTBUILDER_JOOMLA_PLUGIN_FILES_FOLDERS_URLS_EDIT')); $this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_JOOMLA_PLUGIN_FILES_FOLDERS_URLS_NEW' : 'COM_COMPONENTBUILDER_JOOMLA_PLUGIN_FILES_FOLDERS_URLS_EDIT'));
Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/joomla_plugin_files_folders_urls.css", ['version' => 'auto']); Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/joomla_plugin_files_folders_urls.css", ['version' => 'auto']);

View File

@ -195,6 +195,11 @@ class ComponentbuilderViewJoomla_plugin_group extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1); $isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_NEW' : 'COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_EDIT')); $this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_NEW' : 'COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_EDIT'));
Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/joomla_plugin_group.css", ['version' => 'auto']); Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/joomla_plugin_group.css", ['version' => 'auto']);

View File

@ -211,6 +211,11 @@ class ComponentbuilderViewJoomla_plugin_groups extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
if (!isset($this->document)) if (!isset($this->document))
{ {
$this->document = Factory::getDocument(); $this->document = Factory::getDocument();

View File

@ -195,6 +195,11 @@ class ComponentbuilderViewJoomla_plugin_updates extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1); $isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_NEW' : 'COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_EDIT')); $this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_NEW' : 'COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_EDIT'));
Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/joomla_plugin_updates.css", ['version' => 'auto']); Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/joomla_plugin_updates.css", ['version' => 'auto']);

View File

@ -246,6 +246,11 @@ class ComponentbuilderViewJoomla_plugins extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
if (!isset($this->document)) if (!isset($this->document))
{ {
$this->document = Factory::getDocument(); $this->document = Factory::getDocument();

View File

@ -191,6 +191,11 @@ class ComponentbuilderViewJoomla_plugins_files_folders_urls extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
if (!isset($this->document)) if (!isset($this->document))
{ {
$this->document = Factory::getDocument(); $this->document = Factory::getDocument();

View File

@ -191,6 +191,11 @@ class ComponentbuilderViewJoomla_plugins_updates extends HtmlView
*/ */
protected function setDocument() protected function setDocument()
{ {
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
if (!isset($this->document)) if (!isset($this->document))
{ {
$this->document = Factory::getDocument(); $this->document = Factory::getDocument();

Some files were not shown because too many files have changed in this diff Show More