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
I, [2012-09-20T09:29:17.392101 #15856] INFO -- : listening on addr=0.0.0.0:4567 fd=9 | |
I, [2012-09-20T09:29:17.392574 #15856] INFO -- : Refreshing Gem list | |
/Users/evan/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/sprockets-sass-0.9.0/lib/sprockets/sass/functions.rb:128:in `sprockets_context': undefined method `context' for #<Sass::Importers::Filesystem:0x007fdcdf5508c0> (NoMethodError) | |
(in /Users/evan/Code/b/spendsmart/app/assets/css/style.scss) | |
from /Users/evan/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/sprockets-sass-0.9.0/lib/sprockets/sass/functions.rb:63:in `image_path' | |
from /Users/evan/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/sprockets-sass-0.9.0/lib/sprockets/sass/functions.rb:85:in `image_url' | |
from /Users/evan/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/sass-3.2.1/lib/sass/script/funcall.rb:106:in `_perform' | |
from /Users/evan/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/sass-3.2.1/lib/sass/script/node.rb:40:in `perform' | |
from /Users/evan/.rbenv/versi |
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
I, [2012-09-25T10:56:07.756021 #19344] INFO -- : listening on addr=0.0.0.0:4567 fd=10 | |
I, [2012-09-25T10:56:07.757704 #19344] INFO -- : master process ready | |
I, [2012-09-25T10:56:07.758411 #19345] INFO -- : Refreshing Gem list | |
I, [2012-09-25T10:56:07.758597 #19346] INFO -- : Refreshing Gem list | |
I, [2012-09-25T10:56:09.282028 #19345] INFO -- : worker=0 ready | |
I, [2012-09-25T10:56:09.286339 #19346] INFO -- : worker=1 ready | |
NoMethodError - undefined method `image_path' for #<Sinatra::Application:0x007fb2be3e6750>: | |
./application/views/layout.erb:8:in `evaluate_source' | |
/Users/evan/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/tilt-1.3.3/lib/tilt/template.rb:209:in `instance_eval' | |
/Users/evan/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/tilt-1.3.3/lib/tilt/template.rb:209:in `evaluate_source' |
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
/* | |
* Params.js | |
* | |
* Super simple parser of query string parameters. | |
* Creates a variable 'params' on the 'window' object. | |
* | |
*/ | |
(function() { | |
var params = {}, | |
capture = void 0, |
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
<html> | |
<head> | |
<style> | |
/* just a little breathing room for screenshots */ | |
body { padding: 40px; } | |
</style> | |
<body> | |
<form> | |
<input type='email' required name='email'> | |
<button type='submit'> |
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
var validateForm = function(submitEvent) { | |
/* We'll fill this in incrementally. */ | |
}; | |
document.addEventListener('DOMContentLoaded', function() { | |
var forms = document.querySelectorAll('form'); | |
for (var index = forms.length - 1; index >= 0; index--) { | |
var form = forms[index]; |
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
if (!submitEvent.target.checkValidity()) { | |
/* oh noes! */ | |
} else { | |
return true; /* everything's cool, the form is valid! */ | |
} |
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
var form = submitEvent.target, | |
elements = form.elements; | |
/* Loop through the elements, looking for an invalid one. */ | |
for (var index = 0, len = elements.length; index < len; index++) { | |
var element = elements[index]; | |
if (element.willValidate === true && element.validity.valid !== true) { | |
/* element is invalid, let's do something! */ | |
/* break from our loop */ |
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
var message = element.validationMessage, | |
parent = element.parentNode, | |
div = document.createElement('div'); | |
/* Add our message to a div with class 'validation-message' */ | |
div.appendChild(document.createTextNode(message)); | |
div.classList.add('validation-message'); | |
/* Add our error message just after element. */ | |
parent.insertBefore(div, element.nextSibling); |
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
var validateForm = function(submitEvent) { | |
if (!submitEvent.target.checkValidity()) { | |
/* Seriously, hold everything. */ | |
submitEvent.preventDefault(); | |
submitEvent.stopImmediatePropagation(); | |
submitEvent.stopPropagation(); | |
var form = submitEvent.target, | |
elements = form.elements; |
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
/* | |
Determine the best message to return based on validity state. | |
*/ | |
var validationMessageFor = function(element) { | |
var name = element.nodeName, | |
type = element.type, | |
/* Custom, reused messages. */ | |
emailMessage = "Please enter a valid email address."; |