SharePoint 2013 对话框

The quick way to open a sharepoint 2013 dialog modal form is via Javascript below

1
2
3
4
5
function OpenPopUpPage(url, callback, width, height)
 
function OpenPopUpPageWithTitle(url, callback, width, height, title)
 
function OpenPopUpPageWithDialogOptions(dialogOptions)

The dialogOptions supports the following

Options PropertyDescription
titleA string that contains the title of the dialog.
urlA string that contains the URL of the page that appears in the dialog. If both url and html are specified, url takes precedence. Either url or html must be specified.
htmlAn Element (such as DIV)  A string that contains the HTML of the page that appears in the dialog. If both html and url are specified, url takes precedence. Either url or html must be specified.
xAn integer value that specifies the x-offset of the dialog. This value works like the CSS left value.
yAn integer value that specifies the y-offset of the dialog. This value works like the CSS top value.
widthAn integer value that specifies the width of the dialog. If width is not specified, the width of the dialog is autosized by default. If autosize is false, the width of the dialog is set to 768 pixels.
heightAn integer value that specifies the height of the dialog. If height is not specified, the height of the dialog is autosized by default. If autosize is false, the dialog height is set to 576 pixels.
allowMaximizeA Boolean value that specifies whether the dialog can be maximized. true if the Maximize button is shown; otherwise, false.
showMaximizedA Boolean value that specifies whether the dialog opens in a maximized state. true the dialog opens maximized. Otherwise, the dialog is opened at the requested sized if specified; otherwise, the default size, if specified; otherwise, the autosized size.
showCloseA Boolean value that specifies whether the Close button appears on the dialog.
autoSizeA Boolean value that specifies whether the dialog platform handles dialog sizing.
dialogReturnValueCallbackA function pointer that specifies the return callback function. The function takes two parameters, a dialogResult of type SP.UI.DialogResult Enumeration and a returnValue of type object that contains any data returned by the dialog.
argsAn object that contains data that are passed to the dialog.

This is with assumption that the following SharePoint JS file are loaded:

  1. SP.Core.js
  2. SP.UI.Dialog.js
Hence,  you can always add this js to your custom app to do the call out!
 
参考:http://wp.ahcheng.com/2013/04/09/calling-dialog-modal-form-in-sharepoint-2013/

转载于:https://www.cnblogs.com/wengnet/p/4786252.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值