qc.ifish7.com/Application/Admin/View/Role/access_cat.html

86 lines
4.7 KiB
HTML

<include file="Inc:header"/>
<style>
label{ display: inline-block; margin-right: 10px;}
.power_list{ padding:10px;}
.power_list label{ height: 30px; line-height: 30px;}
.app_list .app_name{ line-height: 40px; height: 40px;background:#F5F5F5; }
.action_list{ margin-left: 30px; padding-left: 10px; padding-top: 5px; padding-bottom: 10px; margin-top: 5px; border: 1px solid #ececec; margin-bottom: 10px;}
.action_list .action_name label{ margin-bottom: 0px;}
.method_list{ padding-left: 50px;}
</style>
<div class="container-fluid">
<div class="row-fluid">
<div class="span12">
<div class="widget-box">
<div class="widget-title"> <span class="icon"> <i class="icon-align-justify"></i> </span>
<h5>{$pagetitle}</h5>
<span class="icon" style="float:right"> <a href="javascript:goback()"><i class=" icon-share-alt"></i></a></span>
</div>
<div class="widget-content nopadding">
<form id="basic_validate" class="form-horizontal" method="post" action="__SELF__" onsubmit="return save_form(this)">
<input type="hidden" name="role_id" value="{$r.id}">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="width:5%">catid</th>
<th style="width:10%">栏目名称</th>
<th style="text-align: left;width:30%">栏目关系</th>
<th style="width:6%;cursor:pointer;text-decoration: underline" class="thischeck_all" val="1" objname="info_view">查看权限</th>
<th style="width:6%;cursor:pointer;text-decoration: underline" class="thischeck_all" val="1" objname="info_add">增加权限</th>
<th style="width:6%;cursor:pointer;text-decoration: underline" class="thischeck_all" val="1" objname="info_editor">编辑权限</th>
<th style="width:6%;cursor:pointer;text-decoration: underline" class="thischeck_all" val="1" objname="info_delete">删除权限</th>
<th style="width:6%;cursor:pointer; text-decoration: underline" class="thischeck_all" val="1" objname="info_checked">审核权限</th>
</tr>
</thead>
<tbody>
<foreach name="catData" item="v" >
<tr>
<td style="text-align: center;">{$v.catid}</td>
<td>{$v.name}</td>
<td class="tab-title"><a href="{:caturl($v[catid])}" target="_blank">{$v.str}{$v.name}</a></td>
<td class="center"><input type="checkbox" name="info_view[]" value="{$v.catid}" {:strstr($r[info_view],'|'.$v[catid].'|')?'checked':''}/>{$method.title}</td>
<td class="center"><input type="checkbox" name="info_add[]" value="{$v.catid}" {:strstr($r[info_add],'|'.$v[catid].'|')?'checked':''}/>{$method.title}</td>
<td class="center"><input type="checkbox" name="info_editor[]" value="{$v.catid}" {:strstr($r[info_editor],'|'.$v[catid].'|')?'checked':''}/>{$method.title}</td>
<td class="center"><input type="checkbox" name="info_delete[]" value="{$v.catid}" {:strstr($r[info_delete],'|'.$v[catid].'|')?'checked':''}/>{$method.title}</td>
<td class="center"><input type="checkbox" name="info_checked[]" value="{$v.catid}" {:strstr($r[info_checked],'|'.$v[catid].'|')?'checked':''}/>{$method.title}</td>
</tr>
</foreach>
</tbody>
</table>
<div class="form-actions">
<button type="submit" class="btn btn-success form_submit">确定</button>
<button type="button" class="btn btn-danger" id="closeIframe" onclick="cancel()">取消</button>
<div id="status"></div>
</div>
<div id="submitted"></div>
</form>
</div>
</div>
</div>
</div>
</div>
<include file="Inc/footer"/>
<script language='javascript'>
$(function(){
$(".thischeck_all").click(function(){
var y=$(this).attr("val");
var objname=$(this).attr("objname");
if(y==0){
$.uniform.update($("input[name='"+objname+"[]']").prop("checked", false));
y=1;
}else if(y==1){
$.uniform.update($("input[name='"+objname+"[]']").prop("checked", true));
y=0;
}
$(this).attr("val",y);
})
})
</script>