Author: jablko
Date: Mon Oct 18 18:16:15 2010
New Revision: 8255

Log:
Use type="button" to avoid default behavior

Modified:
   trunk/js/dialog.js
   
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/js/dialog.js
==============================================================================
--- trunk/js/dialog.js  Mon Oct 18 18:01:03 2010        (r8254)
+++ trunk/js/dialog.js  Mon Oct 18 18:16:15 2010        (r8255)
@@ -172,6 +172,7 @@
   this.onSubmit = function (event)
   {
     event.preventDefault();
+
     thisDialog.appendHiddenFields();
 
     // Apply selector to <iframe/> contents, update value of selected element
@@ -554,10 +555,8 @@
           thisDialog.open($(this).closest('tr').attr('id'));
         });
 
-      $tr.find('button[name=delete]').click(function (event)
+      $tr.find('button[name=delete]').click(function ()
         {
-          event.preventDefault();
-
           thisDialog.remove($(this).closest('tr').attr('id'));
         });
     }

Modified: 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedAuthorityRecord.php
==============================================================================
--- 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedAuthorityRecord.php
       Mon Oct 18 18:01:03 2010        (r8254)
+++ 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedAuthorityRecord.php
       Mon Oct 18 18:16:15 2010        (r8255)
@@ -41,6 +41,8 @@
 <?php
 
 // Template for new display table rows
+$editHtml = image_tag('pencil', array('alt' => 'edit', 'style' => 'align: 
top'));
+
 $rowTemplate = "<tr id=\"{{$form->getWidgetSchema()->generateName('id')}}\">"
   .'  <td>'
   ."    {{$form->resource->renderName()}}"
@@ -49,7 +51,7 @@
   .'  </td><td>'
   ."    {{$form->dateDisplay->renderName()}}"
   .'  </td><td style="text-align: right">'
-  ."    $editImage $deleteBtn"
+  ."    $editHtml <button class=\"delete-small\" name=\"delete\" 
type=\"button\"/>"
   .'  </td>'
   .'</tr>';
 
@@ -67,7 +69,7 @@
       jQuery('#relatedEntityDisplay tr[id]').each(function ()
         {
           var tr = this;
-          jQuery('$editImage')
+          jQuery('$editHtml')
             .click(function ()
               {
                 dialog.open(tr.id);

Modified: 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedFunction.php
==============================================================================
--- 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedFunction.php  
    Mon Oct 18 18:01:03 2010        (r8254)
+++ 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedFunction.php  
    Mon Oct 18 18:16:15 2010        (r8255)
@@ -48,9 +48,8 @@
 
 <?php
 
-// Define template for new relation table rows added by dialog
-$editImage = image_tag('pencil', array('alt' => 'edit', 'style' => 'align: 
top'));
-$deleteBtn = '<button class="delete-small" name="delete"/>';
+// Template for new display table rows
+$editHtml = image_tag('pencil', array('alt' => 'edit', 'style' => 'align: 
top'));
 
 $rowTemplate = "<tr id=\"{{$form->getWidgetSchema()->generateName('id')}}\">"
   .'  <td>'
@@ -62,7 +61,7 @@
   .'  </td><td>'
   ."    {{$form->dateDisplay->renderName()}}"
   .'  </td><td style="text-align: right">'
-  ."    $editImage $deleteBtn"
+  ."    $editHtml <button class=\"delete-small\" name=\"delete\" 
type=\"button\"/>"
   .'  </td>'
   .'</tr>';
 
@@ -143,7 +142,7 @@
       jQuery('#relatedFunctions tr[id]').each(function ()
         {
           var tr = this;
-          jQuery('$editImage')
+          jQuery('$editHtml')
             .click(function ()
               {
                 dialog.open(tr.id);

Modified: 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedResource.php
==============================================================================
--- 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedResource.php  
    Mon Oct 18 18:01:03 2010        (r8254)
+++ 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedResource.php  
    Mon Oct 18 18:16:15 2010        (r8255)
@@ -41,6 +41,8 @@
 <?php
 
 // Template for new display table rows
+$editHtml = image_tag('pencil', array('alt' => 'edit', 'style' => 'align: 
top'));
+
 $rowTemplate = "<tr id=\"{{$form->getWidgetSchema()->generateName('id')}}\">"
   .'  <td>'
   ."    {{$form->resource->renderName()}}"
@@ -49,7 +51,7 @@
   .'  </td><td>'
   ."    {{$form->dateDisplay->renderName()}}"
   .'  </td><td style="text-align: right">'
-  ."    $editImage $deleteBtn"
+  ."    $editHtml <button class=\"delete-small\" name=\"delete\" 
type=\"button\"/>"
   .'  </td>'
   .'</tr>';
 

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