|
Main.aspx中找到
- <f:ToolbarFill runat="server" />
- <f:Button ID="btnRefresh" runat="server" Icon="Reload" ToolTip="刷新主区域内容" EnablePostBack="false">
- </f:Button>
复制代码 修改为:
- <f:ToolbarFill runat="server" />
- <f:Button ID="btnShowHideHeader" runat="server" Icon="SectionExpanded" ToolTip="隐藏标题栏"
- EnablePostBack="false"/>
- <f:ToolbarSeparator ID="ToolbarSeparator1" runat="server" />
- <f:Button ID="btnRefresh" runat="server" Icon="ArrowRotateClockwise" ToolTip="刷新主区域内容" EnablePostBack="false"/>
- <f:ToolbarSeparator runat="server" />
复制代码 Main.aspx.cs中找到
- // 注册客户端脚本,服务器端控件ID和客户端ID的映射关系
- JObject ids = GetClientIDS(regionPanel, regionTop, mainTabStrip, txtUser,
- txtOnlineUserCount, txtCurrentTime, btnRefresh);
复制代码 修改为:
- // 注册客户端脚本,服务器端控件ID和客户端ID的映射关系
- JObject ids = GetClientIDS(regionPanel, regionTop, mainTabStrip, txtUser,
- txtOnlineUserCount, txtCurrentTime, btnRefresh, btnShowHideHeader);
复制代码
res/js/main.js中找到
- var treeMenu = Ext.getCmp(DATA.treeMenu),
- regionPanel = Ext.getCmp(DATA.regionPanel),
- regionTop = Ext.getCmp(DATA.regionTop),
- mainTabStrip = Ext.getCmp(DATA.mainTabStrip),
- txtUser = Ext.getCmp(DATA.txtUser),
- txtOnlineUserCount = Ext.getCmp(DATA.txtOnlineUserCount),
- txtCurrentTime = Ext.getCmp(DATA.txtCurrentTime),
- btnRefresh = Ext.getCmp(DATA.btnRefresh);
复制代码 修改为:
- var treeMenu = Ext.getCmp(DATA.treeMenu),
- regionPanel = Ext.getCmp(DATA.regionPanel),
- regionTop = Ext.getCmp(DATA.regionTop),
- mainTabStrip = Ext.getCmp(DATA.mainTabStrip),
- txtUser = Ext.getCmp(DATA.txtUser),
- txtOnlineUserCount = Ext.getCmp(DATA.txtOnlineUserCount),
- txtCurrentTime = Ext.getCmp(DATA.txtCurrentTime),
- btnRefresh = Ext.getCmp(DATA.btnRefresh),
- btnShowHideHeader = Ext.getCmp(DATA.btnShowHideHeader);
复制代码 在“点击刷新按钮”事件下添加:
- // 显示 / 隐藏标题
- btnShowHideHeader.on('click', function () {
- if (regionTop.height - 36 > 0) {
- regionTop.setHeight(36);
- btnShowHideHeader.setTooltip('显示标题栏');
- btnShowHideHeader.setIcon('res.axd?icon=SectionCollapsed');
- } else {
- regionTop.setHeight(90);
- btnShowHideHeader.setTooltip('隐藏标题栏');
- btnShowHideHeader.setIcon('res.axd?icon=SectionExpanded');
- }
- regionPanel.doLayout();
- });
复制代码
|
|