Skip to content

Commit

Permalink
Extend getData function to use in _c function
Browse files Browse the repository at this point in the history
  • Loading branch information
joomlart committed Apr 3, 2013
1 parent 5808a0b commit 0473008
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion source/plg_system_t3/base/html/mod_breadcrumbs/default.php
Expand Up @@ -18,7 +18,7 @@
<?php
if ($params->get('showHere', 1))
{
echo '<li class="active"><span class="divider hasTooltip"><i class="icon-map-marker" rel="tooltip" title="' .JText::_('MOD_BREADCRUMBS_HERE').'"></i></span></li>';
echo '<li class="active"><span class="divider hasTooltip"><i class="icon-map-marker" data-toggle="tooltip" title="' .JText::_('MOD_BREADCRUMBS_HERE').'"></i></span></li>';
}

// Get rid of duplicated entries on trail including home page when using multilanguage
Expand Down
24 changes: 18 additions & 6 deletions source/plg_system_t3/includes/core/template.php
Expand Up @@ -274,15 +274,27 @@ function megamenu($menutype){
* Layout configuration
* @param $col int
* Column number, start from 0
* @param $array boolean
* return array or string
*
* @return string Block content
*/
function getData ($layout, $col) {
$data = '';
foreach ($layout as $device => $width) {
if (!isset ($width[$col]) || !$width[$col]) continue;
$data .= " data-$device=\"{$width[$col]}\"";
function getData ($layout, $col, $array) {
if($array){
$data = array();
foreach ($layout as $device => $width) {
if (!isset ($width[$col]) || !$width[$col]) continue;
$data[$device] = $width[$col];
}

} else {
$data = '';
foreach ($layout as $device => $width) {
if (!isset ($width[$col]) || !$width[$col]) continue;
$data .= " data-$device=\"{$width[$col]}\"";
}
}

return $data;
}

Expand Down Expand Up @@ -460,7 +472,7 @@ function _c ($name, $cls = array()){
if($data == '"'){
$data = '';
} else {
$data = ' t3respon' . substr($data, 0, strrpos($data, '"'));
$data = (isset($param->default) ? ' ' . $param->default : '') . ' t3respon' . substr($data, 0, strrpos($data, '"'));
}
}

Expand Down

0 comments on commit 0473008

Please sign in to comment.