FineUI 官方论坛
标题:
【分享】AppBox 4还原3.0显示隐藏标题栏
[打印本页]
作者:
SwordElf
时间:
2014-3-25 16:36
标题:
【分享】AppBox 4还原3.0显示隐藏标题栏
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();
});
复制代码
作者:
liaofeifan
时间:
2014-4-4 15:43
if (regionTop.height - 36 > 0) {
regionTop.setHeight(36);
btnShowHideHeader.setTooltip('显示标题栏');
btnShowHideHeader.setIcon('res.axd?icon=SectionCollapsed');
}
其实就这个36最关键。
作者:
ikalu
时间:
2014-4-18 14:32
mark!!!!!!!!
作者:
fesfsd
时间:
2014-4-18 18:10
只有AppBox2.0
作者:
fesfsd
时间:
2014-4-24 18:01
只有AppBox2.0、点击按钮无效怎么解决
欢迎光临 FineUI 官方论坛 (https://fineui.com/bbs/)
Powered by Discuz! X3.4