Fossil SCM
Added checkbox to reset mainmenu to its default value, per discussion at [forum:/forumpost/5ab3ce6c45 | forumpost/5ab3ce6c45].
Commit
8af3d425d2862b72a2aaaf3184117f1f047ca38552ae3fee4e5c61138aeacad9
Parent
f8c42abadcbe1bd…
1 file changed
+8
-1
+8
-1
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -1041,13 +1041,20 @@ | ||
| 1041 | 1041 | @ <p>Some custom skins might not use this property. Whether the property |
| 1042 | 1042 | @ is used or a choice made by the skin designer. Some skins add an extra |
| 1043 | 1043 | @ choices (such as the hamburger button) to the menu that are not shown |
| 1044 | 1044 | @ on this list. (Property: mainmenu) |
| 1045 | 1045 | @ <p> |
| 1046 | + if(P("resetMenu")!=0){ | |
| 1047 | + db_unset("mainmenu", 0); | |
| 1048 | + cgi_delete_parameter("mmenu"); | |
| 1049 | + } | |
| 1046 | 1050 | textarea_attribute("Main Menu", 12, 80, |
| 1047 | 1051 | "mainmenu", "mmenu", style_default_mainmenu(), 0); |
| 1048 | - @ | |
| 1052 | + @ </p> | |
| 1053 | + @ <p><input type='checkbox' id='cbResetMenu' name='resetMenu' value='1'> | |
| 1054 | + @ <label for='cbResetMenu'>Reset menu to default value</label> | |
| 1055 | + @ </p> | |
| 1049 | 1056 | @ <hr> |
| 1050 | 1057 | @ <p>Extra links to appear on the <a href="%R/sitemap">/sitemap</a> page, |
| 1051 | 1058 | @ as sub-items of the "Home Page" entry, appearing before the |
| 1052 | 1059 | @ "Documentation Search" entry (if any). In skins that use the /sitemap |
| 1053 | 1060 | @ page to construct a hamburger menu dropdown, new entries added here |
| 1054 | 1061 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -1041,13 +1041,20 @@ | |
| 1041 | @ <p>Some custom skins might not use this property. Whether the property |
| 1042 | @ is used or a choice made by the skin designer. Some skins add an extra |
| 1043 | @ choices (such as the hamburger button) to the menu that are not shown |
| 1044 | @ on this list. (Property: mainmenu) |
| 1045 | @ <p> |
| 1046 | textarea_attribute("Main Menu", 12, 80, |
| 1047 | "mainmenu", "mmenu", style_default_mainmenu(), 0); |
| 1048 | @ |
| 1049 | @ <hr> |
| 1050 | @ <p>Extra links to appear on the <a href="%R/sitemap">/sitemap</a> page, |
| 1051 | @ as sub-items of the "Home Page" entry, appearing before the |
| 1052 | @ "Documentation Search" entry (if any). In skins that use the /sitemap |
| 1053 | @ page to construct a hamburger menu dropdown, new entries added here |
| 1054 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -1041,13 +1041,20 @@ | |
| 1041 | @ <p>Some custom skins might not use this property. Whether the property |
| 1042 | @ is used or a choice made by the skin designer. Some skins add an extra |
| 1043 | @ choices (such as the hamburger button) to the menu that are not shown |
| 1044 | @ on this list. (Property: mainmenu) |
| 1045 | @ <p> |
| 1046 | if(P("resetMenu")!=0){ |
| 1047 | db_unset("mainmenu", 0); |
| 1048 | cgi_delete_parameter("mmenu"); |
| 1049 | } |
| 1050 | textarea_attribute("Main Menu", 12, 80, |
| 1051 | "mainmenu", "mmenu", style_default_mainmenu(), 0); |
| 1052 | @ </p> |
| 1053 | @ <p><input type='checkbox' id='cbResetMenu' name='resetMenu' value='1'> |
| 1054 | @ <label for='cbResetMenu'>Reset menu to default value</label> |
| 1055 | @ </p> |
| 1056 | @ <hr> |
| 1057 | @ <p>Extra links to appear on the <a href="%R/sitemap">/sitemap</a> page, |
| 1058 | @ as sub-items of the "Home Page" entry, appearing before the |
| 1059 | @ "Documentation Search" entry (if any). In skins that use the /sitemap |
| 1060 | @ page to construct a hamburger menu dropdown, new entries added here |
| 1061 |