# HG changeset patch # User Dan # Date 1231727859 18000 # Node ID 7fd2b8a58ae40bb60ae2972df7aa20dbd2a698a2 # Parent ae4ef502f7425fe47630d5d25ed003f5ba92f538 JS core: whiteOutReportSuccess now has a sister whiteOutReportFailure(); both abstracted to function whiteOutDestroyWithImage(whitey, image_url) diff -r ae4ef502f742 -r 7fd2b8a58ae4 includes/clientside/static/functions.js --- a/includes/clientside/static/functions.js Sun Jan 11 21:36:36 2009 -0500 +++ b/includes/clientside/static/functions.js Sun Jan 11 21:37:39 2009 -0500 @@ -48,6 +48,8 @@ function append_sid(url) { + var match = url.match(/#(.*?)$/); + url = url.replace(/#(.*?)$/, ''); sep = ( url.indexOf('?') > 0 ) ? '&' : '?'; if(ENANO_SID.length > 10) { @@ -58,6 +60,10 @@ { url = url + sep + 'pagepass=' + pagepass; } + if ( match ) + { + url = url + match[0]; + } return url; } @@ -600,8 +606,18 @@ function whiteOutReportSuccess(whitey) { + whiteOutDestroyWithImage(whitey, cdnPath + '/images/check.png'); +} + +function whiteOutReportFailure(whitey) +{ + whiteOutDestroyWithImage(whitey, cdnPath + '/images/checkbad.png'); +} + +function whiteOutDestroyWithImage(whitey, image) +{ // fade the status indicator in and then out - whitey.style.backgroundImage = 'url(' + scriptPath + '/images/check.png)'; + whitey.style.backgroundImage = 'url(' + image + ')'; if ( aclDisableTransitionFX ) { domObjChangeOpac(80, whitey); @@ -616,7 +632,9 @@ } setTimeout(function() { - whitey.parentNode.removeChild(whitey); + if ( whitey ) + if ( whitey.parentNode ) + whitey.parentNode.removeChild(whitey); }, 1250); }