User tests: Successful: Unsuccessful:
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.
Apply the patch, click on the edit button and confirm a modal opened.
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?
Labels |
Added:
?
|
@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!
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
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...
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.
Okay, I will do :)
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-04-05 20:54:46 |
@n9iels I’ll send a PR with the BS modal to your repo in few mins...