Fossil

Check-in [0095e24ba9]
Login

Check-in [0095e24ba9]

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

Overview
Comment:Added style info to db_generic_query_view(), so it can be styled via css
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0095e24ba94fde3c22f77b0b5ae6ad7dc05e75f1
User & Date: stephan 2008-02-04 23:14:15.000
Context
2008-02-05
00:01
Added /admin/sql page. Added a 'const' to db_generic_query_view() ... (check-in: 6f05b4292a user: stephan tags: trunk)
2008-02-04
23:14
Added style info to db_generic_query_view(), so it can be styled via css ... (check-in: 0095e24ba9 user: stephan tags: trunk)
19:08
Hyperlinks to directory browser pages on the pathname in the title of the file history viewer, finfo. ... (check-in: a20dcb5c26 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/db.c.
1171
1172
1173
1174
1175
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
  */
  if( SQLITE_OK != rc )
  {
    @ db_generic_query_view(): Error processing SQL: [%s(sql)]
    return;
  }
  int colc = db_column_count(&st);
  @ <table cellpadding='4px' border='1'><tbody>
  @ <tr>
  for( i = 0; i < colc; ++i ) {
    if( coln )
    {
      @ <th>%s(coln[i] ? coln[i] : db_column_name(&st,i))</th>
    }
    else
    {
      @ <td>%s(db_column_name(&st,i))</td>
    }
  }
  @ </tr>


  while( SQLITE_ROW == db_step(&st) ){
    @ <tr>
      for( i = 0; i < colc; ++i ) {
        char * xf = 0;
        char const * xcf = 0;
        xcf = (xform && xform[i])
          ? (xf=(xform[i])(db_column_text(&st,i)))
          : db_column_text(&st,i);
        @ <td>%s(xcf)</td>







|
|












>

|







1171
1172
1173
1174
1175
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
  */
  if( SQLITE_OK != rc )
  {
    @ db_generic_query_view(): Error processing SQL: [%s(sql)]
    return;
  }
  int colc = db_column_count(&st);
  @ <table class='fossil_db_generic_query_view'><tbody>
  @ <tr class='header'>
  for( i = 0; i < colc; ++i ) {
    if( coln )
    {
      @ <th>%s(coln[i] ? coln[i] : db_column_name(&st,i))</th>
    }
    else
    {
      @ <td>%s(db_column_name(&st,i))</td>
    }
  }
  @ </tr>

  int row = 0;
  while( SQLITE_ROW == db_step(&st) ){
    @ <tr class='%s( (row++%2) ? "odd" : "even")'>
      for( i = 0; i < colc; ++i ) {
        char * xf = 0;
        char const * xcf = 0;
        xcf = (xform && xform[i])
          ? (xf=(xform[i])(db_column_text(&st,i)))
          : db_column_text(&st,i);
        @ <td>%s(xcf)</td>
Changes to src/style.c.
336
337
338
339
340
341
342





















343
344
345
346
347
348
349
@    implemented" parts of a page. Whether or not to have
@    a 'border' attribute set is arguable. */
@ .achtung {
@   color: #ff0000;
@   background: #ffff00;
@   border: 1px solid #ff0000;
@ }





















;

/*
** WEBPAGE: style.css
*/
void page_style_css(void){
  char *zCSS = 0;







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
@    implemented" parts of a page. Whether or not to have
@    a 'border' attribute set is arguable. */
@ .achtung {
@   color: #ff0000;
@   background: #ffff00;
@   border: 1px solid #ff0000;
@ }
@
@ table.fossil_db_generic_query_view {
@   border-spacing: 0px;
@   border: 0px;
@ }
@ table.fossil_db_generic_query_view td {
@   padding: 2px 1em 2px 1em;
@ }
@ table.fossil_db_generic_query_view tr {
@ }
@ table.fossil_db_generic_query_view tr.even {
@   background: #ffffff;
@ }
@ table.fossil_db_generic_query_view tr.odd {
@   background: #e5e5e5;
@ }
@ table.fossil_db_generic_query_view tr.header {
@   background: #558195;
@   font-size: 1.5em;
@   color: #ffffff;
@ }
;

/*
** WEBPAGE: style.css
*/
void page_style_css(void){
  char *zCSS = 0;