includes/clientside/static/acl.js
changeset 74 68469a95658d
parent 73 0a74676a2f2f
child 76 608dee512bf0
equal deleted inserted replaced
73:0a74676a2f2f 74:68469a95658d
   314             // Build the ACL edit form
   314             // Build the ACL edit form
   315             // try {
   315             // try {
   316               act_desc = ( data.type == 'new' ) ? 'Create access rule' : 'Editing permissions';
   316               act_desc = ( data.type == 'new' ) ? 'Create access rule' : 'Editing permissions';
   317               target_type_t = ( data.target_type == 1 ) ? 'group' : 'user';
   317               target_type_t = ( data.target_type == 1 ) ? 'group' : 'user';
   318               target_name_t = data.target_name;
   318               target_name_t = data.target_name;
   319               var scope_type = ( data.page_id == false && data.namespace == false ) ? 'this entire site' : 'this page';
   319               var scope_type = ( data.page_id == false && data.namespace == false ) ? 'this entire site' : ( data.namespace == '__PageGroup' ) ? 'this group of pages' : 'this page';
   320               html = '<h2>'+act_desc+'</h2><p>This panel allows you to edit what the '+target_type_t+' "<b>'+target_name_t+'</b>" can do on <b>' + scope_type + '</b>. Unless you set a permission to "Deny", these permissions may be overridden by other rules.</p>';
   320               html = '<h2>'+act_desc+'</h2><p>This panel allows you to edit what the '+target_type_t+' "<b>'+target_name_t+'</b>" can do on <b>' + scope_type + '</b>. Unless you set a permission to "Deny", these permissions may be overridden by other rules.</p>';
   321               parser = new templateParser(data.template.acl_field_begin);
   321               parser = new templateParser(data.template.acl_field_begin);
   322               html += parser.run();
   322               html += parser.run();
   323               
   323               
   324               cls = 'row2';
   324               cls = 'row2';
   388             note.style.marginLeft = '0';
   388             note.style.marginLeft = '0';
   389             var b = document.createElement('b');
   389             var b = document.createElement('b');
   390             b.appendChild(document.createTextNode('Permissions updated'));
   390             b.appendChild(document.createTextNode('Permissions updated'));
   391             note.appendChild(b);
   391             note.appendChild(b);
   392             note.appendChild(document.createElement('br'));
   392             note.appendChild(document.createElement('br'));
   393             note.appendChild(document.createTextNode('The permissions for '+data.target_name+' on this page have been updated successfully.'));
   393             note.appendChild(document.createTextNode('The permissions for '+data.target_name+' on this page have been updated successfully. If you changed permissions that affect your user account, you may not see changes until you reload the page.'));
   394             note.appendChild(document.createElement('br'));
   394             note.appendChild(document.createElement('br'));
   395             var a = document.createElement('a');
   395             var a = document.createElement('a');
   396             a.href = 'javascript:void(0);';
   396             a.href = 'javascript:void(0);';
   397             a.onclick = function() { this.parentNode.parentNode.removeChild(this.parentNode); return false; };
   397             a.onclick = function() { this.parentNode.parentNode.removeChild(this.parentNode); return false; };
   398             a.appendChild(document.createTextNode('[ dismiss :'));
   398             a.appendChild(document.createTextNode('[ dismiss :'));