From 2b199f3a97449a37b27525e46ecb48597e2b5a7c Mon Sep 17 00:00:00 2001 From: Matthew Radcliffe Date: Fri, 13 Jan 2012 13:52:02 -0500 Subject: [PATCH] [#947676] by merlinofchaos. Re-rolled detach patch for 7.x-aloha. --- wysiwyg.js | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/wysiwyg.js b/wysiwyg.js index 72ca156..1e04310 100644 --- a/wysiwyg.js +++ b/wysiwyg.js @@ -234,4 +234,13 @@ Drupal.wysiwyg.getParams = function(element, params) { */ Drupal.wysiwygInit(); +// Respond to CTools detach behaviors event. +$(document).bind('CToolsDetachBehaviors', function(context) { + for (var i in Drupal.wysiwyg.instances) { + // Do we have to test to see if the instance is actually within the context? + Drupal.wysiwygDetach(context, Drupal.wysiwyg.instances[i]); + } +}); + + })(jQuery); -- 1.7.6