includes/clientside/static/faders.js
changeset 555 ac4c6a7f01d8
parent 550 685e839d934e
child 562 75df0b2c596c
equal deleted inserted replaced
554:e87390b1f9b0 555:ac4c6a7f01d8
   425 
   425 
   426 function miniPrompt(call_on_create)
   426 function miniPrompt(call_on_create)
   427 {
   427 {
   428   if ( document.getElementById('specialLayer_darkener') )
   428   if ( document.getElementById('specialLayer_darkener') )
   429   {
   429   {
   430     var opac = parseFloat(document.getElementById('specialLayer_darkener'));
   430     if ( document.getElementById('specialLayer_darkener').style.display != 'none' )
   431     opac = opac * 100;
   431     {
   432     darken(false, opac);
   432       var opac = parseFloat(document.getElementById('specialLayer_darkener').style.opacity);
       
   433       opac = opac * 100;
       
   434       darken(aclDisableTransitionFX, opac);
       
   435     }
       
   436     else
       
   437     {
       
   438       darken(aclDisableTransitionFX, 40);
       
   439     }
   433   }
   440   }
   434   else
   441   else
   435   {
   442   {
   436     darken(false, 40);
   443     darken(aclDisableTransitionFX, 40);
   437   }
   444   }
   438   
   445   
   439   var wrapper = document.createElement('div');
   446   var wrapper = document.createElement('div');
   440   wrapper.className = 'miniprompt';
   447   wrapper.className = 'miniprompt';
   441   var top = document.createElement('div');
   448   var top = document.createElement('div');
   457   wrapper.style.top = top + 'px';
   464   wrapper.style.top = top + 'px';
   458   domObjChangeOpac(0, wrapper);
   465   domObjChangeOpac(0, wrapper);
   459   var realbody = document.getElementsByTagName('body')[0];
   466   var realbody = document.getElementsByTagName('body')[0];
   460   realbody.appendChild(wrapper);
   467   realbody.appendChild(wrapper);
   461   
   468   
   462   fly_in_top(wrapper, true, true);
   469   if ( aclDisableTransitionFX )
   463   
   470   {
   464   setTimeout(function()
   471     domObjChangeOpac(100, wrapper);
   465     {
   472   }
   466       domObjChangeOpac(100, wrapper);
   473   else
   467     }, 40);
   474   {
       
   475     fly_in_top(wrapper, true, true);
       
   476     
       
   477     setTimeout(function()
       
   478       {
       
   479         domObjChangeOpac(100, wrapper);
       
   480       }, 40);
       
   481   }
   468 }
   482 }
   469 
   483 
   470 /**
   484 /**
   471  * For a given element, loops through the element and all of its ancestors looking for a miniPrompt div, and returns it. Returns false on failure.
   485  * For a given element, loops through the element and all of its ancestors looking for a miniPrompt div, and returns it. Returns false on failure.
   472  * @param object:HTMLElement Child node to scan
   486  * @param object:HTMLElement Child node to scan
   504     return false;
   518     return false;
   505   
   519   
   506   // found it
   520   // found it
   507   var parent = obj.parentNode;
   521   var parent = obj.parentNode;
   508   if ( !nofade )
   522   if ( !nofade )
   509     enlighten();
   523     enlighten(aclDisableTransitionFX);
   510   var timeout = fly_out_top(obj, true, true);
   524   if ( aclDisableTransitionFX )
   511   setTimeout(function()
   525   {
   512     {
   526     parent.removeChild(obj);
   513       parent.removeChild(obj);
   527   }
   514     }, timeout);
   528   else
       
   529   {
       
   530     var timeout = fly_out_top(obj, true, true);
       
   531     setTimeout(function()
       
   532       {
       
   533         parent.removeChild(obj);
       
   534       }, timeout);
       
   535   }
   515 }
   536 }
   516 
   537 
   517 /**
   538 /**
   518  * Simple test case
   539  * Simple test case
   519  */
   540  */