N2 CMS SlidingCurtain 控件不可见
我刚刚设置了一个新的 N2 站点,方法是从 Visual Studio 中的 MVC 2 Web 应用程序模板开始,然后按照与现有 ASP.NET MVC 集成部分中的 N2 CMS 开发人员文档 中的说明进行操作应用程序。我现在已经运行了基本站点,但有一个问题:保存管理控件的滑动窗帘小部件在右上角不可见(当然,在登录时)。
我可以通过使用 Firebug 在 DOM 中定位它,然后禁用几个 CSS 定位元素来使其可见。一旦我这样做了,它似乎就可以正常工作了。以这种方式打开它后,我可以单击各种控件,或将其关闭(并且我看到动画)。但随后它又从屏幕上消失了。
我的母版页在 标记内有滑动窗帘:
<body>
<n2:SlidingCurtain runat="server">
<n2:ControlPanel runat="server" />
</n2:SlidingCurtain>
...
在基础 MVC 站点中生成的 site.css 文件似乎没有进行任何会影响此效果的定位。
Firebug 显示,在 标记之后,我有以下内容:
<div class="sc" id="SC" style="top: -2px; left: -574px;"><div class="scContent">
....
的样式是element.style {
left:-574px;
top:-2px;
}
.sc {
background:#FFFFFF none repeat-x scroll 0 0;
border-color:#CCCCBB;
border-style:none solid solid none;
border-width:1px;
left:-200px;
position:fixed;
top:-200px;
z-index:990;
}
If I disable无论是 top:
还是 left:
规则,都会出现小部件。
编辑 我还有一些线索。我的问题出现在 Firefox 中,但没有出现在 IE 中。打开和关闭控件的 jQuery 代码位于 /N2/Resources/Js/parts.js 中。当我使用 Firebug 在实现打开和关闭操作的函数上放置一些断点时,控件可以工作。
I just set up a new N2 site by starting with the MVC 2 Web Application template in Visual Studio, then following the directions in N2 CMS Developer Documentation in the section Integrating with Existing ASP.NET MVC Application. I have the basic site running now, but with one problem: the sliding curtain widget that holds the administrative controls is not visible in the upper right corner (when logged in, of course).
I can make it visible the hard way by using Firebug to locate it in the DOM, and then disabling a couple of the CSS positioning elements. Once I do that, it seems to work normally. After I open it that way, I can click the various controls, or close it up (and I see the animation). But then it's off screen again.
My master page has the sliding curtain just inside the <body>
tag:
<body>
<n2:SlidingCurtain runat="server">
<n2:ControlPanel runat="server" />
</n2:SlidingCurtain>
...
The site.css file generated in the base MVC site doesn't seem to do any positioning that would affect this.
Firebug shows that right after by <body>
tag, I have this:
<div class="sc" id="SC" style="top: -2px; left: -574px;"><div class="scContent">
....
The style for <div class="sc" ...>
is
element.style {
left:-574px;
top:-2px;
}
.sc {
background:#FFFFFF none repeat-x scroll 0 0;
border-color:#CCCCBB;
border-style:none solid solid none;
border-width:1px;
left:-200px;
position:fixed;
top:-200px;
z-index:990;
}
If I disable both top:
and both left:
rules, the widget appears.
EDIT
I have some more clues. My problem happens in Firefox, but not IE. The jQuery code that opens and closes the control is in /N2/Resources/Js/parts.js. When I use Firebug to put some breakpoints on the functions that implement the open and close operations, the control works.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论