Author: jablko
Date: Mon Oct 18 14:19:37 2010
New Revision: 8240
Log:
.prependTo() doesn't accept context argument, yet,
http://bugs.jquery.com/ticket/5065
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 12:32:18 2010 (r8239)
+++ trunk/js/dialog.js Mon Oct 18 14:19:37 2010 (r8240)
@@ -24,7 +24,7 @@
function QubitDialog(table, options, $)
{
this.table = document.getElementById(table);
- this.form = $(this.table).parents('form').get(0); // Parent form
+ this.form = $(this.table).closest('form')[0]; // Parent form
this.instances = 0; // Counter
this.label = $('caption', this.table).remove().text();
this.fields = [];
@@ -570,14 +570,14 @@
// Bind events
$('tr[id=' + this.id + '] img[alt=edit]').click(function ()
{
- thisDialog.open($(this).parents('tr').attr('id'));
+ thisDialog.open($(this).closest('tr').attr('id'));
});
$('tr[id=' + this.id + '] button[name=delete]').click(function (event)
{
event.preventDefault();
- thisDialog.remove($(this).parents('tr').attr('id'));
+ 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 12:32:18 2010 (r8239)
+++
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedAuthorityRecord.php
Mon Oct 18 14:19:37 2010 (r8240)
@@ -68,14 +68,15 @@
{
if (undefined != this.id)
{
- jQuery('<a href="#">$editImage</a>')
+ var tr = this;
+ jQuery('$editImage')
.click(function (event)
{
- event.preventDefault();
-
- dialog.open(this.id);
+ dialog.open(tr.id);
})
- .prependTo('td:last', this);
+
+ // http://bugs.jquery.com/ticket/5065
+ .prependTo(jQuery('td:last', this));
}
});
} }
Modified:
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedFunction.php
==============================================================================
---
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedFunction.php
Mon Oct 18 12:32:18 2010 (r8239)
+++
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedFunction.php
Mon Oct 18 14:19:37 2010 (r8240)
@@ -144,14 +144,15 @@
{
if (undefined != this.id)
{
- jQuery('<a href="#">$editImage</a>')
+ var tr = this;
+ jQuery('$editImage')
.click(function (event)
{
- event.preventDefault();
-
- dialog.open(this.id);
+ dialog.open(tr.id);
})
- .prependTo('td:last', this);
+
+ // http://bugs.jquery.com/ticket/5065
+ .prependTo(jQuery('td:last', this));
}
});
} }
Modified:
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedResource.php
==============================================================================
---
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedResource.php
Mon Oct 18 12:32:18 2010 (r8239)
+++
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedResource.php
Mon Oct 18 14:19:37 2010 (r8240)
@@ -68,14 +68,15 @@
{
if (undefined != this.id)
{
- jQuery('<a href="#">$editImage</a>')
+ var tr = this;
+ jQuery('$editImage')
.click(function (event)
{
- event.preventDefault();
-
- dialog.open(this.id);
+ dialog.open(tr.id);
})
- .prependTo('td:last', this);
+
+ // http://bugs.jquery.com/ticket/5065
+ .prependTo(jQuery('td:last', this));
}
});
} }
--
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.