aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Dröscher <dhn2@users.sourceforge.net>2007-01-18 16:57:46 +0000
committerDominik Dröscher <dhn2@users.sourceforge.net>2007-01-18 16:57:46 +0000
commitbc553355d67255139849b6a41c09a9242aa2488f (patch)
tree6ea4b73db7267403b564ae0c53f8acfa57eec563
parentff7686797a428f1d5876ff3255f72ea2902c1fb1 (diff)
downloadforums-bc553355d67255139849b6a41c09a9242aa2488f.tar
forums-bc553355d67255139849b6a41c09a9242aa2488f.tar.gz
forums-bc553355d67255139849b6a41c09a9242aa2488f.tar.bz2
forums-bc553355d67255139849b6a41c09a9242aa2488f.tar.xz
forums-bc553355d67255139849b6a41c09a9242aa2488f.zip
Some more permission updates
git-svn-id: file:///svn/phpbb/trunk@6906 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/adm/style/admin.css13
-rw-r--r--phpBB/adm/style/permission_mask.html4
-rw-r--r--phpBB/adm/style/permissions.js78
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 @@
<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">
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)
{