Author: jablko
Date: Sun Oct 24 10:00:54 2010
New Revision: 8408

Log:
Clicking relationship row opens dialog

Modified:
   trunk/apps/qubit/modules/informationobject/templates/_event.php
   trunk/js/multiDelete.js
   trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/templates/_event.php
   
trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/templates/_relatedAuthorityRecord.php
   
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedAuthorityRecord.php
   
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedFunction.php
   
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedResource.php

Modified: trunk/apps/qubit/modules/informationobject/templates/_event.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/templates/_event.php     Sun Oct 
24 09:56:30 2010        (r8407)
+++ trunk/apps/qubit/modules/informationobject/templates/_event.php     Sun Oct 
24 10:00:54 2010        (r8408)
@@ -34,18 +34,14 @@
 {
   $editButtonJs = <<<editButtonJs
 // Add edit button to rows
-jQuery('#relatedEvents tr[id]', context).each(function ()
-  {
-    var tr = this;
-    jQuery('$editHtml')
-      .click(function ()
-        {
-          dialog.open(tr.id);
-        })
+jQuery('#relatedEvents tr[id]', context)
+  .click(function ()
+    {
+      dialog.open(this.id);
+    })
+  .find('td:last')
+  .prepend('$editHtml');
 
-      // http://bugs.jquery.com/ticket/5065
-      .prependTo(jQuery('td:last', this));
-  });
 editButtonJs;
 }
 

Modified: trunk/js/multiDelete.js
==============================================================================
--- trunk/js/multiDelete.js     Sun Oct 24 09:56:30 2010        (r8407)
+++ trunk/js/multiDelete.js     Sun Oct 24 10:00:54 2010        (r8408)
@@ -5,7 +5,7 @@
     /**
      * On page load, replace "multiDelete" checkboxes with delete icons
      */
-    Drupal.behaviors.replaceMultiDelete = {
+    Drupal.behaviors.multiDelete = {
       attach: function (context)
         {
           $('.multiDelete', context)
@@ -13,8 +13,10 @@
               {
                 var input = this;
 
-                return $('<button class="delete-small" 
type="button"/>').click(function ()
+                return $('<button class="delete-small" 
type="button"/>').click(function (event)
                   {
+                    event.stopPropagation();
+
                     $(input).attr('checked', 'checked');
 
                     // Hide element
@@ -37,12 +39,12 @@
                   });
               })
 
-            // Make sure that after() returns an input element.
+            // Make sure that .after() returns an input element.
             // It returns document (which is not compatible
-            // with hide()) if $('multiDelete').lenght is zero
+            // with hide()) if $('.multiDelete').lenght is zero
             .filter('input').hide();
 
           // Drop delete icons from table headers
-          $('th img.deleteIcon').remove();
+          $('th img.deleteIcon', context).remove();
         } }
   })(jQuery);

Modified: trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/templates/_event.php
==============================================================================
--- trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/templates/_event.php      
Sun Oct 24 09:56:30 2010        (r8407)
+++ trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/templates/_event.php      
Sun Oct 24 10:00:54 2010        (r8408)
@@ -104,18 +104,13 @@
         'handleFieldRender': handleFieldRender });
 
       // Add edit button to rows
-      jQuery('#relatedEvents tr[id]', context).each(function ()
-        {
-          var tr = this;
-          jQuery('$editHtml')
-            .click(function ()
-              {
-                dialog.open(tr.id);
-              })
-
-            // http://bugs.jquery.com/ticket/5065
-            .prependTo(jQuery('td:last', this));
-        });
+      jQuery('#relatedEvents tr[id]', context)
+        .click(function ()
+          {
+            dialog.open(this.id);
+          })
+        .find('td:last')
+        .prepend('$editHtml');
     } }
 
 content

Modified: 
trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/templates/_relatedAuthorityRecord.php
==============================================================================
--- 
trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/templates/_relatedAuthorityRecord.php
     Sun Oct 24 09:56:30 2010        (r8407)
+++ 
trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/templates/_relatedAuthorityRecord.php
     Sun Oct 24 10:00:54 2010        (r8408)
@@ -143,18 +143,13 @@
         'relationTableMap': relationTableMap });
 
       // Add edit button to rows
-      jQuery('#relatedEntities tr[id]', context).each(function ()
-        {
-          var tr = this;
-          jQuery('$editHtml')
-            .click(function ()
-              {
-                dialog.open(tr.id);
-              })
-
-            // http://bugs.jquery.com/ticket/5065
-            .prependTo(jQuery('td:last', this));
-        });
+      jQuery('#relatedEntities tr[id]', context)
+        .click(function ()
+          {
+            dialog.open(this.id);
+          })
+        .find('td:last')
+        .prepend('$editHtml');
     } }
 
 content

Modified: 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedAuthorityRecord.php
==============================================================================
--- 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedAuthorityRecord.php
       Sun Oct 24 09:56:30 2010        (r8407)
+++ 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedAuthorityRecord.php
       Sun Oct 24 10:00:54 2010        (r8408)
@@ -74,18 +74,13 @@
         'handleFieldRender': handleFieldRender });
 
       // Add edit button to rows
-      jQuery('#relatedEntityDisplay tr[id]', context).each(function ()
-        {
-          var tr = this;
-          jQuery('$editHtml')
-            .click(function ()
-              {
-                dialog.open(tr.id);
-              })
-
-            // http://bugs.jquery.com/ticket/5065
-            .prependTo(jQuery('td:last', this));
-        });
+      jQuery('#relatedEntityDisplay tr[id]', context)
+        .click(function ()
+          {
+            dialog.open(this.id);
+          })
+        .find('td:last')
+        .prepend('$editHtml');
     } }
 
 content

Modified: 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedFunction.php
==============================================================================
--- 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedFunction.php  
    Sun Oct 24 09:56:30 2010        (r8407)
+++ 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedFunction.php  
    Sun Oct 24 10:00:54 2010        (r8408)
@@ -144,18 +144,13 @@
         'relationTableMap': relationTableMap });
 
       // Add edit button to rows
-      jQuery('#relatedFunctions tr[id]', context).each(function ()
-        {
-          var tr = this;
-          jQuery('$editHtml')
-            .click(function ()
-              {
-                dialog.open(tr.id);
-              })
-
-            // http://bugs.jquery.com/ticket/5065
-            .prependTo(jQuery('td:last', this));
-        });
+      jQuery('#relatedFunctions tr[id]', context)
+        .click(function ()
+          {
+            dialog.open(this.id);
+          })
+        .find('td:last')
+        .prepend('$editHtml');
     } }
 
 content

Modified: 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedResource.php
==============================================================================
--- 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedResource.php  
    Sun Oct 24 09:56:30 2010        (r8407)
+++ 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedResource.php  
    Sun Oct 24 10:00:54 2010        (r8408)
@@ -74,18 +74,13 @@
         'handleFieldRender': handleFieldRender });
 
       // Add edit button to rows
-      jQuery('#relatedResourceDisplay tr[id]', context).each(function ()
-        {
-          var tr = this;
-          jQuery('$editHtml')
-            .click(function ()
-              {
-                dialog.open(tr.id);
-              })
-
-            // http://bugs.jquery.com/ticket/5065
-            .prependTo(jQuery('td:last', this));
-        });
+      jQuery('#relatedResourceDisplay tr[id]', context)
+        .click(function ()
+          {
+            dialog.open(this.id);
+          })
+        .find('td:last')
+        .prepend('$editHtml');
     } }
 
 content

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