29
0
mirror of https://github.com/joomla/joomla-cms.git synced 2024-07-04 19:13:40 +00:00

Associations Race Condition Fix (#15948)

* Associations Race Condition Fix

* jQuery -> $

* make @dgt41 mappy by not using jQuery, even though the rest of the file does!

* Load Target Pane AFTER reference pane has loaded to prevent session conflict with checkout
This commit is contained in:
Phil Taylor 2017-05-11 11:02:25 +01:00 committed by Robert Deutz
parent d5ef7f9f05
commit 595602ab82
3 changed files with 6 additions and 2 deletions

View File

@ -51,7 +51,7 @@ $options = array(
<?php echo $this->form->getInput('itemlanguage'); ?>
</div>
<iframe id="target-association" name="target-association"
src="<?php echo $this->defaultTargetSrc; ?>"
data-url="<?php echo $this->defaultTargetSrc; ?>"
height="400" width="400"
data-action="<?php echo $this->targetAction; ?>"
data-item="<?php echo $this->typeName; ?>"

View File

@ -154,6 +154,10 @@ jQuery(document).ready(function($) {
// Attach behaviour to reference frame load event.
$('#reference-association').on('load', function() {
// Load Target Pane AFTER reference pane has loaded to prevent session conflict with checkout
document.getElementById('target-association').setAttribute('src', document.getElementById('target-association').getAttribute('data-url'));
// If copy button used
if ($(this).contents().find('#jform_id').val() !== this.getAttribute('data-id'))
{

File diff suppressed because one or more lines are too long