Skip to content

Commit

Permalink
remove duplicate menutype from hathor and fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
andrepereiradasilva committed Jul 14, 2016
1 parent 162d104 commit aeaaa3a
Showing 1 changed file with 2 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
$input = JFactory::getApplication()->input;
// Checking if loaded via index.php or component.php
$tmpl = ($input->getCmd('tmpl') != '') ? '1' : '';

JFactory::getDocument()->addScriptDeclaration(
'
setmenutype = function(type) {
Expand All @@ -38,7 +39,7 @@
<dd><ul>
<?php foreach ($list as $item): ?>
<li><a class="choose_type" href="#" title="<?php echo JText::_($item->description); ?>"
onclick="javascript:setmenutype('<?php echo base64_encode(json_encode(array('id' => $this->recordId, 'title' => $item->title, 'request' => $item->request))); ?>')">
onclick="javascript:setmenutype('<?php echo base64_encode(json_encode(array('id' => $this->recordId, 'title' => (isset($item->type) ? $item->type : $item->title), 'request' => $item->request))); ?>')">
<?php echo JText::_($item->title);?>
</a>
</li>
Expand All @@ -49,32 +50,4 @@
</li>
<?php endforeach; ?>

<li><dl class="menu_type">
<dt><?php echo JText::_('COM_MENUS_TYPE_SYSTEM'); ?></dt>
<dd>
<ul>
<li><a class="choose_type" href="#" title="<?php echo JText::_('COM_MENUS_TYPE_EXTERNAL_URL_DESC'); ?>"
onclick="javascript:setmenutype('<?php echo base64_encode(json_encode(array('id' => $this->recordId, 'title' => 'url'))); ?>')">
<?php echo JText::_('COM_MENUS_TYPE_EXTERNAL_URL'); ?>
</a>
</li>
<li><a class="choose_type" href="#" title="<?php echo JText::_('COM_MENUS_TYPE_ALIAS_DESC'); ?>"
onclick="javascript:setmenutype('<?php echo base64_encode(json_encode(array('id' => $this->recordId, 'title' => 'alias'))); ?>')">
<?php echo JText::_('COM_MENUS_TYPE_ALIAS'); ?>
</a>
</li>
<li><a class="choose_type" href="#" title="<?php echo JText::_('COM_MENUS_TYPE_SEPARATOR_DESC'); ?>"
onclick="javascript:setmenutype('<?php echo base64_encode(json_encode(array('id' => $this->recordId, 'title' => 'separator'))); ?>')">
<?php echo JText::_('COM_MENUS_TYPE_SEPARATOR'); ?>
</a>
</li>
<li><a class="choose_type" href="#" title="<?php echo JText::_('COM_MENUS_TYPE_HEADING_DESC'); ?>"
onclick="javascript:setmenutype('<?php echo base64_encode(json_encode(array('id' => $this->recordId, 'title' => 'heading'))); ?>')">
<?php echo JText::_('COM_MENUS_TYPE_HEADING'); ?>
</a>
</li>
</ul>
</dd>
</dl>
</li>
</ul>

0 comments on commit aeaaa3a

Please sign in to comment.