Fossil

Check-in [56db6170]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Moved a single-use variable interpolation inline with its use point. Also improved some comments.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:56db6170e8da959f39d2b9c6c9086feb4627d530090d2a145336fd68c7455df2
User & Date: wyoung 2018-09-12 12:32:11
Context
2018-09-12
12:33
Avoided a divide by 1000 by changing a value formerly specified in floating point seconds to be specified in milliseconds, so we don't need the arithmetic. check-in: 1d5eea66 user: wyoung tags: trunk
12:32
Moved a single-use variable interpolation inline with its use point. Also improved some comments. check-in: 56db6170 user: wyoung tags: trunk
2018-09-11
17:47
Documentation updates for custom TH1 commands. check-in: 874a4dac user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to skins/default/js.txt.

1
2
3
4
5
6
7
8
9
..
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
...
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
(function() {
  var home='$home';
  var panel = document.getElementById("hbdrop");
  if (!panel) return;   // site admin might've nuked it
  var panelBorder = panel.style.border;
  var animate = panel.style.hasOwnProperty('transition');
  var animMS = 400;

  // Calculate panel height despite its being hidden at call time.
................................................................................
    panel.style.visibility = evis;
  }

  // Show the panel by changing the panel height, which kicks off the
  // slide-open/closed transition set up in the XHR onload handler.
  //
  // Schedule the change for a near-future time in case this is the
  // first call, where the div was initially invisible.  That causes
  // the browser to consider the height change as part of the same
  // state change as the visibility change, so it doesn't see a state
  // *transition*, hence never kicks off the *CSS* transition:
  //
  // https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Transitions/Using_CSS_transitions#JavaScript_examples
  function showPanel() {
    if (animate) {
      setTimeout(function() {
        panel.style.maxHeight = panelHeight;
        panel.style.border    = panelBorder;
................................................................................
              showPanel();
            }
            panel.style.display = 'block';
          }
        }
        // else, can't parse response as HTML or XML
      }
      xhr.open("POST", home + "/sitemap");
      xhr.responseType = "document";
      xhr.send("popup=1");
    }
    else {
      showPanel();   // just show what we built above
    }
    return false;  // prevent browser from acting on <a> click
  }
})();

<







 







|
|
|
|







 







|









1

2
3
4
5
6
7
8
..
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
...
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
(function() {

  var panel = document.getElementById("hbdrop");
  if (!panel) return;   // site admin might've nuked it
  var panelBorder = panel.style.border;
  var animate = panel.style.hasOwnProperty('transition');
  var animMS = 400;

  // Calculate panel height despite its being hidden at call time.
................................................................................
    panel.style.visibility = evis;
  }

  // Show the panel by changing the panel height, which kicks off the
  // slide-open/closed transition set up in the XHR onload handler.
  //
  // Schedule the change for a near-future time in case this is the
  // first call, where the div was initially invisible.  If we were
  // to change the panel's visibility and height at the same time
  // instead, that would prevent the browser from seeing the height
  // change as a state transition, so it'd skip the CSS transition:
  //
  // https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Transitions/Using_CSS_transitions#JavaScript_examples
  function showPanel() {
    if (animate) {
      setTimeout(function() {
        panel.style.maxHeight = panelHeight;
        panel.style.border    = panelBorder;
................................................................................
              showPanel();
            }
            panel.style.display = 'block';
          }
        }
        // else, can't parse response as HTML or XML
      }
      xhr.open("POST", "$home/sitemap");   // note the TH1 substitution!
      xhr.responseType = "document";
      xhr.send("popup=1");
    }
    else {
      showPanel();   // just show what we built above
    }
    return false;  // prevent browser from acting on <a> click
  }
})();