';
@@ -1396,14 +1407,14 @@ class ComponentbuilderModelAjax extends JModelList
// set table
$table = false;
// Get a db connection.
- $db = JFactory::getDbo();
+ $db = JFactory::getDbo();
// Create a new query object.
$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->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.published') . ' = 1');
+ $query->where($db->quoteName('a.published') . ' = 1');
// Reset the query using our newly populated query object.
$db->setQuery($query);
$db->execute();
@@ -1411,17 +1422,29 @@ class ComponentbuilderModelAjax extends JModelList
{
$results = $db->loadObjectList();
$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)
{
+ $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)
{
case 1:
// single
- $layoutString[] = "".$result->name." | <?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->item); ?> | ";
+ $layoutString[] = "".$result->name." ".$editget." | <?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->item); ?> ".$edit." | ";
break;
case 2:
// list
- $layoutString[] = "".$result->name." | <?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->items); ?> | ";
+ $layoutString[] = "".$result->name." ".$editget." | <?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->items); ?> ".$edit." | ";
break;
case 3:
case 4:
@@ -1435,7 +1458,7 @@ class ComponentbuilderModelAjax extends JModelList
{
$varName = $result->getcustom;
}
- $layoutString[] = "".$result->name." | <?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->".$varName."); ?> | ";
+ $layoutString[] = "".$result->name." ".$editget." | <?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->".$varName."); ?> ".$edit." | ";
break;
}
}
diff --git a/admin/models/fields/lang.php b/admin/models/fields/lang.php
index b44765c54..10b3952f8 100644
--- a/admin/models/fields/lang.php
+++ b/admin/models/fields/lang.php
@@ -49,23 +49,23 @@ class JFormFieldLang extends JFormFieldList
*/
public function getOptions()
{
- $db = JFactory::getDBO();
- $query = $db->getQuery(true);
- $query->select($db->quoteName(array('a.langtag','a.name'),array('langtag','language_name')));
- $query->from($db->quoteName('#__componentbuilder_language', 'a'));
- $query->where($db->quoteName('a.published') . ' >= 1');
- $query->order('a.langtag ASC');
- $db->setQuery((string)$query);
- $items = $db->loadObjectList();
- $options = array();
- if ($items)
- {
- $options[] = JHtml::_('select.option', '', 'Select an option');
- foreach($items as $item)
- {
- $options[] = JHtml::_('select.option', trim($item->langtag), $item->language_name . ' (' .$item->langtag.')');
- }
- }
- return $options;
+ $db = JFactory::getDBO();
+$query = $db->getQuery(true);
+$query->select($db->quoteName(array('a.langtag','a.name'),array('langtag','language_name')));
+$query->from($db->quoteName('#__componentbuilder_language', 'a'));
+$query->where($db->quoteName('a.published') . ' >= 1');
+$query->order('a.langtag ASC');
+$db->setQuery((string)$query);
+$items = $db->loadObjectList();
+$options = array();
+if ($items)
+{
+ $options[] = JHtml::_('select.option', '', 'Select an option');
+ foreach($items as $item)
+ {
+ $options[] = JHtml::_('select.option', trim($item->langtag), $item->language_name . ' (' .$item->langtag.')');
+ }
+}
+return $options;
}
}
diff --git a/admin/models/forms/admin_fields.xml b/admin/models/forms/admin_fields.xml
index 131580f77..244c5cad5 100644
--- a/admin/models/forms/admin_fields.xml
+++ b/admin/models/forms/admin_fields.xml
@@ -158,6 +158,7 @@
required="false"
description="COM_COMPONENTBUILDER_ADMIN_FIELDS_TITLE_DESCRIPTION"
class="inputbox"
+ onchange="checkTitle(this)"
/>
0 && id > 0){
var request = 'token='+token+'&id='+id;
}
@@ -570,7 +570,7 @@ function getLayoutDetails(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){
var request = 'token='+token+'&id='+id;
}
diff --git a/admin/models/forms/layout.js b/admin/models/forms/layout.js
index fa47acd91..bd9d7c403 100644
--- a/admin/models/forms/layout.js
+++ b/admin/models/forms/layout.js
@@ -178,7 +178,7 @@ function getDynamicValues(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){
var request = 'token='+token+'&id='+id;
}
diff --git a/admin/models/forms/site_view.js b/admin/models/forms/site_view.js
index d8d24db88..da82408e6 100644
--- a/admin/models/forms/site_view.js
+++ b/admin/models/forms/site_view.js
@@ -585,7 +585,7 @@ function getDynamicValues(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){
var request = 'token='+token+'&id='+id;
}
@@ -611,7 +611,7 @@ function getLayoutDetails(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){
var request = 'token='+token+'&id='+id;
}
diff --git a/admin/models/forms/template.js b/admin/models/forms/template.js
index d3da0c767..0abe306a9 100644
--- a/admin/models/forms/template.js
+++ b/admin/models/forms/template.js
@@ -178,7 +178,7 @@ function getDynamicValues(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){
var request = 'token='+token+'&id='+id;
}
@@ -204,7 +204,7 @@ function getLayoutDetails(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){
var request = 'token='+token+'&id='+id;
}
diff --git a/admin/models/languages.php b/admin/models/languages.php
index 420bad3e0..301e8ef62 100644
--- a/admin/models/languages.php
+++ b/admin/models/languages.php
@@ -138,6 +138,13 @@ class ComponentbuilderModelLanguages extends JModelList
$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)
{
return strcmp($a->name, $b->name);
diff --git a/admin/models/layout.php b/admin/models/layout.php
index c379ae4e2..136e4dd06 100644
--- a/admin/models/layout.php
+++ b/admin/models/layout.php
@@ -64,6 +64,11 @@ class ComponentbuilderModelLayout extends JModelAdmin
public function getTable($type = 'layout', $prefix = 'ComponentbuilderTable', $config = array())
{
return JTable::getInstance($type, $prefix, $config);
+ }
+
+ public function getVDM()
+ {
+ return $this->vastDevMod;
}
/**
@@ -113,6 +118,27 @@ class ComponentbuilderModelLayout extends JModelAdmin
{
// base64 Decode 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))
diff --git a/admin/models/template.php b/admin/models/template.php
index 52805d544..d3077def8 100644
--- a/admin/models/template.php
+++ b/admin/models/template.php
@@ -64,6 +64,11 @@ class ComponentbuilderModelTemplate extends JModelAdmin
public function getTable($type = 'template', $prefix = 'ComponentbuilderTable', $config = array())
{
return JTable::getInstance($type, $prefix, $config);
+ }
+
+ public function getVDM()
+ {
+ return $this->vastDevMod;
}
/**
@@ -113,6 +118,27 @@ class ComponentbuilderModelTemplate extends JModelAdmin
{
// base64 Decode 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))
diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql
index 557620855..d5aec9d4e 100644
--- a/admin/sql/install.mysql.utf8.sql
+++ b/admin/sql/install.mysql.utf8.sql
@@ -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),
(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
Frontend: site<\\/code> or 0<\\/code>
Backend: admin<\\/code> or 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.
Options: 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`
--
diff --git a/admin/views/admin_fields/tmpl/edit.php b/admin/views/admin_fields/tmpl/edit.php
index 7aed1cc32..748e873be 100644
--- a/admin/views/admin_fields/tmpl/edit.php
+++ b/admin/views/admin_fields/tmpl/edit.php
@@ -236,4 +236,50 @@ function fanAsgfdSffsAbsent(arr){
}
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');
+ }
+ }
+ }
+}
diff --git a/admin/views/layout/view.html.php b/admin/views/layout/view.html.php
index b40760787..e076495c0 100644
--- a/admin/views/layout/view.html.php
+++ b/admin/views/layout/view.html.php
@@ -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/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);
+ // add var key
+ $this->document->addScriptDeclaration("var vastDevMod = '".$this->get('VDM')."';");
JText::script('view not acceptable. Error');
}
}
diff --git a/admin/views/template/view.html.php b/admin/views/template/view.html.php
index b6530d026..308fb6f39 100644
--- a/admin/views/template/view.html.php
+++ b/admin/views/template/view.html.php
@@ -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/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);
+ // add var key
+ $this->document->addScriptDeclaration("var vastDevMod = '".$this->get('VDM')."';");
JText::script('view not acceptable. Error');
}
}
diff --git a/componentbuilder.xml b/componentbuilder.xml
index 4937c249b..4ef73e581 100644
--- a/componentbuilder.xml
+++ b/componentbuilder.xml
@@ -1,7 +1,7 @@
COM_COMPONENTBUILDER
- 18th April, 2018
+ 19th April, 2018
Llewellyn van der Merwe
llewellyn@joomlacomponentbuilder.com
http://joomlacomponentbuilder.com
diff --git a/script.php b/script.php
index e69da93da..44645018f 100644
--- a/script.php
+++ b/script.php
@@ -3692,7 +3692,7 @@ class com_componentbuilderInstallerScript
$query = $db->getQuery(true);
// Field to update.
$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.
$conditions = array(