简体   繁体   English

模态对话框-SharePoint 2010

[英]Modal Dialog - SharePoint 2010

I am currently working on creating a ModalPopUp for SharePoint Web Part. 我目前正在为SharePoint Web部件创建ModalPopUp。

I am facing compatibility issues with ModalPopupExtender (with IFrame). 我面临ModalPopupExtender(与IFrame)的兼容性问题。

What are the other options available in SharePoint 2010 or ASP.NET for getting a Modal Popup? SharePoint 2010或ASP.NET中还有哪些其他选项可用于获取模式弹出窗口?

Note: I have tried ModalPopupExtender and OpenModalDialog. 注意:我已经尝试过ModalPopupExtender和OpenModalDialog。

I am not sure if I completely understand your question. 我不确定我是否完全理解您的问题。

I did not have a chance to test SharePoint 2010 yet so I can only try to answer your questions based on my experience with WSS 3. 我还没有机会测试SharePoint 2010,所以我只能根据我在WSS 3上的经验来尝试回答您的问题。

On WSS 3 we derived a custom master page as the default one was rendered in quirks mode (no DOCTYPE was specified). 在WSS 3上,我们导出了一个自定义母版页,因为默认的母版页是在怪癖模式下呈现的(未指定DOCTYPE)。 You can see if the browser renders your Intranet page in standard or quirks mode by pressing F12 in Internet Explorer 8 on your homepage. 您可以通过在主页上的Internet Explorer 8中按F12来查看浏览器是否以标准或怪癖模式呈现Intranet页面。

With the MOSS page being rendered in standard mode we use jQuery for the modal dialog pop ups. 通过以标准模式呈现MOSS页面,我们使用jQuery弹出对话框。

Take a look here for a demo dialog and see if this fits your requirements: 在这里查看演示对话框,看看这是否符合您的要求:

http://jqueryui.com/demos/dialog/#modal http://jqueryui.com/demos/dialog/#modal

To add jQuery you can add the jQuery script to your masterpage and then call the popup like this by modifying one of the SharePoint pages through SharePoint designer: 要添加jQuery,您可以将jQuery脚本添加到您的母版页,然后通过SharePoint设计器修改其中一个SharePoint页来调用弹出窗口:

    $("#dialog-modal").dialog({
        height: 140,
        modal: true
    });

If your page renders in quirks mode and you do not want to change the rendering you can still use jQuery and the impromptu plug-in from here: 如果您的页面以怪癖模式呈现,并且您不想更改呈现,则仍可以从此处使用jQuery和即兴插件:

http://trentrichardson.com/Impromptu/index.php http://trentrichardson.com/Impromptu/index.php

Kind regards, 亲切的问候,

Mathias 马蒂亚斯

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM