Author: jablko
Date: Mon Oct 18 10:56:04 2010
New Revision: 8231
Log:
Use .click() to avoid converting from JavaScript variable, to source, and back,
and loosing context
Modified:
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/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedAuthorityRecord.php
==============================================================================
---
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedAuthorityRecord.php
Mon Oct 18 10:41:10 2010 (r8230)
+++
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedAuthorityRecord.php
Mon Oct 18 10:56:04 2010 (r8231)
@@ -69,7 +69,14 @@
var thisUri = this.id;
if (undefined != thisUri)
{
- jQuery('td:last', this).prepend('<a
href="javascript:Qubit.dialogRelatedEntity.open(\'' + thisUri +
'\')">$editImage</a>');
+ jQuery('<a href="#">$editImage</a>')
+ .click(function (event)
+ {
+ event.preventDefault();
+
+ Qubit.dialogRelatedEntity.open(thisUri);
+ })
+ .prependTo('td:last', this);
}
});
} }
Modified:
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedFunction.php
==============================================================================
---
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedFunction.php
Mon Oct 18 10:41:10 2010 (r8230)
+++
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedFunction.php
Mon Oct 18 10:56:04 2010 (r8231)
@@ -145,7 +145,14 @@
var thisUri = this.id;
if (undefined != thisUri)
{
- jQuery('td:last', this).prepend('<a
href="javascript:Qubit.dialog.open(\'' + thisUri + '\')">$editImage</a>');
+ jQuery('<a href="#">$editImage</a>')
+ .click(function (event)
+ {
+ event.preventDefault();
+
+ Qubit.dialog.open(thisUri);
+ })
+ .prependTo('td:last', this);
}
});
} }
Modified:
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedResource.php
==============================================================================
---
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedResource.php
Mon Oct 18 10:41:10 2010 (r8230)
+++
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedResource.php
Mon Oct 18 10:56:04 2010 (r8231)
@@ -69,7 +69,14 @@
var thisUri = this.id;
if (undefined != thisUri)
{
- jQuery('td:last', this).prepend('<a
href="javascript:Qubit.dialog2.open(\'' + thisUri + '\')">$editImage</a>');
+ jQuery('<a href="#">$editImage</a>')
+ .click(function (event)
+ {
+ event.preventDefault();
+
+ Qubit.dialog2.open(thisUri);
+ })
+ .prependTo('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.