You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
2.6 KiB
67 lines
2.6 KiB
<?php
|
|
use \common\libs\MyLib;
|
|
?>
|
|
<form id="theFrm">
|
|
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
|
|
<tr>
|
|
<td class="td_bg">
|
|
<span style="margin-left:10px;">权限组名称:</span>
|
|
<input type="Text" name="power_name" value="<?=$power_info?$power_info->name:''?>" />
|
|
<input type="hidden" name="power_id" value="<?=$power_info?$power_info->id:''?>" />
|
|
<input type="button" class="act_btn" id="save-btn" name="add-btn" value="<?=$power_info?'保存':'新增'?>">
|
|
<input type="button" class="act_btn" id="return-btn" name="return-btn" value="返回">
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
|
|
<tr>
|
|
<td align="center" class="bg_tr"><input type="checkbox" id="all"></td>
|
|
<td align="center" class="bg_tr">菜单名称</td>
|
|
<td align="center" class="bg_tr">路径</td>
|
|
</tr>
|
|
<?php foreach($menu_items as $item){ ?>
|
|
<tr onMouseOver="overColor(this)" onMouseOut="outColor(this)">
|
|
<td width="24" align="center" class="td_bg"><label><input class="checkbox" type="checkbox" name="menu_ids[]" value="<?=$item->id?>" <?=in_array($item->id,$menu_ids)?'checked':''?> /></label></td>
|
|
<td class="td_bg" style="padding-left:50px;" nowrap><?= $item->name ?></td>
|
|
<td class="td_bg" align="center" nowrap><?= $item->path ?></td>
|
|
</tr>
|
|
<?php } ?>
|
|
</table>
|
|
</form>
|
|
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script>
|
|
<script type="text/javascript" language="javascript" src="/js/ajax.js"></script>
|
|
<script type="text/javascript" language="javascript" src="/js/func.js"></script>
|
|
<script type="text/javascript" language="javascript">
|
|
|
|
/**
|
|
* 返回
|
|
*/
|
|
$("#return-btn").click(function(){
|
|
window.location.href="/menu/power-list";
|
|
});
|
|
|
|
/**
|
|
* 全选、反选
|
|
*/
|
|
$('#all').click(function(){
|
|
var key = $(this).prop('checked');
|
|
if(key)
|
|
$('.checkbox').prop('checked',true);
|
|
else
|
|
$('.checkbox').removeProp('checked');
|
|
});
|
|
|
|
/**
|
|
* 新增、修改
|
|
*/
|
|
$('#save-btn').click(function(){
|
|
var params = $('#theFrm').serialize();
|
|
$.post('/menu/power-save',params,function(obj){
|
|
alert(obj.msg);
|
|
if(obj.success){
|
|
window.location.href="/menu/power-list";
|
|
}
|
|
},'json');
|
|
});
|
|
|
|
</script>
|
|
|