Fossil SCM
Enhance the hamburger menu JS so that it does not require TH1 support and can be independently loaded. Rename the hamburger menu JS to src/hbmenu.js. Add the new "builtin_request_js" TH1 command to request JS loading, and use that command in the default and plain_gray skins to access the common hbmenu.js code.
Commit
d39732b714c5cdcc5a72564d4f88ae009e67e6c427f2841e0a8e18aa0e624c4b
Parent
18e2f5337f112f6…
9 files changed
-3
+1
-228
+1
-3
+31
-9
+5
-1
+27
+5
-1
+10
-2
| --- skins/default/footer.txt | ||
| +++ skins/default/footer.txt | ||
| @@ -1,8 +1,5 @@ | ||
| 1 | 1 | <div class="footer"> |
| 2 | 2 | This page was generated in about |
| 3 | 3 | <th1>puts [expr {([utime]+[stime]+1000)/1000*0.001}]</th1>s by |
| 4 | 4 | Fossil $release_version $manifest_version $manifest_date |
| 5 | 5 | </div> |
| 6 | -<script nonce="$nonce"> | |
| 7 | -<th1>styleScript</th1> | |
| 8 | -</script> | |
| 9 | 6 |
| --- skins/default/footer.txt | |
| +++ skins/default/footer.txt | |
| @@ -1,8 +1,5 @@ | |
| 1 | <div class="footer"> |
| 2 | This page was generated in about |
| 3 | <th1>puts [expr {([utime]+[stime]+1000)/1000*0.001}]</th1>s by |
| 4 | Fossil $release_version $manifest_version $manifest_date |
| 5 | </div> |
| 6 | <script nonce="$nonce"> |
| 7 | <th1>styleScript</th1> |
| 8 | </script> |
| 9 |
| --- skins/default/footer.txt | |
| +++ skins/default/footer.txt | |
| @@ -1,8 +1,5 @@ | |
| 1 | <div class="footer"> |
| 2 | This page was generated in about |
| 3 | <th1>puts [expr {([utime]+[stime]+1000)/1000*0.001}]</th1>s by |
| 4 | Fossil $release_version $manifest_version $manifest_date |
| 5 | </div> |
| 6 |
| --- skins/default/header.txt | ||
| +++ skins/default/header.txt | ||
| @@ -18,10 +18,11 @@ | ||
| 18 | 18 | } else { |
| 19 | 19 | html "<a href='$home$url' class='$cls'>$name</a>\n" |
| 20 | 20 | } |
| 21 | 21 | } |
| 22 | 22 | html "<a id='hbbtn' href='$home/sitemap' aria-label='Site Map'>☰</a>" |
| 23 | +builtin_request_js hbmenu.js | |
| 23 | 24 | menulink $index_page Home {} |
| 24 | 25 | if {[anycap jor]} { |
| 25 | 26 | menulink /timeline Timeline {} |
| 26 | 27 | } |
| 27 | 28 | if {[hascap oh]} { |
| 28 | 29 | |
| 29 | 30 | DELETED skins/default/js.txt |
| --- skins/default/header.txt | |
| +++ skins/default/header.txt | |
| @@ -18,10 +18,11 @@ | |
| 18 | } else { |
| 19 | html "<a href='$home$url' class='$cls'>$name</a>\n" |
| 20 | } |
| 21 | } |
| 22 | html "<a id='hbbtn' href='$home/sitemap' aria-label='Site Map'>☰</a>" |
| 23 | menulink $index_page Home {} |
| 24 | if {[anycap jor]} { |
| 25 | menulink /timeline Timeline {} |
| 26 | } |
| 27 | if {[hascap oh]} { |
| 28 | |
| 29 | ELETED skins/default/js.txt |
| --- skins/default/header.txt | |
| +++ skins/default/header.txt | |
| @@ -18,10 +18,11 @@ | |
| 18 | } else { |
| 19 | html "<a href='$home$url' class='$cls'>$name</a>\n" |
| 20 | } |
| 21 | } |
| 22 | html "<a id='hbbtn' href='$home/sitemap' aria-label='Site Map'>☰</a>" |
| 23 | builtin_request_js hbmenu.js |
| 24 | menulink $index_page Home {} |
| 25 | if {[anycap jor]} { |
| 26 | menulink /timeline Timeline {} |
| 27 | } |
| 28 | if {[hascap oh]} { |
| 29 | |
| 30 | ELETED skins/default/js.txt |
D
skins/default/js.txt
-228
| --- a/skins/default/js.txt | ||
| +++ b/skins/default/js.txt | ||
| @@ -1,228 +0,0 @@ | ||
| 1 | -/* | |
| 2 | -** Copyright © 2018 Warren Young | |
| 3 | -** | |
| 4 | -** This program is free software; you can redistribute it and/or | |
| 5 | -** modify it under the terms of the Simplified BSD License (also | |
| 6 | -** known as the "2-Clause License" or "FreeBSD License".) | |
| 7 | -** | |
| 8 | -** This program is distributed in the hope that it will be useful, | |
| 9 | -** but without any warranty; without even the implied warranty of | |
| 10 | -** merchantability or fitness for a particular purpose. | |
| 11 | -** | |
| 12 | -** Contact: wyoung on the Fossil forum, https | |
| 13 | -******************************************************************************* | |
| 14 | -** | |
| 15 | -** Thisspecific to the Fossil default skin. | |
| 16 | -** Currently, the only thing this does is handle clicks on isition the hddrop container. | |
| 17 | -*/ | |
| 18 | -(function() { | |
| 19 | - var hbButton = document.getElementById("hbbtn"); | |
| 20 | - if (!hbButton) return; // no hamburger button | |
| 21 | - if (!document.addEventListener) return; // Incompatible browser | |
| 22 | - var panel = document.getElementById("hbdrop"); | |
| 23 | - if (!panel) return; // site admin might've nuked it | |
| 24 | - if (!panel.style) return; // shouldn't happen, but be sure | |
| 25 | - var panelBorder = panel.style.border; | |
| 26 | - var panelInitialized = false; // reset if browser window is resized | |
| 27 | - var panelResetBorderTimerID = 0; // used to cancel post-animation tasks | |
| 28 | - | |
| 29 | - // Disable animation if this browser doesn't support CSS transitions. | |
| 30 | - // | |
| 31 | - // We need this ugly calling form for old browsers that don't allow | |
| 32 | - // panel.style.hasOwnProperty('transition'); catering to old browsers | |
| 33 | - // is the whole point here. | |
| 34 | - var animate = panel.style.transition !== null && (typeof(panel.style.transition) == "string"); | |
| 35 | - | |
| 36 | - // The duration of the animation can be overridden from the default skin | |
| 37 | - // header.txt by setting the "data-anim-ms" attribute of the panel. | |
| 38 | - var animMS = panel.getAttribute("data-anim-ms"); | |
| 39 | - if (animMS) { // not null or empty string, parse it | |
| 40 | - animMS = parseInt(animMS); | |
| 41 | - if (isNaN(animMS) || animMS == 0) | |
| 42 | - animate = false; // disable animation if non-numeric or zero | |
| 43 | - else if (animMS < 0) | |
| 44 | - animMS = 400; // set default animation duration if negative | |
| 45 | - } | |
| 46 | - else // attribute is null or empty string, use default | |
| 47 | - animMS = 400; | |
| 48 | - | |
| 49 | - // Calculate panel height despite its being hidden at call time. | |
| 50 | - // Based on https://stackoverflow.com/a/29047447/142454 | |
| 51 | - var panelHeight; // computed on first panel display | |
| 52 | - function calculatePanelHeight() { | |
| 53 | - | |
| 54 | - // Clear the max-height CSS property in case the panel size is recalculated | |
| 55 | - // after the browser window was resized. | |
| 56 | - panel.style.maxHeight = ''; | |
| 57 | - | |
| 58 | - // Get initial panel styles so we can restore them below. | |
| 59 | - var es = window.getComputedStyle(panel), | |
| 60 | - edis = es.display, | |
| 61 | - epos = es.position, | |
| 62 | - evis = es.visibility; | |
| 63 | - | |
| 64 | - // Restyle the panel so we can measure its height while invisible. | |
| 65 | - panel.style.visibility = 'hidden'; | |
| 66 | - panel.style.position = 'absolute'; | |
| 67 | - panel.style.display = 'block'; | |
| 68 | - panelHeight = panel.offsetHeight + 'px'; | |
| 69 | - | |
| 70 | - // Revert styles now that job is done. | |
| 71 | - panel.style.display = edis; | |
| 72 | - panel.style.position = epos; | |
| 73 | - panel.style.visibility = evis; | |
| 74 | - } | |
| 75 | - | |
| 76 | - // Show the panel by changing the panel height, which kicks off the | |
| 77 | - // slide-open/closed transition set up in the XHR onload handler. | |
| 78 | - // | |
| 79 | - // Schedule the change for a near-future time in case this is the | |
| 80 | - // first call, where the div was initially invisible. If we were | |
| 81 | - // to change the panel's visibility and height at the same time | |
| 82 | - // instead, that would prevent the browser from seeing the height | |
| 83 | - // change as a state transition, so it'd skip the CSS transition: | |
| 84 | - // | |
| 85 | - // https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Transitions/Using_CSS_transitions#JavaScript_examples | |
| 86 | - function showPanel() { | |
| 87 | - // Cancel the timer to remove the panel border after the closing animation, | |
| 88 | - // otherwise double-clicking the hamburger button with the panel opened will | |
| 89 | - // remove the borders from the (closed and immediately reopened) panel. | |
| 90 | - if (panelResetBorderTimerID) { | |
| 91 | - clearTimeout(panelResetBorderTimerID); | |
| 92 | - panelResetBorderTimerID = 0; | |
| 93 | - } | |
| 94 | - if (animate) { | |
| 95 | - if (!panelInitialized) { | |
| 96 | - panelInitialized = true; | |
| 97 | - // Set up a CSS transition to animate the panel open and | |
| 98 | - // closed. Only needs to be done once per page load. | |
| 99 | - // Based on https://stackoverflow.com/a/29047447/142454 | |
| 100 | - calculatePanelHeight(); | |
| 101 | - panel.style.transition = 'max-height ' + animMS + | |
| 102 | - 'ms ease-in-out'; | |
| 103 | - panel.style.overflowY = 'hidden'; | |
| 104 | - panel.style.maxHeight = '0'; | |
| 105 | - } | |
| 106 | - setTimeout(function() { | |
| 107 | - panel.style.maxHeight = panelHeight; | |
| 108 | - panel.style.border = panelBorder; | |
| 109 | - }, 40); // 25ms is insufficient with Firefox 62 | |
| 110 | - } | |
| 111 | - panel.style.display = 'block'; | |
| 112 | - document.addEventListener('keydown',panelKeydown,/* useCapture == */true); | |
| 113 | - document.addEventListener('click',panelClick,false); | |
| 114 | - } | |
| 115 | - | |
| 116 | - var panelKeydown = function(event) { | |
| 117 | - var key = event.which || event.keyCode; | |
| 118 | - if (key == 27) { | |
| 119 | - event.stopPropagation(); // ignore other keydown handlers | |
| 120 | - panelToggle(true); | |
| 121 | - } | |
| 122 | - }; | |
| 123 | - | |
| 124 | - var panelClick = function(event) { | |
| 125 | - if (!panel.contains(event.target)) { | |
| 126 | - // Call event.preventDefault() to have clicks outside the opened panel | |
| 127 | - // just close the panel, and swallow clicks on links or form elements. | |
| 128 | - //event.preventDefault(); | |
| 129 | - panelToggle(true); | |
| 130 | - } | |
| 131 | - }; | |
| 132 | - | |
| 133 | - // Return true if the panel is showing. | |
| 134 | - function panelShowing() { | |
| 135 | - if (animate) { | |
| 136 | - return panel.style.maxHeight == panelHeight; | |
| 137 | - } | |
| 138 | - else { | |
| 139 | - return panel.style.display == 'block'; | |
| 140 | - } | |
| 141 | - } | |
| 142 | - | |
| 143 | - // Check if the specified HTML element has any child elements. Note that plain | |
| 144 | - // text nodes, comments, and any spaces (presentational or not) are ignored. | |
| 145 | - function hasChildren(element) { | |
| 146 | - var childElement = element.firstChild; | |
| 147 | - while (childElement) { | |
| 148 | - if (childElement.nodeType == 1) // Node.ELEMENT_NODE == 1 | |
| 149 | - return true; | |
| 150 | - childElement = childElement.nextSibling; | |
| 151 | - } | |
| 152 | - return false; | |
| 153 | - } | |
| 154 | - | |
| 155 | - // Reset the state of the panel to uninitialized if the browser window is | |
| 156 | - // resized, so the dimensions are recalculated the next time it's opened. | |
| 157 | - window.addEventListener('resize',function(event) { | |
| 158 | - panelInitialized = false; | |
| 159 | - },false); | |
| 160 | - | |
| 161 | - // Click handler for the hamburger button. | |
| 162 | - hbButton.addEventListener('click',function(event) { | |
| 163 | - // Break the event handler chain, or the handler for document → click | |
| 164 | - // (about to be installed) may already be triggered by the current event. | |
| 165 | - event.stopPropagation(); | |
| 166 | - event.preventDefault(); // prevent browser from acting on <a> click | |
| 167 | - panelToggle(false); | |
| 168 | - },false); | |
| 169 | - | |
| 170 | - function panelToggle(suppressAnimation) { | |
| 171 | - if (panelShowing()) { | |
| 172 | - document.removeEventListener('keydown',panelKeydown,/* useCapture == */true); | |
| 173 | - document.removeEventListener('click',panelClick,false); | |
| 174 | - // Transition back to hidden state. | |
| 175 | - if (animate) { | |
| 176 | - if (suppressAnimation) { | |
| 177 | - var transition = panel.style.transition; | |
| 178 | - panel.style.transition = ''; | |
| 179 | - panel.style.maxHeight = '0'; | |
| 180 | - panel.style.border = 'none'; | |
| 181 | - setTimeout(function() { | |
| 182 | - // Make sure CSS transition won't take effect now, so restore it | |
| 183 | - // asynchronously. Outer variable 'transition' still valid here. | |
| 184 | - panel.style.transition = transition; | |
| 185 | - }, 40); // 25ms is insufficient with Firefox 62 | |
| 186 | - } | |
| 187 | - else { | |
| 188 | - panel.style.maxHeight = '0'; | |
| 189 | - panelResetBorderTimerID = setTimeout(function() { | |
| 190 | - // Browsers show a 1px high border line when maxHeight == 0, | |
| 191 | - // our "hidden" state, so hide the borders in that state, too. | |
| 192 | - panel.style.border = 'none'; | |
| 193 | - panelResetBorderTimerID = 0; // clear ID of completed timer | |
| 194 | - }, animMS); | |
| 195 | - } | |
| 196 | - } | |
| 197 | - else { | |
| 198 | - panel.style.display = 'none'; | |
| 199 | - } | |
| 200 | - } | |
| 201 | - else { | |
| 202 | - if (!hasChildren(panel)) { | |
| 203 | - // Only get the sitemap once per page load: it isn't likely to | |
| 204 | - // change on us. | |
| 205 | - var xhr = new XMLHttpRequest(); | |
| 206 | - xhr.onload = function() { | |
| 207 | - var doc = xhr.responseXML; | |
| 208 | - if (doc) { | |
| 209 | - var sm = doc.querySelector("ul#sitemap"); | |
| 210 | - if (sm && xhr.status == 200) { | |
| 211 | - // Got sitemap. Insert it into the drop-down panel. | |
| 212 | - panel.innerHTML = sm.outerHTML; | |
| 213 | - // Display the panel | |
| 214 | - showPanel(); | |
| 215 | - } | |
| 216 | - } | |
| 217 | - // else, can't parse response as HTML or XML | |
| 218 | - } | |
| 219 | - xhr.open("GET xhr.open("GET", url); | |
| 220 | - xhr.responseType = "document"; | |
| 221 | - xhr.send(); | |
| 222 | - } | |
| 223 | - else { | |
| 224 | - showPanel(); // just show what we built abo{ | |
| 225 | - // Turn the button into ncompatible browser | |
| 226 | - var panel = document.getElementById("hbdrop"); | |
| 227 | - if (!panel) return; // site admin might've nuked it | |
| 228 | - if (!panel.style) return; // shouldn't happen, but b |
| --- a/skins/default/js.txt | |
| +++ b/skins/default/js.txt | |
| @@ -1,228 +0,0 @@ | |
| 1 | /* |
| 2 | ** Copyright © 2018 Warren Young |
| 3 | ** |
| 4 | ** This program is free software; you can redistribute it and/or |
| 5 | ** modify it under the terms of the Simplified BSD License (also |
| 6 | ** known as the "2-Clause License" or "FreeBSD License".) |
| 7 | ** |
| 8 | ** This program is distributed in the hope that it will be useful, |
| 9 | ** but without any warranty; without even the implied warranty of |
| 10 | ** merchantability or fitness for a particular purpose. |
| 11 | ** |
| 12 | ** Contact: wyoung on the Fossil forum, https |
| 13 | ******************************************************************************* |
| 14 | ** |
| 15 | ** Thisspecific to the Fossil default skin. |
| 16 | ** Currently, the only thing this does is handle clicks on isition the hddrop container. |
| 17 | */ |
| 18 | (function() { |
| 19 | var hbButton = document.getElementById("hbbtn"); |
| 20 | if (!hbButton) return; // no hamburger button |
| 21 | if (!document.addEventListener) return; // Incompatible browser |
| 22 | var panel = document.getElementById("hbdrop"); |
| 23 | if (!panel) return; // site admin might've nuked it |
| 24 | if (!panel.style) return; // shouldn't happen, but be sure |
| 25 | var panelBorder = panel.style.border; |
| 26 | var panelInitialized = false; // reset if browser window is resized |
| 27 | var panelResetBorderTimerID = 0; // used to cancel post-animation tasks |
| 28 | |
| 29 | // Disable animation if this browser doesn't support CSS transitions. |
| 30 | // |
| 31 | // We need this ugly calling form for old browsers that don't allow |
| 32 | // panel.style.hasOwnProperty('transition'); catering to old browsers |
| 33 | // is the whole point here. |
| 34 | var animate = panel.style.transition !== null && (typeof(panel.style.transition) == "string"); |
| 35 | |
| 36 | // The duration of the animation can be overridden from the default skin |
| 37 | // header.txt by setting the "data-anim-ms" attribute of the panel. |
| 38 | var animMS = panel.getAttribute("data-anim-ms"); |
| 39 | if (animMS) { // not null or empty string, parse it |
| 40 | animMS = parseInt(animMS); |
| 41 | if (isNaN(animMS) || animMS == 0) |
| 42 | animate = false; // disable animation if non-numeric or zero |
| 43 | else if (animMS < 0) |
| 44 | animMS = 400; // set default animation duration if negative |
| 45 | } |
| 46 | else // attribute is null or empty string, use default |
| 47 | animMS = 400; |
| 48 | |
| 49 | // Calculate panel height despite its being hidden at call time. |
| 50 | // Based on https://stackoverflow.com/a/29047447/142454 |
| 51 | var panelHeight; // computed on first panel display |
| 52 | function calculatePanelHeight() { |
| 53 | |
| 54 | // Clear the max-height CSS property in case the panel size is recalculated |
| 55 | // after the browser window was resized. |
| 56 | panel.style.maxHeight = ''; |
| 57 | |
| 58 | // Get initial panel styles so we can restore them below. |
| 59 | var es = window.getComputedStyle(panel), |
| 60 | edis = es.display, |
| 61 | epos = es.position, |
| 62 | evis = es.visibility; |
| 63 | |
| 64 | // Restyle the panel so we can measure its height while invisible. |
| 65 | panel.style.visibility = 'hidden'; |
| 66 | panel.style.position = 'absolute'; |
| 67 | panel.style.display = 'block'; |
| 68 | panelHeight = panel.offsetHeight + 'px'; |
| 69 | |
| 70 | // Revert styles now that job is done. |
| 71 | panel.style.display = edis; |
| 72 | panel.style.position = epos; |
| 73 | panel.style.visibility = evis; |
| 74 | } |
| 75 | |
| 76 | // Show the panel by changing the panel height, which kicks off the |
| 77 | // slide-open/closed transition set up in the XHR onload handler. |
| 78 | // |
| 79 | // Schedule the change for a near-future time in case this is the |
| 80 | // first call, where the div was initially invisible. If we were |
| 81 | // to change the panel's visibility and height at the same time |
| 82 | // instead, that would prevent the browser from seeing the height |
| 83 | // change as a state transition, so it'd skip the CSS transition: |
| 84 | // |
| 85 | // https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Transitions/Using_CSS_transitions#JavaScript_examples |
| 86 | function showPanel() { |
| 87 | // Cancel the timer to remove the panel border after the closing animation, |
| 88 | // otherwise double-clicking the hamburger button with the panel opened will |
| 89 | // remove the borders from the (closed and immediately reopened) panel. |
| 90 | if (panelResetBorderTimerID) { |
| 91 | clearTimeout(panelResetBorderTimerID); |
| 92 | panelResetBorderTimerID = 0; |
| 93 | } |
| 94 | if (animate) { |
| 95 | if (!panelInitialized) { |
| 96 | panelInitialized = true; |
| 97 | // Set up a CSS transition to animate the panel open and |
| 98 | // closed. Only needs to be done once per page load. |
| 99 | // Based on https://stackoverflow.com/a/29047447/142454 |
| 100 | calculatePanelHeight(); |
| 101 | panel.style.transition = 'max-height ' + animMS + |
| 102 | 'ms ease-in-out'; |
| 103 | panel.style.overflowY = 'hidden'; |
| 104 | panel.style.maxHeight = '0'; |
| 105 | } |
| 106 | setTimeout(function() { |
| 107 | panel.style.maxHeight = panelHeight; |
| 108 | panel.style.border = panelBorder; |
| 109 | }, 40); // 25ms is insufficient with Firefox 62 |
| 110 | } |
| 111 | panel.style.display = 'block'; |
| 112 | document.addEventListener('keydown',panelKeydown,/* useCapture == */true); |
| 113 | document.addEventListener('click',panelClick,false); |
| 114 | } |
| 115 | |
| 116 | var panelKeydown = function(event) { |
| 117 | var key = event.which || event.keyCode; |
| 118 | if (key == 27) { |
| 119 | event.stopPropagation(); // ignore other keydown handlers |
| 120 | panelToggle(true); |
| 121 | } |
| 122 | }; |
| 123 | |
| 124 | var panelClick = function(event) { |
| 125 | if (!panel.contains(event.target)) { |
| 126 | // Call event.preventDefault() to have clicks outside the opened panel |
| 127 | // just close the panel, and swallow clicks on links or form elements. |
| 128 | //event.preventDefault(); |
| 129 | panelToggle(true); |
| 130 | } |
| 131 | }; |
| 132 | |
| 133 | // Return true if the panel is showing. |
| 134 | function panelShowing() { |
| 135 | if (animate) { |
| 136 | return panel.style.maxHeight == panelHeight; |
| 137 | } |
| 138 | else { |
| 139 | return panel.style.display == 'block'; |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | // Check if the specified HTML element has any child elements. Note that plain |
| 144 | // text nodes, comments, and any spaces (presentational or not) are ignored. |
| 145 | function hasChildren(element) { |
| 146 | var childElement = element.firstChild; |
| 147 | while (childElement) { |
| 148 | if (childElement.nodeType == 1) // Node.ELEMENT_NODE == 1 |
| 149 | return true; |
| 150 | childElement = childElement.nextSibling; |
| 151 | } |
| 152 | return false; |
| 153 | } |
| 154 | |
| 155 | // Reset the state of the panel to uninitialized if the browser window is |
| 156 | // resized, so the dimensions are recalculated the next time it's opened. |
| 157 | window.addEventListener('resize',function(event) { |
| 158 | panelInitialized = false; |
| 159 | },false); |
| 160 | |
| 161 | // Click handler for the hamburger button. |
| 162 | hbButton.addEventListener('click',function(event) { |
| 163 | // Break the event handler chain, or the handler for document → click |
| 164 | // (about to be installed) may already be triggered by the current event. |
| 165 | event.stopPropagation(); |
| 166 | event.preventDefault(); // prevent browser from acting on <a> click |
| 167 | panelToggle(false); |
| 168 | },false); |
| 169 | |
| 170 | function panelToggle(suppressAnimation) { |
| 171 | if (panelShowing()) { |
| 172 | document.removeEventListener('keydown',panelKeydown,/* useCapture == */true); |
| 173 | document.removeEventListener('click',panelClick,false); |
| 174 | // Transition back to hidden state. |
| 175 | if (animate) { |
| 176 | if (suppressAnimation) { |
| 177 | var transition = panel.style.transition; |
| 178 | panel.style.transition = ''; |
| 179 | panel.style.maxHeight = '0'; |
| 180 | panel.style.border = 'none'; |
| 181 | setTimeout(function() { |
| 182 | // Make sure CSS transition won't take effect now, so restore it |
| 183 | // asynchronously. Outer variable 'transition' still valid here. |
| 184 | panel.style.transition = transition; |
| 185 | }, 40); // 25ms is insufficient with Firefox 62 |
| 186 | } |
| 187 | else { |
| 188 | panel.style.maxHeight = '0'; |
| 189 | panelResetBorderTimerID = setTimeout(function() { |
| 190 | // Browsers show a 1px high border line when maxHeight == 0, |
| 191 | // our "hidden" state, so hide the borders in that state, too. |
| 192 | panel.style.border = 'none'; |
| 193 | panelResetBorderTimerID = 0; // clear ID of completed timer |
| 194 | }, animMS); |
| 195 | } |
| 196 | } |
| 197 | else { |
| 198 | panel.style.display = 'none'; |
| 199 | } |
| 200 | } |
| 201 | else { |
| 202 | if (!hasChildren(panel)) { |
| 203 | // Only get the sitemap once per page load: it isn't likely to |
| 204 | // change on us. |
| 205 | var xhr = new XMLHttpRequest(); |
| 206 | xhr.onload = function() { |
| 207 | var doc = xhr.responseXML; |
| 208 | if (doc) { |
| 209 | var sm = doc.querySelector("ul#sitemap"); |
| 210 | if (sm && xhr.status == 200) { |
| 211 | // Got sitemap. Insert it into the drop-down panel. |
| 212 | panel.innerHTML = sm.outerHTML; |
| 213 | // Display the panel |
| 214 | showPanel(); |
| 215 | } |
| 216 | } |
| 217 | // else, can't parse response as HTML or XML |
| 218 | } |
| 219 | xhr.open("GET xhr.open("GET", url); |
| 220 | xhr.responseType = "document"; |
| 221 | xhr.send(); |
| 222 | } |
| 223 | else { |
| 224 | showPanel(); // just show what we built abo{ |
| 225 | // Turn the button into ncompatible browser |
| 226 | var panel = document.getElementById("hbdrop"); |
| 227 | if (!panel) return; // site admin might've nuked it |
| 228 | if (!panel.style) return; // shouldn't happen, but b |
| --- a/skins/default/js.txt | |
| +++ b/skins/default/js.txt | |
| @@ -1,228 +0,0 @@ | |
+1
-3
| --- skins/plain_gray/header.txt | ||
| +++ skins/plain_gray/header.txt | ||
| @@ -2,10 +2,11 @@ | ||
| 2 | 2 | <div class="title">$<project_name>: $<title></div> |
| 3 | 3 | </div> |
| 4 | 4 | <div class="mainmenu"> |
| 5 | 5 | <th1> |
| 6 | 6 | html "<a id='hbbtn' href='$home/sitemap' aria-label='Site Map'>☰</a>" |
| 7 | +builtin_request_js hbmenu.js | |
| 7 | 8 | html "<a href='$home$index_page'>Home</a>\n" |
| 8 | 9 | if {[anycap jor]} { |
| 9 | 10 | html "<a href='$home/timeline'>Timeline</a>\n" |
| 10 | 11 | } |
| 11 | 12 | if {[anoncap oh]} { |
| @@ -32,8 +33,5 @@ | ||
| 32 | 33 | } else { |
| 33 | 34 | html "<a href='$home/login'>Login</a>\n" |
| 34 | 35 | } |
| 35 | 36 | </th1></div> |
| 36 | 37 | <div id='hbdrop' class='hbdrop'></div> |
| 37 | -<script nonce="$nonce"> | |
| 38 | -<th1>styleScript skins/default/js.txt</th1> | |
| 39 | -</script> | |
| 40 | 38 | |
| 41 | 39 | ADDED src/hbmenu.js |
| --- skins/plain_gray/header.txt | |
| +++ skins/plain_gray/header.txt | |
| @@ -2,10 +2,11 @@ | |
| 2 | <div class="title">$<project_name>: $<title></div> |
| 3 | </div> |
| 4 | <div class="mainmenu"> |
| 5 | <th1> |
| 6 | html "<a id='hbbtn' href='$home/sitemap' aria-label='Site Map'>☰</a>" |
| 7 | html "<a href='$home$index_page'>Home</a>\n" |
| 8 | if {[anycap jor]} { |
| 9 | html "<a href='$home/timeline'>Timeline</a>\n" |
| 10 | } |
| 11 | if {[anoncap oh]} { |
| @@ -32,8 +33,5 @@ | |
| 32 | } else { |
| 33 | html "<a href='$home/login'>Login</a>\n" |
| 34 | } |
| 35 | </th1></div> |
| 36 | <div id='hbdrop' class='hbdrop'></div> |
| 37 | <script nonce="$nonce"> |
| 38 | <th1>styleScript skins/default/js.txt</th1> |
| 39 | </script> |
| 40 | |
| 41 | DDED src/hbmenu.js |
| --- skins/plain_gray/header.txt | |
| +++ skins/plain_gray/header.txt | |
| @@ -2,10 +2,11 @@ | |
| 2 | <div class="title">$<project_name>: $<title></div> |
| 3 | </div> |
| 4 | <div class="mainmenu"> |
| 5 | <th1> |
| 6 | html "<a id='hbbtn' href='$home/sitemap' aria-label='Site Map'>☰</a>" |
| 7 | builtin_request_js hbmenu.js |
| 8 | html "<a href='$home$index_page'>Home</a>\n" |
| 9 | if {[anycap jor]} { |
| 10 | html "<a href='$home/timeline'>Timeline</a>\n" |
| 11 | } |
| 12 | if {[anoncap oh]} { |
| @@ -32,8 +33,5 @@ | |
| 33 | } else { |
| 34 | html "<a href='$home/login'>Login</a>\n" |
| 35 | } |
| 36 | </th1></div> |
| 37 | <div id='hbdrop' class='hbdrop'></div> |
| 38 | |
| 39 | DDED src/hbmenu.js |
+31
-9
| --- a/src/hbmenu.js | ||
| +++ b/src/hbmenu.js | ||
| @@ -1,5 +1,5 @@ | ||
| 1 | 1 | /* |
| 2 | -** Copyright © 2018 Warren Young | |
| 2 | +** Originally: Copyright © 2018 Warren Young | |
| 3 | 3 | ** |
| 4 | 4 | ** This program is free software; you can redistribute it and/or |
| 5 | 5 | ** modify it under the terms of the Simplified BSD License (also |
| @@ -9,11 +9,37 @@ | ||
| 9 | 9 | ** but without any warranty; without even the implied warranty of |
| 10 | 10 | ** merchantability or fitness for a particular purpose. |
| 11 | 11 | ** |
| 12 | -** Contact: wyoung on the Fossil forum, https | |
| 12 | +** Contact: wyoung on the Fossil forum, https://fossil-scm.org/forum/ | |
| 13 | +** Modified by others. | |
| 14 | +** | |
| 13 | 15 | ******************************************************************************* |
| 14 | 16 | ** |
| 15 | -** Thisspecific to the Fossil default skin. | |
| 16 | -** Currently, the only thing this does is handle clicks on isition the hddrop container. | |
| 17 | +** This file contains the JS code used to implement the expanding hamburger | |
| 18 | +** menu on various skins. | |
| 19 | +** | |
| 20 | +** This was original the "js.txt" file for the default skin. It was subsequently | |
| 21 | +** moved into src/hbmenu.js so that it could be more easily reused by other skins | |
| 22 | +** using the "builtin_request_js" TH1 command. | |
| 23 | +** | |
| 24 | +** Operation: | |
| 25 | +** | |
| 26 | +** This script request that the HTML contain two elements: | |
| 27 | +** | |
| 28 | +** <a id="hbbtn"> <--- The hambdiger menu button | |
| 29 | +** <nav id="hbdrop"> <--- Container for the hamburger menu | |
| 30 | +** | |
| 31 | +** Bindings are made on hbbtn so that when it is clicked, the following | |
| 32 | +** happens: | |
| 33 | +** | |
| 34 | +** 1. An XHR is made to /sitemap?popup to fetch the HTML for the | |
| 35 | +** popup menu. | |
| 36 | +** | |
| 37 | +** 2. The HTML for the popup is inserted into hddrop. | |
| 38 | +** | |
| 39 | +** 3. The hddrop container is made visible. | |
| 40 | +** | |
| 41 | +** CSS rules are also needed to cause the hddrop to be initially invisible, | |
| 42 | +** and to correctly style and position the hddrop container. | |
| 17 | 43 | */ |
| 18 | 44 | (function() { |
| 19 | 45 | var hbButton = document.getElementById("hbbtn"); |
| @@ -221,8 +247,4 @@ | ||
| 221 | 247 | xhr.send(); |
| 222 | 248 | } |
| 223 | 249 | else { |
| 224 | - showPanel(); // just show what we built abo{ | |
| 225 | - // Turn the button into ncompatible browser | |
| 226 | - var panel = document.getElementById("hbdrop"); | |
| 227 | - if (!panel) return; // site admin might've nuked it | |
| 228 | - if (!panel.style) return; // shouldn't happen, but b | |
| 250 | + showPanel(); // just show what we built abo |
| --- a/src/hbmenu.js | |
| +++ b/src/hbmenu.js | |
| @@ -1,5 +1,5 @@ | |
| 1 | /* |
| 2 | ** Copyright © 2018 Warren Young |
| 3 | ** |
| 4 | ** This program is free software; you can redistribute it and/or |
| 5 | ** modify it under the terms of the Simplified BSD License (also |
| @@ -9,11 +9,37 @@ | |
| 9 | ** but without any warranty; without even the implied warranty of |
| 10 | ** merchantability or fitness for a particular purpose. |
| 11 | ** |
| 12 | ** Contact: wyoung on the Fossil forum, https |
| 13 | ******************************************************************************* |
| 14 | ** |
| 15 | ** Thisspecific to the Fossil default skin. |
| 16 | ** Currently, the only thing this does is handle clicks on isition the hddrop container. |
| 17 | */ |
| 18 | (function() { |
| 19 | var hbButton = document.getElementById("hbbtn"); |
| @@ -221,8 +247,4 @@ | |
| 221 | xhr.send(); |
| 222 | } |
| 223 | else { |
| 224 | showPanel(); // just show what we built abo{ |
| 225 | // Turn the button into ncompatible browser |
| 226 | var panel = document.getElementById("hbdrop"); |
| 227 | if (!panel) return; // site admin might've nuked it |
| 228 | if (!panel.style) return; // shouldn't happen, but b |
| --- a/src/hbmenu.js | |
| +++ b/src/hbmenu.js | |
| @@ -1,5 +1,5 @@ | |
| 1 | /* |
| 2 | ** Originally: Copyright © 2018 Warren Young |
| 3 | ** |
| 4 | ** This program is free software; you can redistribute it and/or |
| 5 | ** modify it under the terms of the Simplified BSD License (also |
| @@ -9,11 +9,37 @@ | |
| 9 | ** but without any warranty; without even the implied warranty of |
| 10 | ** merchantability or fitness for a particular purpose. |
| 11 | ** |
| 12 | ** Contact: wyoung on the Fossil forum, https://fossil-scm.org/forum/ |
| 13 | ** Modified by others. |
| 14 | ** |
| 15 | ******************************************************************************* |
| 16 | ** |
| 17 | ** This file contains the JS code used to implement the expanding hamburger |
| 18 | ** menu on various skins. |
| 19 | ** |
| 20 | ** This was original the "js.txt" file for the default skin. It was subsequently |
| 21 | ** moved into src/hbmenu.js so that it could be more easily reused by other skins |
| 22 | ** using the "builtin_request_js" TH1 command. |
| 23 | ** |
| 24 | ** Operation: |
| 25 | ** |
| 26 | ** This script request that the HTML contain two elements: |
| 27 | ** |
| 28 | ** <a id="hbbtn"> <--- The hambdiger menu button |
| 29 | ** <nav id="hbdrop"> <--- Container for the hamburger menu |
| 30 | ** |
| 31 | ** Bindings are made on hbbtn so that when it is clicked, the following |
| 32 | ** happens: |
| 33 | ** |
| 34 | ** 1. An XHR is made to /sitemap?popup to fetch the HTML for the |
| 35 | ** popup menu. |
| 36 | ** |
| 37 | ** 2. The HTML for the popup is inserted into hddrop. |
| 38 | ** |
| 39 | ** 3. The hddrop container is made visible. |
| 40 | ** |
| 41 | ** CSS rules are also needed to cause the hddrop to be initially invisible, |
| 42 | ** and to correctly style and position the hddrop container. |
| 43 | */ |
| 44 | (function() { |
| 45 | var hbButton = document.getElementById("hbbtn"); |
| @@ -221,8 +247,4 @@ | |
| 247 | xhr.send(); |
| 248 | } |
| 249 | else { |
| 250 | showPanel(); // just show what we built abo |
+5
-1
| --- src/main.mk | ||
| +++ src/main.mk | ||
| @@ -168,14 +168,16 @@ | ||
| 168 | 168 | $(SRCDIR)/../skins/aht/details.txt \ |
| 169 | 169 | $(SRCDIR)/../skins/ardoise/css.txt \ |
| 170 | 170 | $(SRCDIR)/../skins/ardoise/details.txt \ |
| 171 | 171 | $(SRCDIR)/../skins/ardoise/footer.txt \ |
| 172 | 172 | $(SRCDIR)/../skins/ardoise/header.txt \ |
| 173 | + $(SRCDIR)/../skins/ardoise/menu.txt \ | |
| 173 | 174 | $(SRCDIR)/../skins/black_and_white/css.txt \ |
| 174 | 175 | $(SRCDIR)/../skins/black_and_white/details.txt \ |
| 175 | 176 | $(SRCDIR)/../skins/black_and_white/footer.txt \ |
| 176 | 177 | $(SRCDIR)/../skins/black_and_white/header.txt \ |
| 178 | + $(SRCDIR)/../skins/black_and_white/menu.txt \ | |
| 177 | 179 | $(SRCDIR)/../skins/blitz/css.txt \ |
| 178 | 180 | $(SRCDIR)/../skins/blitz/details.txt \ |
| 179 | 181 | $(SRCDIR)/../skins/blitz/footer.txt \ |
| 180 | 182 | $(SRCDIR)/../skins/blitz/header.txt \ |
| 181 | 183 | $(SRCDIR)/../skins/blitz/ticket.txt \ |
| @@ -190,15 +192,16 @@ | ||
| 190 | 192 | $(SRCDIR)/../skins/bootstrap/header.txt \ |
| 191 | 193 | $(SRCDIR)/../skins/default/css.txt \ |
| 192 | 194 | $(SRCDIR)/../skins/default/details.txt \ |
| 193 | 195 | $(SRCDIR)/../skins/default/footer.txt \ |
| 194 | 196 | $(SRCDIR)/../skins/default/header.txt \ |
| 195 | - $(SRCDIR)/../skins/default/js.txt \ | |
| 197 | + $(SRCDIR)/../skins/default/menu.txt \ | |
| 196 | 198 | $(SRCDIR)/../skins/eagle/css.txt \ |
| 197 | 199 | $(SRCDIR)/../skins/eagle/details.txt \ |
| 198 | 200 | $(SRCDIR)/../skins/eagle/footer.txt \ |
| 199 | 201 | $(SRCDIR)/../skins/eagle/header.txt \ |
| 202 | + $(SRCDIR)/../skins/eagle/menu.txt \ | |
| 200 | 203 | $(SRCDIR)/../skins/enhanced1/css.txt \ |
| 201 | 204 | $(SRCDIR)/../skins/enhanced1/details.txt \ |
| 202 | 205 | $(SRCDIR)/../skins/enhanced1/footer.txt \ |
| 203 | 206 | $(SRCDIR)/../skins/enhanced1/header.txt \ |
| 204 | 207 | $(SRCDIR)/../skins/khaki/css.txt \ |
| @@ -246,10 +249,11 @@ | ||
| 246 | 249 | $(SRCDIR)/fossil.popupwidget.js \ |
| 247 | 250 | $(SRCDIR)/fossil.storage.js \ |
| 248 | 251 | $(SRCDIR)/fossil.tabs.js \ |
| 249 | 252 | $(SRCDIR)/fossil.wikiedit-wysiwyg.js \ |
| 250 | 253 | $(SRCDIR)/graph.js \ |
| 254 | + $(SRCDIR)/hbmenu.js \ | |
| 251 | 255 | $(SRCDIR)/href.js \ |
| 252 | 256 | $(SRCDIR)/login.js \ |
| 253 | 257 | $(SRCDIR)/markdown.md \ |
| 254 | 258 | $(SRCDIR)/menu.js \ |
| 255 | 259 | $(SRCDIR)/sbsdiff.js \ |
| 256 | 260 |
| --- src/main.mk | |
| +++ src/main.mk | |
| @@ -168,14 +168,16 @@ | |
| 168 | $(SRCDIR)/../skins/aht/details.txt \ |
| 169 | $(SRCDIR)/../skins/ardoise/css.txt \ |
| 170 | $(SRCDIR)/../skins/ardoise/details.txt \ |
| 171 | $(SRCDIR)/../skins/ardoise/footer.txt \ |
| 172 | $(SRCDIR)/../skins/ardoise/header.txt \ |
| 173 | $(SRCDIR)/../skins/black_and_white/css.txt \ |
| 174 | $(SRCDIR)/../skins/black_and_white/details.txt \ |
| 175 | $(SRCDIR)/../skins/black_and_white/footer.txt \ |
| 176 | $(SRCDIR)/../skins/black_and_white/header.txt \ |
| 177 | $(SRCDIR)/../skins/blitz/css.txt \ |
| 178 | $(SRCDIR)/../skins/blitz/details.txt \ |
| 179 | $(SRCDIR)/../skins/blitz/footer.txt \ |
| 180 | $(SRCDIR)/../skins/blitz/header.txt \ |
| 181 | $(SRCDIR)/../skins/blitz/ticket.txt \ |
| @@ -190,15 +192,16 @@ | |
| 190 | $(SRCDIR)/../skins/bootstrap/header.txt \ |
| 191 | $(SRCDIR)/../skins/default/css.txt \ |
| 192 | $(SRCDIR)/../skins/default/details.txt \ |
| 193 | $(SRCDIR)/../skins/default/footer.txt \ |
| 194 | $(SRCDIR)/../skins/default/header.txt \ |
| 195 | $(SRCDIR)/../skins/default/js.txt \ |
| 196 | $(SRCDIR)/../skins/eagle/css.txt \ |
| 197 | $(SRCDIR)/../skins/eagle/details.txt \ |
| 198 | $(SRCDIR)/../skins/eagle/footer.txt \ |
| 199 | $(SRCDIR)/../skins/eagle/header.txt \ |
| 200 | $(SRCDIR)/../skins/enhanced1/css.txt \ |
| 201 | $(SRCDIR)/../skins/enhanced1/details.txt \ |
| 202 | $(SRCDIR)/../skins/enhanced1/footer.txt \ |
| 203 | $(SRCDIR)/../skins/enhanced1/header.txt \ |
| 204 | $(SRCDIR)/../skins/khaki/css.txt \ |
| @@ -246,10 +249,11 @@ | |
| 246 | $(SRCDIR)/fossil.popupwidget.js \ |
| 247 | $(SRCDIR)/fossil.storage.js \ |
| 248 | $(SRCDIR)/fossil.tabs.js \ |
| 249 | $(SRCDIR)/fossil.wikiedit-wysiwyg.js \ |
| 250 | $(SRCDIR)/graph.js \ |
| 251 | $(SRCDIR)/href.js \ |
| 252 | $(SRCDIR)/login.js \ |
| 253 | $(SRCDIR)/markdown.md \ |
| 254 | $(SRCDIR)/menu.js \ |
| 255 | $(SRCDIR)/sbsdiff.js \ |
| 256 |
| --- src/main.mk | |
| +++ src/main.mk | |
| @@ -168,14 +168,16 @@ | |
| 168 | $(SRCDIR)/../skins/aht/details.txt \ |
| 169 | $(SRCDIR)/../skins/ardoise/css.txt \ |
| 170 | $(SRCDIR)/../skins/ardoise/details.txt \ |
| 171 | $(SRCDIR)/../skins/ardoise/footer.txt \ |
| 172 | $(SRCDIR)/../skins/ardoise/header.txt \ |
| 173 | $(SRCDIR)/../skins/ardoise/menu.txt \ |
| 174 | $(SRCDIR)/../skins/black_and_white/css.txt \ |
| 175 | $(SRCDIR)/../skins/black_and_white/details.txt \ |
| 176 | $(SRCDIR)/../skins/black_and_white/footer.txt \ |
| 177 | $(SRCDIR)/../skins/black_and_white/header.txt \ |
| 178 | $(SRCDIR)/../skins/black_and_white/menu.txt \ |
| 179 | $(SRCDIR)/../skins/blitz/css.txt \ |
| 180 | $(SRCDIR)/../skins/blitz/details.txt \ |
| 181 | $(SRCDIR)/../skins/blitz/footer.txt \ |
| 182 | $(SRCDIR)/../skins/blitz/header.txt \ |
| 183 | $(SRCDIR)/../skins/blitz/ticket.txt \ |
| @@ -190,15 +192,16 @@ | |
| 192 | $(SRCDIR)/../skins/bootstrap/header.txt \ |
| 193 | $(SRCDIR)/../skins/default/css.txt \ |
| 194 | $(SRCDIR)/../skins/default/details.txt \ |
| 195 | $(SRCDIR)/../skins/default/footer.txt \ |
| 196 | $(SRCDIR)/../skins/default/header.txt \ |
| 197 | $(SRCDIR)/../skins/default/menu.txt \ |
| 198 | $(SRCDIR)/../skins/eagle/css.txt \ |
| 199 | $(SRCDIR)/../skins/eagle/details.txt \ |
| 200 | $(SRCDIR)/../skins/eagle/footer.txt \ |
| 201 | $(SRCDIR)/../skins/eagle/header.txt \ |
| 202 | $(SRCDIR)/../skins/eagle/menu.txt \ |
| 203 | $(SRCDIR)/../skins/enhanced1/css.txt \ |
| 204 | $(SRCDIR)/../skins/enhanced1/details.txt \ |
| 205 | $(SRCDIR)/../skins/enhanced1/footer.txt \ |
| 206 | $(SRCDIR)/../skins/enhanced1/header.txt \ |
| 207 | $(SRCDIR)/../skins/khaki/css.txt \ |
| @@ -246,10 +249,11 @@ | |
| 249 | $(SRCDIR)/fossil.popupwidget.js \ |
| 250 | $(SRCDIR)/fossil.storage.js \ |
| 251 | $(SRCDIR)/fossil.tabs.js \ |
| 252 | $(SRCDIR)/fossil.wikiedit-wysiwyg.js \ |
| 253 | $(SRCDIR)/graph.js \ |
| 254 | $(SRCDIR)/hbmenu.js \ |
| 255 | $(SRCDIR)/href.js \ |
| 256 | $(SRCDIR)/login.js \ |
| 257 | $(SRCDIR)/markdown.md \ |
| 258 | $(SRCDIR)/menu.js \ |
| 259 | $(SRCDIR)/sbsdiff.js \ |
| 260 |
+27
| --- src/th_main.c | ||
| +++ src/th_main.c | ||
| @@ -1492,10 +1492,15 @@ | ||
| 1492 | 1492 | /* |
| 1493 | 1493 | ** TH1 command: styleScript ?BUILTIN-FILENAME? |
| 1494 | 1494 | ** |
| 1495 | 1495 | ** Render the js.txt file from the current skin. Or, if an argument |
| 1496 | 1496 | ** is supplied, render the built-in filename given. |
| 1497 | +** | |
| 1498 | +** By "rendering" we mean that the script is loaded and run through | |
| 1499 | +** TH1 to expand variables and process <th1>...</th1> script. Contrast | |
| 1500 | +** with the "builtin_request_js BUILTIN-FILENAME" command which just | |
| 1501 | +** loads the file as-is without interpretation. | |
| 1497 | 1502 | */ |
| 1498 | 1503 | static int styleScriptCmd( |
| 1499 | 1504 | Th_Interp *interp, |
| 1500 | 1505 | void *p, |
| 1501 | 1506 | int argc, |
| @@ -1520,10 +1525,31 @@ | ||
| 1520 | 1525 | Th_SetResult(interp, "repository unavailable", -1); |
| 1521 | 1526 | return TH_ERROR; |
| 1522 | 1527 | } |
| 1523 | 1528 | } |
| 1524 | 1529 | |
| 1530 | +/* | |
| 1531 | +** TH1 command: builtin_request_js NAME | |
| 1532 | +** | |
| 1533 | +** Request that the built-in javascript file called NAME be added to the | |
| 1534 | +** end of the generated page. | |
| 1535 | +** | |
| 1536 | +** See also: styleScript | |
| 1537 | +*/ | |
| 1538 | +static int builtinRequestJsCmd( | |
| 1539 | + Th_Interp *interp, | |
| 1540 | + void *p, | |
| 1541 | + int argc, | |
| 1542 | + const char **argv, | |
| 1543 | + int *argl | |
| 1544 | +){ | |
| 1545 | + if( argc!=2 ){ | |
| 1546 | + return Th_WrongNumArgs(interp, "builtin_request_js NAME"); | |
| 1547 | + } | |
| 1548 | + builtin_request_js(argv[1]); | |
| 1549 | + return TH_OK; | |
| 1550 | +} | |
| 1525 | 1551 | |
| 1526 | 1552 | /* |
| 1527 | 1553 | ** TH1 command: artifact ID ?FILENAME? |
| 1528 | 1554 | ** |
| 1529 | 1555 | ** Attempts to locate the specified artifact and return its contents. An |
| @@ -2237,10 +2263,11 @@ | ||
| 2237 | 2263 | void *pContext; |
| 2238 | 2264 | } aCommand[] = { |
| 2239 | 2265 | {"anoncap", hascapCmd, (void*)&anonFlag}, |
| 2240 | 2266 | {"anycap", anycapCmd, 0}, |
| 2241 | 2267 | {"artifact", artifactCmd, 0}, |
| 2268 | + {"builtin_request_js", builtinRequestJsCmd, 0}, | |
| 2242 | 2269 | {"captureTh1", captureTh1Cmd, 0}, |
| 2243 | 2270 | {"cgiHeaderLine", cgiHeaderLineCmd, 0}, |
| 2244 | 2271 | {"checkout", checkoutCmd, 0}, |
| 2245 | 2272 | {"combobox", comboboxCmd, 0}, |
| 2246 | 2273 | {"copybtn", copybtnCmd, 0}, |
| 2247 | 2274 |
| --- src/th_main.c | |
| +++ src/th_main.c | |
| @@ -1492,10 +1492,15 @@ | |
| 1492 | /* |
| 1493 | ** TH1 command: styleScript ?BUILTIN-FILENAME? |
| 1494 | ** |
| 1495 | ** Render the js.txt file from the current skin. Or, if an argument |
| 1496 | ** is supplied, render the built-in filename given. |
| 1497 | */ |
| 1498 | static int styleScriptCmd( |
| 1499 | Th_Interp *interp, |
| 1500 | void *p, |
| 1501 | int argc, |
| @@ -1520,10 +1525,31 @@ | |
| 1520 | Th_SetResult(interp, "repository unavailable", -1); |
| 1521 | return TH_ERROR; |
| 1522 | } |
| 1523 | } |
| 1524 | |
| 1525 | |
| 1526 | /* |
| 1527 | ** TH1 command: artifact ID ?FILENAME? |
| 1528 | ** |
| 1529 | ** Attempts to locate the specified artifact and return its contents. An |
| @@ -2237,10 +2263,11 @@ | |
| 2237 | void *pContext; |
| 2238 | } aCommand[] = { |
| 2239 | {"anoncap", hascapCmd, (void*)&anonFlag}, |
| 2240 | {"anycap", anycapCmd, 0}, |
| 2241 | {"artifact", artifactCmd, 0}, |
| 2242 | {"captureTh1", captureTh1Cmd, 0}, |
| 2243 | {"cgiHeaderLine", cgiHeaderLineCmd, 0}, |
| 2244 | {"checkout", checkoutCmd, 0}, |
| 2245 | {"combobox", comboboxCmd, 0}, |
| 2246 | {"copybtn", copybtnCmd, 0}, |
| 2247 |
| --- src/th_main.c | |
| +++ src/th_main.c | |
| @@ -1492,10 +1492,15 @@ | |
| 1492 | /* |
| 1493 | ** TH1 command: styleScript ?BUILTIN-FILENAME? |
| 1494 | ** |
| 1495 | ** Render the js.txt file from the current skin. Or, if an argument |
| 1496 | ** is supplied, render the built-in filename given. |
| 1497 | ** |
| 1498 | ** By "rendering" we mean that the script is loaded and run through |
| 1499 | ** TH1 to expand variables and process <th1>...</th1> script. Contrast |
| 1500 | ** with the "builtin_request_js BUILTIN-FILENAME" command which just |
| 1501 | ** loads the file as-is without interpretation. |
| 1502 | */ |
| 1503 | static int styleScriptCmd( |
| 1504 | Th_Interp *interp, |
| 1505 | void *p, |
| 1506 | int argc, |
| @@ -1520,10 +1525,31 @@ | |
| 1525 | Th_SetResult(interp, "repository unavailable", -1); |
| 1526 | return TH_ERROR; |
| 1527 | } |
| 1528 | } |
| 1529 | |
| 1530 | /* |
| 1531 | ** TH1 command: builtin_request_js NAME |
| 1532 | ** |
| 1533 | ** Request that the built-in javascript file called NAME be added to the |
| 1534 | ** end of the generated page. |
| 1535 | ** |
| 1536 | ** See also: styleScript |
| 1537 | */ |
| 1538 | static int builtinRequestJsCmd( |
| 1539 | Th_Interp *interp, |
| 1540 | void *p, |
| 1541 | int argc, |
| 1542 | const char **argv, |
| 1543 | int *argl |
| 1544 | ){ |
| 1545 | if( argc!=2 ){ |
| 1546 | return Th_WrongNumArgs(interp, "builtin_request_js NAME"); |
| 1547 | } |
| 1548 | builtin_request_js(argv[1]); |
| 1549 | return TH_OK; |
| 1550 | } |
| 1551 | |
| 1552 | /* |
| 1553 | ** TH1 command: artifact ID ?FILENAME? |
| 1554 | ** |
| 1555 | ** Attempts to locate the specified artifact and return its contents. An |
| @@ -2237,10 +2263,11 @@ | |
| 2263 | void *pContext; |
| 2264 | } aCommand[] = { |
| 2265 | {"anoncap", hascapCmd, (void*)&anonFlag}, |
| 2266 | {"anycap", anycapCmd, 0}, |
| 2267 | {"artifact", artifactCmd, 0}, |
| 2268 | {"builtin_request_js", builtinRequestJsCmd, 0}, |
| 2269 | {"captureTh1", captureTh1Cmd, 0}, |
| 2270 | {"cgiHeaderLine", cgiHeaderLineCmd, 0}, |
| 2271 | {"checkout", checkoutCmd, 0}, |
| 2272 | {"combobox", comboboxCmd, 0}, |
| 2273 | {"copybtn", copybtnCmd, 0}, |
| 2274 |
+5
-1
| --- win/Makefile.mingw | ||
| +++ win/Makefile.mingw | ||
| @@ -580,14 +580,16 @@ | ||
| 580 | 580 | $(SRCDIR)/../skins/aht/details.txt \ |
| 581 | 581 | $(SRCDIR)/../skins/ardoise/css.txt \ |
| 582 | 582 | $(SRCDIR)/../skins/ardoise/details.txt \ |
| 583 | 583 | $(SRCDIR)/../skins/ardoise/footer.txt \ |
| 584 | 584 | $(SRCDIR)/../skins/ardoise/header.txt \ |
| 585 | + $(SRCDIR)/../skins/ardoise/menu.txt \ | |
| 585 | 586 | $(SRCDIR)/../skins/black_and_white/css.txt \ |
| 586 | 587 | $(SRCDIR)/../skins/black_and_white/details.txt \ |
| 587 | 588 | $(SRCDIR)/../skins/black_and_white/footer.txt \ |
| 588 | 589 | $(SRCDIR)/../skins/black_and_white/header.txt \ |
| 590 | + $(SRCDIR)/../skins/black_and_white/menu.txt \ | |
| 589 | 591 | $(SRCDIR)/../skins/blitz/css.txt \ |
| 590 | 592 | $(SRCDIR)/../skins/blitz/details.txt \ |
| 591 | 593 | $(SRCDIR)/../skins/blitz/footer.txt \ |
| 592 | 594 | $(SRCDIR)/../skins/blitz/header.txt \ |
| 593 | 595 | $(SRCDIR)/../skins/blitz/ticket.txt \ |
| @@ -602,15 +604,16 @@ | ||
| 602 | 604 | $(SRCDIR)/../skins/bootstrap/header.txt \ |
| 603 | 605 | $(SRCDIR)/../skins/default/css.txt \ |
| 604 | 606 | $(SRCDIR)/../skins/default/details.txt \ |
| 605 | 607 | $(SRCDIR)/../skins/default/footer.txt \ |
| 606 | 608 | $(SRCDIR)/../skins/default/header.txt \ |
| 607 | - $(SRCDIR)/../skins/default/js.txt \ | |
| 609 | + $(SRCDIR)/../skins/default/menu.txt \ | |
| 608 | 610 | $(SRCDIR)/../skins/eagle/css.txt \ |
| 609 | 611 | $(SRCDIR)/../skins/eagle/details.txt \ |
| 610 | 612 | $(SRCDIR)/../skins/eagle/footer.txt \ |
| 611 | 613 | $(SRCDIR)/../skins/eagle/header.txt \ |
| 614 | + $(SRCDIR)/../skins/eagle/menu.txt \ | |
| 612 | 615 | $(SRCDIR)/../skins/enhanced1/css.txt \ |
| 613 | 616 | $(SRCDIR)/../skins/enhanced1/details.txt \ |
| 614 | 617 | $(SRCDIR)/../skins/enhanced1/footer.txt \ |
| 615 | 618 | $(SRCDIR)/../skins/enhanced1/header.txt \ |
| 616 | 619 | $(SRCDIR)/../skins/khaki/css.txt \ |
| @@ -658,10 +661,11 @@ | ||
| 658 | 661 | $(SRCDIR)/fossil.popupwidget.js \ |
| 659 | 662 | $(SRCDIR)/fossil.storage.js \ |
| 660 | 663 | $(SRCDIR)/fossil.tabs.js \ |
| 661 | 664 | $(SRCDIR)/fossil.wikiedit-wysiwyg.js \ |
| 662 | 665 | $(SRCDIR)/graph.js \ |
| 666 | + $(SRCDIR)/hbmenu.js \ | |
| 663 | 667 | $(SRCDIR)/href.js \ |
| 664 | 668 | $(SRCDIR)/login.js \ |
| 665 | 669 | $(SRCDIR)/markdown.md \ |
| 666 | 670 | $(SRCDIR)/menu.js \ |
| 667 | 671 | $(SRCDIR)/sbsdiff.js \ |
| 668 | 672 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -580,14 +580,16 @@ | |
| 580 | $(SRCDIR)/../skins/aht/details.txt \ |
| 581 | $(SRCDIR)/../skins/ardoise/css.txt \ |
| 582 | $(SRCDIR)/../skins/ardoise/details.txt \ |
| 583 | $(SRCDIR)/../skins/ardoise/footer.txt \ |
| 584 | $(SRCDIR)/../skins/ardoise/header.txt \ |
| 585 | $(SRCDIR)/../skins/black_and_white/css.txt \ |
| 586 | $(SRCDIR)/../skins/black_and_white/details.txt \ |
| 587 | $(SRCDIR)/../skins/black_and_white/footer.txt \ |
| 588 | $(SRCDIR)/../skins/black_and_white/header.txt \ |
| 589 | $(SRCDIR)/../skins/blitz/css.txt \ |
| 590 | $(SRCDIR)/../skins/blitz/details.txt \ |
| 591 | $(SRCDIR)/../skins/blitz/footer.txt \ |
| 592 | $(SRCDIR)/../skins/blitz/header.txt \ |
| 593 | $(SRCDIR)/../skins/blitz/ticket.txt \ |
| @@ -602,15 +604,16 @@ | |
| 602 | $(SRCDIR)/../skins/bootstrap/header.txt \ |
| 603 | $(SRCDIR)/../skins/default/css.txt \ |
| 604 | $(SRCDIR)/../skins/default/details.txt \ |
| 605 | $(SRCDIR)/../skins/default/footer.txt \ |
| 606 | $(SRCDIR)/../skins/default/header.txt \ |
| 607 | $(SRCDIR)/../skins/default/js.txt \ |
| 608 | $(SRCDIR)/../skins/eagle/css.txt \ |
| 609 | $(SRCDIR)/../skins/eagle/details.txt \ |
| 610 | $(SRCDIR)/../skins/eagle/footer.txt \ |
| 611 | $(SRCDIR)/../skins/eagle/header.txt \ |
| 612 | $(SRCDIR)/../skins/enhanced1/css.txt \ |
| 613 | $(SRCDIR)/../skins/enhanced1/details.txt \ |
| 614 | $(SRCDIR)/../skins/enhanced1/footer.txt \ |
| 615 | $(SRCDIR)/../skins/enhanced1/header.txt \ |
| 616 | $(SRCDIR)/../skins/khaki/css.txt \ |
| @@ -658,10 +661,11 @@ | |
| 658 | $(SRCDIR)/fossil.popupwidget.js \ |
| 659 | $(SRCDIR)/fossil.storage.js \ |
| 660 | $(SRCDIR)/fossil.tabs.js \ |
| 661 | $(SRCDIR)/fossil.wikiedit-wysiwyg.js \ |
| 662 | $(SRCDIR)/graph.js \ |
| 663 | $(SRCDIR)/href.js \ |
| 664 | $(SRCDIR)/login.js \ |
| 665 | $(SRCDIR)/markdown.md \ |
| 666 | $(SRCDIR)/menu.js \ |
| 667 | $(SRCDIR)/sbsdiff.js \ |
| 668 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -580,14 +580,16 @@ | |
| 580 | $(SRCDIR)/../skins/aht/details.txt \ |
| 581 | $(SRCDIR)/../skins/ardoise/css.txt \ |
| 582 | $(SRCDIR)/../skins/ardoise/details.txt \ |
| 583 | $(SRCDIR)/../skins/ardoise/footer.txt \ |
| 584 | $(SRCDIR)/../skins/ardoise/header.txt \ |
| 585 | $(SRCDIR)/../skins/ardoise/menu.txt \ |
| 586 | $(SRCDIR)/../skins/black_and_white/css.txt \ |
| 587 | $(SRCDIR)/../skins/black_and_white/details.txt \ |
| 588 | $(SRCDIR)/../skins/black_and_white/footer.txt \ |
| 589 | $(SRCDIR)/../skins/black_and_white/header.txt \ |
| 590 | $(SRCDIR)/../skins/black_and_white/menu.txt \ |
| 591 | $(SRCDIR)/../skins/blitz/css.txt \ |
| 592 | $(SRCDIR)/../skins/blitz/details.txt \ |
| 593 | $(SRCDIR)/../skins/blitz/footer.txt \ |
| 594 | $(SRCDIR)/../skins/blitz/header.txt \ |
| 595 | $(SRCDIR)/../skins/blitz/ticket.txt \ |
| @@ -602,15 +604,16 @@ | |
| 604 | $(SRCDIR)/../skins/bootstrap/header.txt \ |
| 605 | $(SRCDIR)/../skins/default/css.txt \ |
| 606 | $(SRCDIR)/../skins/default/details.txt \ |
| 607 | $(SRCDIR)/../skins/default/footer.txt \ |
| 608 | $(SRCDIR)/../skins/default/header.txt \ |
| 609 | $(SRCDIR)/../skins/default/menu.txt \ |
| 610 | $(SRCDIR)/../skins/eagle/css.txt \ |
| 611 | $(SRCDIR)/../skins/eagle/details.txt \ |
| 612 | $(SRCDIR)/../skins/eagle/footer.txt \ |
| 613 | $(SRCDIR)/../skins/eagle/header.txt \ |
| 614 | $(SRCDIR)/../skins/eagle/menu.txt \ |
| 615 | $(SRCDIR)/../skins/enhanced1/css.txt \ |
| 616 | $(SRCDIR)/../skins/enhanced1/details.txt \ |
| 617 | $(SRCDIR)/../skins/enhanced1/footer.txt \ |
| 618 | $(SRCDIR)/../skins/enhanced1/header.txt \ |
| 619 | $(SRCDIR)/../skins/khaki/css.txt \ |
| @@ -658,10 +661,11 @@ | |
| 661 | $(SRCDIR)/fossil.popupwidget.js \ |
| 662 | $(SRCDIR)/fossil.storage.js \ |
| 663 | $(SRCDIR)/fossil.tabs.js \ |
| 664 | $(SRCDIR)/fossil.wikiedit-wysiwyg.js \ |
| 665 | $(SRCDIR)/graph.js \ |
| 666 | $(SRCDIR)/hbmenu.js \ |
| 667 | $(SRCDIR)/href.js \ |
| 668 | $(SRCDIR)/login.js \ |
| 669 | $(SRCDIR)/markdown.md \ |
| 670 | $(SRCDIR)/menu.js \ |
| 671 | $(SRCDIR)/sbsdiff.js \ |
| 672 |
+10
-2
| --- win/Makefile.msc | ||
| +++ win/Makefile.msc | ||
| @@ -501,14 +501,16 @@ | ||
| 501 | 501 | EXTRA_FILES = "$(SRCDIR)\..\skins\aht\details.txt" \ |
| 502 | 502 | "$(SRCDIR)\..\skins\ardoise\css.txt" \ |
| 503 | 503 | "$(SRCDIR)\..\skins\ardoise\details.txt" \ |
| 504 | 504 | "$(SRCDIR)\..\skins\ardoise\footer.txt" \ |
| 505 | 505 | "$(SRCDIR)\..\skins\ardoise\header.txt" \ |
| 506 | + "$(SRCDIR)\..\skins\ardoise\menu.txt" \ | |
| 506 | 507 | "$(SRCDIR)\..\skins\black_and_white\css.txt" \ |
| 507 | 508 | "$(SRCDIR)\..\skins\black_and_white\details.txt" \ |
| 508 | 509 | "$(SRCDIR)\..\skins\black_and_white\footer.txt" \ |
| 509 | 510 | "$(SRCDIR)\..\skins\black_and_white\header.txt" \ |
| 511 | + "$(SRCDIR)\..\skins\black_and_white\menu.txt" \ | |
| 510 | 512 | "$(SRCDIR)\..\skins\blitz\css.txt" \ |
| 511 | 513 | "$(SRCDIR)\..\skins\blitz\details.txt" \ |
| 512 | 514 | "$(SRCDIR)\..\skins\blitz\footer.txt" \ |
| 513 | 515 | "$(SRCDIR)\..\skins\blitz\header.txt" \ |
| 514 | 516 | "$(SRCDIR)\..\skins\blitz\ticket.txt" \ |
| @@ -523,15 +525,16 @@ | ||
| 523 | 525 | "$(SRCDIR)\..\skins\bootstrap\header.txt" \ |
| 524 | 526 | "$(SRCDIR)\..\skins\default\css.txt" \ |
| 525 | 527 | "$(SRCDIR)\..\skins\default\details.txt" \ |
| 526 | 528 | "$(SRCDIR)\..\skins\default\footer.txt" \ |
| 527 | 529 | "$(SRCDIR)\..\skins\default\header.txt" \ |
| 528 | - "$(SRCDIR)\..\skins\default\js.txt" \ | |
| 530 | + "$(SRCDIR)\..\skins\default\menu.txt" \ | |
| 529 | 531 | "$(SRCDIR)\..\skins\eagle\css.txt" \ |
| 530 | 532 | "$(SRCDIR)\..\skins\eagle\details.txt" \ |
| 531 | 533 | "$(SRCDIR)\..\skins\eagle\footer.txt" \ |
| 532 | 534 | "$(SRCDIR)\..\skins\eagle\header.txt" \ |
| 535 | + "$(SRCDIR)\..\skins\eagle\menu.txt" \ | |
| 533 | 536 | "$(SRCDIR)\..\skins\enhanced1\css.txt" \ |
| 534 | 537 | "$(SRCDIR)\..\skins\enhanced1\details.txt" \ |
| 535 | 538 | "$(SRCDIR)\..\skins\enhanced1\footer.txt" \ |
| 536 | 539 | "$(SRCDIR)\..\skins\enhanced1\header.txt" \ |
| 537 | 540 | "$(SRCDIR)\..\skins\khaki\css.txt" \ |
| @@ -579,10 +582,11 @@ | ||
| 579 | 582 | "$(SRCDIR)\fossil.popupwidget.js" \ |
| 580 | 583 | "$(SRCDIR)\fossil.storage.js" \ |
| 581 | 584 | "$(SRCDIR)\fossil.tabs.js" \ |
| 582 | 585 | "$(SRCDIR)\fossil.wikiedit-wysiwyg.js" \ |
| 583 | 586 | "$(SRCDIR)\graph.js" \ |
| 587 | + "$(SRCDIR)\hbmenu.js" \ | |
| 584 | 588 | "$(SRCDIR)\href.js" \ |
| 585 | 589 | "$(SRCDIR)\login.js" \ |
| 586 | 590 | "$(SRCDIR)\markdown.md" \ |
| 587 | 591 | "$(SRCDIR)\menu.js" \ |
| 588 | 592 | "$(SRCDIR)\sbsdiff.js" \ |
| @@ -1114,14 +1118,16 @@ | ||
| 1114 | 1118 | echo "$(SRCDIR)\../skins/aht/details.txt" > $@ |
| 1115 | 1119 | echo "$(SRCDIR)\../skins/ardoise/css.txt" >> $@ |
| 1116 | 1120 | echo "$(SRCDIR)\../skins/ardoise/details.txt" >> $@ |
| 1117 | 1121 | echo "$(SRCDIR)\../skins/ardoise/footer.txt" >> $@ |
| 1118 | 1122 | echo "$(SRCDIR)\../skins/ardoise/header.txt" >> $@ |
| 1123 | + echo "$(SRCDIR)\../skins/ardoise/menu.txt" >> $@ | |
| 1119 | 1124 | echo "$(SRCDIR)\../skins/black_and_white/css.txt" >> $@ |
| 1120 | 1125 | echo "$(SRCDIR)\../skins/black_and_white/details.txt" >> $@ |
| 1121 | 1126 | echo "$(SRCDIR)\../skins/black_and_white/footer.txt" >> $@ |
| 1122 | 1127 | echo "$(SRCDIR)\../skins/black_and_white/header.txt" >> $@ |
| 1128 | + echo "$(SRCDIR)\../skins/black_and_white/menu.txt" >> $@ | |
| 1123 | 1129 | echo "$(SRCDIR)\../skins/blitz/css.txt" >> $@ |
| 1124 | 1130 | echo "$(SRCDIR)\../skins/blitz/details.txt" >> $@ |
| 1125 | 1131 | echo "$(SRCDIR)\../skins/blitz/footer.txt" >> $@ |
| 1126 | 1132 | echo "$(SRCDIR)\../skins/blitz/header.txt" >> $@ |
| 1127 | 1133 | echo "$(SRCDIR)\../skins/blitz/ticket.txt" >> $@ |
| @@ -1136,15 +1142,16 @@ | ||
| 1136 | 1142 | echo "$(SRCDIR)\../skins/bootstrap/header.txt" >> $@ |
| 1137 | 1143 | echo "$(SRCDIR)\../skins/default/css.txt" >> $@ |
| 1138 | 1144 | echo "$(SRCDIR)\../skins/default/details.txt" >> $@ |
| 1139 | 1145 | echo "$(SRCDIR)\../skins/default/footer.txt" >> $@ |
| 1140 | 1146 | echo "$(SRCDIR)\../skins/default/header.txt" >> $@ |
| 1141 | - echo "$(SRCDIR)\../skins/default/js.txt" >> $@ | |
| 1147 | + echo "$(SRCDIR)\../skins/default/menu.txt" >> $@ | |
| 1142 | 1148 | echo "$(SRCDIR)\../skins/eagle/css.txt" >> $@ |
| 1143 | 1149 | echo "$(SRCDIR)\../skins/eagle/details.txt" >> $@ |
| 1144 | 1150 | echo "$(SRCDIR)\../skins/eagle/footer.txt" >> $@ |
| 1145 | 1151 | echo "$(SRCDIR)\../skins/eagle/header.txt" >> $@ |
| 1152 | + echo "$(SRCDIR)\../skins/eagle/menu.txt" >> $@ | |
| 1146 | 1153 | echo "$(SRCDIR)\../skins/enhanced1/css.txt" >> $@ |
| 1147 | 1154 | echo "$(SRCDIR)\../skins/enhanced1/details.txt" >> $@ |
| 1148 | 1155 | echo "$(SRCDIR)\../skins/enhanced1/footer.txt" >> $@ |
| 1149 | 1156 | echo "$(SRCDIR)\../skins/enhanced1/header.txt" >> $@ |
| 1150 | 1157 | echo "$(SRCDIR)\../skins/khaki/css.txt" >> $@ |
| @@ -1192,10 +1199,11 @@ | ||
| 1192 | 1199 | echo "$(SRCDIR)\fossil.popupwidget.js" >> $@ |
| 1193 | 1200 | echo "$(SRCDIR)\fossil.storage.js" >> $@ |
| 1194 | 1201 | echo "$(SRCDIR)\fossil.tabs.js" >> $@ |
| 1195 | 1202 | echo "$(SRCDIR)\fossil.wikiedit-wysiwyg.js" >> $@ |
| 1196 | 1203 | echo "$(SRCDIR)\graph.js" >> $@ |
| 1204 | + echo "$(SRCDIR)\hbmenu.js" >> $@ | |
| 1197 | 1205 | echo "$(SRCDIR)\href.js" >> $@ |
| 1198 | 1206 | echo "$(SRCDIR)\login.js" >> $@ |
| 1199 | 1207 | echo "$(SRCDIR)\markdown.md" >> $@ |
| 1200 | 1208 | echo "$(SRCDIR)\menu.js" >> $@ |
| 1201 | 1209 | echo "$(SRCDIR)\sbsdiff.js" >> $@ |
| 1202 | 1210 |
| --- win/Makefile.msc | |
| +++ win/Makefile.msc | |
| @@ -501,14 +501,16 @@ | |
| 501 | EXTRA_FILES = "$(SRCDIR)\..\skins\aht\details.txt" \ |
| 502 | "$(SRCDIR)\..\skins\ardoise\css.txt" \ |
| 503 | "$(SRCDIR)\..\skins\ardoise\details.txt" \ |
| 504 | "$(SRCDIR)\..\skins\ardoise\footer.txt" \ |
| 505 | "$(SRCDIR)\..\skins\ardoise\header.txt" \ |
| 506 | "$(SRCDIR)\..\skins\black_and_white\css.txt" \ |
| 507 | "$(SRCDIR)\..\skins\black_and_white\details.txt" \ |
| 508 | "$(SRCDIR)\..\skins\black_and_white\footer.txt" \ |
| 509 | "$(SRCDIR)\..\skins\black_and_white\header.txt" \ |
| 510 | "$(SRCDIR)\..\skins\blitz\css.txt" \ |
| 511 | "$(SRCDIR)\..\skins\blitz\details.txt" \ |
| 512 | "$(SRCDIR)\..\skins\blitz\footer.txt" \ |
| 513 | "$(SRCDIR)\..\skins\blitz\header.txt" \ |
| 514 | "$(SRCDIR)\..\skins\blitz\ticket.txt" \ |
| @@ -523,15 +525,16 @@ | |
| 523 | "$(SRCDIR)\..\skins\bootstrap\header.txt" \ |
| 524 | "$(SRCDIR)\..\skins\default\css.txt" \ |
| 525 | "$(SRCDIR)\..\skins\default\details.txt" \ |
| 526 | "$(SRCDIR)\..\skins\default\footer.txt" \ |
| 527 | "$(SRCDIR)\..\skins\default\header.txt" \ |
| 528 | "$(SRCDIR)\..\skins\default\js.txt" \ |
| 529 | "$(SRCDIR)\..\skins\eagle\css.txt" \ |
| 530 | "$(SRCDIR)\..\skins\eagle\details.txt" \ |
| 531 | "$(SRCDIR)\..\skins\eagle\footer.txt" \ |
| 532 | "$(SRCDIR)\..\skins\eagle\header.txt" \ |
| 533 | "$(SRCDIR)\..\skins\enhanced1\css.txt" \ |
| 534 | "$(SRCDIR)\..\skins\enhanced1\details.txt" \ |
| 535 | "$(SRCDIR)\..\skins\enhanced1\footer.txt" \ |
| 536 | "$(SRCDIR)\..\skins\enhanced1\header.txt" \ |
| 537 | "$(SRCDIR)\..\skins\khaki\css.txt" \ |
| @@ -579,10 +582,11 @@ | |
| 579 | "$(SRCDIR)\fossil.popupwidget.js" \ |
| 580 | "$(SRCDIR)\fossil.storage.js" \ |
| 581 | "$(SRCDIR)\fossil.tabs.js" \ |
| 582 | "$(SRCDIR)\fossil.wikiedit-wysiwyg.js" \ |
| 583 | "$(SRCDIR)\graph.js" \ |
| 584 | "$(SRCDIR)\href.js" \ |
| 585 | "$(SRCDIR)\login.js" \ |
| 586 | "$(SRCDIR)\markdown.md" \ |
| 587 | "$(SRCDIR)\menu.js" \ |
| 588 | "$(SRCDIR)\sbsdiff.js" \ |
| @@ -1114,14 +1118,16 @@ | |
| 1114 | echo "$(SRCDIR)\../skins/aht/details.txt" > $@ |
| 1115 | echo "$(SRCDIR)\../skins/ardoise/css.txt" >> $@ |
| 1116 | echo "$(SRCDIR)\../skins/ardoise/details.txt" >> $@ |
| 1117 | echo "$(SRCDIR)\../skins/ardoise/footer.txt" >> $@ |
| 1118 | echo "$(SRCDIR)\../skins/ardoise/header.txt" >> $@ |
| 1119 | echo "$(SRCDIR)\../skins/black_and_white/css.txt" >> $@ |
| 1120 | echo "$(SRCDIR)\../skins/black_and_white/details.txt" >> $@ |
| 1121 | echo "$(SRCDIR)\../skins/black_and_white/footer.txt" >> $@ |
| 1122 | echo "$(SRCDIR)\../skins/black_and_white/header.txt" >> $@ |
| 1123 | echo "$(SRCDIR)\../skins/blitz/css.txt" >> $@ |
| 1124 | echo "$(SRCDIR)\../skins/blitz/details.txt" >> $@ |
| 1125 | echo "$(SRCDIR)\../skins/blitz/footer.txt" >> $@ |
| 1126 | echo "$(SRCDIR)\../skins/blitz/header.txt" >> $@ |
| 1127 | echo "$(SRCDIR)\../skins/blitz/ticket.txt" >> $@ |
| @@ -1136,15 +1142,16 @@ | |
| 1136 | echo "$(SRCDIR)\../skins/bootstrap/header.txt" >> $@ |
| 1137 | echo "$(SRCDIR)\../skins/default/css.txt" >> $@ |
| 1138 | echo "$(SRCDIR)\../skins/default/details.txt" >> $@ |
| 1139 | echo "$(SRCDIR)\../skins/default/footer.txt" >> $@ |
| 1140 | echo "$(SRCDIR)\../skins/default/header.txt" >> $@ |
| 1141 | echo "$(SRCDIR)\../skins/default/js.txt" >> $@ |
| 1142 | echo "$(SRCDIR)\../skins/eagle/css.txt" >> $@ |
| 1143 | echo "$(SRCDIR)\../skins/eagle/details.txt" >> $@ |
| 1144 | echo "$(SRCDIR)\../skins/eagle/footer.txt" >> $@ |
| 1145 | echo "$(SRCDIR)\../skins/eagle/header.txt" >> $@ |
| 1146 | echo "$(SRCDIR)\../skins/enhanced1/css.txt" >> $@ |
| 1147 | echo "$(SRCDIR)\../skins/enhanced1/details.txt" >> $@ |
| 1148 | echo "$(SRCDIR)\../skins/enhanced1/footer.txt" >> $@ |
| 1149 | echo "$(SRCDIR)\../skins/enhanced1/header.txt" >> $@ |
| 1150 | echo "$(SRCDIR)\../skins/khaki/css.txt" >> $@ |
| @@ -1192,10 +1199,11 @@ | |
| 1192 | echo "$(SRCDIR)\fossil.popupwidget.js" >> $@ |
| 1193 | echo "$(SRCDIR)\fossil.storage.js" >> $@ |
| 1194 | echo "$(SRCDIR)\fossil.tabs.js" >> $@ |
| 1195 | echo "$(SRCDIR)\fossil.wikiedit-wysiwyg.js" >> $@ |
| 1196 | echo "$(SRCDIR)\graph.js" >> $@ |
| 1197 | echo "$(SRCDIR)\href.js" >> $@ |
| 1198 | echo "$(SRCDIR)\login.js" >> $@ |
| 1199 | echo "$(SRCDIR)\markdown.md" >> $@ |
| 1200 | echo "$(SRCDIR)\menu.js" >> $@ |
| 1201 | echo "$(SRCDIR)\sbsdiff.js" >> $@ |
| 1202 |
| --- win/Makefile.msc | |
| +++ win/Makefile.msc | |
| @@ -501,14 +501,16 @@ | |
| 501 | EXTRA_FILES = "$(SRCDIR)\..\skins\aht\details.txt" \ |
| 502 | "$(SRCDIR)\..\skins\ardoise\css.txt" \ |
| 503 | "$(SRCDIR)\..\skins\ardoise\details.txt" \ |
| 504 | "$(SRCDIR)\..\skins\ardoise\footer.txt" \ |
| 505 | "$(SRCDIR)\..\skins\ardoise\header.txt" \ |
| 506 | "$(SRCDIR)\..\skins\ardoise\menu.txt" \ |
| 507 | "$(SRCDIR)\..\skins\black_and_white\css.txt" \ |
| 508 | "$(SRCDIR)\..\skins\black_and_white\details.txt" \ |
| 509 | "$(SRCDIR)\..\skins\black_and_white\footer.txt" \ |
| 510 | "$(SRCDIR)\..\skins\black_and_white\header.txt" \ |
| 511 | "$(SRCDIR)\..\skins\black_and_white\menu.txt" \ |
| 512 | "$(SRCDIR)\..\skins\blitz\css.txt" \ |
| 513 | "$(SRCDIR)\..\skins\blitz\details.txt" \ |
| 514 | "$(SRCDIR)\..\skins\blitz\footer.txt" \ |
| 515 | "$(SRCDIR)\..\skins\blitz\header.txt" \ |
| 516 | "$(SRCDIR)\..\skins\blitz\ticket.txt" \ |
| @@ -523,15 +525,16 @@ | |
| 525 | "$(SRCDIR)\..\skins\bootstrap\header.txt" \ |
| 526 | "$(SRCDIR)\..\skins\default\css.txt" \ |
| 527 | "$(SRCDIR)\..\skins\default\details.txt" \ |
| 528 | "$(SRCDIR)\..\skins\default\footer.txt" \ |
| 529 | "$(SRCDIR)\..\skins\default\header.txt" \ |
| 530 | "$(SRCDIR)\..\skins\default\menu.txt" \ |
| 531 | "$(SRCDIR)\..\skins\eagle\css.txt" \ |
| 532 | "$(SRCDIR)\..\skins\eagle\details.txt" \ |
| 533 | "$(SRCDIR)\..\skins\eagle\footer.txt" \ |
| 534 | "$(SRCDIR)\..\skins\eagle\header.txt" \ |
| 535 | "$(SRCDIR)\..\skins\eagle\menu.txt" \ |
| 536 | "$(SRCDIR)\..\skins\enhanced1\css.txt" \ |
| 537 | "$(SRCDIR)\..\skins\enhanced1\details.txt" \ |
| 538 | "$(SRCDIR)\..\skins\enhanced1\footer.txt" \ |
| 539 | "$(SRCDIR)\..\skins\enhanced1\header.txt" \ |
| 540 | "$(SRCDIR)\..\skins\khaki\css.txt" \ |
| @@ -579,10 +582,11 @@ | |
| 582 | "$(SRCDIR)\fossil.popupwidget.js" \ |
| 583 | "$(SRCDIR)\fossil.storage.js" \ |
| 584 | "$(SRCDIR)\fossil.tabs.js" \ |
| 585 | "$(SRCDIR)\fossil.wikiedit-wysiwyg.js" \ |
| 586 | "$(SRCDIR)\graph.js" \ |
| 587 | "$(SRCDIR)\hbmenu.js" \ |
| 588 | "$(SRCDIR)\href.js" \ |
| 589 | "$(SRCDIR)\login.js" \ |
| 590 | "$(SRCDIR)\markdown.md" \ |
| 591 | "$(SRCDIR)\menu.js" \ |
| 592 | "$(SRCDIR)\sbsdiff.js" \ |
| @@ -1114,14 +1118,16 @@ | |
| 1118 | echo "$(SRCDIR)\../skins/aht/details.txt" > $@ |
| 1119 | echo "$(SRCDIR)\../skins/ardoise/css.txt" >> $@ |
| 1120 | echo "$(SRCDIR)\../skins/ardoise/details.txt" >> $@ |
| 1121 | echo "$(SRCDIR)\../skins/ardoise/footer.txt" >> $@ |
| 1122 | echo "$(SRCDIR)\../skins/ardoise/header.txt" >> $@ |
| 1123 | echo "$(SRCDIR)\../skins/ardoise/menu.txt" >> $@ |
| 1124 | echo "$(SRCDIR)\../skins/black_and_white/css.txt" >> $@ |
| 1125 | echo "$(SRCDIR)\../skins/black_and_white/details.txt" >> $@ |
| 1126 | echo "$(SRCDIR)\../skins/black_and_white/footer.txt" >> $@ |
| 1127 | echo "$(SRCDIR)\../skins/black_and_white/header.txt" >> $@ |
| 1128 | echo "$(SRCDIR)\../skins/black_and_white/menu.txt" >> $@ |
| 1129 | echo "$(SRCDIR)\../skins/blitz/css.txt" >> $@ |
| 1130 | echo "$(SRCDIR)\../skins/blitz/details.txt" >> $@ |
| 1131 | echo "$(SRCDIR)\../skins/blitz/footer.txt" >> $@ |
| 1132 | echo "$(SRCDIR)\../skins/blitz/header.txt" >> $@ |
| 1133 | echo "$(SRCDIR)\../skins/blitz/ticket.txt" >> $@ |
| @@ -1136,15 +1142,16 @@ | |
| 1142 | echo "$(SRCDIR)\../skins/bootstrap/header.txt" >> $@ |
| 1143 | echo "$(SRCDIR)\../skins/default/css.txt" >> $@ |
| 1144 | echo "$(SRCDIR)\../skins/default/details.txt" >> $@ |
| 1145 | echo "$(SRCDIR)\../skins/default/footer.txt" >> $@ |
| 1146 | echo "$(SRCDIR)\../skins/default/header.txt" >> $@ |
| 1147 | echo "$(SRCDIR)\../skins/default/menu.txt" >> $@ |
| 1148 | echo "$(SRCDIR)\../skins/eagle/css.txt" >> $@ |
| 1149 | echo "$(SRCDIR)\../skins/eagle/details.txt" >> $@ |
| 1150 | echo "$(SRCDIR)\../skins/eagle/footer.txt" >> $@ |
| 1151 | echo "$(SRCDIR)\../skins/eagle/header.txt" >> $@ |
| 1152 | echo "$(SRCDIR)\../skins/eagle/menu.txt" >> $@ |
| 1153 | echo "$(SRCDIR)\../skins/enhanced1/css.txt" >> $@ |
| 1154 | echo "$(SRCDIR)\../skins/enhanced1/details.txt" >> $@ |
| 1155 | echo "$(SRCDIR)\../skins/enhanced1/footer.txt" >> $@ |
| 1156 | echo "$(SRCDIR)\../skins/enhanced1/header.txt" >> $@ |
| 1157 | echo "$(SRCDIR)\../skins/khaki/css.txt" >> $@ |
| @@ -1192,10 +1199,11 @@ | |
| 1199 | echo "$(SRCDIR)\fossil.popupwidget.js" >> $@ |
| 1200 | echo "$(SRCDIR)\fossil.storage.js" >> $@ |
| 1201 | echo "$(SRCDIR)\fossil.tabs.js" >> $@ |
| 1202 | echo "$(SRCDIR)\fossil.wikiedit-wysiwyg.js" >> $@ |
| 1203 | echo "$(SRCDIR)\graph.js" >> $@ |
| 1204 | echo "$(SRCDIR)\hbmenu.js" >> $@ |
| 1205 | echo "$(SRCDIR)\href.js" >> $@ |
| 1206 | echo "$(SRCDIR)\login.js" >> $@ |
| 1207 | echo "$(SRCDIR)\markdown.md" >> $@ |
| 1208 | echo "$(SRCDIR)\menu.js" >> $@ |
| 1209 | echo "$(SRCDIR)\sbsdiff.js" >> $@ |
| 1210 |