Added edit links to templates and layouts. Fixed the alias and title selection issue in admin fields area. Added all available languages in Joomla to language area.

This commit is contained in:
Llewellyn van der Merwe 2018-04-19 17:52:47 +02:00
parent 48a3a49d6f
commit d1813147d3
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
22 changed files with 306 additions and 63 deletions

View File

@ -126,12 +126,12 @@ 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*: 18th April, 2018 + *Last Build*: 19th April, 2018
+ *Version*: 2.7.5 + *Version*: 2.7.5
+ *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*: **182984** + *Line count*: **183282**
+ *Field count*: **1012** + *Field count*: **1013**
+ *File count*: **1199** + *File count*: **1199**
+ *Folder count*: **193** + *Folder count*: **193**

View File

@ -126,12 +126,12 @@ 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*: 18th April, 2018 + *Last Build*: 19th April, 2018
+ *Version*: 2.7.5 + *Version*: 2.7.5
+ *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*: **182984** + *Line count*: **183282**
+ *Field count*: **1012** + *Field count*: **1013**
+ *File count*: **1199** + *File count*: **1199**
+ *Folder count*: **193** + *Folder count*: **193**

View File

@ -61,6 +61,17 @@
<option value="0"> <option value="0">
COM_COMPONENTBUILDER_CONFIG_NO</option> COM_COMPONENTBUILDER_CONFIG_NO</option>
</field> </field>
<!-- Language Field. Type: Lang. (custom) -->
<field
type="lang"
name="language"
label="COM_COMPONENTBUILDER_CONFIG_LANGUAGE_LABEL"
class="list_class"
multiple="false"
default="0"
required="true"
button="true"
/>
<!-- Percentagelanguageadd Field. Type: Number. (joomla) --> <!-- Percentagelanguageadd Field. Type: Number. (joomla) -->
<field <field
type="number" type="number"

View File

@ -5395,7 +5395,7 @@ class Get
} }
/** /**
* search for the system id in the line given * set the start replace placeholder
* *
* @param int $id The comment id * @param int $id The comment id
* @param int $commentType The comment type * @param int $commentType The comment type
@ -5426,6 +5426,7 @@ class Get
* *
* @param string $lineContent The file path to search * @param string $lineContent The file path to search
* @param string $placeholders The values to search for * @param string $placeholders The values to search for
* @param int $commentType The comment type
* *
* @return array on success * @return array on success
* *
@ -5451,7 +5452,7 @@ class Get
} }
/** /**
* Reverse Engineer the dynamic placeholders (hmmmm) * Reverse Engineer the dynamic placeholders (TODO hmmmm this is not ideal)
* *
* @param string $string The string to revers * @param string $string The string to revers
* @param int $id The custom code id * @param int $id The custom code id
@ -5607,7 +5608,7 @@ class Get
} }
/** /**
* return the placeholders for insered and replaced code * return the placeholders for inserted and replaced code
* *
* @param int $type The type of placement * @param int $type The type of placement
* @param int $id The code id in the system * @param int $id The code id in the system

View File

@ -2822,14 +2822,14 @@ class Interpretation extends Fields
} }
/** /**
* get the custom script in the script builder * get the a script from the custom script builder
* *
* @param string $first The first key * @param string $first The first key
* @param string $second The second key * @param string $second The second key
* @param string $prefix The prefix to add in front of the script if found * @param string $prefix The prefix to add in front of the script if found
* @param string/bool $note The switch/note to add to the script * @param string/bool $note The switch/note to add to the script
* @param bool $unset The switch to unset the value if found * @param bool $unset The switch to unset the value if found
* @param string/bool $unset The switch/string to use as default return if script not found * @param string/bool $default The switch/string to use as default return if script not found
* @param string $sufix The sufix to add after the script if found * @param string $sufix The sufix to add after the script if found
* *
* @return mix The string/script if found or the default value if not found * @return mix The string/script if found or the default value if not found
@ -2837,8 +2837,9 @@ class Interpretation extends Fields
*/ */
public function getCustomScriptBuilder($first, $second, $prefix = '', $note = null, $unset = null, $default = null, $sufix = '') public function getCustomScriptBuilder($first, $second, $prefix = '', $note = null, $unset = null, $default = null, $sufix = '')
{ {
// check if there is any custom script // default is to return an empty string
$script = ''; $script = '';
// check if there is any custom script
if (isset($this->customScriptBuilder[$first][$second]) && ComponentbuilderHelper::checkString($this->customScriptBuilder[$first][$second])) if (isset($this->customScriptBuilder[$first][$second]) && ComponentbuilderHelper::checkString($this->customScriptBuilder[$first][$second]))
{ {
// add not if set // add not if set
@ -2846,6 +2847,7 @@ class Interpretation extends Fields
{ {
$script .= $note; $script .= $note;
} }
// load the actual script
$script .= $prefix . str_replace(array_keys($this->placeholders), array_values($this->placeholders), $this->customScriptBuilder[$first][$second]) . $sufix; $script .= $prefix . str_replace(array_keys($this->placeholders), array_values($this->placeholders), $this->customScriptBuilder[$first][$second]) . $sufix;
// clear some memory // clear some memory
if ($unset) if ($unset)
@ -3101,6 +3103,17 @@ class Interpretation extends Fields
public function setPrepareDocument(&$view) public function setPrepareDocument(&$view)
{ {
// fix just incase we missed it somewhere
$tmp = $this->lang;
if ('site' === $this->target)
{
$this->lang = 'site';
}
else
{
$this->lang = 'admin';
}
// ensure correct target is set // ensure correct target is set
$TARGET = ComponentbuilderHelper::safeString($this->target, 'U'); $TARGET = ComponentbuilderHelper::safeString($this->target, 'U');
@ -3146,6 +3159,9 @@ class Interpretation extends Fields
// set a JavaScript file if needed // set a JavaScript file if needed
$this->fileContentDynamic[$view['settings']->code]['###' . $TARGET . '_LIBRARIES_LOADER###'] .= $this->setJavaScriptFile($view, $TARGET); $this->fileContentDynamic[$view['settings']->code]['###' . $TARGET . '_LIBRARIES_LOADER###'] .= $this->setJavaScriptFile($view, $TARGET);
// fix just incase we missed it somewhere
$this->lang = $tmp;
} }
public function setGetModules($view, $TARGET) public function setGetModules($view, $TARGET)
@ -3310,13 +3326,14 @@ class Interpretation extends Fields
if (isset($view['settings']->custom_buttons) && ComponentbuilderHelper::checkArray($view['settings']->custom_buttons)) if (isset($view['settings']->custom_buttons) && ComponentbuilderHelper::checkArray($view['settings']->custom_buttons))
{ {
foreach ($view['settings']->custom_buttons as $custom_button) foreach ($view['settings']->custom_buttons as $custom_button)
{
if (3 !== $type && ($custom_button['target'] != 2 || $this->target === 'site'))
{ {
// Load to lang // Load to lang
$keyLang = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($custom_button['name'], 'U'); $keyLang = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($custom_button['name'], 'U');
$keyCode = ComponentbuilderHelper::safeString($custom_button['name']); $keyCode = ComponentbuilderHelper::safeString($custom_button['name']);
$this->langContent[$this->lang][$keyLang] = trim($custom_button['name']); $this->langContent[$this->lang][$keyLang] = trim($custom_button['name']);
// load the button
if (3 !== $type && ($custom_button['target'] != 2 || $this->target === 'site'))
{
// add cpanel button TODO does not work well on site with permissions // add cpanel button TODO does not work well on site with permissions
if ($custom_button['target'] == 2) if ($custom_button['target'] == 2)
{ {
@ -3334,10 +3351,6 @@ class Interpretation extends Fields
// load the list button // load the list button
elseif (3 == $type && $custom_button['target'] != 1) elseif (3 == $type && $custom_button['target'] != 1)
{ {
// Load to lang
$keyLang = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($custom_button['name'], 'U');
$keyCode = ComponentbuilderHelper::safeString($custom_button['name']);
$this->langContent[$this->lang][$keyLang] = trim($custom_button['name']);
// add cpanel button TODO does not work well on site with permissions // add cpanel button TODO does not work well on site with permissions
if (isset($custom_button['type']) && $custom_button['type'] == 2) if (isset($custom_button['type']) && $custom_button['type'] == 2)
{ {

View File

@ -2401,6 +2401,7 @@ COM_COMPONENTBUILDER_CONFIG_GLOBAL_DESC="The Global Parameters"
COM_COMPONENTBUILDER_CONFIG_GLOBAL_LABEL="Global" COM_COMPONENTBUILDER_CONFIG_GLOBAL_LABEL="Global"
COM_COMPONENTBUILDER_CONFIG_GRADIANT_LOAD="Gradient" COM_COMPONENTBUILDER_CONFIG_GRADIANT_LOAD="Gradient"
COM_COMPONENTBUILDER_CONFIG_INACTIVE="Inactive" COM_COMPONENTBUILDER_CONFIG_INACTIVE="Inactive"
COM_COMPONENTBUILDER_CONFIG_LANGUAGE_LABEL="Language"
COM_COMPONENTBUILDER_CONFIG_LOCAL_FOLDER="Local Folder" COM_COMPONENTBUILDER_CONFIG_LOCAL_FOLDER="Local Folder"
COM_COMPONENTBUILDER_CONFIG_MAILER_DESCRIPTION="Select what mailer you would like to use to send emails." COM_COMPONENTBUILDER_CONFIG_MAILER_DESCRIPTION="Select what mailer you would like to use to send emails."
COM_COMPONENTBUILDER_CONFIG_MAILER_LABEL="Mailer" COM_COMPONENTBUILDER_CONFIG_MAILER_LABEL="Mailer"
@ -5338,6 +5339,7 @@ COM_COMPONENTBUILDER_NEW_MEANS_THAT_WE_COULD_NOT_FIND_A_LOCAL_SNIPPET_WITH_THE_S
COM_COMPONENTBUILDER_NEW_NOTICE="New Notice" COM_COMPONENTBUILDER_NEW_NOTICE="New Notice"
COM_COMPONENTBUILDER_NO="No" COM_COMPONENTBUILDER_NO="No"
COM_COMPONENTBUILDER_NONE_DB="None DB" COM_COMPONENTBUILDER_NONE_DB="None DB"
COM_COMPONENTBUILDER_NONE_SELECTED="None selected"
COM_COMPONENTBUILDER_NOTRANSLATION="no-translation" COM_COMPONENTBUILDER_NOTRANSLATION="no-translation"
COM_COMPONENTBUILDER_NOT_FOUND_OR_ACCESS_DENIED="Not found or access denied!" COM_COMPONENTBUILDER_NOT_FOUND_OR_ACCESS_DENIED="Not found or access denied!"
COM_COMPONENTBUILDER_NOT_SET="not set" COM_COMPONENTBUILDER_NOT_SET="not set"

View File

@ -1365,7 +1365,7 @@ class ComponentbuilderModelAjax extends JModelList
$db = JFactory::getDbo(); $db = JFactory::getDbo();
// Create a new query object. // Create a new query object.
$query = $db->getQuery(true); $query = $db->getQuery(true);
$query->select($db->quoteName(array('a.alias','a.template','b.name'))); $query->select($db->quoteName(array('a.id','a.alias','a.template','b.name','a.dynamic_get')));
$query->from($db->quoteName('#__componentbuilder_template', 'a')); $query->from($db->quoteName('#__componentbuilder_template', 'a'));
$query->join('LEFT', $db->quoteName('#__componentbuilder_dynamic_get', 'b') . ' ON (' . $db->quoteName('b.id') . ' = ' . $db->quoteName('a.dynamic_get') . ')'); $query->join('LEFT', $db->quoteName('#__componentbuilder_dynamic_get', 'b') . ' ON (' . $db->quoteName('b.id') . ' = ' . $db->quoteName('a.dynamic_get') . ')');
$query->where($db->quoteName('a.id') . ' != '.(int) $id); $query->where($db->quoteName('a.id') . ' != '.(int) $id);
@ -1377,9 +1377,20 @@ class ComponentbuilderModelAjax extends JModelList
{ {
$results = $db->loadObjectList(); $results = $db->loadObjectList();
$templateString = array(); $templateString = array();
// get the view name & id
$values = $this->getViewID();
// check if we are in the correct view.
if (!is_null($values['a_id']) && $values['a_id'] > 0 && strlen($values['a_view']))
{
// set the return ref
$this->ref = '&ref=' . $values['a_view'] . '&refid=' . $values['a_id'];
}
foreach ($results as $result) foreach ($results as $result)
{ {
$templateString[] = "<td><b>".$result->name."</b></td><td><code>&lt;?php echo \$this->loadTemplate('".ComponentbuilderHelper::safeString($result->alias)."'); ?&gt;</code></td>"; $edit = ($button = $this->addEditLink($result->id, 'template', 'templates')) ? $button : '';
$editget = (isset($result->dynamic_get) && $result->dynamic_get > 0 && $button = $this->addEditLink($result->dynamic_get, 'dynamic_get', 'dynamic_gets')) ? $button : '';
$result->name = (ComponentbuilderHelper::checkString($result->name)) ? $result->name : JText::_('COM_COMPONENTBUILDER_NONE_SELECTED');
$templateString[] = "<td><b>".$result->name."</b> ".$editget."</td><td><code>&lt;?php echo \$this->loadTemplate('".ComponentbuilderHelper::safeString($result->alias)."'); ?&gt;</code> ".$edit."</td>";
} }
// build the table // build the table
$table = '<h2>'.JText::_('COM_COMPONENTBUILDER_TEMPLATE_CODE_SNIPPETS').'</h2><div class="uk-scrollable-box"><table class="uk-table uk-table-hover uk-table-striped uk-table-condensed">'; $table = '<h2>'.JText::_('COM_COMPONENTBUILDER_TEMPLATE_CODE_SNIPPETS').'</h2><div class="uk-scrollable-box"><table class="uk-table uk-table-hover uk-table-striped uk-table-condensed">';
@ -1399,7 +1410,7 @@ class ComponentbuilderModelAjax extends JModelList
$db = JFactory::getDbo(); $db = JFactory::getDbo();
// Create a new query object. // Create a new query object.
$query = $db->getQuery(true); $query = $db->getQuery(true);
$query->select($db->quoteName(array('a.alias','a.layout','b.getcustom','b.gettype','b.name'))); $query->select($db->quoteName(array('a.id','a.alias','a.layout','b.getcustom','b.gettype','b.name','a.dynamic_get')));
$query->from($db->quoteName('#__componentbuilder_layout', 'a')); $query->from($db->quoteName('#__componentbuilder_layout', 'a'));
$query->join('LEFT', $db->quoteName('#__componentbuilder_dynamic_get', 'b') . ' ON (' . $db->quoteName('b.id') . ' = ' . $db->quoteName('a.dynamic_get') . ')'); $query->join('LEFT', $db->quoteName('#__componentbuilder_dynamic_get', 'b') . ' ON (' . $db->quoteName('b.id') . ' = ' . $db->quoteName('a.dynamic_get') . ')');
$query->where($db->quoteName('a.id') . ' != '.(int) $id); $query->where($db->quoteName('a.id') . ' != '.(int) $id);
@ -1411,17 +1422,29 @@ class ComponentbuilderModelAjax extends JModelList
{ {
$results = $db->loadObjectList(); $results = $db->loadObjectList();
$layoutString = array(); $layoutString = array();
// get the view name & id
$values = $this->getViewID();
// check if we are in the correct view.
if (!is_null($values['a_id']) && $values['a_id'] > 0 && strlen($values['a_view']))
{
// set the return ref
$this->ref = '&ref=' . $values['a_view'] . '&refid=' . $values['a_id'];
}
foreach ($results as $result) foreach ($results as $result)
{ {
$edit = ($button = $this->addEditLink($result->id, 'layout', 'layouts')) ? $button : '';
$editget = (isset($result->dynamic_get) && $result->dynamic_get > 0 && $button = $this->addEditLink($result->dynamic_get, 'dynamic_get', 'dynamic_gets')) ? $button : '';
$result->name = (ComponentbuilderHelper::checkString($result->name)) ? $result->name : JText::_('COM_COMPONENTBUILDER_NONE_SELECTED');
switch ($result->gettype) switch ($result->gettype)
{ {
case 1: case 1:
// single // single
$layoutString[] = "<td><b>".$result->name."</b></td><td><code>&lt;?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->item); ?&gt;</code></td>"; $layoutString[] = "<td><b>".$result->name."</b> ".$editget."</td><td><code>&lt;?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->item); ?&gt;</code> ".$edit."</td>";
break; break;
case 2: case 2:
// list // list
$layoutString[] = "<td><b>".$result->name."</b></td><td><code>&lt;?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->items); ?&gt;</code></td>"; $layoutString[] = "<td><b>".$result->name."</b> ".$editget."</td><td><code>&lt;?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->items); ?&gt;</code> ".$edit."</td>";
break; break;
case 3: case 3:
case 4: case 4:
@ -1435,7 +1458,7 @@ class ComponentbuilderModelAjax extends JModelList
{ {
$varName = $result->getcustom; $varName = $result->getcustom;
} }
$layoutString[] = "<td><b>".$result->name."</b></td><td><code>&lt;?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->".$varName."); ?&gt;</code></td>"; $layoutString[] = "<td><b>".$result->name."</b> ".$editget."</td><td><code>&lt;?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->".$varName."); ?&gt;</code> ".$edit."</td>";
break; break;
} }
} }

View File

@ -158,6 +158,7 @@
required="false" required="false"
description="COM_COMPONENTBUILDER_ADMIN_FIELDS_TITLE_DESCRIPTION" description="COM_COMPONENTBUILDER_ADMIN_FIELDS_TITLE_DESCRIPTION"
class="inputbox" class="inputbox"
onchange="checkTitle(this)"
/> />
<!-- Alias Field. Type: Checkbox. (joomla) --> <!-- Alias Field. Type: Checkbox. (joomla) -->
<field <field
@ -168,6 +169,7 @@
required="false" required="false"
description="COM_COMPONENTBUILDER_ADMIN_FIELDS_ALIAS_DESCRIPTION" description="COM_COMPONENTBUILDER_ADMIN_FIELDS_ALIAS_DESCRIPTION"
class="inputbox" class="inputbox"
onchange="checkAlias(this)"
/> />
<!-- Sort Field. Type: Checkbox. (joomla) --> <!-- Sort Field. Type: Checkbox. (joomla) -->
<field <field

View File

@ -544,7 +544,7 @@ function getDynamicValues(id){
} }
function getLayoutDetails_server(id){ function getLayoutDetails_server(id){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLayoutDetails&format=json"; var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLayoutDetails&format=json&vdm="+vastDevMod;
if(token.length > 0 && id > 0){ if(token.length > 0 && id > 0){
var request = 'token='+token+'&id='+id; var request = 'token='+token+'&id='+id;
} }
@ -570,7 +570,7 @@ function getLayoutDetails(id){
} }
function getTemplateDetails_server(id){ function getTemplateDetails_server(id){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.templateDetails&format=json"; var getUrl = "index.php?option=com_componentbuilder&task=ajax.templateDetails&format=json&vdm="+vastDevMod;
if(token.length > 0 && id > 0){ if(token.length > 0 && id > 0){
var request = 'token='+token+'&id='+id; var request = 'token='+token+'&id='+id;
} }

View File

@ -178,7 +178,7 @@ function getDynamicValues(id){
} }
function getLayoutDetails_server(id){ function getLayoutDetails_server(id){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLayoutDetails&format=json"; var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLayoutDetails&format=json&vdm="+vastDevMod;
if(token.length > 0 && id > 0){ if(token.length > 0 && id > 0){
var request = 'token='+token+'&id='+id; var request = 'token='+token+'&id='+id;
} }

View File

@ -585,7 +585,7 @@ function getDynamicValues(id){
} }
function getLayoutDetails_server(id){ function getLayoutDetails_server(id){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLayoutDetails&format=json"; var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLayoutDetails&format=json&vdm="+vastDevMod;
if(token.length > 0 && id > 0){ if(token.length > 0 && id > 0){
var request = 'token='+token+'&id='+id; var request = 'token='+token+'&id='+id;
} }
@ -611,7 +611,7 @@ function getLayoutDetails(id){
} }
function getTemplateDetails_server(id){ function getTemplateDetails_server(id){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.templateDetails&format=json"; var getUrl = "index.php?option=com_componentbuilder&task=ajax.templateDetails&format=json&vdm="+vastDevMod;
if(token.length > 0 && id > 0){ if(token.length > 0 && id > 0){
var request = 'token='+token+'&id='+id; var request = 'token='+token+'&id='+id;
} }

View File

@ -178,7 +178,7 @@ function getDynamicValues(id){
} }
function getLayoutDetails_server(id){ function getLayoutDetails_server(id){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLayoutDetails&format=json"; var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLayoutDetails&format=json&vdm="+vastDevMod;
if(token.length > 0 && id > 0){ if(token.length > 0 && id > 0){
var request = 'token='+token+'&id='+id; var request = 'token='+token+'&id='+id;
} }
@ -204,7 +204,7 @@ function getLayoutDetails(id){
} }
function getTemplateDetails_server(id){ function getTemplateDetails_server(id){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.templateDetails&format=json"; var getUrl = "index.php?option=com_componentbuilder&task=ajax.templateDetails&format=json&vdm="+vastDevMod;
if(token.length > 0 && id > 0){ if(token.length > 0 && id > 0){
var request = 'token='+token+'&id='+id; var request = 'token='+token+'&id='+id;
} }

View File

@ -138,6 +138,13 @@ class ComponentbuilderModelLanguages extends JModelList
$languages[$language->name] = $language; $languages[$language->name] = $language;
} }
// we must add the British language en-GB (since Joomla Ships with it)
$language = new stdClass;
$language->name = 'English GB';
$language->element = 'pkg_en-GB';
$language->type = 'package';
$languages[$language->name] = $language;
usort($languages, function($a, $b) usort($languages, function($a, $b)
{ {
return strcmp($a->name, $b->name); return strcmp($a->name, $b->name);

View File

@ -66,6 +66,11 @@ class ComponentbuilderModelLayout extends JModelAdmin
return JTable::getInstance($type, $prefix, $config); return JTable::getInstance($type, $prefix, $config);
} }
public function getVDM()
{
return $this->vastDevMod;
}
/** /**
* Method to get a single record. * Method to get a single record.
* *
@ -115,6 +120,27 @@ class ComponentbuilderModelLayout extends JModelAdmin
$item->layout = base64_decode($item->layout); $item->layout = base64_decode($item->layout);
} }
if (empty($item->id))
{
$id = 0;
}
else
{
$id = $item->id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('layout__'.$id))
{
$this->vastDevMod = $vdm;
}
else
{
$this->vastDevMod = ComponentbuilderHelper::randomkey(50);
ComponentbuilderHelper::set($this->vastDevMod, 'layout__'.$id);
ComponentbuilderHelper::set('layout__'.$id, $this->vastDevMod);
}
if (!empty($item->id)) if (!empty($item->id))
{ {
$item->tags = new JHelperTags; $item->tags = new JHelperTags;

View File

@ -66,6 +66,11 @@ class ComponentbuilderModelTemplate extends JModelAdmin
return JTable::getInstance($type, $prefix, $config); return JTable::getInstance($type, $prefix, $config);
} }
public function getVDM()
{
return $this->vastDevMod;
}
/** /**
* Method to get a single record. * Method to get a single record.
* *
@ -115,6 +120,27 @@ class ComponentbuilderModelTemplate extends JModelAdmin
$item->template = base64_decode($item->template); $item->template = base64_decode($item->template);
} }
if (empty($item->id))
{
$id = 0;
}
else
{
$id = $item->id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('template__'.$id))
{
$this->vastDevMod = $vdm;
}
else
{
$this->vastDevMod = ComponentbuilderHelper::randomkey(50);
ComponentbuilderHelper::set($this->vastDevMod, 'template__'.$id);
ComponentbuilderHelper::set('template__'.$id, $this->vastDevMod);
}
if (!empty($item->id)) if (!empty($item->id))
{ {
$item->tags = new JHelperTags; $item->tags = new JHelperTags;

View File

@ -1527,6 +1527,88 @@ INSERT INTO `#__componentbuilder_fieldtype` (`id`, `catid`, `description`, `name
(34, '', 'Remember all views already have [accesslevel] added by default, only add this if you need more custom access selection! Provides a dropdown list of accesslevel options with the current option selected.', 'Accesslevel', '{\"properties0\":{\"name\":\"type\",\"example\":\"accesslevel\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be accesslevel\"},\"properties1\":{\"name\":\"name\",\"example\":\"accesstwo\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field. This must match the name of the query results column that contains the values that will be shown to the user in the drop-down list, unless a different name is specified in the value_field attribute. \"},\"properties2\":{\"name\":\"label\",\"example\":\"Access Two\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"Select an access level to this concept.\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field.\"},\"properties5\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is the field required true if yes.\"},\"properties6\":{\"name\":\"multiple\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) If set to multiple then allows more than one usergroup to be selected.\"},\"properties7\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'List of accesslevels', '', 1, 2, '', 5), (34, '', 'Remember all views already have [accesslevel] added by default, only add this if you need more custom access selection! Provides a dropdown list of accesslevel options with the current option selected.', 'Accesslevel', '{\"properties0\":{\"name\":\"type\",\"example\":\"accesslevel\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be accesslevel\"},\"properties1\":{\"name\":\"name\",\"example\":\"accesstwo\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field. This must match the name of the query results column that contains the values that will be shown to the user in the drop-down list, unless a different name is specified in the value_field attribute. \"},\"properties2\":{\"name\":\"label\",\"example\":\"Access Two\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"Select an access level to this concept.\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field.\"},\"properties5\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is the field required true if yes.\"},\"properties6\":{\"name\":\"multiple\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) If set to multiple then allows more than one usergroup to be selected.\"},\"properties7\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'List of accesslevels', '', 1, 2, '', 5),
(35, '', 'Provides a form with rows of fields that you specify. As many options can be added as desired. Note this form field has a jQuery based javascript file as a dependency.', 'Subform', '{\"properties0\":{\"name\":\"type\",\"example\":\"subform\",\"description\":\"(mandatory) must be subform.\"},\"properties1\":{\"name\":\"name\",\"example\":\"options\",\"adjustable\":\"1\",\"description\":\"(mandatory) is the unique name of the parameter\"},\"properties2\":{\"name\":\"label\",\"example\":\"The Option List\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"layout\",\"example\":\"joomla.form.field.subform.repeatable-table\",\"adjustable\":\"1\",\"description\":\"(mandatory) The layout for the repeatable table.\"},\"properties4\":{\"name\":\"component\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) To change the component where it should search for layout\"},\"properties5\":{\"name\":\"client\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Function to initialise the application client<br \\/>Frontend: <code>site<\\/code> or <code>0<\\/code><br \\/>Backend: <code>admin<\\/code> or <code>1<\\/code>\"},\"properties6\":{\"name\":\"multiple\",\"example\":\"true\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The rows to be multiple.\"},\"properties7\":{\"name\":\"buttons\",\"example\":\"add,remove,move\",\"adjustable\":\"1\",\"description\":\"(optional) Which buttons to show if multiple mode is true.<br \\/>Options: <code>add,remove,move<\\/code>\"},\"properties8\":{\"name\":\"fields\",\"example\":\"1,2,3\",\"adjustable\":\"1\",\"description\":\"(mandatory) The fields to add to the modal. All fields must first be created in component builder as a field before you can add them here, since you must use the id of the field. Separate the field ids with commas. Do not add custom fields that are not also used in this component.\"},\"properties9\":{\"name\":\"formsource\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) you can add a path to a xml file containing the fields.\"},\"properties10\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) description text for the form field. Displays at the top of the modal with the name as well as in the usual position in the form\"},\"properties11\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The default value for the form field if the field is left empty. Note this has to be a json string compatible with the contents of the form field.\"},\"properties12\":{\"name\":\"icon\",\"example\":\"list\",\"adjustable\":\"1\",\"description\":\"(optional) The icon to show on the select button (is prefixed with \\\"icon-\\\").\"},\"properties13\":{\"name\":\"max\",\"example\":\"50\",\"adjustable\":\"1\",\"description\":\"(optional) The maximum number of rows of fields allowed (by default 999 to be effectively infinite)\"},\"properties14\":{\"name\":\"min\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The minimum number of rows of fields required\"},\"properties15\":{\"name\":\"filter\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Use only if you would like to save raw data, since the default is best.\"},\"properties16\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'Allows form fields which can have as many options as the user desires.', '', 1, 12, '', 6); (35, '', 'Provides a form with rows of fields that you specify. As many options can be added as desired. Note this form field has a jQuery based javascript file as a dependency.', 'Subform', '{\"properties0\":{\"name\":\"type\",\"example\":\"subform\",\"description\":\"(mandatory) must be subform.\"},\"properties1\":{\"name\":\"name\",\"example\":\"options\",\"adjustable\":\"1\",\"description\":\"(mandatory) is the unique name of the parameter\"},\"properties2\":{\"name\":\"label\",\"example\":\"The Option List\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"layout\",\"example\":\"joomla.form.field.subform.repeatable-table\",\"adjustable\":\"1\",\"description\":\"(mandatory) The layout for the repeatable table.\"},\"properties4\":{\"name\":\"component\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) To change the component where it should search for layout\"},\"properties5\":{\"name\":\"client\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Function to initialise the application client<br \\/>Frontend: <code>site<\\/code> or <code>0<\\/code><br \\/>Backend: <code>admin<\\/code> or <code>1<\\/code>\"},\"properties6\":{\"name\":\"multiple\",\"example\":\"true\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The rows to be multiple.\"},\"properties7\":{\"name\":\"buttons\",\"example\":\"add,remove,move\",\"adjustable\":\"1\",\"description\":\"(optional) Which buttons to show if multiple mode is true.<br \\/>Options: <code>add,remove,move<\\/code>\"},\"properties8\":{\"name\":\"fields\",\"example\":\"1,2,3\",\"adjustable\":\"1\",\"description\":\"(mandatory) The fields to add to the modal. All fields must first be created in component builder as a field before you can add them here, since you must use the id of the field. Separate the field ids with commas. Do not add custom fields that are not also used in this component.\"},\"properties9\":{\"name\":\"formsource\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) you can add a path to a xml file containing the fields.\"},\"properties10\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) description text for the form field. Displays at the top of the modal with the name as well as in the usual position in the form\"},\"properties11\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The default value for the form field if the field is left empty. Note this has to be a json string compatible with the contents of the form field.\"},\"properties12\":{\"name\":\"icon\",\"example\":\"list\",\"adjustable\":\"1\",\"description\":\"(optional) The icon to show on the select button (is prefixed with \\\"icon-\\\").\"},\"properties13\":{\"name\":\"max\",\"example\":\"50\",\"adjustable\":\"1\",\"description\":\"(optional) The maximum number of rows of fields allowed (by default 999 to be effectively infinite)\"},\"properties14\":{\"name\":\"min\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The minimum number of rows of fields required\"},\"properties15\":{\"name\":\"filter\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Use only if you would like to save raw data, since the default is best.\"},\"properties16\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'Allows form fields which can have as many options as the user desires.', '', 1, 12, '', 6);
--
-- Dumping data for table `#__componentbuilder_language`
--
INSERT INTO `#__componentbuilder_language` (`id`, `langtag`, `name`, `params`, `published`, `created`, `modified`, `version`, `hits`, `ordering`) VALUES
(1, 'af-ZA', 'Afrikaans', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(2, 'sq-AL', 'Albanian', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(3, 'ar-AA', 'Arabic Unitag', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(4, 'hy-AM', 'Armenian', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(5, 'id-ID', 'Bahasa Indonesia', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(6, 'eu-ES', 'Basque', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(7, 'be-BY', 'Belarusian', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(8, 'bn-BD', 'Bengali', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(9, 'bs-BA', 'Bosnian', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(10, 'bg-BG', 'Bulgarian', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(11, 'ca-ES', 'Catalan', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(12, 'zh-CN', 'Chinese Simplified', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(13, 'zh-TW', 'Chinese Traditional', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(14, 'hr-HR', 'Croatian', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(15, 'cs-CZ', 'Czech', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(16, 'da-DK', 'Danish', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(17, 'prs-AF', 'Dari Persian', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(18, 'nl-NL', 'Dutch', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(19, 'dz-BT', 'Dzongkha', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(20, 'en-AU', 'English AU', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(21, 'en-CA', 'English CA', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(22, 'en-GB', 'English GB', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(23, 'en-NZ', 'English NZ', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(24, 'en-US', 'English US', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(25, 'eo-XX', 'Esperanto', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(26, 'et-EE', 'Estonian', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(27, 'fi-FI', 'Finnish', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(28, 'nl-BE', 'Flemish', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(29, 'fr-FR', 'French', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(30, 'fr-CA', 'French CA', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(31, 'gl-ES', 'Galician', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(32, 'ka-GE', 'Georgian', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(33, 'de-AT', 'German AT', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(34, 'de-CH', 'German CH', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(35, 'de-DE', 'German DE', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(36, 'de-LI', 'German LI', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(37, 'de-LU', 'German LU', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(38, 'el-GR', 'Greek', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(39, 'he-IL', 'Hebrew', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(40, 'hi-IN', 'Hindi', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(41, 'hu-HU', 'Hungarian', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(42, 'ga-IE', 'Irish', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(43, 'it-IT', 'Italian', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(44, 'ja-JP', 'Japanese', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(45, 'km-KH', 'Khmer', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(46, 'ko-KR', 'Korean', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(47, 'lv-LV', 'Latvian', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(48, 'mk-MK', 'Macedonian', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(49, 'ms-MY', 'Malay', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(50, 'srp-ME', 'Montenegrin', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(51, 'nb-NO', 'Norwegian Bokmal', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(52, 'nn-NO', 'Norwegian Nynorsk', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(53, 'fa-IR', 'Persian', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(54, 'pl-PL', 'Polish', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(55, 'pt-PT', 'Portuguese', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(56, 'pt-BR', 'Portuguese Brazil', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(57, 'ro-RO', 'Romanian', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(58, 'ru-RU', 'Russian', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(59, 'sr-RS', 'Serbian Cyrillic', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(60, 'sr-YU', 'Serbian Latin', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(61, 'si-LK', 'Sinhala', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(62, 'sk-SK', 'Slovak', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(63, 'sl-SI', 'Slovenian', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(64, 'es-ES', 'Spanish', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(65, 'es-CO', 'Spanish CO', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(66, 'sw-KE', 'Swahili', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(67, 'sv-SE', 'Swedish', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(68, 'sy-IQ', 'Syriac', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(69, 'ta-IN', 'Tamil', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(70, 'th-TH', 'Thai', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(71, 'tr-TR', 'Turkish', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(72, 'tk-TM', 'Turkmen', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(73, 'uk-UA', 'Ukrainian', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(74, 'ug-CN', 'Uyghur', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(75, 'vi-VN', 'Vietnamese', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1),
(76, 'cy-GB', 'Welsh', '', 1, '2018-04-19 13:43:44', '0000-00-00 00:00:00', 1, '', 1);
-- --
-- Dumping data for table `#__componentbuilder_help_document` -- Dumping data for table `#__componentbuilder_help_document`
-- --

View File

@ -236,4 +236,50 @@ function fanAsgfdSffsAbsent(arr){
} }
return absentArray; return absentArray;
} }
// little script to check that only one title is selected
function checkTitle(field) {
// get the ID
var id = jQuery(field).attr('id');
var target = id.split('__');
//set the subID
var subID = target[0]+'__'+target[1];
var subID = subID.replace(/\d+/g, '');
// set notice and do house cleaning
if (jQuery('#'+id).prop('checked')) {
// get number of items
var numItems = jQuery('.count-the-items1235').length + 10;
for (i = 0; i < numItems; i++) { // for now this is the number of field we should check
// build ID
var id_check = subID+i+'__title';
// first check if Id is on page
if (jQuery("#"+id_check).length && id_check !== id) {
// uncheck it
jQuery("#"+id_check).prop('checked', false).trigger('change');
}
}
}
}
// little script to check that only one title is selected
function checkAlias(field) {
// get the ID
var id = jQuery(field).attr('id');
var target = id.split('__');
//set the subID
var subID = target[0]+'__'+target[1];
var subID = subID.replace(/\d+/g, '');
// set notice and do house cleaning
if (jQuery('#'+id).prop('checked')) {
// get number of items
var numItems = jQuery('.count-the-items1235').length + 10;
for (i = 0; i < numItems; i++) { // for now this is the number of field we should check
// build ID
var id_check = subID+i+'__alias';
// first check if Id is on page
if (jQuery("#"+id_check).length && id_check !== id) {
// uncheck it
jQuery("#"+id_check).prop('checked', false).trigger('change');
}
}
}
}
</script> </script>

View File

@ -208,6 +208,8 @@ class ComponentbuilderViewLayout extends JViewLegacy
$this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');
$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
$this->document->addScriptDeclaration("var vastDevMod = '".$this->get('VDM')."';");
JText::script('view not acceptable. Error'); JText::script('view not acceptable. Error');
} }
} }

View File

@ -208,6 +208,8 @@ class ComponentbuilderViewTemplate extends JViewLegacy
$this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');
$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
$this->document->addScriptDeclaration("var vastDevMod = '".$this->get('VDM')."';");
JText::script('view not acceptable. Error'); JText::script('view not acceptable. Error');
} }
} }

View File

@ -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>18th April, 2018</creationDate> <creationDate>19th 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>

View File

@ -3692,7 +3692,7 @@ class com_componentbuilderInstallerScript
$query = $db->getQuery(true); $query = $db->getQuery(true);
// Field to update. // Field to update.
$fields = array( $fields = array(
$db->quoteName('params') . ' = ' . $db->quote('{"autorName":"Llewellyn van der Merwe","autorEmail":"llewellyn@joomlacomponentbuilder.com","minify":"0","percentagelanguageadd":"50","compiler_field_builder_type":"2","set_browser_storage":"1","storage_time_to_live":"global","cronjob_backup_type":"1","cronjob_backup_server":"0","backup_package_name":"JCB_Backup_[YEAR]_[MONTH]_[DAY]","export_license":"GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html","export_copyright":"Copyright (C) 2015. All Rights Reserved","check_in":"-1 day","save_history":"1","history_limit":"10","uikit_load":"1","uikit_min":"","uikit_style":""}'), $db->quoteName('params') . ' = ' . $db->quote('{"autorName":"Llewellyn van der Merwe","autorEmail":"llewellyn@joomlacomponentbuilder.com","minify":"0","language":"en-GB","percentagelanguageadd":"50","compiler_field_builder_type":"2","set_browser_storage":"1","storage_time_to_live":"global","cronjob_backup_type":"1","cronjob_backup_server":"0","backup_package_name":"JCB_Backup_[YEAR]_[MONTH]_[DAY]","export_license":"GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html","export_copyright":"Copyright (C) 2015. All Rights Reserved","check_in":"-1 day","save_history":"1","history_limit":"10","uikit_load":"1","uikit_min":"","uikit_style":""}'),
); );
// Condition. // Condition.
$conditions = array( $conditions = array(