Fossil

Check-in [b9d46314]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Improved display of selected band in a text artifact.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:b9d46314214197b71a1487ac13d0eff1a2cf35e0
User & Date: drh 2011-02-18 21:47:58
Context
2011-02-18
22:25
Fix a panic message in the historical_version_of_file() routine. check-in: 3b82ee54 user: drh tags: trunk
21:47
Improved display of selected band in a text artifact. check-in: b9d46314 user: drh tags: trunk
19:31
Enhance the /artifact method so that the ln=M,N argument shows linenumbers and highlights lines between M and N. check-in: 6e0dd3ba user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/info.c.

1176
1177
1178
1179
1180
1181
1182

1183


1184
1185
1186
1187
1188
1189

1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
          if( zLn[i] ) iEnd = atoi(&zLn[i+1]);
          if( iEnd<iStart ) iEnd = iStart;
        }
        @ <pre>
        while( z[0] ){
          n++;
          for(i=0; z[i] && z[i]!='\n'; i++){}

          if( n==iStart ) cgi_append_content("<b id=\"dln\">", -1);


          cgi_printf("%06d  ", n);
          if( i>0 ){
            char *zHtml = htmlize(z, i);
            cgi_append_content(zHtml, -1);
            fossil_free(zHtml);
          }

          if( n==iEnd ) cgi_append_content("</b>", -1);
          cgi_append_content("\n", 1);
          z += i;
          if( z[0]=='\n' ) z++;
        }
        if( n<iEnd ) cgi_printf("</b>");
        @ </pre>
        if( iStart ){
          @ <script type="text/JavaScript">
          @ /* <![CDATA[ */
          @ document.getElementById('dln').scrollIntoView(true);
          @ /* ]]> */
          @ </script>
        }
      }else{
        @ <pre>
        @ %h(z);
        @ </pre>







>
|
>
>






>
|
|



|




|







1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
          if( zLn[i] ) iEnd = atoi(&zLn[i+1]);
          if( iEnd<iStart ) iEnd = iStart;
        }
        @ <pre>
        while( z[0] ){
          n++;
          for(i=0; z[i] && z[i]!='\n'; i++){}
          if( n==iStart-15 ) cgi_append_content("<span id=\"topln\">", -1);
          if( n==iStart ){
            cgi_append_content("<div class=\"selectedText\">",-1);
          }
          cgi_printf("%06d  ", n);
          if( i>0 ){
            char *zHtml = htmlize(z, i);
            cgi_append_content(zHtml, -1);
            fossil_free(zHtml);
          }
          if( n==iStart-15 ) cgi_append_content("</span>", -1);
          if( n==iEnd ) cgi_append_content("</div>", -1);
          else cgi_append_content("\n", 1);
          z += i;
          if( z[0]=='\n' ) z++;
        }
        if( n<iEnd ) cgi_printf("</div>");
        @ </pre>
        if( iStart ){
          @ <script type="text/JavaScript">
          @ /* <![CDATA[ */
          @ document.getElementById('topln').scrollIntoView(true);
          @ /* ]]> */
          @ </script>
        }
      }else{
        @ <pre>
        @ %h(z);
        @ </pre>

Changes to src/style.c.

637
638
639
640
641
642
643







644
645
646
647
648
649
650
    "leading text for user types, mentioned on the user edit page",
    @   content:"'";
  },
  { "span.usertype:after",
    "trailing text for user types, mentioned on the user edit page",
    @   content:"'";
  },







  { "p.missingPriv",
    "format for missing priviliges note on user setup page",
    @  color: blue;
  },
  { "span.wikiruleHead",
    "format for leading text in wikirules definitions",
    @   font-weight: bold;







>
>
>
>
>
>
>







637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
    "leading text for user types, mentioned on the user edit page",
    @   content:"'";
  },
  { "span.usertype:after",
    "trailing text for user types, mentioned on the user edit page",
    @   content:"'";
  },
  { "div.selectedText",
    "selected lines of text within a linenumbered artifact display",
    @   font-weight: bold;
    @   color: blue;
    @   background-color: #d5d5ff;
    @   border: 1px blue solid;
  },
  { "p.missingPriv",
    "format for missing priviliges note on user setup page",
    @  color: blue;
  },
  { "span.wikiruleHead",
    "format for leading text in wikirules definitions",
    @   font-weight: bold;