aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2009-11-19 16:31:00 +0100
committerBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2009-11-19 16:31:00 +0100
commitdebd09d74509b18578eb72f447e797c1dac4fdeb (patch)
tree7c17e3ac19c1dd36e21f5da6c279acba28ab68a7
parent8866d54e8cbf613f209758eecfdd89c430c8dd89 (diff)
colored input fields
Diffstat (limited to '')
-rw-r--r--dudle.css20
-rw-r--r--poll.rb10
2 files changed, 21 insertions, 9 deletions
diff --git a/dudle.css b/dudle.css
index 45cedc2..4df7e39 100644
--- a/dudle.css
+++ b/dudle.css
@@ -10,6 +10,18 @@ td.ayes, input.choosen { background-color:#0F0; }
td.cno { background-color:#F00; }
td.bmaybe { background-color:#FF0; }
td.undecided { background-color:#DDD;color:#666 }
+td.checkboxes {
+ background-color: #DDD;
+ padding-left: 0px;
+ padding-right: 0px;
+}
+table.checkboxes{
+ width: 100%;
+ border-collapse: collapse;
+}
+td.input-cno { background-color: #F00 }
+td.input-ayes { background-color: #0F0}
+td.input-bmaybe { background-color: #FF0}
label { cursor: pointer; }
@@ -62,7 +74,8 @@ td {
vertical-align:middle;
text-align:center;
border-width: 0px;
- padding: 1px 3px;
+ padding-left: 3px;
+ padding-right: 3px;
}
td.sum, tr.participantrow, tr#add_participant, tr#summary {
@@ -78,7 +91,8 @@ tr.participantrow:hover {
}
th {
- padding: 1px 3px;
+ padding-left: 3px;
+ padding-right: 3px;
color: white;
background-color:black;
font-weight: normal;
@@ -91,7 +105,6 @@ th a{
td.date {
color: Gray;
- text-align: left;
}
html {
@@ -167,4 +180,3 @@ div#config{
width:20ex;
}
-
diff --git a/poll.rb b/poll.rb
index 8aab599..b620a91 100644
--- a/poll.rb
+++ b/poll.rb
@@ -141,10 +141,10 @@ class Poll
ret += "</td>\n"
unless config
@head.each_column{|columnid,columntitle|
- ret += "<td class='checkboxes'><table>"
+ ret += "<td class='checkboxes'><table class='checkboxes'>"
[[YES, YESVAL],[NO, NOVAL],[MAYBE, MAYBEVAL]].each{|valhuman, valbinary|
- ret += "<tr>
- <td>
+ ret += "<tr class='input-#{valbinary}'>
+ <td class='input-#{valbinary}'>
<input type='radio'
value='#{valbinary}'
id=\"add_participant_checked_#{CGI.escapeHTML(columnid.to_s.gsub(" ","_").gsub("+","_"))}_#{valbinary}\"
@@ -158,9 +158,9 @@ class Poll
}
ret += "</table></td>"
}
- ret += "<td class='checkboxes'>"
+ ret += "<td class='date'>"
else
- ret += "<td class='checkboxes' colspan='#{@head.col_size + 1}'>"
+ ret += "<td class='date' colspan='#{@head.col_size + 1}'>"
end
if @data.include?(edituser)
ret += "<input type='submit' value='edit user' />"