Skip to content

Commit

Permalink
Move pos3_name and pos3_value to pos3_nav using data-* attributes
Browse files Browse the repository at this point in the history
Ref: d944f08

Signed-off-by: William Desportes <williamdes@wdes.fr>
  • Loading branch information
williamdes committed May 30, 2020
1 parent d944f08 commit aec59d5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 4 additions & 2 deletions js/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,10 @@ Navigation.traverseForPaths = function () {
params['n' + count + '_pos2_name'] = pos2Nav.attr('data-name');
params['n' + count + '_pos2_value'] = pos2Nav.attr('data-value');

params['n' + count + '_pos3_name'] = $(this).find('span.pos3_name').text();
params['n' + count + '_pos3_value'] = $(this).find('span.pos3_value').text();
var pos3Nav = $(this).find('span.pos3_nav');

params['n' + count + '_pos3_name'] = pos3Nav.attr('data-name');
params['n' + count + '_pos3_value'] = pos3Nav.attr('data-value');
count++;
}
});
Expand Down
10 changes: 4 additions & 6 deletions libraries/classes/Navigation/NavigationTree.php
Original file line number Diff line number Diff line change
Expand Up @@ -1032,12 +1032,10 @@ private function getPaginationParamsHtml($node)
$retval .= '"></span>';
}
if (isset($paths['aPath_clean'][4])) {
$retval .= '<span class="hide pos3_name">';
$retval .= $paths['aPath_clean'][4];
$retval .= '</span>';
$retval .= "<span class='hide pos3_value'>";
$retval .= htmlspecialchars((string) $node->pos3);
$retval .= '</span>';
$retval .= '<span class="hide pos3_nav"';
$retval .= ' data-name="' . $paths['aPath_clean'][4] . '"';
$retval .= ' data-value="' . htmlspecialchars((string) $node->pos3) . '"';
$retval .= '"></span>';
}

return $retval;
Expand Down

0 comments on commit aec59d5

Please sign in to comment.