Fossil SCM

Implement style_submenu_checkbox(). Change "unhide" to a checkbox so it can be cancelled without editing the URL by hand. Update skins to support use of <label> tag. Remove redundant "if" check in style.c. Checkbox styling can certainly be improved, but this is a start.

andygoth 2016-11-05 02:29 trunk
Commit 8d880f0bb43cfb3a2d07c6b9bfdee575e2d6e48d
--- skins/black_and_white/css.txt
+++ skins/black_and_white/css.txt
@@ -106,16 +106,16 @@
106106
border-width:1px 0px;
107107
background-color: #eee;
108108
color: #333;
109109
}
110110
div.submenu a, div.submenu a:visited, div.sectionmenu>a.button:link,
111
-div.sectionmenu>a.button:visited {
111
+div.sectionmenu>a.button:visited, div.submenu label {
112112
padding: 3px 10px 3px 10px;
113113
color: #333;
114114
text-decoration: none;
115115
}
116
-div.submenu a:hover, div.sectionmenu>a.button:hover {
116
+div.submenu a:hover, div.sectionmenu>a.button:hover, div.submenu label:hover {
117117
color: #eee;
118118
background-color: #333;
119119
}
120120
121121
/* All page content from the bottom of the menu or submenu down to
122122
--- skins/black_and_white/css.txt
+++ skins/black_and_white/css.txt
@@ -106,16 +106,16 @@
106 border-width:1px 0px;
107 background-color: #eee;
108 color: #333;
109 }
110 div.submenu a, div.submenu a:visited, div.sectionmenu>a.button:link,
111 div.sectionmenu>a.button:visited {
112 padding: 3px 10px 3px 10px;
113 color: #333;
114 text-decoration: none;
115 }
116 div.submenu a:hover, div.sectionmenu>a.button:hover {
117 color: #eee;
118 background-color: #333;
119 }
120
121 /* All page content from the bottom of the menu or submenu down to
122
--- skins/black_and_white/css.txt
+++ skins/black_and_white/css.txt
@@ -106,16 +106,16 @@
106 border-width:1px 0px;
107 background-color: #eee;
108 color: #333;
109 }
110 div.submenu a, div.submenu a:visited, div.sectionmenu>a.button:link,
111 div.sectionmenu>a.button:visited, div.submenu label {
112 padding: 3px 10px 3px 10px;
113 color: #333;
114 text-decoration: none;
115 }
116 div.submenu a:hover, div.sectionmenu>a.button:hover, div.submenu label:hover {
117 color: #eee;
118 background-color: #333;
119 }
120
121 /* All page content from the bottom of the menu or submenu down to
122
--- skins/blitz/css.txt
+++ skins/blitz/css.txt
@@ -894,19 +894,19 @@
894894
895895
.submenu input, .submenu select {
896896
margin: 0 0 0 5px;
897897
}
898898
899
-.submenu a {
899
+.submenu a, .submenu label {
900900
color: #3b5c6b;
901901
padding: 5px 15px;
902902
text-decoration: none;
903903
border: 1px solid transparent;
904904
border-radius: 5px;
905905
}
906906
907
-.submenu a:hover {
907
+.submenu a:hover, .submenu label:hover {
908908
border: 1px solid #ccc;
909909
}
910910
911911
912912
/* Section
913913
--- skins/blitz/css.txt
+++ skins/blitz/css.txt
@@ -894,19 +894,19 @@
894
895 .submenu input, .submenu select {
896 margin: 0 0 0 5px;
897 }
898
899 .submenu a {
900 color: #3b5c6b;
901 padding: 5px 15px;
902 text-decoration: none;
903 border: 1px solid transparent;
904 border-radius: 5px;
905 }
906
907 .submenu a:hover {
908 border: 1px solid #ccc;
909 }
910
911
912 /* Section
913
--- skins/blitz/css.txt
+++ skins/blitz/css.txt
@@ -894,19 +894,19 @@
894
895 .submenu input, .submenu select {
896 margin: 0 0 0 5px;
897 }
898
899 .submenu a, .submenu label {
900 color: #3b5c6b;
901 padding: 5px 15px;
902 text-decoration: none;
903 border: 1px solid transparent;
904 border-radius: 5px;
905 }
906
907 .submenu a:hover, .submenu label:hover {
908 border: 1px solid #ccc;
909 }
910
911
912 /* Section
913
--- skins/blitz_no_logo/css.txt
+++ skins/blitz_no_logo/css.txt
@@ -894,19 +894,19 @@
894894
895895
.submenu input, .submenu select {
896896
margin: 0 0 0 5px;
897897
}
898898
899
-.submenu a {
899
+.submenu a, .submenu label {
900900
color: #3b5c6b;
901901
padding: 5px 15px;
902902
text-decoration: none;
903903
border: 1px solid transparent;
904904
border-radius: 5px;
905905
}
906906
907
-.submenu a:hover {
907
+.submenu a:hover, .submenu label:hover {
908908
border: 1px solid #ccc;
909909
}
910910
911911
912912
/* Section
913913
--- skins/blitz_no_logo/css.txt
+++ skins/blitz_no_logo/css.txt
@@ -894,19 +894,19 @@
894
895 .submenu input, .submenu select {
896 margin: 0 0 0 5px;
897 }
898
899 .submenu a {
900 color: #3b5c6b;
901 padding: 5px 15px;
902 text-decoration: none;
903 border: 1px solid transparent;
904 border-radius: 5px;
905 }
906
907 .submenu a:hover {
908 border: 1px solid #ccc;
909 }
910
911
912 /* Section
913
--- skins/blitz_no_logo/css.txt
+++ skins/blitz_no_logo/css.txt
@@ -894,19 +894,19 @@
894
895 .submenu input, .submenu select {
896 margin: 0 0 0 5px;
897 }
898
899 .submenu a, .submenu label {
900 color: #3b5c6b;
901 padding: 5px 15px;
902 text-decoration: none;
903 border: 1px solid transparent;
904 border-radius: 5px;
905 }
906
907 .submenu a:hover, .submenu label:hover {
908 border: 1px solid #ccc;
909 }
910
911
912 /* Section
913
--- skins/default/css.txt
+++ skins/default/css.txt
@@ -104,17 +104,17 @@
104104
margin-top: 10px;
105105
padding: 10px;
106106
border-bottom: 1px solid #ccc;
107107
}
108108
109
-.submenu a {
109
+.submenu a, .submenu label {
110110
padding: 10px 11px;
111111
text-decoration:none;
112112
color: #777;
113113
}
114114
115
-.submenu a:hover {
115
+.submenu a:hover, .submenu label:hover {
116116
padding: 6px 10px;
117117
border: 1px solid #ccc;
118118
border-radius: 5px;
119119
color: #000;
120120
}
121121
--- skins/default/css.txt
+++ skins/default/css.txt
@@ -104,17 +104,17 @@
104 margin-top: 10px;
105 padding: 10px;
106 border-bottom: 1px solid #ccc;
107 }
108
109 .submenu a {
110 padding: 10px 11px;
111 text-decoration:none;
112 color: #777;
113 }
114
115 .submenu a:hover {
116 padding: 6px 10px;
117 border: 1px solid #ccc;
118 border-radius: 5px;
119 color: #000;
120 }
121
--- skins/default/css.txt
+++ skins/default/css.txt
@@ -104,17 +104,17 @@
104 margin-top: 10px;
105 padding: 10px;
106 border-bottom: 1px solid #ccc;
107 }
108
109 .submenu a, .submenu label {
110 padding: 10px 11px;
111 text-decoration:none;
112 color: #777;
113 }
114
115 .submenu a:hover, .submenu label:hover {
116 padding: 6px 10px;
117 border: 1px solid #ccc;
118 border-radius: 5px;
119 color: #000;
120 }
121
--- skins/eagle/css.txt
+++ skins/eagle/css.txt
@@ -73,16 +73,18 @@
7373
text-align: center;
7474
background-color: #485D7B;
7575
color: white;
7676
}
7777
div.mainmenu a, div.mainmenu a:visited, div.submenu a, div.submenu a:visited,
78
-div.sectionmenu>a.button:link, div.sectionmenu>a.button:visited {
78
+div.sectionmenu>a.button:link, div.sectionmenu>a.button:visited,
79
+div.submenu label {
7980
padding: 3px 10px 3px 10px;
8081
color: white;
8182
text-decoration: none;
8283
}
83
-div.mainmenu a:hover, div.submenu a:hover, div.sectionmenu>a.button:hover {
84
+div.mainmenu a:hover, div.submenu a:hover, div.sectionmenu>a.button:hover,
85
+div.submenu label:hover {
8486
text-decoration: underline;
8587
}
8688
8789
/* All page content from the bottom of the menu or submenu down to
8890
** the footer */
8991
--- skins/eagle/css.txt
+++ skins/eagle/css.txt
@@ -73,16 +73,18 @@
73 text-align: center;
74 background-color: #485D7B;
75 color: white;
76 }
77 div.mainmenu a, div.mainmenu a:visited, div.submenu a, div.submenu a:visited,
78 div.sectionmenu>a.button:link, div.sectionmenu>a.button:visited {
 
79 padding: 3px 10px 3px 10px;
80 color: white;
81 text-decoration: none;
82 }
83 div.mainmenu a:hover, div.submenu a:hover, div.sectionmenu>a.button:hover {
 
84 text-decoration: underline;
85 }
86
87 /* All page content from the bottom of the menu or submenu down to
88 ** the footer */
89
--- skins/eagle/css.txt
+++ skins/eagle/css.txt
@@ -73,16 +73,18 @@
73 text-align: center;
74 background-color: #485D7B;
75 color: white;
76 }
77 div.mainmenu a, div.mainmenu a:visited, div.submenu a, div.submenu a:visited,
78 div.sectionmenu>a.button:link, div.sectionmenu>a.button:visited,
79 div.submenu label {
80 padding: 3px 10px 3px 10px;
81 color: white;
82 text-decoration: none;
83 }
84 div.mainmenu a:hover, div.submenu a:hover, div.sectionmenu>a.button:hover,
85 div.submenu label:hover {
86 text-decoration: underline;
87 }
88
89 /* All page content from the bottom of the menu or submenu down to
90 ** the footer */
91
--- skins/enhanced1/css.txt
+++ skins/enhanced1/css.txt
@@ -71,16 +71,18 @@
7171
text-align: center;
7272
background-color: #456878;
7373
color: white;
7474
}
7575
div.mainmenu a, div.mainmenu a:visited, div.submenu a, div.submenu a:visited,
76
-div.sectionmenu>a.button:link, div.sectionmenu>a.button:visited {
76
+div.sectionmenu>a.button:link, div.sectionmenu>a.button:visited,
77
+div.submenu label {
7778
padding: 3px 10px 3px 10px;
7879
color: white;
7980
text-decoration: none;
8081
}
81
-div.mainmenu a:hover, div.submenu a:hover, div.sectionmenu>a.button:hover {
82
+div.mainmenu a:hover, div.submenu a:hover, div.sectionmenu>a.button:hover,
83
+div.submenu label:hover {
8284
color: #558195;
8385
background-color: white;
8486
}
8587
8688
/* All page content from the bottom of the menu or submenu down to
8789
--- skins/enhanced1/css.txt
+++ skins/enhanced1/css.txt
@@ -71,16 +71,18 @@
71 text-align: center;
72 background-color: #456878;
73 color: white;
74 }
75 div.mainmenu a, div.mainmenu a:visited, div.submenu a, div.submenu a:visited,
76 div.sectionmenu>a.button:link, div.sectionmenu>a.button:visited {
 
77 padding: 3px 10px 3px 10px;
78 color: white;
79 text-decoration: none;
80 }
81 div.mainmenu a:hover, div.submenu a:hover, div.sectionmenu>a.button:hover {
 
82 color: #558195;
83 background-color: white;
84 }
85
86 /* All page content from the bottom of the menu or submenu down to
87
--- skins/enhanced1/css.txt
+++ skins/enhanced1/css.txt
@@ -71,16 +71,18 @@
71 text-align: center;
72 background-color: #456878;
73 color: white;
74 }
75 div.mainmenu a, div.mainmenu a:visited, div.submenu a, div.submenu a:visited,
76 div.sectionmenu>a.button:link, div.sectionmenu>a.button:visited,
77 div.submenu label {
78 padding: 3px 10px 3px 10px;
79 color: white;
80 text-decoration: none;
81 }
82 div.mainmenu a:hover, div.submenu a:hover, div.sectionmenu>a.button:hover,
83 div.submenu label:hover {
84 color: #558195;
85 background-color: white;
86 }
87
88 /* All page content from the bottom of the menu or submenu down to
89
--- skins/khaki/css.txt
+++ skins/khaki/css.txt
@@ -69,16 +69,18 @@
6969
text-align: center;
7070
background-color: #c0af58;
7171
color: white;
7272
}
7373
div.mainmenu a, div.mainmenu a:visited, div.submenu a, div.submenu a:visited,
74
-div.sectionmenu>a.button:link, div.sectionmenu>a.button:visited {
74
+div.sectionmenu>a.button:link, div.sectionmenu>a.button:visited,
75
+div.submenu label {
7576
padding: 3px 10px 3px 10px;
7677
color: white;
7778
text-decoration: none;
7879
}
79
-div.mainmenu a:hover, div.submenu a:hover, div.sectionmenu>a.button:hover {
80
+div.mainmenu a:hover, div.submenu a:hover, div.sectionmenu>a.button:hover
81
+div.submenu label:hover {
8082
color: #a09048;
8183
background-color: white;
8284
}
8385
8486
/* All page content from the bottom of the menu or submenu down to
8587
--- skins/khaki/css.txt
+++ skins/khaki/css.txt
@@ -69,16 +69,18 @@
69 text-align: center;
70 background-color: #c0af58;
71 color: white;
72 }
73 div.mainmenu a, div.mainmenu a:visited, div.submenu a, div.submenu a:visited,
74 div.sectionmenu>a.button:link, div.sectionmenu>a.button:visited {
 
75 padding: 3px 10px 3px 10px;
76 color: white;
77 text-decoration: none;
78 }
79 div.mainmenu a:hover, div.submenu a:hover, div.sectionmenu>a.button:hover {
 
80 color: #a09048;
81 background-color: white;
82 }
83
84 /* All page content from the bottom of the menu or submenu down to
85
--- skins/khaki/css.txt
+++ skins/khaki/css.txt
@@ -69,16 +69,18 @@
69 text-align: center;
70 background-color: #c0af58;
71 color: white;
72 }
73 div.mainmenu a, div.mainmenu a:visited, div.submenu a, div.submenu a:visited,
74 div.sectionmenu>a.button:link, div.sectionmenu>a.button:visited,
75 div.submenu label {
76 padding: 3px 10px 3px 10px;
77 color: white;
78 text-decoration: none;
79 }
80 div.mainmenu a:hover, div.submenu a:hover, div.sectionmenu>a.button:hover
81 div.submenu label:hover {
82 color: #a09048;
83 background-color: white;
84 }
85
86 /* All page content from the bottom of the menu or submenu down to
87
--- skins/original/css.txt
+++ skins/original/css.txt
@@ -71,16 +71,18 @@
7171
text-align: center;
7272
background-color: #456878;
7373
color: white;
7474
}
7575
div.mainmenu a, div.mainmenu a:visited, div.submenu a, div.submenu a:visited,
76
-div.sectionmenu>a.button:link, div.sectionmenu>a.button:visited {
76
+div.sectionmenu>a.button:link, div.sectionmenu>a.button:visited,
77
+div.submenu label {
7778
padding: 3px 10px 3px 10px;
7879
color: white;
7980
text-decoration: none;
8081
}
81
-div.mainmenu a:hover, div.submenu a:hover, div.sectionmenu>a.button:hover {
82
+div.mainmenu a:hover, div.submenu a:hover, div.sectionmenu>a.button:hover,
83
+div.submenu label:hover {
8284
color: #558195;
8385
background-color: white;
8486
}
8587
8688
/* All page content from the bottom of the menu or submenu down to
8789
--- skins/original/css.txt
+++ skins/original/css.txt
@@ -71,16 +71,18 @@
71 text-align: center;
72 background-color: #456878;
73 color: white;
74 }
75 div.mainmenu a, div.mainmenu a:visited, div.submenu a, div.submenu a:visited,
76 div.sectionmenu>a.button:link, div.sectionmenu>a.button:visited {
 
77 padding: 3px 10px 3px 10px;
78 color: white;
79 text-decoration: none;
80 }
81 div.mainmenu a:hover, div.submenu a:hover, div.sectionmenu>a.button:hover {
 
82 color: #558195;
83 background-color: white;
84 }
85
86 /* All page content from the bottom of the menu or submenu down to
87
--- skins/original/css.txt
+++ skins/original/css.txt
@@ -71,16 +71,18 @@
71 text-align: center;
72 background-color: #456878;
73 color: white;
74 }
75 div.mainmenu a, div.mainmenu a:visited, div.submenu a, div.submenu a:visited,
76 div.sectionmenu>a.button:link, div.sectionmenu>a.button:visited,
77 div.submenu label {
78 padding: 3px 10px 3px 10px;
79 color: white;
80 text-decoration: none;
81 }
82 div.mainmenu a:hover, div.submenu a:hover, div.sectionmenu>a.button:hover,
83 div.submenu label:hover {
84 color: #558195;
85 background-color: white;
86 }
87
88 /* All page content from the bottom of the menu or submenu down to
89
--- skins/plain_gray/css.txt
+++ skins/plain_gray/css.txt
@@ -71,16 +71,18 @@
7171
text-align: center;
7272
background-color: #606060;
7373
color: white;
7474
}
7575
div.mainmenu a, div.mainmenu a:visited, div.submenu a, div.submenu a:visited,
76
-div.sectionmenu>a.button:link, div.sectionmenu>a.button:visited {
76
+div.sectionmenu>a.button:link, div.sectionmenu>a.button:visited,
77
+div.submenu label {
7778
padding: 3px 10px 3px 10px;
7879
color: white;
7980
text-decoration: none;
8081
}
81
-div.mainmenu a:hover, div.submenu a:hover, div.sectionmenu>a.button:hover {
82
+div.mainmenu a:hover, div.submenu a:hover, div.sectionmenu>a.button:hover,
83
+div.submenu label:hover {
8284
color: #404040;
8385
background-color: white;
8486
}
8587
8688
/* All page content from the bottom of the menu or submenu down to
8789
--- skins/plain_gray/css.txt
+++ skins/plain_gray/css.txt
@@ -71,16 +71,18 @@
71 text-align: center;
72 background-color: #606060;
73 color: white;
74 }
75 div.mainmenu a, div.mainmenu a:visited, div.submenu a, div.submenu a:visited,
76 div.sectionmenu>a.button:link, div.sectionmenu>a.button:visited {
 
77 padding: 3px 10px 3px 10px;
78 color: white;
79 text-decoration: none;
80 }
81 div.mainmenu a:hover, div.submenu a:hover, div.sectionmenu>a.button:hover {
 
82 color: #404040;
83 background-color: white;
84 }
85
86 /* All page content from the bottom of the menu or submenu down to
87
--- skins/plain_gray/css.txt
+++ skins/plain_gray/css.txt
@@ -71,16 +71,18 @@
71 text-align: center;
72 background-color: #606060;
73 color: white;
74 }
75 div.mainmenu a, div.mainmenu a:visited, div.submenu a, div.submenu a:visited,
76 div.sectionmenu>a.button:link, div.sectionmenu>a.button:visited,
77 div.submenu label {
78 padding: 3px 10px 3px 10px;
79 color: white;
80 text-decoration: none;
81 }
82 div.mainmenu a:hover, div.submenu a:hover, div.sectionmenu>a.button:hover,
83 div.submenu label:hover {
84 color: #404040;
85 background-color: white;
86 }
87
88 /* All page content from the bottom of the menu or submenu down to
89
--- skins/rounded1/css.txt
+++ skins/rounded1/css.txt
@@ -84,11 +84,11 @@
8484
div.mainmenu a, div.mainmenu a:visited {
8585
padding: 3px 10px 3px 10px;
8686
color: white;
8787
text-decoration: none;
8888
}
89
-div.submenu a, div.submenu a:visited, a.button,
89
+div.submenu a, div.submenu a:visited, a.button, div.submenu label
9090
div.sectionmenu>a.button:link, div.sectionmenu>a.button:visited {
9191
padding: 2px 8px;
9292
color: #000;
9393
font-family: Arial;
9494
text-decoration: none;
@@ -102,11 +102,11 @@
102102
div.mainmenu a:hover {
103103
color: #000;
104104
background-color: white;
105105
}
106106
107
-div.submenu a:hover, div.sectionmenu>a.button:hover {
107
+div.submenu a:hover, div.sectionmenu>a.button:hover, div.submenu label:hover {
108108
background-color: #c0c0c0;
109109
}
110110
111111
/* All page content from the bottom of the menu or submenu down to
112112
** the footer */
113113
--- skins/rounded1/css.txt
+++ skins/rounded1/css.txt
@@ -84,11 +84,11 @@
84 div.mainmenu a, div.mainmenu a:visited {
85 padding: 3px 10px 3px 10px;
86 color: white;
87 text-decoration: none;
88 }
89 div.submenu a, div.submenu a:visited, a.button,
90 div.sectionmenu>a.button:link, div.sectionmenu>a.button:visited {
91 padding: 2px 8px;
92 color: #000;
93 font-family: Arial;
94 text-decoration: none;
@@ -102,11 +102,11 @@
102 div.mainmenu a:hover {
103 color: #000;
104 background-color: white;
105 }
106
107 div.submenu a:hover, div.sectionmenu>a.button:hover {
108 background-color: #c0c0c0;
109 }
110
111 /* All page content from the bottom of the menu or submenu down to
112 ** the footer */
113
--- skins/rounded1/css.txt
+++ skins/rounded1/css.txt
@@ -84,11 +84,11 @@
84 div.mainmenu a, div.mainmenu a:visited {
85 padding: 3px 10px 3px 10px;
86 color: white;
87 text-decoration: none;
88 }
89 div.submenu a, div.submenu a:visited, a.button, div.submenu label
90 div.sectionmenu>a.button:link, div.sectionmenu>a.button:visited {
91 padding: 2px 8px;
92 color: #000;
93 font-family: Arial;
94 text-decoration: none;
@@ -102,11 +102,11 @@
102 div.mainmenu a:hover {
103 color: #000;
104 background-color: white;
105 }
106
107 div.submenu a:hover, div.sectionmenu>a.button:hover, div.submenu label:hover {
108 background-color: #c0c0c0;
109 }
110
111 /* All page content from the bottom of the menu or submenu down to
112 ** the footer */
113
--- skins/xekri/css.txt
+++ skins/xekri/css.txt
@@ -158,17 +158,17 @@
158158
border-top: 1px solid #0a0;
159159
border-radius: 0;
160160
display: block;
161161
}
162162
163
-div.mainmenu a, div.submenu a {
163
+div.mainmenu a, div.submenu a, div.submenu label {
164164
color: #000;
165165
padding: 0 0.75rem;
166166
text-decoration: none;
167167
}
168168
169
-div.mainmenu a:hover, div.submenu a:hover {
169
+div.mainmenu a:hover, div.submenu a:hover, div.submenu label:hover {
170170
color: #fff;
171171
text-shadow: 0px 0px 6px #0f0;
172172
}
173173
174174
div.submenu * {
175175
--- skins/xekri/css.txt
+++ skins/xekri/css.txt
@@ -158,17 +158,17 @@
158 border-top: 1px solid #0a0;
159 border-radius: 0;
160 display: block;
161 }
162
163 div.mainmenu a, div.submenu a {
164 color: #000;
165 padding: 0 0.75rem;
166 text-decoration: none;
167 }
168
169 div.mainmenu a:hover, div.submenu a:hover {
170 color: #fff;
171 text-shadow: 0px 0px 6px #0f0;
172 }
173
174 div.submenu * {
175
--- skins/xekri/css.txt
+++ skins/xekri/css.txt
@@ -158,17 +158,17 @@
158 border-top: 1px solid #0a0;
159 border-radius: 0;
160 display: block;
161 }
162
163 div.mainmenu a, div.submenu a, div.submenu label {
164 color: #000;
165 padding: 0 0.75rem;
166 text-decoration: none;
167 }
168
169 div.mainmenu a:hover, div.submenu a:hover, div.submenu label:hover {
170 color: #fff;
171 text-shadow: 0px 0px 6px #0f0;
172 }
173
174 div.submenu * {
175
+88 -67
--- src/style.c
+++ src/style.c
@@ -30,11 +30,13 @@
3030
** Populate these structure with calls to
3131
**
3232
** style_submenu_element()
3333
** style_submenu_entry()
3434
** style_submenu_checkbox()
35
+** style_submenu_binary()
3536
** style_submenu_multichoice()
37
+** style_submenu_sql()
3638
**
3739
** prior to calling style_footer(). The style_footer() routine
3840
** will generate the appropriate HTML text just below the main
3941
** menu.
4042
*/
@@ -51,13 +53,14 @@
5153
short int iSize; /* Width for FF_ENTRY. Count for FF_MULTI */
5254
const char *const *azChoice;/* value/display pairs for FF_MULTI */
5355
const char *zFalse; /* FF_BINARY label when false */
5456
} aSubmenuCtrl[20];
5557
static int nSubmenuCtrl = 0;
56
-#define FF_ENTRY 1
57
-#define FF_MULTI 2
58
-#define FF_BINARY 3
58
+#define FF_ENTRY 1
59
+#define FF_MULTI 2
60
+#define FF_BINARY 3
61
+#define FF_CHECKBOX 4
5962
6063
/*
6164
** Remember that the header has been generated. The footer is omitted
6265
** if an error occurs before the header.
6366
*/
@@ -253,10 +256,22 @@
253256
aSubmenuCtrl[nSubmenuCtrl].zLabel = zLabel;
254257
aSubmenuCtrl[nSubmenuCtrl].iSize = iSize;
255258
aSubmenuCtrl[nSubmenuCtrl].isDisabled = isDisabled;
256259
aSubmenuCtrl[nSubmenuCtrl].eType = FF_ENTRY;
257260
nSubmenuCtrl++;
261
+}
262
+void style_submenu_checkbox(
263
+ const char *zName, /* Query parameter name */
264
+ const char *zLabel, /* Label to display after the checkbox */
265
+ int isDisabled /* True if disabled */
266
+){
267
+ assert( nSubmenuCtrl < count(aSubmenuCtrl) );
268
+ aSubmenuCtrl[nSubmenuCtrl].zName = zName;
269
+ aSubmenuCtrl[nSubmenuCtrl].zLabel = zLabel;
270
+ aSubmenuCtrl[nSubmenuCtrl].isDisabled = isDisabled;
271
+ aSubmenuCtrl[nSubmenuCtrl].eType = FF_CHECKBOX;
272
+ nSubmenuCtrl++;
258273
}
259274
void style_submenu_binary(
260275
const char *zName, /* Query parameter name */
261276
const char *zTrue, /* Label to show when parameter is true */
262277
const char *zFalse, /* Label to show when the parameter is false */
@@ -521,74 +536,80 @@
521536
}else{
522537
@ <a class="label" href="%h(p->zLink)">%h(p->zLabel)</a>
523538
}
524539
}
525540
}
526
- if( nSubmenuCtrl>0 ){
527
- for(i=0; i<nSubmenuCtrl; i++){
528
- const char *zQPN = aSubmenuCtrl[i].zName;
529
- const char *zDisabled = " disabled";
530
- if( !aSubmenuCtrl[i].isDisabled ){
531
- zDisabled = "";
532
- cgi_tag_query_parameter(zQPN);
533
- }
534
- switch( aSubmenuCtrl[i].eType ){
535
- case FF_ENTRY: {
536
- cgi_printf(
537
- "<span class='submenuctrl'>"
538
- "&nbsp;%h<input type='text' name='%s' size='%d' maxlength='%d'"
539
- " value='%h'%s></span>\n",
540
- aSubmenuCtrl[i].zLabel,
541
- zQPN,
542
- aSubmenuCtrl[i].iSize, aSubmenuCtrl[i].iSize,
543
- PD(zQPN,""),
544
- zDisabled
545
- );
546
- break;
547
- }
548
- case FF_MULTI: {
549
- int j;
550
- const char *zVal = P(zQPN);
551
- if( aSubmenuCtrl[i].zLabel ){
552
- cgi_printf("&nbsp;%h", aSubmenuCtrl[i].zLabel);
553
- }
554
- cgi_printf(
555
- "<select class='submenuctrl' size='1' name='%s'%s "
556
- "onchange='gebi(\"f01\").submit();'>\n",
557
- zQPN, zDisabled
558
- );
559
- for(j=0; j<aSubmenuCtrl[i].iSize*2; j+=2){
560
- const char *zQPV = aSubmenuCtrl[i].azChoice[j];
561
- cgi_printf(
562
- "<option value='%h'%s>%h</option>\n",
563
- zQPV,
564
- fossil_strcmp(zVal,zQPV)==0 ? " selected" : "",
565
- aSubmenuCtrl[i].azChoice[j+1]
566
- );
567
- }
568
- @ </select>
569
- break;
570
- }
571
- case FF_BINARY: {
572
- int isTrue = PB(zQPN);
573
- cgi_printf(
574
- "<select class='submenuctrl' size='1' name='%s'%s "
575
- "onchange='gebi(\"f01\").submit();'>\n",
576
- zQPN, zDisabled
577
- );
578
- cgi_printf(
579
- "<option value='1'%s>%h</option>\n",
580
- isTrue ? " selected":"", aSubmenuCtrl[i].zLabel
581
- );
582
- cgi_printf(
583
- "<option value='0'%s>%h</option>\n",
584
- (!isTrue) ? " selected":"", aSubmenuCtrl[i].zFalse
585
- );
586
- @ </select>
587
- break;
588
- }
589
- }
541
+ for(i=0; i<nSubmenuCtrl; i++){
542
+ const char *zQPN = aSubmenuCtrl[i].zName;
543
+ const char *zDisabled = " disabled";
544
+ if( !aSubmenuCtrl[i].isDisabled ){
545
+ zDisabled = "";
546
+ cgi_tag_query_parameter(zQPN);
547
+ }
548
+ switch( aSubmenuCtrl[i].eType ){
549
+ case FF_ENTRY: {
550
+ cgi_printf(
551
+ "<span class='submenuctrl'>"
552
+ "&nbsp;%h<input type='text' name='%s' size='%d' maxlength='%d'"
553
+ " value='%h'%s></span>\n",
554
+ aSubmenuCtrl[i].zLabel,
555
+ zQPN,
556
+ aSubmenuCtrl[i].iSize, aSubmenuCtrl[i].iSize,
557
+ PD(zQPN,""),
558
+ zDisabled
559
+ );
560
+ break;
561
+ }
562
+ case FF_MULTI: {
563
+ int j;
564
+ const char *zVal = P(zQPN);
565
+ if( aSubmenuCtrl[i].zLabel ){
566
+ cgi_printf("&nbsp;%h", aSubmenuCtrl[i].zLabel);
567
+ }
568
+ cgi_printf(
569
+ "<select class='submenuctrl' size='1' name='%s'%s "
570
+ "onchange='gebi(\"f01\").submit();'>\n",
571
+ zQPN, zDisabled
572
+ );
573
+ for(j=0; j<aSubmenuCtrl[i].iSize*2; j+=2){
574
+ const char *zQPV = aSubmenuCtrl[i].azChoice[j];
575
+ cgi_printf(
576
+ "<option value='%h'%s>%h</option>\n",
577
+ zQPV,
578
+ fossil_strcmp(zVal,zQPV)==0 ? " selected" : "",
579
+ aSubmenuCtrl[i].azChoice[j+1]
580
+ );
581
+ }
582
+ @ </select>
583
+ break;
584
+ }
585
+ case FF_BINARY: {
586
+ int isTrue = PB(zQPN);
587
+ cgi_printf(
588
+ "<select class='submenuctrl' size='1' name='%s'%s "
589
+ "onchange='gebi(\"f01\").submit();'>\n",
590
+ zQPN, zDisabled
591
+ );
592
+ cgi_printf(
593
+ "<option value='1'%s>%h</option>\n",
594
+ isTrue ? " selected":"", aSubmenuCtrl[i].zLabel
595
+ );
596
+ cgi_printf(
597
+ "<option value='0'%s>%h</option>\n",
598
+ (!isTrue) ? " selected":"", aSubmenuCtrl[i].zFalse
599
+ );
600
+ @ </select>
601
+ break;
602
+ }
603
+ case FF_CHECKBOX:
604
+ cgi_printf(
605
+ "<label class='submenuctrl'><input type='checkbox' "
606
+ "class='submenuctrl' name='%s' value='1'%s%s "
607
+ "onchange='gebi(\"f01\").submit();'>%s</label>\n",
608
+ zQPN, PB(zQPN) ? " checked" : "", zDisabled, aSubmenuCtrl[i].zLabel
609
+ );
610
+ break;
590611
}
591612
}
592613
@ </div>
593614
if( nSubmenuCtrl ){
594615
cgi_query_parameters_to_hidden();
595616
--- src/style.c
+++ src/style.c
@@ -30,11 +30,13 @@
30 ** Populate these structure with calls to
31 **
32 ** style_submenu_element()
33 ** style_submenu_entry()
34 ** style_submenu_checkbox()
 
35 ** style_submenu_multichoice()
 
36 **
37 ** prior to calling style_footer(). The style_footer() routine
38 ** will generate the appropriate HTML text just below the main
39 ** menu.
40 */
@@ -51,13 +53,14 @@
51 short int iSize; /* Width for FF_ENTRY. Count for FF_MULTI */
52 const char *const *azChoice;/* value/display pairs for FF_MULTI */
53 const char *zFalse; /* FF_BINARY label when false */
54 } aSubmenuCtrl[20];
55 static int nSubmenuCtrl = 0;
56 #define FF_ENTRY 1
57 #define FF_MULTI 2
58 #define FF_BINARY 3
 
59
60 /*
61 ** Remember that the header has been generated. The footer is omitted
62 ** if an error occurs before the header.
63 */
@@ -253,10 +256,22 @@
253 aSubmenuCtrl[nSubmenuCtrl].zLabel = zLabel;
254 aSubmenuCtrl[nSubmenuCtrl].iSize = iSize;
255 aSubmenuCtrl[nSubmenuCtrl].isDisabled = isDisabled;
256 aSubmenuCtrl[nSubmenuCtrl].eType = FF_ENTRY;
257 nSubmenuCtrl++;
 
 
 
 
 
 
 
 
 
 
 
 
258 }
259 void style_submenu_binary(
260 const char *zName, /* Query parameter name */
261 const char *zTrue, /* Label to show when parameter is true */
262 const char *zFalse, /* Label to show when the parameter is false */
@@ -521,74 +536,80 @@
521 }else{
522 @ <a class="label" href="%h(p->zLink)">%h(p->zLabel)</a>
523 }
524 }
525 }
526 if( nSubmenuCtrl>0 ){
527 for(i=0; i<nSubmenuCtrl; i++){
528 const char *zQPN = aSubmenuCtrl[i].zName;
529 const char *zDisabled = " disabled";
530 if( !aSubmenuCtrl[i].isDisabled ){
531 zDisabled = "";
532 cgi_tag_query_parameter(zQPN);
533 }
534 switch( aSubmenuCtrl[i].eType ){
535 case FF_ENTRY: {
536 cgi_printf(
537 "<span class='submenuctrl'>"
538 "&nbsp;%h<input type='text' name='%s' size='%d' maxlength='%d'"
539 " value='%h'%s></span>\n",
540 aSubmenuCtrl[i].zLabel,
541 zQPN,
542 aSubmenuCtrl[i].iSize, aSubmenuCtrl[i].iSize,
543 PD(zQPN,""),
544 zDisabled
545 );
546 break;
547 }
548 case FF_MULTI: {
549 int j;
550 const char *zVal = P(zQPN);
551 if( aSubmenuCtrl[i].zLabel ){
552 cgi_printf("&nbsp;%h", aSubmenuCtrl[i].zLabel);
553 }
554 cgi_printf(
555 "<select class='submenuctrl' size='1' name='%s'%s "
556 "onchange='gebi(\"f01\").submit();'>\n",
557 zQPN, zDisabled
558 );
559 for(j=0; j<aSubmenuCtrl[i].iSize*2; j+=2){
560 const char *zQPV = aSubmenuCtrl[i].azChoice[j];
561 cgi_printf(
562 "<option value='%h'%s>%h</option>\n",
563 zQPV,
564 fossil_strcmp(zVal,zQPV)==0 ? " selected" : "",
565 aSubmenuCtrl[i].azChoice[j+1]
566 );
567 }
568 @ </select>
569 break;
570 }
571 case FF_BINARY: {
572 int isTrue = PB(zQPN);
573 cgi_printf(
574 "<select class='submenuctrl' size='1' name='%s'%s "
575 "onchange='gebi(\"f01\").submit();'>\n",
576 zQPN, zDisabled
577 );
578 cgi_printf(
579 "<option value='1'%s>%h</option>\n",
580 isTrue ? " selected":"", aSubmenuCtrl[i].zLabel
581 );
582 cgi_printf(
583 "<option value='0'%s>%h</option>\n",
584 (!isTrue) ? " selected":"", aSubmenuCtrl[i].zFalse
585 );
586 @ </select>
587 break;
588 }
589 }
 
 
 
 
 
 
590 }
591 }
592 @ </div>
593 if( nSubmenuCtrl ){
594 cgi_query_parameters_to_hidden();
595
--- src/style.c
+++ src/style.c
@@ -30,11 +30,13 @@
30 ** Populate these structure with calls to
31 **
32 ** style_submenu_element()
33 ** style_submenu_entry()
34 ** style_submenu_checkbox()
35 ** style_submenu_binary()
36 ** style_submenu_multichoice()
37 ** style_submenu_sql()
38 **
39 ** prior to calling style_footer(). The style_footer() routine
40 ** will generate the appropriate HTML text just below the main
41 ** menu.
42 */
@@ -51,13 +53,14 @@
53 short int iSize; /* Width for FF_ENTRY. Count for FF_MULTI */
54 const char *const *azChoice;/* value/display pairs for FF_MULTI */
55 const char *zFalse; /* FF_BINARY label when false */
56 } aSubmenuCtrl[20];
57 static int nSubmenuCtrl = 0;
58 #define FF_ENTRY 1
59 #define FF_MULTI 2
60 #define FF_BINARY 3
61 #define FF_CHECKBOX 4
62
63 /*
64 ** Remember that the header has been generated. The footer is omitted
65 ** if an error occurs before the header.
66 */
@@ -253,10 +256,22 @@
256 aSubmenuCtrl[nSubmenuCtrl].zLabel = zLabel;
257 aSubmenuCtrl[nSubmenuCtrl].iSize = iSize;
258 aSubmenuCtrl[nSubmenuCtrl].isDisabled = isDisabled;
259 aSubmenuCtrl[nSubmenuCtrl].eType = FF_ENTRY;
260 nSubmenuCtrl++;
261 }
262 void style_submenu_checkbox(
263 const char *zName, /* Query parameter name */
264 const char *zLabel, /* Label to display after the checkbox */
265 int isDisabled /* True if disabled */
266 ){
267 assert( nSubmenuCtrl < count(aSubmenuCtrl) );
268 aSubmenuCtrl[nSubmenuCtrl].zName = zName;
269 aSubmenuCtrl[nSubmenuCtrl].zLabel = zLabel;
270 aSubmenuCtrl[nSubmenuCtrl].isDisabled = isDisabled;
271 aSubmenuCtrl[nSubmenuCtrl].eType = FF_CHECKBOX;
272 nSubmenuCtrl++;
273 }
274 void style_submenu_binary(
275 const char *zName, /* Query parameter name */
276 const char *zTrue, /* Label to show when parameter is true */
277 const char *zFalse, /* Label to show when the parameter is false */
@@ -521,74 +536,80 @@
536 }else{
537 @ <a class="label" href="%h(p->zLink)">%h(p->zLabel)</a>
538 }
539 }
540 }
541 for(i=0; i<nSubmenuCtrl; i++){
542 const char *zQPN = aSubmenuCtrl[i].zName;
543 const char *zDisabled = " disabled";
544 if( !aSubmenuCtrl[i].isDisabled ){
545 zDisabled = "";
546 cgi_tag_query_parameter(zQPN);
547 }
548 switch( aSubmenuCtrl[i].eType ){
549 case FF_ENTRY: {
550 cgi_printf(
551 "<span class='submenuctrl'>"
552 "&nbsp;%h<input type='text' name='%s' size='%d' maxlength='%d'"
553 " value='%h'%s></span>\n",
554 aSubmenuCtrl[i].zLabel,
555 zQPN,
556 aSubmenuCtrl[i].iSize, aSubmenuCtrl[i].iSize,
557 PD(zQPN,""),
558 zDisabled
559 );
560 break;
561 }
562 case FF_MULTI: {
563 int j;
564 const char *zVal = P(zQPN);
565 if( aSubmenuCtrl[i].zLabel ){
566 cgi_printf("&nbsp;%h", aSubmenuCtrl[i].zLabel);
567 }
568 cgi_printf(
569 "<select class='submenuctrl' size='1' name='%s'%s "
570 "onchange='gebi(\"f01\").submit();'>\n",
571 zQPN, zDisabled
572 );
573 for(j=0; j<aSubmenuCtrl[i].iSize*2; j+=2){
574 const char *zQPV = aSubmenuCtrl[i].azChoice[j];
575 cgi_printf(
576 "<option value='%h'%s>%h</option>\n",
577 zQPV,
578 fossil_strcmp(zVal,zQPV)==0 ? " selected" : "",
579 aSubmenuCtrl[i].azChoice[j+1]
580 );
581 }
582 @ </select>
583 break;
584 }
585 case FF_BINARY: {
586 int isTrue = PB(zQPN);
587 cgi_printf(
588 "<select class='submenuctrl' size='1' name='%s'%s "
589 "onchange='gebi(\"f01\").submit();'>\n",
590 zQPN, zDisabled
591 );
592 cgi_printf(
593 "<option value='1'%s>%h</option>\n",
594 isTrue ? " selected":"", aSubmenuCtrl[i].zLabel
595 );
596 cgi_printf(
597 "<option value='0'%s>%h</option>\n",
598 (!isTrue) ? " selected":"", aSubmenuCtrl[i].zFalse
599 );
600 @ </select>
601 break;
602 }
603 case FF_CHECKBOX:
604 cgi_printf(
605 "<label class='submenuctrl'><input type='checkbox' "
606 "class='submenuctrl' name='%s' value='1'%s%s "
607 "onchange='gebi(\"f01\").submit();'>%s</label>\n",
608 zQPN, PB(zQPN) ? " checked" : "", zDisabled, aSubmenuCtrl[i].zLabel
609 );
610 break;
611 }
612 }
613 @ </div>
614 if( nSubmenuCtrl ){
615 cgi_query_parameters_to_hidden();
616
+2 -6
--- src/timeline.c
+++ src/timeline.c
@@ -1550,13 +1550,11 @@
15501550
zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", f_rid);
15511551
blob_appendf(&desc, "%z[%S]</a>", href("%R/info/%!S", zUuid), zUuid);
15521552
tmFlags |= TIMELINE_DISJOINT;
15531553
style_submenu_binary("v","With Files","Without Files",
15541554
zType[0]!='a' && zType[0]!='c');
1555
- if( (tmFlags & TIMELINE_UNHIDE)==0 ){
1556
- timeline_submenu(&url, "Unhide", "unhide", "", 0);
1557
- }
1555
+ style_submenu_checkbox("unhide", "Unhide", 0);
15581556
}else{
15591557
/* Otherwise, a timeline based on a span of time */
15601558
int n;
15611559
const char *zEType = "timeline item";
15621560
char *zDate;
@@ -1821,13 +1819,11 @@
18211819
timeline_submenu(&url, "Newer", "a", zDate, "b");
18221820
}
18231821
free(zDate);
18241822
}
18251823
if( zType[0]=='a' || zType[0]=='c' ){
1826
- if( (tmFlags & TIMELINE_UNHIDE)==0 ){
1827
- timeline_submenu(&url, "Unhide", "unhide", "", 0);
1828
- }
1824
+ style_submenu_checkbox("unhide", "Unhide", 0);
18291825
}
18301826
style_submenu_entry("n","Max:",4,0);
18311827
timeline_y_submenu(disableY);
18321828
style_submenu_binary("v","With Files","Without Files",
18331829
zType[0]!='a' && zType[0]!='c');
18341830
--- src/timeline.c
+++ src/timeline.c
@@ -1550,13 +1550,11 @@
1550 zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", f_rid);
1551 blob_appendf(&desc, "%z[%S]</a>", href("%R/info/%!S", zUuid), zUuid);
1552 tmFlags |= TIMELINE_DISJOINT;
1553 style_submenu_binary("v","With Files","Without Files",
1554 zType[0]!='a' && zType[0]!='c');
1555 if( (tmFlags & TIMELINE_UNHIDE)==0 ){
1556 timeline_submenu(&url, "Unhide", "unhide", "", 0);
1557 }
1558 }else{
1559 /* Otherwise, a timeline based on a span of time */
1560 int n;
1561 const char *zEType = "timeline item";
1562 char *zDate;
@@ -1821,13 +1819,11 @@
1821 timeline_submenu(&url, "Newer", "a", zDate, "b");
1822 }
1823 free(zDate);
1824 }
1825 if( zType[0]=='a' || zType[0]=='c' ){
1826 if( (tmFlags & TIMELINE_UNHIDE)==0 ){
1827 timeline_submenu(&url, "Unhide", "unhide", "", 0);
1828 }
1829 }
1830 style_submenu_entry("n","Max:",4,0);
1831 timeline_y_submenu(disableY);
1832 style_submenu_binary("v","With Files","Without Files",
1833 zType[0]!='a' && zType[0]!='c');
1834
--- src/timeline.c
+++ src/timeline.c
@@ -1550,13 +1550,11 @@
1550 zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", f_rid);
1551 blob_appendf(&desc, "%z[%S]</a>", href("%R/info/%!S", zUuid), zUuid);
1552 tmFlags |= TIMELINE_DISJOINT;
1553 style_submenu_binary("v","With Files","Without Files",
1554 zType[0]!='a' && zType[0]!='c');
1555 style_submenu_checkbox("unhide", "Unhide", 0);
 
 
1556 }else{
1557 /* Otherwise, a timeline based on a span of time */
1558 int n;
1559 const char *zEType = "timeline item";
1560 char *zDate;
@@ -1821,13 +1819,11 @@
1819 timeline_submenu(&url, "Newer", "a", zDate, "b");
1820 }
1821 free(zDate);
1822 }
1823 if( zType[0]=='a' || zType[0]=='c' ){
1824 style_submenu_checkbox("unhide", "Unhide", 0);
 
 
1825 }
1826 style_submenu_entry("n","Max:",4,0);
1827 timeline_y_submenu(disableY);
1828 style_submenu_binary("v","With Files","Without Files",
1829 zType[0]!='a' && zType[0]!='c');
1830

Keyboard Shortcuts

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