From fb9e5f028899f8205541fe86d7eb9c5e12c4a5ad Mon Sep 17 00:00:00 2001 From: Björn Geiger Date: Fri, 8 Apr 2011 13:20:06 +0200 Subject: Auch beim hinzufügen von weiteren Rechten nun Checkboxliste --- public/media/css/style.css | 4 ++ public/media/css/user.css | 138 ++++++++++++++++++++++++++------------------- public/media/js/user.js | 88 +++++++++++++++++++++++++++++ 3 files changed, 172 insertions(+), 58 deletions(-) (limited to 'public') diff --git a/public/media/css/style.css b/public/media/css/style.css index 5b6497b..54e929f 100644 --- a/public/media/css/style.css +++ b/public/media/css/style.css @@ -335,6 +335,10 @@ div.dsf{ float: right; } +.leftbutton { + float: left; +} + .personDiv { border: 1px solid #CCC; margin-bottom: 10px; diff --git a/public/media/css/user.css b/public/media/css/user.css index 416f10f..204d20b 100644 --- a/public/media/css/user.css +++ b/public/media/css/user.css @@ -67,90 +67,112 @@ tr.selectedEntry td { /* */ .listelement { - clear:both; - padding-top:10px; - margin:10px 0px; + clear: both; + padding-top: 10px; + margin: 10px 0px; } + .listelement .element { - border:1px solid black; - margin:5px 0px; - padding:5px; + border: 1px solid black; + margin: 5px 0px; + padding: 5px; -moz-border-radius: 3px; border-radius: 3px; - background-color:white; + background-color: white; } + .listelement .element:nth-child(even) { - background-color:#F0F8FF; + background-color: #F0F8FF; } -.listelement .element:hover { - background-color:#97BDE7; - border-color:#214687; + +.listelement .element:hover { + background-color: #97BDE7; + border-color: #214687; } -.listelement .element .number{ - font-size:28px; - float:left; - padding:0px 5px 0px 0px; - width:40px; - text-align:center; - color:#CCC; - font-style:italic; - font-weight:bold; + +.listelement .element .number { + font-size: 28px; + float: left; + padding: 0px 5px 0px 0px; + width: 40px; + text-align: center; + color: #CCC; + font-style: italic; + font-weight: bold; } -.listelement .element .content{ - margin-left:50px; + +.listelement .element .content { + margin-left: 50px; } -.listelement .element .content .title{ - font-weight:bold; - font-size:1.2em; + +.listelement .element .content .title { + font-weight: bold; + font-size: 1.2em; } -.listelement .element .content .subtitle{ - font-style:italic; + +.listelement .element .content .subtitle { + font-style: italic; } -.listelement .element .actions{ - float:right; - padding-right:5px; + +.listelement .element .actions { + float: right; + padding-right: 5px; } -.listelement .element .actions a{ - line-height:14px; - padding-right:4px; + +.listelement .element .actions a { + line-height: 14px; + padding-right: 4px; } + .listelement .element .details { - margin:0px 20px 0px 10px; + margin: 0px 20px 0px 10px; } + .listelement .element .dispnone { - display:none; + display: none; } -.listelement .element .details label{ - float:left; - font-style:italic; - font-weight:bold; - width:110px; + +.listelement .element .details label { + float: left; + font-style: italic; + font-weight: bold; + width: 110px; } -.listelement .element .details div.item{ - display:block; + +.listelement .element .details div.item { + display: block; } + .listelement .highlight { - background-color:#FFF5CC !important; + background-color: #FFF5CC !important; } + .listelement .checked { - background-image:url('/media/img/checked.png'); - background-repeat:no-repeat; + background-image: url('/media/img/checked.png'); + background-repeat: no-repeat; background-position: 15px center; -} -.searchvars{ - border:1px solid #000; - background-color:#FFFFBB; - display:none; - padding:6px; - clear:both; +} + +.searchvars { + border: 1px solid #000; + background-color: #FFFFBB; + display: none; + padding: 6px; + clear: both; -moz-border-radius: 3px; border-radius: 3px; } -.searchvars div.head{ - font-weight:bold; + +.searchvars div.head { + font-weight: bold; } -.searchvars div.code{ - margin-left:10px; - display:inline; - color:#666; + +.searchvars div.code { + margin-left: 10px; + display: inline; + color: #666; } + +#uncheckAll-label { + width: 5px; +} \ No newline at end of file diff --git a/public/media/js/user.js b/public/media/js/user.js index 488ab45..01c4721 100644 --- a/public/media/js/user.js +++ b/public/media/js/user.js @@ -17,3 +17,91 @@ $(document).ready(function(){ }); } }); + +function checkAllCheckBoxes(exceptions) { + var elements = document.getElementsByTagName('input'); + if(!elements) { + return; + } + var countElements = elements.length; + var countExceptions; + if(exceptions) { + countExceptions = exceptions.length; + } else { + countExceptions = 0; + } + var foundException = false; + if(!countElements) { + if(elements.getAttribute('type') == 'checkbox') { + for(var j = 0; j < countExceptions; j++) { + if(elements.getAttribute('name') == exceptions[j]) { + foundException = true + break; + } + } + if(!foundException) { + elements.checked = true; + } + foundException = false; + } + } else { + for(var i = 0; i < countElements; i++) { + if(elements[i].getAttribute('type') == 'checkbox') { + for(var j = 0; j < countExceptions; j++) { + if(elements[i].getAttribute('name') == exceptions[j]) { + foundException = true + break; + } + } + if(!foundException) { + elements[i].checked = true; + } + foundException = false; + } + } + } +} + +function uncheckAllCheckBoxes(exceptions) { + var elements = document.getElementsByTagName('input'); + if(!elements) { + return; + } + var countElements = elements.length; + var countExceptions; + if(exceptions) { + countExceptions = exceptions.length; + } else { + countExceptions = 0; + } + var foundException = false; + if(!countElements) { + if(elements.getAttribute('type') == 'checkbox') { + for(var j = 0; j < countExceptions; j++) { + if(elements.getAttribute('name') == exceptions[j]) { + foundException = true + break; + } + } + if(!foundException) { + elements.checked = false; + } + foundException = false; + } + } else { + for(var i = 0; i < countElements; i++) { + if(elements[i].getAttribute('type') == 'checkbox') { + for(var j = 0; j < countExceptions; j++) { + if(elements[i].getAttribute('name') == exceptions[j]) { + foundException = true + break; + } + } + if(!foundException) { + elements[i].checked = false; + } + foundException = false; + } + } + } +} \ No newline at end of file -- cgit v1.2.3-55-g7522