forked from joomla/Component-Builder
Update the field area to be more user friendly, phase A of gh-258
This commit is contained in:
parent
6d4c823ea6
commit
e6b2b48ac7
10
README.md
10
README.md
@ -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 safe 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 safe you lots of time and money. A real must have!
|
||||||
|
|
||||||
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.7.1) with **ALL** its features and **ALL** concepts totally open-source and free!
|
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.7.2) 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)
|
||||||
|
|
||||||
@ -126,13 +126,13 @@ Component Builder is mapped as a component in itself on my local development env
|
|||||||
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||||
+ *Name*: [Component Builder](http://joomlacomponentbuilder.com)
|
+ *Name*: [Component Builder](http://joomlacomponentbuilder.com)
|
||||||
+ *First Build*: 30th April, 2015
|
+ *First Build*: 30th April, 2015
|
||||||
+ *Last Build*: 8th April, 2018
|
+ *Last Build*: 11th April, 2018
|
||||||
+ *Version*: 2.7.1
|
+ *Version*: 2.7.2
|
||||||
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
|
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
|
||||||
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
+ *Line count*: **188944**
|
+ *Line count*: **189475**
|
||||||
+ *Field count*: **1011**
|
+ *Field count*: **1011**
|
||||||
+ *File count*: **1197**
|
+ *File count*: **1199**
|
||||||
+ *Folder count*: **193**
|
+ *Folder count*: **193**
|
||||||
|
|
||||||
> This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com).
|
> This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com).
|
||||||
|
@ -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 safe 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 safe you lots of time and money. A real must have!
|
||||||
|
|
||||||
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.7.1) with **ALL** its features and **ALL** concepts totally open-source and free!
|
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.7.2) 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)
|
||||||
|
|
||||||
@ -126,13 +126,13 @@ Component Builder is mapped as a component in itself on my local development env
|
|||||||
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||||
+ *Name*: [Component Builder](http://joomlacomponentbuilder.com)
|
+ *Name*: [Component Builder](http://joomlacomponentbuilder.com)
|
||||||
+ *First Build*: 30th April, 2015
|
+ *First Build*: 30th April, 2015
|
||||||
+ *Last Build*: 8th April, 2018
|
+ *Last Build*: 11th April, 2018
|
||||||
+ *Version*: 2.7.1
|
+ *Version*: 2.7.2
|
||||||
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
|
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
|
||||||
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
+ *Line count*: **188944**
|
+ *Line count*: **189475**
|
||||||
+ *Field count*: **1011**
|
+ *Field count*: **1011**
|
||||||
+ *File count*: **1197**
|
+ *File count*: **1199**
|
||||||
+ *Folder count*: **193**
|
+ *Folder count*: **193**
|
||||||
|
|
||||||
> This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com).
|
> This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com).
|
||||||
|
@ -25,6 +25,5 @@
|
|||||||
/* CSS Document */
|
/* CSS Document */
|
||||||
|
|
||||||
|
|
||||||
.uk-scrollable-box {
|
.uk-scrollable-box { height: 380px !important; }
|
||||||
height: 380px !important;
|
.subform-table-sublayout-section .controls { margin-left: 0px; }
|
||||||
}
|
|
||||||
|
@ -65,6 +65,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
|||||||
$this->registerTask('getValidationRulesTable', 'ajax');
|
$this->registerTask('getValidationRulesTable', 'ajax');
|
||||||
$this->registerTask('checkRuleName', 'ajax');
|
$this->registerTask('checkRuleName', 'ajax');
|
||||||
$this->registerTask('fieldOptions', 'ajax');
|
$this->registerTask('fieldOptions', 'ajax');
|
||||||
|
$this->registerTask('getFieldPropertyDesc', 'ajax');
|
||||||
$this->registerTask('snippetDetails', 'ajax');
|
$this->registerTask('snippetDetails', 'ajax');
|
||||||
$this->registerTask('setSnippetGithub', 'ajax');
|
$this->registerTask('setSnippetGithub', 'ajax');
|
||||||
$this->registerTask('getSnippets', 'ajax');
|
$this->registerTask('getSnippets', 'ajax');
|
||||||
@ -967,6 +968,45 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'getFieldPropertyDesc':
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
|
||||||
|
$fieldtypeValue = $jinput->get('fieldtype', NULL, 'INT');
|
||||||
|
$propertyValue = $jinput->get('property', NULL, 'WORD');
|
||||||
|
if($fieldtypeValue && $propertyValue && $user->id != 0)
|
||||||
|
{
|
||||||
|
$result = $this->getModel('ajax')->getFieldPropertyDesc($fieldtypeValue, $propertyValue);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$result = false;
|
||||||
|
}
|
||||||
|
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||||
|
{
|
||||||
|
echo $callback . "(".json_encode($result).");";
|
||||||
|
}
|
||||||
|
elseif($returnRaw)
|
||||||
|
{
|
||||||
|
echo json_encode($result);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo "(".json_encode($result).");";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch(Exception $e)
|
||||||
|
{
|
||||||
|
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||||
|
{
|
||||||
|
echo $callback."(".json_encode($e).");";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo "(".json_encode($e).");";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 'snippetDetails':
|
case 'snippetDetails':
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -170,7 +170,7 @@ class Compiler extends Infusion
|
|||||||
foreach ($mismatch as $string)
|
foreach ($mismatch as $string)
|
||||||
{
|
{
|
||||||
$constant = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($string, 'U');
|
$constant = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($string, 'U');
|
||||||
$this->app->enqueueMessage(JText::sprintf('The <b>Joomla.JText._(\'%s\')</b> language constant for (%s) does not have a corresponding JText::Script() decalaration.', $constant, $string), 'Warning');
|
$this->app->enqueueMessage(JText::sprintf('The <b>Joomla.JText._(\'%s\')</b> language constant for <b>%s</b> does not have a corresponding <code>JText::script(\'%s\')</code> decalaration, please add it.', $constant, $string, $string), 'Warning');
|
||||||
}
|
}
|
||||||
$this->app->enqueueMessage('<hr />', 'Warning');
|
$this->app->enqueueMessage('<hr />', 'Warning');
|
||||||
}
|
}
|
||||||
|
@ -1578,6 +1578,85 @@ abstract class ComponentbuilderHelper
|
|||||||
$extruder = new Extrusion($data);
|
$extruder = new Extrusion($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function getFieldOptions($value, $type, $settings = array(), $xml = null)
|
||||||
|
{
|
||||||
|
// Get a db connection.
|
||||||
|
$db = JFactory::getDbo();
|
||||||
|
|
||||||
|
// Create a new query object.
|
||||||
|
$query = $db->getQuery(true);
|
||||||
|
$query->select($db->quoteName(array('properties', 'short_description', 'description')));
|
||||||
|
$query->from($db->quoteName('#__componentbuilder_fieldtype'));
|
||||||
|
$query->where($db->quoteName('published') . ' = 1');
|
||||||
|
$query->where($db->quoteName($type) . ' = '. $value);
|
||||||
|
|
||||||
|
// Reset the query using our newly populated query object.
|
||||||
|
$db->setQuery($query);
|
||||||
|
$db->execute();
|
||||||
|
if ($db->getNumRows())
|
||||||
|
{
|
||||||
|
$result = $db->loadObject();
|
||||||
|
$properties = json_decode($result->properties,true);
|
||||||
|
$field = array(
|
||||||
|
'subform' => array(),
|
||||||
|
'nameListOptions' => array(),
|
||||||
|
'values' => "<field ",
|
||||||
|
'values_description' => '<table class="uk-table uk-table-hover uk-table-striped uk-table-condensed">',
|
||||||
|
'short_description' => $result->short_description,
|
||||||
|
'description' => $result->description);
|
||||||
|
// number pointer
|
||||||
|
$nr = 0;
|
||||||
|
// set the headers
|
||||||
|
$field['values_description'] .= '<thead><tr><th class="uk-text-right">'.JText::_('COM_COMPONENTBUILDER_PROPERTY').'</th><th>'.JText::_('COM_COMPONENTBUILDER_EXAMPLE').'</th><th>'.JText::_('COM_COMPONENTBUILDER_DESCRIPTION').'</th></thead><tbody>';
|
||||||
|
foreach ($properties as $property)
|
||||||
|
{
|
||||||
|
$example = (isset($property['example']) && self::checkString($property['example'])) ? self::shorten($property['example'], 30) : '';
|
||||||
|
$field['values_description'] .= '<tr><td class="uk-text-right"><code>'.$property['name'].'</code></td><td>'.$example.'</td><td>'.$property['description'].'</td></tr>';
|
||||||
|
// check if we should load the value
|
||||||
|
$value = self::getValueFromXMLstring($xml, $property['name']);
|
||||||
|
if(self::checkArray($settings) && isset($settings[$property['name']]))
|
||||||
|
{
|
||||||
|
// add the xml values
|
||||||
|
$field['values'] .= "\n\t".$property['name'].'="'.$settings[$property['name']].'" ';
|
||||||
|
// add the json values
|
||||||
|
$field['subform']['properties'.$nr] = array('name' => $property['name'], 'value' => $settings[$property['name']]);
|
||||||
|
// add the name List Options as set
|
||||||
|
$field['nameListOptionsSet'][$property['name']] = $property['name'];
|
||||||
|
}
|
||||||
|
elseif (!$xml || $value)
|
||||||
|
{
|
||||||
|
// add the xml values
|
||||||
|
$field['values'] .= "\n\t" . $property['name'] . '="'. ($value) ? $value : $property['example'] .'" ';
|
||||||
|
// add the json values
|
||||||
|
$field['subform']['properties' . $nr] = array('name' => $property['name'], 'value' => ($value) ? $value : $property['example'], 'desc' => $property['description']);
|
||||||
|
}
|
||||||
|
// add the name List Options
|
||||||
|
$field['nameListOptions'][$property['name']] = $property['name'];
|
||||||
|
// increment the number
|
||||||
|
$nr++;
|
||||||
|
}
|
||||||
|
$field['values'] .= "\n/>";
|
||||||
|
$field['values_description'] .= '</tbody></table>';
|
||||||
|
// return found field options
|
||||||
|
return $field;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getValueFromXMLstring($xml, $get)
|
||||||
|
{
|
||||||
|
if (self::checkString($xml))
|
||||||
|
{
|
||||||
|
$value = self::getBetween($xml, $get.'="', '"');
|
||||||
|
if (self::checkString($value))
|
||||||
|
{
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The zipper method
|
* The zipper method
|
||||||
*
|
*
|
||||||
@ -1661,50 +1740,6 @@ abstract class ComponentbuilderHelper
|
|||||||
return $klaar;
|
return $klaar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static function getFieldOptions($value, $type, $settings = array())
|
|
||||||
{
|
|
||||||
// Get a db connection.
|
|
||||||
$db = JFactory::getDbo();
|
|
||||||
|
|
||||||
// Create a new query object.
|
|
||||||
$query = $db->getQuery(true);
|
|
||||||
$query->select($db->quoteName(array('properties', 'short_description', 'description')));
|
|
||||||
$query->from($db->quoteName('#__componentbuilder_fieldtype'));
|
|
||||||
$query->where($db->quoteName('published') . ' = 1');
|
|
||||||
$query->where($db->quoteName($type) . ' = '. $value);
|
|
||||||
|
|
||||||
// Reset the query using our newly populated query object.
|
|
||||||
$db->setQuery($query);
|
|
||||||
$db->execute();
|
|
||||||
if ($db->getNumRows())
|
|
||||||
{
|
|
||||||
$result = $db->loadObject();
|
|
||||||
$properties = json_decode($result->properties,true);
|
|
||||||
$field = array('values' => "<field ", 'values_description' => '<table class="uk-table uk-table-hover uk-table-striped uk-table-condensed">', 'short_description' => $result->short_description, 'description' => $result->description);
|
|
||||||
// set the headers
|
|
||||||
$field['values_description'] .= '<thead><tr><th class="uk-text-right">'.JText::_('COM_COMPONENTBUILDER_PROPERTY').'</th><th>'.JText::_('COM_COMPONENTBUILDER_EXAMPLE').'</th><th>'.JText::_('COM_COMPONENTBUILDER_DESCRIPTION').'</th></thead><tbody>';
|
|
||||||
foreach ($properties as $property)
|
|
||||||
{
|
|
||||||
$example = (isset($property['example']) && self::checkString($property['example'])) ? self::shorten($property['example'], 30) : '';
|
|
||||||
$field['values_description'] .= '<tr><td class="uk-text-right"><code>'.$property['name'].'</code></td><td>'.$example.'</td><td>'.$property['description'].'</td></tr>';
|
|
||||||
if(isset($settings[$property['name']]))
|
|
||||||
{
|
|
||||||
$field['values'] .= "\n\t".$property['name'].'="'.$settings[$property['name']].'" ';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$field['values'] .= "\n\t".$property['name'].'="'.$property['example'].'" ';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$field['values'] .= "\n/>";
|
|
||||||
$field['values_description'] .= '</tbody></table>';
|
|
||||||
// return found field options
|
|
||||||
return $field;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the basic localkey
|
* the basic localkey
|
||||||
**/
|
**/
|
||||||
|
@ -3782,11 +3782,11 @@ COM_COMPONENTBUILDER_FIELD_DATALENGHT_OTHER_MESSAGE="Error! Please add other dat
|
|||||||
COM_COMPONENTBUILDER_FIELD_DATATYPE="Datatype"
|
COM_COMPONENTBUILDER_FIELD_DATATYPE="Datatype"
|
||||||
COM_COMPONENTBUILDER_FIELD_DATATYPE_DESCRIPTION="The data type for mysql"
|
COM_COMPONENTBUILDER_FIELD_DATATYPE_DESCRIPTION="The data type for mysql"
|
||||||
COM_COMPONENTBUILDER_FIELD_DATATYPE_LABEL="Data Type"
|
COM_COMPONENTBUILDER_FIELD_DATATYPE_LABEL="Data Type"
|
||||||
|
COM_COMPONENTBUILDER_FIELD_DATA_BASE="Data Base"
|
||||||
COM_COMPONENTBUILDER_FIELD_DATE="DATE"
|
COM_COMPONENTBUILDER_FIELD_DATE="DATE"
|
||||||
COM_COMPONENTBUILDER_FIELD_DATETIME="DATETIME"
|
COM_COMPONENTBUILDER_FIELD_DATETIME="DATETIME"
|
||||||
COM_COMPONENTBUILDER_FIELD_DECIMAL="DECIMAL"
|
COM_COMPONENTBUILDER_FIELD_DECIMAL="DECIMAL"
|
||||||
COM_COMPONENTBUILDER_FIELD_DEFAULT="Default"
|
COM_COMPONENTBUILDER_FIELD_DEFAULT="Default"
|
||||||
COM_COMPONENTBUILDER_FIELD_DETAILS="Details"
|
|
||||||
COM_COMPONENTBUILDER_FIELD_DOUBLE="DOUBLE"
|
COM_COMPONENTBUILDER_FIELD_DOUBLE="DOUBLE"
|
||||||
COM_COMPONENTBUILDER_FIELD_EDIT="Editing the Field"
|
COM_COMPONENTBUILDER_FIELD_EDIT="Editing the Field"
|
||||||
COM_COMPONENTBUILDER_FIELD_ELEVEN="11"
|
COM_COMPONENTBUILDER_FIELD_ELEVEN="11"
|
||||||
@ -3933,6 +3933,7 @@ COM_COMPONENTBUILDER_FIELD_PERMISSION="Permissions"
|
|||||||
COM_COMPONENTBUILDER_FIELD_PUBLISHING="Publishing"
|
COM_COMPONENTBUILDER_FIELD_PUBLISHING="Publishing"
|
||||||
COM_COMPONENTBUILDER_FIELD_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Field to customise the alias."
|
COM_COMPONENTBUILDER_FIELD_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Field to customise the alias."
|
||||||
COM_COMPONENTBUILDER_FIELD_SCRIPTS="Scripts"
|
COM_COMPONENTBUILDER_FIELD_SCRIPTS="Scripts"
|
||||||
|
COM_COMPONENTBUILDER_FIELD_SET_PROPERTIES="Set Properties"
|
||||||
COM_COMPONENTBUILDER_FIELD_SEVEN="7"
|
COM_COMPONENTBUILDER_FIELD_SEVEN="7"
|
||||||
COM_COMPONENTBUILDER_FIELD_SIXTY_FOUR="64"
|
COM_COMPONENTBUILDER_FIELD_SIXTY_FOUR="64"
|
||||||
COM_COMPONENTBUILDER_FIELD_STATUS="Status"
|
COM_COMPONENTBUILDER_FIELD_STATUS="Status"
|
||||||
@ -3945,15 +3946,13 @@ COM_COMPONENTBUILDER_FIELD_TIME="TIME"
|
|||||||
COM_COMPONENTBUILDER_FIELD_TINYINT="TINYINT"
|
COM_COMPONENTBUILDER_FIELD_TINYINT="TINYINT"
|
||||||
COM_COMPONENTBUILDER_FIELD_TWO_HUNDRED_AND_FIFTY_FIVE="255"
|
COM_COMPONENTBUILDER_FIELD_TWO_HUNDRED_AND_FIFTY_FIVE="255"
|
||||||
COM_COMPONENTBUILDER_FIELD_TWO_THOUSAND_AND_FORTY_EIGHT="2048"
|
COM_COMPONENTBUILDER_FIELD_TWO_THOUSAND_AND_FORTY_EIGHT="2048"
|
||||||
|
COM_COMPONENTBUILDER_FIELD_TYPE_INFO="Type Info"
|
||||||
COM_COMPONENTBUILDER_FIELD_UNIQUE_KEY="UNIQUE KEY"
|
COM_COMPONENTBUILDER_FIELD_UNIQUE_KEY="UNIQUE KEY"
|
||||||
COM_COMPONENTBUILDER_FIELD_VARCHAR="VARCHAR"
|
COM_COMPONENTBUILDER_FIELD_VARCHAR="VARCHAR"
|
||||||
COM_COMPONENTBUILDER_FIELD_VERSION_DESC="A count of the number of times this Field has been revised."
|
COM_COMPONENTBUILDER_FIELD_VERSION_DESC="A count of the number of times this Field has been revised."
|
||||||
COM_COMPONENTBUILDER_FIELD_VERSION_LABEL="Revision"
|
COM_COMPONENTBUILDER_FIELD_VERSION_LABEL="Revision"
|
||||||
COM_COMPONENTBUILDER_FIELD_WHMCSKEY_ENCRYPTION="WHMCS-key Encryption"
|
COM_COMPONENTBUILDER_FIELD_WHMCSKEY_ENCRYPTION="WHMCS-key Encryption"
|
||||||
COM_COMPONENTBUILDER_FIELD_XML="Xml"
|
COM_COMPONENTBUILDER_FIELD_XML="Xml"
|
||||||
COM_COMPONENTBUILDER_FIELD_XML_DESCRIPTION="Text Area"
|
|
||||||
COM_COMPONENTBUILDER_FIELD_XML_HINT="Field XML Go Here"
|
|
||||||
COM_COMPONENTBUILDER_FIELD_XML_LABEL="XML field definition (Please set the field details here to fit your needs)"
|
|
||||||
COM_COMPONENTBUILDER_FIELD_YES="Yes"
|
COM_COMPONENTBUILDER_FIELD_YES="Yes"
|
||||||
COM_COMPONENTBUILDER_FIELD_ZERO="0"
|
COM_COMPONENTBUILDER_FIELD_ZERO="0"
|
||||||
COM_COMPONENTBUILDER_FILE="File"
|
COM_COMPONENTBUILDER_FILE="File"
|
||||||
@ -5327,11 +5326,13 @@ COM_COMPONENTBUILDER_NO_ACCESS_GRANTED="No Access Granted!"
|
|||||||
COM_COMPONENTBUILDER_NO_COMPONENTS_WERE_SELECTED_PLEASE_MAKE_A_SELECTION_AND_TRY_AGAIN="No components were selected, please make a selection and try again!"
|
COM_COMPONENTBUILDER_NO_COMPONENTS_WERE_SELECTED_PLEASE_MAKE_A_SELECTION_AND_TRY_AGAIN="No components were selected, please make a selection and try again!"
|
||||||
COM_COMPONENTBUILDER_NO_CRONJOB_PATH_FOUND_FOR_S="No cronjob path found for (%s)"
|
COM_COMPONENTBUILDER_NO_CRONJOB_PATH_FOUND_FOR_S="No cronjob path found for (%s)"
|
||||||
COM_COMPONENTBUILDER_NO_CRONJOB_PATH_FOUND_SINCE_INCORRECT_TYPE_REQUESTED="No cronjob path found since incorrect type requested."
|
COM_COMPONENTBUILDER_NO_CRONJOB_PATH_FOUND_SINCE_INCORRECT_TYPE_REQUESTED="No cronjob path found since incorrect type requested."
|
||||||
|
COM_COMPONENTBUILDER_NO_DESCRIPTION_FOUND="No description found."
|
||||||
COM_COMPONENTBUILDER_NO_FILES_LINKED="No Files Linked"
|
COM_COMPONENTBUILDER_NO_FILES_LINKED="No Files Linked"
|
||||||
COM_COMPONENTBUILDER_NO_FOUND="No Found"
|
COM_COMPONENTBUILDER_NO_FOUND="No Found"
|
||||||
COM_COMPONENTBUILDER_NO_ITEM_FOUND="No Item Found"
|
COM_COMPONENTBUILDER_NO_ITEM_FOUND="No Item Found"
|
||||||
COM_COMPONENTBUILDER_NO_KEYS_WERE_FOUND_TO_ADD_AN_EXPORT_KEY_SIMPLY_OPEN_THE_COMPONENT_GO_TO_THE_TAB_CALLED_SETTINGS_BOTTOM_RIGHT_THERE_IS_A_FIELD_CALLED_EXPORT_KEY="No keys were found. To add an export key simply open the component, go to the tab called settings, bottom right there is a field called Export Key."
|
COM_COMPONENTBUILDER_NO_KEYS_WERE_FOUND_TO_ADD_AN_EXPORT_KEY_SIMPLY_OPEN_THE_COMPONENT_GO_TO_THE_TAB_CALLED_SETTINGS_BOTTOM_RIGHT_THERE_IS_A_FIELD_CALLED_EXPORT_KEY="No keys were found. To add an export key simply open the component, go to the tab called settings, bottom right there is a field called Export Key."
|
||||||
COM_COMPONENTBUILDER_NO_NEED_TO_GET_IT_SINCE_IT_IS_ALREADY_IN_SYNC_WITH_YOUR_LOCAL_VERSION="No need to get it since it is already in sync with your local version"
|
COM_COMPONENTBUILDER_NO_NEED_TO_GET_IT_SINCE_IT_IS_ALREADY_IN_SYNC_WITH_YOUR_LOCAL_VERSION="No need to get it since it is already in sync with your local version"
|
||||||
|
COM_COMPONENTBUILDER_NO_RESULTS_MATCH="No results match"
|
||||||
COM_COMPONENTBUILDER_NO_SNIPPETS_WERE_SELECTED_PLEASE_MAKE_A_SELECTION_AND_TRY_AGAIN="No snippets were selected, please make a selection and try again!"
|
COM_COMPONENTBUILDER_NO_SNIPPETS_WERE_SELECTED_PLEASE_MAKE_A_SELECTION_AND_TRY_AGAIN="No snippets were selected, please make a selection and try again!"
|
||||||
COM_COMPONENTBUILDER_NO_S_FOUND="No %s Found"
|
COM_COMPONENTBUILDER_NO_S_FOUND="No %s Found"
|
||||||
COM_COMPONENTBUILDER_NO_S_HAVE_BEEN_LINKED_TO_THIS_VIEW_SOON_AS_THIS_IS_DONE_IT_WILL_BE_DISPLAYED_HERE="No %s have been linked to this view. Soon as this is done it will be displayed here."
|
COM_COMPONENTBUILDER_NO_S_HAVE_BEEN_LINKED_TO_THIS_VIEW_SOON_AS_THIS_IS_DONE_IT_WILL_BE_DISPLAYED_HERE="No %s have been linked to this view. Soon as this is done it will be displayed here."
|
||||||
@ -5368,7 +5369,11 @@ COM_COMPONENTBUILDER_PLEASE_SELECT_A_COMPONENT_THAT_YOU_WOULD_LIKE_TO_COMPILE="P
|
|||||||
COM_COMPONENTBUILDER_PLEASE_TRY_AGAIN_LATER="Please try again later"
|
COM_COMPONENTBUILDER_PLEASE_TRY_AGAIN_LATER="Please try again later"
|
||||||
COM_COMPONENTBUILDER_PLEASE_WAIT_CLEARING_THE_TMP_FOLDER="Please wait! Clearing the tmp folder"
|
COM_COMPONENTBUILDER_PLEASE_WAIT_CLEARING_THE_TMP_FOLDER="Please wait! Clearing the tmp folder"
|
||||||
COM_COMPONENTBUILDER_PLEASE_WAIT_LOADING="Please wait, loading"
|
COM_COMPONENTBUILDER_PLEASE_WAIT_LOADING="Please wait, loading"
|
||||||
|
COM_COMPONENTBUILDER_PROPERTIESBR_SMALLHERE_YOU_CAN_SET_THE_PROPERTIES_FOR_THIS_FIELDSMALL="Properties<br /><small>Here you can set the properties for this field</small>"
|
||||||
COM_COMPONENTBUILDER_PROPERTY="Property"
|
COM_COMPONENTBUILDER_PROPERTY="Property"
|
||||||
|
COM_COMPONENTBUILDER_PROPERTY_ALREADY_SELECTED_TRY_ANOTHER="Property already selected, try another."
|
||||||
|
COM_COMPONENTBUILDER_PROPERTY_NAME="Property Name"
|
||||||
|
COM_COMPONENTBUILDER_PROPERTY_VALUE="Property Value"
|
||||||
COM_COMPONENTBUILDER_PUBLIC_ACCESS="Public Access"
|
COM_COMPONENTBUILDER_PUBLIC_ACCESS="Public Access"
|
||||||
COM_COMPONENTBUILDER_PUBLISHED="Published"
|
COM_COMPONENTBUILDER_PUBLISHED="Published"
|
||||||
COM_COMPONENTBUILDER_PUBLISHING="Publishing"
|
COM_COMPONENTBUILDER_PUBLISHING="Publishing"
|
||||||
@ -5389,7 +5394,9 @@ COM_COMPONENTBUILDER_SAVE_WARNING="The value already existed so please select an
|
|||||||
COM_COMPONENTBUILDER_SBR_YOU_CAN_ADD_AN_BACCESS_TOKENB_TO_GETBIBLE_GLOBAL_OPTIONS_TO_MAKE_AUTHENTICATED_REQUESTS_AN_ACCESS_TOKEN_WITH_ONLY_PUBLIC_ACCESS_WILL_DO="%s<br />You can add an <b>access token<b/> to getBible global options to make authenticated requests. An access token with only public access will do."
|
COM_COMPONENTBUILDER_SBR_YOU_CAN_ADD_AN_BACCESS_TOKENB_TO_GETBIBLE_GLOBAL_OPTIONS_TO_MAKE_AUTHENTICATED_REQUESTS_AN_ACCESS_TOKEN_WITH_ONLY_PUBLIC_ACCESS_WILL_DO="%s<br />You can add an <b>access token<b/> to getBible global options to make authenticated requests. An access token with only public access will do."
|
||||||
COM_COMPONENTBUILDER_SEARCHABLE="Searchable"
|
COM_COMPONENTBUILDER_SEARCHABLE="Searchable"
|
||||||
COM_COMPONENTBUILDER_SEE_ALL_IMPORT_INFO="See All Import Info"
|
COM_COMPONENTBUILDER_SEE_ALL_IMPORT_INFO="See All Import Info"
|
||||||
|
COM_COMPONENTBUILDER_SELECTION="selection"
|
||||||
COM_COMPONENTBUILDER_SELECT_AN_OPTION="Select an option"
|
COM_COMPONENTBUILDER_SELECT_AN_OPTION="Select an option"
|
||||||
|
COM_COMPONENTBUILDER_SELECT_A_PROPERTY="Select a property"
|
||||||
COM_COMPONENTBUILDER_SELECT_A_SNIPPET="select a snippet"
|
COM_COMPONENTBUILDER_SELECT_A_SNIPPET="select a snippet"
|
||||||
COM_COMPONENTBUILDER_SELECT_THE_COMPONENT_TO_COMPILE="Select the component to compile"
|
COM_COMPONENTBUILDER_SELECT_THE_COMPONENT_TO_COMPILE="Select the component to compile"
|
||||||
COM_COMPONENTBUILDER_SELECT_THE_COMPONENT_YOUR_WOULD_LIKE_TO_IMPORT="Select the component your would like to import."
|
COM_COMPONENTBUILDER_SELECT_THE_COMPONENT_YOUR_WOULD_LIKE_TO_IMPORT="Select the component your would like to import."
|
||||||
@ -6419,6 +6426,7 @@ COM_COMPONENTBUILDER_TYPE_ASC="Type (Asc)"
|
|||||||
COM_COMPONENTBUILDER_TYPE_DESC="Type (Desc)"
|
COM_COMPONENTBUILDER_TYPE_DESC="Type (Desc)"
|
||||||
COM_COMPONENTBUILDER_TYPE_ERROR="Type Error"
|
COM_COMPONENTBUILDER_TYPE_ERROR="Type Error"
|
||||||
COM_COMPONENTBUILDER_TYPE_NAME="Type - Name"
|
COM_COMPONENTBUILDER_TYPE_NAME="Type - Name"
|
||||||
|
COM_COMPONENTBUILDER_TYPE_OR_SELECT_SOME_OPTIONS="Type or select some options"
|
||||||
COM_COMPONENTBUILDER_UNACTIVE_ONLY_FOUR_TEXT_FIELD="Unactive (only 4 text_field)"
|
COM_COMPONENTBUILDER_UNACTIVE_ONLY_FOUR_TEXT_FIELD="Unactive (only 4 text_field)"
|
||||||
COM_COMPONENTBUILDER_UNDERNEATH_TABS="Underneath Tabs"
|
COM_COMPONENTBUILDER_UNDERNEATH_TABS="Underneath Tabs"
|
||||||
COM_COMPONENTBUILDER_UPDATE="Update"
|
COM_COMPONENTBUILDER_UPDATE="Update"
|
||||||
@ -6514,6 +6522,7 @@ COM_COMPONENTBUILDER_VALIDATION_RULE_SHORT_DESCRIPTION_MESSAGE="Error! Please ad
|
|||||||
COM_COMPONENTBUILDER_VALIDATION_RULE_STATUS="Status"
|
COM_COMPONENTBUILDER_VALIDATION_RULE_STATUS="Status"
|
||||||
COM_COMPONENTBUILDER_VALIDATION_RULE_VERSION_DESC="A count of the number of times this Validation Rule has been revised."
|
COM_COMPONENTBUILDER_VALIDATION_RULE_VERSION_DESC="A count of the number of times this Validation Rule has been revised."
|
||||||
COM_COMPONENTBUILDER_VALIDATION_RULE_VERSION_LABEL="Revision"
|
COM_COMPONENTBUILDER_VALIDATION_RULE_VERSION_LABEL="Revision"
|
||||||
|
COM_COMPONENTBUILDER_VALUE="Value"
|
||||||
COM_COMPONENTBUILDER_VDM_NOTICE_BOARD="VDM Notice Board"
|
COM_COMPONENTBUILDER_VDM_NOTICE_BOARD="VDM Notice Board"
|
||||||
COM_COMPONENTBUILDER_VDM_PACKAGES="VDM Packages"
|
COM_COMPONENTBUILDER_VDM_PACKAGES="VDM Packages"
|
||||||
COM_COMPONENTBUILDER_VERSION="Version"
|
COM_COMPONENTBUILDER_VERSION="Version"
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
@version 2.7.x
|
@version 2.7.x
|
||||||
@created 30th April, 2015
|
@created 30th April, 2015
|
||||||
@package Component Builder
|
@package Component Builder
|
||||||
@subpackage scripts_left.php
|
@subpackage data_base_left.php
|
||||||
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
|
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
|
||||||
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
|
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
|
||||||
@copyright Copyright (C) 2015. All Rights Reserved
|
@copyright Copyright (C) 2015. All Rights Reserved
|
||||||
@ -30,10 +30,15 @@ defined('_JEXEC') or die('Restricted access');
|
|||||||
$form = $displayData->getForm();
|
$form = $displayData->getForm();
|
||||||
|
|
||||||
$fields = $displayData->get('fields') ?: array(
|
$fields = $displayData->get('fields') ?: array(
|
||||||
|
'datatype',
|
||||||
|
'datalenght',
|
||||||
|
'datalenght_other',
|
||||||
|
'css_views',
|
||||||
|
'datadefault_other',
|
||||||
'add_css_view',
|
'add_css_view',
|
||||||
'css_view',
|
'css_view',
|
||||||
'add_css_views',
|
'add_css_views',
|
||||||
'css_views'
|
'datadefault'
|
||||||
);
|
);
|
||||||
|
|
||||||
$hiddenFields = $displayData->get('hidden_fields') ?: array();
|
$hiddenFields = $displayData->get('hidden_fields') ?: array();
|
@ -13,7 +13,7 @@
|
|||||||
@version 2.7.x
|
@version 2.7.x
|
||||||
@created 30th April, 2015
|
@created 30th April, 2015
|
||||||
@package Component Builder
|
@package Component Builder
|
||||||
@subpackage details_right.php
|
@subpackage data_base_right.php
|
||||||
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
|
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
|
||||||
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
|
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
|
||||||
@copyright Copyright (C) 2015. All Rights Reserved
|
@copyright Copyright (C) 2015. All Rights Reserved
|
||||||
@ -30,7 +30,10 @@ defined('_JEXEC') or die('Restricted access');
|
|||||||
$form = $displayData->getForm();
|
$form = $displayData->getForm();
|
||||||
|
|
||||||
$fields = $displayData->get('fields') ?: array(
|
$fields = $displayData->get('fields') ?: array(
|
||||||
'helpnote'
|
'indexes',
|
||||||
|
'null_switch',
|
||||||
|
'store',
|
||||||
|
'note_whmcs_encryption'
|
||||||
);
|
);
|
||||||
|
|
||||||
$hiddenFields = $displayData->get('hidden_fields') ?: array();
|
$hiddenFields = $displayData->get('hidden_fields') ?: array();
|
@ -1,65 +0,0 @@
|
|||||||
<?php
|
|
||||||
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
|
||||||
__ __ _ _____ _ _ __ __ _ _ _
|
|
||||||
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
|
||||||
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
|
||||||
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
|
||||||
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
|
||||||
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
|
||||||
| |
|
|
||||||
|_|
|
|
||||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
|
||||||
|
|
||||||
@version 2.7.x
|
|
||||||
@created 30th April, 2015
|
|
||||||
@package Component Builder
|
|
||||||
@subpackage details_left.php
|
|
||||||
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
|
|
||||||
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
|
|
||||||
@copyright Copyright (C) 2015. All Rights Reserved
|
|
||||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
|
||||||
|
|
||||||
Builds Complex Joomla Components
|
|
||||||
|
|
||||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
// No direct access to this file
|
|
||||||
|
|
||||||
defined('_JEXEC') or die('Restricted access');
|
|
||||||
|
|
||||||
$form = $displayData->getForm();
|
|
||||||
|
|
||||||
$fields = $displayData->get('fields') ?: array(
|
|
||||||
'fieldtype',
|
|
||||||
'name',
|
|
||||||
'catid',
|
|
||||||
'datatype',
|
|
||||||
'datalenght',
|
|
||||||
'datalenght_other',
|
|
||||||
'datadefault',
|
|
||||||
'datadefault_other',
|
|
||||||
'indexes',
|
|
||||||
'null_switch',
|
|
||||||
'store',
|
|
||||||
'note_whmcs_encryption'
|
|
||||||
);
|
|
||||||
|
|
||||||
$hiddenFields = $displayData->get('hidden_fields') ?: array();
|
|
||||||
|
|
||||||
foreach ($fields as $field)
|
|
||||||
{
|
|
||||||
$field = is_array($field) ? $field : array($field);
|
|
||||||
foreach ($field as $f)
|
|
||||||
{
|
|
||||||
if ($form->getField($f))
|
|
||||||
{
|
|
||||||
if (in_array($f, $hiddenFields))
|
|
||||||
{
|
|
||||||
$form->setFieldAttribute($f, 'type', 'hidden');
|
|
||||||
}
|
|
||||||
|
|
||||||
echo $form->renderField($f);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
43
admin/layouts/field/set_properties_above.php
Normal file
43
admin/layouts/field/set_properties_above.php
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
||||||
|
__ __ _ _____ _ _ __ __ _ _ _
|
||||||
|
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
||||||
|
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
||||||
|
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
||||||
|
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
||||||
|
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
||||||
|
| |
|
||||||
|
|_|
|
||||||
|
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
|
@version 2.7.x
|
||||||
|
@created 30th April, 2015
|
||||||
|
@package Component Builder
|
||||||
|
@subpackage set_properties_above.php
|
||||||
|
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
|
||||||
|
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
|
||||||
|
@copyright Copyright (C) 2015. All Rights Reserved
|
||||||
|
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
|
||||||
|
Builds Complex Joomla Components
|
||||||
|
|
||||||
|
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
// No direct access to this file
|
||||||
|
|
||||||
|
defined('_JEXEC') or die('Restricted access');
|
||||||
|
|
||||||
|
$form = $displayData->getForm();
|
||||||
|
|
||||||
|
$fields = array(
|
||||||
|
'fieldtype',
|
||||||
|
'name',
|
||||||
|
'catid'
|
||||||
|
);
|
||||||
|
|
||||||
|
?>
|
||||||
|
<div class="form-inline form-inline-header">
|
||||||
|
<?php foreach($fields as $field){
|
||||||
|
echo $form->renderField($field);
|
||||||
|
} ?>
|
||||||
|
</div>
|
@ -13,7 +13,7 @@
|
|||||||
@version 2.7.x
|
@version 2.7.x
|
||||||
@created 30th April, 2015
|
@created 30th April, 2015
|
||||||
@package Component Builder
|
@package Component Builder
|
||||||
@subpackage details_fullwidth.php
|
@subpackage set_properties_fullwidth.php
|
||||||
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
|
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
|
||||||
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
|
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
|
||||||
@copyright Copyright (C) 2015. All Rights Reserved
|
@copyright Copyright (C) 2015. All Rights Reserved
|
@ -13,7 +13,7 @@
|
|||||||
@version 2.7.x
|
@version 2.7.x
|
||||||
@created 30th April, 2015
|
@created 30th April, 2015
|
||||||
@package Component Builder
|
@package Component Builder
|
||||||
@subpackage details_under.php
|
@subpackage set_properties_under.php
|
||||||
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
|
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
|
||||||
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
|
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
|
||||||
@copyright Copyright (C) 2015. All Rights Reserved
|
@copyright Copyright (C) 2015. All Rights Reserved
|
48
admin/layouts/field/type_info_fullwidth.php
Normal file
48
admin/layouts/field/type_info_fullwidth.php
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
<?php
|
||||||
|
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
||||||
|
__ __ _ _____ _ _ __ __ _ _ _
|
||||||
|
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
||||||
|
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
||||||
|
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
||||||
|
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
||||||
|
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
||||||
|
| |
|
||||||
|
|_|
|
||||||
|
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
|
@version 2.7.x
|
||||||
|
@created 30th April, 2015
|
||||||
|
@package Component Builder
|
||||||
|
@subpackage type_info_fullwidth.php
|
||||||
|
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
|
||||||
|
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
|
||||||
|
@copyright Copyright (C) 2015. All Rights Reserved
|
||||||
|
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
|
||||||
|
Builds Complex Joomla Components
|
||||||
|
|
||||||
|
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
// No direct access to this file
|
||||||
|
|
||||||
|
defined('_JEXEC') or die('Restricted access');
|
||||||
|
|
||||||
|
$form = $displayData->getForm();
|
||||||
|
|
||||||
|
$fields = $displayData->get('fields') ?: array(
|
||||||
|
'helpnote'
|
||||||
|
);
|
||||||
|
|
||||||
|
?>
|
||||||
|
<div class="form-vertical">
|
||||||
|
<?php foreach($fields as $field): ?>
|
||||||
|
<div class="control-group">
|
||||||
|
<div class="control-label">
|
||||||
|
<?php echo $form->getLabel($field); ?>
|
||||||
|
</div>
|
||||||
|
<div class="controls">
|
||||||
|
<?php echo $form->getInput($field); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</div>
|
@ -2200,14 +2200,190 @@ class ComponentbuilderModelAjax extends JModelList
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Used in field
|
// Used in field
|
||||||
public function getFieldOptions($id)
|
public function getFieldOptions($fieldtype)
|
||||||
{
|
{
|
||||||
if ($field = ComponentbuilderHelper::getFieldOptions($id, 'id'))
|
// get the xml
|
||||||
|
$xml = $this->getFieldXML($fieldtype);
|
||||||
|
// now get the field options
|
||||||
|
if ($field = ComponentbuilderHelper::getFieldOptions($fieldtype, 'id', null, $xml))
|
||||||
{
|
{
|
||||||
|
// get subform field object
|
||||||
|
$subform = $this->buildFieldOptionsSubform($field['subform'], $field['nameListOptions']);
|
||||||
|
// load the html
|
||||||
|
$field['subform'] = '<div class="control-label prop_removal">'. $subform->label . '</div><div class="controls prop_removal">' . $subform->input . '</div>';
|
||||||
// return found field options
|
// return found field options
|
||||||
return $field;
|
return $field;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function buildFieldOptionsSubform($values, $nameListOptions = null)
|
||||||
|
{
|
||||||
|
// get the subform
|
||||||
|
$subform = JFormHelper::loadFieldType('subform', true);
|
||||||
|
// start building the subform field XML
|
||||||
|
$subformXML = new SimpleXMLElement('<field/>');
|
||||||
|
// subform attributes
|
||||||
|
$subformAttribute = array(
|
||||||
|
'type' => 'subform',
|
||||||
|
'name' => 'properties',
|
||||||
|
'label' => 'COM_COMPONENTBUILDER_PROPERTIESBR_SMALLHERE_YOU_CAN_SET_THE_PROPERTIES_FOR_THIS_FIELDSMALL',
|
||||||
|
'layout' => 'joomla.form.field.subform.repeatable-table',
|
||||||
|
'multiple' => 'true',
|
||||||
|
'icon' => 'list',
|
||||||
|
'max' => (int) count($nameListOptions));
|
||||||
|
// load the subform attributes
|
||||||
|
ComponentbuilderHelper::xmlAddAttributes($subformXML, $subformAttribute);
|
||||||
|
// now add the subform child form
|
||||||
|
$childForm = $subformXML->addChild('form');
|
||||||
|
// child form attributes
|
||||||
|
$childFormAttribute = array(
|
||||||
|
'hidden' => 'true',
|
||||||
|
'name' => 'list_properties',
|
||||||
|
'repeat' => 'true');
|
||||||
|
// load the child form attributes
|
||||||
|
ComponentbuilderHelper::xmlAddAttributes($childForm, $childFormAttribute);
|
||||||
|
|
||||||
|
// start building the name field XML
|
||||||
|
$nameXML = new SimpleXMLElement('<field/>');
|
||||||
|
// subform attributes
|
||||||
|
$nameAttribute = array(
|
||||||
|
'type' => (ComponentbuilderHelper::checkArray($nameListOptions)) ? 'list' : 'text',
|
||||||
|
'name' => 'name',
|
||||||
|
'label' => 'COM_COMPONENTBUILDER_PROPERTY',
|
||||||
|
'size' => '40',
|
||||||
|
'maxlength' => '150',
|
||||||
|
'class' => (ComponentbuilderHelper::checkArray($nameListOptions)) ? 'list_class field_list_name_options' : 'text_area',
|
||||||
|
'filter' => 'STRING');
|
||||||
|
// add the hint only if not name list and description if name list is an array
|
||||||
|
if (ComponentbuilderHelper::checkArray($nameListOptions))
|
||||||
|
{
|
||||||
|
$nameAttribute['description'] = 'COM_COMPONENTBUILDER_SELECTION';
|
||||||
|
$nameAttribute['multiple'] = 'false';
|
||||||
|
$nameAttribute['onchange'] = "getFieldPropertyDesc(this)";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$nameAttribute['hint'] = 'COM_COMPONENTBUILDER_PROPERTY_NAME';
|
||||||
|
}
|
||||||
|
// load the subform attributes
|
||||||
|
ComponentbuilderHelper::xmlAddAttributes($nameXML, $nameAttribute);
|
||||||
|
// add name list if found
|
||||||
|
if (ComponentbuilderHelper::checkArray($nameListOptions))
|
||||||
|
{
|
||||||
|
ComponentbuilderHelper::xmlAddOptions($nameXML, $nameListOptions);
|
||||||
|
}
|
||||||
|
// now add the fields to the child form
|
||||||
|
ComponentbuilderHelper::xmlAppend($childForm, $nameXML);
|
||||||
|
|
||||||
|
// start building the name field XML
|
||||||
|
$valueXML = new SimpleXMLElement('<field/>');
|
||||||
|
// subform attributes
|
||||||
|
$valueAttribute = array(
|
||||||
|
'type' => 'textarea',
|
||||||
|
'name' => 'value',
|
||||||
|
'label' => 'COM_COMPONENTBUILDER_VALUE',
|
||||||
|
'rows' => '1',
|
||||||
|
'cols' => '15',
|
||||||
|
'class' => 'text_area span12',
|
||||||
|
'filter' => 'STRING',
|
||||||
|
'hint' => 'COM_COMPONENTBUILDER_PROPERTY_VALUE');
|
||||||
|
// load the subform attributes
|
||||||
|
ComponentbuilderHelper::xmlAddAttributes($valueXML, $valueAttribute);
|
||||||
|
// now add the fields to the child form
|
||||||
|
ComponentbuilderHelper::xmlAppend($childForm, $valueXML);
|
||||||
|
|
||||||
|
// start building the desc field XML
|
||||||
|
$descXML = new SimpleXMLElement('<field/>');
|
||||||
|
// subform attributes
|
||||||
|
$descAttribute = array(
|
||||||
|
'type' => 'textarea',
|
||||||
|
'name' => 'desc',
|
||||||
|
'label' => 'COM_COMPONENTBUILDER_DESCRIPTION',
|
||||||
|
'rows' => '3',
|
||||||
|
'cols' => '25',
|
||||||
|
'readonly' => 'true',
|
||||||
|
'class' => 'text_area span12',
|
||||||
|
'filter' => 'WORD',
|
||||||
|
'hint' => 'COM_COMPONENTBUILDER_SELECT_A_PROPERTY');
|
||||||
|
// load the desc attributes
|
||||||
|
ComponentbuilderHelper::xmlAddAttributes($descXML, $descAttribute);
|
||||||
|
// now add the fields to the child form
|
||||||
|
ComponentbuilderHelper::xmlAppend($childForm, $descXML);
|
||||||
|
|
||||||
|
// setup subform with values
|
||||||
|
$subform->setup($subformXML, $values);
|
||||||
|
|
||||||
|
// return subfrom object
|
||||||
|
return $subform;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getFieldPropertyDesc($fieldtype, $_property)
|
||||||
|
{
|
||||||
|
// Get a db connection.
|
||||||
|
$db = JFactory::getDbo();
|
||||||
|
|
||||||
|
// Create a new query object.
|
||||||
|
$query = $db->getQuery(true);
|
||||||
|
$query->select($db->quoteName(array('properties', 'short_description', 'description')));
|
||||||
|
$query->from($db->quoteName('#__componentbuilder_fieldtype'));
|
||||||
|
$query->where($db->quoteName('id') . ' = '. $fieldtype);
|
||||||
|
|
||||||
|
// Reset the query using our newly populated query object.
|
||||||
|
$db->setQuery($query);
|
||||||
|
$db->execute();
|
||||||
|
if ($db->getNumRows())
|
||||||
|
{
|
||||||
|
// get the result
|
||||||
|
$result = $db->loadObject();
|
||||||
|
// get the xml
|
||||||
|
$xml = $this->getFieldXML($fieldtype);
|
||||||
|
// open the properties
|
||||||
|
$properties = json_decode($result->properties,true);
|
||||||
|
// make sure we have an array
|
||||||
|
if (ComponentbuilderHelper::checkArray($properties))
|
||||||
|
{
|
||||||
|
foreach ($properties as $property)
|
||||||
|
{
|
||||||
|
if(isset($property['name']) && $_property === $property['name'])
|
||||||
|
{
|
||||||
|
// check if we should load the value
|
||||||
|
if (!$value = ComponentbuilderHelper::getValueFromXMLstring($xml, $property['name']))
|
||||||
|
{
|
||||||
|
$value = (isset($property['example']) && ComponentbuilderHelper::checkString($property['example'])) ? $property['example'] : '';
|
||||||
|
}
|
||||||
|
// return the found values
|
||||||
|
return array('value' => $value, 'desc' => $property['description']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getFieldXML($fieldtype)
|
||||||
|
{
|
||||||
|
// reset xml to null
|
||||||
|
$xml = null;
|
||||||
|
// get the view name & id
|
||||||
|
$global = $this->getViewID();
|
||||||
|
// get the xml if this view already has it set
|
||||||
|
if (!is_null($global['a_id']) && $global['a_id'] > 0 && isset($global['a_view']) && 'field' === $global['a_view'])
|
||||||
|
{
|
||||||
|
// first check field type
|
||||||
|
$_fieldType = ComponentbuilderHelper::getVar('field', $global['a_id'], 'id', 'fieldtype');
|
||||||
|
// only continue if field type is the same
|
||||||
|
if ($fieldtype == $_fieldType)
|
||||||
|
{
|
||||||
|
$xmlDB = ComponentbuilderHelper::getVar('field', $global['a_id'], 'id', 'xml');
|
||||||
|
// check if it is a string
|
||||||
|
if (ComponentbuilderHelper::checkString($xmlDB))
|
||||||
|
{
|
||||||
|
$xml = json_decode($xmlDB);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $xml;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Used in get_snippets
|
// Used in get_snippets
|
||||||
|
@ -106,28 +106,28 @@ class ComponentbuilderModelField extends JModelAdmin
|
|||||||
$item->xml = json_decode($item->xml);
|
$item->xml = json_decode($item->xml);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($item->css_view))
|
|
||||||
{
|
|
||||||
// base64 Decode css_view.
|
|
||||||
$item->css_view = base64_decode($item->css_view);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!empty($item->css_views))
|
if (!empty($item->css_views))
|
||||||
{
|
{
|
||||||
// base64 Decode css_views.
|
// base64 Decode css_views.
|
||||||
$item->css_views = base64_decode($item->css_views);
|
$item->css_views = base64_decode($item->css_views);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!empty($item->javascript_views_footer))
|
||||||
|
{
|
||||||
|
// base64 Decode javascript_views_footer.
|
||||||
|
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
|
||||||
|
}
|
||||||
|
|
||||||
if (!empty($item->javascript_view_footer))
|
if (!empty($item->javascript_view_footer))
|
||||||
{
|
{
|
||||||
// base64 Decode javascript_view_footer.
|
// base64 Decode javascript_view_footer.
|
||||||
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
|
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($item->javascript_views_footer))
|
if (!empty($item->css_view))
|
||||||
{
|
{
|
||||||
// base64 Decode javascript_views_footer.
|
// base64 Decode css_view.
|
||||||
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
|
$item->css_view = base64_decode($item->css_view);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -889,34 +889,70 @@ class ComponentbuilderModelField extends JModelAdmin
|
|||||||
$data['metadata'] = (string) $metadata;
|
$data['metadata'] = (string) $metadata;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// get the properties
|
||||||
|
$properties = $input->get('properties', null, 'ARRAY');
|
||||||
|
// make sure we have an array
|
||||||
|
if (ComponentbuilderHelper::checkArray($properties))
|
||||||
|
{
|
||||||
|
// set the bucket
|
||||||
|
$bucket = array();
|
||||||
|
foreach($properties as $property)
|
||||||
|
{
|
||||||
|
// make sure we have the correct values
|
||||||
|
if (ComponentbuilderHelper::checkArray($property) &&
|
||||||
|
isset($property['name']) && ComponentbuilderHelper::checkString($property['name']) &&
|
||||||
|
isset($property['value']) && ComponentbuilderHelper::checkString($property['value']))
|
||||||
|
{
|
||||||
|
// fix the name
|
||||||
|
$property['name'] = ComponentbuilderHelper::safeString($property['name']);
|
||||||
|
// some fixes, just in case (more can be added)
|
||||||
|
switch ($property['name'])
|
||||||
|
{
|
||||||
|
// fix the values
|
||||||
|
case 'name':
|
||||||
|
case 'type':
|
||||||
|
$property['value'] = ComponentbuilderHelper::safeString($property['value']);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// load the property
|
||||||
|
$bucket[] = "\t".$property['name'].'="'. str_replace('"', """, $property['value']).'"';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// if the bucket has been loaded
|
||||||
|
if (ComponentbuilderHelper::checkArray($bucket))
|
||||||
|
{
|
||||||
|
$data['xml'] = "<field\n".implode("\n", $bucket)."\n/>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Set the xml string to JSON string.
|
// Set the xml string to JSON string.
|
||||||
if (isset($data['xml']))
|
if (isset($data['xml']))
|
||||||
{
|
{
|
||||||
$data['xml'] = (string) json_encode($data['xml']);
|
$data['xml'] = (string) json_encode($data['xml']);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the css_view string to base64 string.
|
|
||||||
if (isset($data['css_view']))
|
|
||||||
{
|
|
||||||
$data['css_view'] = base64_encode($data['css_view']);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the css_views string to base64 string.
|
// Set the css_views string to base64 string.
|
||||||
if (isset($data['css_views']))
|
if (isset($data['css_views']))
|
||||||
{
|
{
|
||||||
$data['css_views'] = base64_encode($data['css_views']);
|
$data['css_views'] = base64_encode($data['css_views']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set the javascript_views_footer string to base64 string.
|
||||||
|
if (isset($data['javascript_views_footer']))
|
||||||
|
{
|
||||||
|
$data['javascript_views_footer'] = base64_encode($data['javascript_views_footer']);
|
||||||
|
}
|
||||||
|
|
||||||
// Set the javascript_view_footer string to base64 string.
|
// Set the javascript_view_footer string to base64 string.
|
||||||
if (isset($data['javascript_view_footer']))
|
if (isset($data['javascript_view_footer']))
|
||||||
{
|
{
|
||||||
$data['javascript_view_footer'] = base64_encode($data['javascript_view_footer']);
|
$data['javascript_view_footer'] = base64_encode($data['javascript_view_footer']);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the javascript_views_footer string to base64 string.
|
// Set the css_view string to base64 string.
|
||||||
if (isset($data['javascript_views_footer']))
|
if (isset($data['css_view']))
|
||||||
{
|
{
|
||||||
$data['javascript_views_footer'] = base64_encode($data['javascript_views_footer']);
|
$data['css_view'] = base64_encode($data['css_view']);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the Params Items to data
|
// Set the Params Items to data
|
||||||
|
@ -313,7 +313,7 @@ class ComponentbuilderModelFields extends JModelList
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$search = $db->quote('%' . $db->escape($search) . '%');
|
$search = $db->quote('%' . $db->escape($search) . '%');
|
||||||
$query->where('(a.name LIKE '.$search.' OR a.fieldtype LIKE '.$search.' OR g.name LIKE '.$search.' OR a.datatype LIKE '.$search.' OR a.indexes LIKE '.$search.' OR a.null_switch LIKE '.$search.' OR a.catid LIKE '.$search.' OR a.xml LIKE '.$search.' OR a.store LIKE '.$search.')');
|
$query->where('(a.name LIKE '.$search.' OR a.fieldtype LIKE '.$search.' OR g.name LIKE '.$search.' OR a.datatype LIKE '.$search.' OR a.indexes LIKE '.$search.' OR a.null_switch LIKE '.$search.' OR a.catid LIKE '.$search.' OR a.store LIKE '.$search.' OR a.xml LIKE '.$search.')');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -431,14 +431,14 @@ class ComponentbuilderModelFields extends JModelList
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// decode css_view
|
|
||||||
$item->css_view = base64_decode($item->css_view);
|
|
||||||
// decode css_views
|
// decode css_views
|
||||||
$item->css_views = base64_decode($item->css_views);
|
$item->css_views = base64_decode($item->css_views);
|
||||||
// decode javascript_view_footer
|
|
||||||
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
|
|
||||||
// decode javascript_views_footer
|
// decode javascript_views_footer
|
||||||
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
|
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
|
||||||
|
// decode javascript_view_footer
|
||||||
|
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
|
||||||
|
// decode css_view
|
||||||
|
$item->css_view = base64_decode($item->css_view);
|
||||||
// unset the values we don't want exported.
|
// unset the values we don't want exported.
|
||||||
unset($item->asset_id);
|
unset($item->asset_id);
|
||||||
unset($item->checked_out);
|
unset($item->checked_out);
|
||||||
|
@ -512,6 +512,9 @@ function isSet(val)
|
|||||||
|
|
||||||
jQuery(document).ready(function()
|
jQuery(document).ready(function()
|
||||||
{
|
{
|
||||||
|
// get type value
|
||||||
|
var fieldtype = jQuery("#jform_fieldtype option:selected").val();
|
||||||
|
getFieldOptions(fieldtype);
|
||||||
// get the linked details
|
// get the linked details
|
||||||
getLinked();
|
getLinked();
|
||||||
// get the validation rules
|
// get the validation rules
|
||||||
@ -569,10 +572,13 @@ function addButton(type, where, size){
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function getFieldOptions_server(fieldId){
|
// the options row id key
|
||||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.fieldOptions&format=json";
|
var rowIdKey = 'properties';
|
||||||
if(token.length > 0 && fieldId > 0){
|
|
||||||
var request = 'token='+token+'&id='+fieldId;
|
function getFieldOptions_server(fieldtype){
|
||||||
|
var getUrl = "index.php?option=com_componentbuilder&task=ajax.fieldOptions&format=json&vdm="+vastDevMod;
|
||||||
|
if(token.length > 0 && fieldtype > 0){
|
||||||
|
var request = 'token='+token+'&id='+fieldtype;
|
||||||
}
|
}
|
||||||
return jQuery.ajax({
|
return jQuery.ajax({
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
@ -583,20 +589,156 @@ function getFieldOptions_server(fieldId){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function getFieldOptions(id,setValue){
|
function getFieldOptions(fieldtype){
|
||||||
getFieldOptions_server(id).done(function(result) {
|
getFieldOptions_server(fieldtype).done(function(result) {
|
||||||
if(result.values){
|
if(result.subform){
|
||||||
if(setValue){
|
// load the list of properties
|
||||||
jQuery('textarea#jform_xml').val(result.values);
|
propertiesArray = result.nameListOptions;
|
||||||
}
|
// remove previous forms of exist
|
||||||
|
jQuery('.prop_removal').remove();
|
||||||
|
// remove the hidden jform_properties
|
||||||
|
jQuery('#jform_xml').closest('.control-group').remove();
|
||||||
|
// append to the closed to xml (hidden field)
|
||||||
|
jQuery('.note_filter_information').closest('.control-group').prepend(result.subform);
|
||||||
|
// add the watcher
|
||||||
|
rowWatcher();
|
||||||
|
// initialize the new form
|
||||||
|
jQuery('div.subform-repeatable').subformRepeatable();
|
||||||
|
// update all the list fields to only show items not selected already
|
||||||
|
propertyDynamicSet();
|
||||||
|
// set the field type info
|
||||||
jQuery('#help').remove();
|
jQuery('#help').remove();
|
||||||
jQuery('.helpNote').append('<div id="help" class="uk-scrollable-box">'+result.description+'<br />'+result.values_description+'</div>');
|
jQuery('.helpNote').append('<div id="help">'+result.description+'<br />'+result.values_description+'</div>');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getFieldPropertyDesc(field){
|
||||||
|
// get the ID
|
||||||
|
var id = jQuery(field).attr('id');
|
||||||
|
// build the target array
|
||||||
|
var target = id.split('__');
|
||||||
|
// get property value
|
||||||
|
var property = jQuery(field).val();
|
||||||
|
// first check that there isn't any of this property type already set
|
||||||
|
if (propertyIsSet(property, id)) {
|
||||||
|
// reset the selection
|
||||||
|
jQuery('#'+id).val('');
|
||||||
|
jQuery('#'+id).trigger("liszt:updated");
|
||||||
|
// give out a notice
|
||||||
|
jQuery.UIkit.notify({message: Joomla.JText._('COM_COMPONENTBUILDER_PROPERTY_ALREADY_SELECTED_TRY_ANOTHER'), timeout: 5000, status: 'warning', pos: 'top-center'});
|
||||||
|
// update the values
|
||||||
|
jQuery('#'+target[0]+'__desc').val('');
|
||||||
|
jQuery('#'+target[0]+'__value').val('');
|
||||||
|
} else {
|
||||||
|
// do a dynamic update
|
||||||
|
propertyDynamicSet();
|
||||||
|
// get type value
|
||||||
|
var fieldtype = jQuery("#jform_fieldtype option:selected").val();
|
||||||
|
getFieldPropertyDesc_server(fieldtype, property).done(function(result) {
|
||||||
|
if(result.desc && result.value){
|
||||||
|
// update the values
|
||||||
|
jQuery('#'+target[0]+'__desc').val(result.desc);
|
||||||
|
jQuery('#'+target[0]+'__value').val(result.value);
|
||||||
|
} else {
|
||||||
|
// update the values
|
||||||
|
jQuery('#'+target[0]+'__desc').val(Joomla.JText._('COM_COMPONENTBUILDER_NO_DESCRIPTION_FOUND'));
|
||||||
|
jQuery('#'+target[0]+'__value').val('');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// set properties the options
|
||||||
|
propertiesArray = {};
|
||||||
|
var propertyIdRemoved;
|
||||||
|
|
||||||
|
function propertyDynamicSet() {
|
||||||
|
propertiesAvailable = {};
|
||||||
|
propertiesSelectedArray = {};
|
||||||
|
propertiesTrackerArray = {};
|
||||||
|
var i;
|
||||||
|
for (i = 0; i < 70; i++) { // for now this is the number of field we should check
|
||||||
|
// build ID
|
||||||
|
var id_check = rowIdKey+'_'+rowIdKey+i+'__name';
|
||||||
|
// first check if Id is on page as that not the same as the one currently calling
|
||||||
|
if (jQuery("#"+id_check).length && propertyIdRemoved !== id_check) {
|
||||||
|
// build the selected array
|
||||||
|
var key = jQuery("#"+id_check+" option:selected").val();
|
||||||
|
var text = jQuery("#"+id_check+" option:selected").text();
|
||||||
|
propertiesSelectedArray[key] = text;
|
||||||
|
// keep track of the value set
|
||||||
|
propertiesTrackerArray[id_check] = key;
|
||||||
|
// clear the options out
|
||||||
|
jQuery("#"+id_check).find('option').remove().end();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// trigger chosen on the list fields
|
||||||
|
jQuery('.field_list_name_options').chosen({"disable_search_threshold":10,"search_contains":true,"allow_single_deselect":true,"placeholder_text_multiple":Joomla.JText._("COM_COMPONENTBUILDER_TYPE_OR_SELECT_SOME_OPTIONS"),"placeholder_text_single":Joomla.JText._("COM_COMPONENTBUILDER_SELECT_A_PROPERTY"),"no_results_text":Joomla.JText._("COM_COMPONENTBUILDER_NO_RESULTS_MATCH")});
|
||||||
|
// now build the list to keep
|
||||||
|
jQuery.each( propertiesArray, function( prop, name ) {
|
||||||
|
if (!propertiesSelectedArray.hasOwnProperty(prop)) {
|
||||||
|
propertiesAvailable[prop] = name;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// now add the lists back
|
||||||
|
jQuery.each( propertiesTrackerArray, function( tId, tKey ) {
|
||||||
|
if (jQuery('#'+tId).length) {
|
||||||
|
jQuery('#'+tId).append('<option value="'+tKey+'">'+propertiesSelectedArray[tKey]+'</option>');
|
||||||
|
jQuery.each( propertiesAvailable, function( aKey, aValue ) {
|
||||||
|
jQuery('#'+tId).append('<option value="'+aKey+'">'+aValue+'</option>');
|
||||||
|
});
|
||||||
|
jQuery('#'+tId).val(tKey);
|
||||||
|
jQuery('#'+tId).trigger('liszt:updated');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function rowWatcher() {
|
||||||
|
jQuery(document).on('subform-row-remove', function(event, row){
|
||||||
|
propertyIdRemoved = jQuery(row.innerHTML).find('.field_list_name_options').attr('id');
|
||||||
|
propertyDynamicSet();
|
||||||
|
});
|
||||||
|
jQuery(document).on('subform-row-add', function(event, row){
|
||||||
|
propertyDynamicSet();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function propertyIsSet(prop, id) {
|
||||||
|
var i;
|
||||||
|
for (i = 0; i < 70; i++) { // for now this is the number of field we should check
|
||||||
|
// build ID
|
||||||
|
var id_check = rowIdKey+'_'+rowIdKey+i+'__name';
|
||||||
|
// first check if Id is on page as that not the same as the one currently calling
|
||||||
|
if (jQuery("#"+id_check).length && id_check != id) {
|
||||||
|
// get the property value
|
||||||
|
var tmp = jQuery("#"+id_check+" option:selected").val();
|
||||||
|
// now validate
|
||||||
|
if (tmp === prop) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getFieldPropertyDesc_server(fieldtype, property){
|
||||||
|
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getFieldPropertyDesc&format=json&vdm="+vastDevMod;
|
||||||
|
if(token.length > 0 && fieldtype > 0 && property.length > 0){
|
||||||
|
var request = 'token='+token+'&fieldtype='+fieldtype+'&property='+property;
|
||||||
|
}
|
||||||
|
return jQuery.ajax({
|
||||||
|
type: 'GET',
|
||||||
|
url: getUrl,
|
||||||
|
dataType: 'jsonp',
|
||||||
|
data: request,
|
||||||
|
jsonp: 'callback'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function getValidationRulesTable_server(){
|
function getValidationRulesTable_server(){
|
||||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getValidationRulesTable&format=json";
|
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getValidationRulesTable&format=json&vdm="+vastDevMod;
|
||||||
if(token.length > 0){
|
if(token.length > 0){
|
||||||
var request = 'token='+token+'&id=1';
|
var request = 'token='+token+'&id=1';
|
||||||
}
|
}
|
||||||
|
@ -183,105 +183,65 @@
|
|||||||
<option value="NOT NULL">
|
<option value="NOT NULL">
|
||||||
COM_COMPONENTBUILDER_FIELD_NOT_NULL</option>
|
COM_COMPONENTBUILDER_FIELD_NOT_NULL</option>
|
||||||
</field>
|
</field>
|
||||||
<!-- Add_css_view Field. Type: Radio. (joomla) -->
|
<!-- Datadefault_other Field. Type: Text. (joomla) -->
|
||||||
<field
|
<field
|
||||||
type="radio"
|
type="text"
|
||||||
name="add_css_view"
|
name="datadefault_other"
|
||||||
label="COM_COMPONENTBUILDER_FIELD_ADD_CSS_VIEW_LABEL"
|
label="COM_COMPONENTBUILDER_FIELD_DATADEFAULT_OTHER_LABEL"
|
||||||
class="btn-group btn-group-yesno"
|
size="10"
|
||||||
default="0"
|
maxlength="50"
|
||||||
required="true">
|
description="COM_COMPONENTBUILDER_FIELD_DATADEFAULT_OTHER_DESCRIPTION"
|
||||||
<!-- Option Set. -->
|
class="text_area"
|
||||||
<option value="1">
|
readonly="false"
|
||||||
COM_COMPONENTBUILDER_FIELD_YES</option>
|
disabled="false"
|
||||||
<option value="0">
|
required="true"
|
||||||
COM_COMPONENTBUILDER_FIELD_NO</option>
|
filter="STRING"
|
||||||
</field>
|
message="COM_COMPONENTBUILDER_FIELD_DATADEFAULT_OTHER_MESSAGE"
|
||||||
<!-- Css_view Field. Type: Textarea. (joomla) -->
|
hint="COM_COMPONENTBUILDER_FIELD_DATADEFAULT_OTHER_HINT"
|
||||||
|
/>
|
||||||
|
<!-- Css_views Field. Type: Textarea. (joomla) -->
|
||||||
<field
|
<field
|
||||||
type="textarea"
|
type="textarea"
|
||||||
name="css_view"
|
name="css_views"
|
||||||
label="COM_COMPONENTBUILDER_FIELD_CSS_VIEW_LABEL"
|
label="COM_COMPONENTBUILDER_FIELD_CSS_VIEWS_LABEL"
|
||||||
rows="30"
|
rows="30"
|
||||||
cols="15"
|
cols="15"
|
||||||
description="COM_COMPONENTBUILDER_FIELD_CSS_VIEW_DESCRIPTION"
|
description="COM_COMPONENTBUILDER_FIELD_CSS_VIEWS_DESCRIPTION"
|
||||||
class="text_area span12"
|
class="text_area span12"
|
||||||
filter="raw"
|
filter="raw"
|
||||||
hint="COM_COMPONENTBUILDER_FIELD_CSS_VIEW_HINT"
|
hint="COM_COMPONENTBUILDER_FIELD_CSS_VIEWS_HINT"
|
||||||
required="true"
|
required="true"
|
||||||
/>
|
/>
|
||||||
<!-- Note_filter_information Field. Type: Note. A None Database Field. (joomla) -->
|
<!-- Note_filter_information Field. Type: Note. A None Database Field. (joomla) -->
|
||||||
<field type="note" name="note_filter_information" description="COM_COMPONENTBUILDER_FIELD_NOTE_FILTER_INFORMATION_DESCRIPTION" class="note_filter_information" />
|
<field type="note" name="note_filter_information" description="COM_COMPONENTBUILDER_FIELD_NOTE_FILTER_INFORMATION_DESCRIPTION" class="note_filter_information" />
|
||||||
<!-- Not_required Field. Type: Hidden. (joomla) -->
|
<!-- Javascript_views_footer Field. Type: Textarea. (joomla) -->
|
||||||
<field
|
|
||||||
type="hidden"
|
|
||||||
name="not_required"
|
|
||||||
default="[]"
|
|
||||||
/>
|
|
||||||
<!-- Catid Field. Type: Category. (joomla) -->
|
|
||||||
<field
|
|
||||||
type="category"
|
|
||||||
name="catid"
|
|
||||||
label="COM_COMPONENTBUILDER_FIELD_CATID_LABEL"
|
|
||||||
extension="com_componentbuilder.fields"
|
|
||||||
description="COM_COMPONENTBUILDER_FIELD_CATID_DESCRIPTION"
|
|
||||||
class="inputbox"
|
|
||||||
/>
|
|
||||||
<!-- Xml Field. Type: Textarea. (joomla) -->
|
|
||||||
<field
|
<field
|
||||||
type="textarea"
|
type="textarea"
|
||||||
name="xml"
|
name="javascript_views_footer"
|
||||||
label="COM_COMPONENTBUILDER_FIELD_XML_LABEL"
|
label="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEWS_FOOTER_LABEL"
|
||||||
rows="17"
|
rows="30"
|
||||||
cols="720"
|
cols="15"
|
||||||
description="COM_COMPONENTBUILDER_FIELD_XML_DESCRIPTION"
|
description="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEWS_FOOTER_DESCRIPTION"
|
||||||
class="text_area span12"
|
class="text_area span12"
|
||||||
filter="raw"
|
filter="raw"
|
||||||
hint="COM_COMPONENTBUILDER_FIELD_XML_HINT"
|
hint="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEWS_FOOTER_HINT"
|
||||||
required="true"
|
required="true"
|
||||||
/>
|
/>
|
||||||
<!-- Add_javascript_view_footer Field. Type: Radio. (joomla) -->
|
<!-- Javascript_view_footer Field. Type: Textarea. (joomla) -->
|
||||||
<field
|
<field
|
||||||
type="radio"
|
type="textarea"
|
||||||
name="add_javascript_view_footer"
|
name="javascript_view_footer"
|
||||||
label="COM_COMPONENTBUILDER_FIELD_ADD_JAVASCRIPT_VIEW_FOOTER_LABEL"
|
label="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEW_FOOTER_LABEL"
|
||||||
class="btn-group btn-group-yesno"
|
rows="30"
|
||||||
default="0"
|
cols="15"
|
||||||
required="true">
|
description="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEW_FOOTER_DESCRIPTION"
|
||||||
<!-- Option Set. -->
|
class="text_area span12"
|
||||||
<option value="1">
|
filter="raw"
|
||||||
COM_COMPONENTBUILDER_FIELD_YES</option>
|
hint="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEW_FOOTER_HINT"
|
||||||
<option value="0">
|
required="true"
|
||||||
COM_COMPONENTBUILDER_FIELD_NO</option>
|
/>
|
||||||
</field>
|
<!-- Note_whmcs_encryption Field. Type: Note. A None Database Field. (joomla) -->
|
||||||
<!-- Add_javascript_views_footer Field. Type: Radio. (joomla) -->
|
<field type="note" name="note_whmcs_encryption" label="COM_COMPONENTBUILDER_FIELD_NOTE_WHMCS_ENCRYPTION_LABEL" description="COM_COMPONENTBUILDER_FIELD_NOTE_WHMCS_ENCRYPTION_DESCRIPTION" heading="h4" class="alert alert-success note_whmcs_encryption" />
|
||||||
<field
|
|
||||||
type="radio"
|
|
||||||
name="add_javascript_views_footer"
|
|
||||||
label="COM_COMPONENTBUILDER_FIELD_ADD_JAVASCRIPT_VIEWS_FOOTER_LABEL"
|
|
||||||
class="btn-group btn-group-yesno"
|
|
||||||
default="0"
|
|
||||||
required="true">
|
|
||||||
<!-- Option Set. -->
|
|
||||||
<option value="1">
|
|
||||||
COM_COMPONENTBUILDER_FIELD_YES</option>
|
|
||||||
<option value="0">
|
|
||||||
COM_COMPONENTBUILDER_FIELD_NO</option>
|
|
||||||
</field>
|
|
||||||
<!-- Add_css_views Field. Type: Radio. (joomla) -->
|
|
||||||
<field
|
|
||||||
type="radio"
|
|
||||||
name="add_css_views"
|
|
||||||
label="COM_COMPONENTBUILDER_FIELD_ADD_CSS_VIEWS_LABEL"
|
|
||||||
class="btn-group btn-group-yesno"
|
|
||||||
default="0"
|
|
||||||
required="true">
|
|
||||||
<!-- Option Set. -->
|
|
||||||
<option value="1">
|
|
||||||
COM_COMPONENTBUILDER_FIELD_YES</option>
|
|
||||||
<option value="0">
|
|
||||||
COM_COMPONENTBUILDER_FIELD_NO</option>
|
|
||||||
</field>
|
|
||||||
<!-- Datalenght Field. Type: List. (joomla) -->
|
<!-- Datalenght Field. Type: List. (joomla) -->
|
||||||
<field
|
<field
|
||||||
type="list"
|
type="list"
|
||||||
@ -316,71 +276,46 @@
|
|||||||
<option value="Other">
|
<option value="Other">
|
||||||
COM_COMPONENTBUILDER_FIELD_OTHER</option>
|
COM_COMPONENTBUILDER_FIELD_OTHER</option>
|
||||||
</field>
|
</field>
|
||||||
<!-- Datadefault_other Field. Type: Text. (joomla) -->
|
<!-- Add_css_view Field. Type: Radio. (joomla) -->
|
||||||
<field
|
<field
|
||||||
type="text"
|
type="radio"
|
||||||
name="datadefault_other"
|
name="add_css_view"
|
||||||
label="COM_COMPONENTBUILDER_FIELD_DATADEFAULT_OTHER_LABEL"
|
label="COM_COMPONENTBUILDER_FIELD_ADD_CSS_VIEW_LABEL"
|
||||||
size="10"
|
class="btn-group btn-group-yesno"
|
||||||
maxlength="50"
|
default="0"
|
||||||
description="COM_COMPONENTBUILDER_FIELD_DATADEFAULT_OTHER_DESCRIPTION"
|
required="true">
|
||||||
class="text_area"
|
|
||||||
readonly="false"
|
|
||||||
disabled="false"
|
|
||||||
required="true"
|
|
||||||
filter="STRING"
|
|
||||||
message="COM_COMPONENTBUILDER_FIELD_DATADEFAULT_OTHER_MESSAGE"
|
|
||||||
hint="COM_COMPONENTBUILDER_FIELD_DATADEFAULT_OTHER_HINT"
|
|
||||||
/>
|
|
||||||
<!-- Datadefault Field. Type: List. (joomla) -->
|
|
||||||
<field
|
|
||||||
type="list"
|
|
||||||
name="datadefault"
|
|
||||||
label="COM_COMPONENTBUILDER_FIELD_DATADEFAULT_LABEL"
|
|
||||||
description="COM_COMPONENTBUILDER_FIELD_DATADEFAULT_DESCRIPTION"
|
|
||||||
class="btn-group"
|
|
||||||
multiple="false">
|
|
||||||
<!-- Option Set. -->
|
<!-- Option Set. -->
|
||||||
<option value="">
|
|
||||||
COM_COMPONENTBUILDER_FIELD_NONE</option>
|
|
||||||
<option value="0">
|
|
||||||
COM_COMPONENTBUILDER_FIELD_ZERO</option>
|
|
||||||
<option value="1">
|
<option value="1">
|
||||||
COM_COMPONENTBUILDER_FIELD_ONE</option>
|
COM_COMPONENTBUILDER_FIELD_YES</option>
|
||||||
<option value="CURRENT_TIMESTAMP">
|
<option value="0">
|
||||||
COM_COMPONENTBUILDER_FIELD_CURRENT_TIMESTAMP</option>
|
COM_COMPONENTBUILDER_FIELD_NO</option>
|
||||||
<option value="DATETIME">
|
|
||||||
COM_COMPONENTBUILDER_FIELD_DATETIME</option>
|
|
||||||
<option value="Other">
|
|
||||||
COM_COMPONENTBUILDER_FIELD_OTHER</option>
|
|
||||||
</field>
|
</field>
|
||||||
<!-- Datalenght_other Field. Type: Text. (joomla) -->
|
<!-- Not_required Field. Type: Hidden. (joomla) -->
|
||||||
<field
|
<field
|
||||||
type="text"
|
type="hidden"
|
||||||
name="datalenght_other"
|
name="not_required"
|
||||||
label="COM_COMPONENTBUILDER_FIELD_DATALENGHT_OTHER_LABEL"
|
default="[]"
|
||||||
size="10"
|
|
||||||
maxlength="50"
|
|
||||||
description="COM_COMPONENTBUILDER_FIELD_DATALENGHT_OTHER_DESCRIPTION"
|
|
||||||
class="text_area"
|
|
||||||
readonly="false"
|
|
||||||
disabled="false"
|
|
||||||
required="true"
|
|
||||||
filter="STRING"
|
|
||||||
message="COM_COMPONENTBUILDER_FIELD_DATALENGHT_OTHER_MESSAGE"
|
|
||||||
hint="COM_COMPONENTBUILDER_FIELD_DATALENGHT_OTHER_HINT"
|
|
||||||
/>
|
/>
|
||||||
<!-- Css_views Field. Type: Textarea. (joomla) -->
|
<!-- Catid Field. Type: Category. (joomla) -->
|
||||||
|
<field
|
||||||
|
type="category"
|
||||||
|
name="catid"
|
||||||
|
label="COM_COMPONENTBUILDER_FIELD_CATID_LABEL"
|
||||||
|
extension="com_componentbuilder.fields"
|
||||||
|
description="COM_COMPONENTBUILDER_FIELD_CATID_DESCRIPTION"
|
||||||
|
class="inputbox"
|
||||||
|
/>
|
||||||
|
<!-- Css_view Field. Type: Textarea. (joomla) -->
|
||||||
<field
|
<field
|
||||||
type="textarea"
|
type="textarea"
|
||||||
name="css_views"
|
name="css_view"
|
||||||
label="COM_COMPONENTBUILDER_FIELD_CSS_VIEWS_LABEL"
|
label="COM_COMPONENTBUILDER_FIELD_CSS_VIEW_LABEL"
|
||||||
rows="30"
|
rows="30"
|
||||||
cols="15"
|
cols="15"
|
||||||
description="COM_COMPONENTBUILDER_FIELD_CSS_VIEWS_DESCRIPTION"
|
description="COM_COMPONENTBUILDER_FIELD_CSS_VIEW_DESCRIPTION"
|
||||||
class="text_area span12"
|
class="text_area span12"
|
||||||
filter="raw"
|
filter="raw"
|
||||||
hint="COM_COMPONENTBUILDER_FIELD_CSS_VIEWS_HINT"
|
hint="COM_COMPONENTBUILDER_FIELD_CSS_VIEW_HINT"
|
||||||
required="true"
|
required="true"
|
||||||
/>
|
/>
|
||||||
<!-- Store Field. Type: List. (joomla) -->
|
<!-- Store Field. Type: List. (joomla) -->
|
||||||
@ -408,36 +343,95 @@
|
|||||||
<option value="4">
|
<option value="4">
|
||||||
COM_COMPONENTBUILDER_FIELD_WHMCSKEY_ENCRYPTION</option>
|
COM_COMPONENTBUILDER_FIELD_WHMCSKEY_ENCRYPTION</option>
|
||||||
</field>
|
</field>
|
||||||
<!-- Javascript_view_footer Field. Type: Textarea. (joomla) -->
|
<!-- Datalenght_other Field. Type: Text. (joomla) -->
|
||||||
<field
|
<field
|
||||||
type="textarea"
|
type="text"
|
||||||
name="javascript_view_footer"
|
name="datalenght_other"
|
||||||
label="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEW_FOOTER_LABEL"
|
label="COM_COMPONENTBUILDER_FIELD_DATALENGHT_OTHER_LABEL"
|
||||||
rows="30"
|
size="10"
|
||||||
cols="15"
|
maxlength="50"
|
||||||
description="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEW_FOOTER_DESCRIPTION"
|
description="COM_COMPONENTBUILDER_FIELD_DATALENGHT_OTHER_DESCRIPTION"
|
||||||
class="text_area span12"
|
class="text_area"
|
||||||
filter="raw"
|
readonly="false"
|
||||||
hint="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEW_FOOTER_HINT"
|
disabled="false"
|
||||||
required="true"
|
required="true"
|
||||||
|
filter="STRING"
|
||||||
|
message="COM_COMPONENTBUILDER_FIELD_DATALENGHT_OTHER_MESSAGE"
|
||||||
|
hint="COM_COMPONENTBUILDER_FIELD_DATALENGHT_OTHER_HINT"
|
||||||
/>
|
/>
|
||||||
<!-- Note_whmcs_encryption Field. Type: Note. A None Database Field. (joomla) -->
|
<!-- Add_javascript_view_footer Field. Type: Radio. (joomla) -->
|
||||||
<field type="note" name="note_whmcs_encryption" label="COM_COMPONENTBUILDER_FIELD_NOTE_WHMCS_ENCRYPTION_LABEL" description="COM_COMPONENTBUILDER_FIELD_NOTE_WHMCS_ENCRYPTION_DESCRIPTION" heading="h4" class="alert alert-success note_whmcs_encryption" />
|
|
||||||
<!-- Javascript_views_footer Field. Type: Textarea. (joomla) -->
|
|
||||||
<field
|
<field
|
||||||
type="textarea"
|
type="radio"
|
||||||
name="javascript_views_footer"
|
name="add_javascript_view_footer"
|
||||||
label="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEWS_FOOTER_LABEL"
|
label="COM_COMPONENTBUILDER_FIELD_ADD_JAVASCRIPT_VIEW_FOOTER_LABEL"
|
||||||
rows="30"
|
class="btn-group btn-group-yesno"
|
||||||
cols="15"
|
default="0"
|
||||||
description="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEWS_FOOTER_DESCRIPTION"
|
required="true">
|
||||||
class="text_area span12"
|
<!-- Option Set. -->
|
||||||
filter="raw"
|
<option value="1">
|
||||||
hint="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEWS_FOOTER_HINT"
|
COM_COMPONENTBUILDER_FIELD_YES</option>
|
||||||
required="true"
|
<option value="0">
|
||||||
/>
|
COM_COMPONENTBUILDER_FIELD_NO</option>
|
||||||
|
</field>
|
||||||
|
<!-- Add_css_views Field. Type: Radio. (joomla) -->
|
||||||
|
<field
|
||||||
|
type="radio"
|
||||||
|
name="add_css_views"
|
||||||
|
label="COM_COMPONENTBUILDER_FIELD_ADD_CSS_VIEWS_LABEL"
|
||||||
|
class="btn-group btn-group-yesno"
|
||||||
|
default="0"
|
||||||
|
required="true">
|
||||||
|
<!-- Option Set. -->
|
||||||
|
<option value="1">
|
||||||
|
COM_COMPONENTBUILDER_FIELD_YES</option>
|
||||||
|
<option value="0">
|
||||||
|
COM_COMPONENTBUILDER_FIELD_NO</option>
|
||||||
|
</field>
|
||||||
|
<!-- Add_javascript_views_footer Field. Type: Radio. (joomla) -->
|
||||||
|
<field
|
||||||
|
type="radio"
|
||||||
|
name="add_javascript_views_footer"
|
||||||
|
label="COM_COMPONENTBUILDER_FIELD_ADD_JAVASCRIPT_VIEWS_FOOTER_LABEL"
|
||||||
|
class="btn-group btn-group-yesno"
|
||||||
|
default="0"
|
||||||
|
required="true">
|
||||||
|
<!-- Option Set. -->
|
||||||
|
<option value="1">
|
||||||
|
COM_COMPONENTBUILDER_FIELD_YES</option>
|
||||||
|
<option value="0">
|
||||||
|
COM_COMPONENTBUILDER_FIELD_NO</option>
|
||||||
|
</field>
|
||||||
|
<!-- Datadefault Field. Type: List. (joomla) -->
|
||||||
|
<field
|
||||||
|
type="list"
|
||||||
|
name="datadefault"
|
||||||
|
label="COM_COMPONENTBUILDER_FIELD_DATADEFAULT_LABEL"
|
||||||
|
description="COM_COMPONENTBUILDER_FIELD_DATADEFAULT_DESCRIPTION"
|
||||||
|
class="btn-group"
|
||||||
|
multiple="false">
|
||||||
|
<!-- Option Set. -->
|
||||||
|
<option value="">
|
||||||
|
COM_COMPONENTBUILDER_FIELD_NONE</option>
|
||||||
|
<option value="0">
|
||||||
|
COM_COMPONENTBUILDER_FIELD_ZERO</option>
|
||||||
|
<option value="1">
|
||||||
|
COM_COMPONENTBUILDER_FIELD_ONE</option>
|
||||||
|
<option value="CURRENT_TIMESTAMP">
|
||||||
|
COM_COMPONENTBUILDER_FIELD_CURRENT_TIMESTAMP</option>
|
||||||
|
<option value="DATETIME">
|
||||||
|
COM_COMPONENTBUILDER_FIELD_DATETIME</option>
|
||||||
|
<option value="Other">
|
||||||
|
COM_COMPONENTBUILDER_FIELD_OTHER</option>
|
||||||
|
</field>
|
||||||
<!-- Helpnote Field. Type: Note. A None Database Field. (joomla) -->
|
<!-- Helpnote Field. Type: Note. A None Database Field. (joomla) -->
|
||||||
<field type="note" name="helpnote" label="COM_COMPONENTBUILDER_FIELD_HELPNOTE_LABEL" class="helpNote helpnote" />
|
<field type="note" name="helpnote" label="COM_COMPONENTBUILDER_FIELD_HELPNOTE_LABEL" class="helpNote helpnote" />
|
||||||
|
<!-- Xml Field. Type: Hidden. (joomla) -->
|
||||||
|
<field
|
||||||
|
type="hidden"
|
||||||
|
name="xml"
|
||||||
|
default="1"
|
||||||
|
filter="raw"
|
||||||
|
/>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<!-- Access Control Fields. -->
|
<!-- Access Control Fields. -->
|
||||||
|
File diff suppressed because one or more lines are too long
1
admin/sql/updates/mysql/2.7.1.sql
Normal file
1
admin/sql/updates/mysql/2.7.1.sql
Normal file
@ -0,0 +1 @@
|
|||||||
|
|
@ -58,37 +58,50 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder');
|
|||||||
<div id="componentbuilder_loader" style="display: none;">
|
<div id="componentbuilder_loader" style="display: none;">
|
||||||
<form action="<?php echo JRoute::_('index.php?option=com_componentbuilder&layout=edit&id='.(int) $this->item->id.$this->referral); ?>" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
|
<form action="<?php echo JRoute::_('index.php?option=com_componentbuilder&layout=edit&id='.(int) $this->item->id.$this->referral); ?>" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
|
||||||
|
|
||||||
|
<?php echo JLayoutHelper::render('field.set_properties_above', $this); ?>
|
||||||
<div class="form-horizontal">
|
<div class="form-horizontal">
|
||||||
|
|
||||||
<?php echo JHtml::_('bootstrap.startTabSet', 'fieldTab', array('active' => 'details')); ?>
|
<?php echo JHtml::_('bootstrap.startTabSet', 'fieldTab', array('active' => 'set_properties')); ?>
|
||||||
|
|
||||||
<?php echo JHtml::_('bootstrap.addTab', 'fieldTab', 'details', JText::_('COM_COMPONENTBUILDER_FIELD_DETAILS', true)); ?>
|
<?php echo JHtml::_('bootstrap.addTab', 'fieldTab', 'set_properties', JText::_('COM_COMPONENTBUILDER_FIELD_SET_PROPERTIES', true)); ?>
|
||||||
<div class="row-fluid form-horizontal-desktop">
|
<div class="row-fluid form-horizontal-desktop">
|
||||||
<div class="span6">
|
|
||||||
<?php echo JLayoutHelper::render('field.details_left', $this); ?>
|
|
||||||
</div>
|
|
||||||
<div class="span6">
|
|
||||||
<?php echo JLayoutHelper::render('field.details_right', $this); ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="row-fluid form-horizontal-desktop">
|
<div class="row-fluid form-horizontal-desktop">
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
<?php echo JLayoutHelper::render('field.details_fullwidth', $this); ?>
|
<?php echo JLayoutHelper::render('field.set_properties_fullwidth', $this); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||||
|
|
||||||
|
<?php echo JHtml::_('bootstrap.addTab', 'fieldTab', 'data_base', JText::_('COM_COMPONENTBUILDER_FIELD_DATA_BASE', true)); ?>
|
||||||
|
<div class="row-fluid form-horizontal-desktop">
|
||||||
|
<div class="span6">
|
||||||
|
<?php echo JLayoutHelper::render('field.data_base_left', $this); ?>
|
||||||
|
</div>
|
||||||
|
<div class="span6">
|
||||||
|
<?php echo JLayoutHelper::render('field.data_base_right', $this); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||||
|
|
||||||
<?php echo JHtml::_('bootstrap.addTab', 'fieldTab', 'scripts', JText::_('COM_COMPONENTBUILDER_FIELD_SCRIPTS', true)); ?>
|
<?php echo JHtml::_('bootstrap.addTab', 'fieldTab', 'scripts', JText::_('COM_COMPONENTBUILDER_FIELD_SCRIPTS', true)); ?>
|
||||||
<div class="row-fluid form-horizontal-desktop">
|
<div class="row-fluid form-horizontal-desktop">
|
||||||
<div class="span6">
|
<div class="span12">
|
||||||
<?php echo JLayoutHelper::render('field.scripts_left', $this); ?>
|
|
||||||
</div>
|
|
||||||
<div class="span6">
|
|
||||||
<?php echo JLayoutHelper::render('field.scripts_right', $this); ?>
|
<?php echo JLayoutHelper::render('field.scripts_right', $this); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||||
|
|
||||||
|
<?php echo JHtml::_('bootstrap.addTab', 'fieldTab', 'type_info', JText::_('COM_COMPONENTBUILDER_FIELD_TYPE_INFO', true)); ?>
|
||||||
|
<div class="row-fluid form-horizontal-desktop">
|
||||||
|
</div>
|
||||||
|
<div class="row-fluid form-horizontal-desktop">
|
||||||
|
<div class="span12">
|
||||||
|
<?php echo JLayoutHelper::render('field.type_info_fullwidth', $this); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||||
|
|
||||||
<?php if ($this->canDo->get('field.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('field.edit.state') || $this->canDo->get('core.edit.created')) : ?>
|
<?php if ($this->canDo->get('field.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('field.edit.state') || $this->canDo->get('core.edit.created')) : ?>
|
||||||
<?php echo JHtml::_('bootstrap.addTab', 'fieldTab', 'publishing', JText::_('COM_COMPONENTBUILDER_FIELD_PUBLISHING', true)); ?>
|
<?php echo JHtml::_('bootstrap.addTab', 'fieldTab', 'publishing', JText::_('COM_COMPONENTBUILDER_FIELD_PUBLISHING', true)); ?>
|
||||||
<div class="row-fluid form-horizontal-desktop">
|
<div class="row-fluid form-horizontal-desktop">
|
||||||
@ -131,7 +144,7 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder');
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
<?php echo JLayoutHelper::render('field.details_under', $this); ?>
|
<?php echo JLayoutHelper::render('field.set_properties_under', $this); ?>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -322,22 +335,13 @@ jQuery.fn.selText = function() {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
jQuery('#details').on('change', '#jform_fieldtype',function (e) {
|
jQuery('#adminForm').on('change', '#jform_fieldtype',function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
// get type value
|
// get type value
|
||||||
var fieldId = jQuery("#jform_fieldtype option:selected").val();
|
var fieldId = jQuery("#jform_fieldtype option:selected").val();
|
||||||
getFieldOptions(fieldId,true);
|
getFieldOptions(fieldId);
|
||||||
});
|
});
|
||||||
|
|
||||||
jQuery(document).ready(function() {
|
|
||||||
// get type value
|
|
||||||
var fieldId = jQuery("#jform_fieldtype option:selected").val();
|
|
||||||
if(jQuery('#jform_xml').length == 0) {
|
|
||||||
getFieldOptions(fieldId,true);
|
|
||||||
} else {
|
|
||||||
getFieldOptions(fieldId,false);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$app = JFactory::getApplication();
|
$app = JFactory::getApplication();
|
||||||
|
@ -209,7 +209,16 @@ class ComponentbuilderViewField extends JViewLegacy
|
|||||||
$this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true);
|
$this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true);
|
||||||
$this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true);
|
$this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true);
|
||||||
// add var key
|
// add var key
|
||||||
$this->document->addScriptDeclaration("var vastDevMod = '".$this->get('VDM')."';");
|
$this->document->addScriptDeclaration("var vastDevMod = '".$this->get('VDM')."';");
|
||||||
|
// add the libs for subform (since not adding it via xml but ajax)
|
||||||
|
JHtml::_('jquery.ui', array('core', 'sortable'));
|
||||||
|
JHtml::_('script', 'system/subform-repeatable.js', array('version' => 'auto', 'relative' => true));
|
||||||
|
// set some lang
|
||||||
|
JText::script('COM_COMPONENTBUILDER_PROPERTY_ALREADY_SELECTED_TRY_ANOTHER');
|
||||||
|
JText::script('COM_COMPONENTBUILDER_TYPE_OR_SELECT_SOME_OPTIONS');
|
||||||
|
JText::script('COM_COMPONENTBUILDER_NO_RESULTS_MATCH');
|
||||||
|
JText::script('COM_COMPONENTBUILDER_SELECT_A_PROPERTY');
|
||||||
|
JText::script('COM_COMPONENTBUILDER_NO_DESCRIPTION_FOUND');
|
||||||
JText::script('view not acceptable. Error');
|
JText::script('view not acceptable. Error');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<extension type="component" version="3.2" method="upgrade">
|
<extension type="component" version="3.2" method="upgrade">
|
||||||
<name>COM_COMPONENTBUILDER</name>
|
<name>COM_COMPONENTBUILDER</name>
|
||||||
<creationDate>8th April, 2018</creationDate>
|
<creationDate>11th April, 2018</creationDate>
|
||||||
<author>Llewellyn van der Merwe</author>
|
<author>Llewellyn van der Merwe</author>
|
||||||
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
|
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
|
||||||
<authorUrl>http://joomlacomponentbuilder.com</authorUrl>
|
<authorUrl>http://joomlacomponentbuilder.com</authorUrl>
|
||||||
<copyright>Copyright (C) 2015. All Rights Reserved</copyright>
|
<copyright>Copyright (C) 2015. All Rights Reserved</copyright>
|
||||||
<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
|
<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
|
||||||
<version>2.7.1</version>
|
<version>2.7.2</version>
|
||||||
<description><![CDATA[
|
<description><![CDATA[
|
||||||
<h1>Component Builder (v.2.7.1)</h1>
|
<h1>Component Builder (v.2.7.2)</h1>
|
||||||
<div style="clear: both;"></div>
|
<div style="clear: both;"></div>
|
||||||
<p>The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time.
|
<p>The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time.
|
||||||
|
|
||||||
|
@ -339,4 +339,21 @@
|
|||||||
<maintainerurl>http://joomlacomponentbuilder.com</maintainerurl>
|
<maintainerurl>http://joomlacomponentbuilder.com</maintainerurl>
|
||||||
<targetplatform name="joomla" version="3.*"/>
|
<targetplatform name="joomla" version="3.*"/>
|
||||||
</update>
|
</update>
|
||||||
|
<update>
|
||||||
|
<name>Component Builder</name>
|
||||||
|
<description>Builds Complex Joomla Components</description>
|
||||||
|
<element>com_componentbuilder</element>
|
||||||
|
<type>component</type>
|
||||||
|
<version>2.7.2</version>
|
||||||
|
<infourl title="Component Builder!">http://joomlacomponentbuilder.com</infourl>
|
||||||
|
<downloads>
|
||||||
|
<downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.7.2/JCB_v2.7.2.zip</downloadurl>
|
||||||
|
</downloads>
|
||||||
|
<tags>
|
||||||
|
<tag>stable</tag>
|
||||||
|
</tags>
|
||||||
|
<maintainer>Llewellyn van der Merwe</maintainer>
|
||||||
|
<maintainerurl>http://joomlacomponentbuilder.com</maintainerurl>
|
||||||
|
<targetplatform name="joomla" version="3.*"/>
|
||||||
|
</update>
|
||||||
</updates>
|
</updates>
|
10
script.php
10
script.php
@ -3428,9 +3428,9 @@ class com_componentbuilderInstallerScript
|
|||||||
$field->type_title = 'Componentbuilder Field';
|
$field->type_title = 'Componentbuilder Field';
|
||||||
$field->type_alias = 'com_componentbuilder.field';
|
$field->type_alias = 'com_componentbuilder.field';
|
||||||
$field->table = '{"special": {"dbtable": "#__componentbuilder_field","key": "id","type": "Field","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
|
$field->table = '{"special": {"dbtable": "#__componentbuilder_field","key": "id","type": "Field","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
|
||||||
$field->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "catid","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","fieldtype":"fieldtype","datatype":"datatype","indexes":"indexes","null_switch":"null_switch","add_css_view":"add_css_view","css_view":"css_view","not_required":"not_required","xml":"xml","add_javascript_view_footer":"add_javascript_view_footer","add_javascript_views_footer":"add_javascript_views_footer","add_css_views":"add_css_views","datalenght":"datalenght","datadefault_other":"datadefault_other","datadefault":"datadefault","datalenght_other":"datalenght_other","css_views":"css_views","store":"store","javascript_view_footer":"javascript_view_footer","javascript_views_footer":"javascript_views_footer"}}';
|
$field->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "catid","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","fieldtype":"fieldtype","datatype":"datatype","indexes":"indexes","null_switch":"null_switch","datadefault_other":"datadefault_other","css_views":"css_views","javascript_views_footer":"javascript_views_footer","javascript_view_footer":"javascript_view_footer","datalenght":"datalenght","add_css_view":"add_css_view","not_required":"not_required","css_view":"css_view","store":"store","datalenght_other":"datalenght_other","add_javascript_view_footer":"add_javascript_view_footer","add_css_views":"add_css_views","add_javascript_views_footer":"add_javascript_views_footer","datadefault":"datadefault","xml":"xml"}}';
|
||||||
$field->router = 'ComponentbuilderHelperRoute::getFieldRoute';
|
$field->router = 'ComponentbuilderHelperRoute::getFieldRoute';
|
||||||
$field->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/field.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","fieldtype","add_css_view","not_required","catid","add_javascript_view_footer","add_javascript_views_footer","add_css_views","store"],"displayLookup": [{"sourceColumn": "catid","targetTable": "#__categories","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "fieldtype","targetTable": "#__componentbuilder_fieldtype","targetColumn": "id","displayColumn": "name"}]}';
|
$field->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/field.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required","xml"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","fieldtype","add_css_view","not_required","catid","store","add_javascript_view_footer","add_css_views","add_javascript_views_footer"],"displayLookup": [{"sourceColumn": "catid","targetTable": "#__categories","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "fieldtype","targetTable": "#__componentbuilder_fieldtype","targetColumn": "id","displayColumn": "name"}]}';
|
||||||
|
|
||||||
// Set the object into the content types table.
|
// Set the object into the content types table.
|
||||||
$field_Inserted = $db->insertObject('#__content_types', $field);
|
$field_Inserted = $db->insertObject('#__content_types', $field);
|
||||||
@ -4037,9 +4037,9 @@ class com_componentbuilderInstallerScript
|
|||||||
$field->type_title = 'Componentbuilder Field';
|
$field->type_title = 'Componentbuilder Field';
|
||||||
$field->type_alias = 'com_componentbuilder.field';
|
$field->type_alias = 'com_componentbuilder.field';
|
||||||
$field->table = '{"special": {"dbtable": "#__componentbuilder_field","key": "id","type": "Field","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
|
$field->table = '{"special": {"dbtable": "#__componentbuilder_field","key": "id","type": "Field","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
|
||||||
$field->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "catid","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","fieldtype":"fieldtype","datatype":"datatype","indexes":"indexes","null_switch":"null_switch","add_css_view":"add_css_view","css_view":"css_view","not_required":"not_required","xml":"xml","add_javascript_view_footer":"add_javascript_view_footer","add_javascript_views_footer":"add_javascript_views_footer","add_css_views":"add_css_views","datalenght":"datalenght","datadefault_other":"datadefault_other","datadefault":"datadefault","datalenght_other":"datalenght_other","css_views":"css_views","store":"store","javascript_view_footer":"javascript_view_footer","javascript_views_footer":"javascript_views_footer"}}';
|
$field->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "catid","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","fieldtype":"fieldtype","datatype":"datatype","indexes":"indexes","null_switch":"null_switch","datadefault_other":"datadefault_other","css_views":"css_views","javascript_views_footer":"javascript_views_footer","javascript_view_footer":"javascript_view_footer","datalenght":"datalenght","add_css_view":"add_css_view","not_required":"not_required","css_view":"css_view","store":"store","datalenght_other":"datalenght_other","add_javascript_view_footer":"add_javascript_view_footer","add_css_views":"add_css_views","add_javascript_views_footer":"add_javascript_views_footer","datadefault":"datadefault","xml":"xml"}}';
|
||||||
$field->router = 'ComponentbuilderHelperRoute::getFieldRoute';
|
$field->router = 'ComponentbuilderHelperRoute::getFieldRoute';
|
||||||
$field->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/field.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","fieldtype","add_css_view","not_required","catid","add_javascript_view_footer","add_javascript_views_footer","add_css_views","store"],"displayLookup": [{"sourceColumn": "catid","targetTable": "#__categories","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "fieldtype","targetTable": "#__componentbuilder_fieldtype","targetColumn": "id","displayColumn": "name"}]}';
|
$field->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/field.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required","xml"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","fieldtype","add_css_view","not_required","catid","store","add_javascript_view_footer","add_css_views","add_javascript_views_footer"],"displayLookup": [{"sourceColumn": "catid","targetTable": "#__categories","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "fieldtype","targetTable": "#__componentbuilder_fieldtype","targetColumn": "id","displayColumn": "name"}]}';
|
||||||
|
|
||||||
// Check if field type is already in content_type DB.
|
// Check if field type is already in content_type DB.
|
||||||
$field_id = null;
|
$field_id = null;
|
||||||
@ -4878,7 +4878,7 @@ class com_componentbuilderInstallerScript
|
|||||||
echo '<a target="_blank" href="http://joomlacomponentbuilder.com" title="Component Builder">
|
echo '<a target="_blank" href="http://joomlacomponentbuilder.com" title="Component Builder">
|
||||||
<img src="components/com_componentbuilder/assets/images/vdm-component.jpg"/>
|
<img src="components/com_componentbuilder/assets/images/vdm-component.jpg"/>
|
||||||
</a>
|
</a>
|
||||||
<h3>Upgrade to Version 2.7.1 Was Successful! Let us know if anything is not working as expected.</h3>';
|
<h3>Upgrade to Version 2.7.2 Was Successful! Let us know if anything is not working as expected.</h3>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -590,6 +590,85 @@ abstract class ComponentbuilderHelper
|
|||||||
$extruder = new Extrusion($data);
|
$extruder = new Extrusion($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function getFieldOptions($value, $type, $settings = array(), $xml = null)
|
||||||
|
{
|
||||||
|
// Get a db connection.
|
||||||
|
$db = JFactory::getDbo();
|
||||||
|
|
||||||
|
// Create a new query object.
|
||||||
|
$query = $db->getQuery(true);
|
||||||
|
$query->select($db->quoteName(array('properties', 'short_description', 'description')));
|
||||||
|
$query->from($db->quoteName('#__componentbuilder_fieldtype'));
|
||||||
|
$query->where($db->quoteName('published') . ' = 1');
|
||||||
|
$query->where($db->quoteName($type) . ' = '. $value);
|
||||||
|
|
||||||
|
// Reset the query using our newly populated query object.
|
||||||
|
$db->setQuery($query);
|
||||||
|
$db->execute();
|
||||||
|
if ($db->getNumRows())
|
||||||
|
{
|
||||||
|
$result = $db->loadObject();
|
||||||
|
$properties = json_decode($result->properties,true);
|
||||||
|
$field = array(
|
||||||
|
'subform' => array(),
|
||||||
|
'nameListOptions' => array(),
|
||||||
|
'values' => "<field ",
|
||||||
|
'values_description' => '<table class="uk-table uk-table-hover uk-table-striped uk-table-condensed">',
|
||||||
|
'short_description' => $result->short_description,
|
||||||
|
'description' => $result->description);
|
||||||
|
// number pointer
|
||||||
|
$nr = 0;
|
||||||
|
// set the headers
|
||||||
|
$field['values_description'] .= '<thead><tr><th class="uk-text-right">'.JText::_('COM_COMPONENTBUILDER_PROPERTY').'</th><th>'.JText::_('COM_COMPONENTBUILDER_EXAMPLE').'</th><th>'.JText::_('COM_COMPONENTBUILDER_DESCRIPTION').'</th></thead><tbody>';
|
||||||
|
foreach ($properties as $property)
|
||||||
|
{
|
||||||
|
$example = (isset($property['example']) && self::checkString($property['example'])) ? self::shorten($property['example'], 30) : '';
|
||||||
|
$field['values_description'] .= '<tr><td class="uk-text-right"><code>'.$property['name'].'</code></td><td>'.$example.'</td><td>'.$property['description'].'</td></tr>';
|
||||||
|
// check if we should load the value
|
||||||
|
$value = self::getValueFromXMLstring($xml, $property['name']);
|
||||||
|
if(self::checkArray($settings) && isset($settings[$property['name']]))
|
||||||
|
{
|
||||||
|
// add the xml values
|
||||||
|
$field['values'] .= "\n\t".$property['name'].'="'.$settings[$property['name']].'" ';
|
||||||
|
// add the json values
|
||||||
|
$field['subform']['properties'.$nr] = array('name' => $property['name'], 'value' => $settings[$property['name']]);
|
||||||
|
// add the name List Options as set
|
||||||
|
$field['nameListOptionsSet'][$property['name']] = $property['name'];
|
||||||
|
}
|
||||||
|
elseif (!$xml || $value)
|
||||||
|
{
|
||||||
|
// add the xml values
|
||||||
|
$field['values'] .= "\n\t" . $property['name'] . '="'. ($value) ? $value : $property['example'] .'" ';
|
||||||
|
// add the json values
|
||||||
|
$field['subform']['properties' . $nr] = array('name' => $property['name'], 'value' => ($value) ? $value : $property['example'], 'desc' => $property['description']);
|
||||||
|
}
|
||||||
|
// add the name List Options
|
||||||
|
$field['nameListOptions'][$property['name']] = $property['name'];
|
||||||
|
// increment the number
|
||||||
|
$nr++;
|
||||||
|
}
|
||||||
|
$field['values'] .= "\n/>";
|
||||||
|
$field['values_description'] .= '</tbody></table>';
|
||||||
|
// return found field options
|
||||||
|
return $field;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getValueFromXMLstring($xml, $get)
|
||||||
|
{
|
||||||
|
if (self::checkString($xml))
|
||||||
|
{
|
||||||
|
$value = self::getBetween($xml, $get.'="', '"');
|
||||||
|
if (self::checkString($value))
|
||||||
|
{
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The zipper method
|
* The zipper method
|
||||||
*
|
*
|
||||||
@ -673,50 +752,6 @@ abstract class ComponentbuilderHelper
|
|||||||
return $klaar;
|
return $klaar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static function getFieldOptions($value, $type, $settings = array())
|
|
||||||
{
|
|
||||||
// Get a db connection.
|
|
||||||
$db = JFactory::getDbo();
|
|
||||||
|
|
||||||
// Create a new query object.
|
|
||||||
$query = $db->getQuery(true);
|
|
||||||
$query->select($db->quoteName(array('properties', 'short_description', 'description')));
|
|
||||||
$query->from($db->quoteName('#__componentbuilder_fieldtype'));
|
|
||||||
$query->where($db->quoteName('published') . ' = 1');
|
|
||||||
$query->where($db->quoteName($type) . ' = '. $value);
|
|
||||||
|
|
||||||
// Reset the query using our newly populated query object.
|
|
||||||
$db->setQuery($query);
|
|
||||||
$db->execute();
|
|
||||||
if ($db->getNumRows())
|
|
||||||
{
|
|
||||||
$result = $db->loadObject();
|
|
||||||
$properties = json_decode($result->properties,true);
|
|
||||||
$field = array('values' => "<field ", 'values_description' => '<table class="uk-table uk-table-hover uk-table-striped uk-table-condensed">', 'short_description' => $result->short_description, 'description' => $result->description);
|
|
||||||
// set the headers
|
|
||||||
$field['values_description'] .= '<thead><tr><th class="uk-text-right">'.JText::_('COM_COMPONENTBUILDER_PROPERTY').'</th><th>'.JText::_('COM_COMPONENTBUILDER_EXAMPLE').'</th><th>'.JText::_('COM_COMPONENTBUILDER_DESCRIPTION').'</th></thead><tbody>';
|
|
||||||
foreach ($properties as $property)
|
|
||||||
{
|
|
||||||
$example = (isset($property['example']) && self::checkString($property['example'])) ? self::shorten($property['example'], 30) : '';
|
|
||||||
$field['values_description'] .= '<tr><td class="uk-text-right"><code>'.$property['name'].'</code></td><td>'.$example.'</td><td>'.$property['description'].'</td></tr>';
|
|
||||||
if(isset($settings[$property['name']]))
|
|
||||||
{
|
|
||||||
$field['values'] .= "\n\t".$property['name'].'="'.$settings[$property['name']].'" ';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$field['values'] .= "\n\t".$property['name'].'="'.$property['example'].'" ';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$field['values'] .= "\n/>";
|
|
||||||
$field['values_description'] .= '</tbody></table>';
|
|
||||||
// return found field options
|
|
||||||
return $field;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the basic localkey
|
* the basic localkey
|
||||||
**/
|
**/
|
||||||
|
Loading…
Reference in New Issue
Block a user