Code
/**
* @ Author L
*/
Function grant (){
Ext. Ajax. Request ({
// The X-mask-loading effect is displayed when Ajax is submitted.
Ext. getbody (). Mask ("permission allocation... please wait...", "x-mask-loading ");
URL: '/.../e_r_t', // submitted URL
// Failed operation (the failure here refers to a running error, such as 404,500 error)
Failure: function (){
// Remove the X-mask-loading effect
Ext. getbody (). Unmask ();
Ext. msg. Alert ('user authorization', 'user authorization failed! ');
},
// Successful operation
Success: function (response, option) {// The option parameter is useless.
// Remove the X-mask-loading effect
Ext. getbody (). Unmask ();
// Ext. msg. Alert ('user authorization', 'user authorization successful! ');
VaR responsearray = ext. util. JSON. Decode (response. responsetext); // get the returned josn
Alert (responsearray.info); // The displayed content is displayed.
},
Params :{
Qxlist: checked // Parameter
}
})
}
/**
* @ Author L
*/
Function grant (){
Ext. Ajax. Request ({
// The X-mask-loading effect is displayed when Ajax is submitted.
Ext. getbody (). Mask ("permission allocation... please wait...", "x-mask-loading ");
URL: '/.../e_r_t', // submitted URL
// Failed operation (the failure here refers to a running error, such as 404,500 error)
Failure: function (){
// Remove the X-mask-loading effect
Ext. getbody (). Unmask ();
Ext. msg. Alert ('user authorization', 'user authorization failed! ');
},
// Successful operation
Success: function (response, option) {// The option parameter is useless.
// Remove the X-mask-loading effect
Ext. getbody (). Unmask ();
// Ext. msg. Alert ('user authorization', 'user authorization successful! ');
VaR responsearray = ext. util. JSON. Decode (response. responsetext); // get the returned josn
Alert (responsearray.info); // The displayed content is displayed.
},
Params :{
Qxlist: checked // Parameter
}
})
}
The method is as follows:
Ruby code
Def create_right_task
# It is said that the josn
TEXT = % {success: false, Info: 'failed to add '}}
Render: text => text,: Layout => false
End