modularized SSO, paving the way for potential plugins. cleaned up associated templates/js

This commit is contained in:
psychobunny
2013-11-27 16:47:40 -05:00
parent 0a06f1ac7d
commit 89c5d01efa
6 changed files with 49 additions and 70 deletions

View File

@@ -1,24 +1,7 @@
define(function() {
var Login = {};
Login.init = function() {
// Alternate Logins
var altLoginEl = document.querySelector('.alt-logins');
altLoginEl.addEventListener('click', function(e) {
var target;
switch (e.target.nodeName) {
case 'LI':
target = e.target;
break;
case 'I':
target = e.target.parentNode;
break;
}
if (target) {
document.location.href = target.getAttribute('data-url');
}
});
Login.init = function() {
$('#login').on('click', function() {
var loginData = {
'username': $('#username').val(),

View File

@@ -134,11 +134,6 @@ define(function() {
}
});
// Alternate Logins
$('.alt-logins li').on('click', function(e) {
document.location.href = $(this).attr('data-url');
});
function validateForm() {
validationError = false;