Ext.onReady(function () {
Ext.QuickTips.init();
// get rights here
if (roles.length > 0) {
Ext.override(Ext.Button, {
initComponent: function () {
//filter rights here with matching text
// if length is greater than 0, then enable disable buttons
if (buttonRights.length > 0) {
if (this.text == buttonRoles[0].ItemText) {
this.setDisabled(!roles[0].IsAllowed);
}
}
}
});
}
});
1条答案
按热度按时间ev7lccsx1#
我已经用这些代码行解决了问题: