Skip to content

Instantly share code, notes, and snippets.

@nfreear
Last active August 29, 2015 13:56
Show Gist options
  • Save nfreear/9091445 to your computer and use it in GitHub Desktop.
Save nfreear/9091445 to your computer and use it in GitHub Desktop.
Some AccessifyHTML5.js fixes, and a maintenance message for Compendium LD, for @IET-OU & @a-brasher
Index: download.cfm
===================================================================
--- download.cfm (revision 7255)
+++ download.cfm (working copy)
@@ -56,6 +56,17 @@
<!-- end #sidebar1 -->
</div>
<div id="mainContent">
+
+ <!---NDF: 2014-02-19. --->
+ <cfif IsDefined("URL.maintenance") >
+ <cfheader statuscode="503" statustext="Service Temporarily Unavailable" />
+ <cfheader name="Retry-After" value="3600" />
+
+ <h2 class="style1">Routine Maintenance</h2>
+ <cfabort />
+ </cfif>
+
+
<h2 class="style1">Download CompendiumLD</h2>
<cfif IsDefined("FORM.FieldNames") and Trim(FORM.email) neq "" and FORM.email CONTAINS "@" and Trim(FORM.firstname) neq "" and Trim(FORM.surname) neq "" and Len(FORM.reason)
Index: download/index.cfm
===================================================================
--- download/index.cfm (revision 7255)
+++ download/index.cfm (working copy)
@@ -4,7 +4,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Download CompendiumLD</title>
<!--[if IE]>
-<style type="text/css">
+<style type="text/css">
/* place css fixes for all versions of IE in this conditional comment */
.twoColFixLtHdr #sidebar1 { padding-top: 30px; }
.twoColFixLtHdr #mainContent { zoom: 1; }
@@ -13,14 +13,20 @@
<![endif]-->
<link href="/styles.css" rel="stylesheet" type="text/css" media="screen" />
-<link href="/print.css" rel="stylesheet" type="text/css" media="print" />
+<link href="/print.css" rel="stylesheet" type="text/css" media="print" />
<style type="text/css">
<!--
.style1 {
font-family: Arial, Helvetica, sans-serif
}
+
+body,.twoColFixLtHdr #container, #ou-topbars, .twoColFixLtHdr #header, .twoColFixLtHdr #sidebar1{
+ background-color:#fefefe;
+}
+#clddownload table{ width:50em; }
+#clddownload td{ border:1px solid #eee; }
+#clddownload td input, td label{ display:inline-block; width:98%; }
-->
-
</style>
<link href="/includes/header.css" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="/favicon.ico"/>
@@ -28,20 +34,20 @@
<body class="twoColFixLtHdr">
<div id="ou-topbars">
<div id="ou-topbar">
-<div id="ou-lhs"><a href="http://www.open.ac.uk/"><img src="/includes/oulogo_med.gif" alt="The Open University" width="62" height="102" /></a><a
+<div id="ou-lhs"><a href="http://www.open.ac.uk/"><img src="/includes/oulogo_med.gif" alt="The Open University" width="62" height="102" /></a><a
id="ou-skip2" href="#ou-content">Skip to content</a></div>
<div id="ou-rhs">
-<div id="ou-row1"><ul><li><a id="ou-ouhome" href="http://www.open.ac.uk/">OU Home</a></li><li><a id="ou-study"
+<div id="ou-row1"><ul><li><a id="ou-ouhome" href="http://www.open.ac.uk/">OU Home</a></li><li><a id="ou-study"
-href="http://www3.open.ac.uk/study/">Study at the OU</a></li><li><a id="ou-about" href="http://www3.open.ac.uk/about/">About the OU</a></li><li><a
+href="http://www3.open.ac.uk/study/">Study at the OU</a></li><li><a id="ou-about" href="http://www3.open.ac.uk/about/">About the OU</a></li><li><a
-id="ou-research" href="http://www.open.ac.uk/research/">Research at the OU</a></li><li><a id="ou-search"
+id="ou-research" href="http://www.open.ac.uk/research/">Research at the OU</a></li><li><a id="ou-search"
href="http://www.open.ac.uk/search">Search</a></li><li><a id="ou-contact" href="http://www3.open.ac.uk/contact/">Contact the OU</a></li></ul></div>
<div id="ou-row2">&nbsp;</div>
<div id="ou-row3"><a href="http://www.open.ac.uk/accessibility/" id="ou-access">Accessibility</a></div>
-</div><div id="ou-row5"></div></div><div id="tsxcontent">
+</div><div id="ou-row5"></div></div><!--</div>--><div id="tsxcontent">
<div id="container">
<div id="header">
<h1>CompendiumLD learning design software </h1>
@@ -56,21 +62,37 @@
<!-- end #sidebar1 -->
</div>
<div id="mainContent">
+
+ <!---NDF: 2014-02-19. --->
+ <cfif IsDefined("URL.maintenance") >
+ <cfheader statuscode="503" statustext="Service Temporarily Unavailable" />
+ <cfheader name="Retry-After" value="3600" />
+
+ <h2 class="X-style1">Routine Maintenance</h2>
+ <p>09:00, Thursday 20 February 2014.
+ <p>The download service is currently undergoing routine maintenance. Back shortly.
+ <p><br />
+ <p>Thank you for your patience!
+ <p><br />
+ <cfabort />
+ </cfif>
+
+
<h2 class="style1">Download CompendiumLD</h2>
- <cfif IsDefined("FORM.FieldNames") and Trim(FORM.email) neq "" and FORM.email CONTAINS "@" and Trim(FORM.firstname) neq "" and Trim(FORM.surname) neq "" and Len(FORM.reason)
+ <cfif IsDefined("FORM.FieldNames") and Trim(FORM.email) neq "" and FORM.email CONTAINS "@" and Trim(FORM.firstname) neq "" and Trim(FORM.surname) neq "" and Len(FORM.reason)
LTE 1000>
<cfparam name="FORM.informofnewversion" default="0">
- <cfparam name="FORM.platform" default="WindowsXPorVista">
+ <cfparam name="FORM.platform" default="WindowsXPorVista">
<cfparam name="FORM.versionNumber" default="1.13">
- <cfparam name="FORM.downloadDate" default="">
+ <cfparam name="FORM.downloadDate" default="">
<cfset FORM.downloadDate = #Now()#>
<cfquery datasource="compendiumld">
- INSERT INTO users (email, firstname, surname, jobtitle, institution, department, reason, informofnewversion, versionNumber, platform,
+ INSERT INTO users (email, firstname, surname, jobtitle, institution, department, reason, informofnewversion, versionNumber, platform,
-downloadDate)
- VALUES(<cfqueryparam cfsqltype="varchar" value="#FORM.email#" maxlength="200">,
+downloadDate)
+ VALUES(<cfqueryparam cfsqltype="varchar" value="#FORM.email#" maxlength="200">,
<cfqueryparam cfsqltype="varchar" value="#FORM.firstname#" maxlength="50">,
<cfqueryparam cfsqltype="varchar" value="#FORM.surname#" maxlength="50">,
<cfqueryparam cfsqltype="varchar" value="#FORM.jobtitle#" maxlength="200">,
@@ -86,9 +108,9 @@
</cfquery>
-<input name="downloadDate" type="hidden" id="downloadDate" value="<cfoutput>>#DateFormat(Now())# #TimeFormat(Now())#</cfoutput>">
-
-
+<input name="downloadDate" type="hidden" id="downloadDate" value="<cfoutput>#DateFormat(Now())# #TimeFormat(Now())#</cfoutput>">
+
+
<cfif FORM.platform eq "WindowsXPorVista">
<cfset FORM.versionNumber = "1.2">
<p class="downloadBox">
@@ -103,71 +125,71 @@
<ol>
<li>Download the installer from the link above</li>
<li>Run the installer and follow the instructions.<br/>
- Note that this process should take about 5 minutes. You will need an additional 5 minutes and
+ Note that this process should take about 5 minutes. You will need an additional 5 minutes and
may be prompted to restart your machine if you have not previously installed Java. </br>
- To install CompendiumLD on either Windows XP, Vista or 7, you should have <em>ADMINISTRATIVE rights</em>.
+ To install CompendiumLD on either Windows XP, Vista or 7, you should have <em>ADMINISTRATIVE rights</em>.
To ensure the installer is run with the necessary privileges in Windows Vista or 7 you should right-click on the installer and select <code >'Run as administrator'</code>.</li>
</ol>
</p>
<p class="fltlft">
<em >If you are upgrading from a previous release of CompendiumLD we recommend that you copy your previous installation to another folder (e.g. CompendiumLD-backup) before proceeding with the installation of this upgrade.</em>
</p>
-
+
<cfelseif FORM.platform eq "MacOs">
<cfset FORM.versionNumber = "1.2">
- <p class="downloadBox"><em><a href="/downloads/version1.0/CompendiumLDv<cfoutput>#FORM.versionNumber#</cfoutput>.dmg">Download CompendiumLD v<cfoutput>#FORM.versionNumber#</cfoutput> for Mac
+ <p class="downloadBox"><em><a href="/downloads/version1.0/CompendiumLDv<cfoutput>#FORM.versionNumber#</cfoutput>.dmg">Download CompendiumLD v<cfoutput>#FORM.versionNumber#</cfoutput> for Mac
OS</a></em><br />(click or right-click to download)</p>
- <p class="fltlft">CompendiumLD version <cfoutput>#FORM.versionNumber#</cfoutput> for Mac OS X (32 bit) has been tested on 10.5 (Leopard) and 10.6 (Snow Leopard). It requires Java J2SE 5.0 Release 4 (aka
+ <p class="fltlft">CompendiumLD version <cfoutput>#FORM.versionNumber#</cfoutput> for Mac OS X (32 bit) has been tested on 10.5 (Leopard) and 10.6 (Snow Leopard). It requires Java J2SE 5.0 Release 4 (aka
-1.5.0_4) or later which is installed on most Macs by default. It should also run on for 10.4 (Tiger) but has not been tested. Please let <a
+1.5.0_4) or later which is installed on most Macs by default. It should also run on for 10.4 (Tiger) but has not been tested. Please let <a
href="mailto:a.j.brasher@open.ac.uk">Andrew</a> know how you get on if you try it on Tiger.</p>
<cfelseif FORM.platform eq "Linux">
<p class="downloadBox"><em ><a href="/downloads/version1.0/CompendiumLDv<cfoutput>#FORM.versionNumber#</cfoutput>.tar.gz">Download CompendiumLD v<cfoutput>#FORM.versionNumber#</cfoutput> for Linux</a></em><br />(click or right-click to download)</p>
<p>Once you have downloaded the .tar.gz zip file, extract it into a directory of your choice. You can then run CompendiumLD by navigating to the CompendiumLD directory and typing:<br /> <code>./compendiumLD.sh </code><br />
- into a terrminal.</p>
+ into a terrminal.</p>
<p>Compendium is a Java application, so it requires a Java Runtime Environment (1.5+) to be installed before you can run it.</p>
<cfelse >
<p class="downloadBox">Sorry, something has gone wrong. Please try again.</p>
</cfif>
- <p class="fltlft">This prototype has been released to allow users to explore CompendiumLD and influence and inform its development, and we
+ <p class="fltlft">This prototype has been released to allow users to explore CompendiumLD and influence and inform its development, and we
-may contact you later this year to ask for feedback about this prototype. We would be pleased to hear from you so please e-mail any
+may contact you later this year to ask for feedback about this prototype. We would be pleased to hear from you so please e-mail any
feedback to <a href="mailto:a.j.brasher@open.ac.uk">Andrew Brasher</a> or submit any feature requests or bug reports to the <a href="http://compendium.open.ac.uk/bugzilla/enter_bug.cgi?product=CompendiumLD">Compendium bug reports and feature requests system</a>. </p>
<p class="fltlft">
When you have installed CompendiumLD please refer to the <a href="gettingstarted.html">Getting started</a> area of the CompendiumLD web site.
</p>
- <p class="fltlft">There are also <a href="documentation.html">links to documents, videos and other resources</a> about CompendiumLD on this
+ <p class="fltlft">There are also <a href="documentation.html">links to documents, videos and other resources</a> about CompendiumLD on this
website.</p>
<cfelse>
<input name="downloadDate" type="hidden" id="downloadDate" value="<cfoutput>>#DateFormat(Now())# #TimeFormat(Now())#</cfoutput>" />
- <p>We are committed to the free distribution of CompendiumLD.
- In return, please can we encourage you to supply authentic contact details and a brief line about your interest in CompendiumLD.
+ <p>We are committed to the free distribution of CompendiumLD.
+ In return, please can we encourage you to supply authentic contact details and a brief line about your interest in CompendiumLD.
We will only use the email address you supply for CompendiumLD-specific updates.</p>
<p>Even if you have already registered when you downloaded an earlier version, please re-enter your details so we know who has upgraded. </p>
-
+
<cfif IsDefined("FORM.email") and Trim(FORM.email) eq "">
<p class="warning">Please enter your e-mail address</p>
</cfif>
<cfif IsDefined("FORM.email") and FORM.email DOES NOT CONTAIN "@">
<p class="warning">Please enter a valid e-mail address</p>
</cfif>
-
+
<cfif IsDefined("FORM.firstname") and Trim(FORM.firstname) eq "">
<p class="warning">Please enter your firstname</p>
</cfif>
-
+
<cfif IsDefined("FORM.surname") and Trim(FORM.surname) eq "">
<p class="warning">Please enter your surname</p>
</cfif>
<cfif IsDefined("FORM.reason") and Len(FORM.reason) GT 1000>
- <p class="warning">Too may characters in 'Reason for interest in CompendiumLD': please enter 1000 or less. You have entered
+ <p class="warning">Too may characters in 'Reason for interest in CompendiumLD': please enter 1000 or less. You have entered
<cfoutput>#Len(FORM.reason)#</cfoutput>.</p>
</cfif>
@@ -179,14 +201,14 @@
<cfparam name="FORM.department" default="">
<cfparam name="FORM.reason" default="">
<cfparam name="FORM.informofnewversion" default="1">
-
+
<cfform id="clddownload" name="clddownload" method="post" action="" preserveData="yes">
<p>&nbsp;</p>
<table width="200" border="0">
<tr>
<td><label for="email">E-mail (required)</label></td>
<td>
- <cfinput name="email" type="text" id="email" size="30" value="#FORM.email#" required="yes" message="You must enter an e-mail
+ <cfinput name="email" type="text" id="email" size="30" maxlength="150" placeholder="you@example.edu" value="#FORM.email#" required="yes" class="required" message="You must enter an e-mail
address."/>
</td>
@@ -194,7 +216,7 @@
<tr>
<td><label for="firstname">Firstname (required) </label></td>
<td>
- <cfinput name="firstname" type="text" id="firstname" size="30" value ="#FORM.firstname#" required="yes" message="You must enter a first
+ <cfinput name="firstname" type="text" id="firstname" size="30" maxlength="40" value ="#FORM.firstname#" required="yes" class="required" message="You must enter a first
name."/>
</td>
@@ -202,25 +224,25 @@
<tr>
<td><label for="surname">Surname (required)</label></td>
<td>
- <cfinput name="surname" type="text" id="surname" size="30" value="#FORM.surname#" required="yes" message="You must enter a surname"/>
+ <cfinput name="surname" type="text" id="surname" size="30" maxlength="40" value="#FORM.surname#" required="yes" class="required" message="You must enter a surname"/>
</td>
</tr>
<tr>
<td><label for="jobtitle">Job Title</label></td>
<td>
- <cfinput name="jobtitle" type="text" id="jobtitle" value="#FORM.jobtitle#" size="30" />
+ <cfinput name="jobtitle" type="text" id="jobtitle" value="#FORM.jobtitle#" size="30" maxlength="150" />
</td>
</tr>
<tr>
<td><label for="institution">Institution</label></td>
<td>
- <cfinput name="institution" type="text" id="institution" value="#FORM.institution#" size="30" />
+ <cfinput name="institution" type="text" id="institution" value="#FORM.institution#" size="30" maxlength="150" />
</td>
</tr>
<tr>
<td><label for="department">Department</label></td>
<td>
- <cfinput name="department" type="text" id="department" value="#FORM.department#" size="30" />
+ <cfinput name="department" type="text" id="department" value="#FORM.department#" size="30" maxlength="150" />
</td>
</tr>
</table>
@@ -230,18 +252,18 @@
<p>
</cfif>
<label for="reason">Reasons for interest in CompendiumLD (max. 1000 characters)</label></p>
- <p>
- <cftextarea name="reason" id="reason" cols="45" rows="5"><cfoutput>#FORM.reason#</cfoutput></cftextarea>
+ <p>
+ <cftextarea name="reason" id="reason" cols="45" rows="5" placeholder=""><cfoutput>#FORM.reason#</cfoutput></cftextarea>
</p>
<p>
<input type="checkbox" name="informofnewversion" id="informofnewversion" value="1" <cfif FORM.informofnewversion>checked="checked"</cfif> />
- <label for="informofnewversion">Inform me when new versions of CompendiumLD are released </label></p>
-
-
+ <label for="informofnewversion">Inform me when new versions of CompendiumLD are released </label></p>
+
+
<fieldset>
<legend>Please select the operating system CompendiumLD is to be installed on:</legend>
<p>
- <input type="radio" name="platform" id="platformWinXpVista" value="WindowsXPorVista" checked="checked" /><label
+ <input type="radio" name="platform" id="platformWinXpVista" value="WindowsXPorVista" checked="checked" /><label
for="platformWinXpVista">Windows XP or Vista or 7</label><br />
<input type="radio" name="platform" id="platformMacOS" value="MacOs"/><label for="platformMacOS">Mac OS</label><br />
@@ -261,13 +283,13 @@
<!-- end #container -->
</div>
</div><div id="ou-row6"></div><div id="ou-footerm">
-<div class="ou-footrow">&#169; The Open University &nbsp; +44 (0)845 300 60 90 &nbsp; <a
+<div class="ou-footrow">&#169; The Open University &nbsp; +44 (0)845 300 60 90 &nbsp; <a
-href="http://www3.open.ac.uk/contact/index.aspx?form=true">Email us</a></div>
+href="http://www3.open.ac.uk/contact/index.aspx?form=true">Email us</a></div>
</div>
</div>
<script type="text/javascript">//<![CDATA[
-ou_init();
+if (typeof ou_init === "function") ou_init();
//]]></script>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
@@ -277,5 +299,33 @@
var pageTracker = _gat._getTracker("UA-5304738-2");
pageTracker._trackPageview();
</script>
+
+
+
+<script src="http://cdn.enderjs.com/jeesh.min.js"></script>
+<script>
+$(document).ready(function () {
+ $("input#email").attr("type", "email");
+ $("textarea#reason").attr("maxlength", 800);
+ $("input.required").attr({ required: "", "aria-required": true });
+});
+</script>
+
+<!--
+<script src="http://iet-embed-acct.open.ac.uk/dev/accessifyhtml5.js/accessifyhtml5.min.js"></script>
+<script>
+AccessifyHTML5(false, {
+ "input#email": {
+ type: "email"
+ },
+ "input.required": {
+ required: "",
+ "aria-required": true
+ }
+});
+
+</script>
+-->
+
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment