Author: jablko
Date: Wed Oct 13 22:37:43 2010
New Revision: 8103
Log:
Instead of appending a hidden <input/>, hide the original checkbox, for greater
consistency with the original <input/>
Modified:
trunk/js/multiDelete.js
Modified: trunk/js/multiDelete.js
==============================================================================
--- trunk/js/multiDelete.js Wed Oct 13 21:55:19 2010 (r8102)
+++ trunk/js/multiDelete.js Wed Oct 13 22:37:43 2010 (r8103)
@@ -36,12 +36,8 @@
parentRows.find('div:visible').hide('normal', function ()
{
- parentRows.remove();
+ parentRows.hide();
});
-
- // Append hidden field to delete element on form submit. <button/> has
- // .form property, otherwise use $(thisObj).closest('form')?
- thisObj.form.append('<input type="hidden" name="' + elementName + '"
value="delete">');
}
/**
@@ -50,14 +46,19 @@
Drupal.behaviors.replaceMultiDelete = {
attach: function (context)
{
- $('<button class="delete-small" name="delete"/>')
- .click(function (event)
+ $('.multiDelete')
+ .after(function ()
{
- Qubit.multiDelete(this, $(this).attr('name'));
+ var input = this;
+
+ return $('<button class="delete-small"
name="delete"/>').click(function (event)
+ {
+ Qubit.multiDelete(input, $(input).attr('name'));
- event.preventDefault();
+ event.preventDefault();
+ });
})
- .replaceAll('input[type=checkbox].multiDelete');
+ .hide();
// Remove delete icons in table headers
$('th img.deleteIcon').remove();
--
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.