Changes between Version 3 and Version 4 of TablePlugin
- Timestamp:
- Aug 5, 2012, 3:20:30 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TablePlugin
v3 v4 27 27 == Example == 28 28 29 Example style definitions. The style page is located under the TRAC_ROOT/wiki/TablePluginStyles. All styles should be defined inside a codeblock. 29 30 30 31 {{{ 31 32 32 Example definition of a table:33 @table default: 33 34 35 table.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 44 table.default thead th { 45 border-width: 1px; 46 padding: 2px; 47 border-style: solid; 48 border-color: #666666; 49 background-color: #dedede; 50 } 51 52 table.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 73 Example definition of a table with some styles applied: 74 75 {{{ 76 77 {{{ 34 78 #!table 35 79 36 @table table1: 80 #!-- Define the table style 37 81 38 .table1 table, th, td { 39 border: 1px solid black; 40 } 82 @table (@default): 41 83 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 51 85 52 86 @column task … … 54 88 @column status 55 89 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 57 96 @task: Task 58 97 @details: Details 59 98 @status: Status 60 99 100 #!-- The next row, noticed the @complete style applied to @status cell. 101 61 102 @task: Task 1 62 103 @details: Details of Task 1. 63 @status : Complete104 @status (@complete): Complete 64 105 106 #!-- Remaining rows below... 65 107 66 108 @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 70 111 71 112 @task: Task 3 72 113 @details: Details of Task 3. 73 @status: Complete 74 114 @status (@not_complete): Not Complete 75 115 76 116 @task: Task 4 77 @details: Details of Task 4. We should be highlighted correctly using tr:nth-child(even)78 @status: Complete117 @details: Details of Task 4. 118 @status: Waiting... 79 119 80 120 @task: Task 5 81 121 @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 }}} 91 124 92 125 }}}