summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--js/modal.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/js/modal.js b/js/modal.js
index 6edf337..bfb845f 100644
--- a/js/modal.js
+++ b/js/modal.js
@@ -260,6 +260,15 @@
});
});
+
+ // Bind a click handler to allow elements with the 'ctools-close-modal'
+ // class to close the modal.
+ $('.ctools-close-modal', context).once('ctools-close-modal-processed', function () {
+ $(this).click(function() {
+ Drupal.CTools.Modal.dismiss();
+ return false;
+ });
+ });
}
};