SharePoint 2010模式对话框扩展
主要用于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();
页:
[1]