mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-04 02:40:25 +08:00
36 lines
733 B
JavaScript
36 lines
733 B
JavaScript
Tea.context(function () {
|
|
this.grantId = 0;
|
|
this.grant = null;
|
|
|
|
this.success = NotifySuccess("保存成功", "/nodes");
|
|
|
|
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;
|
|
};
|
|
}); |