Couple of fixes (hacks) for Opera and the aftermath of that z-index change to darken() and enlighten() fadefilters; added ajaxOpenDirectACLRule() to placeholder list
authorDan
Wed, 13 Aug 2008 08:57:45 -0400
changeset 694 43367c66d869
parent 693 f21aa64d050a
child 695 6bd7215c718b
child 697 8e9ba8b131fa
Couple of fixes (hacks) for Opera and the aftermath of that z-index change to darken() and enlighten() fadefilters; added ajaxOpenDirectACLRule() to placeholder list
includes/clientside/static/acl.js
includes/clientside/static/enano-lib-basic.js
includes/clientside/static/fadefilter.js
includes/clientside/static/login.js
includes/clientside/static/messagebox.js
--- a/includes/clientside/static/acl.js	Wed Aug 13 08:56:18 2008 -0400
+++ b/includes/clientside/static/acl.js	Wed Aug 13 08:57:45 2008 -0400
@@ -58,6 +58,12 @@
 
 function ajaxOpenDirectACLRule(rule_id)
 {
+  load_component('l10n');
+  load_component('messagebox');
+  load_component('fadefilter');
+  load_component('template-compiler');
+  load_component('autofill');
+  
   var params = {
     target_id: rule_id,
     mode: 'seltarget_id'
@@ -1228,7 +1234,19 @@
         {
           if ( aclSavePreset() )
           {
-            miniPromptDestroy(this);
+            if ( window.opera )
+            {
+              // damn weird opera bug.
+              var input = this;
+              setTimeout(function()
+                {
+                  miniPromptDestroy(input);
+                }, 10);
+            }
+            else
+            {
+              miniPromptDestroy(this);
+            }
           }
         }
         else if ( e.keyCode == 27 )
--- a/includes/clientside/static/enano-lib-basic.js	Wed Aug 13 08:56:18 2008 -0400
+++ b/includes/clientside/static/enano-lib-basic.js	Wed Aug 13 08:57:45 2008 -0400
@@ -499,6 +499,7 @@
   ajaxChangeStyle: 'ajax.js',
   ajaxCatToTag: 'ajax.js',
   ajaxOpenACLManager: 'acl.js',
+  ajaxOpenDirectACLRule: 'acl.js',
   ajaxAdminPage: 'login.js',
   ajaxInitLogout: 'login.js',
   ajaxStartLogin: 'login.js',
--- a/includes/clientside/static/fadefilter.js	Wed Aug 13 08:56:18 2008 -0400
+++ b/includes/clientside/static/fadefilter.js	Wed Aug 13 08:57:45 2008 -0400
@@ -16,6 +16,7 @@
   darkener_index[layerid] = ( typeof(darkener_index[layerid]) == 'number' ) ? darkener_index[layerid] + 1 : 1;
   if(document.getElementById(layerid))
   {
+    document.getElementById(layerid).style.zIndex = getHighestZ() + 1;
     if(nofade)
     {
       changeOpac(opacVal, layerid);
@@ -60,7 +61,7 @@
     thediv.style.backgroundColor = '#000000';
     thediv.style.width =  '100%';
     thediv.style.height = '100%';
-    thediv.style.zIndex = getHighestZ() + 5;
+    thediv.style.zIndex = getHighestZ() + 1;
     thediv.id = layerid;
     thediv.myOpacVal = opacVal;
     if(nofade)
--- a/includes/clientside/static/login.js	Wed Aug 13 08:56:18 2008 -0400
+++ b/includes/clientside/static/login.js	Wed Aug 13 08:57:45 2008 -0400
@@ -601,7 +601,7 @@
       check_dh.setAttribute('checked', 'checked');
     check_dh.id = 'ajax_login_field_dh';
     lbl_dh.appendChild(check_dh);
-    lbl_dh.innerHTML += $lang.get('user_login_ajax_check_dh');
+    lbl_dh.innerHTML += ' ' + $lang.get('user_login_ajax_check_dh');
     form.appendChild(lbl_dh);
   }
   
@@ -873,6 +873,7 @@
   errbox.style.width = '60%';
   errbox.style.top = top + 'px';
   errbox.style.left = left + 'px';
+  errbox.style.zIndex = getHighestZ();
   errbox.innerHTML = text;
   errbox.id = 'ajax_login_error_box';
   
--- a/includes/clientside/static/messagebox.js	Wed Aug 13 08:56:18 2008 -0400
+++ b/includes/clientside/static/messagebox.js	Wed Aug 13 08:57:45 2008 -0400
@@ -50,7 +50,7 @@
     document.getElementById('specialLayer_darkener').style.zIndex = '5';
   }
   var master_div = document.createElement('div');
-  master_div.style.zIndex = String(getHighestZ() + 5);
+  master_div.style.zIndex = getHighestZ() + 1;
   var mydiv = document.createElement('div');
   mydiv.style.height = '200px';
   w = getWidth();
@@ -547,7 +547,8 @@
           }
           parent.appendChild(button.input);
         }
-        if ( parms.buttons[0] )
+        // don't focus this in opera - it looks kinda ugly
+        if ( parms.buttons[0] && !window.opera )
         {
           var timeout = ( aclDisableTransitionFX ) ? 10 : 1000;
           setTimeout(function()