Issue #1347578 by Dave Reid: Allow modal to have other close buttons inside the modal.
authordavereid
Fri, 20 Jan 2012 23:11:45 +0000 (15:11 -0800)
committerEarl Miles
Fri, 20 Jan 2012 23:11:45 +0000 (15:11 -0800)
js/modal.js

index 6edf337..bfb845f 100644 (file)
           });
 
         });
+
+      // 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;
+        });
+      });
     }
   };