aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2010-03-08 14:27:31 +0100
committerBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2010-03-08 14:27:31 +0100
commit04e9dc5d7539c1bca0bde3a0e68b9c9ea7d8873e (patch)
tree09d6a455b6e284a9bf91166058d2d4bfd6796754
parentf7cc61b522acb1365257e7c61149a8e52e27a741 (diff)
first attempt to implement timeline
-rw-r--r--charset.rb8
-rw-r--r--default.css16
-rw-r--r--dudle.rb17
3 files changed, 36 insertions, 5 deletions
diff --git a/charset.rb b/charset.rb
index 3d74dcd..8aa6718 100644
--- a/charset.rb
+++ b/charset.rb
@@ -44,6 +44,9 @@ if $USEUTF
DELETE = CGI.escapeHTML("✖")
PASSWORDSTAR = CGI.escapeHTML("•")
+
+ NUMBERS = ["①","②","③","④"]
+ DASH = "─"
else
NOSORT = ''
SORT = CGI.escapeHTML('^')
@@ -64,6 +67,9 @@ else
DELETE = CGI.escapeHTML("delete")
PASSWORDSTAR = CGI.escapeHTML("*")
+
+ NUMBERS = ["1","2","3","4"]
+ DASH = "-"
end
-UTFCHARS = CGI.escapeHTML("✔✘◀▶✍✖•▾▴")
+UTFCHARS = CGI.escapeHTML("✔✘◀▶✍✖•▾▴①②③④─")
diff --git a/default.css b/default.css
index d4395eb..306f758 100644
--- a/default.css
+++ b/default.css
@@ -22,9 +22,21 @@
background-color: #FFF;
}
+a.navigationlink {
+ color:#f96;
+ text-decoration:none;
+}
+a.navigationlink:visited {
+ color:#9c6;
+}
+a.navigationlink:active, a.navigationlink:hover {
+ color:#ff6;
+ text-decoration:none;
+}
+
a, a:visited {
-color:#36c;
-text-decoration:none;
+ color:#36c;
+ text-decoration:none;
}
a:hover, a:active {
diff --git a/dudle.rb b/dudle.rb
index 9256a3e..5904636 100644
--- a/dudle.rb
+++ b/dudle.rb
@@ -165,7 +165,18 @@ HEAD
end
def wizzard_nav
- ret = "<div id='wizzard_navigation'><table><tr>"
+ ret = "<div id='wizzard_navigation'>"
+ ret += "<table><tr>"
+
+ # add a timeline
+ ret += "<td colspan='3'>"
+ i = -1
+ ret += @configtabs.collect{|title,link|
+ "<a class='navigationlink' href='#{link}' title='#{title}'>#{NUMBERS[i+=1]}</a>"
+ }.join(DASH*2)
+ ret += "</td>"
+ ret += "</tr><tr>"
+
[[_("Previous"),@wizzardindex == 0],
[_("Next"),@wizzardindex >= @configtabs.size()-2],
[_("Finish"),@wizzardindex == @configtabs.size()-1]].each{|button,disabled|
@@ -180,7 +191,9 @@ HEAD
</td>
READY
}
- ret += "</tr></table></div>"
+
+ ret += "</tr></table>"
+ ret += "</div>"
end
def wizzard_redirect