Changes between Version 3 and Version 4 of TablePlugin


Ignore:
Timestamp:
Aug 5, 2012 5:20:30 PM (2 years ago)
Author:
jonny
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TablePlugin

    v3 v4  
    2727== Example == 
    2828 
     29Example style definitions. The style page is located under the TRAC_ROOT/wiki/TablePluginStyles. All styles should be defined inside a codeblock. 
    2930 
    3031{{{ 
    3132 
    32 Example definition of a table: 
     33@table default: 
    3334 
     35table.default { 
     36    font-family: verdana,arial,sans-serif; 
     37    font-size:11px; 
     38    color:#333333; 
     39    border-width: 1px; 
     40    border-color: #666666; 
     41    border-collapse: collapse; 
     42} 
     43 
     44table.default thead th { 
     45    border-width: 1px; 
     46    padding: 2px; 
     47    border-style: solid; 
     48    border-color: #666666; 
     49    background-color: #dedede; 
     50} 
     51 
     52table.default tbody td { 
     53    border-width: 1px; 
     54    padding: 2px; 
     55    border-style: solid; 
     56    border-color: #666666; 
     57} 
     58 
     59@css header: 
     60    font-weight: bold; 
     61    text-align: center; 
     62 
     63@css complete: 
     64    font-weight: bold; 
     65    background: palegreen; 
     66 
     67@css not_complete: 
     68    font-weight: bold; 
     69    background: #F80000; 
     70 
     71}}} 
     72 
     73Example definition of a table with some styles applied: 
     74 
     75{{{ 
     76 
     77{{{ 
    3478#!table 
    3579 
    36 @table table1: 
     80#!-- Define the table style 
    3781 
    38 .table1 table, th, td { 
    39     border: 1px solid black; 
    40 } 
     82@table (@default): 
    4183 
    42 .table1 tbody tr:nth-child(even){ 
    43     background-color:#444; 
    44     color:yellow; 
    45 } 
    46  
    47  
    48 @css heading: 
    49     font-weight: bold; 
    50     text-align: center; 
     84#!-- Define the three columns to use 
    5185 
    5286@column task 
     
    5488@column status 
    5589 
    56 @row (@heading) 
     90#!-- Tell the TablePlugin that this row should be styled with @header 
     91 
     92@row (@header) 
     93 
     94#!-- Define the first row, the table headers 
     95 
    5796@task: Task 
    5897@details: Details 
    5998@status: Status 
    6099 
     100#!-- The next row, noticed the @complete style applied to @status cell. 
     101 
    61102@task: Task 1 
    62103@details: Details of Task 1. 
    63 @status: Complete 
     104@status (@complete): Complete 
    64105 
     106#!-- Remaining rows below... 
    65107 
    66108@task: Task 2 
    67 @details: Details of Task 2. We should be highlighted correctly using tr:nth-child(even) 
    68 @status: Complete 
    69  
     109@details: Details of Task 2. 
     110@status (@complete): Complete 
    70111 
    71112@task: Task 3 
    72113@details: Details of Task 3. 
    73 @status: Complete 
    74  
     114@status (@not_complete): Not Complete 
    75115 
    76116@task: Task 4 
    77 @details: Details of Task 4. We should be highlighted correctly using tr:nth-child(even) 
    78 @status: Complete 
     117@details: Details of Task 4. 
     118@status: Waiting... 
    79119 
    80120@task: Task 5 
    81121@details: Details of Task 5. 
    82 @status: Complete 
    83  
    84 @task: Task 6 
    85 @details: Details of Task 6. We should be highlighted correctly using tr:nth-child(even) 
    86 @status: Complete 
    87  
    88 @task: Task 7 
    89 @details: Details of Task 7. 
    90 @status: Complete 
     122@status: Waiting... 
     123}}} 
    91124 
    92125}}}