Sixth pass at adding key files
This commit is contained in:
123
site/coaches/javascript.js
Normal file
123
site/coaches/javascript.js
Normal file
@ -0,0 +1,123 @@
|
||||
function validateEmail(emailAddress) {
|
||||
var match = /^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*$/.test(emailAddress);
|
||||
return match;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function CheckRegisterForm(RegisterForm)
|
||||
{
|
||||
if (RegisterForm.username.value == "" ) { alert( "Please choose a username!" );
|
||||
RegisterForm.username.focus();
|
||||
return false; }
|
||||
|
||||
if (RegisterForm.password.value == "" ) { alert( "Please choose a password!" );
|
||||
RegisterForm.password.focus();
|
||||
return false; }
|
||||
|
||||
if (RegisterForm.email.value == "" ) { alert( "Please enter your email address." );
|
||||
RegisterForm.email.focus();
|
||||
return false; }
|
||||
|
||||
checkEmail = RegisterForm.email.value
|
||||
if ((checkEmail.indexOf('@') < 0) || ((checkEmail.charAt(checkEmail.length-4) != '.') && (checkEmail.charAt(checkEmail.length-3) != '.')))
|
||||
{alert("Your emails address is invalid!.");
|
||||
RegisterForm.email.focus();
|
||||
return false; }
|
||||
|
||||
|
||||
// return true;
|
||||
}
|
||||
|
||||
|
||||
function CheckTellForm(tellform)
|
||||
{
|
||||
if (tellform.name.value == "" ) { alert( "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" );
|
||||
tellform.name.focus();
|
||||
return false; }
|
||||
|
||||
if (tellform.email.value == "" ) { alert( "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" );
|
||||
tellform.email.focus();
|
||||
return false; }
|
||||
|
||||
checkEmail = tellform.email.value
|
||||
if ((checkEmail.indexOf('@') < 0) || ((checkEmail.charAt(checkEmail.length-4) != '.') && (checkEmail.charAt(checkEmail.length-3) != '.')))
|
||||
{alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>!.");
|
||||
tellform.email.focus();
|
||||
return false; }
|
||||
|
||||
|
||||
if (tellform.fname.value == "" ) { alert( "<22><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>" );
|
||||
tellform.fname.focus();
|
||||
return false; }
|
||||
|
||||
|
||||
|
||||
if (tellform.femail.value == "" ) { alert( "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" );
|
||||
tellform.femail.focus();
|
||||
return false; }
|
||||
|
||||
checkEmail = tellform.femail.value
|
||||
if ((checkEmail.indexOf('@') < 0) || ((checkEmail.charAt(checkEmail.length-4) != '.') && (checkEmail.charAt(checkEmail.length-3) != '.')))
|
||||
{alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>!.");
|
||||
tellform.femail.focus();
|
||||
return false; }
|
||||
|
||||
|
||||
|
||||
// return true;
|
||||
}
|
||||
|
||||
|
||||
var newwindow;
|
||||
function pop(url)
|
||||
{
|
||||
newwindow=window.open(url,'poppage', 'toolbars=0, scrollbars=1, location=0, statusbars=1, menubars=0, resizable=0, width=500, height=400');
|
||||
if (window.focus) {newwindow.focus()}
|
||||
}
|
||||
|
||||
function popimg(url)
|
||||
{
|
||||
newwindow=window.open(url,'name','height=500,width=650,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=yes,status=yes');
|
||||
if (window.focus) {newwindow.focus()}
|
||||
}
|
||||
|
||||
|
||||
|
||||
<!-- ;
|
||||
var newwindow;
|
||||
var wheight = 0, wwidth = 0;
|
||||
function viewimg(url, title, iwidth, iheight, colour) {
|
||||
var pwidth, pheight;
|
||||
|
||||
if ( !newwindow || newwindow.closed ) {
|
||||
pwidth=iwidth+30;
|
||||
pheight=iheight+30;
|
||||
newwindow=window.open('','htmlname','width=' + pwidth +',height=' +pheight + ',resizable=1,top=50,left=10');
|
||||
wheight=iheight;
|
||||
wwidth=iwidth;
|
||||
}
|
||||
|
||||
if (wheight!=iheight || wwidth!=iwidth ) {
|
||||
pwidth=iwidth+30;
|
||||
pheight=iheight+60;
|
||||
newwindow.resizeTo(pwidth, pheight);
|
||||
wheight=iheight;
|
||||
wwidth=iwidth;
|
||||
}
|
||||
|
||||
newwindow.document.clear();
|
||||
newwindow.focus();
|
||||
newwindow.document.writeln('<html> <head> <title>' + title + '<\/title> <\/head> <body bgcolor= \"' + colour + '\"> <center>');
|
||||
newwindow.document.writeln('<a titl="<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" href="javascript:window.close();"><img src=' + url + ' border=0></a>');
|
||||
newwindow.document.writeln('<\/center> <\/body> <\/html>');
|
||||
newwindow.document.close();
|
||||
newwindow.focus();
|
||||
}
|
||||
|
||||
// Routines to tidy up popup windows when page is left
|
||||
// Call with an onUnload="tidy5()" in body tag
|
||||
|
||||
function tidy5() {
|
||||
if (newwindow && !newwindow.closed) { newwindow.close(); }
|
||||
}
|
3271
site/coaches/rating/scripts/prototype.js
vendored
Normal file
3271
site/coaches/rating/scripts/prototype.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
54
site/coaches/rating/scripts/rating.js
Normal file
54
site/coaches/rating/scripts/rating.js
Normal file
@ -0,0 +1,54 @@
|
||||
function RateItem(varParentId, varItemId, varRating)
|
||||
{
|
||||
var elementId = varParentId+"_"+varItemId;
|
||||
var varOrigClassName = document.getElementById(elementId).className;
|
||||
|
||||
// Retrieve Ajax Feeds
|
||||
new Ajax.Request('ajax.rate.item.php',
|
||||
{
|
||||
method: 'post',
|
||||
parameters: {parent: varParentId, item: varItemId, rating: varRating, classes: varOrigClassName},
|
||||
onSuccess: ReloadRating,
|
||||
onFailure: RatingError
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
function ReadNameValuePairs(nameValuePair)
|
||||
{
|
||||
var trimspaces = /(\s)+/;
|
||||
var returnData = new Array();
|
||||
var pairs = nameValuePair.split('&');
|
||||
|
||||
for (var i = 0; i < pairs.length; i++)
|
||||
{
|
||||
var pair = pairs[i].split('=');
|
||||
returnData[pair[0].replace(trimspaces, "")] = pair[1];
|
||||
}
|
||||
|
||||
return returnData;
|
||||
}
|
||||
|
||||
function ReloadRating(requestObj, jsonObj)
|
||||
{
|
||||
var newlines = /(\r\n|\r|\n)/;
|
||||
var returnData = ReadNameValuePairs(requestObj.responseText.replace(newlines, ""));
|
||||
var elementId = returnData['parent']+"_"+returnData['item'];
|
||||
|
||||
document.getElementById(elementId).className = returnData['classes'];
|
||||
var liObj = document.getElementById(elementId).getElementsByTagName('a');
|
||||
|
||||
for (var i = 0; i < liObj.length; i++)
|
||||
{
|
||||
liObj[i].onclick = function(){};
|
||||
}
|
||||
document.getElementById(returnData['parent']).className = returnData['parentClass'];
|
||||
}
|
||||
|
||||
function RatingError()
|
||||
{
|
||||
|
||||
//alert ("Error");
|
||||
|
||||
}
|
Reference in New Issue
Block a user