diff --git a/module/group/control.php b/module/group/control.php index b3c214c894..3b52334e32 100644 --- a/module/group/control.php +++ b/module/group/control.php @@ -130,8 +130,10 @@ class group extends control { if($_POST) { - $result = $this->group->updateView($groupID); - die(js::alert($result ? $this->lang->group->successSaved : $this->lang->group->errorNotSaved)); + $this->group->updateView($groupID); + if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError())); + + $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('browse'))); } $group = $this->group->getById($groupID); @@ -167,8 +169,9 @@ class group extends control { if($type == 'byGroup') $result = $this->group->updatePrivByGroup($groupID, $menu, $version); if($type == 'byModule') $result = $this->group->updatePrivByModule(); - print(js::alert($result ? $this->lang->group->successSaved : $this->lang->group->errorNotSaved)); - exit; + if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError())); + + $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('browse'))); } if($type == 'byGroup') diff --git a/module/group/css/copy.css b/module/group/css/copy.css new file mode 100644 index 0000000000..79fdcfe687 --- /dev/null +++ b/module/group/css/copy.css @@ -0,0 +1 @@ +.checkbox-inline {display: inline-block !important; padding-left: 0px;} diff --git a/module/group/css/managepriv.css b/module/group/css/managepriv.css index 07c33c31a0..1acda3c117 100644 --- a/module/group/css/managepriv.css +++ b/module/group/css/managepriv.css @@ -3,3 +3,4 @@ .group-item {display:block; width:200px; float:left; font-size: 14px} .outer .table.table-form tbody > tr:last-child td {border-top: 1px solid #ddd} @-moz-document url-prefix(){.outer .table.table-form tbody > tr:last-child td, .outer .table.table-form tbody > tr:last-child th {border-bottom: 1px solid #ddd}} +.checkbox-inline {display: inline-block !important; padding-left: 0px;} diff --git a/module/group/js/managepriv.js b/module/group/js/managepriv.js index deca0b5f43..94b96a75ab 100644 --- a/module/group/js/managepriv.js +++ b/module/group/js/managepriv.js @@ -25,3 +25,21 @@ function setNoChecked() }) $('#noChecked').val(noCheckValue); } + +$(function() +{ + $('#privList > tbody > tr > th input[type=checkbox]').change(function() + { + var id = $(this).attr('id'); + var checked = $(this).prop('checked'); + + if(id == 'allChecker') + { + $('input[type=checkbox]').prop('checked', checked); + } + else + { + $(this).parents('tr').find('input[type=checkbox]').prop('checked', checked); + } + }); +}) diff --git a/module/group/view/browse.html.php b/module/group/view/browse.html.php index 4b0529ae40..b44f772f27 100644 --- a/module/group/view/browse.html.php +++ b/module/group/view/browse.html.php @@ -44,10 +44,10 @@