Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | some ticket pages html validated |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | wolfgangFormat2CSS |
| Files: | files | file ages | folders |
| SHA1: |
b9f38e16d06b505ba7974c12039b72c9 |
| User & Date: | wolfgang 2010-09-12 17:12:44.000 |
Context
|
2010-09-12
| ||
| 18:43 | detail ticket views validated ... (check-in: 2557ca45dd user: wolfgang tags: wolfgangFormat2CSS) | |
| 17:12 | some ticket pages html validated ... (check-in: b9f38e16d0 user: wolfgang tags: wolfgangFormat2CSS) | |
| 15:39 | merged win dmc make build changes from [08aa440a3d],.. ... (check-in: 642f4dcfa2 user: wolfgang tags: wolfgangFormat2CSS) | |
Changes
Changes to src/report.c.
| ︙ | ︙ | |||
905 906 907 908 909 910 911 |
count = 0;
if( !tabs ){
struct GenerateHTML sState;
db_multi_exec("PRAGMA empty_result_callbacks=ON");
style_submenu_element("Raw", "Raw",
| | | 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 |
count = 0;
if( !tabs ){
struct GenerateHTML sState;
db_multi_exec("PRAGMA empty_result_callbacks=ON");
style_submenu_element("Raw", "Raw",
"rptview?tablist=1&%s", PD("QUERY_STRING",""));
if( g.okAdmin
|| (g.okTktFmt && g.zLogin && zOwner && strcmp(g.zLogin,zOwner)==0) ){
style_submenu_element("Edit", "Edit", "rptedit?rn=%d", rn);
}
if( g.okTktFmt ){
style_submenu_element("SQL", "SQL", "rptsql?rn=%d",rn);
}
|
| ︙ | ︙ |
Changes to src/style.c.
| ︙ | ︙ | |||
620 621 622 623 624 625 626 627 628 629 630 631 632 633 |
"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:"'";
},
{ 0,
0,
0
}
};
void cgi_append_default_css(void) {
| > > > > > > > > > > > > > > > > > > > | 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 |
"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:"'";
},
{ "span.wikiruleHead",
"format for leading text in wikirules definitions",
@ font-weight: bold;
},
{ "td.tktDspLabel",
"format for labels on ticket display page",
@ text-align: right;
},
{ "td.tktDspValue",
"format for values on ticket display page",
@ text-align: left;
@ vertical-align: top;
@ background-color: #d0d0d0;
},
{ "span.tktError",
"format for ticket error messages",
@ color: red;
@ font-weight: bold;
},
{ 0,
0,
0
}
};
void cgi_append_default_css(void) {
|
| ︙ | ︙ |
Changes to src/th_main.c.
| ︙ | ︙ | |||
276 277 278 279 280 281 282 |
sendText(z, -1, 0);
free(z);
blob_reset(&name);
for(i=0; i<nElem; i++){
zH = htmlize((char*)azElem[i], aszElem[i]);
if( zValue && aszElem[i]==nValue
&& memcmp(zValue, azElem[i], nValue)==0 ){
| | | 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 |
sendText(z, -1, 0);
free(z);
blob_reset(&name);
for(i=0; i<nElem; i++){
zH = htmlize((char*)azElem[i], aszElem[i]);
if( zValue && aszElem[i]==nValue
&& memcmp(zValue, azElem[i], nValue)==0 ){
z = mprintf("<option value=\"%s\" selected=\"selected\">%s</option>", zH, zH);
}else{
z = mprintf("<option value=\"%s\">%s</option>", zH, zH);
}
free(zH);
sendText(z, -1, 0);
free(z);
}
|
| ︙ | ︙ |
Changes to src/tkt.c.
| ︙ | ︙ | |||
509 510 511 512 513 514 515 |
}
style_header("New Ticket");
if( g.thTrace ) Th_Trace("BEGIN_TKTNEW<br />\n", -1);
ticket_init();
getAllTicketFields();
initializeVariablesFromDb();
initializeVariablesFromCGI();
| | > | 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 |
}
style_header("New Ticket");
if( g.thTrace ) Th_Trace("BEGIN_TKTNEW<br />\n", -1);
ticket_init();
getAllTicketFields();
initializeVariablesFromDb();
initializeVariablesFromCGI();
@ <form method="post" action="%s(g.zBaseURL)/%s(g.zPath)"><p>
login_insert_csrf_secret();
@ </p>
zScript = ticket_newpage_code();
Th_Store("login", g.zLogin);
Th_Store("date", db_text(0, "SELECT datetime('now')"));
Th_CreateCommand(g.interp, "submit_ticket", submitTicketCmd,
(void*)&zNewUuid, 0);
if( g.thTrace ) Th_Trace("BEGIN_TKTNEW_SCRIPT<br />\n", -1);
if( Th_Render(zScript)==TH_RETURN && !g.thTrace && zNewUuid ){
|
| ︙ | ︙ | |||
552 553 554 555 556 557 558 |
zName = P("name");
if( P("cancel") ){
cgi_redirectf("tktview?name=%T", zName);
}
style_header("Edit Ticket");
if( zName==0 || (nName = strlen(zName))<4 || nName>UUID_SIZE
|| !validate16(zName,nName) ){
| | | | | | > | 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 |
zName = P("name");
if( P("cancel") ){
cgi_redirectf("tktview?name=%T", zName);
}
style_header("Edit Ticket");
if( zName==0 || (nName = strlen(zName))<4 || nName>UUID_SIZE
|| !validate16(zName,nName) ){
@ <span class="tktError">Not a valid ticket id: \"%h(zName)\"</span>
style_footer();
return;
}
nRec = db_int(0, "SELECT count(*) FROM ticket WHERE tkt_uuid GLOB '%q*'",
zName);
if( nRec==0 ){
@ <span class="tktError">No such ticket: \"%h(zName)\"</span>
style_footer();
return;
}
if( nRec>1 ){
@ <span class="tktError"><b>%d(nRec) tickets begin with: \"%h(zName)\"</span>
style_footer();
return;
}
if( g.thTrace ) Th_Trace("BEGIN_TKTEDIT<br />\n", -1);
ticket_init();
getAllTicketFields();
initializeVariablesFromCGI();
initializeVariablesFromDb();
@ <form method="post" action="%s(g.zBaseURL)/%s(g.zPath)"><p>
@ <input type="hidden" name="name" value="%s(zName)" />
login_insert_csrf_secret();
@ </p>
zScript = ticket_editpage_code();
Th_Store("login", g.zLogin);
Th_Store("date", db_text(0, "SELECT datetime('now')"));
Th_CreateCommand(g.interp, "append_field", appendRemarkCmd, 0, 0);
Th_CreateCommand(g.interp, "submit_ticket", submitTicketCmd, (void*)&zName,0);
if( g.thTrace ) Th_Trace("BEGIN_TKTEDIT_SCRIPT<br />\n", -1);
if( Th_Render(zScript)==TH_RETURN && !g.thTrace && zName ){
|
| ︙ | ︙ |
Changes to src/tktsetup.c.
| ︙ | ︙ | |||
248 249 250 251 252 253 254 |
static const char zDefaultNew[] =
@ <th1>
@ if {[info exists submit]} {
@ set status Open
@ submit_ticket
@ }
@ </th1>
| | | | | | | | | | | | | | | | 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 |
static const char zDefaultNew[] =
@ <th1>
@ if {[info exists submit]} {
@ set status Open
@ submit_ticket
@ }
@ </th1>
@ <h1 style="text-align: center;">Enter A New Ticket</h1>
@ <table cellpadding="5">
@ <tr>
@ <td colspan="2">
@ Enter a one-line summary of the ticket:<br />
@ <input type="text" name="title" size="60" value="$<title>" />
@ </td>
@ </tr>
@
@ <tr>
@ <td style="text-align: center;">Type:
@ <th1>combobox type $type_choices 1</th1>
@ </td>
@ <td>What type of ticket is this?</td>
@ </tr>
@
@ <tr>
@ <td style="text-align: center;">Version:
@ <input type="text" name="foundin" size="20" value="$<foundin>" />
@ </td>
@ <td>In what version or build number do you observe the problem?</td>
@ </tr>
@
@ <tr>
@ <td style="text-align: center;">Severity:
@ <th1>combobox severity $severity_choices 1</th1>
@ </td>
@ <td>How debilitating is the problem? How badly does the problem
@ affect the operation of the product?</td>
@ </tr>
@
@ <tr>
@ <td style="text-align: center;">EMail:
@ <input type="text" name="private_contact" value="$<private_contact>" size="30" />
@ </td>
@ <td><span style="text-decoration: underline;">Not publicly visible</span>. Used by developers to contact you with
@ questions.</td>
@ </tr>
@
@ <tr>
@ <td colspan="2">
@ Enter a detailed description of the problem.
@ For code defects, be sure to provide details on exactly how
@ the problem can be reproduced. Provide as much detail as
@ possible.
@ <br />
@ <th1>set nline [linecount $comment 50 10]</th1>
@ <textarea name="comment" cols="80" rows="$nline"
@ wrap="virtual" class="wikiedit">$<comment></textarea><br />
@ <input type="submit" name="preview" value="Preview" /></td>
@ </tr>
@
@ <th1>enable_output [info exists preview]</th1>
@ <tr><td colspan="2">
@ Description Preview:<br /><hr />
@ <th1>wiki $comment</th1>
@ <hr />
@ </td></tr>
@ <th1>enable_output 1</th1>
@
@ <tr>
@ <td style="text-align: center;">
@ <input type="submit" name="submit" value="Submit" />
@ </td>
@ <td>After filling in the information above, press this button to create
@ the new ticket</td>
@ </tr>
@ <tr>
@ <td style="text-align: center;">
@ <input type="submit" name="cancel" value="Cancel" />
@ </td>
@ <td>Abandon and forget this ticket</td>
@ </tr>
@ </table>
;
/*
|
| ︙ | ︙ | |||
351 352 353 354 355 356 357 |
0,
40
);
}
static const char zDefaultView[] =
@ <table cellpadding="5">
| | | | | | | | | | | | | | | | | 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 |
0,
40
);
}
static const char zDefaultView[] =
@ <table cellpadding="5">
@ <tr><td class="tktDspLabel">Ticket UUID:</td><td class="tktDspValue" colspan="3">
@ $<tkt_uuid>
@ </td></tr>
@ <tr><td class="tktDspLabel">Title:</td>
@ <td class="tktDspValue" colspan="3">
@ <th1>wiki $title</th1>
@ </td></tr>
@ <tr><td class="tktDspLabel">Status:</td><td class="tktDspValue">
@ $<status>
@ </td>
@ <td class="tktDspLabel">Type:</td><td class="tktDspValue">
@ $<type>
@ </td></tr>
@ <tr><td class="tktDspLabel">Severity:</td><td class="tktDspValue">
@ $<severity>
@ </td>
@ <td class="tktDspLabel">Priority:</td><td class="tktDspValue">
@ $<priority>
@ </td></tr>
@ <tr><td class="tktDspLabel">Subsystem:</td><td class="tktDspValue">
@ $<subsystem>
@ </td>
@ <td class="tktDspLabel">Resolution:</td><td class="tktDspValue">
@ $<resolution>
@ </td></tr>
@ <tr><td class="tktDspLabel">Last Modified:</td><td class="tktDspValue">
@ $<tkt_datetime>
@ </td>
@ <th1>enable_output [hascap e]</th1>
@ <td class="tktDspLabel">Contact:</td><td class="tktDspValue">
@ $<private_contact>
@ </td>
@ <th1>enable_output 1</th1>
@ </tr>
@ <tr><td class="tktDspLabel">Version Found In:</td>
@ <td colspan="3" valign="top" class="tktDspValue">
@ $<foundin>
@ </td></tr>
@ <tr><td>Description & Comments:</td></tr>
@ <tr><td colspan="4" class="tktDspValue">
@ <th1>wiki $comment</th1>
@ </td></tr>
@ </table>
;
/*
** Return the code used to generate the view ticket page
|
| ︙ | ︙ | |||
440 441 442 443 444 445 446 | @ append_field comment $ctxt @ } @ } @ submit_ticket @ } @ </th1> @ <table cellpadding="5"> | | | | | | | | | | | | | | | | | | | | | | 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 |
@ append_field comment $ctxt
@ }
@ }
@ submit_ticket
@ }
@ </th1>
@ <table cellpadding="5">
@ <tr><td class="tktDspLabel">Title:</td><td>
@ <input type="text" name="title" value="$<title>" size="60" />
@ </td></tr>
@ <tr><td class="tktDspLabel">Status:</td><td>
@ <th1>combobox status $status_choices 1</th1>
@ </td></tr>
@ <tr><td class="tktDspLabel">Type:</td><td>
@ <th1>combobox type $type_choices 1</th1>
@ </td></tr>
@ <tr><td class="tktDspLabel">Severity:</td><td>
@ <th1>combobox severity $severity_choices 1</th1>
@ </td></tr>
@ <tr><td class="tktDspLabel">Priority:</td><td>
@ <th1>combobox priority $priority_choices 1</th1>
@ </td></tr>
@ <tr><td class="tktDspLabel">Resolution:</td><td>
@ <th1>combobox resolution $resolution_choices 1</th1>
@ </td></tr>
@ <tr><td class="tktDspLabel">Subsystem:</td><td>
@ <th1>combobox subsystem $subsystem_choices 1</th1>
@ </td></tr>
@ <th1>enable_output [hascap e]</th1>
@ <tr><td class="tktDspLabel">Contact:</td><td>
@ <input type="text" name="private_contact" size="40"
@ value="$<private_contact>" />
@ </td></tr>
@ <th1>enable_output 1</th1>
@ <tr><td class="tktDspLabel">Version Found In:</td><td>
@ <input type="text" name="foundin" size="50" value="$<foundin>" />
@ </td></tr>
@ <tr><td colspan="2">
@ <th1>
@ if {![info exists eall]} {set eall 0}
@ if {[info exists aonlybtn]} {set eall 0}
@ if {[info exists eallbtn]} {set eall 1}
@ if {![hascap w]} {set eall 0}
@ if {![info exists cmappnd]} {set cmappnd {}}
@ set nline [linecount $comment 15 10]
@ enable_output $eall
@ </th1>
@ Description And Comments:<br />
@ <textarea name="comment" cols="80" rows="$nline"
@ wrap="virtual" class="wikiedit">$<comment></textarea><br />
@ <input type="hidden" name="eall" value="1" />
@ <input type="submit" name="aonlybtn" value="Append Remark" />
@ <input type="submit" name="preview1btn" value="Preview" />
@ <th1>enable_output [expr {!$eall}]</th1>
@ Append Remark from
@ <input type="text" name="username" value="$<username>" size="30" />:<br />
@ <textarea name="cmappnd" cols="80" rows="15"
@ wrap="virtual" class="wikiedit">$<cmappnd></textarea><br />
@ <th1>enable_output [expr {[hascap w] && !$eall}]</th1>
@ <input type="submit" name="eallbtn" value="Edit All" />
@ <th1>enable_output [expr {!$eall}]</th1>
@ <input type="submit" name="preview2btn" value="Preview" />
@ <th1>enable_output 1</th1>
@ </td></tr>
@
@ <th1>enable_output [info exists preview1btn]</th1>
@ <tr><td colspan="2">
@ Description Preview:<br /><hr />
@ <th1>wiki $comment</th1>
@ <hr />
@ </td></tr>
@ <th1>enable_output [info exists preview2btn]</th1>
@ <tr><td colspan="2">
@ Description Preview:<br /><hr />
@ <th1>wiki $cmappnd</th1>
@ <hr />
@ </td></tr>
@ <th1>enable_output 1</th1>
@
@ <tr><td align="right"></td><td>
@ <input type="submit" name="submit" value="Submit Changes" />
@ <input type="submit" name="cancel" value="Cancel" />
@ </td></tr>
@ </table>
;
/*
** Return the code used to generate the edit ticket page
*/
|
| ︙ | ︙ |
Changes to src/wiki.c.
| ︙ | ︙ | |||
46 47 48 49 50 51 52 |
}
/*
** Output rules for well-formed wiki pages
*/
static void well_formed_wiki_name_rules(void){
@ <ul>
| | | | | | 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
}
/*
** Output rules for well-formed wiki pages
*/
static void well_formed_wiki_name_rules(void){
@ <ul>
@ <li> Must not begin or end with a space.</li>
@ <li> Must not contain any control characters, including tab or
@ newline.</li>
@ <li> Must not have two or more spaces in a row internally.</li>
@ <li> Must be between 3 and 100 characters in length.</li>
@ </ul>
}
/*
** Check a wiki name. If it is not well-formed, then issue an error
** and return true. If it is well-formed, return false.
*/
|
| ︙ | ︙ | |||
394 395 396 397 398 399 400 |
return;
}
zName = PD("name","");
if( zName[0] && wiki_name_is_wellformed((const unsigned char *)zName) ){
cgi_redirectf("wikiedit?name=%T", zName);
}
style_header("Create A New Wiki Page");
| | < | | | | 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 |
return;
}
zName = PD("name","");
if( zName[0] && wiki_name_is_wellformed((const unsigned char *)zName) ){
cgi_redirectf("wikiedit?name=%T", zName);
}
style_header("Create A New Wiki Page");
@ <p>Rules for wiki page names:</p>
well_formed_wiki_name_rules();
@ <form method="post" action="%s(g.zBaseURL)/wikinew">
@ <p>Name of new wiki page:
@ <input style="width: 35;" type="text" name="name" value="%h(zName)" />
@ <input type="submit" value="Create" />
@ </p></form>
if( zName[0] ){
@ <p><span class="wikiError">
@ "%h(zName)" is not a valid wiki page name!</span></p>
}
style_footer();
}
|
| ︙ | ︙ | |||
738 739 740 741 742 743 744 | @ <li>Most ordinary HTML works.</li> @ <li><verbatim> and <nowiki>.</li> @ </ol> @ <p>We call the first five rules above "wiki" formatting rules. The @ last two rules are the HTML formatting rule.</p> @ <h2>Formatting Rule Details</h2> @ <ol> | | | | | | | | | | | | | 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 |
@ <li>Most ordinary HTML works.</li>
@ <li><verbatim> and <nowiki>.</li>
@ </ol>
@ <p>We call the first five rules above "wiki" formatting rules. The
@ last two rules are the HTML formatting rule.</p>
@ <h2>Formatting Rule Details</h2>
@ <ol>
@ <li> <p><span class="wikiruleHead">Paragraphs</span>. Any sequence of one or more blank lines forms
@ a paragraph break. Centered or right-justified paragraphs are not
@ supported by wiki markup, but you can do these things if you need them
@ using HTML.</p></li>
@ <li> <p><span class="wikiruleHead">Bullet Lists</span>.
@ A bullet list item is a line that begins with a single "*" character
@ surrounded on
@ both sides by two or more spaces or by a tab. Only a single level
@ of bullet list is supported by wiki. For nested lists, use HTML.</p></li>
@ <li> <p><span class="wikiruleHead">Enumeration Lists</span>.
@ An enumeration list item is a line that begins with a single "#" character
@ surrounded on both sides by two or more spaces or by a tab. Only a single
@ level of enumeration list is supported by wiki. For nested lists or for
@ enumerations that count using letters or roman numerials, use HTML.</p></li>
@ <li> <p><span class="wikiruleHead">Indented Paragraphs</span>.
@ Any paragraph that begins with two or more spaces or a tab and
@ which is not a bullet or enumeration list item is rendered
@ indented. Only a single level of indentation is supported by wiki; use
@ HTML for deeper indentation.</p></li>
@ <li> <p><span class="wikiruleHead">Hyperlinks</span>.
@ Text within square brackets ("[...]") becomes a hyperlink. The
@ target can be a wiki page name, the artifact ID of a check-in or ticket,
@ the name of an image, or a URL. By default, the target is displayed
@ as the text of the hyperlink. But you can specify alternative text
@ after the target name separated by a "|" character.</p>
@ <p>You can also link to internal anchor names using [#anchor-name], providing
@ you have added the necessary "<a name="anchor-name"></a>"
@ tag to your wiki page.</p></li>
@ <li> <p><span class="wikiruleHead">HTML</span>.
@ The following standard HTML elements may be used:
@ <a>
@ <address>
@ <b>
@ <big>
@ <blockquote>
@ <br>
|
| ︙ | ︙ | |||
820 821 822 823 824 825 826 | @ <var>. @ In addition, there are two non-standard elements available: @ <verbatim> and <nowiki>. @ No other elements are allowed. All attributes are checked and @ only a few benign attributes are allowed on each element. @ In particular, any attributes that specify javascript or CSS @ are elided.</p></li> | | | | 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 | @ <var>. @ In addition, there are two non-standard elements available: @ <verbatim> and <nowiki>. @ No other elements are allowed. All attributes are checked and @ only a few benign attributes are allowed on each element. @ In particular, any attributes that specify javascript or CSS @ are elided.</p></li> @ <li><p><span class="wikiruleHead">Special Markup.</span> @ The <nowiki> tag disables all wiki formatting rules @ through the matching </nowiki> element. @ The <verbatim> tag works like <pre> with the addition @ that it also disables all wiki and HTML markup @ through the matching </verbatim>.</p></li> @ </ol> style_footer(); } /* ** Add a new wiki page to the respository. The page name is ** given by the zPageName parameter. isNew must be true to create |
| ︙ | ︙ |