From bc553355d67255139849b6a41c09a9242aa2488f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Dr=C3=B6scher?= Date: Thu, 18 Jan 2007 16:57:46 +0000 Subject: [PATCH] Some more permission updates git-svn-id: file:///svn/phpbb/trunk@6906 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/adm/style/admin.css | 13 ++++- phpBB/adm/style/permission_mask.html | 4 +- phpBB/adm/style/permissions.js | 78 +++++++++++++++++++++++++--- 3 files changed, 84 insertions(+), 11 deletions(-) diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index 678265ec8b..6b85be7f94 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -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 { diff --git a/phpBB/adm/style/permission_mask.html b/phpBB/adm/style/permission_mask.html index dca218fc90..54ce67ebcf 100644 --- a/phpBB/adm/style/permission_mask.html +++ b/phpBB/adm/style/permission_mask.html @@ -22,8 +22,8 @@

{p_mask.NAME} [{p_mask.L_ACL_TYPE}]

-
- {p_mask.f_mask.NAME} +
+ {p_mask.f_mask.NAME}
diff --git a/phpBB/adm/style/permissions.js b/phpBB/adm/style/permissions.js index 27a1a89ee8..32f337063b 100644 --- a/phpBB/adm/style/permissions.js +++ b/phpBB/adm/style/permissions.js @@ -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) {