Fossil SCM
Add a configuration option under the Admin/Timeline setup menu to set the dwellTimeout for tooltips.
Commit
5fc142df073760f35f8f4ecb1a1c69170d8cd3c545fd28a27aa60395df0b62b9
Parent
274e95f547149fe…
4 files changed
+4
+11
-7
+8
+3
+4
| --- src/configure.c | ||
| +++ src/configure.c | ||
| @@ -94,12 +94,16 @@ | ||
| 94 | 94 | { "logo-mimetype", CONFIGSET_SKIN }, |
| 95 | 95 | { "logo-image", CONFIGSET_SKIN }, |
| 96 | 96 | { "background-mimetype", CONFIGSET_SKIN }, |
| 97 | 97 | { "background-image", CONFIGSET_SKIN }, |
| 98 | 98 | { "timeline-block-markup", CONFIGSET_SKIN }, |
| 99 | + { "timeline-date-format", CONFIGSET_SKIN }, | |
| 100 | + { "timeline-dwelltime", CONFIGSET_SKIN }, | |
| 99 | 101 | { "timeline-max-comment", CONFIGSET_SKIN }, |
| 100 | 102 | { "timeline-plaintext", CONFIGSET_SKIN }, |
| 103 | + { "timeline-truncate-at-blank", CONFIGSET_SKIN }, | |
| 104 | + { "timeline-utc", CONFIGSET_SKIN }, | |
| 101 | 105 | { "adunit", CONFIGSET_SKIN }, |
| 102 | 106 | { "adunit-omit-if-admin", CONFIGSET_SKIN }, |
| 103 | 107 | { "adunit-omit-if-user", CONFIGSET_SKIN }, |
| 104 | 108 | { "sitemap-docidx", CONFIGSET_SKIN }, |
| 105 | 109 | { "sitemap-download", CONFIGSET_SKIN }, |
| 106 | 110 |
| --- src/configure.c | |
| +++ src/configure.c | |
| @@ -94,12 +94,16 @@ | |
| 94 | { "logo-mimetype", CONFIGSET_SKIN }, |
| 95 | { "logo-image", CONFIGSET_SKIN }, |
| 96 | { "background-mimetype", CONFIGSET_SKIN }, |
| 97 | { "background-image", CONFIGSET_SKIN }, |
| 98 | { "timeline-block-markup", CONFIGSET_SKIN }, |
| 99 | { "timeline-max-comment", CONFIGSET_SKIN }, |
| 100 | { "timeline-plaintext", CONFIGSET_SKIN }, |
| 101 | { "adunit", CONFIGSET_SKIN }, |
| 102 | { "adunit-omit-if-admin", CONFIGSET_SKIN }, |
| 103 | { "adunit-omit-if-user", CONFIGSET_SKIN }, |
| 104 | { "sitemap-docidx", CONFIGSET_SKIN }, |
| 105 | { "sitemap-download", CONFIGSET_SKIN }, |
| 106 |
| --- src/configure.c | |
| +++ src/configure.c | |
| @@ -94,12 +94,16 @@ | |
| 94 | { "logo-mimetype", CONFIGSET_SKIN }, |
| 95 | { "logo-image", CONFIGSET_SKIN }, |
| 96 | { "background-mimetype", CONFIGSET_SKIN }, |
| 97 | { "background-image", CONFIGSET_SKIN }, |
| 98 | { "timeline-block-markup", CONFIGSET_SKIN }, |
| 99 | { "timeline-date-format", CONFIGSET_SKIN }, |
| 100 | { "timeline-dwelltime", CONFIGSET_SKIN }, |
| 101 | { "timeline-max-comment", CONFIGSET_SKIN }, |
| 102 | { "timeline-plaintext", CONFIGSET_SKIN }, |
| 103 | { "timeline-truncate-at-blank", CONFIGSET_SKIN }, |
| 104 | { "timeline-utc", CONFIGSET_SKIN }, |
| 105 | { "adunit", CONFIGSET_SKIN }, |
| 106 | { "adunit-omit-if-admin", CONFIGSET_SKIN }, |
| 107 | { "adunit-omit-if-user", CONFIGSET_SKIN }, |
| 108 | { "sitemap-docidx", CONFIGSET_SKIN }, |
| 109 | { "sitemap-download", CONFIGSET_SKIN }, |
| 110 |
+11
-7
| --- src/graph.js | ||
| +++ src/graph.js | ||
| @@ -14,10 +14,11 @@ | ||
| 14 | 14 | ** "omitDescenders": BOOLEAN, // Omit ancestor lines off bottom of screen |
| 15 | 15 | ** "fileDiff": BOOLEAN, // True for file diff. False for check-in |
| 16 | 16 | ** "scrollToSelect": BOOLEAN, // Scroll to selection on first render |
| 17 | 17 | ** "nrail": INTEGER, // Number of vertical "rails" |
| 18 | 18 | ** "baseUrl": TEXT, // Top-level URL |
| 19 | +** "dwellTimeout": INTEGER, // Tooltip delay in milliseconds | |
| 19 | 20 | ** "rowinfo": ROWINFO-ARRAY } |
| 20 | 21 | ** |
| 21 | 22 | ** The rowinfo field is an array of structures, one per entry in the timeline, |
| 22 | 23 | ** where each structure has the following fields: |
| 23 | 24 | ** |
| @@ -89,10 +90,11 @@ | ||
| 89 | 90 | |
| 90 | 91 | /* Construct that graph corresponding to the timeline-data-N object */ |
| 91 | 92 | function TimelineGraph(tx){ |
| 92 | 93 | var topObj = document.getElementById("timelineTable"+tx.iTableId); |
| 93 | 94 | amendCss(tx.circleNodes, tx.showArrowheads); |
| 95 | + tooltipInfo.dwellTimeout = tx.dwellTimeout | |
| 94 | 96 | topObj.onclick = clickOnGraph |
| 95 | 97 | topObj.ondblclick = dblclickOnGraph |
| 96 | 98 | topObj.onmousemove = function(e) { |
| 97 | 99 | var ix = findTxIndex(e); |
| 98 | 100 | var cursor = (ix<0) ? "" : "pointer"; /* Or: cursor = "help"? */ |
| @@ -113,17 +115,19 @@ | ||
| 113 | 115 | ** the dwell timer again. */ |
| 114 | 116 | tooltipObj.style.display = "none"; |
| 115 | 117 | tooltipInfo.ixElement = ix; |
| 116 | 118 | tooltipInfo.posX = e.x; |
| 117 | 119 | tooltipInfo.posY = e.y; |
| 118 | - tooltipInfo.idTimer = setTimeout(function() { | |
| 119 | - this.tooltipInfo.idTimer = 0; | |
| 120 | - showGraphTooltip( | |
| 121 | - this.tooltipInfo.ixElement, | |
| 122 | - this.tooltipInfo.posX, | |
| 123 | - this.tooltipInfo.posY); | |
| 124 | - }.bind(window),tooltipInfo.dwellTimeout); | |
| 120 | + if( tooltipInfo.dwellTimeout>0 ){ | |
| 121 | + tooltipInfo.idTimer = setTimeout(function() { | |
| 122 | + this.tooltipInfo.idTimer = 0; | |
| 123 | + showGraphTooltip( | |
| 124 | + this.tooltipInfo.ixElement, | |
| 125 | + this.tooltipInfo.posX, | |
| 126 | + this.tooltipInfo.posY); | |
| 127 | + }.bind(window),tooltipInfo.dwellTimeout); | |
| 128 | + } | |
| 125 | 129 | } |
| 126 | 130 | else |
| 127 | 131 | tooltipInfo.ixElement = -1; |
| 128 | 132 | }; |
| 129 | 133 | topObj.onmouseleave = function(e) { |
| 130 | 134 |
| --- src/graph.js | |
| +++ src/graph.js | |
| @@ -14,10 +14,11 @@ | |
| 14 | ** "omitDescenders": BOOLEAN, // Omit ancestor lines off bottom of screen |
| 15 | ** "fileDiff": BOOLEAN, // True for file diff. False for check-in |
| 16 | ** "scrollToSelect": BOOLEAN, // Scroll to selection on first render |
| 17 | ** "nrail": INTEGER, // Number of vertical "rails" |
| 18 | ** "baseUrl": TEXT, // Top-level URL |
| 19 | ** "rowinfo": ROWINFO-ARRAY } |
| 20 | ** |
| 21 | ** The rowinfo field is an array of structures, one per entry in the timeline, |
| 22 | ** where each structure has the following fields: |
| 23 | ** |
| @@ -89,10 +90,11 @@ | |
| 89 | |
| 90 | /* Construct that graph corresponding to the timeline-data-N object */ |
| 91 | function TimelineGraph(tx){ |
| 92 | var topObj = document.getElementById("timelineTable"+tx.iTableId); |
| 93 | amendCss(tx.circleNodes, tx.showArrowheads); |
| 94 | topObj.onclick = clickOnGraph |
| 95 | topObj.ondblclick = dblclickOnGraph |
| 96 | topObj.onmousemove = function(e) { |
| 97 | var ix = findTxIndex(e); |
| 98 | var cursor = (ix<0) ? "" : "pointer"; /* Or: cursor = "help"? */ |
| @@ -113,17 +115,19 @@ | |
| 113 | ** the dwell timer again. */ |
| 114 | tooltipObj.style.display = "none"; |
| 115 | tooltipInfo.ixElement = ix; |
| 116 | tooltipInfo.posX = e.x; |
| 117 | tooltipInfo.posY = e.y; |
| 118 | tooltipInfo.idTimer = setTimeout(function() { |
| 119 | this.tooltipInfo.idTimer = 0; |
| 120 | showGraphTooltip( |
| 121 | this.tooltipInfo.ixElement, |
| 122 | this.tooltipInfo.posX, |
| 123 | this.tooltipInfo.posY); |
| 124 | }.bind(window),tooltipInfo.dwellTimeout); |
| 125 | } |
| 126 | else |
| 127 | tooltipInfo.ixElement = -1; |
| 128 | }; |
| 129 | topObj.onmouseleave = function(e) { |
| 130 |
| --- src/graph.js | |
| +++ src/graph.js | |
| @@ -14,10 +14,11 @@ | |
| 14 | ** "omitDescenders": BOOLEAN, // Omit ancestor lines off bottom of screen |
| 15 | ** "fileDiff": BOOLEAN, // True for file diff. False for check-in |
| 16 | ** "scrollToSelect": BOOLEAN, // Scroll to selection on first render |
| 17 | ** "nrail": INTEGER, // Number of vertical "rails" |
| 18 | ** "baseUrl": TEXT, // Top-level URL |
| 19 | ** "dwellTimeout": INTEGER, // Tooltip delay in milliseconds |
| 20 | ** "rowinfo": ROWINFO-ARRAY } |
| 21 | ** |
| 22 | ** The rowinfo field is an array of structures, one per entry in the timeline, |
| 23 | ** where each structure has the following fields: |
| 24 | ** |
| @@ -89,10 +90,11 @@ | |
| 90 | |
| 91 | /* Construct that graph corresponding to the timeline-data-N object */ |
| 92 | function TimelineGraph(tx){ |
| 93 | var topObj = document.getElementById("timelineTable"+tx.iTableId); |
| 94 | amendCss(tx.circleNodes, tx.showArrowheads); |
| 95 | tooltipInfo.dwellTimeout = tx.dwellTimeout |
| 96 | topObj.onclick = clickOnGraph |
| 97 | topObj.ondblclick = dblclickOnGraph |
| 98 | topObj.onmousemove = function(e) { |
| 99 | var ix = findTxIndex(e); |
| 100 | var cursor = (ix<0) ? "" : "pointer"; /* Or: cursor = "help"? */ |
| @@ -113,17 +115,19 @@ | |
| 115 | ** the dwell timer again. */ |
| 116 | tooltipObj.style.display = "none"; |
| 117 | tooltipInfo.ixElement = ix; |
| 118 | tooltipInfo.posX = e.x; |
| 119 | tooltipInfo.posY = e.y; |
| 120 | if( tooltipInfo.dwellTimeout>0 ){ |
| 121 | tooltipInfo.idTimer = setTimeout(function() { |
| 122 | this.tooltipInfo.idTimer = 0; |
| 123 | showGraphTooltip( |
| 124 | this.tooltipInfo.ixElement, |
| 125 | this.tooltipInfo.posX, |
| 126 | this.tooltipInfo.posY); |
| 127 | }.bind(window),tooltipInfo.dwellTimeout); |
| 128 | } |
| 129 | } |
| 130 | else |
| 131 | tooltipInfo.ixElement = -1; |
| 132 | }; |
| 133 | topObj.onmouseleave = function(e) { |
| 134 |
+8
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -749,10 +749,18 @@ | ||
| 749 | 749 | "timeline-max-comment", "tmc", "0", 0); |
| 750 | 750 | @ <p>The maximum length of a comment to be displayed in a timeline. |
| 751 | 751 | @ "0" there is no length limit. |
| 752 | 752 | @ (Property: "timeline-max-comment")</p> |
| 753 | 753 | |
| 754 | + @ <hr /> | |
| 755 | + entry_attribute("Tooltip dwell time", 6, | |
| 756 | + "timeline-dwelltime", "tdt", "250", 0); | |
| 757 | + @ <p>The time (in milliseconds) that the mouse pointer should be | |
| 758 | + @ stationary above a object of the graph before a tooltip appears. | |
| 759 | + @ Set this to "0" to disable tooltips. | |
| 760 | + @ (Property: "timeline-dwelltime")</p> | |
| 761 | + | |
| 754 | 762 | @ <hr /> |
| 755 | 763 | @ <p><input type="submit" name="submit" value="Apply Changes" /></p> |
| 756 | 764 | @ </div></form> |
| 757 | 765 | db_end_transaction(0); |
| 758 | 766 | style_footer(); |
| 759 | 767 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -749,10 +749,18 @@ | |
| 749 | "timeline-max-comment", "tmc", "0", 0); |
| 750 | @ <p>The maximum length of a comment to be displayed in a timeline. |
| 751 | @ "0" there is no length limit. |
| 752 | @ (Property: "timeline-max-comment")</p> |
| 753 | |
| 754 | @ <hr /> |
| 755 | @ <p><input type="submit" name="submit" value="Apply Changes" /></p> |
| 756 | @ </div></form> |
| 757 | db_end_transaction(0); |
| 758 | style_footer(); |
| 759 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -749,10 +749,18 @@ | |
| 749 | "timeline-max-comment", "tmc", "0", 0); |
| 750 | @ <p>The maximum length of a comment to be displayed in a timeline. |
| 751 | @ "0" there is no length limit. |
| 752 | @ (Property: "timeline-max-comment")</p> |
| 753 | |
| 754 | @ <hr /> |
| 755 | entry_attribute("Tooltip dwell time", 6, |
| 756 | "timeline-dwelltime", "tdt", "250", 0); |
| 757 | @ <p>The time (in milliseconds) that the mouse pointer should be |
| 758 | @ stationary above a object of the graph before a tooltip appears. |
| 759 | @ Set this to "0" to disable tooltips. |
| 760 | @ (Property: "timeline-dwelltime")</p> |
| 761 | |
| 762 | @ <hr /> |
| 763 | @ <p><input type="submit" name="submit" value="Apply Changes" /></p> |
| 764 | @ </div></form> |
| 765 | db_end_transaction(0); |
| 766 | style_footer(); |
| 767 |
+3
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -830,10 +830,11 @@ | ||
| 830 | 830 | int colorGraph; /* Use colors for graph lines */ |
| 831 | 831 | int iTopRow; /* Index of the top row of the graph */ |
| 832 | 832 | int fileDiff; /* True for file diff. False for check-in diff */ |
| 833 | 833 | int omitDescenders; /* True to omit descenders */ |
| 834 | 834 | int scrollToSelect; /* True to scroll to the selection */ |
| 835 | + int dwellTimeout; /* Milliseconds to wait for tooltips */ | |
| 835 | 836 | u8 *aiMap; /* The rail map */ |
| 836 | 837 | |
| 837 | 838 | iRailPitch = atoi(PD("railpitch","0")); |
| 838 | 839 | showArrowheads = skin_detail_boolean("timeline-arrowheads"); |
| 839 | 840 | circleNodes = skin_detail_boolean("timeline-circle-nodes"); |
| @@ -840,10 +841,11 @@ | ||
| 840 | 841 | colorGraph = skin_detail_boolean("timeline-color-graph-lines"); |
| 841 | 842 | iTopRow = pGraph->pFirst ? pGraph->pFirst->idx : 0; |
| 842 | 843 | omitDescenders = (tmFlags & TIMELINE_DISJOINT)!=0; |
| 843 | 844 | fileDiff = (tmFlags & TIMELINE_FILEDIFF)!=0; |
| 844 | 845 | scrollToSelect = (tmFlags & TIMELINE_NOSCROLL)==0; |
| 846 | + dwellTimeout = atoi(db_get("timeline-dwelltime","250")); | |
| 845 | 847 | @ <script id='timeline-data-%d(iTableId)' type='application/json'>{ |
| 846 | 848 | @ "iTableId": %d(iTableId), |
| 847 | 849 | @ "circleNodes": %d(circleNodes), |
| 848 | 850 | @ "showArrowheads": %d(showArrowheads), |
| 849 | 851 | @ "iRailPitch": %d(iRailPitch), |
| @@ -853,10 +855,11 @@ | ||
| 853 | 855 | @ "omitDescenders": %d(omitDescenders), |
| 854 | 856 | @ "fileDiff": %d(fileDiff), |
| 855 | 857 | @ "scrollToSelect": %d(scrollToSelect), |
| 856 | 858 | @ "nrail": %d(pGraph->mxRail+1), |
| 857 | 859 | @ "baseUrl": "%R", |
| 860 | + @ "dwellTimeout": %d(dwellTimeout), | |
| 858 | 861 | @ "bottomRowId": "btm-%d(iTableId)", |
| 859 | 862 | if( pGraph->nRow==0 ){ |
| 860 | 863 | @ "rowinfo": null |
| 861 | 864 | }else{ |
| 862 | 865 | @ "rowinfo": [ |
| 863 | 866 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -830,10 +830,11 @@ | |
| 830 | int colorGraph; /* Use colors for graph lines */ |
| 831 | int iTopRow; /* Index of the top row of the graph */ |
| 832 | int fileDiff; /* True for file diff. False for check-in diff */ |
| 833 | int omitDescenders; /* True to omit descenders */ |
| 834 | int scrollToSelect; /* True to scroll to the selection */ |
| 835 | u8 *aiMap; /* The rail map */ |
| 836 | |
| 837 | iRailPitch = atoi(PD("railpitch","0")); |
| 838 | showArrowheads = skin_detail_boolean("timeline-arrowheads"); |
| 839 | circleNodes = skin_detail_boolean("timeline-circle-nodes"); |
| @@ -840,10 +841,11 @@ | |
| 840 | colorGraph = skin_detail_boolean("timeline-color-graph-lines"); |
| 841 | iTopRow = pGraph->pFirst ? pGraph->pFirst->idx : 0; |
| 842 | omitDescenders = (tmFlags & TIMELINE_DISJOINT)!=0; |
| 843 | fileDiff = (tmFlags & TIMELINE_FILEDIFF)!=0; |
| 844 | scrollToSelect = (tmFlags & TIMELINE_NOSCROLL)==0; |
| 845 | @ <script id='timeline-data-%d(iTableId)' type='application/json'>{ |
| 846 | @ "iTableId": %d(iTableId), |
| 847 | @ "circleNodes": %d(circleNodes), |
| 848 | @ "showArrowheads": %d(showArrowheads), |
| 849 | @ "iRailPitch": %d(iRailPitch), |
| @@ -853,10 +855,11 @@ | |
| 853 | @ "omitDescenders": %d(omitDescenders), |
| 854 | @ "fileDiff": %d(fileDiff), |
| 855 | @ "scrollToSelect": %d(scrollToSelect), |
| 856 | @ "nrail": %d(pGraph->mxRail+1), |
| 857 | @ "baseUrl": "%R", |
| 858 | @ "bottomRowId": "btm-%d(iTableId)", |
| 859 | if( pGraph->nRow==0 ){ |
| 860 | @ "rowinfo": null |
| 861 | }else{ |
| 862 | @ "rowinfo": [ |
| 863 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -830,10 +830,11 @@ | |
| 830 | int colorGraph; /* Use colors for graph lines */ |
| 831 | int iTopRow; /* Index of the top row of the graph */ |
| 832 | int fileDiff; /* True for file diff. False for check-in diff */ |
| 833 | int omitDescenders; /* True to omit descenders */ |
| 834 | int scrollToSelect; /* True to scroll to the selection */ |
| 835 | int dwellTimeout; /* Milliseconds to wait for tooltips */ |
| 836 | u8 *aiMap; /* The rail map */ |
| 837 | |
| 838 | iRailPitch = atoi(PD("railpitch","0")); |
| 839 | showArrowheads = skin_detail_boolean("timeline-arrowheads"); |
| 840 | circleNodes = skin_detail_boolean("timeline-circle-nodes"); |
| @@ -840,10 +841,11 @@ | |
| 841 | colorGraph = skin_detail_boolean("timeline-color-graph-lines"); |
| 842 | iTopRow = pGraph->pFirst ? pGraph->pFirst->idx : 0; |
| 843 | omitDescenders = (tmFlags & TIMELINE_DISJOINT)!=0; |
| 844 | fileDiff = (tmFlags & TIMELINE_FILEDIFF)!=0; |
| 845 | scrollToSelect = (tmFlags & TIMELINE_NOSCROLL)==0; |
| 846 | dwellTimeout = atoi(db_get("timeline-dwelltime","250")); |
| 847 | @ <script id='timeline-data-%d(iTableId)' type='application/json'>{ |
| 848 | @ "iTableId": %d(iTableId), |
| 849 | @ "circleNodes": %d(circleNodes), |
| 850 | @ "showArrowheads": %d(showArrowheads), |
| 851 | @ "iRailPitch": %d(iRailPitch), |
| @@ -853,10 +855,11 @@ | |
| 855 | @ "omitDescenders": %d(omitDescenders), |
| 856 | @ "fileDiff": %d(fileDiff), |
| 857 | @ "scrollToSelect": %d(scrollToSelect), |
| 858 | @ "nrail": %d(pGraph->mxRail+1), |
| 859 | @ "baseUrl": "%R", |
| 860 | @ "dwellTimeout": %d(dwellTimeout), |
| 861 | @ "bottomRowId": "btm-%d(iTableId)", |
| 862 | if( pGraph->nRow==0 ){ |
| 863 | @ "rowinfo": null |
| 864 | }else{ |
| 865 | @ "rowinfo": [ |
| 866 |