新建一个appdialog.js文件,代码如下
var contexts = {};
var dialogCount = 0;
var app = {
getDialog: function (obj) {
if (obj) {
return obj.__dialog__;
}
return undefined;
},
close: function (obj) {
var theDialog = this.getDialog(obj);
if (theDialog) {
var rest = Array.prototype.slice.call(arguments, 1);
theDialog.close.apply(theDialog, rest);
}
},
initOption: function (obj) {
var kendowindOption = {
actions: ["Pin", "Refresh", "Maximize", "Minimize", "Close"],
draggable: true,
pinned: true,
height: "450px",
modal: true,
resizable: true,
title: "新增",
width: "700px"
};
if (obj) {
if (obj.actions) {
kendowindOp