Fossil SCM
Improved display of selected band in a text artifact.
Commit
b9d46314214197b71a1487ac13d0eff1a2cf35e0
Parent
6e0dd3bab7c3cd6…
2 files changed
+9
-5
+7
+9
-5
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -1178,28 +1178,32 @@ | ||
| 1178 | 1178 | } |
| 1179 | 1179 | @ <pre> |
| 1180 | 1180 | while( z[0] ){ |
| 1181 | 1181 | n++; |
| 1182 | 1182 | 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 | + } | |
| 1184 | 1187 | cgi_printf("%06d ", n); |
| 1185 | 1188 | if( i>0 ){ |
| 1186 | 1189 | char *zHtml = htmlize(z, i); |
| 1187 | 1190 | cgi_append_content(zHtml, -1); |
| 1188 | 1191 | fossil_free(zHtml); |
| 1189 | 1192 | } |
| 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); | |
| 1192 | 1196 | z += i; |
| 1193 | 1197 | if( z[0]=='\n' ) z++; |
| 1194 | 1198 | } |
| 1195 | - if( n<iEnd ) cgi_printf("</b>"); | |
| 1199 | + if( n<iEnd ) cgi_printf("</div>"); | |
| 1196 | 1200 | @ </pre> |
| 1197 | 1201 | if( iStart ){ |
| 1198 | 1202 | @ <script type="text/JavaScript"> |
| 1199 | 1203 | @ /* <![CDATA[ */ |
| 1200 | - @ document.getElementById('dln').scrollIntoView(true); | |
| 1204 | + @ document.getElementById('topln').scrollIntoView(true); | |
| 1201 | 1205 | @ /* ]]> */ |
| 1202 | 1206 | @ </script> |
| 1203 | 1207 | } |
| 1204 | 1208 | }else{ |
| 1205 | 1209 | @ <pre> |
| 1206 | 1210 |
| --- 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 |
+7
| --- src/style.c | ||
| +++ src/style.c | ||
| @@ -639,10 +639,17 @@ | ||
| 639 | 639 | }, |
| 640 | 640 | { "span.usertype:after", |
| 641 | 641 | "trailing text for user types, mentioned on the user edit page", |
| 642 | 642 | @ content:"'"; |
| 643 | 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 | + }, | |
| 644 | 651 | { "p.missingPriv", |
| 645 | 652 | "format for missing priviliges note on user setup page", |
| 646 | 653 | @ color: blue; |
| 647 | 654 | }, |
| 648 | 655 | { "span.wikiruleHead", |
| 649 | 656 |
| --- 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 |