FineUI 官方论坛
标题:
AppBox_v1.0_update20120705
[打印本页]
作者:
sanshi
时间:
2012-7-5 08:14
标题:
AppBox_v1.0_update20120705
主要修正两个问题:
1. 帮助菜单的JS错误
2. 修正打开 菜单模块编辑页面 后,导致其他页面出错的各种问题
下载后直接覆盖AppBox源代码即可。
[attach]793[/attach]
导致第二个问题的主要原因是:打开菜单编辑页面后,在创建下拉列表时对全局静态变量进行了修改(CustomMenuHelper.GetCustomMenus)。现在的解决方案时创建下拉列表时不修改此全局变量。
在实现过程中参考了 Effective C#中提到的ICloneable在类继承中使用的技巧,大家也可以在实践中学习下这个手法。
using System;
using System.Collections.Generic;
using System.Web;
namespace AppBox
{
public class CustomTree
{
private int id;
private int parentId;
private string name;
private string title;
public int Id
{
get { return id; }
set { id = value; }
}
public int ParentId
{
get { return parentId; }
set { parentId = value; }
}
public string Name
{
get { return name; }
set { name = value; }
}
public string Title
{
get { return title; }
set { title = value; }
}
/// <summary>
/// 在模拟树的Grid中使用
/// </summary>
private int treeLevel = 0;
/// <summary>
/// 是Tree中使用
/// </summary>
private bool isTreeLeaf = false;
/// <summary>
/// 在模拟树的下拉列表中使用
/// </summary>
private bool enabled = true;
/// <summary>
/// 本菜单在树形结构中层级(从0开始)
/// </summary>
public int TreeLevel
{
get { return treeLevel; }
set { treeLevel = value; }
}
/// <summary>
/// 是否可用(默认true)
/// </summary>
public bool Enabled
{
get { return enabled; }
set { enabled = value; }
}
/// <summary>
/// 是否叶子节点(默认false)
/// </summary>
public bool IsTreeLeaf
{
get { return isTreeLeaf; }
set { isTreeLeaf = value; }
}
public CustomTree()
{
}
protected CustomTree(CustomTree tree)
{
Id = tree.Id;
ParentId = tree.ParentId;
Name = tree.Name;
Title = tree.Title;
TreeLevel = tree.TreeLevel;
IsTreeLeaf = tree.IsTreeLeaf;
Enabled = tree.Enabled;
}
}
}
复制代码
using System;
using System.Collections.Generic;
using System.Web;
namespace AppBox
{
public class CustomDept : CustomTree, ICloneable
{
private int sortIndex;
private string remark;
public int SortIndex
{
get { return sortIndex; }
set { sortIndex = value; }
}
public string Remark
{
get { return remark; }
set { remark = value; }
}
public CustomDept()
{
}
private CustomDept(CustomDept dept)
: base(dept)
{
SortIndex = dept.SortIndex;
Remark = dept.Remark;
}
public object Clone()
{
CustomDept dept = new CustomDept(this);
return dept;
}
}
}
复制代码
作者:
zwt
时间:
2012-8-17 02:37
前天我获得的最新代码没有添加这个补丁吗,代码最新时间是6月24日?
作者:
javi
时间:
2012-8-17 08:26
还是报缺少对象的错误~~
var x22 = new Ext.menu.Item({
x_state: {},
id: "regionPanel_regionTop_Toolbar1_btnHelp_ctl00_ctl01",
text: "科学计算器",
icon: "/icon/calculator.png",
listeners: {
click: function (button, e) {
addExampleTab('jisuanqi', '/admin/help/jisuanqi.htm', '科学计算器', 'Calculator');
e.stopEvent();
}
}
});
欢迎光临 FineUI 官方论坛 (https://fineui.com/BBS/)
Powered by Discuz! X3.4