I am new to the forum and would like to say hello to all of you.
Some time ago I found AppGini in google and we started using it at the company where I work. I think AppGini is great.
I would like to hide columns in the table for a specific group using jquery. I'm trying to do it the following way. The script works in console, but when I add it to hooks it doesn't hide the column. What am I doing wrong?
Code: Select all
function table_name_footer($contentType, $memberInfo, &$args) {
$footer='';
switch($contentType) {
case 'tableview':
$footer='';
break;
case 'detailview':
$footer='';
break;
case 'tableview+detailview':
$footer='';
break;
case 'print-tableview':
$footer='';
break;
case 'print-detailview':
$footer='';
break;
case 'filters':
$footer='';
break;
}
$memberInfo = getMemberInfo();
echo $memberInfo['group'];
if($memberInfo['group'] == 'WORKER'){
echo "<script type='text/javascript'>";
echo "$j(function() {";
echo "$j('th:nth-child(1), td:nth-child(1)').hide();";
echo "});";
echo "</script>";
}