-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from danswick/master
Master
- Loading branch information
Showing
10 changed files
with
168 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
deltalumin.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
## On getting URL variables | ||
|
||
- http://css-tricks.com/snippets/javascript/get-url-variables/ | ||
- http://w3lessons.info/2013/02/25/how-to-get-url-parameters-values-using-jquery/ | ||
|
||
## On D3 | ||
|
||
- Binding data - http://alignedleft.com/tutorials/d3/binding-data/ | ||
- Simple example of working with JSON in a variable - http://jsfiddle.net/fg9MU/1/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,20 @@ | ||
$('#idForm').submit(function( e ) { | ||
e.preventDefault(); | ||
console.log( $(this).serialize() ); | ||
location.href = 'http://deltalumin.com/webpage/?' + $(this).serialize(); | ||
console.log(ID); | ||
}); | ||
// check for valid ID. During testing, only < 5. | ||
if( ( parseInt($('#idForm .textInput').val()) > 0 ) && ( parseInt($('#idForm .textInput').val() ) < 5 )) { | ||
console.log( $(this).serialize() ); | ||
location.href = 'http://deltalumin.com/webpage/?' + $(this).serialize(); | ||
console.log(ID); | ||
} else { | ||
document.getElementById('warningText').innerHTML = "Please enter a valid ID number (1-4 for now)."; | ||
} | ||
}); | ||
|
||
// put text box in focus on page load | ||
function setup() { | ||
var textInput; | ||
textInput = $('#idForm .textInput'); | ||
textInput.focus(); | ||
} | ||
|
||
$(window).on('load', setup()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,8 @@ | |
<header> | ||
<nav> | ||
<a href="../index.html">HOME</a> | ||
<a href="index.html" class="current-link">ABOUT</a> | ||
<a href="../about/index.html">ABOUT</a> | ||
<a href="index.html" class="current-link">DASHBOARD</a> | ||
</nav> | ||
|
||
<h1>DELTA<span id="lumin">LUMIN</span></h1> | ||
|
@@ -46,7 +47,9 @@ <h4>Helping you make smarter decisions about energy use.</h4> | |
<form id="idForm"> | ||
<span>User ID:<span> | ||
<br> | ||
<input type="text" name="userID"> | ||
<input class="textInput" type="text" name="userID"> | ||
<br> | ||
<span id="warningText"></span> | ||
<br> | ||
<input id="survey-button" type="submit" value="Go to your dashboard"> | ||
</form> | ||
|
@@ -70,7 +73,18 @@ <h4>Helping you make smarter decisions about energy use.</h4> | |
<p>1-312-487-1087 - <a href="mailto:[email protected]">[email protected]</a></p> | ||
</footer> | ||
</div> | ||
<script type="text/javascript" src="../js/jquery-2.1.3.js"></script> | ||
<script src="../js/main.js"></script> | ||
<script type="text/javascript" src="../js/jquery-2.1.3.js"></script> | ||
<script src="../js/main.js"></script> | ||
<script> | ||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | ||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | ||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | ||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); | ||
|
||
ga('create', 'UA-19653615-3', 'auto'); | ||
ga('send', 'pageview'); | ||
|
||
</script> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.