forked from joomla/Component-Builder
Expanded the automatic DB update feature, to insure that any changes to a field name/datatype/lenght will now also create a DB update, resolve gh-241
This commit is contained in:
parent
79747403b6
commit
ee949fbe6e
@ -126,11 +126,11 @@ 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*: 10th March, 2018
|
+ *Last Build*: 11th March, 2018
|
||||||
+ *Version*: 2.6.18
|
+ *Version*: 2.6.18
|
||||||
+ *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*: **184097**
|
+ *Line count*: **184122**
|
||||||
+ *Field count*: **1651**
|
+ *Field count*: **1651**
|
||||||
+ *File count*: **1172**
|
+ *File count*: **1172**
|
||||||
+ *Folder count*: **189**
|
+ *Folder count*: **189**
|
||||||
|
@ -126,11 +126,11 @@ 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*: 10th March, 2018
|
+ *Last Build*: 11th March, 2018
|
||||||
+ *Version*: 2.6.18
|
+ *Version*: 2.6.18
|
||||||
+ *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*: **184097**
|
+ *Line count*: **184122**
|
||||||
+ *Field count*: **1651**
|
+ *Field count*: **1651**
|
||||||
+ *File count*: **1172**
|
+ *File count*: **1172**
|
||||||
+ *Folder count*: **189**
|
+ *Folder count*: **189**
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
/* CSS Document */
|
/* CSS Document */
|
||||||
|
|
||||||
|
|
||||||
.fieldMedium {
|
.fieldMedium {
|
||||||
width: 80px !important;
|
width: 80px !important;
|
||||||
}
|
}
|
||||||
|
@ -69,11 +69,11 @@
|
|||||||
min="10"
|
min="10"
|
||||||
max="100"
|
max="100"
|
||||||
step="10" />
|
step="10" />
|
||||||
<!-- Spacer_hr_a Field. Type: Spacer. A None Database Field. (joomla) -->
|
<!-- Spacer_hr_one Field. Type: Spacer. A None Database Field. (joomla) -->
|
||||||
<field type="spacer"
|
<field type="spacer"
|
||||||
name="spacer_hr_a"
|
name="spacer_hr_one"
|
||||||
hr="true"
|
hr="true"
|
||||||
class="spacer_hr_a" />
|
class="spacer_hr_one" />
|
||||||
<!-- Api Field. Type: User. (joomla) -->
|
<!-- Api Field. Type: User. (joomla) -->
|
||||||
<field type="user"
|
<field type="user"
|
||||||
name="api"
|
name="api"
|
||||||
@ -114,11 +114,11 @@
|
|||||||
<option value="604800">COM_COMPONENTBUILDER_CONFIG_EVERY_WEEK</option>
|
<option value="604800">COM_COMPONENTBUILDER_CONFIG_EVERY_WEEK</option>
|
||||||
<option value="0">COM_COMPONENTBUILDER_CONFIG_NEVER_UPDATE</option>
|
<option value="0">COM_COMPONENTBUILDER_CONFIG_NEVER_UPDATE</option>
|
||||||
</field>
|
</field>
|
||||||
<!-- Spacer_hr_b Field. Type: Spacer. A None Database Field. (joomla) -->
|
<!-- Spacer_hr_two Field. Type: Spacer. A None Database Field. (joomla) -->
|
||||||
<field type="spacer"
|
<field type="spacer"
|
||||||
name="spacer_hr_b"
|
name="spacer_hr_two"
|
||||||
hr="true"
|
hr="true"
|
||||||
class="spacer_hr_b" />
|
class="spacer_hr_two" />
|
||||||
<field name="autorTitle"
|
<field name="autorTitle"
|
||||||
type="spacer"
|
type="spacer"
|
||||||
label="COM_COMPONENTBUILDER_CONFIG_AUTHOR"
|
label="COM_COMPONENTBUILDER_CONFIG_AUTHOR"
|
||||||
|
@ -428,6 +428,27 @@ class Get
|
|||||||
*/
|
*/
|
||||||
private $_fieldData = array();
|
private $_fieldData = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set unique Names
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
public $uniqueNames = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set unique Names
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $uniqueFieldNames = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Category other name bucket
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
public $catOtherName = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The linked admin view tabs
|
* The linked admin view tabs
|
||||||
*
|
*
|
||||||
@ -952,13 +973,32 @@ class Get
|
|||||||
$component->addconfig = (isset($component->addconfig) && ComponentbuilderHelper::checkJson($component->addconfig)) ? json_decode($component->addconfig, true) : null;
|
$component->addconfig = (isset($component->addconfig) && ComponentbuilderHelper::checkJson($component->addconfig)) ? json_decode($component->addconfig, true) : null;
|
||||||
if (ComponentbuilderHelper::checkArray($component->addconfig))
|
if (ComponentbuilderHelper::checkArray($component->addconfig))
|
||||||
{
|
{
|
||||||
$component->config = array_map(function($array)
|
$component->config = array_map(function($field)
|
||||||
{
|
{
|
||||||
$array['alias'] = 0;
|
// set hash
|
||||||
$array['title'] = 0;
|
static $hash = 1;
|
||||||
$array['settings'] = $this->getFieldData($array['field']);
|
// load hash
|
||||||
return $array;
|
$field['hash'] = md5($field['field'].$hash);
|
||||||
|
// increment hash
|
||||||
|
$hash++;
|
||||||
|
$field['alias'] = 0;
|
||||||
|
$field['title'] = 0;
|
||||||
|
// load the settings
|
||||||
|
$field['settings'] = $this->getFieldData($field['field']);
|
||||||
|
// set real field name
|
||||||
|
$field['base_name'] = $this->getFieldName($field);
|
||||||
|
// set unigue name keeper
|
||||||
|
$this->setUniqueNameCounter($this->getFieldName($field), 'configs');
|
||||||
|
// return field
|
||||||
|
return $field;
|
||||||
}, array_values($component->addconfig));
|
}, array_values($component->addconfig));
|
||||||
|
|
||||||
|
// do some house cleaning (for fields)
|
||||||
|
foreach ($component->config as $field)
|
||||||
|
{
|
||||||
|
// so first we lock the field name in
|
||||||
|
$this->getFieldName($field, 'configs');
|
||||||
|
}
|
||||||
// unset original value
|
// unset original value
|
||||||
unset($component->addconfig);
|
unset($component->addconfig);
|
||||||
}
|
}
|
||||||
@ -1357,11 +1397,24 @@ class Get
|
|||||||
if (ComponentbuilderHelper::checkArray($view->addfields))
|
if (ComponentbuilderHelper::checkArray($view->addfields))
|
||||||
{
|
{
|
||||||
// load the field data
|
// load the field data
|
||||||
$view->fields = array_map(function($array) use($name_single, $name_list)
|
$view->fields = array_map(function($field) use($name_single, $name_list)
|
||||||
{
|
{
|
||||||
$array['settings'] = $this->getFieldData($array['field'], $name_single, $name_list);
|
// set hash
|
||||||
return $array;
|
static $hash = 1;
|
||||||
|
// load hash
|
||||||
|
$field['hash'] = md5($field['field'].$hash);
|
||||||
|
// increment hash
|
||||||
|
$hash++;
|
||||||
|
// set the settings
|
||||||
|
$field['settings'] = $this->getFieldData($field['field'], $name_single, $name_list);
|
||||||
|
// set real field name
|
||||||
|
$field['base_name'] = $this->getFieldName($field);
|
||||||
|
// set unigue name keeper
|
||||||
|
$this->setUniqueNameCounter($field['base_name'], $name_list);
|
||||||
|
// return field
|
||||||
|
return $field;
|
||||||
}, array_values($view->addfields));
|
}, array_values($view->addfields));
|
||||||
|
|
||||||
// sort the fields acording to order
|
// sort the fields acording to order
|
||||||
usort($view->fields, function($a, $b)
|
usort($view->fields, function($a, $b)
|
||||||
{
|
{
|
||||||
@ -1383,6 +1436,62 @@ class Get
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// do some house cleaning (for fields)
|
||||||
|
foreach ($view->fields as $field)
|
||||||
|
{
|
||||||
|
// so first we lock the field name in
|
||||||
|
$field_name = $this->getFieldName($field, $name_list);
|
||||||
|
// check if the field changed since the last compilation
|
||||||
|
if (ComponentbuilderHelper::checkObject($field['settings']->history))
|
||||||
|
{
|
||||||
|
// check if the datatype changed
|
||||||
|
if (isset($field['settings']->history->datatype))
|
||||||
|
{
|
||||||
|
$this->setUpdateSQL($field['settings']->history->datatype, $field['settings']->datatype, 'field.datatype', $name_single.'.'.$field_name);
|
||||||
|
}
|
||||||
|
// check if the datatype lenght changed
|
||||||
|
if (isset($field['settings']->history->datalenght) && isset($field['settings']->history->datalenght_other))
|
||||||
|
{
|
||||||
|
$this->setUpdateSQL($field['settings']->history->datalenght.$field['settings']->history->datalenght_other, $field['settings']->datalenght.$field['settings']->datalenght_other, 'field.lenght', $name_single.'.'.$field_name);
|
||||||
|
}
|
||||||
|
// check if the name changed
|
||||||
|
if (isset($field['settings']->history->xml) && ComponentbuilderHelper::checkJson($field['settings']->history->xml))
|
||||||
|
{
|
||||||
|
// only run if this is not an alias or a tag
|
||||||
|
if ((!isset($field['alias']) || !$field['alias']) && 'tag' !== $field['settings']->type_name)
|
||||||
|
{
|
||||||
|
// build temp field bucket
|
||||||
|
$tmpfield = array();
|
||||||
|
$tmpfield['settings'] = new stdClass();
|
||||||
|
// convert the xml json string to normal string
|
||||||
|
$tmpfield['settings']->xml = $this->setDynamicValues(json_decode($field['settings']->history->xml));
|
||||||
|
// add properties from current field as it is generic
|
||||||
|
$tmpfield['settings']->properties = $field['settings']->properties;
|
||||||
|
// add the old name
|
||||||
|
$tmpfield['settings']->name = $field['settings']->history->name;
|
||||||
|
// add the field type from current field since it is generic
|
||||||
|
$tmpfield['settings']->type_name = $field['settings']->type_name;
|
||||||
|
// get the old name
|
||||||
|
$old_field_name = $this->getFieldName($tmpfield);
|
||||||
|
|
||||||
|
// only run this if not a multi field
|
||||||
|
if (!isset($this->uniqueNames[$name_list]['names'][$field_name]))
|
||||||
|
{
|
||||||
|
// this only works when the field is not multiple of the same field
|
||||||
|
$this->setUpdateSQL($old_field_name, $field_name, 'field.name', $name_single.'.'.$field_name);
|
||||||
|
}
|
||||||
|
elseif ($old_field_name !== $field_name)
|
||||||
|
{
|
||||||
|
// give a notice atleast that the multi fields could have changed and no DB update was done
|
||||||
|
$this->app->enqueueMessage(JText::sprintf('You have a field called <b>%s</b> that has been added multiple times to the <b>%s</b> view, the name of that field has changed to <b>%s</b>. Normaly we would automaticly add the update SQL to your component, but with multiple fields this does not work automaticly since it could be that noting changed and it just seems like it did. Therefore you will have to do this manualy if it actualy did change!', $field_name, $name_single, $old_field_name), 'Notice');
|
||||||
|
}
|
||||||
|
// remove tmp
|
||||||
|
unset($tmpfield);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset($view->addfields);
|
unset($view->addfields);
|
||||||
@ -1418,16 +1527,10 @@ class Get
|
|||||||
$required = ($required == true) ? 'yes' : 'no';
|
$required = ($required == true) ? 'yes' : 'no';
|
||||||
$filter = ComponentbuilderHelper::getBetween($fieldValues['settings']->xml, 'filter="', '"');
|
$filter = ComponentbuilderHelper::getBetween($fieldValues['settings']->xml, 'filter="', '"');
|
||||||
$filter = ComponentbuilderHelper::checkString($filter) ? $filter : 'none';
|
$filter = ComponentbuilderHelper::checkString($filter) ? $filter : 'none';
|
||||||
// get name
|
|
||||||
$name = ComponentbuilderHelper::getBetween($fieldValues['settings']->xml, 'name="', '"');
|
|
||||||
$name = ComponentbuilderHelper::checkString($name) ? $name : $fieldValues['settings']->name;
|
|
||||||
// get type
|
|
||||||
$type = ComponentbuilderHelper::getBetween($fieldValues['settings']->xml, 'type="', '"');
|
|
||||||
$type = ComponentbuilderHelper::checkString($type) ? $type : $fieldValues['settings']->type_name;
|
|
||||||
// set the field name
|
// set the field name
|
||||||
$conditionValue['target_field'][$fieldKey] = array(
|
$conditionValue['target_field'][$fieldKey] = array(
|
||||||
'name' => ComponentbuilderHelper::safeString($name),
|
'name' => $this->getFieldName($fieldValues, $name_list),
|
||||||
'type' => ComponentbuilderHelper::safeString($type),
|
'type' => $this->getFieldType($fieldValues),
|
||||||
'required' => $required,
|
'required' => $required,
|
||||||
'filter' => $filter
|
'filter' => $filter
|
||||||
);
|
);
|
||||||
@ -1444,15 +1547,11 @@ class Get
|
|||||||
{
|
{
|
||||||
if ((int) $fieldValue['field'] == (int) $conditionValue['match_field'])
|
if ((int) $fieldValue['field'] == (int) $conditionValue['match_field'])
|
||||||
{
|
{
|
||||||
// get name
|
// set the type
|
||||||
$name = ComponentbuilderHelper::getBetween($fieldValue['settings']->xml, 'name="', '"');
|
$type = $this->getFieldType($fieldValue);
|
||||||
$name = ComponentbuilderHelper::checkString($name) ? $name : $fieldValue['settings']->name;
|
|
||||||
// get type
|
|
||||||
$type = ComponentbuilderHelper::getBetween($fieldValue['settings']->xml, 'type="', '"');
|
|
||||||
$type = ComponentbuilderHelper::checkString($type) ? $type : $fieldValue['settings']->type_name;
|
|
||||||
// set the field details
|
// set the field details
|
||||||
$conditionValue['match_name'] = ComponentbuilderHelper::safeString($name);
|
$conditionValue['match_name'] = $this->getFieldName($fieldValue, $name_list);
|
||||||
$conditionValue['match_type'] = ComponentbuilderHelper::safeString($type);
|
$conditionValue['match_type'] = $type;
|
||||||
$conditionValue['match_xml'] = $fieldValue['settings']->xml;
|
$conditionValue['match_xml'] = $fieldValue['settings']->xml;
|
||||||
// if custom field load field being extended
|
// if custom field load field being extended
|
||||||
if (!ComponentbuilderHelper::typeField($type))
|
if (!ComponentbuilderHelper::typeField($type))
|
||||||
@ -1500,7 +1599,7 @@ class Get
|
|||||||
}
|
}
|
||||||
$this->customScriptBuilder[$scripter_target][$name_single] = '';
|
$this->customScriptBuilder[$scripter_target][$name_single] = '';
|
||||||
}
|
}
|
||||||
$this->customScriptBuilder[$scripter_target][$name_single] .= $view->$scripter;
|
$this->customScriptBuilder[$scripter_target][$name_single] .= PHP_EOL . $view->$scripter;
|
||||||
if (strpos($view->$scripter, "token") !== false || strpos($view->$scripter, "task=ajax") !== false)
|
if (strpos($view->$scripter, "token") !== false || strpos($view->$scripter, "task=ajax") !== false)
|
||||||
{
|
{
|
||||||
if (!$this->customScriptBuilder['token'][$name_single])
|
if (!$this->customScriptBuilder['token'][$name_single])
|
||||||
@ -1521,7 +1620,7 @@ class Get
|
|||||||
{
|
{
|
||||||
$this->customScriptBuilder[$scripter][$name_single] = '';
|
$this->customScriptBuilder[$scripter][$name_single] = '';
|
||||||
}
|
}
|
||||||
$this->customScriptBuilder[$scripter][$name_single] .= base64_decode($view->$scripter);
|
$this->customScriptBuilder[$scripter][$name_single] .= PHP_EOL . base64_decode($view->$scripter);
|
||||||
unset($view->$scripter);
|
unset($view->$scripter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2076,7 +2175,7 @@ class Get
|
|||||||
$this->_fieldData[$id]->javascript_views_footer = $this->setDynamicValues(base64_decode($this->_fieldData[$id]->javascript_views_footer));
|
$this->_fieldData[$id]->javascript_views_footer = $this->setDynamicValues(base64_decode($this->_fieldData[$id]->javascript_views_footer));
|
||||||
$this->_fieldData[$id]->javascript_views_footer_decoded = true;
|
$this->_fieldData[$id]->javascript_views_footer_decoded = true;
|
||||||
}
|
}
|
||||||
$this->customScriptBuilder['views_footer'][$name_list] .= $this->_fieldData[$id]->javascript_views_footer;
|
$this->customScriptBuilder['views_footer'][$name_list] .= PHP_EOL . $this->_fieldData[$id]->javascript_views_footer;
|
||||||
if (strpos($this->_fieldData[$id]->javascript_views_footer, "token") !== false ||
|
if (strpos($this->_fieldData[$id]->javascript_views_footer, "token") !== false ||
|
||||||
strpos($this->_fieldData[$id]->javascript_views_footer, "task=ajax") !== false)
|
strpos($this->_fieldData[$id]->javascript_views_footer, "task=ajax") !== false)
|
||||||
{
|
{
|
||||||
@ -2108,7 +2207,7 @@ class Get
|
|||||||
$this->setCustomCodeData($this->_fieldData[$id]->css_views);
|
$this->setCustomCodeData($this->_fieldData[$id]->css_views);
|
||||||
$this->_fieldData[$id]->css_views_decoded = true;
|
$this->_fieldData[$id]->css_views_decoded = true;
|
||||||
}
|
}
|
||||||
$this->customScriptBuilder['css_views'][$name_list] .= $this->_fieldData[$id]->css_views;
|
$this->customScriptBuilder['css_views'][$name_list] .= PHP_EOL . $this->_fieldData[$id]->css_views;
|
||||||
}
|
}
|
||||||
|
|
||||||
// add this only once to view.
|
// add this only once to view.
|
||||||
@ -2123,6 +2222,207 @@ class Get
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the field's actual type
|
||||||
|
*
|
||||||
|
* @param object $field The field object
|
||||||
|
*
|
||||||
|
* @return string Success returns field type
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function getFieldType(&$field)
|
||||||
|
{
|
||||||
|
// set the type name
|
||||||
|
$type_name = ComponentbuilderHelper::safeString($field['settings']->type_name);
|
||||||
|
// check that we have the poperties
|
||||||
|
if (ComponentbuilderHelper::checkArray($field['settings']->properties))
|
||||||
|
{
|
||||||
|
foreach ($field['settings']->properties as $property)
|
||||||
|
{
|
||||||
|
if ($property['name'] === 'type')
|
||||||
|
{
|
||||||
|
if ($type_name === 'custom' || $type_name === 'customuser')
|
||||||
|
{
|
||||||
|
$type = ComponentbuilderHelper::safeString(ComponentbuilderHelper::getBetween($field['settings']->xml, 'type="', '"'));
|
||||||
|
}
|
||||||
|
// use field core type
|
||||||
|
elseif (ComponentbuilderHelper::checkString($type_name))
|
||||||
|
{
|
||||||
|
$type = $type_name;
|
||||||
|
}
|
||||||
|
// make sure none adjustable fields are set (should be same as above)
|
||||||
|
elseif (isset($property['example']) && ComponentbuilderHelper::checkString($property['example']) && $property['adjustable'] == 0)
|
||||||
|
{
|
||||||
|
$type = $property['example'];
|
||||||
|
}
|
||||||
|
// fall back on the xml settings (not ideal)
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$type = ComponentbuilderHelper::safeString(ComponentbuilderHelper::getBetween($xml, 'type="', '"'));
|
||||||
|
}
|
||||||
|
|
||||||
|
// check if the value is set
|
||||||
|
if (ComponentbuilderHelper::checkString($type))
|
||||||
|
{
|
||||||
|
// add the value
|
||||||
|
return $type;
|
||||||
|
}
|
||||||
|
// exit foreach loop
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// fall back to text
|
||||||
|
return 'text';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the field's actual name
|
||||||
|
*
|
||||||
|
* @param object $field The field object
|
||||||
|
* @param string $listViewName The list view name
|
||||||
|
*
|
||||||
|
* @return string Success returns field name
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function getFieldName(&$field, $listViewName = null)
|
||||||
|
{
|
||||||
|
// return the unique name if already set
|
||||||
|
if (ComponentbuilderHelper::checkString($listViewName) && isset($field['hash']) && isset($this->uniqueFieldNames[$listViewName.$field['hash']]))
|
||||||
|
{
|
||||||
|
return $this->uniqueFieldNames[$listViewName.$field['hash']];
|
||||||
|
}
|
||||||
|
// set the type name
|
||||||
|
$type_name = ComponentbuilderHelper::safeString($field['settings']->type_name);
|
||||||
|
// set the name of the field
|
||||||
|
$name = ComponentbuilderHelper::safeString($field['settings']->name);
|
||||||
|
// check that we have the poperties
|
||||||
|
if (ComponentbuilderHelper::checkArray($field['settings']->properties))
|
||||||
|
{
|
||||||
|
foreach ($field['settings']->properties as $property)
|
||||||
|
{
|
||||||
|
if ($property['name'] === 'name')
|
||||||
|
{
|
||||||
|
// if category then name must be catid (only one per view)
|
||||||
|
if ($type_name === 'category')
|
||||||
|
{
|
||||||
|
// quick check if this is a category linked to view page
|
||||||
|
$requeSt_id = ComponentbuilderHelper::getBetween($field['settings']->xml, 'name="', '"');
|
||||||
|
if (strpos($requeSt_id, '_request_id') !== false || strpos($requeSt_id, '_request_catid') !== false)
|
||||||
|
{
|
||||||
|
// keep it then, don't change
|
||||||
|
$name = $requeSt_id;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$name = 'catid';
|
||||||
|
}
|
||||||
|
// if list view name is set
|
||||||
|
if (ComponentbuilderHelper::checkString($listViewName))
|
||||||
|
{
|
||||||
|
// check if we should use another Text Name as this views name
|
||||||
|
$otherName = ComponentbuilderHelper::getBetween($field['settings']->xml, 'othername="', '"');
|
||||||
|
$otherViews = ComponentbuilderHelper::getBetween($field['settings']->xml, 'views="', '"');
|
||||||
|
$otherView = ComponentbuilderHelper::getBetween($field['settings']->xml, 'view="', '"');
|
||||||
|
if (ComponentbuilderHelper::checkString($otherName) && ComponentbuilderHelper::checkString($otherViews) && ComponentbuilderHelper::checkString($otherView))
|
||||||
|
{
|
||||||
|
$this->catOtherName[$listViewName] = array(
|
||||||
|
'name' => ComponentbuilderHelper::safeString($otherName),
|
||||||
|
'views' => ComponentbuilderHelper::safeString($otherViews),
|
||||||
|
'view' => ComponentbuilderHelper::safeString($otherView)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// if tag is set then enable all tag options for this view (only one per view)
|
||||||
|
elseif ($type_name === 'tag')
|
||||||
|
{
|
||||||
|
$name = 'tags';
|
||||||
|
}
|
||||||
|
// if the field is set as alias it must be called alias
|
||||||
|
elseif (isset($field['alias']) && $field['alias'])
|
||||||
|
{
|
||||||
|
$name = 'alias';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$name = ComponentbuilderHelper::safeString(ComponentbuilderHelper::getBetween($field['settings']->xml, 'name="', '"'));
|
||||||
|
}
|
||||||
|
// exit foreach loop
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// return the value unique
|
||||||
|
if (ComponentbuilderHelper::checkString($listViewName) && isset($field['hash']) )
|
||||||
|
{
|
||||||
|
$this->uniqueFieldNames[$listViewName.$field['hash']] = $this->uniqueName($name, $listViewName);
|
||||||
|
// now return the unique name
|
||||||
|
return $this->uniqueFieldNames[$listViewName.$field['hash']];
|
||||||
|
}
|
||||||
|
// fall back to global
|
||||||
|
return $name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Count how many times the same field is used per view
|
||||||
|
*
|
||||||
|
* @param string $name The name of the field
|
||||||
|
* @param string $view The name of the view
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
protected function setUniqueNameCounter($name, $view)
|
||||||
|
{
|
||||||
|
if (!isset($this->uniqueNames[$view]))
|
||||||
|
{
|
||||||
|
$this->uniqueNames[$view] = array();
|
||||||
|
$this->uniqueNames[$view]['counter'] = array();
|
||||||
|
$this->uniqueNames[$view]['names'] = array();
|
||||||
|
}
|
||||||
|
if (!isset($this->uniqueNames[$view]['counter'][$name]))
|
||||||
|
{
|
||||||
|
$this->uniqueNames[$view]['counter'][$name] = 1;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// count how many times the field is used
|
||||||
|
$this->uniqueNames[$view]['counter'][$name] ++;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Naming each field with an unique name
|
||||||
|
*
|
||||||
|
* @param string $name The name of the field
|
||||||
|
* @param string $view The name of the view
|
||||||
|
*
|
||||||
|
* @return string the name
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
protected function uniqueName($name, $view)
|
||||||
|
{
|
||||||
|
// only increment if the field name is used multiple times
|
||||||
|
if (isset($this->uniqueNames[$view]['counter'][$name]) && $this->uniqueNames[$view]['counter'][$name] > 1)
|
||||||
|
{
|
||||||
|
$counter = 1;
|
||||||
|
// set the unique name
|
||||||
|
$uniqueName = ComponentbuilderHelper::safeString($name . '_' . $counter);
|
||||||
|
while (isset($this->uniqueNames[$view]['names'][$uniqueName]))
|
||||||
|
{
|
||||||
|
// increment the number
|
||||||
|
$counter++;
|
||||||
|
// try again
|
||||||
|
$uniqueName = ComponentbuilderHelper::safeString($name . '_' . $counter);
|
||||||
|
}
|
||||||
|
// set the new name number
|
||||||
|
$this->uniqueNames[$view]['names'][$uniqueName] = $counter;
|
||||||
|
// return the unique name
|
||||||
|
return $uniqueName;
|
||||||
|
}
|
||||||
|
return $name;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set get Data
|
* Set get Data
|
||||||
*
|
*
|
||||||
|
@ -551,8 +551,8 @@ class Structure extends Get
|
|||||||
if (count($getter) == 2 && is_numeric($getter[1]))
|
if (count($getter) == 2 && is_numeric($getter[1]))
|
||||||
{
|
{
|
||||||
// the pointers
|
// the pointers
|
||||||
$id = (int) $getter[1];
|
|
||||||
$t = ComponentbuilderHelper::safeString($getter[0], 'U');
|
$t = ComponentbuilderHelper::safeString($getter[0], 'U');
|
||||||
|
$id = (int) $getter[1];
|
||||||
// the dynamic stuff
|
// the dynamic stuff
|
||||||
$targets = array('A' => 'admin_views', 'C' => 'custom_admin_views');
|
$targets = array('A' => 'admin_views', 'C' => 'custom_admin_views');
|
||||||
$names = array('A' => 'admin view', 'C' => 'custom admin view');
|
$names = array('A' => 'admin view', 'C' => 'custom admin view');
|
||||||
@ -561,12 +561,14 @@ class Structure extends Get
|
|||||||
// check the target values
|
// check the target values
|
||||||
if (isset($targets[$t]) && $id > 0)
|
if (isset($targets[$t]) && $id > 0)
|
||||||
{
|
{
|
||||||
|
// set the type name
|
||||||
|
$type_names = ComponentbuilderHelper::safeString($targets[$t], 'w');
|
||||||
// set the dynamic dash
|
// set the dynamic dash
|
||||||
if (isset($this->componentData->{$targets[$t]}) && ComponentbuilderHelper::checkArray($this->componentData->{$targets[$t]}))
|
if (isset($this->componentData->{$targets[$t]}) && ComponentbuilderHelper::checkArray($this->componentData->{$targets[$t]}))
|
||||||
{
|
{
|
||||||
// search the target views
|
// search the target views
|
||||||
$dashboard = (array) array_filter($this->componentData->{$targets[$t]}, function($view) use($id, $t, $types){
|
$dashboard = (array) array_filter($this->componentData->{$targets[$t]}, function($view) use($id, $t, $types){
|
||||||
if (isset($view[$types[$t]]) && $id == (int) $view[$types[$t]])
|
if (isset($view[$types[$t]]) && $id == $view[$types[$t]])
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -579,16 +581,12 @@ class Structure extends Get
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// set the type name
|
|
||||||
$type_names = ComponentbuilderHelper::safeString($targets[$t], 'w');
|
|
||||||
// set massage that something is wrong
|
// set massage that something is wrong
|
||||||
$this->app->enqueueMessage(JText::sprintf('The <b>%s</b> (<b>%s</b>) is not available in your component! Please insure to only used %s, for a dynamic dashboard, that are still linked to your component.', $names[$t], $this->componentData->dashboard, $type_names), 'Error');
|
$this->app->enqueueMessage(JText::sprintf('The <b>%s</b> (<b>%s</b>) is not available in your component! Please insure to only used %s, for a dynamic dashboard, that are still linked to your component.', $names[$t], $this->componentData->dashboard, $type_names), 'Error');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// set the type name
|
|
||||||
$type_names = ComponentbuilderHelper::safeString($targets[$t], 'w');
|
|
||||||
// set massage that something is wrong
|
// set massage that something is wrong
|
||||||
$this->app->enqueueMessage(JText::sprintf('The <b>%s</b> (<b>%s</b>) is not available in your component! Please insure to only used %s, for a dynamic dashboard, that are still linked to your component.', $names[$t], $this->componentData->dashboard, $type_names), 'Error');
|
$this->app->enqueueMessage(JText::sprintf('The <b>%s</b> (<b>%s</b>) is not available in your component! Please insure to only used %s, for a dynamic dashboard, that are still linked to your component.', $names[$t], $this->componentData->dashboard, $type_names), 'Error');
|
||||||
}
|
}
|
||||||
|
@ -75,13 +75,6 @@ class Fields extends Structure
|
|||||||
*/
|
*/
|
||||||
public $siteFieldData = array();
|
public $siteFieldData = array();
|
||||||
|
|
||||||
/**
|
|
||||||
* Category other name bucket
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
public $catOtherName = array();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* list of fields that are not being escaped
|
* list of fields that are not being escaped
|
||||||
*
|
*
|
||||||
@ -341,13 +334,6 @@ class Fields extends Structure
|
|||||||
*/
|
*/
|
||||||
public $fieldsNames = array();
|
public $fieldsNames = array();
|
||||||
|
|
||||||
/**
|
|
||||||
* Set unique Names
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
public $uniqueNames = array();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default Fields
|
* Default Fields
|
||||||
*
|
*
|
||||||
@ -461,22 +447,14 @@ class Fields extends Structure
|
|||||||
$this->langContent[$this->lang][$langView . '_VERSION_LABEL'] = "Revision";
|
$this->langContent[$this->lang][$langView . '_VERSION_LABEL'] = "Revision";
|
||||||
$this->langContent[$this->lang][$langView . '_VERSION_DESC'] = "A count of the number of times this " . $view['settings']->name_single . " has been revised.";
|
$this->langContent[$this->lang][$langView . '_VERSION_DESC'] = "A count of the number of times this " . $view['settings']->name_single . " has been revised.";
|
||||||
$this->langContent[$this->lang][$langView . '_SAVE_WARNING'] = "Alias already existed so a number was added at the end. You can re-edit the " . $view['settings']->name_single . " to customise the alias.";
|
$this->langContent[$this->lang][$langView . '_SAVE_WARNING'] = "Alias already existed so a number was added at the end. You can re-edit the " . $view['settings']->name_single . " to customise the alias.";
|
||||||
|
|
||||||
// check if the same field is added multiple times
|
|
||||||
foreach ($view['settings']->fields as $field)
|
|
||||||
{
|
|
||||||
$name = ComponentbuilderHelper::safeString($field['settings']->name);
|
|
||||||
$this->setUniqueNameKeeper($field, $view['settings']->type, $name, $viewName);
|
|
||||||
}
|
|
||||||
// start adding dynamc fields
|
// start adding dynamc fields
|
||||||
$dynamicFieldsXML = array();
|
$dynamicFieldsXML = array();
|
||||||
$spacerCounter = 'a';
|
|
||||||
// set the custom table key
|
// set the custom table key
|
||||||
$dbkey = 'g';
|
$dbkey = 'g';
|
||||||
// TODO we should add the global and local view switch if field for front end
|
// TODO we should add the global and local view switch if field for front end
|
||||||
foreach ($view['settings']->fields as $field)
|
foreach ($view['settings']->fields as $field)
|
||||||
{
|
{
|
||||||
$dynamicFieldsXML[] = $this->setDynamicField($field, $view, $view['settings']->type, $langView, $viewName, $listViewName, $spacerCounter, $this->placeholders, $dbkey, true);
|
$dynamicFieldsXML[] = $this->setDynamicField($field, $view, $view['settings']->type, $langView, $viewName, $listViewName, $this->placeholders, $dbkey, true);
|
||||||
}
|
}
|
||||||
// set the default fields
|
// set the default fields
|
||||||
$XML = new simpleXMLElement('<a/>');
|
$XML = new simpleXMLElement('<a/>');
|
||||||
@ -781,7 +759,6 @@ class Fields extends Structure
|
|||||||
* @param string $langView The language string of the view
|
* @param string $langView The language string of the view
|
||||||
* @param string $viewName The singel view name
|
* @param string $viewName The singel view name
|
||||||
* @param string $listViewName The list view name
|
* @param string $listViewName The list view name
|
||||||
* @param string $spacerCounter The space counter value
|
|
||||||
* @param array $placeholders The place holder and replace values
|
* @param array $placeholders The place holder and replace values
|
||||||
* @param string $dbkey The the custom table key
|
* @param string $dbkey The the custom table key
|
||||||
* @param boolean $build The switch to set the build option
|
* @param boolean $build The switch to set the build option
|
||||||
@ -789,19 +766,19 @@ class Fields extends Structure
|
|||||||
* @return SimpleXMLElement The complete field in xml
|
* @return SimpleXMLElement The complete field in xml
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function setDynamicField(&$field, &$view, &$viewType, &$langView, &$viewName, &$listViewName, &$spacerCounter, &$placeholders, &$dbkey, $build)
|
public function setDynamicField(&$field, &$view, &$viewType, &$langView, &$viewName, &$listViewName, &$placeholders, &$dbkey, $build)
|
||||||
{
|
{
|
||||||
if (isset($field['settings']) && ComponentbuilderHelper::checkObject($field['settings']))
|
if (isset($field['settings']) && ComponentbuilderHelper::checkObject($field['settings']))
|
||||||
{
|
{
|
||||||
// reset some values
|
// reset some values
|
||||||
$name = ComponentbuilderHelper::safeString($field['settings']->name);
|
$name = $this->getFieldName($field, $listViewName);
|
||||||
$typeName = ComponentbuilderHelper::safeString($field['settings']->type_name);
|
$typeName = $this->getFieldType($field);
|
||||||
$multiple = false;
|
$multiple = false;
|
||||||
$langLabel = '';
|
$langLabel = '';
|
||||||
$fieldSet = '';
|
$fieldSet = '';
|
||||||
$fieldAttributes = array();
|
$fieldAttributes = array();
|
||||||
// set field attributes
|
// set field attributes
|
||||||
$fieldAttributes = $this->setFieldAttributes($field, $viewType, $name, $typeName, $multiple, $langLabel, $langView, $spacerCounter, $listViewName, $viewName, $placeholders);
|
$fieldAttributes = $this->setFieldAttributes($field, $viewType, $name, $typeName, $multiple, $langLabel, $langView, $listViewName, $viewName, $placeholders);
|
||||||
// check if values were set
|
// check if values were set
|
||||||
if (ComponentbuilderHelper::checkArray($fieldAttributes))
|
if (ComponentbuilderHelper::checkArray($fieldAttributes))
|
||||||
{
|
{
|
||||||
@ -849,11 +826,6 @@ class Fields extends Structure
|
|||||||
}
|
}
|
||||||
// now add to the field set
|
// now add to the field set
|
||||||
$xmlElement = $this->setField('spacer', $fieldAttributes, $name, $typeName, $langView, $viewName, $listViewName, $placeholders, $optionArray);
|
$xmlElement = $this->setField('spacer', $fieldAttributes, $name, $typeName, $langView, $viewName, $listViewName, $placeholders, $optionArray);
|
||||||
// increment spacer counter
|
|
||||||
if ($typeName === 'spacer')
|
|
||||||
{
|
|
||||||
$spacerCounter++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
elseif ($this->defaultField($typeName, 'special'))
|
elseif ($this->defaultField($typeName, 'special'))
|
||||||
{
|
{
|
||||||
@ -1064,12 +1036,12 @@ class Fields extends Structure
|
|||||||
$fieldData['settings'] = $this->getFieldData($fieldId, $viewName);
|
$fieldData['settings'] = $this->getFieldData($fieldId, $viewName);
|
||||||
if (ComponentbuilderHelper::checkObject($fieldData['settings']))
|
if (ComponentbuilderHelper::checkObject($fieldData['settings']))
|
||||||
{
|
{
|
||||||
$r_name = ComponentbuilderHelper::safeString($fieldData['settings']->name);
|
$r_name = $this->getFieldName($fieldData);
|
||||||
$r_typeName = ComponentbuilderHelper::safeString($fieldData['settings']->type_name);
|
$r_typeName = $this->getFieldType($fieldData);
|
||||||
$r_multiple = false;
|
$r_multiple = false;
|
||||||
$r_langLabel = '';
|
$r_langLabel = '';
|
||||||
// get field values
|
// get field values
|
||||||
$r_fieldValues = $this->setFieldAttributes($fieldData, $view, $r_name, $r_typeName, $r_multiple, $r_langLabel, $langView, $spacerCounter, $listViewName, $viewName, $placeholders, true);
|
$r_fieldValues = $this->setFieldAttributes($fieldData, $view, $r_name, $r_typeName, $r_multiple, $r_langLabel, $langView, $listViewName, $viewName, $placeholders, true);
|
||||||
// check if values were set
|
// check if values were set
|
||||||
if (ComponentbuilderHelper::checkArray($r_fieldValues))
|
if (ComponentbuilderHelper::checkArray($r_fieldValues))
|
||||||
{
|
{
|
||||||
@ -1161,12 +1133,12 @@ class Fields extends Structure
|
|||||||
$fieldData['settings'] = $this->getFieldData($fieldId, $viewName);
|
$fieldData['settings'] = $this->getFieldData($fieldId, $viewName);
|
||||||
if (ComponentbuilderHelper::checkObject($fieldData['settings']))
|
if (ComponentbuilderHelper::checkObject($fieldData['settings']))
|
||||||
{
|
{
|
||||||
$r_name = ComponentbuilderHelper::safeString($fieldData['settings']->name);
|
$r_name = $this->getFieldName($fieldData);
|
||||||
$r_typeName = ComponentbuilderHelper::safeString($fieldData['settings']->type_name);
|
$r_typeName = $this->getFieldType($fieldData);
|
||||||
$r_multiple = false;
|
$r_multiple = false;
|
||||||
$r_langLabel = '';
|
$r_langLabel = '';
|
||||||
// get field values
|
// get field values
|
||||||
$r_fieldValues = $this->setFieldAttributes($fieldData, $view, $r_name, $r_typeName, $r_multiple, $r_langLabel, $langView, $spacerCounter, $listViewName, $viewName, $placeholders, true);
|
$r_fieldValues = $this->setFieldAttributes($fieldData, $view, $r_name, $r_typeName, $r_multiple, $r_langLabel, $langView, $listViewName, $viewName, $placeholders, true);
|
||||||
// check if values were set
|
// check if values were set
|
||||||
if (ComponentbuilderHelper::checkArray($r_fieldValues))
|
if (ComponentbuilderHelper::checkArray($r_fieldValues))
|
||||||
{
|
{
|
||||||
@ -1372,7 +1344,6 @@ class Fields extends Structure
|
|||||||
* @param boolean $multiple The switch to set multiple selection option
|
* @param boolean $multiple The switch to set multiple selection option
|
||||||
* @param string $langLabel The language string for field label
|
* @param string $langLabel The language string for field label
|
||||||
* @param string $langView The language string of the view
|
* @param string $langView The language string of the view
|
||||||
* @param string $spacerCounter The space counter value
|
|
||||||
* @param string $listViewName The list view name
|
* @param string $listViewName The list view name
|
||||||
* @param string $viewName The singel view name
|
* @param string $viewName The singel view name
|
||||||
* @param array $placeholders The place holder and replace values
|
* @param array $placeholders The place holder and replace values
|
||||||
@ -1381,7 +1352,7 @@ class Fields extends Structure
|
|||||||
* @return array The field attributes
|
* @return array The field attributes
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private function setFieldAttributes(&$field, &$viewType, &$name, &$typeName, &$multiple, &$langLabel, $langView, &$spacerCounter, $listViewName, $viewName, $placeholders, $repeatable = false)
|
private function setFieldAttributes(&$field, &$viewType, &$name, &$typeName, &$multiple, &$langLabel, $langView, $listViewName, $viewName, $placeholders, $repeatable = false)
|
||||||
{
|
{
|
||||||
// reset array
|
// reset array
|
||||||
$fieldAttributes = array();
|
$fieldAttributes = array();
|
||||||
@ -1402,38 +1373,8 @@ class Fields extends Structure
|
|||||||
$langValue = '';
|
$langValue = '';
|
||||||
if ($property['name'] === 'type')
|
if ($property['name'] === 'type')
|
||||||
{
|
{
|
||||||
if ($typeName === 'custom' || $typeName === 'customuser')
|
// get type name
|
||||||
{
|
$xmlValue = $typeName;
|
||||||
$xmlValue = ComponentbuilderHelper::safeString(ComponentbuilderHelper::getBetween($field['settings']->xml, 'type="', '"'));
|
|
||||||
}
|
|
||||||
// use field core type only if not found
|
|
||||||
elseif (ComponentbuilderHelper::checkString($typeName))
|
|
||||||
{
|
|
||||||
$xmlValue = $typeName;
|
|
||||||
}
|
|
||||||
// make sure none adjustable fields are set
|
|
||||||
elseif (isset($property['example']) && ComponentbuilderHelper::checkString($property['example']) && $property['adjustable'] == 0)
|
|
||||||
{
|
|
||||||
$xmlValue = $property['example'];
|
|
||||||
}
|
|
||||||
// fall back on the xml settings
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$xmlValue = ComponentbuilderHelper::safeString(ComponentbuilderHelper::getBetween($field['settings']->xml, 'type="', '"'));
|
|
||||||
}
|
|
||||||
|
|
||||||
// check if the value is set
|
|
||||||
if (ComponentbuilderHelper::checkString($xmlValue))
|
|
||||||
{
|
|
||||||
// add the value
|
|
||||||
$typeName = $xmlValue;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// fall back to text
|
|
||||||
$xmlValue = 'text';
|
|
||||||
$typeName = $xmlValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// add to custom if it is custom
|
// add to custom if it is custom
|
||||||
if ($setCustom)
|
if ($setCustom)
|
||||||
@ -1444,67 +1385,8 @@ class Fields extends Structure
|
|||||||
}
|
}
|
||||||
elseif ($property['name'] === 'name')
|
elseif ($property['name'] === 'name')
|
||||||
{
|
{
|
||||||
// if category then name must be catid (only one per view)
|
// get the actual field name
|
||||||
if ($typeName === 'category')
|
$xmlValue = $this->setPlaceholders($name, $placeholders);
|
||||||
{
|
|
||||||
// quick check if this is a category linked to view page
|
|
||||||
$requeSt_id = ComponentbuilderHelper::getBetween($field['settings']->xml, 'name="', '"');
|
|
||||||
if (strpos($requeSt_id, '_request_id') !== false || strpos($requeSt_id, '_request_catid') !== false)
|
|
||||||
{
|
|
||||||
// keep it then, don't change
|
|
||||||
$xmlValue = $requeSt_id;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$xmlValue = 'catid';
|
|
||||||
}
|
|
||||||
// check if we should use another Text Name as this views name
|
|
||||||
$otherName = ComponentbuilderHelper::getBetween($field['settings']->xml, 'othername="', '"');
|
|
||||||
$otherViews = ComponentbuilderHelper::getBetween($field['settings']->xml, 'views="', '"');
|
|
||||||
$otherView = ComponentbuilderHelper::getBetween($field['settings']->xml, 'view="', '"');
|
|
||||||
if (ComponentbuilderHelper::checkString($otherName) && ComponentbuilderHelper::checkString($otherViews) && ComponentbuilderHelper::checkString($otherView))
|
|
||||||
{
|
|
||||||
$this->catOtherName[$listViewName] = array(
|
|
||||||
'name' => ComponentbuilderHelper::safeString($otherName),
|
|
||||||
'views' => ComponentbuilderHelper::safeString($otherViews),
|
|
||||||
'view' => ComponentbuilderHelper::safeString($otherView)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// if tag is set then enable all tag options for this view (only one per view)
|
|
||||||
elseif ($typeName === 'tag')
|
|
||||||
{
|
|
||||||
$xmlValue = 'tags';
|
|
||||||
}
|
|
||||||
// if the field is set as alias it must be called alias
|
|
||||||
elseif (isset($field['alias']) && $field['alias'])
|
|
||||||
{
|
|
||||||
$xmlValue = 'alias';
|
|
||||||
}
|
|
||||||
elseif ($typeName === 'spacer')
|
|
||||||
{
|
|
||||||
// make sure the name is unique
|
|
||||||
$xmlValue = $name . '_' . $spacerCounter;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$xmlValue = ComponentbuilderHelper::safeString(ComponentbuilderHelper::getBetween($field['settings']->xml, 'name="', '"'));
|
|
||||||
}
|
|
||||||
|
|
||||||
// use field core name only if not found in xml
|
|
||||||
if (!ComponentbuilderHelper::checkString($xmlValue))
|
|
||||||
{
|
|
||||||
// make sure the XML name is uniqe, so we can add one field multiple times
|
|
||||||
$name = $this->uniqueName($name, $viewName);
|
|
||||||
$xmlValue = $name;
|
|
||||||
}
|
|
||||||
// set the name if found
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// make sure the XML name is uniqe, so we can add one field multiple times
|
|
||||||
$xmlValue = $this->uniqueName($xmlValue, $viewName);
|
|
||||||
$name = $this->setPlaceholders($xmlValue, $placeholders);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
elseif ($property['name'] === 'extension' || $property['name'] === 'directory' || $property['name'] === 'formsource')
|
elseif ($property['name'] === 'extension' || $property['name'] === 'directory' || $property['name'] === 'formsource')
|
||||||
{
|
{
|
||||||
@ -1623,9 +1505,9 @@ class Fields extends Structure
|
|||||||
// update label if field use multiple times
|
// update label if field use multiple times
|
||||||
if ($property['name'] === 'label')
|
if ($property['name'] === 'label')
|
||||||
{
|
{
|
||||||
if (isset($fieldAttributes['name']) && isset($this->uniqueNames[$viewName]['names'][$fieldAttributes['name']]))
|
if (isset($fieldAttributes['name']) && isset($this->uniqueNames[$listViewName]['names'][$fieldAttributes['name']]))
|
||||||
{
|
{
|
||||||
$xmlValue .= ' (' . ComponentbuilderHelper::safeString($this->uniqueNames[$viewName]['names'][$fieldAttributes['name']]) . ')';
|
$xmlValue .= ' (' . ComponentbuilderHelper::safeString($this->uniqueNames[$listViewName]['names'][$fieldAttributes['name']]) . ')';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// replace placeholders
|
// replace placeholders
|
||||||
@ -1718,123 +1600,6 @@ class Fields extends Structure
|
|||||||
return $fieldAttributes;
|
return $fieldAttributes;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Keep track of the field names, to see if it used multiple times
|
|
||||||
*
|
|
||||||
* @param array $field The field data
|
|
||||||
* @param string $typeName The field type
|
|
||||||
* @param string $name The field name
|
|
||||||
* @param string $viewName The singel view name
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
protected function setUniqueNameKeeper(&$field, &$typeName, &$name, $viewName)
|
|
||||||
{
|
|
||||||
// setup a default field
|
|
||||||
if (ComponentbuilderHelper::checkArray($field['settings']->properties))
|
|
||||||
{
|
|
||||||
foreach ($field['settings']->properties as $property)
|
|
||||||
{
|
|
||||||
// reset
|
|
||||||
$xmlValue = '';
|
|
||||||
if ($property['name'] === 'name')
|
|
||||||
{
|
|
||||||
// if category then name must be catid (only one per view)
|
|
||||||
if ($typeName === 'category')
|
|
||||||
{
|
|
||||||
// only one allowed
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// if tag is set then enable all tag options for this view (only one per view)
|
|
||||||
elseif ($typeName === 'tag')
|
|
||||||
{
|
|
||||||
// only one allowed
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// if the field is set as alias it must be called alias
|
|
||||||
elseif (isset($field['alias']) && $field['alias'])
|
|
||||||
{
|
|
||||||
// only one allowed
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
elseif ($typeName === 'spacer')
|
|
||||||
{
|
|
||||||
// not needed here
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$xmlValue = ComponentbuilderHelper::safeString(ComponentbuilderHelper::getBetween($field['settings']->xml, 'name="', '"'));
|
|
||||||
}
|
|
||||||
|
|
||||||
// use field core name only if not found in xml
|
|
||||||
if (!ComponentbuilderHelper::checkString($xmlValue))
|
|
||||||
{
|
|
||||||
$xmlValue = $name;
|
|
||||||
}
|
|
||||||
// make sure the XML name is uniqe, so we can add one field multiple times
|
|
||||||
return $this->setUniqueNameCounter($xmlValue, $viewName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Count how many times the same field is used per view
|
|
||||||
*
|
|
||||||
* @param string $name The name of the field
|
|
||||||
* @param string $view The name of the view
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
protected function setUniqueNameCounter($name, $view)
|
|
||||||
{
|
|
||||||
if (!isset($this->uniqueNames[$view]))
|
|
||||||
{
|
|
||||||
$this->uniqueNames[$view] = array();
|
|
||||||
$this->uniqueNames[$view]['counter'] = array();
|
|
||||||
$this->uniqueNames[$view]['names'] = array();
|
|
||||||
}
|
|
||||||
if (!isset($this->uniqueNames[$view]['counter'][$name]))
|
|
||||||
{
|
|
||||||
$this->uniqueNames[$view]['counter'][$name] = 1;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// count how many times the field is used
|
|
||||||
$this->uniqueNames[$view]['counter'][$name] ++;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Naming each field with an unique name
|
|
||||||
*
|
|
||||||
* @param string $name The name of the field
|
|
||||||
* @param string $view The name of the view
|
|
||||||
*
|
|
||||||
* @return string the name
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
protected function uniqueName($name, $view)
|
|
||||||
{
|
|
||||||
// only increment if the field name is used multiple times
|
|
||||||
if (isset($this->uniqueNames[$view]['counter'][$name]) && $this->uniqueNames[$view]['counter'][$name] > 1)
|
|
||||||
{
|
|
||||||
$counter = $this->uniqueNames[$view]['counter'][$name];
|
|
||||||
$uniqueName = ComponentbuilderHelper::safeString($name . '_' . $counter);
|
|
||||||
while (isset($this->uniqueNames[$view]['names'][$uniqueName]))
|
|
||||||
{
|
|
||||||
$counter--;
|
|
||||||
$uniqueName = ComponentbuilderHelper::safeString($name . '_' . $counter);
|
|
||||||
}
|
|
||||||
// set the new name
|
|
||||||
$this->uniqueNames[$view]['names'][$uniqueName] = $counter;
|
|
||||||
return $uniqueName;
|
|
||||||
}
|
|
||||||
return $name;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set Builders
|
* set Builders
|
||||||
*
|
*
|
||||||
|
@ -5634,7 +5634,6 @@ class Interpretation extends Fields
|
|||||||
// set the main db prefix
|
// set the main db prefix
|
||||||
$component = $this->fileContentStatic['###component###'];
|
$component = $this->fileContentStatic['###component###'];
|
||||||
// start building the db
|
// start building the db
|
||||||
|
|
||||||
$db = '';
|
$db = '';
|
||||||
foreach ($this->queryBuilder as $view => $fields)
|
foreach ($this->queryBuilder as $view => $fields)
|
||||||
{
|
{
|
||||||
@ -5711,9 +5710,21 @@ class Interpretation extends Fields
|
|||||||
$this->updateSQLBuilder["ALTERTABLE`#__" . $component . "_" . $view . "`ADD`" . $field . "`"] = "ALTER TABLE `#__" . $component . "_" . $view . "` ADD `" . $field . "` " . $data['type'] . $lenght . " " . $default . " AFTER `" . $last_name . "`;";
|
$this->updateSQLBuilder["ALTERTABLE`#__" . $component . "_" . $view . "`ADD`" . $field . "`"] = "ALTER TABLE `#__" . $component . "_" . $view . "` ADD `" . $field . "` " . $data['type'] . $lenght . " " . $default . " AFTER `" . $last_name . "`;";
|
||||||
}
|
}
|
||||||
// check if the field has changed name and/or data type and lenght
|
// check if the field has changed name and/or data type and lenght
|
||||||
elseif (0)
|
elseif ((isset($this->updateSQL['field.datatype']) && isset($this->updateSQL['field.datatype'][$view.'.'.$field])) ||
|
||||||
|
(isset($this->updateSQL['field.lenght']) && isset($this->updateSQL['field.lenght'][$view.'.'.$field])) ||
|
||||||
|
(isset($this->updateSQL['field.name']) && isset($this->updateSQL['field.name'][$view.'.'.$field])))
|
||||||
{
|
{
|
||||||
// hmmm tough one
|
// if the name changed
|
||||||
|
if (isset($this->updateSQL['field.name']) && isset($this->updateSQL['field.name'][$view.'.'.$field]))
|
||||||
|
{
|
||||||
|
$oldName = $this->updateSQL['field.name'][$view.'.'.$field]['old'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$oldName = $field;
|
||||||
|
}
|
||||||
|
// now set the update SQL
|
||||||
|
$this->updateSQLBuilder["ALTERTABLE`#__" . $component . "_" . $view . "`CHANGE`" . $oldName . "``" . $field . "`"] = "ALTER TABLE `#__" . $component . "_" . $view . "` CHANGE `" . $oldName . "` `" . $field . "` " . $data['type'] . $lenght . " " . $default . ";";
|
||||||
}
|
}
|
||||||
// be sure to track the last name used :)
|
// be sure to track the last name used :)
|
||||||
$last_name = $field;
|
$last_name = $field;
|
||||||
@ -12853,14 +12864,14 @@ class Interpretation extends Fields
|
|||||||
'###component###' => $component,
|
'###component###' => $component,
|
||||||
'###view###' => $viewName,
|
'###view###' => $viewName,
|
||||||
'###views###' => $listViewName);
|
'###views###' => $listViewName);
|
||||||
$spacerCounter = 'a';
|
|
||||||
$view = '';
|
$view = '';
|
||||||
$viewType = 0;
|
$viewType = 0;
|
||||||
|
|
||||||
// set the custom table key
|
// set the custom table key
|
||||||
$dbkey = 'g';
|
$dbkey = 'g';
|
||||||
foreach ($this->componentData->config as $field)
|
foreach ($this->componentData->config as $field)
|
||||||
{
|
{
|
||||||
$newxmlField = $this->setDynamicField($field, $view, $viewType, $lang, $viewName, $listViewName, $spacerCounter, $placeholders, $dbkey, false);
|
$newxmlField = $this->setDynamicField($field, $view, $viewType, $lang, $viewName, $listViewName, $placeholders, $dbkey, false);
|
||||||
// tmp hack untill this whole area is also done in xml (TODO)
|
// tmp hack untill this whole area is also done in xml (TODO)
|
||||||
if (isset($newxmlField->fieldXML))
|
if (isset($newxmlField->fieldXML))
|
||||||
{
|
{
|
||||||
@ -14715,8 +14726,8 @@ function vdm_dkim() {
|
|||||||
$propertyType = $property;
|
$propertyType = $property;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$fieldType = $this->getFieldType($field['settings']->type_name, $field['settings']->xml, $propertyType);
|
$fieldType = $this->getFieldType($field);
|
||||||
$fieldName = $this->getFieldName($fieldType, $field['settings']->xml, $field['alias']);
|
$fieldName = $this->getFieldName($field, $nameViews);
|
||||||
$fieldView = array();
|
$fieldView = array();
|
||||||
// set the permission for this field
|
// set the permission for this field
|
||||||
$fieldView['action'] = 'view.edit.' . $fieldName;
|
$fieldView['action'] = 'view.edit.' . $fieldName;
|
||||||
@ -15065,72 +15076,6 @@ function vdm_dkim() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFieldName($typeName, $xml, $alias)
|
|
||||||
{
|
|
||||||
// if category then name must be catid (only one per view)
|
|
||||||
if ($typeName === 'category')
|
|
||||||
{
|
|
||||||
return 'catid';
|
|
||||||
}
|
|
||||||
// if tag is set then enable all tag options for this view (only one per view)
|
|
||||||
elseif ($typeName === 'tag')
|
|
||||||
{
|
|
||||||
return 'tags';
|
|
||||||
}
|
|
||||||
// if the field is set as alias it must be called alias
|
|
||||||
elseif ($alias)
|
|
||||||
{
|
|
||||||
return 'alias';
|
|
||||||
}
|
|
||||||
elseif ($typeName === 'spacer')
|
|
||||||
{
|
|
||||||
// make sure the name is unique
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return ComponentbuilderHelper::safeString(ComponentbuilderHelper::getBetween($xml, 'name="', '"'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getFieldType($typeName, $xml, $property)
|
|
||||||
{
|
|
||||||
// make sure its lower case
|
|
||||||
$typeName = ComponentbuilderHelper::safeString($typeName);
|
|
||||||
|
|
||||||
if ($typeName === 'custom' || $typeName === 'customuser')
|
|
||||||
{
|
|
||||||
$xmlValue = ComponentbuilderHelper::safeString(ComponentbuilderHelper::getBetween($xml, 'type="', '"'));
|
|
||||||
}
|
|
||||||
// use field core type only if not found
|
|
||||||
elseif (ComponentbuilderHelper::checkString($typeName))
|
|
||||||
{
|
|
||||||
$xmlValue = $typeName;
|
|
||||||
}
|
|
||||||
// make sure none adjustable fields are set
|
|
||||||
elseif (isset($property['example']) && ComponentbuilderHelper::checkString($property['example']) && $property['adjustable'] == 0)
|
|
||||||
{
|
|
||||||
$xmlValue = $property['example'];
|
|
||||||
}
|
|
||||||
// fall back on the xml settings
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$xmlValue = ComponentbuilderHelper::safeString(ComponentbuilderHelper::getBetween($xml, 'type="', '"'));
|
|
||||||
}
|
|
||||||
|
|
||||||
// check if the value is set
|
|
||||||
if (ComponentbuilderHelper::checkString($xmlValue))
|
|
||||||
{
|
|
||||||
// add the value
|
|
||||||
return $xmlValue;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// fall back to text
|
|
||||||
return 'text';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getInbetweenStrings($str, $start = '###', $end = '###')
|
public function getInbetweenStrings($str, $start = '###', $end = '###')
|
||||||
{
|
{
|
||||||
$matches = array();
|
$matches = array();
|
||||||
|
@ -2114,12 +2114,14 @@ COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_CREATED_DATE_DESC="The date this Compo
|
|||||||
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_CREATED_DATE_LABEL="Created Date"
|
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_CREATED_DATE_LABEL="Created Date"
|
||||||
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_DEFAULT_VIEW_DESCRIPTION="Select only one."
|
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_DEFAULT_VIEW_DESCRIPTION="Select only one."
|
||||||
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_DEFAULT_VIEW_LABEL="Default View"
|
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_DEFAULT_VIEW_LABEL="Default View"
|
||||||
|
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_DESCRIPTION="if view uses Access,<br />should default be public."
|
||||||
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_EDIT="Editing the Component Site Views"
|
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_EDIT="Editing the Component Site Views"
|
||||||
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_ERROR_UNIQUE_ALIAS="Another Component Site Views has the same alias."
|
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_ERROR_UNIQUE_ALIAS="Another Component Site Views has the same alias."
|
||||||
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_ID="Id"
|
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_ID="Id"
|
||||||
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_JOOMLA_COMPONENT="Joomla Component"
|
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_JOOMLA_COMPONENT="Joomla Component"
|
||||||
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_JOOMLA_COMPONENT_DESCRIPTION="Select a Joomla Component"
|
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_JOOMLA_COMPONENT_DESCRIPTION="Select a Joomla Component"
|
||||||
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_JOOMLA_COMPONENT_LABEL="Component"
|
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_JOOMLA_COMPONENT_LABEL="Component"
|
||||||
|
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_LABEL="Public Access"
|
||||||
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_MENU_DESCRIPTION="Select if the view should show have a menu link."
|
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_MENU_DESCRIPTION="Select if the view should show have a menu link."
|
||||||
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_MENU_LABEL="Add Menu"
|
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_MENU_LABEL="Add Menu"
|
||||||
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_METADATA_DESCRIPTION="Select if this view should have metadata."
|
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_METADATA_DESCRIPTION="Select if this view should have metadata."
|
||||||
@ -2133,8 +2135,6 @@ COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_NOTE_ON_SITE_VIEWS_DESCRIPTION="Do not
|
|||||||
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_NOTE_ON_SITE_VIEWS_LABEL="Setting Site Views"
|
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_NOTE_ON_SITE_VIEWS_LABEL="Setting Site Views"
|
||||||
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_ORDERING_LABEL="Ordering"
|
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_ORDERING_LABEL="Ordering"
|
||||||
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_PERMISSION="Permissions"
|
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_PERMISSION="Permissions"
|
||||||
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_PUBLIC_ACCESS_DESCRIPTION="if view uses Access,<br />should default be public."
|
|
||||||
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_PUBLIC_ACCESS_LABEL="Public Access"
|
|
||||||
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_PUBLISHING="Publishing"
|
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_PUBLISHING="Publishing"
|
||||||
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Component Site Views to customise the alias."
|
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Component Site Views to customise the alias."
|
||||||
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_SITEVIEW="Siteview"
|
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_SITEVIEW="Siteview"
|
||||||
|
@ -30,7 +30,7 @@ defined('_JEXEC') or die('Restricted access');
|
|||||||
$form = $displayData->getForm();
|
$form = $displayData->getForm();
|
||||||
|
|
||||||
$fields = $displayData->get('fields') ?: array(
|
$fields = $displayData->get('fields') ?: array(
|
||||||
'spacer_hr_f',
|
'spacer_hr_six',
|
||||||
'note_on_contributors',
|
'note_on_contributors',
|
||||||
'addcontributors',
|
'addcontributors',
|
||||||
'emptycontributors',
|
'emptycontributors',
|
||||||
|
@ -31,11 +31,11 @@ $form = $displayData->getForm();
|
|||||||
|
|
||||||
$fields = $displayData->get('fields') ?: array(
|
$fields = $displayData->get('fields') ?: array(
|
||||||
'note_moved_views',
|
'note_moved_views',
|
||||||
'spacer_hr_a',
|
'spacer_hr_one',
|
||||||
'note_mysql_tweak_options',
|
'note_mysql_tweak_options',
|
||||||
'spacer_hr_b',
|
'spacer_hr_two',
|
||||||
'note_add_custom_menus',
|
'note_add_custom_menus',
|
||||||
'spacer_hr_c',
|
'spacer_hr_three',
|
||||||
'note_add_config'
|
'note_add_config'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -31,10 +31,10 @@ $form = $displayData->getForm();
|
|||||||
|
|
||||||
$fields = $displayData->get('fields') ?: array(
|
$fields = $displayData->get('fields') ?: array(
|
||||||
'note_component_files_folders',
|
'note_component_files_folders',
|
||||||
'spacer_hr_d',
|
'spacer_hr_four',
|
||||||
'to_ignore_note',
|
'to_ignore_note',
|
||||||
'toignore',
|
'toignore',
|
||||||
'spacer_hr_e',
|
'spacer_hr_five',
|
||||||
'jcb_export_package_note',
|
'jcb_export_package_note',
|
||||||
'export_key',
|
'export_key',
|
||||||
'export_package_link',
|
'export_package_link',
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function getFieldSelectOptions_server(fieldId){
|
function getFieldSelectOptions_server(fieldId){
|
||||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.fieldSelectOptions&format=json";
|
var getUrl = "index.php?option=com_componentbuilder&task=ajax.fieldSelectOptions&format=json";
|
||||||
if(token.length > 0 && fieldId > 0){
|
if(token.length > 0 && fieldId > 0){
|
||||||
|
@ -1196,6 +1196,7 @@ function isSet(val)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
jQuery(document).ready(function()
|
jQuery(document).ready(function()
|
||||||
{
|
{
|
||||||
// get the linked details
|
// get the linked details
|
||||||
|
@ -152,13 +152,13 @@
|
|||||||
required="false"
|
required="false"
|
||||||
description="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_ACCESS_DESCRIPTION"
|
description="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_ACCESS_DESCRIPTION"
|
||||||
class="inputbox" />
|
class="inputbox" />
|
||||||
<!-- Public_access Field. Type: Checkbox. (joomla)-->
|
<!-- Field. Type: Checkbox. (joomla)-->
|
||||||
<field type="checkbox"
|
<field type="checkbox"
|
||||||
name="public_access"
|
name="show_title"
|
||||||
label="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_PUBLIC_ACCESS_LABEL"
|
label="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_LABEL"
|
||||||
value="1"
|
value="1"
|
||||||
required="false"
|
required="false"
|
||||||
description="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_PUBLIC_ACCESS_DESCRIPTION"
|
description="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_DESCRIPTION"
|
||||||
class="inputbox" />
|
class="inputbox" />
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
|
@ -438,6 +438,7 @@ function isSet(val)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
jQuery(document).ready(function()
|
jQuery(document).ready(function()
|
||||||
{
|
{
|
||||||
// get the linked details
|
// get the linked details
|
||||||
|
@ -224,6 +224,7 @@ function isSet(val)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
jQuery(document).ready(function()
|
jQuery(document).ready(function()
|
||||||
{
|
{
|
||||||
var target = jQuery("#jform_target input[type='radio']:checked").val();
|
var target = jQuery("#jform_target input[type='radio']:checked").val();
|
||||||
|
@ -1428,6 +1428,7 @@ function isSet(val)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
jQuery(document).ready(function()
|
jQuery(document).ready(function()
|
||||||
{
|
{
|
||||||
// get the linked details
|
// get the linked details
|
||||||
|
@ -509,6 +509,7 @@ function isSet(val)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
jQuery(document).ready(function()
|
jQuery(document).ready(function()
|
||||||
{
|
{
|
||||||
// get the linked details
|
// get the linked details
|
||||||
|
@ -880,6 +880,7 @@ function isSet(val)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
jQuery(document).ready(function()
|
jQuery(document).ready(function()
|
||||||
{
|
{
|
||||||
// check what is the dashboard switch
|
// check what is the dashboard switch
|
||||||
|
@ -665,11 +665,11 @@
|
|||||||
<option value="1">COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES</option>
|
<option value="1">COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES</option>
|
||||||
<option value="0">COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO</option>
|
<option value="0">COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO</option>
|
||||||
</field>
|
</field>
|
||||||
<!-- Spacer_hr_a Field. Type: Spacer. A None Database Field. (joomla)-->
|
<!-- Spacer_hr_one Field. Type: Spacer. A None Database Field. (joomla)-->
|
||||||
<field type="spacer"
|
<field type="spacer"
|
||||||
name="spacer_hr_a"
|
name="spacer_hr_one"
|
||||||
hr="true"
|
hr="true"
|
||||||
class="spacer_hr_a" />
|
class="spacer_hr_one" />
|
||||||
<!-- Addfootable Field. Type: List. (joomla)-->
|
<!-- Addfootable Field. Type: List. (joomla)-->
|
||||||
<field type="list"
|
<field type="list"
|
||||||
name="addfootable"
|
name="addfootable"
|
||||||
@ -702,11 +702,11 @@
|
|||||||
<option value="1">COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES</option>
|
<option value="1">COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES</option>
|
||||||
<option value="0">COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO</option>
|
<option value="0">COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO</option>
|
||||||
</field>
|
</field>
|
||||||
<!-- Spacer_hr_b Field. Type: Spacer. A None Database Field. (joomla)-->
|
<!-- Spacer_hr_two Field. Type: Spacer. A None Database Field. (joomla)-->
|
||||||
<field type="spacer"
|
<field type="spacer"
|
||||||
name="spacer_hr_b"
|
name="spacer_hr_two"
|
||||||
hr="true"
|
hr="true"
|
||||||
class="spacer_hr_b" />
|
class="spacer_hr_two" />
|
||||||
<!-- Add_php_helper_admin Field. Type: Radio. (joomla)-->
|
<!-- Add_php_helper_admin Field. Type: Radio. (joomla)-->
|
||||||
<field type="radio"
|
<field type="radio"
|
||||||
name="add_php_helper_admin"
|
name="add_php_helper_admin"
|
||||||
@ -736,11 +736,11 @@
|
|||||||
<option value="1">COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES</option>
|
<option value="1">COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES</option>
|
||||||
<option value="0">COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO</option>
|
<option value="0">COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO</option>
|
||||||
</field>
|
</field>
|
||||||
<!-- Spacer_hr_c Field. Type: Spacer. A None Database Field. (joomla)-->
|
<!-- Spacer_hr_three Field. Type: Spacer. A None Database Field. (joomla)-->
|
||||||
<field type="spacer"
|
<field type="spacer"
|
||||||
name="spacer_hr_c"
|
name="spacer_hr_three"
|
||||||
hr="true"
|
hr="true"
|
||||||
class="spacer_hr_c" />
|
class="spacer_hr_three" />
|
||||||
<!-- Add_php_helper_site Field. Type: Radio. (joomla)-->
|
<!-- Add_php_helper_site Field. Type: Radio. (joomla)-->
|
||||||
<field type="radio"
|
<field type="radio"
|
||||||
name="add_php_helper_site"
|
name="add_php_helper_site"
|
||||||
@ -788,11 +788,11 @@
|
|||||||
<option value="1">COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES</option>
|
<option value="1">COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES</option>
|
||||||
<option value="0">COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO</option>
|
<option value="0">COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO</option>
|
||||||
</field>
|
</field>
|
||||||
<!-- Spacer_hr_d Field. Type: Spacer. A None Database Field. (joomla)-->
|
<!-- Spacer_hr_four Field. Type: Spacer. A None Database Field. (joomla)-->
|
||||||
<field type="spacer"
|
<field type="spacer"
|
||||||
name="spacer_hr_d"
|
name="spacer_hr_four"
|
||||||
hr="true"
|
hr="true"
|
||||||
class="spacer_hr_d" />
|
class="spacer_hr_four" />
|
||||||
<!-- Add_css_admin Field. Type: Radio. (joomla)-->
|
<!-- Add_css_admin Field. Type: Radio. (joomla)-->
|
||||||
<field type="radio"
|
<field type="radio"
|
||||||
name="add_css_admin"
|
name="add_css_admin"
|
||||||
@ -846,11 +846,11 @@
|
|||||||
<option value="1">COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DEFAULT</option>
|
<option value="1">COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DEFAULT</option>
|
||||||
<option value="2">COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DYNAMIC</option>
|
<option value="2">COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DYNAMIC</option>
|
||||||
</field>
|
</field>
|
||||||
<!-- Spacer_hr_e Field. Type: Spacer. A None Database Field. (joomla)-->
|
<!-- Spacer_hr_five Field. Type: Spacer. A None Database Field. (joomla)-->
|
||||||
<field type="spacer"
|
<field type="spacer"
|
||||||
name="spacer_hr_e"
|
name="spacer_hr_five"
|
||||||
hr="true"
|
hr="true"
|
||||||
class="spacer_hr_e" />
|
class="spacer_hr_five" />
|
||||||
<!-- Dashboard Field. Type: Dynamicdashboard. (custom)-->
|
<!-- Dashboard Field. Type: Dynamicdashboard. (custom)-->
|
||||||
<field type="dynamicdashboard"
|
<field type="dynamicdashboard"
|
||||||
name="dashboard"
|
name="dashboard"
|
||||||
@ -947,11 +947,11 @@
|
|||||||
<option value="1">COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES</option>
|
<option value="1">COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES</option>
|
||||||
<option value="0">COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO</option>
|
<option value="0">COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO</option>
|
||||||
</field>
|
</field>
|
||||||
<!-- Spacer_hr_f Field. Type: Spacer. A None Database Field. (joomla)-->
|
<!-- Spacer_hr_six Field. Type: Spacer. A None Database Field. (joomla)-->
|
||||||
<field type="spacer"
|
<field type="spacer"
|
||||||
name="spacer_hr_f"
|
name="spacer_hr_six"
|
||||||
hr="true"
|
hr="true"
|
||||||
class="spacer_hr_f" />
|
class="spacer_hr_six" />
|
||||||
<!-- Add_php_method_uninstall Field. Type: Radio. (joomla)-->
|
<!-- Add_php_method_uninstall Field. Type: Radio. (joomla)-->
|
||||||
<field type="radio"
|
<field type="radio"
|
||||||
name="add_php_method_uninstall"
|
name="add_php_method_uninstall"
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
jQuery(document).ready(function($)
|
jQuery(document).ready(function($)
|
||||||
{
|
{
|
||||||
// set button to add more languages
|
// set button to add more languages
|
||||||
|
@ -100,6 +100,7 @@ function isSet(val)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function getSnippetDetails_server(snippetId){
|
function getSnippetDetails_server(snippetId){
|
||||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.snippetDetails&format=json";
|
var getUrl = "index.php?option=com_componentbuilder&task=ajax.snippetDetails&format=json";
|
||||||
if(token.length > 0 && snippetId > 0){
|
if(token.length > 0 && snippetId > 0){
|
||||||
|
@ -414,6 +414,7 @@ function isSet(val)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
jQuery(document).ready(function()
|
jQuery(document).ready(function()
|
||||||
{
|
{
|
||||||
// get the linked details
|
// get the linked details
|
||||||
|
@ -479,6 +479,7 @@ function isSet(val)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
jQuery(document).ready(function()
|
jQuery(document).ready(function()
|
||||||
{
|
{
|
||||||
// get the linked details
|
// get the linked details
|
||||||
|
@ -100,6 +100,7 @@ function isSet(val)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function getSnippetDetails_server(snippetId){
|
function getSnippetDetails_server(snippetId){
|
||||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.snippetDetails&format=json";
|
var getUrl = "index.php?option=com_componentbuilder&task=ajax.snippetDetails&format=json";
|
||||||
if(token.length > 0 && snippetId > 0){
|
if(token.length > 0 && snippetId > 0){
|
||||||
|
@ -1521,7 +1521,7 @@ INSERT INTO `#__componentbuilder_help_document` (`id`, `admin_view`, `alias`, `a
|
|||||||
--
|
--
|
||||||
|
|
||||||
INSERT INTO `#__componentbuilder_admin_fields` (`id`, `addfields`, `admin_view`, `published`, `created`, `modified`, `version`, `hits`, `ordering`) VALUES
|
INSERT INTO `#__componentbuilder_admin_fields` (`id`, `addfields`, `admin_view`, `published`, `created`, `modified`, `version`, `hits`, `ordering`) VALUES
|
||||||
(111, '{\"addfields0\":{\"field\":\"199\",\"list\":\"1\",\"order_list\":\"1\",\"title\":\"1\",\"alias\":\"0\",\"sort\":\"1\",\"search\":\"1\",\"filter\":\"0\",\"link\":\"1\",\"tab\":\"1\",\"alignment\":\"4\",\"order_edit\":\"1\",\"permission\":\"1\"},\"addfields1\":{\"field\":\"23\",\"list\":\"0\",\"order_list\":\"0\",\"title\":\"0\",\"alias\":\"1\",\"sort\":\"0\",\"search\":\"1\",\"filter\":\"0\",\"link\":\"0\",\"tab\":\"1\",\"alignment\":\"4\",\"order_edit\":\"2\",\"permission\":\"1\"},\"addfields2\":{\"field\":\"84\",\"list\":\"1\",\"order_list\":\"2\",\"title\":\"0\",\"alias\":\"0\",\"sort\":\"1\",\"search\":\"1\",\"filter\":\"0\",\"link\":\"0\",\"tab\":\"1\",\"alignment\":\"3\",\"order_edit\":\"1\",\"permission\":\"1\"},\"addfields3\":{\"field\":\"682\",\"list\":\"0\",\"order_list\":\"0\",\"title\":\"0\",\"alias\":\"0\",\"sort\":\"1\",\"search\":\"1\",\"filter\":\"1\",\"link\":\"0\",\"tab\":\"2\",\"alignment\":\"1\",\"order_edit\":\"1\",\"permission\":\"1\"},\"addfields4\":{\"field\":\"100\",\"list\":\"0\",\"order_list\":\"0\",\"title\":\"0\",\"alias\":\"0\",\"sort\":\"0\",\"search\":\"0\",\"filter\":\"0\",\"link\":\"0\",\"tab\":\"2\",\"alignment\":\"2\",\"order_edit\":\"1\",\"permission\":\"1\"},\"addfields5\":{\"field\":\"196\",\"list\":\"0\",\"order_list\":\"0\",\"title\":\"0\",\"alias\":\"0\",\"sort\":\"0\",\"search\":\"0\",\"filter\":\"0\",\"link\":\"0\",\"tab\":\"2\",\"alignment\":\"2\",\"order_edit\":\"2\",\"permission\":\"1\"},\"addfields6\":{\"field\":\"1011\",\"list\":\"0\",\"order_list\":\"0\",\"title\":\"0\",\"alias\":\"0\",\"sort\":\"0\",\"search\":\"0\",\"filter\":\"0\",\"link\":\"0\",\"tab\":\"2\",\"alignment\":\"2\",\"order_edit\":\"3\",\"permission\":\"1\"},\"addfields7\":{\"field\":\"158\",\"list\":\"0\",\"order_list\":\"0\",\"title\":\"0\",\"alias\":\"0\",\"sort\":\"0\",\"search\":\"0\",\"filter\":\"0\",\"link\":\"0\",\"tab\":\"2\",\"alignment\":\"2\",\"order_edit\":\"4\",\"permission\":\"1\"},\"addfields8\":{\"field\":\"280\",\"list\":\"0\",\"order_list\":\"0\",\"title\":\"0\",\"alias\":\"0\",\"sort\":\"0\",\"search\":\"0\",\"filter\":\"0\",\"link\":\"0\",\"tab\":\"2\",\"alignment\":\"2\",\"order_edit\":\"5\",\"permission\":\"1\"},\"addfields9\":{\"field\":\"203\",\"list\":\"0\",\"order_list\":\"0\",\"title\":\"0\",\"alias\":\"0\",\"sort\":\"0\",\"search\":\"0\",\"filter\":\"0\",\"link\":\"0\",\"tab\":\"1\",\"alignment\":\"5\",\"order_edit\":\"1\",\"permission\":\"0\"}}', 109, 1, '2017-10-12 19:52:03', '0000-00-00 00:00:00', 2, '', '');
|
(111, '{\"0\":{\"field\":\"84\",\"list\":\"1\",\"order_list\":\"2\",\"sort\":\"1\",\"search\":\"1\",\"tab\":\"1\",\"alignment\":\"3\",\"order_edit\":\"1\",\"permission\":\"0\"},\"1\":{\"field\":\"199\",\"list\":\"1\",\"order_list\":\"1\",\"title\":\"1\",\"sort\":\"1\",\"search\":\"1\",\"link\":\"1\",\"tab\":\"1\",\"alignment\":\"4\",\"order_edit\":\"1\",\"permission\":\"0\"},\"2\":{\"field\":\"23\",\"order_list\":\"0\",\"alias\":\"1\",\"search\":\"1\",\"tab\":\"1\",\"alignment\":\"4\",\"order_edit\":\"2\",\"permission\":\"0\"},\"3\":{\"field\":\"203\",\"order_list\":\"0\",\"tab\":\"1\",\"alignment\":\"5\",\"order_edit\":\"1\",\"permission\":\"0\"},\"4\":{\"field\":\"682\",\"order_list\":\"0\",\"sort\":\"1\",\"search\":\"1\",\"filter\":\"1\",\"tab\":\"2\",\"alignment\":\"1\",\"order_edit\":\"1\",\"permission\":\"0\"},\"5\":{\"field\":\"100\",\"order_list\":\"0\",\"tab\":\"2\",\"alignment\":\"2\",\"order_edit\":\"1\",\"permission\":\"0\"},\"6\":{\"field\":\"196\",\"order_list\":\"0\",\"tab\":\"2\",\"alignment\":\"2\",\"order_edit\":\"2\",\"permission\":\"0\"},\"7\":{\"field\":\"1011\",\"order_list\":\"0\",\"tab\":\"2\",\"alignment\":\"2\",\"order_edit\":\"3\",\"permission\":\"0\"},\"8\":{\"field\":\"158\",\"order_list\":\"0\",\"tab\":\"2\",\"alignment\":\"2\",\"order_edit\":\"4\",\"permission\":\"0\"},\"9\":{\"field\":\"280\",\"order_list\":\"0\",\"tab\":\"2\",\"alignment\":\"2\",\"order_edit\":\"5\",\"permission\":\"0\"}}', 109, 1, '2017-10-12 19:52:03', '2018-03-10 23:04:11', 4, '', '');
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Dumping data for table `#__componentbuilder_admin_fields_conditions`
|
-- Dumping data for table `#__componentbuilder_admin_fields_conditions`
|
||||||
|
@ -119,6 +119,7 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder');
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php $numberAddconditions = range(0, count($this->item->addconditions) + 3, 1);?>
|
<?php $numberAddconditions = range(0, count($this->item->addconditions) + 3, 1);?>
|
||||||
|
|
||||||
// for the values already set
|
// for the values already set
|
||||||
|
@ -703,7 +703,8 @@ jQuery('input.form-field-repeatable').on('row-add', function (e) {
|
|||||||
jQuery('#jform_custom_button_fields_icomoon_<?php echo $nr; ?>_chzn').closest("td").append(span);
|
jQuery('#jform_custom_button_fields_icomoon_<?php echo $nr; ?>_chzn').closest("td").append(span);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
<?php endforeach; ?><?php $numberAddtables = range(0, count($this->item->addtables) + 3, 1);?>
|
<?php endforeach; ?>
|
||||||
|
<?php $numberAddtables = range(0, count($this->item->addtables) + 3, 1);?>
|
||||||
|
|
||||||
// for the values already set
|
// for the values already set
|
||||||
jQuery(document).ready(function(){
|
jQuery(document).ready(function(){
|
||||||
|
@ -355,7 +355,8 @@ jQuery('input.form-field-repeatable').on('row-add', function (e) {
|
|||||||
jQuery('#jform_custom_button_fields_icomoon_<?php echo $nr; ?>_chzn').closest("td").append(span);
|
jQuery('#jform_custom_button_fields_icomoon_<?php echo $nr; ?>_chzn').closest("td").append(span);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
<?php endforeach; ?>jQuery(function() {
|
<?php endforeach; ?>
|
||||||
|
jQuery(function() {
|
||||||
jQuery("code").click(function() {
|
jQuery("code").click(function() {
|
||||||
jQuery(this).selText().addClass("selected");
|
jQuery(this).selText().addClass("selected");
|
||||||
});
|
});
|
||||||
|
@ -226,6 +226,7 @@ jQuery('#adminForm').on('change', '#jform_target',function (e)
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
jQuery('#adminForm').on('change', '#jform_function_name',function (e)
|
jQuery('#adminForm').on('change', '#jform_function_name',function (e)
|
||||||
{
|
{
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
@ -620,6 +620,7 @@ jQuery('#adminForm').on('change', '#jform_add_php_router_parse',function (e)
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php $fieldNrs = range(0,50,1); ?>
|
<?php $fieldNrs = range(0,50,1); ?>
|
||||||
<?php $fieldNames = array('db' => 'Db','view' => 'View'); ?>
|
<?php $fieldNames = array('db' => 'Db','view' => 'View'); ?>
|
||||||
// for the vlaues already set
|
// for the vlaues already set
|
||||||
|
@ -292,6 +292,7 @@ jQuery('#adminForm').on('change', '#jform_add_javascript_views_footer',function
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
jQuery(function() {
|
jQuery(function() {
|
||||||
jQuery("code").click(function() {
|
jQuery("code").click(function() {
|
||||||
jQuery(this).selText().addClass("selected");
|
jQuery(this).selText().addClass("selected");
|
||||||
|
@ -745,6 +745,7 @@ jQuery('#adminForm').on('change', '#jform_dashboard_type',function (e)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$app = JFactory::getApplication();
|
$app = JFactory::getApplication();
|
||||||
?>
|
?>
|
||||||
|
@ -119,6 +119,7 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder');
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$app = JFactory::getApplication();
|
$app = JFactory::getApplication();
|
||||||
?>
|
?>
|
||||||
|
@ -160,7 +160,8 @@ jQuery(function() {
|
|||||||
jQuery('#open-libraries').html('<a href="index.php?option=com_componentbuilder&view=libraries"><?php echo JText::_('COM_COMPONENTBUILDER_LIBRARIES'); ?></a>');
|
jQuery('#open-libraries').html('<a href="index.php?option=com_componentbuilder&view=libraries"><?php echo JText::_('COM_COMPONENTBUILDER_LIBRARIES'); ?></a>');
|
||||||
});
|
});
|
||||||
jQuery('#jform_snippet').closest('.input-append').addClass('jform_snippet_input_width');
|
jQuery('#jform_snippet').closest('.input-append').addClass('jform_snippet_input_width');
|
||||||
jQuery('#jform_dynamic_get').closest('.input-append').addClass('jform_dynamic_get_input_width');jQuery(function() {
|
jQuery('#jform_dynamic_get').closest('.input-append').addClass('jform_dynamic_get_input_width');
|
||||||
|
jQuery(function() {
|
||||||
jQuery("code").click(function() {
|
jQuery("code").click(function() {
|
||||||
jQuery(this).selText().addClass("selected");
|
jQuery(this).selText().addClass("selected");
|
||||||
});
|
});
|
||||||
|
@ -278,6 +278,7 @@ jQuery('#adminForm').on('change', '#jform_type',function (e)
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php $numberAddconditions = range(0, count($this->item->addconditions) + 3, 1);?>
|
<?php $numberAddconditions = range(0, count($this->item->addconditions) + 3, 1);?>
|
||||||
|
|
||||||
// for the values already set
|
// for the values already set
|
||||||
|
@ -373,7 +373,8 @@ jQuery('input.form-field-repeatable').on('row-add', function (e) {
|
|||||||
jQuery('#jform_custom_button_fields_icomoon_<?php echo $nr; ?>_chzn').closest("td").append(span);
|
jQuery('#jform_custom_button_fields_icomoon_<?php echo $nr; ?>_chzn').closest("td").append(span);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
<?php endforeach; ?>jQuery(function() {
|
<?php endforeach; ?>
|
||||||
|
jQuery(function() {
|
||||||
jQuery("code").click(function() {
|
jQuery("code").click(function() {
|
||||||
jQuery(this).selText().addClass("selected");
|
jQuery(this).selText().addClass("selected");
|
||||||
});
|
});
|
||||||
|
@ -160,7 +160,8 @@ jQuery(function() {
|
|||||||
jQuery('#open-libraries').html('<a href="index.php?option=com_componentbuilder&view=libraries"><?php echo JText::_('COM_COMPONENTBUILDER_LIBRARIES'); ?></a>');
|
jQuery('#open-libraries').html('<a href="index.php?option=com_componentbuilder&view=libraries"><?php echo JText::_('COM_COMPONENTBUILDER_LIBRARIES'); ?></a>');
|
||||||
});
|
});
|
||||||
jQuery('#jform_snippet').closest('.input-append').addClass('jform_snippet_input_width');
|
jQuery('#jform_snippet').closest('.input-append').addClass('jform_snippet_input_width');
|
||||||
jQuery('#jform_dynamic_get').closest('.input-append').addClass('jform_dynamic_get_input_width');jQuery(function() {
|
jQuery('#jform_dynamic_get').closest('.input-append').addClass('jform_dynamic_get_input_width');
|
||||||
|
jQuery(function() {
|
||||||
jQuery("code").click(function() {
|
jQuery("code").click(function() {
|
||||||
jQuery(this).selText().addClass("selected");
|
jQuery(this).selText().addClass("selected");
|
||||||
});
|
});
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?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>10th March, 2018</creationDate>
|
<creationDate>11th March, 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>
|
||||||
|
Loading…
Reference in New Issue
Block a user