includes/clientside/static/acl.js
changeset 472 bc4b58034f4d
parent 419 b8b4e38825db
child 511 f88c8c79d784
--- a/includes/clientside/static/acl.js	Sat Mar 01 23:02:05 2008 -0500
+++ b/includes/clientside/static/acl.js	Sun Mar 02 19:32:19 2008 -0500
@@ -433,6 +433,8 @@
             note.appendChild(document.createElement('br'));
             note.appendChild(document.createTextNode($lang.get('acl_lbl_save_success_body', { target_name: data.target_name })));
             note.appendChild(document.createElement('br'));
+            
+            /*
             var a = document.createElement('a');
             a.href = '#';
             a.id = aclManagerID + '_btn_dismiss';
@@ -443,18 +445,28 @@
             a.id = aclManagerID + '_btn_close';
             a2.appendChild(document.createTextNode(': ' + $lang.get('acl_btn_success_close') + ' ]'));
             note.appendChild(a2);
-            document.getElementById(aclManagerID + '_main').insertBefore(note, document.getElementById(aclManagerID + '_main').firstChild);
-            if(!document.getElementById(aclManagerID+'_deletelnk'))
-              document.getElementById(aclManagerID + '_main').innerHTML += '<p id="'+aclManagerID+'_deletelnk" style="text-align: right;"><a href="#delete_acl_rule" onclick="if(confirm(\'' + $lang.get('acl_msg_deleterule_confirm') + '\')) __aclDeleteRule(); return false;" style="color: red;">' + $lang.get('acl_lbl_deleterule') + '</a></p>';
-            //fadeInfoBoxes();
-            document.getElementById(aclManagerID+'_main').scrollTop = 0;
+            */
+            
+            var a_dismiss = document.createElement('a');
+            a_dismiss.href = '#';
+            a_dismiss.appendChild(document.createTextNode('[ ' + $lang.get('acl_btn_success_dismiss') + ' :'));
+            note.appendChild(a_dismiss);
             
-            var a = document.getElementById(aclManagerID + '_btn_dismiss');
-            var a2 = document.getElementById(aclManagerID + '_btn_close');
+            var a_close = document.createElement('a');
+            a_close.href = '#';
+            a_close.appendChild(document.createTextNode(': ' + $lang.get('acl_btn_success_close') + ' ]'));
+            note.appendChild(a_close);
+            
+            document.getElementById(aclManagerID + '_main').insertBefore(note, document.getElementById(aclManagerID + '_main').firstChild);
             
-            a.setAttribute('onclick', function(e) { this.parentNode.parentNode.removeChild(this.parentNode); return false; });
-            a2.setAttribute('onclick', function(e) { killACLManager(); return false; });
+            a_dismiss.setAttribute('onclick', 'var parent = this.parentNode.parentNode; parent.removeChild(this.parentNode); return false;');
+            a_close.setAttribute('onclick', 'killACLManager(); return false;');
             
+            if ( !document.getElementById(aclManagerID+'_deletelnk') )
+              document.getElementById(aclManagerID + '_main').innerHTML += '<p id="'+aclManagerID+'_deletelnk" style="text-align: right;"><a href="#delete_acl_rule" onclick="if(confirm(\'' + $lang.get('acl_msg_deleterule_confirm') + '\')) __aclDeleteRule(); return false;" style="color: red;">' + $lang.get('acl_lbl_deleterule') + '</a></p>';
+            
+            document.getElementById(aclManagerID+'_main').scrollTop = 0;
+                        
             aclDataCache.mode = 'save_edit';
             break;
           case 'delete':