Avatar

"Fold threads" not staying folded (Bugs)

by Milo ⌂, Saturday, March 10, 2018, 20:35 (74 days ago) @ Magma

Hi,

So basically going to the homepage here and clicking "Fold threads" then refreshing the page, threads do not stay folded?

Yes, that's right. The reason is the JavaScript function. This makes folding very fast. To store the state, an ajax request is send to php function. The argument is the variable expand of type BOOLEAN, i.e. true or false. Due to #293, in main.inc.php, the state is checked for INTEGER values, i.e. 0 and 1.

One solution is to change the Query argument in JS to:

new Query("fold_threads", expand ? "0" : "1"),

Quote sign seem to be necessary because values like false or 0 (zero) are not transmitted (not shown in developer inspector)?!

I upload the modified JavaScript files. You can just replace the files to check this issue.

/Micha

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences

Tags:
bug, folding, ajax, javascript, type conflict, 2.4.8


Complete thread:

 RSS Feed of thread

powered by my little forum