Author: david
Date: 2008-12-01 13:54:03 -0800 (Mon, 01 Dec 2008)
New Revision: 1645

Modified:
   trunk/qubit/web/css/graphic.css
   trunk/qubit/web/js/multiDelete.js
Log:
Change delete icon into a button for multiDelete - allowing image path and 
style information to be put into css, and making html more semantic. See issue 
#531.

Modified: trunk/qubit/web/css/graphic.css
===================================================================
--- trunk/qubit/web/css/graphic.css     2008-12-01 08:13:49 UTC (rev 1644)
+++ trunk/qubit/web/css/graphic.css     2008-12-01 21:54:03 UTC (rev 1645)
@@ -203,6 +203,16 @@
   color: #666;
 }
 
+button.delete-small {
+  background: transparent url('../images/delete.png');
+  background-repeat: no-repeat;
+  background-position: center center;
+  background-attachment: scroll;
+  width: 16px;
+  height: 16px;
+  border: none;
+}
+
 /*********************************************************
                 SEARCH/BROWSE RESULTS LIST
 **********************************************************/

Modified: trunk/qubit/web/js/multiDelete.js
===================================================================
--- trunk/qubit/web/js/multiDelete.js   2008-12-01 08:13:49 UTC (rev 1644)
+++ trunk/qubit/web/js/multiDelete.js   2008-12-01 21:54:03 UTC (rev 1645)
@@ -5,9 +5,10 @@
  * @param object thisElement dom <select> element to operate on
  * @return void
  */
-function multiDelete(thisElement, thisName)
+function multiDelete(obj, thisName)
 {
   // Hide element
+  var thisElement = $(obj);
   var parentRow = thisElement.parent('div').parent('td').parent('tr');
   parentRow.find('td div').hide('normal', function() {
     parentRow.remove();
@@ -23,11 +24,8 @@
 Drupal.behaviors.replaceMultiDelete = function (context)
 {
   $('input[type="checkbox"].multiDelete').each(function () {
-    var deleteIcon = $('img.deleteIcon').eq(0).clone();
     var thisName = $(this).attr('name');
-    $(this).replaceWith(deleteIcon.click(function () {
-      multiDelete($(this), thisName);
-    }));
+    $(this).replaceWith('<button class="delete-small" 
onclick="multiDelete(this, \''+thisName+'\'); return false;" />');
   });
 
   // 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.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to