xoops forums

pulapol

Just popping in
Posted on: 2009/12/26 13:36
pulapol
pulapol (Show more)
Just popping in
Posts: 55
Since: 2008/4/6 1
#1

XOOPS Check Boxes

Look at your site

http://xxxxxxx/search.php

http://xxxxx/modules/system/admin.php?fct=groups


depends on how many modules and how many blocks/custom blocks you have

you will see there are too many check boxes

and there is no select all or unselect all button

this is so unfriendly especially during creating new groups...you have to select one by one of the checkboxes

Hope too see a better XOOPS solution for this...

Mamba

Moderator
Posted on: 2009/12/28 2:18
Mamba
Mamba (Show more)
Moderator
Posts: 10406
Since: 2004/4/23
#2

Re: XOOPS Check Boxes

Good point.

Filed in requests as # 2922073

pulapol

Just popping in
Posted on: 2010/3/7 0:34
pulapol
pulapol (Show more)
Just popping in
Posts: 55
Since: 2008/4/6 1
#3

Re: XOOPS Check Boxes

any quick hack to have select all/unselectall checkboxes in system groups ?

jimmyx

Quite a regular
Posted on: 2010/3/10 12:04
jimmyx
jimmyx (Show more)
Quite a regular
Posts: 338
Since: 2007/7/18
#4

Re: XOOPS Check Boxes

+1

jimmyx

Quite a regular
Posted on: 2010/3/11 11:52
jimmyx
jimmyx (Show more)
Quite a regular
Posts: 338
Since: 2007/7/18
#5

Re: XOOPS Check Boxes

ok i try to add check all/uncheckall in groups

based on this code
http://www.hscripts.com/scripts/JavaScript/select-all-checkbox.php

in include/xoops.js, add this at end of the file

checked=false;
function 
checkedAll (groupform) {
    var 
aadocument.getElementById('groupform');
     if (
checked == false)
          {
           
checked true
          
}
        else
          {
          
checked false
          
}
    for (var 
=0aa.elements.lengthi++) 
    {
     
aa.elements[i].checked checked;
    }
      }




in class/xoopsform/formcheckboxes.php


somewhere in line 237

replace this
$ret .= '</table>';



with
$ret .= '<tr><td><input type=checkbox name=checkall onclick=checkedAll(groupform);>Check/Uncheck All</td></tr></table>';


result: it is working.....but when i select the check all checkbox in group setting all the checkboxes are selected...

supposed only the checkboxes in each row are selected
system admin rights
module admin rights
module access rights

etc and so on

help

this is almost working perfectly

demo:
http://img268.imageshack.us/img268/939/demoaa.png

jimmyx

Quite a regular
Posted on: 2010/3/12 14:26
jimmyx
jimmyx (Show more)
Quite a regular
Posts: 338
Since: 2007/7/18
#6

Re: XOOPS Check Boxes

bump

jimmyx

Quite a regular
Posted on: 2010/3/15 10:27
jimmyx
jimmyx (Show more)
Quite a regular
Posts: 338
Since: 2007/7/18
#7

Re: XOOPS Check Boxes

sorry bumping this again

sarahmx

Quite a regular
Posted on: 2010/4/27 11:12
sarahmx
sarahmx (Show more)
Quite a regular
Posts: 373
Since: 2007/10/28
#8

Re: XOOPS Check Boxes

Hi jimmy have you solved this ?

jimmyx

Quite a regular
Posted on: 2010/5/7 14:34
jimmyx
jimmyx (Show more)
Quite a regular
Posts: 338
Since: 2007/7/18
#9

Re: XOOPS Check Boxes

anyone ?

ghia

Community Support Member
Posted on: 2010/5/7 15:22
ghia
ghia (Show more)
Community Support Member
Posts: 4946
Since: 2008/7/3 1
#10

Re: XOOPS Check Boxes

You have to give the checkboxes of one row a different name then the ones from the other rows and let the check all box from this row, set or unset only the ones with this name.