| Current Path : /home/w/u/e/wuectly/www/03cbe/ |
| Current File : /home/w/u/e/wuectly/www/03cbe/module.tar |
module.xml 0000604 00000001422 15245551650 0006556 0 ustar 00 <?xml version="1.0" encoding="utf-8"?>
<extension version="3.6" type="plugin" group="editors-xtd" method="upgrade">
<name>plg_editors-xtd_module</name>
<author>Joomla! Project</author>
<creationDate>October 2015</creationDate>
<copyright>(C) 2015 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
<version>3.5.0</version>
<description>PLG_MODULE_XML_DESCRIPTION</description>
<files>
<filename plugin="module">module.php</filename>
</files>
<languages>
<language tag="en-GB">en-GB.plg_editors-xtd_module.ini</language>
<language tag="en-GB">en-GB.plg_editors-xtd_module.sys.ini</language>
</languages>
</extension>
module.php 0000604 00000002702 15245551650 0006547 0 ustar 00 <?php
/**
* @package Joomla.Plugin
* @subpackage Editors-xtd.module
*
* @copyright (C) 2015 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* Editor Module button
*
* @since 3.5
*/
class PlgButtonModule extends JPlugin
{
/**
* Load the language file on instantiation.
*
* @var boolean
* @since 3.5
*/
protected $autoloadLanguage = true;
/**
* Display the button
*
* @param string $name The name of the button to add
*
* @return JObject The button options as JObject
*
* @since 3.5
*/
public function onDisplay($name)
{
/*
* Use the built-in element view to select the module.
* Currently uses blank class.
*/
$user = JFactory::getUser();
if ($user->authorise('core.create', 'com_modules')
|| $user->authorise('core.edit', 'com_modules')
|| $user->authorise('core.edit.own', 'com_modules'))
{
$link = 'index.php?option=com_modules&view=modules&layout=modal&tmpl=component&editor='
. $name . '&' . JSession::getFormToken() . '=1';
$button = new JObject;
$button->modal = true;
$button->class = 'btn';
$button->link = $link;
$button->text = JText::_('PLG_MODULE_BUTTON_MODULE');
$button->name = 'file-add';
$button->options = "{handler: 'iframe', size: {x: 800, y: 500}}";
return $button;
}
}
}
view.html.php 0000604 00000005445 15245625302 0007202 0 ustar 00 <?php
/**
* @package Joomla.Administrator
* @subpackage com_modules
*
* @copyright (C) 2008 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* View to edit a module.
*
* @since 1.6
*/
class ModulesViewModule extends JViewLegacy
{
protected $form;
protected $item;
protected $state;
/**
* Display the view
*
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return void
*/
public function display($tpl = null)
{
$this->form = $this->get('Form');
$this->item = $this->get('Item');
$this->state = $this->get('State');
$this->canDo = JHelperContent::getActions('com_modules', 'module', $this->item->id);
// Check for errors.
if (count($errors = $this->get('Errors')))
{
throw new Exception(implode("\n", $errors), 500);
}
$this->addToolbar();
parent::display($tpl);
}
/**
* Add the page title and toolbar.
*
* @return void
*
* @since 1.6
*/
protected function addToolbar()
{
JFactory::getApplication()->input->set('hidemainmenu', true);
$user = JFactory::getUser();
$isNew = ($this->item->id == 0);
$checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
$canDo = $this->canDo;
JToolbarHelper::title(JText::sprintf('COM_MODULES_MANAGER_MODULE', JText::_($this->item->module)), 'cube module');
// For new records, check the create permission.
if ($isNew && $canDo->get('core.create'))
{
JToolbarHelper::apply('module.apply');
JToolbarHelper::save('module.save');
JToolbarHelper::save2new('module.save2new');
JToolbarHelper::cancel('module.cancel');
}
else
{
// Can't save the record if it's checked out.
if (!$checkedOut)
{
// Since it's an existing record, check the edit permission.
if ($canDo->get('core.edit'))
{
JToolbarHelper::apply('module.apply');
JToolbarHelper::save('module.save');
// We can save this record, but check the create permission to see if we can return to make a new one.
if ($canDo->get('core.create'))
{
JToolbarHelper::save2new('module.save2new');
}
}
}
// If checked out, we can still save
if ($canDo->get('core.create'))
{
JToolbarHelper::save2copy('module.save2copy');
}
JToolbarHelper::cancel('module.cancel', 'JTOOLBAR_CLOSE');
}
// Get the help information for the menu item.
$lang = JFactory::getLanguage();
$help = $this->get('Help');
if ($lang->hasKey($help->url))
{
$debug = $lang->setDebug(false);
$url = JText::_($help->url);
$lang->setDebug($debug);
}
else
{
$url = null;
}
JToolbarHelper::help($help->key, false, $url);
}
}
view.json.php 0000604 00000002030 15245625302 0007172 0 ustar 00 <?php
/**
* @package Joomla.Administrator
* @subpackage com_modules
*
* @copyright (C) 2014 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* View to edit a module.
*
* @package Joomla.Administrator
* @subpackage com_templates
* @since 3.2
*/
class ModulesViewModule extends JViewLegacy
{
protected $item;
protected $form;
protected $state;
/**
* Display the view
*
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return void
*/
public function display($tpl = null)
{
$app = JFactory::getApplication();
try
{
$this->item = $this->get('Item');
}
catch (Exception $e)
{
$app->enqueueMessage($e->getMessage(), 'error');
return false;
}
$paramsList = $this->item->getProperties();
unset($paramsList['xml']);
$paramsList = json_encode($paramsList);
return $paramsList;
}
}
tmpl/edit.php 0000604 00000025414 15245625302 0007164 0 ustar 00 <?php
/**
* @package Joomla.Administrator
* @subpackage com_modules
*
* @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
JHtml::_('behavior.formvalidator');
JHtml::_('behavior.combobox');
JHtml::_('behavior.keepalive');
JHtml::_('formbehavior.chosen', '#jform_position', null, array('disable_search_threshold' => 0 ));
JHtml::_('formbehavior.chosen', '.multipleCategories', null, array('placeholder_text_multiple' => JText::_('JOPTION_SELECT_CATEGORY')));
JHtml::_('formbehavior.chosen', '.multipleTags', null, array('placeholder_text_multiple' => JText::_('JOPTION_SELECT_TAG')));
JHtml::_('formbehavior.chosen', '.multipleAuthors', null, array('placeholder_text_multiple' => JText::_('JOPTION_SELECT_AUTHOR')));
JHtml::_('formbehavior.chosen', '.multipleAuthorAliases', null, array('placeholder_text_multiple' => JText::_('JOPTION_SELECT_AUTHOR_ALIAS')));
JHtml::_('formbehavior.chosen', 'select');
$hasContent = isset($this->item->xml->customContent);
$hasContentFieldName = 'content';
// For a later improvement
if ($hasContent)
{
$hasContentFieldName = 'content';
}
// Get Params Fieldsets
$this->fieldsets = $this->form->getFieldsets('params');
$script = "
Joomla.submitbutton = function(task) {
if (task == 'module.cancel' || document.formvalidator.isValid(document.getElementById('module-form')))
{
";
if ($hasContent)
{
$script .= $this->form->getField($hasContentFieldName)->save();
}
$script .= "
Joomla.submitform(task, document.getElementById('module-form'));
jQuery('#permissions-sliders select').attr('disabled', 'disabled');
if (self != top)
{
if (parent.viewLevels)
{
var updPosition = jQuery('#jform_position').chosen().val(),
updTitle = jQuery('#jform_title').val(),
updMenus = jQuery('#jform_assignment').chosen().val(),
updStatus = jQuery('#jform_published').chosen().val(),
updAccess = jQuery('#jform_access').chosen().val(),
tmpMenu = jQuery('#menus-" . $this->item->id . "', parent.document),
tmpRow = jQuery('#tr-" . $this->item->id . "', parent.document);
tmpStatus = jQuery('#status-" . $this->item->id . "', parent.document);
window.parent.inMenus = new Array();
window.parent.numMenus = jQuery(':input[name=\"jform[assigned][]\"]').length;
jQuery('input[name=\"jform[assigned][]\"]').each(function(){
if (updMenus > 0 )
{
if (jQuery(this).is(':checked'))
{
window.parent.inMenus.push(parseInt(jQuery(this).val()));
}
}
if (updMenus < 0 )
{
if (!jQuery(this).is(':checked'))
{
window.parent.inMenus.push(parseInt(jQuery(this).val()));
}
}
});
if (updMenus == 0) {
tmpMenu.html('<span class=\"label label-info\">" . JText::_('JALL') . "</span>');
if (tmpRow.hasClass('no')) { tmpRow.removeClass('no '); }
}
if (updMenus == '-') {
tmpMenu.html('<span class=\"label label-important\">" . JText::_('JNO') . "</span>');
if (!tmpRow.hasClass('no') || tmpRow.hasClass('')) { tmpRow.addClass('no '); }
}
if (updMenus > 0) {
if (window.parent.inMenus.indexOf(parent.menuId) >= 0)
{
if (window.parent.numMenus == window.parent.inMenus.length)
{
tmpMenu.html('<span class=\"label label-info\">" . JText::_('JALL') . "</span>');
if (tmpRow.hasClass('no') || tmpRow.hasClass('')) { tmpRow.removeClass('no'); }
}
else
{
tmpMenu.html('<span class=\"label label-success\">" . JText::_('JYES') . "</span>');
if (tmpRow.hasClass('no')) { tmpRow.removeClass('no'); }
}
}
if (window.parent.inMenus.indexOf(parent.menuId) < 0)
{
tmpMenu.html('<span class=\"label label-important\">" . JText::_('JNO') . "</span>');
if (!tmpRow.hasClass('no')) { tmpRow.addClass('no'); }
}
}
if (updMenus < 0) {
if (window.parent.inMenus.indexOf(parent.menuId) >= 0)
{
if (window.parent.numMenus == window.parent.inMenus.length)
{
tmpMenu.html('<span class=\"label label-info\">" . JText::_('JALL') . "</span>');
if (tmpRow.hasClass('no')) { tmpRow.removeClass('no'); }
}
else
{
tmpMenu.html('<span class=\"label label-success\">" . JText::_('JYES') . "</span>');
if (tmpRow.hasClass('no')) { tmpRow.removeClass('no'); }
}
}
if (window.parent.inMenus.indexOf(parent.menuId) < 0)
{
tmpMenu.html('<span class=\"label label-important\">" . JText::_('JNO') . "</span>');
if (!tmpRow.hasClass('no') || tmpRow.hasClass('')) { tmpRow.addClass('no'); }
}
}
if (updStatus == 1) {
tmpStatus.html('<span class=\"label label-success\">" . JText::_('JYES') . "</span>');
if (tmpRow.hasClass('unpublished')) { tmpRow.removeClass('unpublished '); }
}
if (updStatus == 0) {
tmpStatus.html('<span class=\"label label-important\">" . JText::_('JNO') . "</span>');
if (!tmpRow.hasClass('unpublished') || tmpRow.hasClass('')) { tmpRow.addClass('unpublished'); }
}
if (updStatus == -2) {
tmpStatus.html('<span class=\"label label-default\">" . JText::_('JTRASHED') . "</span>');
if (!tmpRow.hasClass('unpublished') || tmpRow.hasClass('')) { tmpRow.addClass('unpublished'); }
}
if (document.formvalidator.isValid(document.getElementById('module-form'))) {
jQuery('#title-" . $this->item->id . "', parent.document).text(updTitle);
jQuery('#position-" . $this->item->id . "', parent.document).text(updPosition);
jQuery('#access-" . $this->item->id . "', parent.document).html(parent.viewLevels[updAccess]);
}
}
}
if (task !== 'module.apply')
{
window.parent.jQuery('#module" . ((int) $this->item->id == 0 ? 'Add' : 'Edit' . (int) $this->item->id) . "Modal').modal('hide');
}
}
};";
JFactory::getDocument()->addScriptDeclaration($script);
$input = JFactory::getApplication()->input;
// In case of modal
$isModal = $input->get('layout') == 'modal' ? true : false;
$layout = $isModal ? 'modal' : 'edit';
$tmpl = $isModal || $input->get('tmpl', '', 'cmd') === 'component' ? '&tmpl=component' : '';
?>
<form action="<?php echo JRoute::_('index.php?option=com_modules&layout=' . $layout . $tmpl . '&id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="module-form" class="form-validate">
<?php echo JLayoutHelper::render('joomla.edit.title_alias', $this); ?>
<div class="form-horizontal">
<?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'general')); ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'general', JText::_('COM_MODULES_MODULE')); ?>
<div class="row-fluid">
<div class="span9">
<?php if ($this->item->xml) : ?>
<?php if ($this->item->xml->description) : ?>
<h2>
<?php
if ($this->item->xml)
{
echo ($text = (string) $this->item->xml->name) ? JText::_($text) : $this->item->module;
}
else
{
echo JText::_('COM_MODULES_ERR_XML');
}
?>
</h2>
<div class="info-labels">
<span class="label hasTooltip" title="<?php echo JHtml::_('tooltipText', 'COM_MODULES_FIELD_CLIENT_ID_LABEL'); ?>">
<?php echo $this->item->client_id == 0 ? JText::_('JSITE') : JText::_('JADMINISTRATOR'); ?>
</span>
</div>
<div>
<?php
$short_description = JText::_($this->item->xml->description);
$this->fieldset = 'description';
$long_description = JLayoutHelper::render('joomla.edit.fieldset', $this);
if (!$long_description) {
$truncated = JHtml::_('string.truncate', $short_description, 550, true, false);
if (strlen($truncated) > 500) {
$long_description = $short_description;
$short_description = JHtml::_('string.truncate', $truncated, 250);
if ($short_description == $long_description) {
$long_description = '';
}
}
}
?>
<p><?php echo $short_description; ?></p>
<?php if ($long_description) : ?>
<p class="readmore">
<a href="#" onclick="jQuery('.nav-tabs a[href=\'#description\']').tab('show');">
<?php echo JText::_('JGLOBAL_SHOW_FULL_DESCRIPTION'); ?>
</a>
</p>
<?php endif; ?>
</div>
<?php endif; ?>
<?php else : ?>
<div class="alert alert-error"><?php echo JText::_('COM_MODULES_ERR_XML'); ?></div>
<?php endif; ?>
<?php
if ($hasContent)
{
echo $this->form->getInput($hasContentFieldName);
}
$this->fieldset = 'basic';
$html = JLayoutHelper::render('joomla.edit.fieldset', $this);
echo $html ? '<hr />' . $html : '';
?>
</div>
<div class="span3">
<fieldset class="form-vertical">
<?php echo $this->form->renderField('showtitle'); ?>
<div class="control-group">
<div class="control-label">
<?php echo $this->form->getLabel('position'); ?>
</div>
<div class="controls">
<?php echo $this->loadTemplate('positions'); ?>
</div>
</div>
</fieldset>
<?php
// Set main fields.
$this->fields = array(
'published',
'publish_up',
'publish_down',
'access',
'ordering',
'language',
'note'
);
?>
<?php echo JLayoutHelper::render('joomla.edit.global', $this); ?>
</div>
</div>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php if (isset($long_description) && $long_description != '') : ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'description', JText::_('JGLOBAL_FIELDSET_DESCRIPTION')); ?>
<?php echo $long_description; ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php endif; ?>
<?php if ($this->item->client_id == 0) : ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'assignment', JText::_('COM_MODULES_MENU_ASSIGNMENT')); ?>
<?php echo $this->loadTemplate('assignment'); ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php endif; ?>
<?php
$this->fieldsets = array();
$this->ignore_fieldsets = array('basic', 'description');
echo JLayoutHelper::render('joomla.edit.params', $this);
?>
<?php if ($this->canDo->get('core.admin')) : ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'permissions', JText::_('COM_MODULES_FIELDSET_RULES')); ?>
<?php echo $this->form->getInput('rules'); ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php endif; ?>
<?php echo JHtml::_('bootstrap.endTabSet'); ?>
<input type="hidden" name="task" value="" />
<?php echo JHtml::_('form.token'); ?>
<?php echo $this->form->getInput('module'); ?>
<?php echo $this->form->getInput('client_id'); ?>
</div>
</form>
tmpl/edit_assignment.php 0000604 00000015315 15245625302 0011413 0 ustar 00 <?php
/**
* @package Joomla.Administrator
* @subpackage com_modules
*
* @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
// Initialise related data.
JLoader::register('MenusHelper', JPATH_ADMINISTRATOR . '/components/com_menus/helpers/menus.php');
$menuTypes = MenusHelper::getMenuLinks();
JHtml::_('script', 'jui/treeselectmenu.jquery.min.js', array('version' => 'auto', 'relative' => true));
$script = "
jQuery(document).ready(function()
{
menuHide(jQuery('#jform_assignment').val());
jQuery('#jform_assignment').change(function()
{
menuHide(jQuery(this).val());
})
});
function menuHide(val)
{
if (val == 0 || val == '-')
{
jQuery('#menuselect-group').hide();
}
else
{
jQuery('#menuselect-group').show();
}
}
";
// Add the script to the document head
JFactory::getDocument()->addScriptDeclaration($script);
?>
<div class="control-group">
<label id="jform_menus-lbl" class="control-label" for="jform_menus"><?php echo JText::_('COM_MODULES_MODULE_ASSIGN'); ?></label>
<div id="jform_menus" class="controls">
<select name="jform[assignment]" id="jform_assignment">
<?php echo JHtml::_('select.options', ModulesHelper::getAssignmentOptions($this->item->client_id), 'value', 'text', $this->item->assignment, true); ?>
</select>
</div>
</div>
<div id="menuselect-group" class="control-group">
<label id="jform_menuselect-lbl" class="control-label" for="jform_menuselect"><?php echo JText::_('JGLOBAL_MENU_SELECTION'); ?></label>
<div id="jform_menuselect" class="controls">
<?php if (!empty($menuTypes)) : ?>
<?php $id = 'jform_menuselect'; ?>
<div class="well well-small">
<div class="form-inline">
<span class="small"><?php echo JText::_('JSELECT'); ?>:
<a id="treeCheckAll" href="javascript://"><?php echo JText::_('JALL'); ?></a>,
<a id="treeUncheckAll" href="javascript://"><?php echo JText::_('JNONE'); ?></a>
</span>
<span class="width-20">|</span>
<span class="small"><?php echo JText::_('COM_MODULES_EXPAND'); ?>:
<a id="treeExpandAll" href="javascript://"><?php echo JText::_('JALL'); ?></a>,
<a id="treeCollapseAll" href="javascript://"><?php echo JText::_('JNONE'); ?></a>
</span>
<input type="text" id="treeselectfilter" name="treeselectfilter" class="input-medium search-query pull-right" size="16"
autocomplete="off" placeholder="<?php echo JText::_('JSEARCH_FILTER'); ?>" aria-invalid="false" tabindex="-1">
</div>
<div class="clearfix"></div>
<hr class="hr-condensed" />
<ul class="treeselect">
<?php foreach ($menuTypes as &$type) : ?>
<?php if (count($type->links)) : ?>
<?php $prevlevel = 0; ?>
<li>
<div class="treeselect-item pull-left">
<label class="pull-left nav-header"><?php echo $type->title; ?></label></div>
<?php foreach ($type->links as $i => $link) : ?>
<?php
if ($prevlevel < $link->level)
{
echo '<ul class="treeselect-sub">';
} elseif ($prevlevel > $link->level)
{
echo str_repeat('</li></ul>', $prevlevel - $link->level);
} else {
echo '</li>';
}
$selected = 0;
if ($this->item->assignment == 0)
{
$selected = 1;
} elseif ($this->item->assignment < 0)
{
$selected = in_array(-$link->value, $this->item->assigned);
} elseif ($this->item->assignment > 0)
{
$selected = in_array($link->value, $this->item->assigned);
}
?>
<li>
<div class="treeselect-item pull-left">
<?php
$uselessMenuItem = in_array($link->type, array('separator', 'heading', 'alias', 'url'));
?>
<input type="checkbox" class="pull-left novalidate" name="jform[assigned][]" id="<?php echo $id . $link->value; ?>" value="<?php echo (int) $link->value; ?>"<?php echo $selected ? ' checked="checked"' : ''; echo $uselessMenuItem ? ' disabled="disabled"' : ''; ?> />
<label for="<?php echo $id . $link->value; ?>" class="pull-left">
<?php echo $link->text; ?> <span class="small"><?php echo JText::sprintf('JGLOBAL_LIST_ALIAS', $this->escape($link->alias)); ?></span>
<?php if (JLanguageMultilang::isEnabled() && $link->language != '' && $link->language != '*') : ?>
<?php if ($link->language_image) : ?>
<?php echo JHtml::_('image', 'mod_languages/' . $link->language_image . '.gif', $link->language_title, array('title' => $link->language_title), true); ?>
<?php else : ?>
<?php echo '<span class="label" title="' . $link->language_title . '">' . $link->language_sef . '</span>'; ?>
<?php endif; ?>
<?php endif; ?>
<?php if ($link->published == 0) : ?>
<?php echo ' <span class="label">' . JText::_('JUNPUBLISHED') . '</span>'; ?>
<?php endif; ?>
<?php if ($uselessMenuItem) : ?>
<?php echo ' <span class="label">' . JText::_('COM_MODULES_MENU_ITEM_' . strtoupper($link->type)) . '</span>'; ?>
<?php endif; ?>
</label>
</div>
<?php
if (!isset($type->links[$i + 1]))
{
echo str_repeat('</li></ul>', $link->level);
}
$prevlevel = $link->level;
?>
<?php endforeach; ?>
</li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
<div id="noresultsfound" style="display:none;" class="alert alert-no-items">
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div>
<div style="display:none;" id="treeselectmenu">
<div class="pull-left nav-hover treeselect-menu">
<div class="btn-group">
<a href="#" data-toggle="dropdown" class="dropdown-toggle btn btn-micro">
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li class="nav-header"><?php echo JText::_('COM_MODULES_SUBITEMS'); ?></li>
<li class="divider"></li>
<li class=""><a class="checkall" href="javascript://"><span class="icon-checkbox" aria-hidden="true"></span> <?php echo JText::_('JSELECT'); ?></a>
</li>
<li><a class="uncheckall" href="javascript://"><span class="icon-checkbox-unchecked" aria-hidden="true"></span> <?php echo JText::_('COM_MODULES_DESELECT'); ?></a>
</li>
<div class="treeselect-menu-expand">
<li class="divider"></li>
<li><a class="expandall" href="javascript://"><span class="icon-plus" aria-hidden="true"></span> <?php echo JText::_('COM_MODULES_EXPAND'); ?></a></li>
<li><a class="collapseall" href="javascript://"><span class="icon-minus" aria-hidden="true"></span> <?php echo JText::_('COM_MODULES_COLLAPSE'); ?></a></li>
</div>
</ul>
</div>
</div>
</div>
</div>
<?php endif; ?>
</div>
</div>
tmpl/modal.php 0000604 00000001415 15245625302 0007326 0 ustar 00 <?php
/**
* @package Joomla.Administrator
* @subpackage com_modules
*
* @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
JHtml::_('bootstrap.tooltip', '.hasTooltip', array('placement' => 'bottom'));
?>
<button id="applyBtn" type="button" class="hidden" onclick="Joomla.submitbutton('module.apply');"></button>
<button id="saveBtn" type="button" class="hidden" onclick="Joomla.submitbutton('module.save');"></button>
<button id="closeBtn" type="button" class="hidden" onclick="Joomla.submitbutton('module.cancel');"></button>
<div class="container-popup">
<?php $this->setLayout('edit'); ?>
<?php echo $this->loadTemplate(); ?>
</div>
tmpl/edit_positions.php 0000604 00000002223 15245625302 0011264 0 ustar 00 <?php
/**
* @package Joomla.Administrator
* @subpackage com_modules
*
* @copyright (C) 2012 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
JLoader::register('TemplatesHelper', JPATH_ADMINISTRATOR . '/components/com_templates/helpers/templates.php');
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
$clientId = $this->item->client_id;
$state = 1;
$selectedPosition = $this->item->position;
$positions = JHtml::_('modules.positions', $clientId, $state, $selectedPosition);
// Add custom position to options
$customGroupText = JText::_('COM_MODULES_CUSTOM_POSITION');
// Build field
$attr = array(
'id' => 'jform_position',
'list.select' => $this->item->position,
'list.attr' => 'class="chzn-custom-value" '
. 'data-custom_group_text="' . $customGroupText . '" '
. 'data-no_results_text="' . JText::_('COM_MODULES_ADD_CUSTOM_POSITION') . '" '
. 'data-placeholder="' . JText::_('COM_MODULES_TYPE_OR_SELECT_POSITION') . '" '
);
echo JHtml::_('select.groupedlist', $positions, 'jform[position]', $attr);
tmpl/edit_options.php 0000604 00000002461 15245625302 0010734 0 ustar 00 <?php
/**
* @package Joomla.Administrator
* @subpackage com_modules
*
* @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
?>
<?php
echo JHtml::_('bootstrap.startAccordion', 'moduleOptions', array('active' => 'collapse0'));
$fieldSets = $this->form->getFieldsets('params');
$i = 0;
foreach ($fieldSets as $name => $fieldSet) :
$label = !empty($fieldSet->label) ? $fieldSet->label : 'COM_MODULES_' . $name . '_FIELDSET_LABEL';
$class = isset($fieldSet->class) && !empty($fieldSet->class) ? $fieldSet->class : '';
echo JHtml::_('bootstrap.addSlide', 'moduleOptions', JText::_($label), 'collapse' . ($i++), $class);
if (isset($fieldSet->description) && trim($fieldSet->description)) :
echo '<p class="tip">' . $this->escape(JText::_($fieldSet->description)) . '</p>';
endif;
?>
<?php foreach ($this->form->getFieldset($name) as $field) : ?>
<div class="control-group">
<div class="control-label">
<?php echo $field->label; ?>
</div>
<div class="controls">
<?php echo $field->input; ?>
</div>
</div>
<?php endforeach;
echo JHtml::_('bootstrap.endSlide');
endforeach;
echo JHtml::_('bootstrap.endAccordion');