This patch makes simpletest.js perform its collapsing table rows trick faster. The current implementation causes slight delays on slower machines before it opens/closes, and uses unnecessarily intensive "fadeIn" and "fadeOut" jQuery methods when hiding/showing, even though table rows aren't capable of being faded in many browsers. I think the intention of using them might have been to simply intentionally slow down the effect. This patch takes a different approach and simply toggles visibility and uses a timer to control the expansion of rows, rather than intentionally grinding CPU cycles just to cause a delay.
Chx informs me this problem is especially noticeable in Opera. And in Konqueror the table expansion doesn't work at all. This patch works in Firefox, Opera, Konqueror, IE 6/7.
Comment | File | Size | Author |
---|---|---|---|
#8 | simpletest_faster_js.patch | 3.13 KB | quicksketch |
#7 | simpletest_faster_js.patch | 3.13 KB | quicksketch |
#4 | simpletest_faster_js.patch | 2.67 KB | quicksketch |
simpletest_faster_js.patch | 2.61 KB | quicksketch | |
Comments
Comment #1
quicksketch"neater code" seems a little biased. We'll just say it's less intensive. :)
Comment #3
boombatower CreditAttribution: boombatower commentedHint...this needs to be created from drupal root.
bot eats patches that are relative :)
Comment #4
quicksketchThanks boombatower. :)
Comment #5
boombatower CreditAttribution: boombatower commentedLooks good, works fine for me as well.
Comment #6
webchickSince we're taking the opportunity to clean up the code, can we add a smattering of comments to explain what's going on?
Comment #7
quicksketchSame patch with a few more comments. Webchick made a solid argument that a lack of comments in the file doesn't justify a continued absence. So while we're in here add a few lines describing what we're doing.
Comment #8
quicksketchTypo in the last patch's comments.
Comment #9
webchickWow, I can actually understand what's going on in that file now. :O
Has the quicksketch + boombatower seal of approval, chx confirmed it vastly speeds things up in Opera (though I was unable to test since Opera is fubar on my machine).
Made a couple minor adjustments to the comments and committed to HEAD. Thanks. :)