BlueBeard/MobylyzeJS — pull request #23 by ryanricig (2012-12-18 20:08:53+00:00)
Title: Changes

-introduced new follow toggle using images, still issues with the way it functions on certain pages...mind boggling - works nicely on events and any detail pages...there is something wacky going on for me with home/actions/news/bundles - everything gets called a ton of times for me...still think it has to do with the cache calls but couldn't seem to debug

-moved create account modal into index.html

-implemented jquery validation:
we can tweak how we use this, but now basically you add "validateMe" to any form you want to validate, and then call sh.content.validate.go(PageID) on the page you are loading if the page isn't already in the DOM (like a modal or detail).

then, instead of listening to the clicking of the submit button, you listen for the custom "form-success" event on that particular form, and then do your stuff. : example:

$('#all-container').on('form-success', '#the-join-form', function(e) {
e.preventDefault();

sh.user.createSubmit(function() {
console.log('user account created');

etc.

right now i'm just adding a little red border to the left of the form field, going to implement a tooltip-ish solution for the focused error field, but not finished with that yet