Last active
January 31, 2016 09:56
-
-
Save joeke/2a588229caec7dcf15a6 to your computer and use it in GitHub Desktop.
ExtJS: render tooltip only when specific value is set
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
, 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