science-ation/sfiab.js
dave 8b7a6e14b3 - Convert the popup to use the jquery ui popup
- Theme the whole thing
- Remvoe the translation dropdown support for now, it's causing a spurious reload replacing the endire page with a clickable "translations" link
- Add code for the prize editor, not done yet.
2009-09-09 17:06:11 +00:00

49 lines
905 B
JavaScript

//useful function that we'll be using throughout
function confirmClick(msg)
{
var okay=confirm(msg);
if(okay)
return true;
else
return false;
}
function el(str,domain,name)
{
document.write('<a href="ma'+'il'+'to:' + str + '@' + domain + '">' + name + '</a>');
}
function em(str,domain)
{
document.write('<a href="ma'+'il'+'to:' + str + '@' + domain + '">' + str + '@' + domain + '</a>');
}
var anyFieldHasBeenChanged=false;
function fieldChanged()
{
anyFieldHasBeenChanged=true;
}
function confirmChanges()
{
if(anyFieldHasBeenChanged)
{
var okay=confirm('<?=i18n("You have unsaved changes. Click \"Cancel\" to return so you can save your changes, or press \"OK\" to discard your changes and continue")?>');
if(okay)
return true;
else
return false;
}
else
return true;
}
/* Stuff to do after the document loads */
$(document).ready(function()
{
});