Fossil SCM
Oops, fallen for testing built-in versus customized skin, fix the previous check-in.
Commit
dac9293b527b284aec0dde0ec4620ae74e438513be54bb1c5240284716596bb5
Parent
e4a18b67028e3c3…
1 file changed
+10
-5
+10
-5
| --- skins/default/js.txt | ||
| +++ skins/default/js.txt | ||
| @@ -39,15 +39,20 @@ | ||
| 39 | 39 | // is the whole point here. |
| 40 | 40 | var animate = panel.style.transition !== null && (typeof(panel.style.transition) == "string"); |
| 41 | 41 | |
| 42 | 42 | // The duration of the animation can be overridden from the default skin |
| 43 | 43 | // header.txt by setting the "data-anim-ms" attribute of the panel. |
| 44 | - var animMS = parseInt(panel.getAttribute("data-anim-ms")); | |
| 45 | - if (isNaN(animMS) || animMs == 0) | |
| 46 | - animate = false; // disable animation if non-numeric or zero | |
| 47 | - else if (animMS < 0) | |
| 48 | - animMS = 400; // set default animation duration if negative | |
| 44 | + var animMS = panel.getAttribute("data-anim-ms"); | |
| 45 | + if (animMS) { // not null or empty string, parse it | |
| 46 | + animMS = parseInt(animMS); | |
| 47 | + if (isNaN(animMS) || animMS == 0) | |
| 48 | + animate = false; // disable animation if non-numeric or zero | |
| 49 | + else if (animMS < 0) | |
| 50 | + animMS = 400; // set default animation duration if negative | |
| 51 | + } | |
| 52 | + else // attribute is null or empty string, use default | |
| 53 | + animMS = 400; | |
| 49 | 54 | |
| 50 | 55 | // Calculate panel height despite its being hidden at call time. |
| 51 | 56 | // Based on https://stackoverflow.com/a/29047447/142454 |
| 52 | 57 | var panelHeight; // computed on first panel display |
| 53 | 58 | function calculatePanelHeight() { |
| 54 | 59 |
| --- skins/default/js.txt | |
| +++ skins/default/js.txt | |
| @@ -39,15 +39,20 @@ | |
| 39 | // is the whole point here. |
| 40 | var animate = panel.style.transition !== null && (typeof(panel.style.transition) == "string"); |
| 41 | |
| 42 | // The duration of the animation can be overridden from the default skin |
| 43 | // header.txt by setting the "data-anim-ms" attribute of the panel. |
| 44 | var animMS = parseInt(panel.getAttribute("data-anim-ms")); |
| 45 | if (isNaN(animMS) || animMs == 0) |
| 46 | animate = false; // disable animation if non-numeric or zero |
| 47 | else if (animMS < 0) |
| 48 | animMS = 400; // set default animation duration if negative |
| 49 | |
| 50 | // Calculate panel height despite its being hidden at call time. |
| 51 | // Based on https://stackoverflow.com/a/29047447/142454 |
| 52 | var panelHeight; // computed on first panel display |
| 53 | function calculatePanelHeight() { |
| 54 |
| --- skins/default/js.txt | |
| +++ skins/default/js.txt | |
| @@ -39,15 +39,20 @@ | |
| 39 | // is the whole point here. |
| 40 | var animate = panel.style.transition !== null && (typeof(panel.style.transition) == "string"); |
| 41 | |
| 42 | // The duration of the animation can be overridden from the default skin |
| 43 | // header.txt by setting the "data-anim-ms" attribute of the panel. |
| 44 | var animMS = panel.getAttribute("data-anim-ms"); |
| 45 | if (animMS) { // not null or empty string, parse it |
| 46 | animMS = parseInt(animMS); |
| 47 | if (isNaN(animMS) || animMS == 0) |
| 48 | animate = false; // disable animation if non-numeric or zero |
| 49 | else if (animMS < 0) |
| 50 | animMS = 400; // set default animation duration if negative |
| 51 | } |
| 52 | else // attribute is null or empty string, use default |
| 53 | animMS = 400; |
| 54 | |
| 55 | // Calculate panel height despite its being hidden at call time. |
| 56 | // Based on https://stackoverflow.com/a/29047447/142454 |
| 57 | var panelHeight; // computed on first panel display |
| 58 | function calculatePanelHeight() { |
| 59 |