Fixed line break error in JavaScript building area, also added little notice in field area to select field type.

This commit is contained in:
Llewellyn van der Merwe 2018-04-11 22:48:37 +02:00
parent e6b2b48ac7
commit 802554e7a9
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
16 changed files with 166 additions and 161 deletions

View File

@ -130,8 +130,8 @@ Component Builder is mapped as a component in itself on my local development env
+ *Version*: 2.7.2
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
+ *Line count*: **189475**
+ *Field count*: **1011**
+ *Line count*: **189480**
+ *Field count*: **1012**
+ *File count*: **1199**
+ *Folder count*: **193**

View File

@ -130,8 +130,8 @@ Component Builder is mapped as a component in itself on my local development env
+ *Version*: 2.7.2
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
+ *Line count*: **189475**
+ *Field count*: **1011**
+ *Line count*: **189480**
+ *Field count*: **1012**
+ *File count*: **1199**
+ *Folder count*: **193**

View File

@ -9556,7 +9556,7 @@ class Interpretation extends Fields
{
if (ComponentbuilderHelper::typeField($type, 'list') || ComponentbuilderHelper::typeField($type, 'dynamic') || !ComponentbuilderHelper::typeField($type))
{
$optionsArray = explode(PHP_EOL, $options);
$optionsArray = array_map('trim', (array) explode(PHP_EOL, $options));
if (!ComponentbuilderHelper::checkArray($optionsArray))
{
$optionsArray[] = $optionsArray;
@ -9565,7 +9565,7 @@ class Interpretation extends Fields
{
if (strpos($option, '|') !== false)
{
list($option) = explode('|', $option);
list($option) = array_map('trim', (array) explode('|', $option));
}
if ($option != 'dynamic_list')
{
@ -9582,7 +9582,7 @@ class Interpretation extends Fields
{
if (strpos($keywords, ',') !== false)
{
$keywords = explode(',', $keywords);
$keywords = array_map('trim', (array) explode(',', $keywords));
foreach ($keywords as $keyword)
{
$buket['keywords'][] = trim($keyword);

View File

@ -3915,6 +3915,8 @@ COM_COMPONENTBUILDER_FIELD_NOTE_FILTER_INFORMATION_DESCRIPTION="<div class='form
<div id='display_linked_to'>Searching the database.<span class='loading-dots'></span></div>
</div>
</div>"
COM_COMPONENTBUILDER_FIELD_NOTE_SELECT_FIELD_TYPE_DESCRIPTION="Please select a field type that you would like to build."
COM_COMPONENTBUILDER_FIELD_NOTE_SELECT_FIELD_TYPE_LABEL="Building a field"
COM_COMPONENTBUILDER_FIELD_NOTE_WHMCS_ENCRYPTION_DESCRIPTION="<p>When using the WHMCS encryption you need to get a WHMCS key from:<br /><a href='https://www.vdm.io/support' target='_blank'>https://www.vdm.io</a>, or your own WHMCS install.</p><p>Please note that you will need to <b>enable the add-on</b> in the Joomla Component area (Add WHMCS)->Yes.</p><p>You can get more info about the WHMCS licensing add-on at the following links.</p><p><b>Helpful Links:</b><br />
<a href='https://www.whmcs.com/addons/licensing-addon/' target='_blank'>https://www.whmcs.com/addons/licensing-addon/</a><br />
<a href='http://docs.whmcs.com/Licensing_Addon/' target='_blank'>http://docs.whmcs.com/Licensing_Addon/</a></p>"

View File

@ -30,7 +30,7 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'xml',
'note_select_field_type',
'note_filter_information'
);

View File

@ -30,7 +30,8 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'helpnote'
'helpnote',
'xml'
);
?>

View File

@ -61,10 +61,10 @@ $can = ComponentbuilderHelper::getActions('field');
<?php echo JText::_('COM_COMPONENTBUILDER_FIELD_NULL_SWITCH_LABEL'); ?>
</th>
<th data-breakpoints="xs sm md" data-type="html" data-sort-use="text">
<?php echo JText::_('COM_COMPONENTBUILDER_FIELD_FIELD_CATEGORY'); ?>
<?php echo JText::_('COM_COMPONENTBUILDER_FIELD_STORE_LABEL'); ?>
</th>
<th data-breakpoints="all" data-type="html" data-sort-use="text">
<?php echo JText::_('COM_COMPONENTBUILDER_FIELD_STORE_LABEL'); ?>
<?php echo JText::_('COM_COMPONENTBUILDER_FIELD_FIELD_CATEGORY'); ?>
</th>
<th width="10" data-breakpoints="xs sm md">
<?php echo JText::_('COM_COMPONENTBUILDER_FIELD_STATUS'); ?>
@ -104,6 +104,9 @@ $can = ComponentbuilderHelper::getActions('field');
<td>
<?php echo JText::_($item->null_switch); ?>
</td>
<td>
<?php echo JText::_($item->store); ?>
</td>
<td class="nowrap">
<?php if ($user->authorise('core.edit', 'com_componentbuilder.fields.category.' . (int)$item->catid)): ?>
<a href="index.php?option=com_categories&task=category.edit&id=<?php echo (int)$item->catid; ?>&extension=com_componentbuilder.fields"><?php echo $displayData->escape($item->category_title); ?></a>
@ -111,9 +114,6 @@ $can = ComponentbuilderHelper::getActions('field');
<?php echo $displayData->escape($item->category_title); ?>
<?php endif; ?>
</td>
<td>
<?php echo JText::_($item->store); ?>
</td>
<?php if ($item->published == 1):?>
<td class="center" data-sort-value="1">
<span class="status-metro status-published" title="<?php echo JText::_('COM_COMPONENTBUILDER_PUBLISHED'); ?>">

View File

@ -112,10 +112,10 @@ class ComponentbuilderModelField extends JModelAdmin
$item->css_views = base64_decode($item->css_views);
}
if (!empty($item->javascript_views_footer))
if (!empty($item->css_view))
{
// base64 Decode javascript_views_footer.
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
// base64 Decode css_view.
$item->css_view = base64_decode($item->css_view);
}
if (!empty($item->javascript_view_footer))
@ -124,10 +124,10 @@ class ComponentbuilderModelField extends JModelAdmin
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
}
if (!empty($item->css_view))
if (!empty($item->javascript_views_footer))
{
// base64 Decode css_view.
$item->css_view = base64_decode($item->css_view);
// base64 Decode javascript_views_footer.
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
}
@ -937,10 +937,10 @@ class ComponentbuilderModelField extends JModelAdmin
$data['css_views'] = base64_encode($data['css_views']);
}
// Set the javascript_views_footer string to base64 string.
if (isset($data['javascript_views_footer']))
// Set the css_view string to base64 string.
if (isset($data['css_view']))
{
$data['javascript_views_footer'] = base64_encode($data['javascript_views_footer']);
$data['css_view'] = base64_encode($data['css_view']);
}
// Set the javascript_view_footer string to base64 string.
@ -949,10 +949,10 @@ class ComponentbuilderModelField extends JModelAdmin
$data['javascript_view_footer'] = base64_encode($data['javascript_view_footer']);
}
// Set the css_view string to base64 string.
if (isset($data['css_view']))
// Set the javascript_views_footer string to base64 string.
if (isset($data['javascript_views_footer']))
{
$data['css_view'] = base64_encode($data['css_view']);
$data['javascript_views_footer'] = base64_encode($data['javascript_views_footer']);
}
// Set the Params Items to data

View File

@ -49,10 +49,10 @@ class ComponentbuilderModelFields extends JModelList
'a.datatype','datatype',
'a.indexes','indexes',
'a.null_switch','null_switch',
'a.store','store',
'c.title','category_title',
'c.id', 'category_id',
'a.catid', 'catid',
'a.store','store'
'a.catid', 'catid'
);
}
@ -88,6 +88,9 @@ class ComponentbuilderModelFields extends JModelList
$null_switch = $this->getUserStateFromRequest($this->context . '.filter.null_switch', 'filter_null_switch');
$this->setState('filter.null_switch', $null_switch);
$store = $this->getUserStateFromRequest($this->context . '.filter.store', 'filter_store');
$this->setState('filter.store', $store);
$category = $app->getUserStateFromRequest($this->context . '.filter.category', 'filter_category');
$this->setState('filter.category', $category);
@ -95,10 +98,7 @@ class ComponentbuilderModelFields extends JModelList
$this->setState('filter.category_id', $categoryId);
$catid = $app->getUserStateFromRequest($this->context . '.filter.catid', 'filter_catid');
$this->setState('filter.catid', $catid);
$store = $this->getUserStateFromRequest($this->context . '.filter.store', 'filter_store');
$this->setState('filter.store', $store);
$this->setState('filter.catid', $catid);
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
$this->setState('filter.sorting', $sorting);
@ -313,7 +313,7 @@ class ComponentbuilderModelFields extends JModelList
else
{
$search = $db->quote('%' . $db->escape($search) . '%');
$query->where('(a.name LIKE '.$search.' OR a.fieldtype LIKE '.$search.' OR g.name LIKE '.$search.' OR a.datatype LIKE '.$search.' OR a.indexes LIKE '.$search.' OR a.null_switch LIKE '.$search.' OR a.catid LIKE '.$search.' OR a.store LIKE '.$search.' OR a.xml LIKE '.$search.')');
$query->where('(a.name LIKE '.$search.' OR a.fieldtype LIKE '.$search.' OR g.name LIKE '.$search.' OR a.datatype LIKE '.$search.' OR a.indexes LIKE '.$search.' OR a.null_switch LIKE '.$search.' OR a.store LIKE '.$search.' OR a.catid LIKE '.$search.' OR a.xml LIKE '.$search.')');
}
}
@ -433,12 +433,12 @@ class ComponentbuilderModelFields extends JModelList
// decode css_views
$item->css_views = base64_decode($item->css_views);
// decode javascript_views_footer
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
// decode javascript_view_footer
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
// decode css_view
$item->css_view = base64_decode($item->css_view);
// decode javascript_view_footer
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
// decode javascript_views_footer
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
// unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);
@ -504,10 +504,10 @@ class ComponentbuilderModelFields extends JModelList
$id .= ':' . $this->getState('filter.datatype');
$id .= ':' . $this->getState('filter.indexes');
$id .= ':' . $this->getState('filter.null_switch');
$id .= ':' . $this->getState('filter.store');
$id .= ':' . $this->getState('filter.category');
$id .= ':' . $this->getState('filter.category_id');
$id .= ':' . $this->getState('filter.catid');
$id .= ':' . $this->getState('filter.store');
$id .= ':' . $this->getState('filter.catid');
return parent::getStoreId($id);
}

View File

@ -596,8 +596,8 @@ function getFieldOptions(fieldtype){
propertiesArray = result.nameListOptions;
// remove previous forms of exist
jQuery('.prop_removal').remove();
// remove the hidden jform_properties
jQuery('#jform_xml').closest('.control-group').remove();
// hide notice
jQuery('.note_select_field_type').closest('.control-group').remove();
// append to the closed to xml (hidden field)
jQuery('.note_filter_information').closest('.control-group').prepend(result.subform);
// add the watcher

View File

@ -214,34 +214,90 @@
/>
<!-- Note_filter_information Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_filter_information" description="COM_COMPONENTBUILDER_FIELD_NOTE_FILTER_INFORMATION_DESCRIPTION" class="note_filter_information" />
<!-- Javascript_views_footer Field. Type: Textarea. (joomla) -->
<!-- Helpnote Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="helpnote" label="COM_COMPONENTBUILDER_FIELD_HELPNOTE_LABEL" class="helpNote helpnote" />
<!-- Add_javascript_views_footer Field. Type: Radio. (joomla) -->
<field
type="textarea"
name="javascript_views_footer"
label="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEWS_FOOTER_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEWS_FOOTER_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEWS_FOOTER_HINT"
required="true"
/>
<!-- Javascript_view_footer Field. Type: Textarea. (joomla) -->
type="radio"
name="add_javascript_views_footer"
label="COM_COMPONENTBUILDER_FIELD_ADD_JAVASCRIPT_VIEWS_FOOTER_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_FIELD_YES</option>
<option value="0">
COM_COMPONENTBUILDER_FIELD_NO</option>
</field>
<!-- Add_javascript_view_footer Field. Type: Radio. (joomla) -->
<field
type="textarea"
name="javascript_view_footer"
label="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEW_FOOTER_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEW_FOOTER_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEW_FOOTER_HINT"
type="radio"
name="add_javascript_view_footer"
label="COM_COMPONENTBUILDER_FIELD_ADD_JAVASCRIPT_VIEW_FOOTER_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_FIELD_YES</option>
<option value="0">
COM_COMPONENTBUILDER_FIELD_NO</option>
</field>
<!-- Store Field. Type: List. (joomla) -->
<field
type="list"
name="store"
label="COM_COMPONENTBUILDER_FIELD_STORE_LABEL"
description="COM_COMPONENTBUILDER_FIELD_STORE_DESCRIPTION"
class="list_class"
multiple="false"
filter="INT"
required="true"
default="0">
<!-- Option Set. -->
<option value="0">
COM_COMPONENTBUILDER_FIELD_DEFAULT</option>
<option value="1">
COM_COMPONENTBUILDER_FIELD_JSON</option>
<option value="2">
COM_COMPONENTBUILDER_FIELD_BASESIXTY_FOUR</option>
<option value="3">
COM_COMPONENTBUILDER_FIELD_BASIC_ENCRYPTION_LOCALDBKEY</option>
<option value="5">
COM_COMPONENTBUILDER_FIELD_MEDIUM_ENCRYPTION_LOCALFILEKEY</option>
<option value="4">
COM_COMPONENTBUILDER_FIELD_WHMCSKEY_ENCRYPTION</option>
</field>
<!-- Add_css_view Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_css_view"
label="COM_COMPONENTBUILDER_FIELD_ADD_CSS_VIEW_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_FIELD_YES</option>
<option value="0">
COM_COMPONENTBUILDER_FIELD_NO</option>
</field>
<!-- Not_required Field. Type: Hidden. (joomla) -->
<field
type="hidden"
name="not_required"
default="[]"
/>
<!-- Catid Field. Type: Category. (joomla) -->
<field
type="category"
name="catid"
label="COM_COMPONENTBUILDER_FIELD_CATID_LABEL"
extension="com_componentbuilder.fields"
description="COM_COMPONENTBUILDER_FIELD_CATID_DESCRIPTION"
class="inputbox"
/>
<!-- Note_whmcs_encryption Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_whmcs_encryption" label="COM_COMPONENTBUILDER_FIELD_NOTE_WHMCS_ENCRYPTION_LABEL" description="COM_COMPONENTBUILDER_FIELD_NOTE_WHMCS_ENCRYPTION_DESCRIPTION" heading="h4" class="alert alert-success note_whmcs_encryption" />
<!-- Datalenght Field. Type: List. (joomla) -->
<field
type="list"
@ -276,35 +332,6 @@
<option value="Other">
COM_COMPONENTBUILDER_FIELD_OTHER</option>
</field>
<!-- Add_css_view Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_css_view"
label="COM_COMPONENTBUILDER_FIELD_ADD_CSS_VIEW_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_FIELD_YES</option>
<option value="0">
COM_COMPONENTBUILDER_FIELD_NO</option>
</field>
<!-- Not_required Field. Type: Hidden. (joomla) -->
<field
type="hidden"
name="not_required"
default="[]"
/>
<!-- Catid Field. Type: Category. (joomla) -->
<field
type="category"
name="catid"
label="COM_COMPONENTBUILDER_FIELD_CATID_LABEL"
extension="com_componentbuilder.fields"
description="COM_COMPONENTBUILDER_FIELD_CATID_DESCRIPTION"
class="inputbox"
/>
<!-- Css_view Field. Type: Textarea. (joomla) -->
<field
type="textarea"
@ -318,31 +345,8 @@
hint="COM_COMPONENTBUILDER_FIELD_CSS_VIEW_HINT"
required="true"
/>
<!-- Store Field. Type: List. (joomla) -->
<field
type="list"
name="store"
label="COM_COMPONENTBUILDER_FIELD_STORE_LABEL"
description="COM_COMPONENTBUILDER_FIELD_STORE_DESCRIPTION"
class="list_class"
multiple="false"
filter="INT"
required="true"
default="0">
<!-- Option Set. -->
<option value="0">
COM_COMPONENTBUILDER_FIELD_DEFAULT</option>
<option value="1">
COM_COMPONENTBUILDER_FIELD_JSON</option>
<option value="2">
COM_COMPONENTBUILDER_FIELD_BASESIXTY_FOUR</option>
<option value="3">
COM_COMPONENTBUILDER_FIELD_BASIC_ENCRYPTION_LOCALDBKEY</option>
<option value="5">
COM_COMPONENTBUILDER_FIELD_MEDIUM_ENCRYPTION_LOCALFILEKEY</option>
<option value="4">
COM_COMPONENTBUILDER_FIELD_WHMCSKEY_ENCRYPTION</option>
</field>
<!-- Note_whmcs_encryption Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_whmcs_encryption" label="COM_COMPONENTBUILDER_FIELD_NOTE_WHMCS_ENCRYPTION_LABEL" description="COM_COMPONENTBUILDER_FIELD_NOTE_WHMCS_ENCRYPTION_DESCRIPTION" heading="h4" class="alert alert-success note_whmcs_encryption" />
<!-- Datalenght_other Field. Type: Text. (joomla) -->
<field
type="text"
@ -359,20 +363,19 @@
message="COM_COMPONENTBUILDER_FIELD_DATALENGHT_OTHER_MESSAGE"
hint="COM_COMPONENTBUILDER_FIELD_DATALENGHT_OTHER_HINT"
/>
<!-- Add_javascript_view_footer Field. Type: Radio. (joomla) -->
<!-- Javascript_view_footer Field. Type: Textarea. (joomla) -->
<field
type="radio"
name="add_javascript_view_footer"
label="COM_COMPONENTBUILDER_FIELD_ADD_JAVASCRIPT_VIEW_FOOTER_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_FIELD_YES</option>
<option value="0">
COM_COMPONENTBUILDER_FIELD_NO</option>
</field>
type="textarea"
name="javascript_view_footer"
label="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEW_FOOTER_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEW_FOOTER_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEW_FOOTER_HINT"
required="true"
/>
<!-- Add_css_views Field. Type: Radio. (joomla) -->
<field
type="radio"
@ -387,20 +390,19 @@
<option value="0">
COM_COMPONENTBUILDER_FIELD_NO</option>
</field>
<!-- Add_javascript_views_footer Field. Type: Radio. (joomla) -->
<!-- Javascript_views_footer Field. Type: Textarea. (joomla) -->
<field
type="radio"
name="add_javascript_views_footer"
label="COM_COMPONENTBUILDER_FIELD_ADD_JAVASCRIPT_VIEWS_FOOTER_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_FIELD_YES</option>
<option value="0">
COM_COMPONENTBUILDER_FIELD_NO</option>
</field>
type="textarea"
name="javascript_views_footer"
label="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEWS_FOOTER_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEWS_FOOTER_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEWS_FOOTER_HINT"
required="true"
/>
<!-- Datadefault Field. Type: List. (joomla) -->
<field
type="list"
@ -423,8 +425,6 @@
<option value="Other">
COM_COMPONENTBUILDER_FIELD_OTHER</option>
</field>
<!-- Helpnote Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="helpnote" label="COM_COMPONENTBUILDER_FIELD_HELPNOTE_LABEL" class="helpNote helpnote" />
<!-- Xml Field. Type: Hidden. (joomla) -->
<field
type="hidden"
@ -432,6 +432,8 @@
default="1"
filter="raw"
/>
<!-- Note_select_field_type Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_select_field_type" label="COM_COMPONENTBUILDER_FIELD_NOTE_SELECT_FIELD_TYPE_LABEL" description="COM_COMPONENTBUILDER_FIELD_NOTE_SELECT_FIELD_TYPE_DESCRIPTION" heading="h4" class="alert alert-info note_select_field_type" />
</fieldset>
<!-- Access Control Fields. -->

View File

@ -732,13 +732,13 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_field` (
KEY `idx_indexes` (`indexes`),
KEY `idx_null_switch` (`null_switch`),
KEY `idx_datadefault_other` (`datadefault_other`),
KEY `idx_datalenght` (`datalenght`),
KEY `idx_add_javascript_views_footer` (`add_javascript_views_footer`),
KEY `idx_add_javascript_view_footer` (`add_javascript_view_footer`),
KEY `idx_add_css_view` (`add_css_view`),
KEY `idx_catid` (`catid`),
KEY `idx_datalenght` (`datalenght`),
KEY `idx_datalenght_other` (`datalenght_other`),
KEY `idx_add_javascript_view_footer` (`add_javascript_view_footer`),
KEY `idx_add_css_views` (`add_css_views`),
KEY `idx_add_javascript_views_footer` (`add_javascript_views_footer`),
KEY `idx_datadefault` (`datadefault`)
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;

View File

@ -104,6 +104,9 @@ $edit = "index.php?option=com_componentbuilder&view=fields&task=field.edit";
<td class="hidden-phone">
<?php echo JText::_($item->null_switch); ?>
</td>
<td class="hidden-phone">
<?php echo JText::_($item->store); ?>
</td>
<td class="nowrap">
<?php if ($this->user->authorise('core.edit', 'com_componentbuilder.fields.category.' . (int)$item->catid)): ?>
<a href="index.php?option=com_categories&task=category.edit&id=<?php echo (int)$item->catid; ?>&extension=com_componentbuilder.fields"><?php echo $this->escape($item->category_title); ?></a>
@ -111,9 +114,6 @@ $edit = "index.php?option=com_componentbuilder&view=fields&task=field.edit";
<?php echo $this->escape($item->category_title); ?>
<?php endif; ?>
</td>
<td class="hidden-phone">
<?php echo JText::_($item->store); ?>
</td>
<td class="center">
<?php if ($canDo->get('field.edit.state')) : ?>
<?php if ($item->checked_out) : ?>

View File

@ -58,12 +58,12 @@ defined('_JEXEC') or die('Restricted access');
<th class="nowrap hidden-phone" >
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_FIELD_NULL_SWITCH_LABEL', 'null_switch', $this->listDirn, $this->listOrder); ?>
</th>
<th class="nowrap" >
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_FIELD_FIELD_CATEGORY', 'catid', $this->listDirn, $this->listOrder); ?>
</th>
<th class="nowrap hidden-phone" >
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_FIELD_STORE_LABEL', 'store', $this->listDirn, $this->listOrder); ?>
</th>
<th class="nowrap" >
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_FIELD_FIELD_CATEGORY', 'catid', $this->listDirn, $this->listOrder); ?>
</th>
<?php if ($this->canState): ?>
<th width="10" class="nowrap center" >
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_FIELD_STATUS', 'published', $this->listDirn, $this->listOrder); ?>

View File

@ -377,8 +377,8 @@ class ComponentbuilderViewFields extends JViewLegacy
'a.datatype' => JText::_('COM_COMPONENTBUILDER_FIELD_DATATYPE_LABEL'),
'a.indexes' => JText::_('COM_COMPONENTBUILDER_FIELD_INDEXES_LABEL'),
'a.null_switch' => JText::_('COM_COMPONENTBUILDER_FIELD_NULL_SWITCH_LABEL'),
'c.category_title' => JText::_('COM_COMPONENTBUILDER_FIELD_FIELD_CATEGORY'),
'a.store' => JText::_('COM_COMPONENTBUILDER_FIELD_STORE_LABEL'),
'c.category_title' => JText::_('COM_COMPONENTBUILDER_FIELD_FIELD_CATEGORY'),
'a.id' => JText::_('JGRID_HEADING_ID')
);
}

View File

@ -3428,9 +3428,9 @@ class com_componentbuilderInstallerScript
$field->type_title = 'Componentbuilder Field';
$field->type_alias = 'com_componentbuilder.field';
$field->table = '{"special": {"dbtable": "#__componentbuilder_field","key": "id","type": "Field","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
$field->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "catid","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","fieldtype":"fieldtype","datatype":"datatype","indexes":"indexes","null_switch":"null_switch","datadefault_other":"datadefault_other","css_views":"css_views","javascript_views_footer":"javascript_views_footer","javascript_view_footer":"javascript_view_footer","datalenght":"datalenght","add_css_view":"add_css_view","not_required":"not_required","css_view":"css_view","store":"store","datalenght_other":"datalenght_other","add_javascript_view_footer":"add_javascript_view_footer","add_css_views":"add_css_views","add_javascript_views_footer":"add_javascript_views_footer","datadefault":"datadefault","xml":"xml"}}';
$field->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "catid","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","fieldtype":"fieldtype","datatype":"datatype","indexes":"indexes","null_switch":"null_switch","datadefault_other":"datadefault_other","css_views":"css_views","add_javascript_views_footer":"add_javascript_views_footer","add_javascript_view_footer":"add_javascript_view_footer","store":"store","add_css_view":"add_css_view","not_required":"not_required","datalenght":"datalenght","css_view":"css_view","datalenght_other":"datalenght_other","javascript_view_footer":"javascript_view_footer","add_css_views":"add_css_views","javascript_views_footer":"javascript_views_footer","datadefault":"datadefault","xml":"xml"}}';
$field->router = 'ComponentbuilderHelperRoute::getFieldRoute';
$field->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/field.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required","xml"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","fieldtype","add_css_view","not_required","catid","store","add_javascript_view_footer","add_css_views","add_javascript_views_footer"],"displayLookup": [{"sourceColumn": "catid","targetTable": "#__categories","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "fieldtype","targetTable": "#__componentbuilder_fieldtype","targetColumn": "id","displayColumn": "name"}]}';
$field->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/field.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required","xml"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","fieldtype","add_javascript_views_footer","add_javascript_view_footer","store","add_css_view","not_required","catid","add_css_views"],"displayLookup": [{"sourceColumn": "catid","targetTable": "#__categories","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "fieldtype","targetTable": "#__componentbuilder_fieldtype","targetColumn": "id","displayColumn": "name"}]}';
// Set the object into the content types table.
$field_Inserted = $db->insertObject('#__content_types', $field);
@ -4037,9 +4037,9 @@ class com_componentbuilderInstallerScript
$field->type_title = 'Componentbuilder Field';
$field->type_alias = 'com_componentbuilder.field';
$field->table = '{"special": {"dbtable": "#__componentbuilder_field","key": "id","type": "Field","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
$field->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "catid","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","fieldtype":"fieldtype","datatype":"datatype","indexes":"indexes","null_switch":"null_switch","datadefault_other":"datadefault_other","css_views":"css_views","javascript_views_footer":"javascript_views_footer","javascript_view_footer":"javascript_view_footer","datalenght":"datalenght","add_css_view":"add_css_view","not_required":"not_required","css_view":"css_view","store":"store","datalenght_other":"datalenght_other","add_javascript_view_footer":"add_javascript_view_footer","add_css_views":"add_css_views","add_javascript_views_footer":"add_javascript_views_footer","datadefault":"datadefault","xml":"xml"}}';
$field->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "catid","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","fieldtype":"fieldtype","datatype":"datatype","indexes":"indexes","null_switch":"null_switch","datadefault_other":"datadefault_other","css_views":"css_views","add_javascript_views_footer":"add_javascript_views_footer","add_javascript_view_footer":"add_javascript_view_footer","store":"store","add_css_view":"add_css_view","not_required":"not_required","datalenght":"datalenght","css_view":"css_view","datalenght_other":"datalenght_other","javascript_view_footer":"javascript_view_footer","add_css_views":"add_css_views","javascript_views_footer":"javascript_views_footer","datadefault":"datadefault","xml":"xml"}}';
$field->router = 'ComponentbuilderHelperRoute::getFieldRoute';
$field->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/field.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required","xml"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","fieldtype","add_css_view","not_required","catid","store","add_javascript_view_footer","add_css_views","add_javascript_views_footer"],"displayLookup": [{"sourceColumn": "catid","targetTable": "#__categories","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "fieldtype","targetTable": "#__componentbuilder_fieldtype","targetColumn": "id","displayColumn": "name"}]}';
$field->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/field.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required","xml"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","fieldtype","add_javascript_views_footer","add_javascript_view_footer","store","add_css_view","not_required","catid","add_css_views"],"displayLookup": [{"sourceColumn": "catid","targetTable": "#__categories","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "fieldtype","targetTable": "#__componentbuilder_fieldtype","targetColumn": "id","displayColumn": "name"}]}';
// Check if field type is already in content_type DB.
$field_id = null;