aboutsummaryrefslogtreecommitdiff
path: root/website/index.js
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@tipit.to>2009-07-11 00:43:53 +0200
committerReinier Zwitserloot <reinier@tipit.to>2009-07-11 00:43:53 +0200
commit762bcba0074a0d922ce9c37e57642f5f2bf0afb4 (patch)
treeaeb9744044cd8d5e8f65da5cd8fef963e78f5d8e /website/index.js
parent08bc31232f35026b674cfaff26097febbe2c8af7 (diff)
downloadlombok-762bcba0074a0d922ce9c37e57642f5f2bf0afb4.tar.gz
lombok-762bcba0074a0d922ce9c37e57642f5f2bf0afb4.tar.bz2
lombok-762bcba0074a0d922ce9c37e57642f5f2bf0afb4.zip
More work on the website.
Diffstat (limited to 'website/index.js')
-rw-r--r--website/index.js44
1 files changed, 43 insertions, 1 deletions
diff --git a/website/index.js b/website/index.js
index 73cb3bbe..ee36dd3c 100644
--- a/website/index.js
+++ b/website/index.js
@@ -1,8 +1,50 @@
$(function() {
+ addGlow();
+ fixDownloadLink();
+});
+
+function fixDownloadLink() {
+ $("#downloadLink").attr("href", "http://projectlombok.googlecode.com/files/lombok.jar")
+ .click(function(event) {
+ showDownloadInfo();
+ event.preventDefault();
+ });
+
+ $(".backToBar").click(function(event) {
+ $("#downloadInfo").hide();
+ });
+}
+
+function showDownloadInfo() {
+ if ( !$("#downloadInfo").data("filled") ) {
+ $("#downloadInfo").data("filled", true);
+ $.ajax({
+ type: "GET",
+ url: "download.html",
+ success: function(html) {
+ var pos = html.search(/<p\s+id\s*=\s*"downloadHelp"[^>]*>/i);
+ if ( pos == -1 ) return;
+ html = html.substring(pos);
+ pos = html.search(">");
+ html = html.substring(pos + 1);
+ pos = html.search(/<\s*\/\s*p\s*>/);
+ html = html.substring(0, pos);
+ var p = $("<p>").html(html).append($("#downloadInfo .downloadActions"));
+ $("#downloadInfo span:first-child").replaceWith(p);
+ $("#downloadInfo").show();
+ }
+ });
+ } else {
+ $("#downloadInfo").show();
+ }
+}
+
+function addGlow() {
+ $("a").addClass("js");
$(".button,.download").addGlow({
radius: 20,
textColor: '#00f',
haloColor: '#00f',
duration: 500
});
-});
+} \ No newline at end of file