Made some changes to insure JCB is stable in PHP7, removed the related translations string from joomla_component view to speed up page load.
This commit is contained in:
@@ -64,7 +64,7 @@ class ComponentbuilderViewFieldtype extends JViewLegacy
|
||||
}
|
||||
|
||||
// Get Linked view data
|
||||
$this->wadfields = $this->get('Wadfields');
|
||||
$this->wacfields = $this->get('Wacfields');
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
|
@@ -86,6 +86,9 @@ $edit = "index.php?option=com_componentbuilder&view=fieldtypes&task=fieldtype.ed
|
||||
<div class="name"><?php echo $this->escape($item->name); ?></div>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="hidden-phone">
|
||||
<?php echo $this->escape($item->short_description); ?>
|
||||
</td>
|
||||
<td class="nowrap">
|
||||
<?php if ($this->user->authorise('core.edit', 'com_componentbuilder.fieldtypes.category.' . (int)$item->catid)): ?>
|
||||
<a href="index.php?option=com_categories&task=category.edit&id=<?php echo (int)$item->catid; ?>&extension=com_componentbuilder.fieldtypes"><?php echo $this->escape($item->category_title); ?></a>
|
||||
@@ -93,9 +96,6 @@ $edit = "index.php?option=com_componentbuilder&view=fieldtypes&task=fieldtype.ed
|
||||
<?php echo $this->escape($item->category_title); ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="hidden-phone">
|
||||
<?php echo $this->escape($item->short_description); ?>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php if ($canDo->get('fieldtype.edit.state')) : ?>
|
||||
<?php if ($item->checked_out) : ?>
|
||||
|
@@ -46,12 +46,12 @@ defined('_JEXEC') or die('Restricted access');
|
||||
<th class="nowrap" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_FIELDTYPE_NAME_LABEL', 'name', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<th class="nowrap" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_FIELDTYPE_FIELDTYPE_CATEGORY', 'catid', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<th class="nowrap hidden-phone" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_FIELDTYPE_SHORT_DESCRIPTION_LABEL', 'short_description', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<th class="nowrap" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_FIELDTYPE_FIELDTYPE_CATEGORY', 'catid', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<?php if ($this->canState): ?>
|
||||
<th width="10" class="nowrap center" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_FIELDTYPE_STATUS', 'published', $this->listDirn, $this->listOrder); ?>
|
||||
|
@@ -263,8 +263,8 @@ class ComponentbuilderViewFieldtypes extends JViewLegacy
|
||||
'a.sorting' => JText::_('JGRID_HEADING_ORDERING'),
|
||||
'a.published' => JText::_('JSTATUS'),
|
||||
'a.name' => JText::_('COM_COMPONENTBUILDER_FIELDTYPE_NAME_LABEL'),
|
||||
'c.category_title' => JText::_('COM_COMPONENTBUILDER_FIELDTYPE_FIELDTYPE_CATEGORY'),
|
||||
'a.short_description' => JText::_('COM_COMPONENTBUILDER_FIELDTYPE_SHORT_DESCRIPTION_LABEL'),
|
||||
'c.category_title' => JText::_('COM_COMPONENTBUILDER_FIELDTYPE_FIELDTYPE_CATEGORY'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
|
@@ -187,18 +187,6 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
</div>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
|
||||
<?php if ($this->canDo->get('language_translation.access')) : ?>
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'joomla_componentTab', 'translation', JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_TRANSLATION', true)); ?>
|
||||
<div class="row-fluid form-horizontal-desktop">
|
||||
</div>
|
||||
<div class="row-fluid form-horizontal-desktop">
|
||||
<div class="span12">
|
||||
<?php echo JLayoutHelper::render('joomla_component.translation_fullwidth', $this); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->canDo->get('joomla_component.delete') || $this->canDo->get('joomla_component.edit.created_by') || $this->canDo->get('joomla_component.edit.state') || $this->canDo->get('joomla_component.edit.created')) : ?>
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'joomla_componentTab', 'publishing', JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PUBLISHING', true)); ?>
|
||||
<div class="row-fluid form-horizontal-desktop">
|
||||
|
@@ -61,10 +61,7 @@ class ComponentbuilderViewJoomla_component extends JViewLegacy
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
|
||||
// Get Linked view data
|
||||
$this->vwntranslation = $this->get('Vwntranslation');
|
||||
}
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
@@ -199,17 +196,7 @@ class ComponentbuilderViewJoomla_component extends JViewLegacy
|
||||
$this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NEW' : 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EDIT'));
|
||||
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/joomla_component.css", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');
|
||||
// Add Ajax Token
|
||||
$this->document->addScriptDeclaration("var token = '".JSession::getFormToken()."';");
|
||||
|
||||
// Add the CSS for Footable
|
||||
$this->document->addStyleSheet('https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css');
|
||||
$this->document->addStyleSheet(JURI::root() .'media/com_componentbuilder/footable-v3/css/footable.standalone.min.css', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');
|
||||
// Add the JavaScript for Footable (adding all funtions)
|
||||
$this->document->addScript(JURI::root() .'media/com_componentbuilder/footable-v3/js/footable.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');
|
||||
|
||||
$footable = "jQuery(document).ready(function() { jQuery(function () { jQuery('.footable').footable();});});";
|
||||
$this->document->addScriptDeclaration($footable);
|
||||
|
||||
$this->document->addScriptDeclaration("var token = '".JSession::getFormToken()."';");
|
||||
$this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');
|
||||
$this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/joomla_component/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');
|
||||
|
||||
|
@@ -64,7 +64,7 @@ class ComponentbuilderViewServer extends JViewLegacy
|
||||
}
|
||||
|
||||
// Get Linked view data
|
||||
$this->wanlinked_components = $this->get('Wanlinked_components');
|
||||
$this->wamlinked_components = $this->get('Wamlinked_components');
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
|
Reference in New Issue
Block a user