projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
73f3170
)
CRM-15346 - Call Drupal.detachBehaviors conditionally for D6 support
author
Coleman Watts
<coleman@civicrm.org>
Mon, 10 Nov 2014 19:50:43 +0000
(14:50 -0500)
committer
Coleman Watts
<coleman@civicrm.org>
Mon, 10 Nov 2014 19:50:43 +0000
(14:50 -0500)
js/crm.drupal.js
patch
|
blob
|
blame
|
history
diff --git
a/js/crm.drupal.js
b/js/crm.drupal.js
index fc0411aed2a3b2e496e8278a1f7cbcd2c7604cb0..4c1849cbc077f98e2750771734a61d1d3a7b2b1a 100644
(file)
--- a/
js/crm.drupal.js
+++ b/
js/crm.drupal.js
@@
-6,7
+6,10
@@
CRM.$(function($) {
Drupal.attachBehaviors(e.target);
})
.on('crmUnload', function(e) {
- Drupal.detachBehaviors(e.target);
+ // This function doesn't exist in D6 so call conditionally
+ if (typeof Drupal.detachBehaviors === 'function') {
+ Drupal.detachBehaviors(e.target);
+ }
})
.on('dialogopen', function(e) {
// D7 hack to get the toolbar out of the way (CRM-15341)