forked from science-ation/science-ation
49 lines
905 B
JavaScript
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()
|
||
|
{
|
||
|
|
||
|
});
|
||
|
|
||
|
|