您的位置:首页 > 其它

SharePoint 2010模式对话框扩展

2012-07-06 15:18 281 查看
主要用于SharePoint 2010模式对话框最大化、恢复默认状态、切换状态(如果是最大化,则切换到正常状态,反之……)、设置模式对话框大小。

扩展JS:

ExecuteOrDelayUntilScriptLoaded(function () {

SP.UI.ModalDialog.prototype.toggleView = function () {

this.$z(null);

};

SP.UI.ModalDialog.prototype.maximize = function () {

if (!this.$S_0) {

this.$z(null);

}

}

SP.UI.ModalDialog.prototype.restore = function () {

if (this.$S_0) {

this.$z(null);

}

}

SP.UI.ModalDialog.prototype.setSize = function (width, height) {

if (typeof width == "number" && typeof height == "number") {

this.$Q_0(width, height);

}

}

}, "sp.ui.dialog.js");

调用方法:

var dlg = SP.UI.ModalDialog.get_childDialog();

dlg.toggleView();
本文出自 “SharePoint-Tech” 博客,请务必保留此出处http://mosstech.blog.51cto.com/3506754/922228
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: