Author: jablko
Date: Wed Oct 13 21:05:46 2010
New Revision: 8098

Log:
Prefer .click() to onclick="...", and generating JavaScript source string, in 
JavaScript

Modified:
   trunk/js/multiDelete.js

Modified: trunk/js/multiDelete.js
==============================================================================
--- trunk/js/multiDelete.js     Wed Oct 13 20:34:02 2010        (r8097)
+++ trunk/js/multiDelete.js     Wed Oct 13 21:05:46 2010        (r8098)
@@ -47,8 +47,14 @@
         {
           $('input[type=checkbox].multiDelete').each(function ()
             {
-              var elementName = $(this).attr('name');
-              $(this).replaceWith('<button name="delete" class="delete-small" 
onclick="Qubit.multiDelete(this, \'' + elementName + '\'); return false;" />');
+              $('<button class="delete-small" name="delete"/>')
+                .click(function (event)
+                  {
+                    Qubit.multiDelete(this, $(this).attr('name'));
+
+                    event.preventDefault();
+                  })
+                .replaceAll(this);
             });
 
           // Remove delete icons in table headers

-- 
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