Fossil SCM

Add the nsm query parameter to /timeline for disabling the submenu.

drh 2020-03-14 21:00 trunk
Commit 220ed0a939c4d353cc674ced4f528ffe16b4e3523526453685abd35b6650d684
2 files changed +13 -1 +4
+13 -1
--- src/style.c
+++ src/style.c
@@ -79,10 +79,15 @@
7979
/*
8080
** Ad-unit styles.
8181
*/
8282
static unsigned adUnitFlags = 0;
8383
84
+/*
85
+** Submenu disable flag
86
+*/
87
+static int submenuEnable = 1;
88
+
8489
/*
8590
** Flags for various javascript files needed prior to </body>
8691
*/
8792
static int needHrefJs = 0; /* href.js */
8893
static int needSortJs = 0; /* sorttable.js */
@@ -316,10 +321,17 @@
316321
aSubmenuCtrl[nSubmenuCtrl].eVisible = STYLE_NORMAL;
317322
aSubmenuCtrl[nSubmenuCtrl].eType = FF_MULTI;
318323
nSubmenuCtrl++;
319324
}
320325
}
326
+
327
+/*
328
+** Disable or enable the submenu
329
+*/
330
+void style_submenu_enable(int onOff){
331
+ submenuEnable = onOff;
332
+}
321333
322334
323335
/*
324336
** Compare two submenu items for sorting purposes
325337
*/
@@ -774,11 +786,11 @@
774786
/* Go back and put the submenu at the top of the page. We delay the
775787
** creation of the submenu until the end so that we can add elements
776788
** to the submenu while generating page text.
777789
*/
778790
cgi_destination(CGI_HEADER);
779
- if( nSubmenu+nSubmenuCtrl>0 ){
791
+ if( submenuEnable && nSubmenu+nSubmenuCtrl>0 ){
780792
int i;
781793
if( nSubmenuCtrl ){
782794
@ <form id='f01' method='GET' action='%R/%s(g.zPath)'>
783795
@ <input type='hidden' name='udc' value='1'>
784796
cgi_tag_query_parameter("udc");
785797
--- 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
--- src/timeline.c
+++ src/timeline.c
@@ -1577,10 +1577,11 @@
15771577
** ss=VIEWSTYLE c: "Compact" v: "Verbose" m: "Modern" j: "Columnar"
15781578
** advm Use the "Advanced" or "Busy" menu design.
15791579
** ng No Graph.
15801580
** ncp Omit cherrypick merges
15811581
** nd Do not highlight the focus check-in
1582
+** nsm Omit the submenu
15821583
** v Show details of files changed
15831584
** vfx Show complete text of forum messages
15841585
** f=CHECKIN Show family (immediate parents and children) of CHECKIN
15851586
** from=CHECKIN Path from...
15861587
** to=CHECKIN ... to this
@@ -1803,10 +1804,13 @@
18031804
tmFlags &= ~TIMELINE_CHPICK;
18041805
}
18051806
if( PB("ng") || zSearch!=0 ){
18061807
tmFlags &= ~(TIMELINE_GRAPH|TIMELINE_CHPICK);
18071808
}
1809
+ if( PB("nsm") ){
1810
+ style_submenu_enable(0);
1811
+ }
18081812
if( PB("brbg") ){
18091813
tmFlags |= TIMELINE_BRCOLOR;
18101814
}
18111815
if( PB("unhide") ){
18121816
tmFlags |= TIMELINE_UNHIDE;
18131817
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button