includes/clientside/static/functions.js
changeset 1125 367768040a61
parent 1053 bdbb49cf6f1b
child 1129 d56a55a3011b
equal deleted inserted replaced
1124:1e956881d362 1125:367768040a61
   670 /**
   670 /**
   671  * Take a div generated by whiteOutElement() and report success using the glossy "check" graphic. Sets the image, then
   671  * Take a div generated by whiteOutElement() and report success using the glossy "check" graphic. Sets the image, then
   672  * briefly fades in, then fades out and destroys the box so as to re-allow control over the underlying element
   672  * briefly fades in, then fades out and destroys the box so as to re-allow control over the underlying element
   673  */
   673  */
   674 
   674 
   675 function whiteOutReportSuccess(whitey)
   675 function whiteOutReportSuccess(whitey, nodestroy_mp)
   676 {
   676 {
   677   whiteOutDestroyWithImage(whitey, cdnPath + '/images/check.png');
   677   whiteOutDestroyWithImage(whitey, cdnPath + '/images/check.png', nodestroy_mp);
   678 }
   678 }
   679 
   679 
   680 function whiteOutReportFailure(whitey)
   680 function whiteOutReportFailure(whitey, nodestroy_mp)
   681 {
   681 {
   682   whiteOutDestroyWithImage(whitey, cdnPath + '/images/checkbad.png');
   682   if ( typeof(nodestroy_mp) == undefined )
   683 }
   683     nodestroy_mp = true;
   684 
   684     
   685 function whiteOutDestroyWithImage(whitey, image)
   685   whiteOutDestroyWithImage(whitey, cdnPath + '/images/checkbad.png', nodestroy_mp);
       
   686 }
       
   687 
       
   688 function whiteOutDestroyWithImage(whitey, image, nodestroy_mp)
   686 {
   689 {
   687   // fade the status indicator in and then out
   690   // fade the status indicator in and then out
   688   whitey.style.backgroundImage = 'url(' + image + ')';
   691   whitey.style.backgroundImage = 'url(' + image + ')';
       
   692   if ( whitey.isMiniPrompt && !nodestroy_mp )
       
   693   {
       
   694     whiteOutDestroyOnMiniPrompt(whitey);
       
   695     return true;
       
   696   }
   689   if ( aclDisableTransitionFX )
   697   if ( aclDisableTransitionFX )
   690   {
   698   {
   691     domObjChangeOpac(80, whitey);
   699     domObjChangeOpac(80, whitey);
   692   }
   700   }
   693   else
   701   else
   866 {
   874 {
   867   z = 0;
   875   z = 0;
   868   var divs = document.getElementsByTagName('div');
   876   var divs = document.getElementsByTagName('div');
   869   for(var i = 0; i < divs.length; i++)
   877   for(var i = 0; i < divs.length; i++)
   870   {
   878   {
   871     if(divs[i].style.zIndex > z) z = divs[i].style.zIndex;
   879     if(divs[i].style.zIndex > z && divs[i].style.display != 'none' && divs[i].innerHTML != '') z = divs[i].style.zIndex;
   872   }
   880   }
   873   return parseInt(z);
   881   return parseInt(z);
   874 }
   882 }
   875 
   883 
   876 var shift = false;
   884 var shift = false;