1 // http://civicrm.org/licensing
4 .on('crmLoad', function(e
) {
5 // This is drupal's old-school way of listening for 'load' type events. It has to be called manually.
6 Drupal
.attachBehaviors(e
.target
);
8 .on('crmUnload', function(e
) {
9 // This function doesn't exist in D6 so call conditionally
10 if (typeof Drupal
.detachBehaviors
=== 'function') {
11 Drupal
.detachBehaviors(e
.target
);
14 .on('dialogopen', function(e
) {
15 // D7 hack to get the toolbar out of the way (CRM-15341)
16 $('#toolbar').css('z-index', '100');
18 .on('dialogclose', function(e
) {
19 if ($('.ui-dialog-content:visible').not(e
.target
).length
< 1) {
20 // D7 hack, restore toolbar position (CRM-15341)
21 $('#toolbar').css('z-index', '');