Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modal com_modules/com_menus: improve Edit Module (+ fix old issues) #10566

Merged

Conversation

cyrezdev
Copy link
Contributor

@cyrezdev cyrezdev commented May 20, 2016

Improve modal to Add and Edit a module. (+ patch PR 10522)
Note: to be testing on staging.

Summary of Changes

  • Control if modal, in edit layout
  • Add Save (keep modal open), Save & Close and Close button to the footer of the modal
  • Fix closing of Modal when edit validation returns an error (does not close the modal, and display alert message in modal)
  • Fix (3.5.1) if in edit module, title is empty or changed, and then you close the modal without saving, the title of this module in the list is the same as the not saved field value in edit modal, and need a refresh of the page to be able to view it correctly back again.
  • EDIT: Add improvement for modals rendering in Menus > Manage : viewport dimensions, close control, add Save button, add style for "Add a module to this menu" (and remove the "." at end of language string)

Testing Instructions (Staging)

  • Go to Menus > Add new menu item > Module Assignment tab.
  • Click on any module title to open the module edition in a modal
  • Click on Save and Save & Close with a correct edition (no error), and then with an empty title, or any other possible error (not filled required field).
  • Expected behavior: If an error, Save & Close won't close the modal, and Save will never close the modal (close only when requested, and on successful edition)
  • Edit a module in modal, change title, and save and close : the title in the input field should be updated with the new title.
  • Remove title of the module (in edit modal), to get an empty field, or edit it, and then close the modal : The title in list should be the one saved in data (and not the value not saved as in 3.5.1)

EDIT:
Additional tests after update :

  • Go to Menus > Manage
  • Add a new menu
  • Then, click on button "Add a module to this menu"
  • It would now open a modal (was not opening a modal before)
  • Set the module and save
  • Then, you have the dropdown for modules
  • Click on the module created to open the edit modal
  • Do same testing as Edit module in Menu item edition (save, save&close, try with empty title, etc...)

Same rendering as for Categories in PR #10441 (screenshots)

@andrepereiradasilva
Copy link
Contributor

this works all great!
Just one question: shouldn't changes exist in Menus -> Manage (Modules select list), or that's another PR?

@cyrezdev
Copy link
Contributor Author

cyrezdev commented May 22, 2016

@andrepereiradasilva Yes, exactly, it will be another PR!
In fact, i did this one just before the week-end, in case it could be tested and merged for 3.6.0-alpha... but was not.
And this one PR is the last one for modals edit in a menu edition ;-)
This week, (maybe tomorrow for menus > manage) i will check a few others (as many as i can!), but it will be then only improvements. All modals with bugs or issues are fixed with this last PR, i think (which was the priority!)

@andrepereiradasilva
Copy link
Contributor

I have tested this item ✅ successfully on cf4c7aa

ok. And thanks again for all your work!


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

@cyrezdev
Copy link
Contributor Author

@andrepereiradasilva in fact, i will update this one, with Menus > Manage dropdown and "Add a module to this menu" (you're right, as this PR not merged, would be better to do this in the same time, and too, i have applied some extra-changes because of the Add module ;-) )

@andrepereiradasilva
Copy link
Contributor

ok

@joomla-cms-bot
Copy link

This PR has received new commits.

CC: @andrepereiradasilva


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

@joomla-cms-bot joomla-cms-bot added the Language Change This is for Translators label May 23, 2016
@cyrezdev
Copy link
Contributor Author

@andrepereiradasilva Now ready 👍

@andrepereiradasilva
Copy link
Contributor

you have conflicts

@joomla-cms-bot
Copy link

This PR has received new commits.

CC: @andrepereiradasilva


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

@cyrezdev
Copy link
Contributor Author

Thanks @andrepereiradasilva !
So, reverted the fix for modal-header alignment, and will do i another PR ;-)
I will say now, ready for testing about module Add and Edit modals

@infograf768
Copy link
Member

I have tested this item ✅ successfully on 127542e

Works fine.

@JoomliC

When you will do the css for modal-header, you have to set it to

LTR: text-align:left;

RTL: text-align:right;

And not as you tried in the reverted part for the header. 😃


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

@infograf768
Copy link
Member

Hmm, tested OK on issues. Does not always show here.

@mbabker
Copy link
Contributor

mbabker commented May 23, 2016

See https://status.github.com/


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

@cyrezdev
Copy link
Contributor Author

When you will do the css for modal-header, you have to set it to
LTR: text-align:left;
RTL: text-align:right;
And not as you tried in the reverted part for the header.

@infograf768 Thanks for testing!
About modal-header, this was exactly what i've done! Maybe a difficult week-end ? 😄

And for modal header alignment fix, PR is opened : #10607

@andrepereiradasilva
Copy link
Contributor

I have tested this item ✅ successfully on 127542e


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

@infograf768
Copy link
Member

rtc. thanks.


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label May 23, 2016
@brianteeman brianteeman added this to the Joomla 3.6.0 milestone May 23, 2016
@cyrezdev
Copy link
Contributor Author

cyrezdev commented May 23, 2016

Thanks for testing!
And thanks @andrepereiradasilva to have informed me about conflicts ;-)

@andrepereiradasilva
Copy link
Contributor

@JoomliC while investigating the origin of #10556 i notice that mootools!! is loaded in the global config...

Investigating a little more i found mootools is loaded because the tooltips and modal (Squeezebox) of the image selector. It seems this one is a remaining from the mootools still in use somehow ...

Since you are doing all this great work on the modals and tooltips, i remembered to ask you this: do you thing it's possible to replace this mootools modal/toolip by bootstrap modal/toolip?

The media select field is generated in this file: https://github.com/joomla/joomla-cms/blob/staging/layouts/joomla/form/field/media.php

@cyrezdev
Copy link
Contributor Author

@andrepereiradasilva It was what @dgt41 did in 3.5.0-RC, but was reverted just before release because of B/C issue with the media field modal.
I think nothing is impossible, but i will check this one at last, and see what could be done (issue were there too with user new modal, and i know some extensions where user select was broken after the change for BS modal in user select one... But think @dgt41 has fixed this in the current staging (sorry, not enought just now to search where to get all information, but in all cases, i will check this after all i've planned for this week ;-) )

@andrepereiradasilva
Copy link
Contributor

ok thanks . wasn't aware of that "history".

@roland-d roland-d merged commit 7300b8b into joomla:staging May 25, 2016
@roland-d
Copy link
Contributor

Thanks everybody

@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label May 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Language Change This is for Translators
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants