Ero sivun ”Widget:ThreadsX” versioiden välillä
Järvi-meriwikistä
(6 välissä olevaa versiota samalta käyttäjältä ei näytetä) | |||
Rivi 26: | Rivi 26: | ||
var threads = request.query.threads; | var threads = request.query.threads; | ||
− | + | var threadsA = []; | |
− | |||
var threadsO = {}; | var threadsO = {}; | ||
− | + | /* | |
− | for ( var t in threads ) { | + | for ( var t in threads ) { threadsA.push( threads[ t ] ); } |
− | + | 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); | ||
+ | */ | ||
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 87: | Rivi 94: | ||
if (added == 0) { | if (added == 0) { | ||
− | output += | + | output += nothreads; |
} | } | ||