Author: jablko
Date: Thu Oct 21 22:50:25 2010
New Revision: 8374

Log:
.replaceWith(), like .remove(), drops event listeners. Don't call it

Modified:
   trunk/js/dialog.js

Modified: trunk/js/dialog.js
==============================================================================
--- trunk/js/dialog.js  Thu Oct 21 22:38:03 2010        (r8373)
+++ trunk/js/dialog.js  Thu Oct 21 22:50:25 2010        (r8374)
@@ -69,35 +69,18 @@
           + '</div>').appendTo('body');
 
         // Bind click event to "Add" link
-        var $addLink = $('<a href="#">Add new</a>').click(function (event)
-          {
-            // Prevent default action, "go to top of page"
-            event.preventDefault();
+        var $addLink = $('<a href="#">Add new</a>')
+          .click(function (event)
+            {
+              // Prevent default action, "go to top of page"
+              event.preventDefault();
 
-            thisDialog.open();
-          });
+              thisDialog.open();
+            })
+          .insertAfter(this.table);
 
         // Replace dialog table with "Add" link and move into dialog wrapper
-        $(this.table)
-          .replaceWith($addLink)
-          .appendTo($yuiDialogWrapper.find('form'));
-
-        // Tooltips
-        // TODO Move to description.js?
-        $yuiDialogWrapper.find('.description')
-          .addClass('description-right')
-          .hide();
-
-        $yuiDialogWrapper.find('td:has(.description)')
-          .focusin(function ()
-            {
-              $yuiDialogWrapper.find('.description').hide();
-              $('.description', this).show();
-            })
-          .focusout(function ()
-            {
-              $yuiDialogWrapper.find('.description').hide();
-            });
+        $(this.table).appendTo($yuiDialogWrapper.find('form'));
 
         // Submit dialog data
         var handleYuiSubmit = function ()

-- 
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/qubit-commits?hl=en.

Reply via email to