diff --git a/js/modal.js b/js/modal.js index 1f113b4..b35c067 100644 --- a/js/modal.js +++ b/js/modal.js @@ -252,6 +252,14 @@ } }); + // Bind a click handler to allow elements with the 'ctools-close-modal' + // class to close the modal. + $('.ctools-close-modal:not(.ctools-close-modal-processed)', context) + .addClass('ctools-close-modal-processed') + .click(function() { + Drupal.CTools.Modal.dismiss(); + return false; + }); }; // The following are implementations of AJAX responder commands.