Fossil SCM

Improved display of selected band in a text artifact.

drh 2011-02-18 21:47 trunk
Commit b9d46314214197b71a1487ac13d0eff1a2cf35e0
2 files changed +9 -5 +7
+9 -5
--- src/info.c
+++ src/info.c
@@ -1178,28 +1178,32 @@
11781178
}
11791179
@ <pre>
11801180
while( z[0] ){
11811181
n++;
11821182
for(i=0; z[i] && z[i]!='\n'; i++){}
1183
- if( n==iStart ) cgi_append_content("<b id=\"dln\">", -1);
1183
+ if( n==iStart-15 ) cgi_append_content("<span id=\"topln\">", -1);
1184
+ if( n==iStart ){
1185
+ cgi_append_content("<div class=\"selectedText\">",-1);
1186
+ }
11841187
cgi_printf("%06d ", n);
11851188
if( i>0 ){
11861189
char *zHtml = htmlize(z, i);
11871190
cgi_append_content(zHtml, -1);
11881191
fossil_free(zHtml);
11891192
}
1190
- if( n==iEnd ) cgi_append_content("</b>", -1);
1191
- cgi_append_content("\n", 1);
1193
+ if( n==iStart-15 ) cgi_append_content("</span>", -1);
1194
+ if( n==iEnd ) cgi_append_content("</div>", -1);
1195
+ else cgi_append_content("\n", 1);
11921196
z += i;
11931197
if( z[0]=='\n' ) z++;
11941198
}
1195
- if( n<iEnd ) cgi_printf("</b>");
1199
+ if( n<iEnd ) cgi_printf("</div>");
11961200
@ </pre>
11971201
if( iStart ){
11981202
@ <script type="text/JavaScript">
11991203
@ /* <![CDATA[ */
1200
- @ document.getElementById('dln').scrollIntoView(true);
1204
+ @ document.getElementById('topln').scrollIntoView(true);
12011205
@ /* ]]> */
12021206
@ </script>
12031207
}
12041208
}else{
12051209
@ <pre>
12061210
--- src/info.c
+++ src/info.c
@@ -1178,28 +1178,32 @@
1178 }
1179 @ <pre>
1180 while( z[0] ){
1181 n++;
1182 for(i=0; z[i] && z[i]!='\n'; i++){}
1183 if( n==iStart ) cgi_append_content("<b id=\"dln\">", -1);
 
 
 
1184 cgi_printf("%06d ", n);
1185 if( i>0 ){
1186 char *zHtml = htmlize(z, i);
1187 cgi_append_content(zHtml, -1);
1188 fossil_free(zHtml);
1189 }
1190 if( n==iEnd ) cgi_append_content("</b>", -1);
1191 cgi_append_content("\n", 1);
 
1192 z += i;
1193 if( z[0]=='\n' ) z++;
1194 }
1195 if( n<iEnd ) cgi_printf("</b>");
1196 @ </pre>
1197 if( iStart ){
1198 @ <script type="text/JavaScript">
1199 @ /* <![CDATA[ */
1200 @ document.getElementById('dln').scrollIntoView(true);
1201 @ /* ]]> */
1202 @ </script>
1203 }
1204 }else{
1205 @ <pre>
1206
--- src/info.c
+++ src/info.c
@@ -1178,28 +1178,32 @@
1178 }
1179 @ <pre>
1180 while( z[0] ){
1181 n++;
1182 for(i=0; z[i] && z[i]!='\n'; i++){}
1183 if( n==iStart-15 ) cgi_append_content("<span id=\"topln\">", -1);
1184 if( n==iStart ){
1185 cgi_append_content("<div class=\"selectedText\">",-1);
1186 }
1187 cgi_printf("%06d ", n);
1188 if( i>0 ){
1189 char *zHtml = htmlize(z, i);
1190 cgi_append_content(zHtml, -1);
1191 fossil_free(zHtml);
1192 }
1193 if( n==iStart-15 ) cgi_append_content("</span>", -1);
1194 if( n==iEnd ) cgi_append_content("</div>", -1);
1195 else cgi_append_content("\n", 1);
1196 z += i;
1197 if( z[0]=='\n' ) z++;
1198 }
1199 if( n<iEnd ) cgi_printf("</div>");
1200 @ </pre>
1201 if( iStart ){
1202 @ <script type="text/JavaScript">
1203 @ /* <![CDATA[ */
1204 @ document.getElementById('topln').scrollIntoView(true);
1205 @ /* ]]> */
1206 @ </script>
1207 }
1208 }else{
1209 @ <pre>
1210
--- src/style.c
+++ src/style.c
@@ -639,10 +639,17 @@
639639
},
640640
{ "span.usertype:after",
641641
"trailing text for user types, mentioned on the user edit page",
642642
@ content:"'";
643643
},
644
+ { "div.selectedText",
645
+ "selected lines of text within a linenumbered artifact display",
646
+ @ font-weight: bold;
647
+ @ color: blue;
648
+ @ background-color: #d5d5ff;
649
+ @ border: 1px blue solid;
650
+ },
644651
{ "p.missingPriv",
645652
"format for missing priviliges note on user setup page",
646653
@ color: blue;
647654
},
648655
{ "span.wikiruleHead",
649656
--- src/style.c
+++ src/style.c
@@ -639,10 +639,17 @@
639 },
640 { "span.usertype:after",
641 "trailing text for user types, mentioned on the user edit page",
642 @ content:"'";
643 },
 
 
 
 
 
 
 
644 { "p.missingPriv",
645 "format for missing priviliges note on user setup page",
646 @ color: blue;
647 },
648 { "span.wikiruleHead",
649
--- src/style.c
+++ src/style.c
@@ -639,10 +639,17 @@
639 },
640 { "span.usertype:after",
641 "trailing text for user types, mentioned on the user edit page",
642 @ content:"'";
643 },
644 { "div.selectedText",
645 "selected lines of text within a linenumbered artifact display",
646 @ font-weight: bold;
647 @ color: blue;
648 @ background-color: #d5d5ff;
649 @ border: 1px blue solid;
650 },
651 { "p.missingPriv",
652 "format for missing priviliges note on user setup page",
653 @ color: blue;
654 },
655 { "span.wikiruleHead",
656

Keyboard Shortcuts

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