? Success

User tests: Successful: Unsuccessful:

avatar n9iels
n9iels
5 Apr 2015

How to reproduce the bug

1) Go to menu manager -> menu
2) Create a new menu item of the type "Single article"
3) Select an article
4) Click on the edit button, right of the select button
At this moment, there will open a new page so you can edit the article. An modal is expected instead of a new page.

How to test this page

Apply the patch, click on the edit button and confirm a modal opened.

Notes

I know all Mootools modals are converted to Bootstrap at this moment. So this is a temporarily solution, in the feature this modal shoulde converted to Bootstrap. Maybe @dgt41 can do this one to?

avatar n9iels n9iels - open - 5 Apr 2015
avatar joomla-cms-bot joomla-cms-bot - change - 5 Apr 2015
Labels Added: ?
avatar dgt41
dgt41 - comment - 5 Apr 2015

@n9iels I’ll send a PR with the BS modal to your repo in few mins...

avatar dgt41
dgt41 - comment - 5 Apr 2015

@n9iels try this code:

$html[] = '<a href="#articleModal" role="button" class="btn hasTooltip' . ($value ? '' : ' hidden') . '" data-toggle="modal" title="' . JText::_('JACTION_EDIT') . '"><span class="icon-edit"></span>' . JText::_('JACTION_EDIT') . '</a>';

$html[] = echo JHtmlBootstrap::renderModal(
                        'articleModal', array(
                            'url' => "index.php?option=com_content&layout=modal&tmpl=component&task=article.edit&id=' . $value . '",
                            'title' => JText::_('JACTION_EDIT'),
                            'width' => '800px',
                            'height' => '300px')
                        );

as a direct replacement to the line between the brackets, it should work!

avatar dgt41
dgt41 - comment - 5 Apr 2015

But I just remembered that this was been asked again and turned down due to the fact that the modal window that will have the code to edit the article will also going to use modal for images etc and there we’re gonna face a nice undesired effect! If you search this repo you will find the earlier PR i am talking about and read all about the strange behavior I just described! I think at the moment this cannot go in

avatar Bakual
Bakual - comment - 5 Apr 2015

Personally I don't see a reason why you would want to edit an article in a modal starting from the menu manager. I can see the reason to have an edit link, but why open it in a modal?
Why not just make it a direct link to the full edit form instead? Changes are low that a user who wants to edit the article wants to go back to the menu manager immediately. But it's certainly a convenient link to go to the edit form.

I never understood why we add it in a new page...

avatar n9iels
n9iels - comment - 5 Apr 2015

@dgt41 I understand! In that case I think the same.

@Bakual Good point! I think fix this so it works with a modal will take more effort than necessary.

So the general question: shall we close this PR, or change it so the link will redirect to the full "normal" edit form?

avatar Bakual
Bakual - comment - 5 Apr 2015

So the general question: shall we close this PR, or change it so the link will redirect to the full "normal" edit form?

I would close this and make a new one. Because the title would be misleading and the old commits useless.

avatar n9iels
n9iels - comment - 5 Apr 2015

Okay, I will do :)

avatar n9iels n9iels - change - 5 Apr 2015
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2015-04-05 20:54:46
avatar n9iels n9iels - close - 5 Apr 2015
avatar n9iels n9iels - close - 5 Apr 2015
avatar n9iels n9iels - head_ref_deleted - 5 Apr 2015
avatar n9iels
n9iels - comment - 5 Apr 2015

please see #6670

Add a Comment

Login with GitHub to post a comment