Fossil SCM
Add the nsm query parameter to /timeline for disabling the submenu.
Commit
220ed0a939c4d353cc674ced4f528ffe16b4e3523526453685abd35b6650d684
Parent
b5acbe9b55bb5e2…
2 files changed
+13
-1
+4
+13
-1
| --- src/style.c | ||
| +++ src/style.c | ||
| @@ -79,10 +79,15 @@ | ||
| 79 | 79 | /* |
| 80 | 80 | ** Ad-unit styles. |
| 81 | 81 | */ |
| 82 | 82 | static unsigned adUnitFlags = 0; |
| 83 | 83 | |
| 84 | +/* | |
| 85 | +** Submenu disable flag | |
| 86 | +*/ | |
| 87 | +static int submenuEnable = 1; | |
| 88 | + | |
| 84 | 89 | /* |
| 85 | 90 | ** Flags for various javascript files needed prior to </body> |
| 86 | 91 | */ |
| 87 | 92 | static int needHrefJs = 0; /* href.js */ |
| 88 | 93 | static int needSortJs = 0; /* sorttable.js */ |
| @@ -316,10 +321,17 @@ | ||
| 316 | 321 | aSubmenuCtrl[nSubmenuCtrl].eVisible = STYLE_NORMAL; |
| 317 | 322 | aSubmenuCtrl[nSubmenuCtrl].eType = FF_MULTI; |
| 318 | 323 | nSubmenuCtrl++; |
| 319 | 324 | } |
| 320 | 325 | } |
| 326 | + | |
| 327 | +/* | |
| 328 | +** Disable or enable the submenu | |
| 329 | +*/ | |
| 330 | +void style_submenu_enable(int onOff){ | |
| 331 | + submenuEnable = onOff; | |
| 332 | +} | |
| 321 | 333 | |
| 322 | 334 | |
| 323 | 335 | /* |
| 324 | 336 | ** Compare two submenu items for sorting purposes |
| 325 | 337 | */ |
| @@ -774,11 +786,11 @@ | ||
| 774 | 786 | /* Go back and put the submenu at the top of the page. We delay the |
| 775 | 787 | ** creation of the submenu until the end so that we can add elements |
| 776 | 788 | ** to the submenu while generating page text. |
| 777 | 789 | */ |
| 778 | 790 | cgi_destination(CGI_HEADER); |
| 779 | - if( nSubmenu+nSubmenuCtrl>0 ){ | |
| 791 | + if( submenuEnable && nSubmenu+nSubmenuCtrl>0 ){ | |
| 780 | 792 | int i; |
| 781 | 793 | if( nSubmenuCtrl ){ |
| 782 | 794 | @ <form id='f01' method='GET' action='%R/%s(g.zPath)'> |
| 783 | 795 | @ <input type='hidden' name='udc' value='1'> |
| 784 | 796 | cgi_tag_query_parameter("udc"); |
| 785 | 797 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -79,10 +79,15 @@ | |
| 79 | /* |
| 80 | ** Ad-unit styles. |
| 81 | */ |
| 82 | static unsigned adUnitFlags = 0; |
| 83 | |
| 84 | /* |
| 85 | ** Flags for various javascript files needed prior to </body> |
| 86 | */ |
| 87 | static int needHrefJs = 0; /* href.js */ |
| 88 | static int needSortJs = 0; /* sorttable.js */ |
| @@ -316,10 +321,17 @@ | |
| 316 | aSubmenuCtrl[nSubmenuCtrl].eVisible = STYLE_NORMAL; |
| 317 | aSubmenuCtrl[nSubmenuCtrl].eType = FF_MULTI; |
| 318 | nSubmenuCtrl++; |
| 319 | } |
| 320 | } |
| 321 | |
| 322 | |
| 323 | /* |
| 324 | ** Compare two submenu items for sorting purposes |
| 325 | */ |
| @@ -774,11 +786,11 @@ | |
| 774 | /* Go back and put the submenu at the top of the page. We delay the |
| 775 | ** creation of the submenu until the end so that we can add elements |
| 776 | ** to the submenu while generating page text. |
| 777 | */ |
| 778 | cgi_destination(CGI_HEADER); |
| 779 | if( nSubmenu+nSubmenuCtrl>0 ){ |
| 780 | int i; |
| 781 | if( nSubmenuCtrl ){ |
| 782 | @ <form id='f01' method='GET' action='%R/%s(g.zPath)'> |
| 783 | @ <input type='hidden' name='udc' value='1'> |
| 784 | cgi_tag_query_parameter("udc"); |
| 785 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -79,10 +79,15 @@ | |
| 79 | /* |
| 80 | ** Ad-unit styles. |
| 81 | */ |
| 82 | static unsigned adUnitFlags = 0; |
| 83 | |
| 84 | /* |
| 85 | ** Submenu disable flag |
| 86 | */ |
| 87 | static int submenuEnable = 1; |
| 88 | |
| 89 | /* |
| 90 | ** Flags for various javascript files needed prior to </body> |
| 91 | */ |
| 92 | static int needHrefJs = 0; /* href.js */ |
| 93 | static int needSortJs = 0; /* sorttable.js */ |
| @@ -316,10 +321,17 @@ | |
| 321 | aSubmenuCtrl[nSubmenuCtrl].eVisible = STYLE_NORMAL; |
| 322 | aSubmenuCtrl[nSubmenuCtrl].eType = FF_MULTI; |
| 323 | nSubmenuCtrl++; |
| 324 | } |
| 325 | } |
| 326 | |
| 327 | /* |
| 328 | ** Disable or enable the submenu |
| 329 | */ |
| 330 | void style_submenu_enable(int onOff){ |
| 331 | submenuEnable = onOff; |
| 332 | } |
| 333 | |
| 334 | |
| 335 | /* |
| 336 | ** Compare two submenu items for sorting purposes |
| 337 | */ |
| @@ -774,11 +786,11 @@ | |
| 786 | /* Go back and put the submenu at the top of the page. We delay the |
| 787 | ** creation of the submenu until the end so that we can add elements |
| 788 | ** to the submenu while generating page text. |
| 789 | */ |
| 790 | cgi_destination(CGI_HEADER); |
| 791 | if( submenuEnable && nSubmenu+nSubmenuCtrl>0 ){ |
| 792 | int i; |
| 793 | if( nSubmenuCtrl ){ |
| 794 | @ <form id='f01' method='GET' action='%R/%s(g.zPath)'> |
| 795 | @ <input type='hidden' name='udc' value='1'> |
| 796 | cgi_tag_query_parameter("udc"); |
| 797 |
+4
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -1577,10 +1577,11 @@ | ||
| 1577 | 1577 | ** ss=VIEWSTYLE c: "Compact" v: "Verbose" m: "Modern" j: "Columnar" |
| 1578 | 1578 | ** advm Use the "Advanced" or "Busy" menu design. |
| 1579 | 1579 | ** ng No Graph. |
| 1580 | 1580 | ** ncp Omit cherrypick merges |
| 1581 | 1581 | ** nd Do not highlight the focus check-in |
| 1582 | +** nsm Omit the submenu | |
| 1582 | 1583 | ** v Show details of files changed |
| 1583 | 1584 | ** vfx Show complete text of forum messages |
| 1584 | 1585 | ** f=CHECKIN Show family (immediate parents and children) of CHECKIN |
| 1585 | 1586 | ** from=CHECKIN Path from... |
| 1586 | 1587 | ** to=CHECKIN ... to this |
| @@ -1803,10 +1804,13 @@ | ||
| 1803 | 1804 | tmFlags &= ~TIMELINE_CHPICK; |
| 1804 | 1805 | } |
| 1805 | 1806 | if( PB("ng") || zSearch!=0 ){ |
| 1806 | 1807 | tmFlags &= ~(TIMELINE_GRAPH|TIMELINE_CHPICK); |
| 1807 | 1808 | } |
| 1809 | + if( PB("nsm") ){ | |
| 1810 | + style_submenu_enable(0); | |
| 1811 | + } | |
| 1808 | 1812 | if( PB("brbg") ){ |
| 1809 | 1813 | tmFlags |= TIMELINE_BRCOLOR; |
| 1810 | 1814 | } |
| 1811 | 1815 | if( PB("unhide") ){ |
| 1812 | 1816 | tmFlags |= TIMELINE_UNHIDE; |
| 1813 | 1817 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1577,10 +1577,11 @@ | |
| 1577 | ** ss=VIEWSTYLE c: "Compact" v: "Verbose" m: "Modern" j: "Columnar" |
| 1578 | ** advm Use the "Advanced" or "Busy" menu design. |
| 1579 | ** ng No Graph. |
| 1580 | ** ncp Omit cherrypick merges |
| 1581 | ** nd Do not highlight the focus check-in |
| 1582 | ** v Show details of files changed |
| 1583 | ** vfx Show complete text of forum messages |
| 1584 | ** f=CHECKIN Show family (immediate parents and children) of CHECKIN |
| 1585 | ** from=CHECKIN Path from... |
| 1586 | ** to=CHECKIN ... to this |
| @@ -1803,10 +1804,13 @@ | |
| 1803 | tmFlags &= ~TIMELINE_CHPICK; |
| 1804 | } |
| 1805 | if( PB("ng") || zSearch!=0 ){ |
| 1806 | tmFlags &= ~(TIMELINE_GRAPH|TIMELINE_CHPICK); |
| 1807 | } |
| 1808 | if( PB("brbg") ){ |
| 1809 | tmFlags |= TIMELINE_BRCOLOR; |
| 1810 | } |
| 1811 | if( PB("unhide") ){ |
| 1812 | tmFlags |= TIMELINE_UNHIDE; |
| 1813 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1577,10 +1577,11 @@ | |
| 1577 | ** ss=VIEWSTYLE c: "Compact" v: "Verbose" m: "Modern" j: "Columnar" |
| 1578 | ** advm Use the "Advanced" or "Busy" menu design. |
| 1579 | ** ng No Graph. |
| 1580 | ** ncp Omit cherrypick merges |
| 1581 | ** nd Do not highlight the focus check-in |
| 1582 | ** nsm Omit the submenu |
| 1583 | ** v Show details of files changed |
| 1584 | ** vfx Show complete text of forum messages |
| 1585 | ** f=CHECKIN Show family (immediate parents and children) of CHECKIN |
| 1586 | ** from=CHECKIN Path from... |
| 1587 | ** to=CHECKIN ... to this |
| @@ -1803,10 +1804,13 @@ | |
| 1804 | tmFlags &= ~TIMELINE_CHPICK; |
| 1805 | } |
| 1806 | if( PB("ng") || zSearch!=0 ){ |
| 1807 | tmFlags &= ~(TIMELINE_GRAPH|TIMELINE_CHPICK); |
| 1808 | } |
| 1809 | if( PB("nsm") ){ |
| 1810 | style_submenu_enable(0); |
| 1811 | } |
| 1812 | if( PB("brbg") ){ |
| 1813 | tmFlags |= TIMELINE_BRCOLOR; |
| 1814 | } |
| 1815 | if( PB("unhide") ){ |
| 1816 | tmFlags |= TIMELINE_UNHIDE; |
| 1817 |