Index: modalframe.module
===================================================================
--- modalframe.module (revision 363)
+++ modalframe.module (working copy)
@@ -7,6 +7,35 @@
  * on the jQuery UI Dialog plugin.
  */
 
+
+function modalframe_init() {
+  $frames = module_invoke_all('modalframe');
+  $settings = array();
+  foreach ($frames as $path => $frame) {
+    if (drupal_match_path($_GET['q'], $path)) {
+      modalframe_parent_js();
+      $settings += $frame;
+    }
+  }
+  drupal_add_js(array('modalframe' => array('frames' => $settings)), 'setting');
+  
+  if ($_GET['render'] == 'overlay') {
+    modalframe_child_js();
+  }
+  
+} 
+
+function hook_modalframe() {
+  return array(
+    'node/*' => array(
+      'a[href$="/edit"]' => array(
+        'draggable' => FALSE,
+        'width' => 1200,
+      ),
+    ),
+  );
+}
+
 /**
  * Implementation of hook_theme_registry_alter().
  *
@@ -187,6 +216,9 @@
  * @ingroup forms
  */
 function modalframe_form_submit($form, &$form_state) {
+  if ($form_state['redirect']) {
+    modalframe_close_dialog();
+  }
   if (!empty($GLOBALS['modalframe_close_dialog'])) {
     $form_state['redirect'] = FALSE;
   }
Index: js/parent.js
===================================================================
--- js/parent.js  (revision 360)
+++ js/parent.js  (working copy)
@@ -1,5 +1,27 @@
 // $Id: parent.js,v 1.1.2.11 2009/08/01 09:08:09 markuspetrux Exp $
 
+jQuery(function () {
+  
+  $.each(Drupal.settings.modalframe.frames, function (i, val) {
+    $(i).click(function () {
+      var a =  document.createElement('a');
+      a.href = this.href;
+      a.search += '&render=overlay';
+      Drupal.modalFrame.open({
+        url: a.href,
+        width: val.width,
+        height: val.height,
+        autoFit: val.autoFit,
+        autoResize: val.autoResize,
+        draggable: val.draggable,
+        onSubmit: val.onSubmit,
+      });
+      return false;
+    });
+  });
+  
+});
+
 (function ($) {
 
 /**
