summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorportix <portix@gmx.net>2012-02-21 11:12:12 +0100
committerportix <portix@gmx.net>2012-02-21 11:12:12 +0100
commit6aa51cf05dfe06b9d91a79a4477f1decde68f729 (patch)
treebf4e4b6214b1c24201e48044a77b70897d18cecd /util
parent7f76150bfcbfa178b011985fb8f90d9ac01634ad (diff)
downloaddwb-6aa51cf05dfe06b9d91a79a4477f1decde68f729.zip
Distinguish row colors in settings.html/keys.html
Diffstat (limited to 'util')
-rw-r--r--util/generate_keys.awk9
-rw-r--r--util/generate_settings.awk18
2 files changed, 21 insertions, 6 deletions
diff --git a/util/generate_keys.awk b/util/generate_keys.awk
index 44bbeaef..c2773e94 100644
--- a/util/generate_keys.awk
+++ b/util/generate_keys.awk
@@ -8,14 +8,19 @@ $1 == "#" {
NF > 0 {
id = $1; $1 = ""
sub(/^[[:space:]]*/, "")
- print "<tr class='dwb_table_row'>"
+ if (NR % 2 == 0) {
+ print "<tr class='dwb_table_row_even'>"
+ }
+ else {
+ print "<tr class='dwb_table_row_odd'>"
+ }
print " <td class='dwb_table_cell_left'>" id "</td>"
print " <td class='dwb_table_cell_middle'>" $0 "</td>"
print " <td class='dwb_table_cell_right'> <input id='" id "' type='text' > </td>"
print "</tr>"
}
END {
- print "<tr class='dwb_table_row'><th class='dwb_table_headline' colspan='3'>Custom commands</th></tr>"
+ print "<tr class='dwb_table_row_even'><th class='dwb_table_headline' colspan='3'>Custom commands</th></tr>"
print "<td colspan='3'><div class='desc'>Custom commands can be defined in the following form:"
print "</div><div class='commandLineContainer'><div class='commandline'>[shortcut]:[command];;[command];;...</div></div>"
print "</td></tr>"
diff --git a/util/generate_settings.awk b/util/generate_settings.awk
index 93f8d571..dc977756 100644
--- a/util/generate_settings.awk
+++ b/util/generate_settings.awk
@@ -1,7 +1,7 @@
$1 == "#" {
$1 = ""; $2 = "";
- sub(/^[[:space:]]*/, "")
- print "<tr class='dwb_table_row'>"
+ sub(/^[[:space:]]*/, "");
+ print "<tr class='dwb_table_row'>"
print " <th class='dwb_table_headline' colspan='3'>" $0 "</th>"
print "</tr>"
next
@@ -16,7 +16,12 @@ $2 == "select" {
$i = ""
}
sub(/^[[:space:]]*/, "")
- print "<tr class='dwb_table_row'>"
+ if (NR % 2 == 0) {
+ print "<tr class='dwb_table_row_even'>"
+ }
+ else {
+ print "<tr class='dwb_table_row_odd'>"
+ }
print " <td class='dwb_table_cell_left'>" id "</td>"
print " <td class='dwb_table_cell_middle'>" $0 "</td>"
print " <td class='dwb_table_cell_right'>"
@@ -31,7 +36,12 @@ $2 == "select" {
NF > 0 {
id = $1; type = $2; $1 = ""; $2 = ""
sub(/^[[:space:]]*/, "")
- print "<tr class='dwb_table_row'>"
+ if (NR % 2 == 0) {
+ print "<tr class='dwb_table_row_even'>"
+ }
+ else {
+ print "<tr class='dwb_table_row_odd'>"
+ }
print " <td class='dwb_table_cell_left'>" id "</td>"
print " <td class='dwb_table_cell_middle'>" $0 "</td>"
print " <td class='dwb_table_cell_right'><input id='" id "' type='" type "'></td>"