includes/clientside/static/acl.js
changeset 151 824821224153
parent 76 608dee512bf0
child 184 d74ff822acc9
equal deleted inserted replaced
146:fa3dab3cfb08 151:824821224153
     1 // Javascript routines for the ACL editor
     1 // Javascript routines for the ACL editor
     2 
     2 
     3 var aclManagerID = 'enano_aclmanager_' + Math.floor(Math.random() * 1000000);
     3 var aclManagerID = 'enano_aclmanager_' + Math.floor(Math.random() * 1000000);
     4 var aclPermList = false;
     4 var aclPermList = false;
     5 var aclDataCache = false;
     5 var aclDataCache = false;
       
     6 
       
     7 // Can be set to true by slow themes (St. Patty)
       
     8 var aclDisableTransitionFX = false;
     6 
     9 
     7 function ajaxOpenACLManager(page_id, namespace)
    10 function ajaxOpenACLManager(page_id, namespace)
     8 {
    11 {
     9   if(IE)
    12   if(IE)
    10     return true;
    13     return true;
   492   return select;
   495   return select;
   493 }
   496 }
   494 
   497 
   495 function __aclBuildWizardWindow()
   498 function __aclBuildWizardWindow()
   496 {
   499 {
   497   darken();
   500   darken(aclDisableTransitionFX);
   498   box = document.createElement('div');
   501   box = document.createElement('div');
   499   box.style.width = '640px'
   502   box.style.width = '640px'
   500   box.style.height = '440px';
   503   box.style.height = '440px';
   501   box.style.position = 'fixed';
   504   box.style.position = 'fixed';
   502   width = getWidth();
   505   width = getWidth();
   568   form.appendChild(panel);
   571   form.appendChild(panel);
   569   box.appendChild(form);
   572   box.appendChild(form);
   570   
   573   
   571   body = document.getElementsByTagName('body')[0];
   574   body = document.getElementsByTagName('body')[0];
   572   body.appendChild(box);
   575   body.appendChild(box);
   573   setTimeout("document.getElementById('"+aclManagerID+"').style.display = 'block'; opacity('"+aclManagerID+"', 0, 100, 500); opacity('"+aclManagerID + '_panel'+"', 0, 100, 500);", 1000);
   576   if ( aclDisableTransitionFX )
       
   577   {
       
   578     document.getElementById(aclManagerID).style.display = 'block';
       
   579     changeOpac(100, aclManagerID);
       
   580     changeOpac(100, aclManagerID + '_panel');
       
   581   }
       
   582   else
       
   583   {
       
   584     setTimeout("document.getElementById('"+aclManagerID+"').style.display = 'block'; opacity('"+aclManagerID+"', 0, 100, 500); opacity('"+aclManagerID + '_panel'+"', 0, 100, 500);", 1000);
       
   585   }
   574 }
   586 }
   575 
   587 
   576 function killACLManager()
   588 function killACLManager()
   577 {
   589 {
   578   el = document.getElementById(aclManagerID);
   590   el = document.getElementById(aclManagerID);
   579   if(el)
   591   if(el)
   580   {
   592   {
   581     opacity(aclManagerID, 100, 0, 500);
   593     if ( aclDisableTransitionFX )
   582     setTimeout('var el = document.getElementById(aclManagerID); el.parentNode.removeChild(el); enlighten();', 750);
   594     {
       
   595       enlighten(true);
       
   596       el.parentNode.removeChild(el);
       
   597     }
       
   598     else
       
   599     {
       
   600       opacity(aclManagerID, 100, 0, 500);
       
   601       setTimeout('var el = document.getElementById(aclManagerID); el.parentNode.removeChild(el); enlighten();', 750);
       
   602     }
   583   }
   603   }
   584 }
   604 }
   585 
   605 
   586 function __aclSubmitManager(form)
   606 function __aclSubmitManager(form)
   587 {
   607 {