Fossil SCM
Enhance the various diff views (excluding diff -b output) to be able to dynamically load more context lines per mouse click.
Commit
51c1efd403db412f5aed8ffa99ce0775361b3c5e9961522c9159a30a51cd1fe6
Parent
2921ec2588df5e6…
21 files changed
+24
+6
-1
+8
-2
+9
+7
-1
+3
+83
-3
+11
-4
+35
-31
+1
-1
+1
-1
+5
-8
+5
+1
-1
-8
+41
-14
+41
-14
+1
-1
+1
-1
+1
-1
+2
-2
~
skins/bootstrap/css.txt
~
skins/darkmode/css.txt
~
skins/eagle/css.txt
~
skins/khaki/css.txt
~
skins/xekri/css.txt
~
src/builtin.c
~
src/default.css
~
src/diff.c
~
src/diff.js
~
src/diffcmd.c
~
src/fileedit.c
~
src/fossil.diff.js
+
src/fossil.diff.js
~
src/fossil.dom.js
-
src/fossil.info-diff.js
~
src/info.c
~
src/info.c
~
src/main.mk
~
src/wiki.c
~
win/Makefile.mingw
~
win/Makefile.msc
+24
| --- skins/bootstrap/css.txt | ||
| +++ skins/bootstrap/css.txt | ||
| @@ -4400,5 +4400,29 @@ | ||
| 4400 | 4400 | } |
| 4401 | 4401 | |
| 4402 | 4402 | body.branch .submenu > a.timeline-link { |
| 4403 | 4403 | color: black; |
| 4404 | 4404 | } |
| 4405 | + | |
| 4406 | +tr.diffskip > td.chunkctrl .jcbutton { | |
| 4407 | + min-width: 3.5ex; | |
| 4408 | + max-width: revert; | |
| 4409 | +} | |
| 4410 | + | |
| 4411 | +/* Bootstrap installs a 'table' class on tables which causes its | |
| 4412 | + styles to be more specific matches than our diff tables, so we have | |
| 4413 | + to fight that fire with more fire... */ | |
| 4414 | +table.diff.table>thead>tr>th, table.diff.table>tbody>tr>th, | |
| 4415 | +table.diff.table>tfoot>tr>th, table.diff.table>thead>tr>td, | |
| 4416 | +table.diff.table>tbody>tr>td, table.diff.table>tfoot>tr>td { | |
| 4417 | + padding: 0; | |
| 4418 | + line-height: revert; | |
| 4419 | + vertical-align: top; | |
| 4420 | + border-top: none; | |
| 4421 | +} | |
| 4422 | +table.diff tr.diffskip.jchunk > td { | |
| 4423 | + padding: 0.25em 0.5em; | |
| 4424 | +} | |
| 4425 | +table.diff pre { | |
| 4426 | + border: none; | |
| 4427 | + word-wrap: initial; | |
| 4428 | +} | |
| 4405 | 4429 |
| --- skins/bootstrap/css.txt | |
| +++ skins/bootstrap/css.txt | |
| @@ -4400,5 +4400,29 @@ | |
| 4400 | } |
| 4401 | |
| 4402 | body.branch .submenu > a.timeline-link { |
| 4403 | color: black; |
| 4404 | } |
| 4405 |
| --- skins/bootstrap/css.txt | |
| +++ skins/bootstrap/css.txt | |
| @@ -4400,5 +4400,29 @@ | |
| 4400 | } |
| 4401 | |
| 4402 | body.branch .submenu > a.timeline-link { |
| 4403 | color: black; |
| 4404 | } |
| 4405 | |
| 4406 | tr.diffskip > td.chunkctrl .jcbutton { |
| 4407 | min-width: 3.5ex; |
| 4408 | max-width: revert; |
| 4409 | } |
| 4410 | |
| 4411 | /* Bootstrap installs a 'table' class on tables which causes its |
| 4412 | styles to be more specific matches than our diff tables, so we have |
| 4413 | to fight that fire with more fire... */ |
| 4414 | table.diff.table>thead>tr>th, table.diff.table>tbody>tr>th, |
| 4415 | table.diff.table>tfoot>tr>th, table.diff.table>thead>tr>td, |
| 4416 | table.diff.table>tbody>tr>td, table.diff.table>tfoot>tr>td { |
| 4417 | padding: 0; |
| 4418 | line-height: revert; |
| 4419 | vertical-align: top; |
| 4420 | border-top: none; |
| 4421 | } |
| 4422 | table.diff tr.diffskip.jchunk > td { |
| 4423 | padding: 0.25em 0.5em; |
| 4424 | } |
| 4425 | table.diff pre { |
| 4426 | border: none; |
| 4427 | word-wrap: initial; |
| 4428 | } |
| 4429 |
+6
-1
| --- skins/darkmode/css.txt | ||
| +++ skins/darkmode/css.txt | ||
| @@ -479,11 +479,16 @@ | ||
| 479 | 479 | td.difftxt ins > ins { |
| 480 | 480 | background-color: #559855; |
| 481 | 481 | color: #000; |
| 482 | 482 | text-decoration: none; |
| 483 | 483 | } |
| 484 | - | |
| 484 | +tr.diffskip.jchunk { | |
| 485 | + background-color: black; | |
| 486 | +} | |
| 487 | +tr.diffskip > td.chunkctrl .jcbutton { | |
| 488 | + background-color: #303536; | |
| 489 | +} | |
| 485 | 490 | |
| 486 | 491 | /************************************************************************ |
| 487 | 492 | ************************************************************************/ |
| 488 | 493 | body.wikiedit #fossil-status-bar, |
| 489 | 494 | body.fileedit #fossil-status-bar{ |
| 490 | 495 |
| --- skins/darkmode/css.txt | |
| +++ skins/darkmode/css.txt | |
| @@ -479,11 +479,16 @@ | |
| 479 | td.difftxt ins > ins { |
| 480 | background-color: #559855; |
| 481 | color: #000; |
| 482 | text-decoration: none; |
| 483 | } |
| 484 | |
| 485 | |
| 486 | /************************************************************************ |
| 487 | ************************************************************************/ |
| 488 | body.wikiedit #fossil-status-bar, |
| 489 | body.fileedit #fossil-status-bar{ |
| 490 |
| --- skins/darkmode/css.txt | |
| +++ skins/darkmode/css.txt | |
| @@ -479,11 +479,16 @@ | |
| 479 | td.difftxt ins > ins { |
| 480 | background-color: #559855; |
| 481 | color: #000; |
| 482 | text-decoration: none; |
| 483 | } |
| 484 | tr.diffskip.jchunk { |
| 485 | background-color: black; |
| 486 | } |
| 487 | tr.diffskip > td.chunkctrl .jcbutton { |
| 488 | background-color: #303536; |
| 489 | } |
| 490 | |
| 491 | /************************************************************************ |
| 492 | ************************************************************************/ |
| 493 | body.wikiedit #fossil-status-bar, |
| 494 | body.fileedit #fossil-status-bar{ |
| 495 |
+8
-2
| --- skins/eagle/css.txt | ||
| +++ skins/eagle/css.txt | ||
| @@ -263,11 +263,10 @@ | ||
| 263 | 263 | background-color: #485D7B; |
| 264 | 264 | font-family: fixed, Dejavu Sans Mono, Monaco, Lucida Console, monospace; |
| 265 | 265 | font-size: 8pt; |
| 266 | 266 | border-collapse:collapse; |
| 267 | 267 | white-space: pre; |
| 268 | - width: 98%; | |
| 269 | 268 | border: 1px #000 dashed; |
| 270 | 269 | margin-left: auto; |
| 271 | 270 | margin-right: auto; |
| 272 | 271 | } |
| 273 | 272 | |
| @@ -347,13 +346,20 @@ | ||
| 347 | 346 | background-color: rgb(230, 110, 110); |
| 348 | 347 | } |
| 349 | 348 | td.difftxt del { |
| 350 | 349 | background-color: inherit; |
| 351 | 350 | } |
| 351 | +tr.diffskip.jchunk { | |
| 352 | + background-color: #7EA2D9; | |
| 353 | +} | |
| 354 | +tr.diffskip > td.chunkctrl .jcbutton{ | |
| 355 | + color: white; | |
| 356 | + background-color: #485D7B; | |
| 357 | +} | |
| 352 | 358 | |
| 353 | 359 | .fileage tr:hover { |
| 354 | - background-color: #7EA2D9; | |
| 360 | + background-color: #7EA2D9; | |
| 355 | 361 | } |
| 356 | 362 | |
| 357 | 363 | span.modpending { |
| 358 | 364 | color: #c0c0c0; |
| 359 | 365 | font-style: italic; |
| 360 | 366 |
| --- skins/eagle/css.txt | |
| +++ skins/eagle/css.txt | |
| @@ -263,11 +263,10 @@ | |
| 263 | background-color: #485D7B; |
| 264 | font-family: fixed, Dejavu Sans Mono, Monaco, Lucida Console, monospace; |
| 265 | font-size: 8pt; |
| 266 | border-collapse:collapse; |
| 267 | white-space: pre; |
| 268 | width: 98%; |
| 269 | border: 1px #000 dashed; |
| 270 | margin-left: auto; |
| 271 | margin-right: auto; |
| 272 | } |
| 273 | |
| @@ -347,13 +346,20 @@ | |
| 347 | background-color: rgb(230, 110, 110); |
| 348 | } |
| 349 | td.difftxt del { |
| 350 | background-color: inherit; |
| 351 | } |
| 352 | |
| 353 | .fileage tr:hover { |
| 354 | background-color: #7EA2D9; |
| 355 | } |
| 356 | |
| 357 | span.modpending { |
| 358 | color: #c0c0c0; |
| 359 | font-style: italic; |
| 360 |
| --- skins/eagle/css.txt | |
| +++ skins/eagle/css.txt | |
| @@ -263,11 +263,10 @@ | |
| 263 | background-color: #485D7B; |
| 264 | font-family: fixed, Dejavu Sans Mono, Monaco, Lucida Console, monospace; |
| 265 | font-size: 8pt; |
| 266 | border-collapse:collapse; |
| 267 | white-space: pre; |
| 268 | border: 1px #000 dashed; |
| 269 | margin-left: auto; |
| 270 | margin-right: auto; |
| 271 | } |
| 272 | |
| @@ -347,13 +346,20 @@ | |
| 346 | background-color: rgb(230, 110, 110); |
| 347 | } |
| 348 | td.difftxt del { |
| 349 | background-color: inherit; |
| 350 | } |
| 351 | tr.diffskip.jchunk { |
| 352 | background-color: #7EA2D9; |
| 353 | } |
| 354 | tr.diffskip > td.chunkctrl .jcbutton{ |
| 355 | color: white; |
| 356 | background-color: #485D7B; |
| 357 | } |
| 358 | |
| 359 | .fileage tr:hover { |
| 360 | background-color: #7EA2D9; |
| 361 | } |
| 362 | |
| 363 | span.modpending { |
| 364 | color: #c0c0c0; |
| 365 | font-style: italic; |
| 366 |
+9
| --- skins/khaki/css.txt | ||
| +++ skins/khaki/css.txt | ||
| @@ -170,5 +170,14 @@ | ||
| 170 | 170 | border-width: 1pt; |
| 171 | 171 | border-radius: 0.25em; |
| 172 | 172 | border-style: solid; |
| 173 | 173 | padding: 0 0.5em; |
| 174 | 174 | } |
| 175 | + | |
| 176 | +tr.diffskip > td.chunkctrl .jcbutton { | |
| 177 | + color: white; | |
| 178 | + background-color: #a09048; | |
| 179 | +} | |
| 180 | + | |
| 181 | +tr.diffskip.jchunk { | |
| 182 | + background-color: #c0af58; | |
| 183 | +} | |
| 175 | 184 |
| --- skins/khaki/css.txt | |
| +++ skins/khaki/css.txt | |
| @@ -170,5 +170,14 @@ | |
| 170 | border-width: 1pt; |
| 171 | border-radius: 0.25em; |
| 172 | border-style: solid; |
| 173 | padding: 0 0.5em; |
| 174 | } |
| 175 |
| --- skins/khaki/css.txt | |
| +++ skins/khaki/css.txt | |
| @@ -170,5 +170,14 @@ | |
| 170 | border-width: 1pt; |
| 171 | border-radius: 0.25em; |
| 172 | border-style: solid; |
| 173 | padding: 0 0.5em; |
| 174 | } |
| 175 | |
| 176 | tr.diffskip > td.chunkctrl .jcbutton { |
| 177 | color: white; |
| 178 | background-color: #a09048; |
| 179 | } |
| 180 | |
| 181 | tr.diffskip.jchunk { |
| 182 | background-color: #c0af58; |
| 183 | } |
| 184 |
+7
-1
| --- skins/xekri/css.txt | ||
| +++ skins/xekri/css.txt | ||
| @@ -263,10 +263,17 @@ | ||
| 263 | 263 | |
| 264 | 264 | |
| 265 | 265 | /************************************** |
| 266 | 266 | * Diffs |
| 267 | 267 | */ |
| 268 | + | |
| 269 | +tr.diffskip.jchunk { | |
| 270 | + background-color: black; | |
| 271 | +} | |
| 272 | +tr.diffskip > td.chunkctrl .jcbutton { | |
| 273 | + background-color: #303536; | |
| 274 | +} | |
| 268 | 275 | |
| 269 | 276 | /* Code Added */ |
| 270 | 277 | td.diffln ins, |
| 271 | 278 | td.difftxt ins > ins { |
| 272 | 279 | background-color: #7f7; |
| @@ -293,11 +300,10 @@ | ||
| 293 | 300 | |
| 294 | 301 | /* display (column-based) */ |
| 295 | 302 | table.splitdiff { |
| 296 | 303 | border-spacing: 0; |
| 297 | 304 | font-size: 0.85rem; |
| 298 | - width: 90%; | |
| 299 | 305 | } |
| 300 | 306 | |
| 301 | 307 | table.splitdiff pre { |
| 302 | 308 | border: 0; |
| 303 | 309 | margin: 0 0.5em; |
| 304 | 310 |
| --- skins/xekri/css.txt | |
| +++ skins/xekri/css.txt | |
| @@ -263,10 +263,17 @@ | |
| 263 | |
| 264 | |
| 265 | /************************************** |
| 266 | * Diffs |
| 267 | */ |
| 268 | |
| 269 | /* Code Added */ |
| 270 | td.diffln ins, |
| 271 | td.difftxt ins > ins { |
| 272 | background-color: #7f7; |
| @@ -293,11 +300,10 @@ | |
| 293 | |
| 294 | /* display (column-based) */ |
| 295 | table.splitdiff { |
| 296 | border-spacing: 0; |
| 297 | font-size: 0.85rem; |
| 298 | width: 90%; |
| 299 | } |
| 300 | |
| 301 | table.splitdiff pre { |
| 302 | border: 0; |
| 303 | margin: 0 0.5em; |
| 304 |
| --- skins/xekri/css.txt | |
| +++ skins/xekri/css.txt | |
| @@ -263,10 +263,17 @@ | |
| 263 | |
| 264 | |
| 265 | /************************************** |
| 266 | * Diffs |
| 267 | */ |
| 268 | |
| 269 | tr.diffskip.jchunk { |
| 270 | background-color: black; |
| 271 | } |
| 272 | tr.diffskip > td.chunkctrl .jcbutton { |
| 273 | background-color: #303536; |
| 274 | } |
| 275 | |
| 276 | /* Code Added */ |
| 277 | td.diffln ins, |
| 278 | td.difftxt ins > ins { |
| 279 | background-color: #7f7; |
| @@ -293,11 +300,10 @@ | |
| 300 | |
| 301 | /* display (column-based) */ |
| 302 | table.splitdiff { |
| 303 | border-spacing: 0; |
| 304 | font-size: 0.85rem; |
| 305 | } |
| 306 | |
| 307 | table.splitdiff pre { |
| 308 | border: 0; |
| 309 | margin: 0 0.5em; |
| 310 |
+3
| --- src/builtin.c | ||
| +++ src/builtin.c | ||
| @@ -623,10 +623,12 @@ | ||
| 623 | 623 | CX("projectCode: %!j,\n", zName); |
| 624 | 624 | fossil_free(zName); |
| 625 | 625 | CX("/* Length of UUID hashes for display purposes. */"); |
| 626 | 626 | CX("hashDigits: %d, hashDigitsUrl: %d,\n", |
| 627 | 627 | hash_digits(0), hash_digits(1)); |
| 628 | + CX("diffContextLines: %d,\n", | |
| 629 | + diff_context_lines(0)); | |
| 628 | 630 | CX("editStateMarkers: {" |
| 629 | 631 | "/*Symbolic markers to denote certain edit states.*/" |
| 630 | 632 | "isNew:'[+]', isModified:'[*]', isDeleted:'[-]'},\n"); |
| 631 | 633 | CX("confirmerButtonTicks: 3 " |
| 632 | 634 | "/*default fossil.confirmer tick count.*/,\n"); |
| @@ -702,10 +704,11 @@ | ||
| 702 | 704 | ** the final one! */ |
| 703 | 705 | } fjs[] = { |
| 704 | 706 | /* This list ordering isn't strictly important. */ |
| 705 | 707 | {"confirmer", 0, 0}, |
| 706 | 708 | {"copybutton", 0, "dom\0"}, |
| 709 | + {"diff", 0, "dom\0fetch\0popupwidget\0"}, | |
| 707 | 710 | {"dom", 0, 0}, |
| 708 | 711 | {"fetch", 0, 0}, |
| 709 | 712 | {"info-diff", 0, "dom\0"}, |
| 710 | 713 | {"numbered-lines", 0, "popupwidget\0copybutton\0"}, |
| 711 | 714 | {"pikchr", 0, "dom\0"}, |
| 712 | 715 |
| --- src/builtin.c | |
| +++ src/builtin.c | |
| @@ -623,10 +623,12 @@ | |
| 623 | CX("projectCode: %!j,\n", zName); |
| 624 | fossil_free(zName); |
| 625 | CX("/* Length of UUID hashes for display purposes. */"); |
| 626 | CX("hashDigits: %d, hashDigitsUrl: %d,\n", |
| 627 | hash_digits(0), hash_digits(1)); |
| 628 | CX("editStateMarkers: {" |
| 629 | "/*Symbolic markers to denote certain edit states.*/" |
| 630 | "isNew:'[+]', isModified:'[*]', isDeleted:'[-]'},\n"); |
| 631 | CX("confirmerButtonTicks: 3 " |
| 632 | "/*default fossil.confirmer tick count.*/,\n"); |
| @@ -702,10 +704,11 @@ | |
| 702 | ** the final one! */ |
| 703 | } fjs[] = { |
| 704 | /* This list ordering isn't strictly important. */ |
| 705 | {"confirmer", 0, 0}, |
| 706 | {"copybutton", 0, "dom\0"}, |
| 707 | {"dom", 0, 0}, |
| 708 | {"fetch", 0, 0}, |
| 709 | {"info-diff", 0, "dom\0"}, |
| 710 | {"numbered-lines", 0, "popupwidget\0copybutton\0"}, |
| 711 | {"pikchr", 0, "dom\0"}, |
| 712 |
| --- src/builtin.c | |
| +++ src/builtin.c | |
| @@ -623,10 +623,12 @@ | |
| 623 | CX("projectCode: %!j,\n", zName); |
| 624 | fossil_free(zName); |
| 625 | CX("/* Length of UUID hashes for display purposes. */"); |
| 626 | CX("hashDigits: %d, hashDigitsUrl: %d,\n", |
| 627 | hash_digits(0), hash_digits(1)); |
| 628 | CX("diffContextLines: %d,\n", |
| 629 | diff_context_lines(0)); |
| 630 | CX("editStateMarkers: {" |
| 631 | "/*Symbolic markers to denote certain edit states.*/" |
| 632 | "isNew:'[+]', isModified:'[*]', isDeleted:'[-]'},\n"); |
| 633 | CX("confirmerButtonTicks: 3 " |
| 634 | "/*default fossil.confirmer tick count.*/,\n"); |
| @@ -702,10 +704,11 @@ | |
| 704 | ** the final one! */ |
| 705 | } fjs[] = { |
| 706 | /* This list ordering isn't strictly important. */ |
| 707 | {"confirmer", 0, 0}, |
| 708 | {"copybutton", 0, "dom\0"}, |
| 709 | {"diff", 0, "dom\0fetch\0popupwidget\0"}, |
| 710 | {"dom", 0, 0}, |
| 711 | {"fetch", 0, 0}, |
| 712 | {"info-diff", 0, "dom\0"}, |
| 713 | {"numbered-lines", 0, "popupwidget\0copybutton\0"}, |
| 714 | {"pikchr", 0, "dom\0"}, |
| 715 |
+83
-3
| --- src/default.css | ||
| +++ src/default.css | ||
| @@ -532,20 +532,100 @@ | ||
| 532 | 532 | padding-top: 1px; |
| 533 | 533 | } |
| 534 | 534 | |
| 535 | 535 | /* Rules governing diff layout and colors */ |
| 536 | 536 | table.diff { |
| 537 | - width: 98%; | |
| 537 | + width: 100%; | |
| 538 | 538 | border-spacing: 0; |
| 539 | 539 | border: 1px solid black; |
| 540 | - padding: 0 0.5em; | |
| 540 | +} | |
| 541 | +table.diff td.diffln{ | |
| 542 | + padding: 0; | |
| 543 | +} | |
| 544 | +table.diff td.diffln > pre{ | |
| 545 | + padding: 0 0.25em 0 0.5em; | |
| 546 | + margin: 0; | |
| 541 | 547 | } |
| 542 | 548 | table.diff td { |
| 543 | 549 | vertical-align: top; |
| 550 | + padding: 0; | |
| 551 | + overflow: hidden /*work around inner PRE slight overflow/overlap*/; | |
| 544 | 552 | } |
| 545 | 553 | table.diff pre { |
| 546 | 554 | margin: 0 0 0 0; |
| 555 | + padding: 0 0.5em; | |
| 556 | +} | |
| 557 | +table.diff td.diffln > pre { | |
| 558 | + padding: 0 0.35em 0 0.5em; | |
| 559 | +} | |
| 560 | +table.diff td.difftxt > pre { | |
| 561 | + min-width: 100%; | |
| 562 | + max-width: 100%; | |
| 563 | +} | |
| 564 | +tr.diffskip.jchunk { | |
| 565 | + /* jchunk gets added from JS to diffskip rows when they are | |
| 566 | + plugged into the /jchunk route. */ | |
| 567 | + background-color: aliceblue; | |
| 568 | + padding: 0; | |
| 569 | +} | |
| 570 | +tr.diffskip.jchunk > td { | |
| 571 | + padding: 0.25em 0.5em; | |
| 572 | + margin: 0; | |
| 573 | +} | |
| 574 | +tr.diffskip.jchunk:hover { | |
| 575 | + /*background-color: rgba(127,127,127,0.5); | |
| 576 | + cursor: pointer;*/ | |
| 577 | +} | |
| 578 | +tr.diffskip > td.chunkctrl { | |
| 579 | + text-align: left; | |
| 580 | + font-family: monospace; | |
| 581 | +} | |
| 582 | +tr.diffskip > td.chunkctrl > div { | |
| 583 | + /* Exists solely for layout purposes. */ | |
| 584 | +} | |
| 585 | +tr.diffskip > td.chunkctrl .jcbutton | |
| 586 | +/* class name .button breaks w/ some skins! */ { | |
| 587 | + min-width: 3.5ex; | |
| 588 | + max-width: 3.5ex; | |
| 589 | + text-align: center; | |
| 590 | + display: inline-block; | |
| 591 | + padding: 0.1em 1em; | |
| 592 | + margin: 0 1em 0 0; | |
| 593 | + background-color: rgba(127,127,127,0.2); | |
| 594 | + border-style: outset; | |
| 595 | + border-width: 0; | |
| 596 | + border-radius: 0.5em; | |
| 597 | + opacity: 0.7; | |
| 598 | +} | |
| 599 | +tr.diffskip > td.chunkctrl .jcbutton.up:not(.down){ | |
| 600 | + /* Simulate an arrow pointing up */ | |
| 601 | + border-radius: 3em 3em 0.25em 0.25em; | |
| 602 | +} | |
| 603 | +tr.diffskip > td.chunkctrl .jcbutton.down:not(.up){ | |
| 604 | + /* Simulate an arrow pointing down */ | |
| 605 | + border-radius: 0.25em 0.25em 3em 3em; | |
| 606 | +} | |
| 607 | +tr.diffskip > td.chunkctrl .jcbutton > span { | |
| 608 | + /* In order to increase the glyph size w/o increasing the em-based | |
| 609 | + button size or border-radius, we need an extra layer of DOM | |
| 610 | + element for the glyph. */ | |
| 611 | + font-size: 150%; | |
| 612 | +} | |
| 613 | +tr.diffskip > td.chunkctrl .jcbutton.up:not(.down) > span::before { | |
| 614 | + content: '⇡'; | |
| 615 | +} | |
| 616 | +tr.diffskip > td.chunkctrl .jcbutton.down:not(.up) > span::before { | |
| 617 | + content: '⇣'; | |
| 618 | +} | |
| 619 | +tr.diffskip > td.chunkctrl .jcbutton.up.down > span::before { | |
| 620 | + content: '⇡⇣'; | |
| 621 | +} | |
| 622 | + | |
| 623 | +tr.diffskip > td.chunkctrl .jcbutton:hover { | |
| 624 | + cursor: pointer; | |
| 625 | + opacity: 1; | |
| 626 | + filter: contrast(1); | |
| 547 | 627 | } |
| 548 | 628 | td.diffln { |
| 549 | 629 | width: 1px; |
| 550 | 630 | text-align: right; |
| 551 | 631 | padding: 0 1em 0 0; |
| @@ -553,11 +633,11 @@ | ||
| 553 | 633 | td.difflne { |
| 554 | 634 | padding-bottom: 0.4em; |
| 555 | 635 | } |
| 556 | 636 | td.diffsep { |
| 557 | 637 | width: 1px; |
| 558 | - padding: 0 0.3em 0 1em; | |
| 638 | + padding: 0 0.3em 0 0.5em; | |
| 559 | 639 | } |
| 560 | 640 | td.difftxt pre { |
| 561 | 641 | overflow-x: auto; |
| 562 | 642 | } |
| 563 | 643 | td.diffln ins { |
| 564 | 644 |
| --- src/default.css | |
| +++ src/default.css | |
| @@ -532,20 +532,100 @@ | |
| 532 | padding-top: 1px; |
| 533 | } |
| 534 | |
| 535 | /* Rules governing diff layout and colors */ |
| 536 | table.diff { |
| 537 | width: 98%; |
| 538 | border-spacing: 0; |
| 539 | border: 1px solid black; |
| 540 | padding: 0 0.5em; |
| 541 | } |
| 542 | table.diff td { |
| 543 | vertical-align: top; |
| 544 | } |
| 545 | table.diff pre { |
| 546 | margin: 0 0 0 0; |
| 547 | } |
| 548 | td.diffln { |
| 549 | width: 1px; |
| 550 | text-align: right; |
| 551 | padding: 0 1em 0 0; |
| @@ -553,11 +633,11 @@ | |
| 553 | td.difflne { |
| 554 | padding-bottom: 0.4em; |
| 555 | } |
| 556 | td.diffsep { |
| 557 | width: 1px; |
| 558 | padding: 0 0.3em 0 1em; |
| 559 | } |
| 560 | td.difftxt pre { |
| 561 | overflow-x: auto; |
| 562 | } |
| 563 | td.diffln ins { |
| 564 |
| --- src/default.css | |
| +++ src/default.css | |
| @@ -532,20 +532,100 @@ | |
| 532 | padding-top: 1px; |
| 533 | } |
| 534 | |
| 535 | /* Rules governing diff layout and colors */ |
| 536 | table.diff { |
| 537 | width: 100%; |
| 538 | border-spacing: 0; |
| 539 | border: 1px solid black; |
| 540 | } |
| 541 | table.diff td.diffln{ |
| 542 | padding: 0; |
| 543 | } |
| 544 | table.diff td.diffln > pre{ |
| 545 | padding: 0 0.25em 0 0.5em; |
| 546 | margin: 0; |
| 547 | } |
| 548 | table.diff td { |
| 549 | vertical-align: top; |
| 550 | padding: 0; |
| 551 | overflow: hidden /*work around inner PRE slight overflow/overlap*/; |
| 552 | } |
| 553 | table.diff pre { |
| 554 | margin: 0 0 0 0; |
| 555 | padding: 0 0.5em; |
| 556 | } |
| 557 | table.diff td.diffln > pre { |
| 558 | padding: 0 0.35em 0 0.5em; |
| 559 | } |
| 560 | table.diff td.difftxt > pre { |
| 561 | min-width: 100%; |
| 562 | max-width: 100%; |
| 563 | } |
| 564 | tr.diffskip.jchunk { |
| 565 | /* jchunk gets added from JS to diffskip rows when they are |
| 566 | plugged into the /jchunk route. */ |
| 567 | background-color: aliceblue; |
| 568 | padding: 0; |
| 569 | } |
| 570 | tr.diffskip.jchunk > td { |
| 571 | padding: 0.25em 0.5em; |
| 572 | margin: 0; |
| 573 | } |
| 574 | tr.diffskip.jchunk:hover { |
| 575 | /*background-color: rgba(127,127,127,0.5); |
| 576 | cursor: pointer;*/ |
| 577 | } |
| 578 | tr.diffskip > td.chunkctrl { |
| 579 | text-align: left; |
| 580 | font-family: monospace; |
| 581 | } |
| 582 | tr.diffskip > td.chunkctrl > div { |
| 583 | /* Exists solely for layout purposes. */ |
| 584 | } |
| 585 | tr.diffskip > td.chunkctrl .jcbutton |
| 586 | /* class name .button breaks w/ some skins! */ { |
| 587 | min-width: 3.5ex; |
| 588 | max-width: 3.5ex; |
| 589 | text-align: center; |
| 590 | display: inline-block; |
| 591 | padding: 0.1em 1em; |
| 592 | margin: 0 1em 0 0; |
| 593 | background-color: rgba(127,127,127,0.2); |
| 594 | border-style: outset; |
| 595 | border-width: 0; |
| 596 | border-radius: 0.5em; |
| 597 | opacity: 0.7; |
| 598 | } |
| 599 | tr.diffskip > td.chunkctrl .jcbutton.up:not(.down){ |
| 600 | /* Simulate an arrow pointing up */ |
| 601 | border-radius: 3em 3em 0.25em 0.25em; |
| 602 | } |
| 603 | tr.diffskip > td.chunkctrl .jcbutton.down:not(.up){ |
| 604 | /* Simulate an arrow pointing down */ |
| 605 | border-radius: 0.25em 0.25em 3em 3em; |
| 606 | } |
| 607 | tr.diffskip > td.chunkctrl .jcbutton > span { |
| 608 | /* In order to increase the glyph size w/o increasing the em-based |
| 609 | button size or border-radius, we need an extra layer of DOM |
| 610 | element for the glyph. */ |
| 611 | font-size: 150%; |
| 612 | } |
| 613 | tr.diffskip > td.chunkctrl .jcbutton.up:not(.down) > span::before { |
| 614 | content: '⇡'; |
| 615 | } |
| 616 | tr.diffskip > td.chunkctrl .jcbutton.down:not(.up) > span::before { |
| 617 | content: '⇣'; |
| 618 | } |
| 619 | tr.diffskip > td.chunkctrl .jcbutton.up.down > span::before { |
| 620 | content: '⇡⇣'; |
| 621 | } |
| 622 | |
| 623 | tr.diffskip > td.chunkctrl .jcbutton:hover { |
| 624 | cursor: pointer; |
| 625 | opacity: 1; |
| 626 | filter: contrast(1); |
| 627 | } |
| 628 | td.diffln { |
| 629 | width: 1px; |
| 630 | text-align: right; |
| 631 | padding: 0 1em 0 0; |
| @@ -553,11 +633,11 @@ | |
| 633 | td.difflne { |
| 634 | padding-bottom: 0.4em; |
| 635 | } |
| 636 | td.diffsep { |
| 637 | width: 1px; |
| 638 | padding: 0 0.3em 0 0.5em; |
| 639 | } |
| 640 | td.difftxt pre { |
| 641 | overflow-x: auto; |
| 642 | } |
| 643 | td.diffln ins { |
| 644 |
+11
-4
| --- src/diff.c | ||
| +++ src/diff.c | ||
| @@ -2596,16 +2596,23 @@ | ||
| 2596 | 2596 | } |
| 2597 | 2597 | } |
| 2598 | 2598 | |
| 2599 | 2599 | /* |
| 2600 | 2600 | ** Extract the number of lines of context from diffFlags. Supply an |
| 2601 | -** appropriate default if no context width is specified. | |
| 2601 | +** appropriate default if no context width is specified. If pCfg is | |
| 2602 | +** NULL then the compile-time default is used (which gets propagated | |
| 2603 | +** to JS-side state by certain pages). | |
| 2602 | 2604 | */ |
| 2603 | 2605 | int diff_context_lines(DiffConfig *pCfg){ |
| 2604 | - int n = pCfg->nContext; | |
| 2605 | - if( n<=0 && (pCfg->diffFlags & DIFF_CONTEXT_EX)==0 ) n = 5; | |
| 2606 | - return n; | |
| 2606 | + const int dflt = 5; | |
| 2607 | + if(pCfg!=0){ | |
| 2608 | + int n = pCfg->nContext; | |
| 2609 | + if( n<=0 && (pCfg->diffFlags & DIFF_CONTEXT_EX)==0 ) n = dflt; | |
| 2610 | + return n; | |
| 2611 | + }else{ | |
| 2612 | + return dflt; | |
| 2613 | + } | |
| 2607 | 2614 | } |
| 2608 | 2615 | |
| 2609 | 2616 | /* |
| 2610 | 2617 | ** Extract the width of columns for side-by-side diff. Supply an |
| 2611 | 2618 | ** appropriate default if no width is given. |
| 2612 | 2619 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -2596,16 +2596,23 @@ | |
| 2596 | } |
| 2597 | } |
| 2598 | |
| 2599 | /* |
| 2600 | ** Extract the number of lines of context from diffFlags. Supply an |
| 2601 | ** appropriate default if no context width is specified. |
| 2602 | */ |
| 2603 | int diff_context_lines(DiffConfig *pCfg){ |
| 2604 | int n = pCfg->nContext; |
| 2605 | if( n<=0 && (pCfg->diffFlags & DIFF_CONTEXT_EX)==0 ) n = 5; |
| 2606 | return n; |
| 2607 | } |
| 2608 | |
| 2609 | /* |
| 2610 | ** Extract the width of columns for side-by-side diff. Supply an |
| 2611 | ** appropriate default if no width is given. |
| 2612 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -2596,16 +2596,23 @@ | |
| 2596 | } |
| 2597 | } |
| 2598 | |
| 2599 | /* |
| 2600 | ** Extract the number of lines of context from diffFlags. Supply an |
| 2601 | ** appropriate default if no context width is specified. If pCfg is |
| 2602 | ** NULL then the compile-time default is used (which gets propagated |
| 2603 | ** to JS-side state by certain pages). |
| 2604 | */ |
| 2605 | int diff_context_lines(DiffConfig *pCfg){ |
| 2606 | const int dflt = 5; |
| 2607 | if(pCfg!=0){ |
| 2608 | int n = pCfg->nContext; |
| 2609 | if( n<=0 && (pCfg->diffFlags & DIFF_CONTEXT_EX)==0 ) n = dflt; |
| 2610 | return n; |
| 2611 | }else{ |
| 2612 | return dflt; |
| 2613 | } |
| 2614 | } |
| 2615 | |
| 2616 | /* |
| 2617 | ** Extract the width of columns for side-by-side diff. Supply an |
| 2618 | ** appropriate default if no width is given. |
| 2619 |
+35
-31
| --- src/diff.js | ||
| +++ src/diff.js | ||
| @@ -5,17 +5,19 @@ | ||
| 5 | 5 | ** |
| 6 | 6 | ** For a side-by-side diff, if either column is two wide to fit on the |
| 7 | 7 | ** display, scrollbars are added. The scrollbars are linked, so that |
| 8 | 8 | ** both sides scroll together. Left and right arrows also scroll. |
| 9 | 9 | */ |
| 10 | -(function(){ | |
| 10 | +window.addEventListener('load',function(){ | |
| 11 | 11 | var SCROLL_LEN = 25; |
| 12 | 12 | function initDiff(diff){ |
| 13 | 13 | var txtCols = diff.querySelectorAll('td.difftxt'); |
| 14 | 14 | var txtPres = diff.querySelectorAll('td.difftxt pre'); |
| 15 | 15 | var width = 0; |
| 16 | - if(txtPres.length>=2)Math.max(txtPres[0].scrollWidth, txtPres[1].scrollWidth); | |
| 16 | + if(txtPres.length>=2){ | |
| 17 | + width = Math.max(txtPres[0].scrollWidth, txtPres[1].scrollWidth); | |
| 18 | + } | |
| 17 | 19 | var i; |
| 18 | 20 | for(i=0; i<txtCols.length; i++){ |
| 19 | 21 | txtCols[i].style.width = width + 'px'; |
| 20 | 22 | txtPres[i].style.maxWidth = width + 'px'; |
| 21 | 23 | txtPres[i].style.width = width + 'px'; |
| @@ -34,36 +36,38 @@ | ||
| 34 | 36 | } |
| 35 | 37 | var i, diffs = document.querySelectorAll('table.splitdiff') |
| 36 | 38 | for(i=0; i<diffs.length; i++){ |
| 37 | 39 | initDiff(diffs[i]); |
| 38 | 40 | } |
| 39 | - if(window.fossil && fossil.page){ | |
| 40 | - fossil.page.tweakSbsDiffs = function(){ | |
| 41 | - document.querySelectorAll('table.splitdiff').forEach(initDiff); | |
| 42 | - }; | |
| 43 | - } | |
| 44 | - var lastWidth = 0; | |
| 45 | - function checkWidth(){ | |
| 46 | - if( document.body.clientWidth!=lastWidth ){ | |
| 47 | - lastWidth = document.body.clientWidth; | |
| 48 | - var w = lastWidth*0.5 - 100; | |
| 49 | - var allCols = document.querySelectorAll('td.difftxtl pre'); | |
| 50 | - for(let i=0; i<allCols.length; i++){ | |
| 51 | - allCols[i].style.width = w + "px"; | |
| 52 | - allCols[i].style.maxWidth = w + "px"; | |
| 53 | - } | |
| 54 | - allCols = document.querySelectorAll('td.difftxtr pre'); | |
| 55 | - for(let i=0; i<allCols.length; i++){ | |
| 56 | - allCols[i].style.width = w + "px"; | |
| 57 | - allCols[i].style.maxWidth = w + "px"; | |
| 58 | - } | |
| 59 | - var allDiffs = document.querySelectorAll('table.diff'); | |
| 60 | - w = lastWidth; | |
| 61 | - for(let i=0; i<allDiffs.length; i++){ | |
| 62 | - allDiffs[i].style.width = '100%'; // setting to w causes unsightly horiz. scrollbar | |
| 63 | - allDiffs[i].style.maxWidth = w + "px"; | |
| 64 | - } | |
| 65 | - } | |
| 66 | - } | |
| 41 | + const checkWidth = function f(){ | |
| 42 | + if(undefined === f.lastWidth){ | |
| 43 | + f.lastWidth = 0; | |
| 44 | + } | |
| 45 | + if( document.body.clientWidth===f.lastWidth ) return; | |
| 46 | + f.lastWidth = document.body.clientWidth; | |
| 47 | + var w = f.lastWidth*0.5 - 100; | |
| 48 | + if(!f.colsL){ | |
| 49 | + f.colsL = document.querySelectorAll('td.difftxtl pre'); | |
| 50 | + } | |
| 51 | + for(let i=0; i<f.colsL.length; i++){ | |
| 52 | + f.colsL[i].style.width = w + "px"; | |
| 53 | + f.colsL[i].style.maxWidth = w + "px"; | |
| 54 | + } | |
| 55 | + if(!f.colsR){ | |
| 56 | + f.colsR = document.querySelectorAll('td.difftxtr pre'); | |
| 57 | + } | |
| 58 | + for(let i=0; i<f.colsR.length; i++){ | |
| 59 | + f.colsR[i].style.width = w + "px"; | |
| 60 | + f.colsR[i].style.maxWidth = w + "px"; | |
| 61 | + } | |
| 62 | + if(!f.allDiffs){ | |
| 63 | + f.allDiffs = document.querySelectorAll('table.diff'); | |
| 64 | + } | |
| 65 | + w = f.lastWidth; | |
| 66 | + for(let i=0; i<f.allDiffs.length; i++){ | |
| 67 | + f.allDiffs[i].style.width = '100%'; // setting to w causes unsightly horiz. scrollbar | |
| 68 | + f.allDiffs[i].style.maxWidth = w + "px"; | |
| 69 | + } | |
| 70 | + }; | |
| 67 | 71 | checkWidth(); |
| 68 | 72 | window.addEventListener('resize', checkWidth); |
| 69 | -})(); | |
| 73 | +}, false); | |
| 70 | 74 |
| --- src/diff.js | |
| +++ src/diff.js | |
| @@ -5,17 +5,19 @@ | |
| 5 | ** |
| 6 | ** For a side-by-side diff, if either column is two wide to fit on the |
| 7 | ** display, scrollbars are added. The scrollbars are linked, so that |
| 8 | ** both sides scroll together. Left and right arrows also scroll. |
| 9 | */ |
| 10 | (function(){ |
| 11 | var SCROLL_LEN = 25; |
| 12 | function initDiff(diff){ |
| 13 | var txtCols = diff.querySelectorAll('td.difftxt'); |
| 14 | var txtPres = diff.querySelectorAll('td.difftxt pre'); |
| 15 | var width = 0; |
| 16 | if(txtPres.length>=2)Math.max(txtPres[0].scrollWidth, txtPres[1].scrollWidth); |
| 17 | var i; |
| 18 | for(i=0; i<txtCols.length; i++){ |
| 19 | txtCols[i].style.width = width + 'px'; |
| 20 | txtPres[i].style.maxWidth = width + 'px'; |
| 21 | txtPres[i].style.width = width + 'px'; |
| @@ -34,36 +36,38 @@ | |
| 34 | } |
| 35 | var i, diffs = document.querySelectorAll('table.splitdiff') |
| 36 | for(i=0; i<diffs.length; i++){ |
| 37 | initDiff(diffs[i]); |
| 38 | } |
| 39 | if(window.fossil && fossil.page){ |
| 40 | fossil.page.tweakSbsDiffs = function(){ |
| 41 | document.querySelectorAll('table.splitdiff').forEach(initDiff); |
| 42 | }; |
| 43 | } |
| 44 | var lastWidth = 0; |
| 45 | function checkWidth(){ |
| 46 | if( document.body.clientWidth!=lastWidth ){ |
| 47 | lastWidth = document.body.clientWidth; |
| 48 | var w = lastWidth*0.5 - 100; |
| 49 | var allCols = document.querySelectorAll('td.difftxtl pre'); |
| 50 | for(let i=0; i<allCols.length; i++){ |
| 51 | allCols[i].style.width = w + "px"; |
| 52 | allCols[i].style.maxWidth = w + "px"; |
| 53 | } |
| 54 | allCols = document.querySelectorAll('td.difftxtr pre'); |
| 55 | for(let i=0; i<allCols.length; i++){ |
| 56 | allCols[i].style.width = w + "px"; |
| 57 | allCols[i].style.maxWidth = w + "px"; |
| 58 | } |
| 59 | var allDiffs = document.querySelectorAll('table.diff'); |
| 60 | w = lastWidth; |
| 61 | for(let i=0; i<allDiffs.length; i++){ |
| 62 | allDiffs[i].style.width = '100%'; // setting to w causes unsightly horiz. scrollbar |
| 63 | allDiffs[i].style.maxWidth = w + "px"; |
| 64 | } |
| 65 | } |
| 66 | } |
| 67 | checkWidth(); |
| 68 | window.addEventListener('resize', checkWidth); |
| 69 | })(); |
| 70 |
| --- src/diff.js | |
| +++ src/diff.js | |
| @@ -5,17 +5,19 @@ | |
| 5 | ** |
| 6 | ** For a side-by-side diff, if either column is two wide to fit on the |
| 7 | ** display, scrollbars are added. The scrollbars are linked, so that |
| 8 | ** both sides scroll together. Left and right arrows also scroll. |
| 9 | */ |
| 10 | window.addEventListener('load',function(){ |
| 11 | var SCROLL_LEN = 25; |
| 12 | function initDiff(diff){ |
| 13 | var txtCols = diff.querySelectorAll('td.difftxt'); |
| 14 | var txtPres = diff.querySelectorAll('td.difftxt pre'); |
| 15 | var width = 0; |
| 16 | if(txtPres.length>=2){ |
| 17 | width = Math.max(txtPres[0].scrollWidth, txtPres[1].scrollWidth); |
| 18 | } |
| 19 | var i; |
| 20 | for(i=0; i<txtCols.length; i++){ |
| 21 | txtCols[i].style.width = width + 'px'; |
| 22 | txtPres[i].style.maxWidth = width + 'px'; |
| 23 | txtPres[i].style.width = width + 'px'; |
| @@ -34,36 +36,38 @@ | |
| 36 | } |
| 37 | var i, diffs = document.querySelectorAll('table.splitdiff') |
| 38 | for(i=0; i<diffs.length; i++){ |
| 39 | initDiff(diffs[i]); |
| 40 | } |
| 41 | const checkWidth = function f(){ |
| 42 | if(undefined === f.lastWidth){ |
| 43 | f.lastWidth = 0; |
| 44 | } |
| 45 | if( document.body.clientWidth===f.lastWidth ) return; |
| 46 | f.lastWidth = document.body.clientWidth; |
| 47 | var w = f.lastWidth*0.5 - 100; |
| 48 | if(!f.colsL){ |
| 49 | f.colsL = document.querySelectorAll('td.difftxtl pre'); |
| 50 | } |
| 51 | for(let i=0; i<f.colsL.length; i++){ |
| 52 | f.colsL[i].style.width = w + "px"; |
| 53 | f.colsL[i].style.maxWidth = w + "px"; |
| 54 | } |
| 55 | if(!f.colsR){ |
| 56 | f.colsR = document.querySelectorAll('td.difftxtr pre'); |
| 57 | } |
| 58 | for(let i=0; i<f.colsR.length; i++){ |
| 59 | f.colsR[i].style.width = w + "px"; |
| 60 | f.colsR[i].style.maxWidth = w + "px"; |
| 61 | } |
| 62 | if(!f.allDiffs){ |
| 63 | f.allDiffs = document.querySelectorAll('table.diff'); |
| 64 | } |
| 65 | w = f.lastWidth; |
| 66 | for(let i=0; i<f.allDiffs.length; i++){ |
| 67 | f.allDiffs[i].style.width = '100%'; // setting to w causes unsightly horiz. scrollbar |
| 68 | f.allDiffs[i].style.maxWidth = w + "px"; |
| 69 | } |
| 70 | }; |
| 71 | checkWidth(); |
| 72 | window.addEventListener('resize', checkWidth); |
| 73 | }, false); |
| 74 |
+1
-1
| --- src/diffcmd.c | ||
| +++ src/diffcmd.c | ||
| @@ -198,11 +198,11 @@ | ||
| 198 | 198 | @ h1 { |
| 199 | 199 | @ font-size: 150%; |
| 200 | 200 | @ } |
| 201 | 201 | @ |
| 202 | 202 | @ table.diff { |
| 203 | -@ width: 98%; | |
| 203 | +@ width: 100%; | |
| 204 | 204 | @ border-spacing: 0; |
| 205 | 205 | @ border: 1px solid black; |
| 206 | 206 | @ } |
| 207 | 207 | @ table.diff td { |
| 208 | 208 | @ vertical-align: top; |
| 209 | 209 |
| --- src/diffcmd.c | |
| +++ src/diffcmd.c | |
| @@ -198,11 +198,11 @@ | |
| 198 | @ h1 { |
| 199 | @ font-size: 150%; |
| 200 | @ } |
| 201 | @ |
| 202 | @ table.diff { |
| 203 | @ width: 98%; |
| 204 | @ border-spacing: 0; |
| 205 | @ border: 1px solid black; |
| 206 | @ } |
| 207 | @ table.diff td { |
| 208 | @ vertical-align: top; |
| 209 |
| --- src/diffcmd.c | |
| +++ src/diffcmd.c | |
| @@ -198,11 +198,11 @@ | |
| 198 | @ h1 { |
| 199 | @ font-size: 150%; |
| 200 | @ } |
| 201 | @ |
| 202 | @ table.diff { |
| 203 | @ width: 100%; |
| 204 | @ border-spacing: 0; |
| 205 | @ border: 1px solid black; |
| 206 | @ } |
| 207 | @ table.diff td { |
| 208 | @ vertical-align: top; |
| 209 |
+1
-1
| --- src/fileedit.c | ||
| +++ src/fileedit.c | ||
| @@ -1999,11 +1999,11 @@ | ||
| 1999 | 1999 | ** fossil.page.fileedit.js. Potential TODO: move this into the |
| 2000 | 2000 | ** window.fossil bootstrapping so that we don't have to "fulfill" |
| 2001 | 2001 | ** the JS multiple times. |
| 2002 | 2002 | */ |
| 2003 | 2003 | ajax_emit_js_preview_modes(1); |
| 2004 | - builtin_request_js("diff.js"); | |
| 2004 | + builtin_fossil_js_bundle_or("diff", NULL); | |
| 2005 | 2005 | builtin_request_js("fossil.page.fileedit.js"); |
| 2006 | 2006 | builtin_fulfill_js_requests(); |
| 2007 | 2007 | { |
| 2008 | 2008 | /* Dynamically populate the editor, display any error in the err |
| 2009 | 2009 | ** blob, and/or switch to tab #0, where the file selector |
| 2010 | 2010 | |
| 2011 | 2011 | ADDED src/fossil.diff.js |
| --- src/fileedit.c | |
| +++ src/fileedit.c | |
| @@ -1999,11 +1999,11 @@ | |
| 1999 | ** fossil.page.fileedit.js. Potential TODO: move this into the |
| 2000 | ** window.fossil bootstrapping so that we don't have to "fulfill" |
| 2001 | ** the JS multiple times. |
| 2002 | */ |
| 2003 | ajax_emit_js_preview_modes(1); |
| 2004 | builtin_request_js("diff.js"); |
| 2005 | builtin_request_js("fossil.page.fileedit.js"); |
| 2006 | builtin_fulfill_js_requests(); |
| 2007 | { |
| 2008 | /* Dynamically populate the editor, display any error in the err |
| 2009 | ** blob, and/or switch to tab #0, where the file selector |
| 2010 | |
| 2011 | DDED src/fossil.diff.js |
| --- src/fileedit.c | |
| +++ src/fileedit.c | |
| @@ -1999,11 +1999,11 @@ | |
| 1999 | ** fossil.page.fileedit.js. Potential TODO: move this into the |
| 2000 | ** window.fossil bootstrapping so that we don't have to "fulfill" |
| 2001 | ** the JS multiple times. |
| 2002 | */ |
| 2003 | ajax_emit_js_preview_modes(1); |
| 2004 | builtin_fossil_js_bundle_or("diff", NULL); |
| 2005 | builtin_request_js("fossil.page.fileedit.js"); |
| 2006 | builtin_fulfill_js_requests(); |
| 2007 | { |
| 2008 | /* Dynamically populate the editor, display any error in the err |
| 2009 | ** blob, and/or switch to tab #0, where the file selector |
| 2010 | |
| 2011 | DDED src/fossil.diff.js |
+5
-8
| --- a/src/fossil.diff.js | ||
| +++ b/src/fossil.diff.js | ||
| @@ -1,8 +1,5 @@ | ||
| 1 | -/** | |
| 2 | -.colsR){ | |
| 3 | - } | |
| 4 | - } | |
| 5 | - } | |
| 6 | - ; | |
| 7 | - width = '100%'; // setting to w caes unsightly horiz. scrol(D.tr(),'fe!=f.lastWidth ){ | |
| 8 | - | |
| 1 | +(this.pos.startLhs + | |
| 2 | + .replLoadLines | |
| 3 | + >= thnext | |
| 4 | + <) | |
| 5 | + .replLoadLines) { |
| --- a/src/fossil.diff.js | |
| +++ b/src/fossil.diff.js | |
| @@ -1,8 +1,5 @@ | |
| 1 | /** |
| 2 | .colsR){ |
| 3 | } |
| 4 | } |
| 5 | } |
| 6 | ; |
| 7 | width = '100%'; // setting to w caes unsightly horiz. scrol(D.tr(),'fe!=f.lastWidth ){ |
| 8 |
| --- a/src/fossil.diff.js | |
| +++ b/src/fossil.diff.js | |
| @@ -1,8 +1,5 @@ | |
| 1 | (this.pos.startLhs + |
| 2 | .replLoadLines |
| 3 | >= thnext |
| 4 | <) |
| 5 | .replLoadLines) { |
+5
| --- a/src/fossil.diff.js | ||
| +++ b/src/fossil.diff.js | ||
| @@ -0,0 +1,5 @@ | ||
| 1 | +(this.pos.startLhs + | |
| 2 | + .replLoadLines | |
| 3 | + >= thnext | |
| 4 | + <) | |
| 5 | + .replLoadLines) { |
| --- a/src/fossil.diff.js | |
| +++ b/src/fossil.diff.js | |
| @@ -0,0 +1,5 @@ | |
| --- a/src/fossil.diff.js | |
| +++ b/src/fossil.diff.js | |
| @@ -0,0 +1,5 @@ | |
| 1 | (this.pos.startLhs + |
| 2 | .replLoadLines |
| 3 | >= thnext |
| 4 | <) |
| 5 | .replLoadLines) { |
+1
-1
| --- src/fossil.dom.js | ||
| +++ src/fossil.dom.js | ||
| @@ -431,11 +431,11 @@ | ||
| 431 | 431 | return domAddRemoveClass.apply(this, a); |
| 432 | 432 | }; |
| 433 | 433 | |
| 434 | 434 | /** |
| 435 | 435 | Toggles CSS class c on e (a single element for forEach-capable |
| 436 | - collection of elements. Returns its first argument. | |
| 436 | + collection of elements). Returns its first argument. | |
| 437 | 437 | */ |
| 438 | 438 | dom.toggleClass = function f(e,c){ |
| 439 | 439 | if(e.forEach){ |
| 440 | 440 | e.forEach((x)=>x.classList.toggle(c)); |
| 441 | 441 | }else{ |
| 442 | 442 | |
| 443 | 443 | DELETED src/fossil.info-diff.js |
| --- src/fossil.dom.js | |
| +++ src/fossil.dom.js | |
| @@ -431,11 +431,11 @@ | |
| 431 | return domAddRemoveClass.apply(this, a); |
| 432 | }; |
| 433 | |
| 434 | /** |
| 435 | Toggles CSS class c on e (a single element for forEach-capable |
| 436 | collection of elements. Returns its first argument. |
| 437 | */ |
| 438 | dom.toggleClass = function f(e,c){ |
| 439 | if(e.forEach){ |
| 440 | e.forEach((x)=>x.classList.toggle(c)); |
| 441 | }else{ |
| 442 | |
| 443 | ELETED src/fossil.info-diff.js |
| --- src/fossil.dom.js | |
| +++ src/fossil.dom.js | |
| @@ -431,11 +431,11 @@ | |
| 431 | return domAddRemoveClass.apply(this, a); |
| 432 | }; |
| 433 | |
| 434 | /** |
| 435 | Toggles CSS class c on e (a single element for forEach-capable |
| 436 | collection of elements). Returns its first argument. |
| 437 | */ |
| 438 | dom.toggleClass = function f(e,c){ |
| 439 | if(e.forEach){ |
| 440 | e.forEach((x)=>x.classList.toggle(c)); |
| 441 | }else{ |
| 442 | |
| 443 | ELETED src/fossil.info-diff.js |
D
src/fossil.info-diff.js
-8
| --- a/src/fossil.info-diff.js | ||
| +++ b/src/fossil.info-diff.js | ||
| @@ -1,8 +0,0 @@ | ||
| 1 | -/** | |
| 2 | -.colsR){ | |
| 3 | - } | |
| 4 | - } | |
| 5 | - } | |
| 6 | - ; | |
| 7 | - width = '100%'; // setting to w caes unsightly horiz. scrol(D.tr(),'fe!=f.lastWidth ){ | |
| 8 | - |
| --- a/src/fossil.info-diff.js | |
| +++ b/src/fossil.info-diff.js | |
| @@ -1,8 +0,0 @@ | |
| 1 | /** |
| 2 | .colsR){ |
| 3 | } |
| 4 | } |
| 5 | } |
| 6 | ; |
| 7 | width = '100%'; // setting to w caes unsightly horiz. scrol(D.tr(),'fe!=f.lastWidth ){ |
| 8 |
| --- a/src/fossil.info-diff.js | |
| +++ b/src/fossil.info-diff.js | |
| @@ -1,8 +0,0 @@ | |
+41
-14
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -442,11 +442,11 @@ | ||
| 442 | 442 | /* |
| 443 | 443 | ** Generate javascript to enhance HTML diffs. |
| 444 | 444 | */ |
| 445 | 445 | void append_diff_javascript(int diffType){ |
| 446 | 446 | if( diffType==0 ) return; |
| 447 | - builtin_request_js("diff.js"); | |
| 447 | + builtin_fossil_js_bundle_or("diff", NULL); | |
| 448 | 448 | } |
| 449 | 449 | |
| 450 | 450 | /* |
| 451 | 451 | ** Construct an appropriate diffFlag for text_diff() based on query |
| 452 | 452 | ** parameters and the to boolean arguments. |
| @@ -933,11 +933,10 @@ | ||
| 933 | 933 | append_file_change_line(zUuid, zName, zOld, zNew, zOldName, |
| 934 | 934 | pCfg,mperm); |
| 935 | 935 | } |
| 936 | 936 | db_finalize(&q3); |
| 937 | 937 | append_diff_javascript(diffType); |
| 938 | - builtin_fossil_js_bundle_or("info-diff",NULL); | |
| 939 | 938 | style_finish_page(); |
| 940 | 939 | } |
| 941 | 940 | |
| 942 | 941 | /* |
| 943 | 942 | ** WEBPAGE: winfo |
| @@ -1338,11 +1337,10 @@ | ||
| 1338 | 1337 | } |
| 1339 | 1338 | } |
| 1340 | 1339 | manifest_destroy(pFrom); |
| 1341 | 1340 | manifest_destroy(pTo); |
| 1342 | 1341 | append_diff_javascript(diffType); |
| 1343 | - builtin_fossil_js_bundle_or("info-diff",NULL); | |
| 1344 | 1342 | style_finish_page(); |
| 1345 | 1343 | } |
| 1346 | 1344 | |
| 1347 | 1345 | #if INTERFACE |
| 1348 | 1346 | /* |
| @@ -1884,21 +1882,28 @@ | ||
| 1884 | 1882 | deliver_artifact(rid, P("m")); |
| 1885 | 1883 | } |
| 1886 | 1884 | |
| 1887 | 1885 | |
| 1888 | 1886 | /* |
| 1889 | -** WEBPAGE: jtext | |
| 1890 | -** URL: /jtext/HASH?from=N&to=M | |
| 1887 | +** WEBPAGE: jchunk hidden | |
| 1888 | +** URL: /jchunk/HASH?from=N&to=M | |
| 1891 | 1889 | ** |
| 1892 | 1890 | ** Return lines of text from a file as a JSON array - one entry in the |
| 1893 | 1891 | ** array for each line of text. |
| 1894 | 1892 | ** |
| 1895 | -** This page is intended to be used in an XHR from javascript on a diff | |
| 1896 | -** page, to return unseen context to fill in additional context when the | |
| 1897 | -** user clicks on the appropriate button. | |
| 1893 | +** **Warning:** This is an internal-use-only interface that is subject to | |
| 1894 | +** change at any moment. External application should not use this interface | |
| 1895 | +** since the application will break when this interface changes, and this | |
| 1896 | +** interface will undoubtedly change. | |
| 1897 | +** | |
| 1898 | +** This page is intended to be used in an XHR from javascript on a | |
| 1899 | +** diff page, to return unseen context to fill in additional context | |
| 1900 | +** when the user clicks on the appropriate button. The response is | |
| 1901 | +** always in JSON form and errors are reported as documented for | |
| 1902 | +** ajax_route_error(). | |
| 1898 | 1903 | */ |
| 1899 | -void jtext_page(void){ | |
| 1904 | +void jchunk_page(void){ | |
| 1900 | 1905 | int rid = 0; |
| 1901 | 1906 | const char *zName = PD("name", ""); |
| 1902 | 1907 | int iFrom = atoi(PD("from","0")); |
| 1903 | 1908 | int iTo = atoi(PD("to","0")); |
| 1904 | 1909 | int ln; |
| @@ -1905,22 +1910,44 @@ | ||
| 1905 | 1910 | int go = 1; |
| 1906 | 1911 | const char *zSep; |
| 1907 | 1912 | Blob content; |
| 1908 | 1913 | Blob line; |
| 1909 | 1914 | Blob *pOut; |
| 1915 | + | |
| 1916 | + if(0){ | |
| 1917 | + ajax_route_error(400, "Just testing client-side error handling."); | |
| 1918 | + return; | |
| 1919 | + } | |
| 1910 | 1920 | |
| 1911 | 1921 | login_check_credentials(); |
| 1912 | - if( !g.perm.Read ){ login_needed(g.anon.Read); return; } | |
| 1922 | + if( !g.perm.Read ){ | |
| 1923 | + ajax_route_error(403, "Access requires Read permissions."); | |
| 1924 | + return; | |
| 1925 | + } | |
| 1926 | +#if 1 | |
| 1927 | + /* Re-enable this block once this code is integrated somewhere into | |
| 1928 | + the UI. */ | |
| 1913 | 1929 | rid = db_int(0, "SELECT rid FROM blob WHERE uuid=%Q", zName); |
| 1914 | 1930 | if( rid==0 ){ |
| 1915 | - cgi_set_status(404, "Not Found"); | |
| 1916 | - @ Unknown artifact: "%h(zName)" | |
| 1931 | + ajax_route_error(404, "Unknown artifact: %h", zName); | |
| 1932 | + return; | |
| 1933 | + } | |
| 1934 | +#else | |
| 1935 | + /* This impl is only to simplify "manual" testing via the JS | |
| 1936 | + console. */ | |
| 1937 | + rid = symbolic_name_to_rid(zName, "*"); | |
| 1938 | + if( rid==0 ){ | |
| 1939 | + ajax_route_error(404, "Unknown artifact: %h", zName); | |
| 1940 | + return; | |
| 1941 | + }else if( rid<0 ){ | |
| 1942 | + ajax_route_error(418, "Ambiguous artifact name: %h", zName); | |
| 1917 | 1943 | return; |
| 1918 | 1944 | } |
| 1945 | +#endif | |
| 1919 | 1946 | if( iFrom<1 || iTo<iFrom ){ |
| 1920 | - cgi_set_status(500, "Bad Request"); | |
| 1921 | - @ Invalid line range | |
| 1947 | + ajax_route_error(500, "Invalid line range from=%d, to=%d.", | |
| 1948 | + iFrom, iTo); | |
| 1922 | 1949 | return; |
| 1923 | 1950 | } |
| 1924 | 1951 | content_get(rid, &content); |
| 1925 | 1952 | g.isConst = 1; |
| 1926 | 1953 | cgi_set_content_type("text/json"); |
| 1927 | 1954 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -442,11 +442,11 @@ | |
| 442 | /* |
| 443 | ** Generate javascript to enhance HTML diffs. |
| 444 | */ |
| 445 | void append_diff_javascript(int diffType){ |
| 446 | if( diffType==0 ) return; |
| 447 | builtin_request_js("diff.js"); |
| 448 | } |
| 449 | |
| 450 | /* |
| 451 | ** Construct an appropriate diffFlag for text_diff() based on query |
| 452 | ** parameters and the to boolean arguments. |
| @@ -933,11 +933,10 @@ | |
| 933 | append_file_change_line(zUuid, zName, zOld, zNew, zOldName, |
| 934 | pCfg,mperm); |
| 935 | } |
| 936 | db_finalize(&q3); |
| 937 | append_diff_javascript(diffType); |
| 938 | builtin_fossil_js_bundle_or("info-diff",NULL); |
| 939 | style_finish_page(); |
| 940 | } |
| 941 | |
| 942 | /* |
| 943 | ** WEBPAGE: winfo |
| @@ -1338,11 +1337,10 @@ | |
| 1338 | } |
| 1339 | } |
| 1340 | manifest_destroy(pFrom); |
| 1341 | manifest_destroy(pTo); |
| 1342 | append_diff_javascript(diffType); |
| 1343 | builtin_fossil_js_bundle_or("info-diff",NULL); |
| 1344 | style_finish_page(); |
| 1345 | } |
| 1346 | |
| 1347 | #if INTERFACE |
| 1348 | /* |
| @@ -1884,21 +1882,28 @@ | |
| 1884 | deliver_artifact(rid, P("m")); |
| 1885 | } |
| 1886 | |
| 1887 | |
| 1888 | /* |
| 1889 | ** WEBPAGE: jtext |
| 1890 | ** URL: /jtext/HASH?from=N&to=M |
| 1891 | ** |
| 1892 | ** Return lines of text from a file as a JSON array - one entry in the |
| 1893 | ** array for each line of text. |
| 1894 | ** |
| 1895 | ** This page is intended to be used in an XHR from javascript on a diff |
| 1896 | ** page, to return unseen context to fill in additional context when the |
| 1897 | ** user clicks on the appropriate button. |
| 1898 | */ |
| 1899 | void jtext_page(void){ |
| 1900 | int rid = 0; |
| 1901 | const char *zName = PD("name", ""); |
| 1902 | int iFrom = atoi(PD("from","0")); |
| 1903 | int iTo = atoi(PD("to","0")); |
| 1904 | int ln; |
| @@ -1905,22 +1910,44 @@ | |
| 1905 | int go = 1; |
| 1906 | const char *zSep; |
| 1907 | Blob content; |
| 1908 | Blob line; |
| 1909 | Blob *pOut; |
| 1910 | |
| 1911 | login_check_credentials(); |
| 1912 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 1913 | rid = db_int(0, "SELECT rid FROM blob WHERE uuid=%Q", zName); |
| 1914 | if( rid==0 ){ |
| 1915 | cgi_set_status(404, "Not Found"); |
| 1916 | @ Unknown artifact: "%h(zName)" |
| 1917 | return; |
| 1918 | } |
| 1919 | if( iFrom<1 || iTo<iFrom ){ |
| 1920 | cgi_set_status(500, "Bad Request"); |
| 1921 | @ Invalid line range |
| 1922 | return; |
| 1923 | } |
| 1924 | content_get(rid, &content); |
| 1925 | g.isConst = 1; |
| 1926 | cgi_set_content_type("text/json"); |
| 1927 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -442,11 +442,11 @@ | |
| 442 | /* |
| 443 | ** Generate javascript to enhance HTML diffs. |
| 444 | */ |
| 445 | void append_diff_javascript(int diffType){ |
| 446 | if( diffType==0 ) return; |
| 447 | builtin_fossil_js_bundle_or("diff", NULL); |
| 448 | } |
| 449 | |
| 450 | /* |
| 451 | ** Construct an appropriate diffFlag for text_diff() based on query |
| 452 | ** parameters and the to boolean arguments. |
| @@ -933,11 +933,10 @@ | |
| 933 | append_file_change_line(zUuid, zName, zOld, zNew, zOldName, |
| 934 | pCfg,mperm); |
| 935 | } |
| 936 | db_finalize(&q3); |
| 937 | append_diff_javascript(diffType); |
| 938 | style_finish_page(); |
| 939 | } |
| 940 | |
| 941 | /* |
| 942 | ** WEBPAGE: winfo |
| @@ -1338,11 +1337,10 @@ | |
| 1337 | } |
| 1338 | } |
| 1339 | manifest_destroy(pFrom); |
| 1340 | manifest_destroy(pTo); |
| 1341 | append_diff_javascript(diffType); |
| 1342 | style_finish_page(); |
| 1343 | } |
| 1344 | |
| 1345 | #if INTERFACE |
| 1346 | /* |
| @@ -1884,21 +1882,28 @@ | |
| 1882 | deliver_artifact(rid, P("m")); |
| 1883 | } |
| 1884 | |
| 1885 | |
| 1886 | /* |
| 1887 | ** WEBPAGE: jchunk hidden |
| 1888 | ** URL: /jchunk/HASH?from=N&to=M |
| 1889 | ** |
| 1890 | ** Return lines of text from a file as a JSON array - one entry in the |
| 1891 | ** array for each line of text. |
| 1892 | ** |
| 1893 | ** **Warning:** This is an internal-use-only interface that is subject to |
| 1894 | ** change at any moment. External application should not use this interface |
| 1895 | ** since the application will break when this interface changes, and this |
| 1896 | ** interface will undoubtedly change. |
| 1897 | ** |
| 1898 | ** This page is intended to be used in an XHR from javascript on a |
| 1899 | ** diff page, to return unseen context to fill in additional context |
| 1900 | ** when the user clicks on the appropriate button. The response is |
| 1901 | ** always in JSON form and errors are reported as documented for |
| 1902 | ** ajax_route_error(). |
| 1903 | */ |
| 1904 | void jchunk_page(void){ |
| 1905 | int rid = 0; |
| 1906 | const char *zName = PD("name", ""); |
| 1907 | int iFrom = atoi(PD("from","0")); |
| 1908 | int iTo = atoi(PD("to","0")); |
| 1909 | int ln; |
| @@ -1905,22 +1910,44 @@ | |
| 1910 | int go = 1; |
| 1911 | const char *zSep; |
| 1912 | Blob content; |
| 1913 | Blob line; |
| 1914 | Blob *pOut; |
| 1915 | |
| 1916 | if(0){ |
| 1917 | ajax_route_error(400, "Just testing client-side error handling."); |
| 1918 | return; |
| 1919 | } |
| 1920 | |
| 1921 | login_check_credentials(); |
| 1922 | if( !g.perm.Read ){ |
| 1923 | ajax_route_error(403, "Access requires Read permissions."); |
| 1924 | return; |
| 1925 | } |
| 1926 | #if 1 |
| 1927 | /* Re-enable this block once this code is integrated somewhere into |
| 1928 | the UI. */ |
| 1929 | rid = db_int(0, "SELECT rid FROM blob WHERE uuid=%Q", zName); |
| 1930 | if( rid==0 ){ |
| 1931 | ajax_route_error(404, "Unknown artifact: %h", zName); |
| 1932 | return; |
| 1933 | } |
| 1934 | #else |
| 1935 | /* This impl is only to simplify "manual" testing via the JS |
| 1936 | console. */ |
| 1937 | rid = symbolic_name_to_rid(zName, "*"); |
| 1938 | if( rid==0 ){ |
| 1939 | ajax_route_error(404, "Unknown artifact: %h", zName); |
| 1940 | return; |
| 1941 | }else if( rid<0 ){ |
| 1942 | ajax_route_error(418, "Ambiguous artifact name: %h", zName); |
| 1943 | return; |
| 1944 | } |
| 1945 | #endif |
| 1946 | if( iFrom<1 || iTo<iFrom ){ |
| 1947 | ajax_route_error(500, "Invalid line range from=%d, to=%d.", |
| 1948 | iFrom, iTo); |
| 1949 | return; |
| 1950 | } |
| 1951 | content_get(rid, &content); |
| 1952 | g.isConst = 1; |
| 1953 | cgi_set_content_type("text/json"); |
| 1954 |
+41
-14
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -442,11 +442,11 @@ | ||
| 442 | 442 | /* |
| 443 | 443 | ** Generate javascript to enhance HTML diffs. |
| 444 | 444 | */ |
| 445 | 445 | void append_diff_javascript(int diffType){ |
| 446 | 446 | if( diffType==0 ) return; |
| 447 | - builtin_request_js("diff.js"); | |
| 447 | + builtin_fossil_js_bundle_or("diff", NULL); | |
| 448 | 448 | } |
| 449 | 449 | |
| 450 | 450 | /* |
| 451 | 451 | ** Construct an appropriate diffFlag for text_diff() based on query |
| 452 | 452 | ** parameters and the to boolean arguments. |
| @@ -933,11 +933,10 @@ | ||
| 933 | 933 | append_file_change_line(zUuid, zName, zOld, zNew, zOldName, |
| 934 | 934 | pCfg,mperm); |
| 935 | 935 | } |
| 936 | 936 | db_finalize(&q3); |
| 937 | 937 | append_diff_javascript(diffType); |
| 938 | - builtin_fossil_js_bundle_or("info-diff",NULL); | |
| 939 | 938 | style_finish_page(); |
| 940 | 939 | } |
| 941 | 940 | |
| 942 | 941 | /* |
| 943 | 942 | ** WEBPAGE: winfo |
| @@ -1338,11 +1337,10 @@ | ||
| 1338 | 1337 | } |
| 1339 | 1338 | } |
| 1340 | 1339 | manifest_destroy(pFrom); |
| 1341 | 1340 | manifest_destroy(pTo); |
| 1342 | 1341 | append_diff_javascript(diffType); |
| 1343 | - builtin_fossil_js_bundle_or("info-diff",NULL); | |
| 1344 | 1342 | style_finish_page(); |
| 1345 | 1343 | } |
| 1346 | 1344 | |
| 1347 | 1345 | #if INTERFACE |
| 1348 | 1346 | /* |
| @@ -1884,21 +1882,28 @@ | ||
| 1884 | 1882 | deliver_artifact(rid, P("m")); |
| 1885 | 1883 | } |
| 1886 | 1884 | |
| 1887 | 1885 | |
| 1888 | 1886 | /* |
| 1889 | -** WEBPAGE: jtext | |
| 1890 | -** URL: /jtext/HASH?from=N&to=M | |
| 1887 | +** WEBPAGE: jchunk hidden | |
| 1888 | +** URL: /jchunk/HASH?from=N&to=M | |
| 1891 | 1889 | ** |
| 1892 | 1890 | ** Return lines of text from a file as a JSON array - one entry in the |
| 1893 | 1891 | ** array for each line of text. |
| 1894 | 1892 | ** |
| 1895 | -** This page is intended to be used in an XHR from javascript on a diff | |
| 1896 | -** page, to return unseen context to fill in additional context when the | |
| 1897 | -** user clicks on the appropriate button. | |
| 1893 | +** **Warning:** This is an internal-use-only interface that is subject to | |
| 1894 | +** change at any moment. External application should not use this interface | |
| 1895 | +** since the application will break when this interface changes, and this | |
| 1896 | +** interface will undoubtedly change. | |
| 1897 | +** | |
| 1898 | +** This page is intended to be used in an XHR from javascript on a | |
| 1899 | +** diff page, to return unseen context to fill in additional context | |
| 1900 | +** when the user clicks on the appropriate button. The response is | |
| 1901 | +** always in JSON form and errors are reported as documented for | |
| 1902 | +** ajax_route_error(). | |
| 1898 | 1903 | */ |
| 1899 | -void jtext_page(void){ | |
| 1904 | +void jchunk_page(void){ | |
| 1900 | 1905 | int rid = 0; |
| 1901 | 1906 | const char *zName = PD("name", ""); |
| 1902 | 1907 | int iFrom = atoi(PD("from","0")); |
| 1903 | 1908 | int iTo = atoi(PD("to","0")); |
| 1904 | 1909 | int ln; |
| @@ -1905,22 +1910,44 @@ | ||
| 1905 | 1910 | int go = 1; |
| 1906 | 1911 | const char *zSep; |
| 1907 | 1912 | Blob content; |
| 1908 | 1913 | Blob line; |
| 1909 | 1914 | Blob *pOut; |
| 1915 | + | |
| 1916 | + if(0){ | |
| 1917 | + ajax_route_error(400, "Just testing client-side error handling."); | |
| 1918 | + return; | |
| 1919 | + } | |
| 1910 | 1920 | |
| 1911 | 1921 | login_check_credentials(); |
| 1912 | - if( !g.perm.Read ){ login_needed(g.anon.Read); return; } | |
| 1922 | + if( !g.perm.Read ){ | |
| 1923 | + ajax_route_error(403, "Access requires Read permissions."); | |
| 1924 | + return; | |
| 1925 | + } | |
| 1926 | +#if 1 | |
| 1927 | + /* Re-enable this block once this code is integrated somewhere into | |
| 1928 | + the UI. */ | |
| 1913 | 1929 | rid = db_int(0, "SELECT rid FROM blob WHERE uuid=%Q", zName); |
| 1914 | 1930 | if( rid==0 ){ |
| 1915 | - cgi_set_status(404, "Not Found"); | |
| 1916 | - @ Unknown artifact: "%h(zName)" | |
| 1931 | + ajax_route_error(404, "Unknown artifact: %h", zName); | |
| 1932 | + return; | |
| 1933 | + } | |
| 1934 | +#else | |
| 1935 | + /* This impl is only to simplify "manual" testing via the JS | |
| 1936 | + console. */ | |
| 1937 | + rid = symbolic_name_to_rid(zName, "*"); | |
| 1938 | + if( rid==0 ){ | |
| 1939 | + ajax_route_error(404, "Unknown artifact: %h", zName); | |
| 1940 | + return; | |
| 1941 | + }else if( rid<0 ){ | |
| 1942 | + ajax_route_error(418, "Ambiguous artifact name: %h", zName); | |
| 1917 | 1943 | return; |
| 1918 | 1944 | } |
| 1945 | +#endif | |
| 1919 | 1946 | if( iFrom<1 || iTo<iFrom ){ |
| 1920 | - cgi_set_status(500, "Bad Request"); | |
| 1921 | - @ Invalid line range | |
| 1947 | + ajax_route_error(500, "Invalid line range from=%d, to=%d.", | |
| 1948 | + iFrom, iTo); | |
| 1922 | 1949 | return; |
| 1923 | 1950 | } |
| 1924 | 1951 | content_get(rid, &content); |
| 1925 | 1952 | g.isConst = 1; |
| 1926 | 1953 | cgi_set_content_type("text/json"); |
| 1927 | 1954 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -442,11 +442,11 @@ | |
| 442 | /* |
| 443 | ** Generate javascript to enhance HTML diffs. |
| 444 | */ |
| 445 | void append_diff_javascript(int diffType){ |
| 446 | if( diffType==0 ) return; |
| 447 | builtin_request_js("diff.js"); |
| 448 | } |
| 449 | |
| 450 | /* |
| 451 | ** Construct an appropriate diffFlag for text_diff() based on query |
| 452 | ** parameters and the to boolean arguments. |
| @@ -933,11 +933,10 @@ | |
| 933 | append_file_change_line(zUuid, zName, zOld, zNew, zOldName, |
| 934 | pCfg,mperm); |
| 935 | } |
| 936 | db_finalize(&q3); |
| 937 | append_diff_javascript(diffType); |
| 938 | builtin_fossil_js_bundle_or("info-diff",NULL); |
| 939 | style_finish_page(); |
| 940 | } |
| 941 | |
| 942 | /* |
| 943 | ** WEBPAGE: winfo |
| @@ -1338,11 +1337,10 @@ | |
| 1338 | } |
| 1339 | } |
| 1340 | manifest_destroy(pFrom); |
| 1341 | manifest_destroy(pTo); |
| 1342 | append_diff_javascript(diffType); |
| 1343 | builtin_fossil_js_bundle_or("info-diff",NULL); |
| 1344 | style_finish_page(); |
| 1345 | } |
| 1346 | |
| 1347 | #if INTERFACE |
| 1348 | /* |
| @@ -1884,21 +1882,28 @@ | |
| 1884 | deliver_artifact(rid, P("m")); |
| 1885 | } |
| 1886 | |
| 1887 | |
| 1888 | /* |
| 1889 | ** WEBPAGE: jtext |
| 1890 | ** URL: /jtext/HASH?from=N&to=M |
| 1891 | ** |
| 1892 | ** Return lines of text from a file as a JSON array - one entry in the |
| 1893 | ** array for each line of text. |
| 1894 | ** |
| 1895 | ** This page is intended to be used in an XHR from javascript on a diff |
| 1896 | ** page, to return unseen context to fill in additional context when the |
| 1897 | ** user clicks on the appropriate button. |
| 1898 | */ |
| 1899 | void jtext_page(void){ |
| 1900 | int rid = 0; |
| 1901 | const char *zName = PD("name", ""); |
| 1902 | int iFrom = atoi(PD("from","0")); |
| 1903 | int iTo = atoi(PD("to","0")); |
| 1904 | int ln; |
| @@ -1905,22 +1910,44 @@ | |
| 1905 | int go = 1; |
| 1906 | const char *zSep; |
| 1907 | Blob content; |
| 1908 | Blob line; |
| 1909 | Blob *pOut; |
| 1910 | |
| 1911 | login_check_credentials(); |
| 1912 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 1913 | rid = db_int(0, "SELECT rid FROM blob WHERE uuid=%Q", zName); |
| 1914 | if( rid==0 ){ |
| 1915 | cgi_set_status(404, "Not Found"); |
| 1916 | @ Unknown artifact: "%h(zName)" |
| 1917 | return; |
| 1918 | } |
| 1919 | if( iFrom<1 || iTo<iFrom ){ |
| 1920 | cgi_set_status(500, "Bad Request"); |
| 1921 | @ Invalid line range |
| 1922 | return; |
| 1923 | } |
| 1924 | content_get(rid, &content); |
| 1925 | g.isConst = 1; |
| 1926 | cgi_set_content_type("text/json"); |
| 1927 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -442,11 +442,11 @@ | |
| 442 | /* |
| 443 | ** Generate javascript to enhance HTML diffs. |
| 444 | */ |
| 445 | void append_diff_javascript(int diffType){ |
| 446 | if( diffType==0 ) return; |
| 447 | builtin_fossil_js_bundle_or("diff", NULL); |
| 448 | } |
| 449 | |
| 450 | /* |
| 451 | ** Construct an appropriate diffFlag for text_diff() based on query |
| 452 | ** parameters and the to boolean arguments. |
| @@ -933,11 +933,10 @@ | |
| 933 | append_file_change_line(zUuid, zName, zOld, zNew, zOldName, |
| 934 | pCfg,mperm); |
| 935 | } |
| 936 | db_finalize(&q3); |
| 937 | append_diff_javascript(diffType); |
| 938 | style_finish_page(); |
| 939 | } |
| 940 | |
| 941 | /* |
| 942 | ** WEBPAGE: winfo |
| @@ -1338,11 +1337,10 @@ | |
| 1337 | } |
| 1338 | } |
| 1339 | manifest_destroy(pFrom); |
| 1340 | manifest_destroy(pTo); |
| 1341 | append_diff_javascript(diffType); |
| 1342 | style_finish_page(); |
| 1343 | } |
| 1344 | |
| 1345 | #if INTERFACE |
| 1346 | /* |
| @@ -1884,21 +1882,28 @@ | |
| 1882 | deliver_artifact(rid, P("m")); |
| 1883 | } |
| 1884 | |
| 1885 | |
| 1886 | /* |
| 1887 | ** WEBPAGE: jchunk hidden |
| 1888 | ** URL: /jchunk/HASH?from=N&to=M |
| 1889 | ** |
| 1890 | ** Return lines of text from a file as a JSON array - one entry in the |
| 1891 | ** array for each line of text. |
| 1892 | ** |
| 1893 | ** **Warning:** This is an internal-use-only interface that is subject to |
| 1894 | ** change at any moment. External application should not use this interface |
| 1895 | ** since the application will break when this interface changes, and this |
| 1896 | ** interface will undoubtedly change. |
| 1897 | ** |
| 1898 | ** This page is intended to be used in an XHR from javascript on a |
| 1899 | ** diff page, to return unseen context to fill in additional context |
| 1900 | ** when the user clicks on the appropriate button. The response is |
| 1901 | ** always in JSON form and errors are reported as documented for |
| 1902 | ** ajax_route_error(). |
| 1903 | */ |
| 1904 | void jchunk_page(void){ |
| 1905 | int rid = 0; |
| 1906 | const char *zName = PD("name", ""); |
| 1907 | int iFrom = atoi(PD("from","0")); |
| 1908 | int iTo = atoi(PD("to","0")); |
| 1909 | int ln; |
| @@ -1905,22 +1910,44 @@ | |
| 1910 | int go = 1; |
| 1911 | const char *zSep; |
| 1912 | Blob content; |
| 1913 | Blob line; |
| 1914 | Blob *pOut; |
| 1915 | |
| 1916 | if(0){ |
| 1917 | ajax_route_error(400, "Just testing client-side error handling."); |
| 1918 | return; |
| 1919 | } |
| 1920 | |
| 1921 | login_check_credentials(); |
| 1922 | if( !g.perm.Read ){ |
| 1923 | ajax_route_error(403, "Access requires Read permissions."); |
| 1924 | return; |
| 1925 | } |
| 1926 | #if 1 |
| 1927 | /* Re-enable this block once this code is integrated somewhere into |
| 1928 | the UI. */ |
| 1929 | rid = db_int(0, "SELECT rid FROM blob WHERE uuid=%Q", zName); |
| 1930 | if( rid==0 ){ |
| 1931 | ajax_route_error(404, "Unknown artifact: %h", zName); |
| 1932 | return; |
| 1933 | } |
| 1934 | #else |
| 1935 | /* This impl is only to simplify "manual" testing via the JS |
| 1936 | console. */ |
| 1937 | rid = symbolic_name_to_rid(zName, "*"); |
| 1938 | if( rid==0 ){ |
| 1939 | ajax_route_error(404, "Unknown artifact: %h", zName); |
| 1940 | return; |
| 1941 | }else if( rid<0 ){ |
| 1942 | ajax_route_error(418, "Ambiguous artifact name: %h", zName); |
| 1943 | return; |
| 1944 | } |
| 1945 | #endif |
| 1946 | if( iFrom<1 || iTo<iFrom ){ |
| 1947 | ajax_route_error(500, "Invalid line range from=%d, to=%d.", |
| 1948 | iFrom, iTo); |
| 1949 | return; |
| 1950 | } |
| 1951 | content_get(rid, &content); |
| 1952 | g.isConst = 1; |
| 1953 | cgi_set_content_type("text/json"); |
| 1954 |
+1
-1
| --- src/main.mk | ||
| +++ src/main.mk | ||
| @@ -224,13 +224,13 @@ | ||
| 224 | 224 | $(SRCDIR)/diff.tcl \ |
| 225 | 225 | $(SRCDIR)/forum.js \ |
| 226 | 226 | $(SRCDIR)/fossil.bootstrap.js \ |
| 227 | 227 | $(SRCDIR)/fossil.confirmer.js \ |
| 228 | 228 | $(SRCDIR)/fossil.copybutton.js \ |
| 229 | + $(SRCDIR)/fossil.diff.js \ | |
| 229 | 230 | $(SRCDIR)/fossil.dom.js \ |
| 230 | 231 | $(SRCDIR)/fossil.fetch.js \ |
| 231 | - $(SRCDIR)/fossil.info-diff.js \ | |
| 232 | 232 | $(SRCDIR)/fossil.numbered-lines.js \ |
| 233 | 233 | $(SRCDIR)/fossil.page.brlist.js \ |
| 234 | 234 | $(SRCDIR)/fossil.page.fileedit.js \ |
| 235 | 235 | $(SRCDIR)/fossil.page.forumpost.js \ |
| 236 | 236 | $(SRCDIR)/fossil.page.pikchrshow.js \ |
| 237 | 237 |
| --- src/main.mk | |
| +++ src/main.mk | |
| @@ -224,13 +224,13 @@ | |
| 224 | $(SRCDIR)/diff.tcl \ |
| 225 | $(SRCDIR)/forum.js \ |
| 226 | $(SRCDIR)/fossil.bootstrap.js \ |
| 227 | $(SRCDIR)/fossil.confirmer.js \ |
| 228 | $(SRCDIR)/fossil.copybutton.js \ |
| 229 | $(SRCDIR)/fossil.dom.js \ |
| 230 | $(SRCDIR)/fossil.fetch.js \ |
| 231 | $(SRCDIR)/fossil.info-diff.js \ |
| 232 | $(SRCDIR)/fossil.numbered-lines.js \ |
| 233 | $(SRCDIR)/fossil.page.brlist.js \ |
| 234 | $(SRCDIR)/fossil.page.fileedit.js \ |
| 235 | $(SRCDIR)/fossil.page.forumpost.js \ |
| 236 | $(SRCDIR)/fossil.page.pikchrshow.js \ |
| 237 |
| --- src/main.mk | |
| +++ src/main.mk | |
| @@ -224,13 +224,13 @@ | |
| 224 | $(SRCDIR)/diff.tcl \ |
| 225 | $(SRCDIR)/forum.js \ |
| 226 | $(SRCDIR)/fossil.bootstrap.js \ |
| 227 | $(SRCDIR)/fossil.confirmer.js \ |
| 228 | $(SRCDIR)/fossil.copybutton.js \ |
| 229 | $(SRCDIR)/fossil.diff.js \ |
| 230 | $(SRCDIR)/fossil.dom.js \ |
| 231 | $(SRCDIR)/fossil.fetch.js \ |
| 232 | $(SRCDIR)/fossil.numbered-lines.js \ |
| 233 | $(SRCDIR)/fossil.page.brlist.js \ |
| 234 | $(SRCDIR)/fossil.page.fileedit.js \ |
| 235 | $(SRCDIR)/fossil.page.forumpost.js \ |
| 236 | $(SRCDIR)/fossil.page.pikchrshow.js \ |
| 237 |
+1
-1
| --- src/wiki.c | ||
| +++ src/wiki.c | ||
| @@ -1454,11 +1454,11 @@ | ||
| 1454 | 1454 | CX("</div>"/*#wikiedit-tab-save*/); |
| 1455 | 1455 | } |
| 1456 | 1456 | builtin_fossil_js_bundle_or("fetch", "dom", "tabs", "confirmer", |
| 1457 | 1457 | "storage", "popupwidget", "copybutton", |
| 1458 | 1458 | "pikchr", NULL); |
| 1459 | - builtin_request_js("diff.js"); | |
| 1459 | + builtin_fossil_js_bundle_or("diff", NULL); | |
| 1460 | 1460 | builtin_request_js("fossil.page.wikiedit.js"); |
| 1461 | 1461 | builtin_fulfill_js_requests(); |
| 1462 | 1462 | /* Dynamically populate the editor... */ |
| 1463 | 1463 | style_script_begin(__FILE__,__LINE__); |
| 1464 | 1464 | { |
| 1465 | 1465 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -1454,11 +1454,11 @@ | |
| 1454 | CX("</div>"/*#wikiedit-tab-save*/); |
| 1455 | } |
| 1456 | builtin_fossil_js_bundle_or("fetch", "dom", "tabs", "confirmer", |
| 1457 | "storage", "popupwidget", "copybutton", |
| 1458 | "pikchr", NULL); |
| 1459 | builtin_request_js("diff.js"); |
| 1460 | builtin_request_js("fossil.page.wikiedit.js"); |
| 1461 | builtin_fulfill_js_requests(); |
| 1462 | /* Dynamically populate the editor... */ |
| 1463 | style_script_begin(__FILE__,__LINE__); |
| 1464 | { |
| 1465 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -1454,11 +1454,11 @@ | |
| 1454 | CX("</div>"/*#wikiedit-tab-save*/); |
| 1455 | } |
| 1456 | builtin_fossil_js_bundle_or("fetch", "dom", "tabs", "confirmer", |
| 1457 | "storage", "popupwidget", "copybutton", |
| 1458 | "pikchr", NULL); |
| 1459 | builtin_fossil_js_bundle_or("diff", NULL); |
| 1460 | builtin_request_js("fossil.page.wikiedit.js"); |
| 1461 | builtin_fulfill_js_requests(); |
| 1462 | /* Dynamically populate the editor... */ |
| 1463 | style_script_begin(__FILE__,__LINE__); |
| 1464 | { |
| 1465 |
+1
-1
| --- win/Makefile.mingw | ||
| +++ win/Makefile.mingw | ||
| @@ -633,13 +633,13 @@ | ||
| 633 | 633 | $(SRCDIR)/diff.tcl \ |
| 634 | 634 | $(SRCDIR)/forum.js \ |
| 635 | 635 | $(SRCDIR)/fossil.bootstrap.js \ |
| 636 | 636 | $(SRCDIR)/fossil.confirmer.js \ |
| 637 | 637 | $(SRCDIR)/fossil.copybutton.js \ |
| 638 | + $(SRCDIR)/fossil.diff.js \ | |
| 638 | 639 | $(SRCDIR)/fossil.dom.js \ |
| 639 | 640 | $(SRCDIR)/fossil.fetch.js \ |
| 640 | - $(SRCDIR)/fossil.info-diff.js \ | |
| 641 | 641 | $(SRCDIR)/fossil.numbered-lines.js \ |
| 642 | 642 | $(SRCDIR)/fossil.page.brlist.js \ |
| 643 | 643 | $(SRCDIR)/fossil.page.fileedit.js \ |
| 644 | 644 | $(SRCDIR)/fossil.page.forumpost.js \ |
| 645 | 645 | $(SRCDIR)/fossil.page.pikchrshow.js \ |
| 646 | 646 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -633,13 +633,13 @@ | |
| 633 | $(SRCDIR)/diff.tcl \ |
| 634 | $(SRCDIR)/forum.js \ |
| 635 | $(SRCDIR)/fossil.bootstrap.js \ |
| 636 | $(SRCDIR)/fossil.confirmer.js \ |
| 637 | $(SRCDIR)/fossil.copybutton.js \ |
| 638 | $(SRCDIR)/fossil.dom.js \ |
| 639 | $(SRCDIR)/fossil.fetch.js \ |
| 640 | $(SRCDIR)/fossil.info-diff.js \ |
| 641 | $(SRCDIR)/fossil.numbered-lines.js \ |
| 642 | $(SRCDIR)/fossil.page.brlist.js \ |
| 643 | $(SRCDIR)/fossil.page.fileedit.js \ |
| 644 | $(SRCDIR)/fossil.page.forumpost.js \ |
| 645 | $(SRCDIR)/fossil.page.pikchrshow.js \ |
| 646 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -633,13 +633,13 @@ | |
| 633 | $(SRCDIR)/diff.tcl \ |
| 634 | $(SRCDIR)/forum.js \ |
| 635 | $(SRCDIR)/fossil.bootstrap.js \ |
| 636 | $(SRCDIR)/fossil.confirmer.js \ |
| 637 | $(SRCDIR)/fossil.copybutton.js \ |
| 638 | $(SRCDIR)/fossil.diff.js \ |
| 639 | $(SRCDIR)/fossil.dom.js \ |
| 640 | $(SRCDIR)/fossil.fetch.js \ |
| 641 | $(SRCDIR)/fossil.numbered-lines.js \ |
| 642 | $(SRCDIR)/fossil.page.brlist.js \ |
| 643 | $(SRCDIR)/fossil.page.fileedit.js \ |
| 644 | $(SRCDIR)/fossil.page.forumpost.js \ |
| 645 | $(SRCDIR)/fossil.page.pikchrshow.js \ |
| 646 |
+2
-2
| --- win/Makefile.msc | ||
| +++ win/Makefile.msc | ||
| @@ -575,13 +575,13 @@ | ||
| 575 | 575 | "$(SRCDIR)\diff.tcl" \ |
| 576 | 576 | "$(SRCDIR)\forum.js" \ |
| 577 | 577 | "$(SRCDIR)\fossil.bootstrap.js" \ |
| 578 | 578 | "$(SRCDIR)\fossil.confirmer.js" \ |
| 579 | 579 | "$(SRCDIR)\fossil.copybutton.js" \ |
| 580 | + "$(SRCDIR)\fossil.diff.js" \ | |
| 580 | 581 | "$(SRCDIR)\fossil.dom.js" \ |
| 581 | 582 | "$(SRCDIR)\fossil.fetch.js" \ |
| 582 | - "$(SRCDIR)\fossil.info-diff.js" \ | |
| 583 | 583 | "$(SRCDIR)\fossil.numbered-lines.js" \ |
| 584 | 584 | "$(SRCDIR)\fossil.page.brlist.js" \ |
| 585 | 585 | "$(SRCDIR)\fossil.page.fileedit.js" \ |
| 586 | 586 | "$(SRCDIR)\fossil.page.forumpost.js" \ |
| 587 | 587 | "$(SRCDIR)\fossil.page.pikchrshow.js" \ |
| @@ -1183,13 +1183,13 @@ | ||
| 1183 | 1183 | echo "$(SRCDIR)\diff.tcl" >> $@ |
| 1184 | 1184 | echo "$(SRCDIR)\forum.js" >> $@ |
| 1185 | 1185 | echo "$(SRCDIR)\fossil.bootstrap.js" >> $@ |
| 1186 | 1186 | echo "$(SRCDIR)\fossil.confirmer.js" >> $@ |
| 1187 | 1187 | echo "$(SRCDIR)\fossil.copybutton.js" >> $@ |
| 1188 | + echo "$(SRCDIR)\fossil.diff.js" >> $@ | |
| 1188 | 1189 | echo "$(SRCDIR)\fossil.dom.js" >> $@ |
| 1189 | 1190 | echo "$(SRCDIR)\fossil.fetch.js" >> $@ |
| 1190 | - echo "$(SRCDIR)\fossil.info-diff.js" >> $@ | |
| 1191 | 1191 | echo "$(SRCDIR)\fossil.numbered-lines.js" >> $@ |
| 1192 | 1192 | echo "$(SRCDIR)\fossil.page.brlist.js" >> $@ |
| 1193 | 1193 | echo "$(SRCDIR)\fossil.page.fileedit.js" >> $@ |
| 1194 | 1194 | echo "$(SRCDIR)\fossil.page.forumpost.js" >> $@ |
| 1195 | 1195 | echo "$(SRCDIR)\fossil.page.pikchrshow.js" >> $@ |
| 1196 | 1196 |
| --- win/Makefile.msc | |
| +++ win/Makefile.msc | |
| @@ -575,13 +575,13 @@ | |
| 575 | "$(SRCDIR)\diff.tcl" \ |
| 576 | "$(SRCDIR)\forum.js" \ |
| 577 | "$(SRCDIR)\fossil.bootstrap.js" \ |
| 578 | "$(SRCDIR)\fossil.confirmer.js" \ |
| 579 | "$(SRCDIR)\fossil.copybutton.js" \ |
| 580 | "$(SRCDIR)\fossil.dom.js" \ |
| 581 | "$(SRCDIR)\fossil.fetch.js" \ |
| 582 | "$(SRCDIR)\fossil.info-diff.js" \ |
| 583 | "$(SRCDIR)\fossil.numbered-lines.js" \ |
| 584 | "$(SRCDIR)\fossil.page.brlist.js" \ |
| 585 | "$(SRCDIR)\fossil.page.fileedit.js" \ |
| 586 | "$(SRCDIR)\fossil.page.forumpost.js" \ |
| 587 | "$(SRCDIR)\fossil.page.pikchrshow.js" \ |
| @@ -1183,13 +1183,13 @@ | |
| 1183 | echo "$(SRCDIR)\diff.tcl" >> $@ |
| 1184 | echo "$(SRCDIR)\forum.js" >> $@ |
| 1185 | echo "$(SRCDIR)\fossil.bootstrap.js" >> $@ |
| 1186 | echo "$(SRCDIR)\fossil.confirmer.js" >> $@ |
| 1187 | echo "$(SRCDIR)\fossil.copybutton.js" >> $@ |
| 1188 | echo "$(SRCDIR)\fossil.dom.js" >> $@ |
| 1189 | echo "$(SRCDIR)\fossil.fetch.js" >> $@ |
| 1190 | echo "$(SRCDIR)\fossil.info-diff.js" >> $@ |
| 1191 | echo "$(SRCDIR)\fossil.numbered-lines.js" >> $@ |
| 1192 | echo "$(SRCDIR)\fossil.page.brlist.js" >> $@ |
| 1193 | echo "$(SRCDIR)\fossil.page.fileedit.js" >> $@ |
| 1194 | echo "$(SRCDIR)\fossil.page.forumpost.js" >> $@ |
| 1195 | echo "$(SRCDIR)\fossil.page.pikchrshow.js" >> $@ |
| 1196 |
| --- win/Makefile.msc | |
| +++ win/Makefile.msc | |
| @@ -575,13 +575,13 @@ | |
| 575 | "$(SRCDIR)\diff.tcl" \ |
| 576 | "$(SRCDIR)\forum.js" \ |
| 577 | "$(SRCDIR)\fossil.bootstrap.js" \ |
| 578 | "$(SRCDIR)\fossil.confirmer.js" \ |
| 579 | "$(SRCDIR)\fossil.copybutton.js" \ |
| 580 | "$(SRCDIR)\fossil.diff.js" \ |
| 581 | "$(SRCDIR)\fossil.dom.js" \ |
| 582 | "$(SRCDIR)\fossil.fetch.js" \ |
| 583 | "$(SRCDIR)\fossil.numbered-lines.js" \ |
| 584 | "$(SRCDIR)\fossil.page.brlist.js" \ |
| 585 | "$(SRCDIR)\fossil.page.fileedit.js" \ |
| 586 | "$(SRCDIR)\fossil.page.forumpost.js" \ |
| 587 | "$(SRCDIR)\fossil.page.pikchrshow.js" \ |
| @@ -1183,13 +1183,13 @@ | |
| 1183 | echo "$(SRCDIR)\diff.tcl" >> $@ |
| 1184 | echo "$(SRCDIR)\forum.js" >> $@ |
| 1185 | echo "$(SRCDIR)\fossil.bootstrap.js" >> $@ |
| 1186 | echo "$(SRCDIR)\fossil.confirmer.js" >> $@ |
| 1187 | echo "$(SRCDIR)\fossil.copybutton.js" >> $@ |
| 1188 | echo "$(SRCDIR)\fossil.diff.js" >> $@ |
| 1189 | echo "$(SRCDIR)\fossil.dom.js" >> $@ |
| 1190 | echo "$(SRCDIR)\fossil.fetch.js" >> $@ |
| 1191 | echo "$(SRCDIR)\fossil.numbered-lines.js" >> $@ |
| 1192 | echo "$(SRCDIR)\fossil.page.brlist.js" >> $@ |
| 1193 | echo "$(SRCDIR)\fossil.page.fileedit.js" >> $@ |
| 1194 | echo "$(SRCDIR)\fossil.page.forumpost.js" >> $@ |
| 1195 | echo "$(SRCDIR)\fossil.page.pikchrshow.js" >> $@ |
| 1196 |