mirror of
https://github.com/joomla-extensions/weblinks.git
synced 2024-12-26 10:07:30 +00:00
fix some smal things
This commit is contained in:
parent
db0bfa95b9
commit
9b30cedb4d
@ -16,7 +16,7 @@ JLoader::register('WeblinksHelper', JPATH_ADMINISTRATOR . '/components/com_webli
|
|||||||
/**
|
/**
|
||||||
* Weblink HTML helper class.
|
* Weblink HTML helper class.
|
||||||
*
|
*
|
||||||
* @since 1.6
|
* @since __DELPOY_VERSION__
|
||||||
*/
|
*/
|
||||||
abstract class JHtmlWeblink
|
abstract class JHtmlWeblink
|
||||||
{
|
{
|
||||||
@ -28,14 +28,17 @@ abstract class JHtmlWeblink
|
|||||||
* @return string The language HTML
|
* @return string The language HTML
|
||||||
*
|
*
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
*
|
||||||
|
* @since __DELPOY_VERSION__
|
||||||
*/
|
*/
|
||||||
public static function association($weblinkid)
|
public static function association($weblinkid)
|
||||||
{
|
{
|
||||||
// Defaults
|
// Defaults
|
||||||
$html = '';
|
$html = '';
|
||||||
|
$associations = JLanguageAssociations::getAssociations('com_weblinks', '#__weblinks', 'com_weblinks.item', $weblinkid);
|
||||||
|
|
||||||
// Get the associations
|
// Get the associations
|
||||||
if ($associations = JLanguageAssociations::getAssociations('com_weblinks', '#__weblinks', 'com_weblinks.item', $weblinkid))
|
if ($associations)
|
||||||
{
|
{
|
||||||
foreach ($associations as $tag => $associated)
|
foreach ($associations as $tag => $associated)
|
||||||
{
|
{
|
||||||
|
@ -90,18 +90,8 @@
|
|||||||
<option value="access_level DESC">JGRID_HEADING_ACCESS_DESC</option>
|
<option value="access_level DESC">JGRID_HEADING_ACCESS_DESC</option>
|
||||||
<option value="a.hits ASC">JGLOBAL_HITS_ASC</option>
|
<option value="a.hits ASC">JGLOBAL_HITS_ASC</option>
|
||||||
<option value="a.hits DESC">JGLOBAL_HITS_DESC</option>
|
<option value="a.hits DESC">JGLOBAL_HITS_DESC</option>
|
||||||
<option
|
<option value="association ASC" requires="associations">JASSOCIATIONS_ASC</option>
|
||||||
value="association ASC"
|
<option value="association DESC" requires="associations">JASSOCIATIONS_DESC</option>
|
||||||
requires="associations"
|
|
||||||
>
|
|
||||||
JASSOCIATIONS_ASC
|
|
||||||
</option>
|
|
||||||
<option
|
|
||||||
value="association DESC"
|
|
||||||
requires="associations"
|
|
||||||
>
|
|
||||||
JASSOCIATIONS_DESC
|
|
||||||
</option>
|
|
||||||
<option value="language_title ASC">JGRID_HEADING_LANGUAGE_ASC</option>
|
<option value="language_title ASC">JGRID_HEADING_LANGUAGE_ASC</option>
|
||||||
<option value="language_title DESC">JGRID_HEADING_LANGUAGE_DESC</option>
|
<option value="language_title DESC">JGRID_HEADING_LANGUAGE_DESC</option>
|
||||||
<option value="a.id ASC">JGRID_HEADING_ID_ASC</option>
|
<option value="a.id ASC">JGRID_HEADING_ID_ASC</option>
|
||||||
|
@ -32,7 +32,7 @@ class WeblinksModelWeblink extends JModelAdmin
|
|||||||
* The context used for the associations table
|
* The context used for the associations table
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 3.4.4
|
* @since __DEPLOY_VERSION__
|
||||||
*/
|
*/
|
||||||
protected $associationsContext = 'com_weblinks.item';
|
protected $associationsContext = 'com_weblinks.item';
|
||||||
|
|
||||||
@ -211,7 +211,6 @@ class WeblinksModelWeblink extends JModelAdmin
|
|||||||
$item->images = $registry->toArray();
|
$item->images = $registry->toArray();
|
||||||
|
|
||||||
// Load associated web links items
|
// Load associated web links items
|
||||||
$app = JFactory::getApplication();
|
|
||||||
$assoc = JLanguageAssociations::isEnabled();
|
$assoc = JLanguageAssociations::isEnabled();
|
||||||
|
|
||||||
if ($assoc)
|
if ($assoc)
|
||||||
|
@ -54,6 +54,7 @@ class WeblinksModelWeblinks extends JModelList
|
|||||||
);
|
);
|
||||||
|
|
||||||
$assoc = JLanguageAssociations::isEnabled();
|
$assoc = JLanguageAssociations::isEnabled();
|
||||||
|
|
||||||
if ($assoc)
|
if ($assoc)
|
||||||
{
|
{
|
||||||
$config['filter_fields'][] = 'association';
|
$config['filter_fields'][] = 'association';
|
||||||
|
@ -84,7 +84,7 @@ $tmpl = $isModal || $input->get('tmpl', '', 'cmd') === 'component' ? '&tmpl=c
|
|||||||
|
|
||||||
<?php echo JLayoutHelper::render('joomla.edit.params', $this); ?>
|
<?php echo JLayoutHelper::render('joomla.edit.params', $this); ?>
|
||||||
|
|
||||||
<?php if ( ! $isModal && $assoc) : ?>
|
<?php if (!$isModal && $assoc) : ?>
|
||||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'associations', JText::_('JGLOBAL_FIELDSET_ASSOCIATIONS')); ?>
|
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'associations', JText::_('JGLOBAL_FIELDSET_ASSOCIATIONS')); ?>
|
||||||
<?php echo $this->loadTemplate('associations'); ?>
|
<?php echo $this->loadTemplate('associations'); ?>
|
||||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||||
|
@ -7,7 +7,9 @@
|
|||||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
*/
|
*/
|
||||||
defined('_JEXEC') or die;
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
$app = JFactory::getApplication();
|
$app = JFactory::getApplication();
|
||||||
|
|
||||||
if ($app->isClient('site'))
|
if ($app->isClient('site'))
|
||||||
{
|
{
|
||||||
JSession::checkToken('get') or die(JText::_('JINVALID_TOKEN'));
|
JSession::checkToken('get') or die(JText::_('JINVALID_TOKEN'));
|
||||||
@ -26,23 +28,27 @@ JHtml::_('formbehavior.chosen', 'select');
|
|||||||
// Special case for the search field tooltip.
|
// Special case for the search field tooltip.
|
||||||
$searchFilterDesc = $this->filterForm->getFieldAttribute('search', 'description', null, 'filter');
|
$searchFilterDesc = $this->filterForm->getFieldAttribute('search', 'description', null, 'filter');
|
||||||
JHtml::_('bootstrap.tooltip', '#filter_search', array('title' => JText::_($searchFilterDesc), 'placement' => 'bottom'));
|
JHtml::_('bootstrap.tooltip', '#filter_search', array('title' => JText::_($searchFilterDesc), 'placement' => 'bottom'));
|
||||||
|
|
||||||
$function = $app->input->getCmd('function', 'jSelectWeblink');
|
$function = $app->input->getCmd('function', 'jSelectWeblink');
|
||||||
$editor = $app->input->getCmd('editor', '');
|
$editor = $app->input->getCmd('editor', '');
|
||||||
$listOrder = $this->escape($this->state->get('list.ordering'));
|
$listOrder = $this->escape($this->state->get('list.ordering'));
|
||||||
$listDirn = $this->escape($this->state->get('list.direction'));
|
$listDirn = $this->escape($this->state->get('list.direction'));
|
||||||
$onclick = $this->escape($function);
|
$onclick = $this->escape($function);
|
||||||
|
|
||||||
if (!empty($editor))
|
if (!empty($editor))
|
||||||
{
|
{
|
||||||
// This view is used also in com_menus. Load the xtd script only if the editor is set!
|
// This view is used also in com_menus. Load the xtd script only if the editor is set!
|
||||||
JFactory::getDocument()->addScriptOptions('xtd-weblinks', array('editor' => $editor));
|
JFactory::getDocument()->addScriptOptions('xtd-weblinks', array('editor' => $editor));
|
||||||
$onclick = "jSelectWeblink";
|
$onclick = "jSelectWeblink";
|
||||||
}
|
}
|
||||||
|
|
||||||
$iconStates = array(
|
$iconStates = array(
|
||||||
-2 => 'icon-trash',
|
-2 => 'icon-trash',
|
||||||
0 => 'icon-unpublish',
|
0 => 'icon-unpublish',
|
||||||
1 => 'icon-publish',
|
1 => 'icon-publish',
|
||||||
2 => 'icon-archive',
|
2 => 'icon-archive',
|
||||||
);
|
);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<div class="container-popup">
|
<div class="container-popup">
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user