Files
EdgeAdmin/web/views/@default/nodes/create.js

36 lines
733 B
JavaScript
Raw Normal View History

2020-07-29 19:34:54 +08:00
Tea.context(function () {
2020-07-30 22:41:35 +08:00
this.grantId = 0;
this.grant = null;
2020-07-29 19:34:54 +08:00
this.success = NotifySuccess("保存成功", "/nodes");
2020-07-30 22:41:35 +08:00
this.selectGrant = function () {
var that = this;
teaweb.popup("/nodes/grants/selectPopup", {
callback: function (resp) {
that.grantId = resp.data.grant.id;
if (that.grantId > 0) {
that.grant = resp.data.grant;
}
}
});
};
this.createGrant = function () {
var that = this;
teaweb.popup("/nodes/grants/createPopup", {
height: "31em",
callback: function (resp) {
that.grantId = resp.data.grant.id;
if (that.grantId > 0) {
that.grant = resp.data.grant;
}
}
});
};
this.removeGrant = function () {
this.grant = null;
this.grantId = 0;
};
2020-07-29 19:34:54 +08:00
});