mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
Some more permission updates
git-svn-id: file:///svn/phpbb/trunk@6906 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
ff7686797a
commit
bc553355d6
3 changed files with 84 additions and 11 deletions
|
@ -48,6 +48,13 @@ h2, caption {
|
|||
margin-top: 25px;
|
||||
}
|
||||
|
||||
h3, h4 {
|
||||
font: bold 1.2em "Lucida Grande", Arial, Helvetica, sans-serif;
|
||||
text-decoration: none;
|
||||
line-height: 120%;
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-bottom: 0.7em;
|
||||
line-height: 1.4em;
|
||||
|
@ -374,6 +381,7 @@ fieldset {
|
|||
border-top: 1px solid #D5D5C8;
|
||||
background-color: #ECECEC;
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
}
|
||||
legend {
|
||||
position: absolute;
|
||||
|
@ -384,7 +392,7 @@ legend {
|
|||
font-weight: bold;
|
||||
line-height: 100%;
|
||||
text-transform: uppercase;
|
||||
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
fieldset p {
|
||||
|
@ -919,6 +927,9 @@ a.button2, a.button2:link, a.button2:visited, a.button2:active {
|
|||
fieldset.perm legend {
|
||||
text-transform: none;
|
||||
}
|
||||
fieldset.perm legend input{
|
||||
height: 1.1em;
|
||||
}
|
||||
|
||||
/* Permission sections */
|
||||
fieldset.perm .perm_simple {
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
<h3>{p_mask.NAME}<!-- IF p_mask.S_LOCAL --> <span class="small"> [{p_mask.L_ACL_TYPE}]</span><!-- ENDIF --></h3>
|
||||
|
||||
<!-- BEGIN f_mask -->
|
||||
<fieldset class="perm">
|
||||
<legend><!-- IF not p_mask.S_VIEW --><input type="checkbox" class="radio" name="inherit[{p_mask.f_mask.UG_ID}][{p_mask.f_mask.FORUM_ID}]" id="checkbox{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}" value="1" /> <!-- ELSE --><!-- ENDIF -->{p_mask.f_mask.NAME}</legend>
|
||||
<fieldset class="perm" id="perm{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}">
|
||||
<legend id="legend{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}"><!-- IF not p_mask.S_VIEW --><input type="checkbox" class="radio" name="inherit[{p_mask.f_mask.UG_ID}][{p_mask.f_mask.FORUM_ID}]" id="checkbox{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}" value="1" onclick="toggle_opacity('{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}')" /> <!-- ELSE --><!-- ENDIF -->{p_mask.f_mask.NAME}</legend>
|
||||
|
||||
<!-- IF not p_mask.S_VIEW -->
|
||||
<div class="perm_switch">
|
||||
|
|
|
@ -1,3 +1,49 @@
|
|||
/**
|
||||
* Change opacity of element
|
||||
* e = element
|
||||
* value = 0 (hidden) till 10 (fully visible)
|
||||
*/
|
||||
function set_opacity(e, value) {
|
||||
e.style.opacity = value/10;
|
||||
|
||||
//IE opacity currently turned off, because of its astronomical stupidity
|
||||
//e.style.filter = 'alpha(opacity=' + value*10 + ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset the opacity and checkboxes
|
||||
* block_id = id of the element that needs to be toggled
|
||||
*/
|
||||
function toggle_opacity(block_id) {
|
||||
var cb = document.getElementById('checkbox' + block_id);
|
||||
var fs = document.getElementById('perm' + block_id);
|
||||
|
||||
if (cb.checked)
|
||||
{
|
||||
set_opacity(fs, 5);
|
||||
}
|
||||
else
|
||||
{
|
||||
set_opacity(fs, 10);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset the opacity and checkboxes
|
||||
*/
|
||||
function reset_opacity() {
|
||||
var perm = document.getElementById('set_permissions');
|
||||
var fs = perm.getElementsByTagName('fieldset');
|
||||
|
||||
for (var i = 0; i < fs.length; i++ )
|
||||
{
|
||||
set_opacity(fs[i], 10);
|
||||
}
|
||||
|
||||
//reset checkboxes too
|
||||
marklist('set_permissions', 'inherit', false);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check whether we have a full radiobutton row of true
|
||||
|
@ -61,7 +107,7 @@ function set_colours(id, init, quick)
|
|||
}
|
||||
else if (status == 0)
|
||||
{
|
||||
// We move on to Mever
|
||||
// We move on to Never
|
||||
status = get_radio_status(2, rb);
|
||||
|
||||
if (status == 1)
|
||||
|
@ -124,19 +170,24 @@ function swap_options(pmask, fmask, cat, adv, view)
|
|||
return;
|
||||
}
|
||||
|
||||
// init colours
|
||||
if (adv)
|
||||
{
|
||||
dE('checkbox' + pmask + fmask, -1);
|
||||
init_colours(pmask + fmask);
|
||||
}
|
||||
|
||||
// no need to set anything if we are clicking on the same tab again
|
||||
if (new_tab == old_tab && !adv)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// init colours
|
||||
if (adv && (pmask + fmask) != (active_pmask + active_fmask))
|
||||
{
|
||||
init_colours(pmask + fmask);
|
||||
reset_opacity();
|
||||
}
|
||||
else if (adv)
|
||||
{
|
||||
//Checkbox might have been clicked, but we need full visibility
|
||||
set_opacity(document.getElementById('perm' + pmask + fmask), 10);
|
||||
}
|
||||
|
||||
// set active tab
|
||||
old_tab.className = old_tab.className.replace(/\ activetab/g, '');
|
||||
new_tab.className = new_tab.className + ' activetab';
|
||||
|
@ -147,6 +198,17 @@ function swap_options(pmask, fmask, cat, adv, view)
|
|||
}
|
||||
|
||||
dE('options' + active_option, -1);
|
||||
|
||||
//hiding and showing the checkbox
|
||||
if (document.getElementById('checkbox' + active_pmask + active_fmask))
|
||||
{
|
||||
dE('checkbox' + pmask + fmask, -1);
|
||||
|
||||
if ((pmask + fmask) != (active_pmask + active_fmask))
|
||||
{
|
||||
document.getElementById('checkbox' + active_pmask + active_fmask).style.display = 'inline';
|
||||
}
|
||||
}
|
||||
|
||||
if (!view)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue