- 注册时间
- 2012-12-14
- 最后登录
- 2013-5-23
- 阅读权限
- 10
- 积分
- 56
- 精华
- 0
- 帖子
- 16
|
factory 发表于 2012-12-21 09:26
支持IE6,以及IE6+
如果找不出问题,建议吧问题页面打包上传
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
<script src="/Scripts/WebControls/boot.js" type="text/javascript"></script>
<script src="/Scripts/Other.js" type="text/javascript"></script>
<script src="/Scripts/OG_Message.js" type="text/javascript"></script>
</head>
<body>
<form id="form1" runat="server">
<div class="mini-panel" showheader="false" style="width: 100%; border: none; height: 700px;"
showfooter="true">
<div class="outer">
<fieldset class="fieldset_detail">
<legend>功能信息</legend>
<div id="div_Panels" style="width: 100%; height: 100%;">
</div>
</fieldset>
</div>
</div>
<script type="text/javascript" language="javascript">
mini.parse();
var form = new mini.Form("form1");
var data = [{ "functionID": 2, "functionName": "客户管理", "systemID": 3, "parentID": 0, "functionCode": "MSS0100", "functionType": "1", "operateAccess": 0, "listFun": [{ "functionID": 3, "functionName": "客户基础信息", "systemID": 3, "parentID": 2, "functionCode": "MSS0101", "functionType": "2", "operateAccess": 3, "listFun": null, "items": "[{\"item\":{\"value\":\"1\",\"text\":\"查询\"}},{\"item\":{\"value\":\"2\",\"text\":\"编辑\"}}]"}], "items": ""}];
system_valuechanged(data);
//生成列表
function system_valuechanged(data) {
var functionPer = data;
var str = "";
//最外层的功能菜单
for (var i = 0; i < functionPer.length; i++) {
str += '<div class="mini-panel" id=' + functionPer.functionCode + ' title="<input name=' + functionPer.functionCode + ' class=mini-checkbox text=' + functionPer.functionName + ' oncheckedchanged=onCheckedChanged />" style="width: 100%; height: 100%;" showcollapsebutton="true">';
//循环子菜单
var childrenMenu = functionPer.listFun;
for (var k = 0; k < childrenMenu.length; k++) {
str += '<div class="divcontent">';
str += '<ul>';
str += '<li class="lilab_left">' + childrenMenu[k].functionName + '</li>';
str += '<li class="licontent">';
//循环菜单的操作权限
//此功能已有的权值
var operateAccess = parseInt(childrenMenu[k].operateAccess);
var menuItem = mini.decode(childrenMenu[k].items);
for (var j = 0; j < menuItem.length; j++) {
var itemValue = parseInt(menuItem[j].item.value);
var operateAccessValue = operateAccess & itemValue;
if (operateAccessValue == itemValue) {
str += '<input class="mini-checkbox" checked="true" name="' + childrenMenu[k].functionCode + "_" + childrenMenu[k].functionID + "_" + j + '" falseValue="0" trueValue="' + menuItem[j].item.value + '" text="' + menuItem[j].item.text + '" style="width: 100%" />';
} else {
str += '<input class="mini-checkbox" name="' + childrenMenu[k].functionCode + "_" + childrenMenu[k].functionID + "_" + j + '" falseValue="0" trueValue="' + menuItem[j].item.value + '" text="' + menuItem[j].item.text + '" style="width: 100%" />';
}
}
str += '</li>';
str += '</ul>';
str += '</div>';
}
str += ' </div>';
$("#div_Panels").html(str);
mini.parse();
}
}
</script>
</form>
</body>
</html>
|
|