Revision 4002
Added by berkley almost 16 years ago
util.js | ||
---|---|---|
26 | 26 |
}, "XML"); |
27 | 27 |
} |
28 | 28 |
|
29 |
function updateStatus() |
|
30 |
{ |
|
31 |
var url = window.location.href; |
|
32 |
if(url.indexOf('docid') != -1) |
|
33 |
{ //if there's a docid in the url, set the cookie |
|
34 |
var docid = url.substring(url.indexOf("docid=") + 6, url.indexOf("&status")); |
|
35 |
var docidcookie = getCookie("sms-lastdocid"); |
|
36 |
if(docid != docidcookie) |
|
37 |
{ //set the cookie for next time |
|
38 |
setCookie("sms-lastdocid", docid); |
|
39 |
//slideDown("#uploadstatus"); |
|
40 |
$('#uploadstatus').css("display", "block"); |
|
41 |
} |
|
42 |
else |
|
43 |
{ //hide the status |
|
44 |
$('#uploadstatus').css("display", "none"); |
|
45 |
//slideUp("#uploadstatus"); |
|
46 |
} |
|
47 |
} |
|
48 |
|
|
49 |
} |
|
50 |
|
|
29 | 51 |
function setLoginHeader(loggedin) |
30 | 52 |
{ |
31 | 53 |
if(loggedin) |
32 | 54 |
{ |
55 |
updateStatus(); |
|
33 | 56 |
var user = getCookie("sms-user"); |
34 | 57 |
$('#loginheader').replaceWith("<h2 style=\"text-align:center\" id=\"loginheader\">" |
35 | 58 |
+ user + " Logged In <a href=\"javascript:\" onclick=\"logout()\" style=\"font-size:70%\">[logout]</a></h2>"); |
Also available in: Unified diff
cleaned up the upload functionality a bit.