? Pending

User tests: Successful: Unsuccessful:

avatar dgrammatiko
dgrammatiko
18 Jul 2018

Pull Request for Issue # .

Summary of Changes

  • Code to ES6 (except sidebyside.js which is....)
  • Fixed some obvious bugs
  • Patched bootstrap-init.js to work with the js in the url (give a cookie to the one who had this brilliant idea)

Testing Instructions

@infograf768 you might be the only one here that knows what was broken, so please test and also provide some info for others to know how to test

Expected result

Modal opens

Actual result

Modal doesnt appear and also there was a console error

Documentation Changes Required

Hopefully not

avatar dgrammatiko dgrammatiko - open - 18 Jul 2018
avatar dgrammatiko dgrammatiko - change - 18 Jul 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 18 Jul 2018
Category Administration com_associations JavaScript
avatar dgrammatiko dgrammatiko - change - 18 Jul 2018
Labels Added: ?
082e54a 18 Jul 2018 avatar dgrammatiko cs
avatar infograf768
infograf768 - comment - 19 Jul 2018

Original Issue is #18552

Test Unsuccessful:
The modal loads fine but it is empty.

Code comparison for menu item (debug ON)
3.8

function jSelectAssociation_jform_modalassociation(id) {
   target = document.getElementById("target-association");
   document.getElementById("target-association").src = target.getAttribute("data-editurl") + "&task=" + target.getAttribute("data-item") + ".edit" + "&id=" + id
	jQuery("#associationSelectjform_modalassociationModal").modal("hide");
}
jQuery(document).ready(function($) {
   $('#associationSelectjform_modalassociationModal').on('show.bs.modal', function() {
       $('body').addClass('modal-open');
       var modalBody = $(this).find('.modal-body');
       modalBody.find('iframe').remove();
       modalBody.prepend('<iframe class="iframe jviewport-height70" src="index.php?option=com_associations&amp;view=associations&amp;layout=modal&amp;tmpl=component&amp;forcedItemType=com_menus.item&amp;function=jSelectAssociation_jform_modalassociation&amp;forcedLanguage=' + document.getElementById('target-association').getAttribute('data-language') + '&amp;8da36713bef8d17c9e99f4bd1ebdedf7=1" name="Select Target" height="400px" width="800px"></iframe>');
   }).on('shown.bs.modal', function() {
       var modalHeight = $('div.modal:visible').outerHeight(true),
           modalHeaderHeight = $('div.modal-header:visible').outerHeight(true),
           modalBodyHeightOuter = $('div.modal-body:visible').outerHeight(true),
           modalBodyHeight = $('div.modal-body:visible').height(),
           modalFooterHeight = $('div.modal-footer:visible').outerHeight(true),
           padding = document.getElementById('associationSelectjform_modalassociationModal').offsetTop,
           maxModalHeight = ($(window).height()-(padding*2)),
           modalBodyPadding = (modalBodyHeightOuter-modalBodyHeight),
           maxModalBodyHeight = maxModalHeight-(modalHeaderHeight+modalFooterHeight+modalBodyPadding);
       var iframeHeight = $('.iframe').height();
       if (iframeHeight > maxModalBodyHeight){;
           $('.modal-body').css({'max-height': maxModalBodyHeight, 'overflow-y': 'auto'});
           $('.iframe').css('max-height', maxModalBodyHeight-modalBodyPadding);

Your PR

<div id="associationSelectjform_modalassociationModal" role="dialog" tabindex="-1" class="joomla-modal modal fade" data-backdrop="static" data-url="index.php?option=com_associations&amp;view=associations&amp;layout=modal&amp;tmpl=component&amp;forcedItemType=com_menus.item&amp;function=jSelectAssociation_jform_modalassociation&amp;forcedLanguage=' + document.getElementById('target-association').getAttribute('data-language') + '&amp;34e9e1234719b19bf400c121347c3d6a=1" data-iframe="&lt;iframe class=&quot;iframe&quot; src=&quot;index.php?option=com_associations&amp;amp;view=associations&amp;amp;layout=modal&amp;amp;tmpl=component&amp;amp;forcedItemType=com_menus.item&amp;amp;function=jSelectAssociation_jform_modalassociation&amp;amp;forcedLanguage=' + document.getElementById('target-association').getAttribute('data-language') + '&amp;amp;34e9e1234719b19bf400c121347c3d6a=1&quot; name=&quot;Select Target&quot; height=&quot;400px&quot; width=&quot;800px&quot;&gt;&lt;/iframe&gt;">

Remark in your PR the use of &amp;amp;

avatar infograf768
infograf768 - comment - 19 Jul 2018

Also, can you integrate the changes
#21180
in this PR

64365ce 19 Jul 2018 avatar dgrammatiko fixes
avatar dgrammatiko
dgrammatiko - comment - 19 Jul 2018

Modal restored:
screenshot 2018-07-19 at 12 20 22

8502b13 19 Jul 2018 avatar dgrammatiko cs
avatar infograf768
infograf768 - comment - 19 Jul 2018

Thanks. It works fine now. Remains to add the same modifications as what has been done in #21180 to get correct contacts and newsfeeds associations fields.

avatar infograf768
infograf768 - comment - 19 Jul 2018

will test it OK when conflict fixed.

avatar dgrammatiko
dgrammatiko - comment - 19 Jul 2018

@infograf768 conflict resolved

avatar infograf768 infograf768 - test_item - 19 Jul 2018 - Tested successfully
avatar infograf768
infograf768 - comment - 19 Jul 2018

I have tested this item successfully on 92a08ec


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21176.

avatar infograf768 infograf768 - test_item - 19 Jul 2018 - Tested successfully
avatar infograf768
infograf768 - comment - 19 Jul 2018

I have tested this item successfully on 911b15f


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21176.

avatar infograf768
infograf768 - comment - 19 Jul 2018

I have tested this item successfully on 911b15f


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21176.

avatar laoneo laoneo - change - 19 Jul 2018
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-07-19 15:17:33
Closed_By laoneo
avatar laoneo laoneo - close - 19 Jul 2018
avatar laoneo laoneo - merge - 19 Jul 2018
avatar laoneo
laoneo - comment - 19 Jul 2018

Good job!

Add a Comment

Login with GitHub to post a comment