[gimp-web] Add optional "platform" parameter to renderDownload function.
- From: Michael Schumacher <schumaml src gnome org>
- To: svn-commits-list gnome org
- Subject: [gimp-web] Add optional "platform" parameter to renderDownload function.
- Date: Wed, 22 Jul 2009 20:27:54 +0000 (UTC)
commit 138088a8685759b9847834a30583c0f26f53a243
Author: Michael Schumacher <schumaml gmx de>
Date: Wed Jul 22 22:23:34 2009 +0200
Add optional "platform" parameter to renderDownload function.
If this parameter is undefined, the function's behaviour is not changed: the
include file is determined by the autodetected platform of the visitor.
If the platform parameter is set, then the include file <platform>.xhtml is used.
If the platform parameter is set to "all", then all platform-specific includes
are used.
A link to show all platforms is shown if platform is undefined or set to any
value except "all".
includes/wgo.js | 24 ++++++++++++++++++++----
1 files changed, 20 insertions(+), 4 deletions(-)
---
diff --git a/includes/wgo.js b/includes/wgo.js
index 4ba6c9e..3dcc50f 100644
--- a/includes/wgo.js
+++ b/includes/wgo.js
@@ -24,10 +24,26 @@ function mangleforOpera() {
}
//provide download page depending on OS
-function renderDownload() {
- $("#downloads").html("<div id=\"os\"> </div>\n<hr />\n<div id=\"source\"> </div>\n");
- $("#os").load($.browser.OS + ".xhtml"); //OS specific
- $("#source").load("source.xhtml"); //sources for all
+function renderDownload(platform) {
+
+ $("#downloads").html("<div id=\"os\"> </div>\n<div id=\"moreos\"></div>\n<hr />\n<div id=\"source\"> </div>\n");
+
+ if (platform == undefined) {
+ $("#os").load($.browser.OS + ".xhtml"); // OS specific (autodetected)
+ $("#moreos").html("<a href=\"javascript:renderDownload('all');\">Show other downloads</a>");
+ }
+ else if (platform == "all") {
+ $("#os").load("Linux.xhtml");
+ $("#os").load("Mac.xhtml");
+ $("#os").load("Windows.xhtml");
+ }
+ else
+ {
+ $("#os").load(platform + ".xhtml"); // OS specific (manual)
+ $("#moreos").html("<a href=\"javascript:renderDownload('all');\">Show other downloads</a>");
+ }
+
+ $("#source").load("source.xhtml"); //sources for all
}
var usertyped = ""; //for the easteregg
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]