mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-11-17 15:57:14 +00:00
Revert "sort unlisted tags by title"
Revert “sort unlisted tags by title”
a8ab08e8fa by @tobibeer
The problem was that this commit changed the order of stylesheet
processing. For background see:
https://groups.google.com/d/topic/tiddlywiki/BPuuSkG6siU/discussion
This commit is contained in:
@@ -524,7 +524,7 @@ exports.sortByList = function(array,listTitle) {
|
|||||||
if(!array || array.length === 0) {
|
if(!array || array.length === 0) {
|
||||||
return [];
|
return [];
|
||||||
} else {
|
} else {
|
||||||
var t, title, titles = [], unlisted = [];
|
var titles = [], t, title;
|
||||||
// First place any entries that are present in the list
|
// First place any entries that are present in the list
|
||||||
for(t=0; t<list.length; t++) {
|
for(t=0; t<list.length; t++) {
|
||||||
title = list[t];
|
title = list[t];
|
||||||
@@ -532,17 +532,13 @@ exports.sortByList = function(array,listTitle) {
|
|||||||
titles.push(title);
|
titles.push(title);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Add remaining entries to unlisted
|
// Then place any remaining entries
|
||||||
for(t=0; t<array.length; t++) {
|
for(t=0; t<array.length; t++) {
|
||||||
title = array[t];
|
title = array[t];
|
||||||
if(list.indexOf(title) === -1) {
|
if(list.indexOf(title) === -1) {
|
||||||
unlisted.push(title);
|
titles.push(title);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//sort unlisted
|
|
||||||
$tw.wiki.sortTiddlers(unlisted,"title",false,false);
|
|
||||||
//concat listed with unlisted
|
|
||||||
titles = titles.concat(unlisted);
|
|
||||||
// Finally obey the list-before and list-after fields of each tiddler in turn
|
// Finally obey the list-before and list-after fields of each tiddler in turn
|
||||||
var sortedTitles = titles.slice(0);
|
var sortedTitles = titles.slice(0);
|
||||||
for(t=0; t<sortedTitles.length; t++) {
|
for(t=0; t<sortedTitles.length; t++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user