Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
a39e1430
Commit
a39e1430
authored
Aug 09, 2018
by
Robert Lyon
Committed by
Gerrit Code Review
Aug 09, 2018
Browse files
Merge "Bug 1775101: keep style when sorting tags in tags.php"
parents
4e5e0aae
5b411e17
Changes
1
Show whitespace changes
Inline
Side-by-side
htdocs/tags.php
View file @
a39e1430
...
...
@@ -51,14 +51,14 @@ jQuery(function($) {
};
function sortTagAlpha(a, b) {
var aid = $(a).prop('id');
var bid = $(b).prop('id');
var aid = $(a).
children().
prop('id');
var bid = $(b).
children().
prop('id');
return aid.toLowerCase() < bid.toLowerCase() ? -1 : (aid.toLowerCase() > bid.toLowerCase() ? 1 : 0);
}
function sortTagFreq(a, b) {
var aid = $(a).prop('id');
var bid = $(b).prop('id');
var aid = $(a).
children().
prop('id');
var bid = $(b).
children().
prop('id');
return mytags[bid] - mytags[aid];
}
...
...
@@ -67,14 +67,11 @@ jQuery(function($) {
function rewriteTagSortLink(id, elem) {
$(elem).on('click', function(e) {
e.preventDefault();
var elems = $(mytags_container).find('a.tag');
elems.sort(sort_functions[getUrlParameter('ts', $(this).prop('href'))]);
var ul = $(mytags_container).children();
var li = ul.children("li");
li.detach().sort(sort_functions[getUrlParameter('ts', $(this).prop('href'))]);
ul.append(li);
// FF needs spaces in between each element for wrapping
$(mytags_container).empty();
elems.each(function () {
$(mytags_container).append(this, ' ')
});
// set all tabs to inactive
$('ul.nav-tabs li').each(function() {
$(this).removeClass('active');
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment