Fossil SCM

Make the "Line Numbers" submenu element on the /artifact and /file pages a check-box.

drh 2016-11-29 16:57 trunk
Commit 4946efef65c2e808686d8c9a80544ba266f3b3c4
2 files changed +2 -6 +2 -2
+2 -6
--- src/info.c
+++ src/info.c
@@ -1981,16 +1981,12 @@
19811981
style_submenu_element("Parsed", "%R/info/%s", zUuid);
19821982
}
19831983
if( descOnly ){
19841984
style_submenu_element("Content", "%R/artifact/%s", zUuid);
19851985
}else{
1986
- if( zLn==0 ){
1987
- style_submenu_element("Line Numbers", "%s",
1988
- url_render(&url, "ln", "", 0, 0));
1989
- }else{
1990
- style_submenu_element("Line Numbers", "%s",
1991
- url_render(&url, "ln", 0, 0, 0));
1986
+ if( zLn==0 || atoi(zLn)==0 ){
1987
+ style_submenu_checkbox("ln", "Line Numbers", 0);
19921988
}
19931989
@ <hr />
19941990
content_get(rid, &content);
19951991
if( renderAsWiki ){
19961992
wiki_render_by_mimetype(&content, zMime);
19971993
--- src/info.c
+++ src/info.c
@@ -1981,16 +1981,12 @@
1981 style_submenu_element("Parsed", "%R/info/%s", zUuid);
1982 }
1983 if( descOnly ){
1984 style_submenu_element("Content", "%R/artifact/%s", zUuid);
1985 }else{
1986 if( zLn==0 ){
1987 style_submenu_element("Line Numbers", "%s",
1988 url_render(&url, "ln", "", 0, 0));
1989 }else{
1990 style_submenu_element("Line Numbers", "%s",
1991 url_render(&url, "ln", 0, 0, 0));
1992 }
1993 @ <hr />
1994 content_get(rid, &content);
1995 if( renderAsWiki ){
1996 wiki_render_by_mimetype(&content, zMime);
1997
--- src/info.c
+++ src/info.c
@@ -1981,16 +1981,12 @@
1981 style_submenu_element("Parsed", "%R/info/%s", zUuid);
1982 }
1983 if( descOnly ){
1984 style_submenu_element("Content", "%R/artifact/%s", zUuid);
1985 }else{
1986 if( zLn==0 || atoi(zLn)==0 ){
1987 style_submenu_checkbox("ln", "Line Numbers", 0);
 
 
 
 
1988 }
1989 @ <hr />
1990 content_get(rid, &content);
1991 if( renderAsWiki ){
1992 wiki_render_by_mimetype(&content, zMime);
1993
+2 -2
--- src/style.c
+++ src/style.c
@@ -593,12 +593,12 @@
593593
@ >%h(aSubmenuCtrl[i].zFalse)</option>
594594
@ </select>
595595
break;
596596
}
597597
case FF_CHECKBOX:
598
- @ <label class='submenuctrl'>\
599
- @ <input type='checkbox' name='%s(zQPN)' value='1' \
598
+ @ <label class='submenuctrl submenuckbox'>\
599
+ @ <input type='checkbox' name='%s(zQPN)' \
600600
if( PB(zQPN) ){
601601
@ checked \
602602
}
603603
@ onchange='gebi("f01").submit();'%s(zDisabled)>\
604604
@ %h(aSubmenuCtrl[i].zLabel)</label>
605605
--- src/style.c
+++ src/style.c
@@ -593,12 +593,12 @@
593 @ >%h(aSubmenuCtrl[i].zFalse)</option>
594 @ </select>
595 break;
596 }
597 case FF_CHECKBOX:
598 @ <label class='submenuctrl'>\
599 @ <input type='checkbox' name='%s(zQPN)' value='1' \
600 if( PB(zQPN) ){
601 @ checked \
602 }
603 @ onchange='gebi("f01").submit();'%s(zDisabled)>\
604 @ %h(aSubmenuCtrl[i].zLabel)</label>
605
--- src/style.c
+++ src/style.c
@@ -593,12 +593,12 @@
593 @ >%h(aSubmenuCtrl[i].zFalse)</option>
594 @ </select>
595 break;
596 }
597 case FF_CHECKBOX:
598 @ <label class='submenuctrl submenuckbox'>\
599 @ <input type='checkbox' name='%s(zQPN)' \
600 if( PB(zQPN) ){
601 @ checked \
602 }
603 @ onchange='gebi("f01").submit();'%s(zDisabled)>\
604 @ %h(aSubmenuCtrl[i].zLabel)</label>
605

Keyboard Shortcuts

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