Skip to content

Instantly share code, notes, and snippets.

@joeke
Last active January 31, 2016 09:56
Show Gist options
  • Save joeke/2a588229caec7dcf15a6 to your computer and use it in GitHub Desktop.
Save joeke/2a588229caec7dcf15a6 to your computer and use it in GitHub Desktop.
ExtJS: render tooltip only when specific value is set
, listeners: {
render: function(c) {
// first get count via ajax call
MODx.Ajax.request({
url: className.config.connectorUrl,
params: {
action: 'mgr/group/getlist'
},
listeners: {
'success': {
fn: function(r) {
var groupsCount = parseInt(r.total);
if (!groupsCount) {
Ext.getCmp('btn-add-file').disable();
Ext.QuickTips.register({
target: c,
text: _('classname.file.nogroups'),
showDelay: 40,
trackMouse: false
});
}
}
}
}
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment