includes/clientside/static/acl.js
changeset 76 608dee512bf0
parent 74 68469a95658d
child 150 824821224153
equal deleted inserted replaced
75:1f85c1c609fd 76:608dee512bf0
   146       scopeRadioPage.type = 'radio';
   146       scopeRadioPage.type = 'radio';
   147       scopeRadioPage.name = 'scope';
   147       scopeRadioPage.name = 'scope';
   148       scopeRadioPage.value = 'page';
   148       scopeRadioPage.value = 'page';
   149       scopeRadioPage.checked = 'checked';
   149       scopeRadioPage.checked = 'checked';
   150       scopeRadioPage.className = '1048576';
   150       scopeRadioPage.className = '1048576';
   151       scopeRadioPage.onclick = function() { var id = 'enACL_pgsel_' + this.className; document.getElementById(id).style.display = 'none'; };
   151       if ( groups.page_groups.length > 0 ) scopeRadioPage.onclick = function() { var id = 'enACL_pgsel_' + this.className; document.getElementById(id).style.display = 'none'; };
   152     scopeRadioGlobal = document.createElement('input');
   152     scopeRadioGlobal = document.createElement('input');
   153       scopeRadioGlobal.type = 'radio';
   153       scopeRadioGlobal.type = 'radio';
   154       scopeRadioGlobal.name = 'scope';
   154       scopeRadioGlobal.name = 'scope';
   155       scopeRadioGlobal.value = 'global';
   155       scopeRadioGlobal.value = 'global';
   156       scopeRadioGlobal.className = '1048576';
   156       scopeRadioGlobal.className = '1048576';
   157       scopeRadioGlobal.onclick = function() { var id = 'enACL_pgsel_' + this.className; document.getElementById(id).style.display = 'none'; };
   157       if ( groups.page_groups.length > 0 ) scopeRadioGlobal.onclick = function() { var id = 'enACL_pgsel_' + this.className; document.getElementById(id).style.display = 'none'; };
   158     scopeRadioGroup = document.createElement('input');
   158     scopeRadioGroup = document.createElement('input');
   159       scopeRadioGroup.type = 'radio';
   159       scopeRadioGroup.type = 'radio';
   160       scopeRadioGroup.name = 'scope';
   160       scopeRadioGroup.name = 'scope';
   161       scopeRadioGroup.value = 'group';
   161       scopeRadioGroup.value = 'group';
   162       scopeRadioGroup.className = '1048576';
   162       scopeRadioGroup.className = '1048576';
   163       scopeRadioGroup.onclick = function() { var id = 'enACL_pgsel_' + this.className; document.getElementById(id).style.display = 'block'; };
   163       if ( groups.page_groups.length > 0 ) scopeRadioGroup.onclick = function() { var id = 'enACL_pgsel_' + this.className; document.getElementById(id).style.display = 'block'; };
   164     lblPage = document.createElement('label');
   164     lblPage = document.createElement('label');
   165       lblPage.style.display = 'block';
   165       lblPage.style.display = 'block';
   166       lblPage.appendChild(scopeRadioPage);
   166       lblPage.appendChild(scopeRadioPage);
   167       lblPage.appendChild(document.createTextNode('Only this page'));
   167       lblPage.appendChild(document.createTextNode('Only this page'));
   168     lblGlobal = document.createElement('label');
   168     lblGlobal = document.createElement('label');
   227   
   227   
   228   if(do_scopesel)
   228   if(do_scopesel)
   229   {
   229   {
   230     container.appendChild(scopedesc);
   230     container.appendChild(scopedesc);
   231     container.appendChild(scopediv1);
   231     container.appendChild(scopediv1);
   232     container.appendChild(scopediv2);
   232     if ( groups.page_groups.length > 0 )
       
   233     {
       
   234       container.appendChild(scopediv2);
       
   235     }
   233     container.appendChild(scopediv3);
   236     container.appendChild(scopediv3);
   234   }
   237   }
   235   
   238   
   236   main.appendChild(container);
   239   main.appendChild(container);
   237   
   240