Ero sivun ”Widget:ThreadsX” versioiden välillä
Järvi-meriwikistä
Rivi 28: | Rivi 28: | ||
var threadsA = []; | var threadsA = []; | ||
var threadsO = {}; | var threadsO = {}; | ||
− | + | /* | |
for ( var t in threads ) { threadsA.push( threads[ t ] ); } | for ( var t in threads ) { threadsA.push( threads[ t ] ); } | ||
threadsA.sort(function(a,b) { return parseFloat(a.created) - parseFloat(b.created) } ); | threadsA.sort(function(a,b) { return parseFloat(a.created) - parseFloat(b.created) } ); | ||
− | + | ||
+ | for ( var t in threadsA ) { | ||
+ | id = threadsA[ t ].id; | ||
+ | parent = threadsA[ t ].parent; | ||
+ | if ( parent === null ) { | ||
+ | threadsO[ id ]; | ||
+ | if ( typeof threadsO[ threadsA[ t ].id ] | ||
+ | threadsO.push( threads[ t ] ); } | ||
+ | |||
console.log(threadsA); | console.log(threadsA); | ||
− | + | */ | |
var threadsArr = new Array(); | var threadsArr = new Array(); | ||
var output = '<div class="rss-box"><ul class="rss-items">'; | var output = '<div class="rss-box"><ul class="rss-items">'; | ||
Rivi 86: | Rivi 94: | ||
if (added == 0) { | if (added == 0) { | ||
− | output += '<p>' + nothreads + '</p>'; | + | output += '<p><span class="small">' + nothreads + '</span></p>'; |
} | } | ||