User tests: Successful: Unsuccessful:
Pull Request for Issue #9593 .
mootools modal needs the field id
Switch to the Hathor template. I know it's out of date and never updated, but it serves this point for now. Go to Content > Articles > Add New Article. Click on the User icon next to the Created By field. The Modal window shows up (it should be based on MooTools). Click on any user in there and nothing happens.
Apply patch redo. Also check that isis still works as expected
Kudos to @OctavianC for finding and proposing the solution
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
I appreciate you for stepping in @dgt41 :)
However, since the fielduser.js
file only injects the click
event when the Bootstrap Modal is loaded, there's also a need to modify administrator/components/com_users/views/users/tmpl/modal.php
and add:
onclick="if (window.parent && window.parent.jSelectUser) window.parent.jSelectUser(this);"
Wherever the following is encountered:
data-user-field="<?php echo $this->escape($field);?>"
This makes setValue()
somehow redundant:
// set the value
$.fieldUser.prototype.setValue = function(value, name) {
this.$input.val(value).trigger('change');
this.$inputName.val(name || value).trigger('change');
};
... since the onclick
HTML attribute will trigger as well. I can see an isolated issue where jModalClose()
is not defined and would make jSelectUser()
throw an error. Perhaps changing this:
// handle value select
content.on('click', '.button-select', function(){
self.setValue($(this).data('user-value'), $(this).data('user-name'));
self.modalClose();
$('body').removeClass('modal-open');
});
... to also remove the HTML attribute would solve it when using Bootstrap Modals?
$(this).removeAttr('onclick');
Rel_Number | 0 | ⇒ | 9593 |
Relation Type | ⇒ | Pull Request for |
Category | ⇒ | Fields JavaScript |
I have tested this item successfully on 0fe32ce
TEST OK
but please never make me use Hathor again :-P
I have tested this item successfully on 0fe32ce
Status | Pending | ⇒ | Ready to Commit |
Labels |
Added:
?
|
Milestone |
Added: |
hathor has template overrides for administrator/components/com_users/views/users/tmpl/modal.php
(here: https://github.com/joomla/joomla-cms/blob/staging/administrator/templates/hathor/html/com_users/users/modal.php#L66) which calls if (window.parent) window.parent.jSelectUser(this);
. If you use any other template, the Modal will fail even after applying this patch.
I thought about that when I was testing and was able to select the user in
com_content before and after the patch when using isis
On 31 March 2016 at 09:54, Octavian Cinciu notifications@github.com wrote:
hathor has template overrides for
administrator/components/com_users/views/users/tmpl/modal.php (here:
https://github.com/joomla/joomla-cms/blob/staging/administrator/templates/hathor/html/com_users/users/modal.php#L66)
which calls if (window.parent) window.parent.jSelectUser(this);. If you
use any other template, the Modal will fail even after applying this patch.—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#9659 (comment)
Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/
Isis has layout overrides - fielduser.js
takes into account only Bootstrap 2 Modals. Any other Modals (MooTools) and the onclick event won't be triggered. If you'll be using another administrator template (unlikely, but why are we supporting templates if they don't work then?) without a template override for modal.php
clicking on a user won't do anything.
Without my proposed changes above this won't be fixed entirely, it will only be fixed for hathor.
Status | Ready to Commit | ⇒ | Pending |
Labels |
Removed RTC
Labels |
Removed:
?
|
This PR has received new commits.
CC: @brianteeman, @mikeveeckmans
Title |
|
Title |
|
I have tested this item successfully on d6a8353
TEST OK
Tested successfully:
Status | Pending | ⇒ | Ready to Commit |
Set back to RTc - thanks everyone
Labels |
Added:
?
|
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-04-12 20:04:12 |
Closed_By | ⇒ | rdeutz |
Labels |
Removed:
?
|
Milestone |
Removed: |
Milestone |
Added: |
Milestone |
Added: |
Milestone |
Removed: |
I have followed above steps and not able to reproduce this issue.
Here is my system information:
Joomla! Version: Joomla! 3.4.8 Stable [ Ember ] 24-December-2015 19:30 GMT
Joomla! Platform Version: Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
PHP Version: 5.4.45-3+deb.sury.org~precise+1
System Linux desktop
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9659.