Skip to content

Commit

Permalink
Solução para problema de responsividade sugerido por membros do Insti…
Browse files Browse the repository at this point in the history
…tuto Federal do Pará para bug reportado em issue #9; Melhorias de comportamento relacionadas à abertura e fechamento de menus por meio da adição da classe 'show-menu' ao sufixo de classe do módulo de menu; Exemplo de layout alternativo para mod_container, com carregamento em duas colunas, sendo uma com span8 e outra com span4, conforme padrões bootstrap e posições carregadas com sufixos <posicao>-esq e <posicao>-dir, respectivamente.
  • Loading branch information
berlanda committed Feb 10, 2015
1 parent d444e7f commit a040b9c
Show file tree
Hide file tree
Showing 22 changed files with 168 additions and 48 deletions.
Empty file modified modules/mod_container/helper.php
100644 → 100755
Empty file.
Empty file modified modules/mod_container/index.html
100644 → 100755
Empty file.
17 changes: 10 additions & 7 deletions modules/mod_container/mod_container.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,16 @@

if(!empty($position))
{
$modules = JModuleHelper::getModules( $position );
if ($auto_divisor) {
$divisor = intval($grid_positions / count($modules));
if($divisor >= ($grid_positions/$numero_colunas))
$moduleclass_sfx_level2 = trim($moduleclass_sfx_level2.' span'.$divisor);
else
$moduleclass_sfx_level2 = trim($moduleclass_sfx_level2.' row');
if($params->get('layout', 'default')=='_:default')
{
$modules = JModuleHelper::getModules( $position );
if ($auto_divisor) {
$divisor = intval($grid_positions / count($modules));
if($divisor >= ($grid_positions/$numero_colunas))
$moduleclass_sfx_level2 = trim($moduleclass_sfx_level2.' span'.$divisor);
else
$moduleclass_sfx_level2 = trim($moduleclass_sfx_level2.' row');
}
}
require JModuleHelper::getLayoutPath('mod_container', $params->get('layout', 'default') );
}
Empty file modified modules/mod_container/mod_container.xml
100644 → 100755
Empty file.
Empty file modified modules/mod_container/tmpl/index.html
100644 → 100755
Empty file.
114 changes: 114 additions & 0 deletions modules/mod_container/tmpl/tmpl-2cols-esqlarg8-dirlarg4.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
<?php
defined('_JEXEC') or die;

//CARREGAMENTO DOS MÓDULOS
$modules_col_esquerda = array_merge( JModuleHelper::getModules( $position ), JModuleHelper::getModules( $position . '-esq' ) );
$modules_col_direita = JModuleHelper::getModules( $position . '-dir' );
$moduleclass_sfx_level2 = trim($moduleclass_sfx_level2);

$cols = array($modules_col_esquerda, $modules_col_direita);
$span_cols = array('span8', 'span4');

if($tag1 != 'none')
echo '<'.$tag1.' '.$class.'>'."\n";
?>
<?php //titulo do modulo ?>
<?php if ($module->showtitle): ?>
<?php if ($title_outstanding): ?><div class="outstanding-header"><?php endif; ?>
<h<?php echo $headerLevel; ?> <?php if ($title_outstanding): ?>class="outstanding-title"<?php endif; ?>><?php echo $module->title; ?></h<?php echo $headerLevel; ?>>
<?php if( !empty($text_link_title) && !empty($url_link_title) ): ?>
<a href="<?php echo $url_link_title ?>" class="outstanding-link"><span class="text"><?php echo $text_link_title; ?></span>
<span class="icon-box">
<i class="icon-angle-right icon-light"><span class="hide">&nbsp;</span></i>
</span>
</a>
<?php endif; ?>
<?php if ($title_outstanding): ?></div><?php endif; ?>
<?php $headerLevel = intval($headerLevel)+1; ?>
<?php endif; ?>

<?php
foreach ($cols as $col => $modules):

if(count($modules)==0)
continue;

echo '<div class="'.$span_cols[ $col ].'">';
$counter = 1;

foreach ($modules as $k => $mod):
$mod_params = json_decode($mod->params);

$class = @$mod_params->moduleclass_sfx;
$class .= ' module '.$moduleclass_sfx_level2;
if(@$mod_params->variacao != '')
$class .= ' variacao-module-'.((intval($mod_params->variacao)<10)? '0' : '').intval($mod_params->variacao);

$mod->title = (@$mod_params->titulo_alternativo!='')? $mod_params->titulo_alternativo : $mod->title;
$mod->title = (@$mod_params->alternative_title!='')? $mod_params->alternative_title : $mod->title;
$class = 'class="'.trim($class).'"';

if($tag2 != 'none')
echo '<'.$tag2.' '.$class.'>'."\n";
?>
<?php //titulo do modulo 2 ?>
<?php if ($mod->showtitle && $counter <= $numero_colunas): ?>
<?php if ($params->get('title_outstanding_column'.$counter)): ?><div class="outstanding-header"><?php else: ?><div class="header"><?php endif; ?>
<h<?php echo $headerLevel; ?> <?php if ($params->get('title_outstanding_column'.$counter)): ?>class="outstanding-title"<?php else: ?>class="title"<?php endif; ?>><?php echo $mod->title; ?></h<?php echo $headerLevel; ?>>
<?php if( $params->get('text_link_title_column'.$counter) != '' && $params->get('url_link_title_column'.$counter) != '' ): ?>
<a href="<?php echo $params->get('url_link_title_column'.$counter) ?>" class="outstanding-link"><span class="text"><?php echo $params->get('text_link_title_column'.$counter); ?></span>
<span class="icon-box">
<i class="icon-angle-right icon-light"><span class="hide">&nbsp;</span></i>
</span>
</a>
<?php endif; ?>
</div>
<?php elseif($mod->showtitle): ?>
<div class="header">
<h<?php echo $headerLevel; ?> class="title"><?php echo $mod->title; ?></h<?php echo $headerLevel; ?>>
</div>
<?php endif; ?>

<?php echo JModuleHelper::renderModule($mod); ?>

<?php if($counter<=$numero_colunas): ?>
<?php if ( $params->get('footer_outstanding_column'.$counter) ): ?>
<div class="outstanding-footer">
<?php if( $params->get('text_link_footer_column'.$counter) != '' && $params->get('url_link_footer_column'.$counter) != '' ): ?>
<a href="<?php echo $params->get('url_link_footer_column'.$counter) ?>" class="outstanding-link"><span class="text"><?php echo $params->get('text_link_footer_column'.$counter); ?></span>
<span class="icon-box">
<i class="icon-angle-right icon-light"><span class="hide">&nbsp;</span></i>
</span>
</a>
<?php endif; ?>
</div>
<?php endif; ?>
<?php endif; ?>

<?php
if($tag2 != 'none')
echo '</'.$tag2.'>'."\n";
$counter++;
endforeach;

echo '</div>';

endforeach;
?>

<?php if ($show_footer): ?>
<div class="outstanding-footer">
<?php if( !empty($text_link_footer) && !empty($url_link_footer) ): ?>
<a href="<?php echo $url_link_footer ?>" class="outstanding-link">
<span class="text"><?php echo $text_link_footer; ?></span>
<span class="icon-box">
<i class="icon-angle-right icon-light"><span class="hide">&nbsp;</span></i>
</span>
</a>
<?php endif; ?>
</div>
<?php endif; ?>
<?php
if($tag1 != 'none')
echo '</'.$tag1.'>'."\n";
?>
2 changes: 1 addition & 1 deletion templates/padraogoverno01/css/fontes.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a040b9c

Please sign in to comment.