Ero sivun ”Widget:ThreadsX” versioiden välillä
Järvi-meriwikistä
(4 välissä olevaa versiota samalta käyttäjältä ei näytetä) | |||
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( | + | 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="lake-rss-items">'; |
var alternate = 0; | var alternate = 0; | ||
Rivi 86: | Rivi 94: | ||
if (added == 0) { | if (added == 0) { | ||
− | output += | + | output += nothreads; |
} | } | ||