Fossil SCM

More consistancy in html generation: Use '"' where possible.

jan.nijtmans 2012-08-31 08:08 trunk
Commit 34fcb9634e54a919be10b88d4c4664e62ddcf461
+11 -11
--- src/info.c
+++ src/info.c
@@ -607,43 +607,43 @@
607607
@ <div class="sectionmenu">
608608
showDiff = g.zPath[0]!='c';
609609
if( db_get_boolean("show-version-diffs", 0)==0 ){
610610
showDiff = !showDiff;
611611
if( showDiff ){
612
- @ %z(xhref("class='button'","%R/vinfo/%T",zName))
612
+ @ %z(xhref("class=\"button\"","%R/vinfo/%T",zName))
613613
@ hide&nbsp;diffs</a>
614614
if( sideBySide ){
615
- @ %z(xhref("class='button'","%R/ci/%T?sbs=0",zName))
615
+ @ %z(xhref("class=\"button\"","%R/ci/%T?sbs=0",zName))
616616
@ unified&nbsp;diffs</a>
617617
}else{
618
- @ %z(xhref("class='button'","%R/ci/%T?sbs=1",zName))
618
+ @ %z(xhref("class=\"button\"","%R/ci/%T?sbs=1",zName))
619619
@ side-by-side&nbsp;diffs</a>
620620
}
621621
}else{
622
- @ %z(xhref("class='button'","%R/ci/%T?sbs=0",zName))
622
+ @ %z(xhref("class=\"button\"","%R/ci/%T?sbs=0",zName))
623623
@ show&nbsp;unified&nbsp;diffs</a>
624
- @ %z(xhref("class='button'","%R/ci/%T?sbs=1",zName))
624
+ @ %z(xhref("class=\"button\"","%R/ci/%T?sbs=1",zName))
625625
@ show&nbsp;side-by-side&nbsp;diffs</a>
626626
}
627627
}else{
628628
if( showDiff ){
629
- @ %z(xhref("class='button'","%R/ci/%T",zName))hide&nbsp;diffs</a>
629
+ @ %z(xhref("class=\"button\"","%R/ci/%T",zName))hide&nbsp;diffs</a>
630630
if( sideBySide ){
631
- @ %z(xhref("class='button'","%R/info/%T?sbs=0",zName))
631
+ @ %z(xhref("class=\"button\"","%R/info/%T?sbs=0",zName))
632632
@ unified&nbsp;diffs</a>
633633
}else{
634
- @ %z(xhref("class='button'","%R/info/%T?sbs=1",zName))
634
+ @ %z(xhref("class=\"button\"","%R/info/%T?sbs=1",zName))
635635
@ side-by-side&nbsp;diffs</a>
636636
}
637637
}else{
638
- @ %z(xhref("class='button'","%R/vinfo/%T?sbs=0",zName))
638
+ @ %z(xhref("class=\"button\"","%R/vinfo/%T?sbs=0",zName))
639639
@ show&nbsp;unified&nbsp;diffs</a>
640
- @ %z(xhref("class='button'","%R/vinfo/%T?sbs=1",zName))
640
+ @ %z(xhref("class=\"button\"","%R/vinfo/%T?sbs=1",zName))
641641
@ show&nbsp;side-by-side&nbsp;diffs</a>
642642
}
643643
}
644
- @ %z(xhref("class='button'","%R/vpatch?from=%S&to=%S",zParent,zUuid))
644
+ @ %z(xhref("class=\"button\"","%R/vpatch?from=%S&to=%S",zParent,zUuid))
645645
@ patch</a></div>
646646
db_prepare(&q,
647647
"SELECT name,"
648648
" mperm,"
649649
" (SELECT uuid FROM blob WHERE rid=mlink.pid),"
650650
--- src/info.c
+++ src/info.c
@@ -607,43 +607,43 @@
607 @ <div class="sectionmenu">
608 showDiff = g.zPath[0]!='c';
609 if( db_get_boolean("show-version-diffs", 0)==0 ){
610 showDiff = !showDiff;
611 if( showDiff ){
612 @ %z(xhref("class='button'","%R/vinfo/%T",zName))
613 @ hide&nbsp;diffs</a>
614 if( sideBySide ){
615 @ %z(xhref("class='button'","%R/ci/%T?sbs=0",zName))
616 @ unified&nbsp;diffs</a>
617 }else{
618 @ %z(xhref("class='button'","%R/ci/%T?sbs=1",zName))
619 @ side-by-side&nbsp;diffs</a>
620 }
621 }else{
622 @ %z(xhref("class='button'","%R/ci/%T?sbs=0",zName))
623 @ show&nbsp;unified&nbsp;diffs</a>
624 @ %z(xhref("class='button'","%R/ci/%T?sbs=1",zName))
625 @ show&nbsp;side-by-side&nbsp;diffs</a>
626 }
627 }else{
628 if( showDiff ){
629 @ %z(xhref("class='button'","%R/ci/%T",zName))hide&nbsp;diffs</a>
630 if( sideBySide ){
631 @ %z(xhref("class='button'","%R/info/%T?sbs=0",zName))
632 @ unified&nbsp;diffs</a>
633 }else{
634 @ %z(xhref("class='button'","%R/info/%T?sbs=1",zName))
635 @ side-by-side&nbsp;diffs</a>
636 }
637 }else{
638 @ %z(xhref("class='button'","%R/vinfo/%T?sbs=0",zName))
639 @ show&nbsp;unified&nbsp;diffs</a>
640 @ %z(xhref("class='button'","%R/vinfo/%T?sbs=1",zName))
641 @ show&nbsp;side-by-side&nbsp;diffs</a>
642 }
643 }
644 @ %z(xhref("class='button'","%R/vpatch?from=%S&to=%S",zParent,zUuid))
645 @ patch</a></div>
646 db_prepare(&q,
647 "SELECT name,"
648 " mperm,"
649 " (SELECT uuid FROM blob WHERE rid=mlink.pid),"
650
--- src/info.c
+++ src/info.c
@@ -607,43 +607,43 @@
607 @ <div class="sectionmenu">
608 showDiff = g.zPath[0]!='c';
609 if( db_get_boolean("show-version-diffs", 0)==0 ){
610 showDiff = !showDiff;
611 if( showDiff ){
612 @ %z(xhref("class=\"button\"","%R/vinfo/%T",zName))
613 @ hide&nbsp;diffs</a>
614 if( sideBySide ){
615 @ %z(xhref("class=\"button\"","%R/ci/%T?sbs=0",zName))
616 @ unified&nbsp;diffs</a>
617 }else{
618 @ %z(xhref("class=\"button\"","%R/ci/%T?sbs=1",zName))
619 @ side-by-side&nbsp;diffs</a>
620 }
621 }else{
622 @ %z(xhref("class=\"button\"","%R/ci/%T?sbs=0",zName))
623 @ show&nbsp;unified&nbsp;diffs</a>
624 @ %z(xhref("class=\"button\"","%R/ci/%T?sbs=1",zName))
625 @ show&nbsp;side-by-side&nbsp;diffs</a>
626 }
627 }else{
628 if( showDiff ){
629 @ %z(xhref("class=\"button\"","%R/ci/%T",zName))hide&nbsp;diffs</a>
630 if( sideBySide ){
631 @ %z(xhref("class=\"button\"","%R/info/%T?sbs=0",zName))
632 @ unified&nbsp;diffs</a>
633 }else{
634 @ %z(xhref("class=\"button\"","%R/info/%T?sbs=1",zName))
635 @ side-by-side&nbsp;diffs</a>
636 }
637 }else{
638 @ %z(xhref("class=\"button\"","%R/vinfo/%T?sbs=0",zName))
639 @ show&nbsp;unified&nbsp;diffs</a>
640 @ %z(xhref("class=\"button\"","%R/vinfo/%T?sbs=1",zName))
641 @ show&nbsp;side-by-side&nbsp;diffs</a>
642 }
643 }
644 @ %z(xhref("class=\"button\"","%R/vpatch?from=%S&to=%S",zParent,zUuid))
645 @ patch</a></div>
646 db_prepare(&q,
647 "SELECT name,"
648 " mperm,"
649 " (SELECT uuid FROM blob WHERE rid=mlink.pid),"
650
+1 -1
--- src/tag.c
+++ src/tag.c
@@ -549,11 +549,11 @@
549549
);
550550
@ <ul>
551551
while( db_step(&q)==SQLITE_ROW ){
552552
const char *zName = db_column_text(&q, 0);
553553
if( g.perm.Hyperlink ){
554
- @ <li>%z(xhref("class='taglink'","%R/timeline?t=%T",zName))
554
+ @ <li>%z(xhref("class=\"taglink\"","%R/timeline?t=%T",zName))
555555
@ %h(zName)</a></li>
556556
}else{
557557
@ <li><span class="tagDsp">%h(zName)</span></li>
558558
}
559559
}
560560
--- src/tag.c
+++ src/tag.c
@@ -549,11 +549,11 @@
549 );
550 @ <ul>
551 while( db_step(&q)==SQLITE_ROW ){
552 const char *zName = db_column_text(&q, 0);
553 if( g.perm.Hyperlink ){
554 @ <li>%z(xhref("class='taglink'","%R/timeline?t=%T",zName))
555 @ %h(zName)</a></li>
556 }else{
557 @ <li><span class="tagDsp">%h(zName)</span></li>
558 }
559 }
560
--- src/tag.c
+++ src/tag.c
@@ -549,11 +549,11 @@
549 );
550 @ <ul>
551 while( db_step(&q)==SQLITE_ROW ){
552 const char *zName = db_column_text(&q, 0);
553 if( g.perm.Hyperlink ){
554 @ <li>%z(xhref("class=\"taglink\"","%R/timeline?t=%T",zName))
555 @ %h(zName)</a></li>
556 }else{
557 @ <li><span class="tagDsp">%h(zName)</span></li>
558 }
559 }
560
+4 -4
--- src/timeline.c
+++ src/timeline.c
@@ -48,11 +48,11 @@
4848
*/
4949
void hyperlink_to_uuid(const char *zUuid){
5050
char z[UUID_SIZE+1];
5151
shorten_uuid(z, zUuid);
5252
if( g.perm.Hyperlink ){
53
- @ %z(xhref("class='timelineHistLink'","%R/info/%s",z))[%s(z)]</a>
53
+ @ %z(xhref("class=\"timelineHistLink\"","%R/info/%s",z))[%s(z)]</a>
5454
}else{
5555
@ <span class="timelineHistDsp">[%s(z)]</span>
5656
}
5757
}
5858
@@ -431,25 +431,25 @@
431431
@ <ul class="filelist">
432432
inUl = 1;
433433
}
434434
if( isNew ){
435435
@ <li> %h(zFilename) (new file) &nbsp;
436
- @ %z(xhref("target='diffwindow'","%R/artifact/%S",zNew))
436
+ @ %z(xhref("target=\"diffwindow\"","%R/artifact/%S",zNew))
437437
@ [view]</a></li>
438438
}else if( isDel ){
439439
@ <li> %h(zFilename) (deleted)</li>
440440
}else if( fossil_strcmp(zOld,zNew)==0 && zOldName!=0 ){
441441
@ <li> %h(zOldName) → %h(zFilename)
442
- @ %z(xhref("target='diffwindow'","%R/artifact/%S",zNew))
442
+ @ %z(xhref("target=\"diffwindow\"","%R/artifact/%S",zNew))
443443
@ [view]</a></li>
444444
}else{
445445
if( zOldName!=0 ){
446446
@ <li> %h(zOldName) → %h(zFilename)
447447
}else{
448448
@ <li> %h(zFilename) &nbsp;
449449
}
450
- @ %z(xhref("target='diffwindow'","%R/fdiff?v1=%S&v2=%S",zOld,zNew))
450
+ @ %z(xhref("target=\"diffwindow\"","%R/fdiff?v1=%S&v2=%S",zOld,zNew))
451451
@ [diff]</a></li>
452452
}
453453
}
454454
db_reset(&fchngQuery);
455455
if( inUl ){
456456
--- src/timeline.c
+++ src/timeline.c
@@ -48,11 +48,11 @@
48 */
49 void hyperlink_to_uuid(const char *zUuid){
50 char z[UUID_SIZE+1];
51 shorten_uuid(z, zUuid);
52 if( g.perm.Hyperlink ){
53 @ %z(xhref("class='timelineHistLink'","%R/info/%s",z))[%s(z)]</a>
54 }else{
55 @ <span class="timelineHistDsp">[%s(z)]</span>
56 }
57 }
58
@@ -431,25 +431,25 @@
431 @ <ul class="filelist">
432 inUl = 1;
433 }
434 if( isNew ){
435 @ <li> %h(zFilename) (new file) &nbsp;
436 @ %z(xhref("target='diffwindow'","%R/artifact/%S",zNew))
437 @ [view]</a></li>
438 }else if( isDel ){
439 @ <li> %h(zFilename) (deleted)</li>
440 }else if( fossil_strcmp(zOld,zNew)==0 && zOldName!=0 ){
441 @ <li> %h(zOldName) → %h(zFilename)
442 @ %z(xhref("target='diffwindow'","%R/artifact/%S",zNew))
443 @ [view]</a></li>
444 }else{
445 if( zOldName!=0 ){
446 @ <li> %h(zOldName) → %h(zFilename)
447 }else{
448 @ <li> %h(zFilename) &nbsp;
449 }
450 @ %z(xhref("target='diffwindow'","%R/fdiff?v1=%S&v2=%S",zOld,zNew))
451 @ [diff]</a></li>
452 }
453 }
454 db_reset(&fchngQuery);
455 if( inUl ){
456
--- src/timeline.c
+++ src/timeline.c
@@ -48,11 +48,11 @@
48 */
49 void hyperlink_to_uuid(const char *zUuid){
50 char z[UUID_SIZE+1];
51 shorten_uuid(z, zUuid);
52 if( g.perm.Hyperlink ){
53 @ %z(xhref("class=\"timelineHistLink\"","%R/info/%s",z))[%s(z)]</a>
54 }else{
55 @ <span class="timelineHistDsp">[%s(z)]</span>
56 }
57 }
58
@@ -431,25 +431,25 @@
431 @ <ul class="filelist">
432 inUl = 1;
433 }
434 if( isNew ){
435 @ <li> %h(zFilename) (new file) &nbsp;
436 @ %z(xhref("target=\"diffwindow\"","%R/artifact/%S",zNew))
437 @ [view]</a></li>
438 }else if( isDel ){
439 @ <li> %h(zFilename) (deleted)</li>
440 }else if( fossil_strcmp(zOld,zNew)==0 && zOldName!=0 ){
441 @ <li> %h(zOldName) → %h(zFilename)
442 @ %z(xhref("target=\"diffwindow\"","%R/artifact/%S",zNew))
443 @ [view]</a></li>
444 }else{
445 if( zOldName!=0 ){
446 @ <li> %h(zOldName) → %h(zFilename)
447 }else{
448 @ <li> %h(zFilename) &nbsp;
449 }
450 @ %z(xhref("target=\"diffwindow\"","%R/fdiff?v1=%S&v2=%S",zOld,zNew))
451 @ [diff]</a></li>
452 }
453 }
454 db_reset(&fchngQuery);
455 if( inUl ){
456
+3 -3
--- src/wiki.c
+++ src/wiki.c
@@ -374,11 +374,11 @@
374374
@ <textarea name="w" class="wikiedit" cols="80"
375375
@ rows="%d(n)" wrap="virtual">%h(zBody)</textarea>
376376
@ <br />
377377
if( db_get_boolean("wysiwyg-wiki", 0) ){
378378
@ <input type="submit" name="edit-wysiwyg" value="Wysiwyg Editor"
379
- @ onclick='return confirm("Switching to WYSIWYG-mode\nwill erase your markup\nedits. Continue?")' />
379
+ @ onclick="return confirm('Switching to WYSIWYG-mode\nwill erase your markup\nedits. Continue?')" />
380380
}
381381
@ <input type="submit" name="preview" value="Preview Your Changes" />
382382
}else{
383383
/* Wysiwyg editing */
384384
Blob html, temp;
@@ -392,17 +392,17 @@
392392
blob_reset(&temp);
393393
wysiwygEditor("w", blob_str(&html), 60, n);
394394
blob_reset(&html);
395395
@ <br />
396396
@ <input type="submit" name="edit-markup" value="Markup Editor"
397
- @ onclick='return confirm("Switching to markup-mode\nwill erase your WYSIWYG\nedits. Continue?")' />
397
+ @ onclick="return confirm('Switching to markup-mode\nwill erase your WYSIWYG\nedits. Continue?')" />
398398
}
399399
@ <input type="submit" name="submit" value="Apply These Changes" />
400400
login_insert_csrf_secret();
401401
@ <input type="hidden" name="name" value="%h(zPageName)" />
402402
@ <input type="submit" name="cancel" value="Cancel"
403
- @ onclick='confirm("Abandon your changes?")' />
403
+ @ onclick="confirm('Abandon your changes?')" />
404404
@ </div></form>
405405
manifest_destroy(pWiki);
406406
blob_reset(&wiki);
407407
style_footer();
408408
}
409409
--- src/wiki.c
+++ src/wiki.c
@@ -374,11 +374,11 @@
374 @ <textarea name="w" class="wikiedit" cols="80"
375 @ rows="%d(n)" wrap="virtual">%h(zBody)</textarea>
376 @ <br />
377 if( db_get_boolean("wysiwyg-wiki", 0) ){
378 @ <input type="submit" name="edit-wysiwyg" value="Wysiwyg Editor"
379 @ onclick='return confirm("Switching to WYSIWYG-mode\nwill erase your markup\nedits. Continue?")' />
380 }
381 @ <input type="submit" name="preview" value="Preview Your Changes" />
382 }else{
383 /* Wysiwyg editing */
384 Blob html, temp;
@@ -392,17 +392,17 @@
392 blob_reset(&temp);
393 wysiwygEditor("w", blob_str(&html), 60, n);
394 blob_reset(&html);
395 @ <br />
396 @ <input type="submit" name="edit-markup" value="Markup Editor"
397 @ onclick='return confirm("Switching to markup-mode\nwill erase your WYSIWYG\nedits. Continue?")' />
398 }
399 @ <input type="submit" name="submit" value="Apply These Changes" />
400 login_insert_csrf_secret();
401 @ <input type="hidden" name="name" value="%h(zPageName)" />
402 @ <input type="submit" name="cancel" value="Cancel"
403 @ onclick='confirm("Abandon your changes?")' />
404 @ </div></form>
405 manifest_destroy(pWiki);
406 blob_reset(&wiki);
407 style_footer();
408 }
409
--- src/wiki.c
+++ src/wiki.c
@@ -374,11 +374,11 @@
374 @ <textarea name="w" class="wikiedit" cols="80"
375 @ rows="%d(n)" wrap="virtual">%h(zBody)</textarea>
376 @ <br />
377 if( db_get_boolean("wysiwyg-wiki", 0) ){
378 @ <input type="submit" name="edit-wysiwyg" value="Wysiwyg Editor"
379 @ onclick="return confirm('Switching to WYSIWYG-mode\nwill erase your markup\nedits. Continue?')" />
380 }
381 @ <input type="submit" name="preview" value="Preview Your Changes" />
382 }else{
383 /* Wysiwyg editing */
384 Blob html, temp;
@@ -392,17 +392,17 @@
392 blob_reset(&temp);
393 wysiwygEditor("w", blob_str(&html), 60, n);
394 blob_reset(&html);
395 @ <br />
396 @ <input type="submit" name="edit-markup" value="Markup Editor"
397 @ onclick="return confirm('Switching to markup-mode\nwill erase your WYSIWYG\nedits. Continue?')" />
398 }
399 @ <input type="submit" name="submit" value="Apply These Changes" />
400 login_insert_csrf_secret();
401 @ <input type="hidden" name="name" value="%h(zPageName)" />
402 @ <input type="submit" name="cancel" value="Cancel"
403 @ onclick="confirm('Abandon your changes?')" />
404 @ </div></form>
405 manifest_destroy(pWiki);
406 blob_reset(&wiki);
407 style_footer();
408 }
409

Keyboard Shortcuts

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