关于 SharePoint 2007 中的 SPlongOperation 对象
我在项目中使用 SPLongOperation 对象在导航到新页面时引入延迟。内置页面使用默认的 css 样式和品牌。
我想自定义此页面设计并应用我自己的主题和品牌。
请告诉我如何将自定义母版页应用到显示具有动画 gears_an.gif 图像的 SharePoint 2007 Spin Wheel 的页面。
提前致谢。
I am using the SPLongOperation Object in my project to introduce a delay while navigating to a new page.The in-built page uses the default css styles and branding.
I want to customize this page design and apply my own theme and branding.
Please tell me how to apply a custom master page to the page which displays the SharePoint 2007 Spin Wheel having the animated gears_an.gif image.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Alex 是对的,更改页面布局的唯一(不受支持!)方法是更新每个 WFE 文件系统上的 gear.aspx。 请注意,这将是农场范围内的更改,除非您使用布局的副本,如果您决定走这条路线,通常建议您这样做。
如果您确实想变得更聪明,那么操作的
LeadingHTML
和TrailingHtml
属性的值在写入响应流之前不会进行转义。 您可以使用其中一个属性来编写来操作 DOM、注入样式表链接等。
更新: 我整理了一个快速证明- 脚本注入的概念此处。
Alex is right that the only (unsupported!) way to change the page layout would be to update gear.aspx on the file system of each WFE. Note that this would be a farm-wide change unless you're using a copy of LAYOUTS, which is generally recommended if you decide to go this route.
If you really want to get clever, the values of the operation's
LeadingHTML
andTrailingHtml
properties aren't escaped before they are written to the response stream. You could use one of those properties to write a<script>
to manipulate the DOM, inject a stylesheet link, etc.Update: I put together a quick proof-of-concept of script injection here.
我不同意唯一的办法就是修改 OOB 文件。
您可以通过开发自定义 HTTPModule 来解决此问题,而无需违反规则。 此 HTTPModule 将检测您是否正在访问相关页面,并根据以下代码片段修改其母版页:
I don't agree that the only was is to modify the OOB files.
You can solve this without bending the rules by developing a custom HTTPModule. This HTTPModule will detect if you are accessing the page in question and modify its master page according to the following snippet:
不幸的是, SPLongOperation 类是密封的,而且也很硬 -对齿轮 ASPX 文件进行编码。
看起来更改此设置的唯一方法是编辑
12\template\layouts\gear.aspx
文件。 请注意,这可能会导致将来更改此文件的产品更新出现问题。Unfortunately the SPLongOperation class is sealed and also hard-codes the gears ASPX file.
It looks like the only way you can changes this is by editing the
12\template\layouts\gear.aspx
file. Note that this may cause problems with future product updates that make changes to this file.