Fossil SCM
code layout optimoied for user color input and standard style comment for use of jscolor.com..
Commit
87e27419fd33979a4458bd72506b7fb6e72f32c8
Parent
41385f75da4e557…
2 files changed
+14
-6
+10
+14
-6
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -1516,25 +1516,33 @@ | ||
| 1516 | 1516 | @ <td style="background-color: %h(aColor[i].zColor);"> |
| 1517 | 1517 | }else{ |
| 1518 | 1518 | @ <td> |
| 1519 | 1519 | } |
| 1520 | 1520 | if( strcmp(zNewColor, aColor[i].zColor)==0 ){ |
| 1521 | - @ <input type="radio" name="clr" value="%h(aColor[i].zColor)" checked="checked" /> | |
| 1521 | + @ <input type="radio" name="clr" value="%h(aColor[i].zColor)" | |
| 1522 | + @ checked="checked" /> | |
| 1522 | 1523 | stdClrFound=1; |
| 1523 | 1524 | }else{ |
| 1524 | 1525 | @ <input type="radio" name="clr" value="%h(aColor[i].zColor)" /> |
| 1525 | 1526 | } |
| 1526 | 1527 | @ %h(aColor[i].zCName)</td> |
| 1527 | 1528 | if( (i%6)==5 && i+1<nColor ){ |
| 1528 | 1529 | @ </tr><tr> |
| 1529 | 1530 | } |
| 1530 | 1531 | } |
| 1531 | - @ </tr><tr><td> | |
| 1532 | - @ <input type="radio" name="clr" value="%h(aColor[nColor].zColor)" %h(stdClrFound?"":"checked=\"checked\"") /> | |
| 1533 | - @ %h(aColor[i].zCName)</td> | |
| 1534 | - @ <td colspan="5"> | |
| 1535 | - @ <input type="text" name="clrcust" value="%h(stdClrFound?"":zNewColor)" /> | |
| 1532 | + @ </tr><tr> | |
| 1533 | + if (stdClrFound){ | |
| 1534 | + @ <td colspan="6"> | |
| 1535 | + @ <input type="radio" name="clr" value="%h(aColor[nColor].zColor)" /> | |
| 1536 | + }else{ | |
| 1537 | + @ <td style="background-color: %h(zNewColor);" colspan="6"> | |
| 1538 | + @ <input type="radio" name="clr" value="%h(aColor[nColor].zColor)" | |
| 1539 | + @ checked="checked" /> | |
| 1540 | + } | |
| 1541 | + @ %h(aColor[i].zCName) | |
| 1542 | + @ <input type="text" name="clrcust" id="clrcust" class="checkinUserColor" | |
| 1543 | + @ value="%h(stdClrFound?"":zNewColor)" /> | |
| 1536 | 1544 | @ </td> |
| 1537 | 1545 | @ </tr> |
| 1538 | 1546 | @ </table> |
| 1539 | 1547 | @ </td></tr> |
| 1540 | 1548 | |
| 1541 | 1549 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -1516,25 +1516,33 @@ | |
| 1516 | @ <td style="background-color: %h(aColor[i].zColor);"> |
| 1517 | }else{ |
| 1518 | @ <td> |
| 1519 | } |
| 1520 | if( strcmp(zNewColor, aColor[i].zColor)==0 ){ |
| 1521 | @ <input type="radio" name="clr" value="%h(aColor[i].zColor)" checked="checked" /> |
| 1522 | stdClrFound=1; |
| 1523 | }else{ |
| 1524 | @ <input type="radio" name="clr" value="%h(aColor[i].zColor)" /> |
| 1525 | } |
| 1526 | @ %h(aColor[i].zCName)</td> |
| 1527 | if( (i%6)==5 && i+1<nColor ){ |
| 1528 | @ </tr><tr> |
| 1529 | } |
| 1530 | } |
| 1531 | @ </tr><tr><td> |
| 1532 | @ <input type="radio" name="clr" value="%h(aColor[nColor].zColor)" %h(stdClrFound?"":"checked=\"checked\"") /> |
| 1533 | @ %h(aColor[i].zCName)</td> |
| 1534 | @ <td colspan="5"> |
| 1535 | @ <input type="text" name="clrcust" value="%h(stdClrFound?"":zNewColor)" /> |
| 1536 | @ </td> |
| 1537 | @ </tr> |
| 1538 | @ </table> |
| 1539 | @ </td></tr> |
| 1540 | |
| 1541 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -1516,25 +1516,33 @@ | |
| 1516 | @ <td style="background-color: %h(aColor[i].zColor);"> |
| 1517 | }else{ |
| 1518 | @ <td> |
| 1519 | } |
| 1520 | if( strcmp(zNewColor, aColor[i].zColor)==0 ){ |
| 1521 | @ <input type="radio" name="clr" value="%h(aColor[i].zColor)" |
| 1522 | @ checked="checked" /> |
| 1523 | stdClrFound=1; |
| 1524 | }else{ |
| 1525 | @ <input type="radio" name="clr" value="%h(aColor[i].zColor)" /> |
| 1526 | } |
| 1527 | @ %h(aColor[i].zCName)</td> |
| 1528 | if( (i%6)==5 && i+1<nColor ){ |
| 1529 | @ </tr><tr> |
| 1530 | } |
| 1531 | } |
| 1532 | @ </tr><tr> |
| 1533 | if (stdClrFound){ |
| 1534 | @ <td colspan="6"> |
| 1535 | @ <input type="radio" name="clr" value="%h(aColor[nColor].zColor)" /> |
| 1536 | }else{ |
| 1537 | @ <td style="background-color: %h(zNewColor);" colspan="6"> |
| 1538 | @ <input type="radio" name="clr" value="%h(aColor[nColor].zColor)" |
| 1539 | @ checked="checked" /> |
| 1540 | } |
| 1541 | @ %h(aColor[i].zCName) |
| 1542 | @ <input type="text" name="clrcust" id="clrcust" class="checkinUserColor" |
| 1543 | @ value="%h(stdClrFound?"":zNewColor)" /> |
| 1544 | @ </td> |
| 1545 | @ </tr> |
| 1546 | @ </table> |
| 1547 | @ </td></tr> |
| 1548 | |
| 1549 |
+10
| --- src/style.c | ||
| +++ src/style.c | ||
| @@ -649,10 +649,20 @@ | ||
| 649 | 649 | { "span.tktError", |
| 650 | 650 | "format for ticket error messages", |
| 651 | 651 | @ color: red; |
| 652 | 652 | @ font-weight: bold; |
| 653 | 653 | }, |
| 654 | + { "input.checkinUserColor", | |
| 655 | + "format for user color input on checkin edit page", | |
| 656 | + @ # no special definitions, class defined, to enable color pickers, f.e.: | |
| 657 | + @ # add the color picker found at http:jscolor.com as java script include | |
| 658 | + @ # to the header and configure the java script file with | |
| 659 | + @ # 1. use as bindClass :checkinUserColor | |
| 660 | + @ # 2. change the default hash adding behaviour to ON | |
| 661 | + @ # or change the class defition of element identified by id="clrcust" | |
| 662 | + @ # to a standard jscolor definition with java script in the footer. | |
| 663 | + }, | |
| 654 | 664 | { 0, |
| 655 | 665 | 0, |
| 656 | 666 | 0 |
| 657 | 667 | } |
| 658 | 668 | }; |
| 659 | 669 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -649,10 +649,20 @@ | |
| 649 | { "span.tktError", |
| 650 | "format for ticket error messages", |
| 651 | @ color: red; |
| 652 | @ font-weight: bold; |
| 653 | }, |
| 654 | { 0, |
| 655 | 0, |
| 656 | 0 |
| 657 | } |
| 658 | }; |
| 659 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -649,10 +649,20 @@ | |
| 649 | { "span.tktError", |
| 650 | "format for ticket error messages", |
| 651 | @ color: red; |
| 652 | @ font-weight: bold; |
| 653 | }, |
| 654 | { "input.checkinUserColor", |
| 655 | "format for user color input on checkin edit page", |
| 656 | @ # no special definitions, class defined, to enable color pickers, f.e.: |
| 657 | @ # add the color picker found at http:jscolor.com as java script include |
| 658 | @ # to the header and configure the java script file with |
| 659 | @ # 1. use as bindClass :checkinUserColor |
| 660 | @ # 2. change the default hash adding behaviour to ON |
| 661 | @ # or change the class defition of element identified by id="clrcust" |
| 662 | @ # to a standard jscolor definition with java script in the footer. |
| 663 | }, |
| 664 | { 0, |
| 665 | 0, |
| 666 | 0 |
| 667 | } |
| 668 | }; |
| 669 |