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

Fix closing dialog window when applying filter in Workloads #3444

Merged

Conversation

hstastna
Copy link
Contributor

Fixes issue: #499

Fix closing dialog window when applying a filter after user inputs the value and clicks on Apply button, in Services > Workloads and other explorer screens, where this issue also occurs.

Right before applying a filter if user inputs the value:
workloads_apply

Before: (filter is applied but dialog window did not close, after clicking on Apply button)
workloads_apply_bad

After: (dialog window has closed and everything looks good)
workloads_apply_ok

Fixes ManageIQ#499

Fix closing dialog window when applying a filter if user inputs the value and
clicks on Apply button, in Services > Workloads and other explorer screens.
@miq-bot
Copy link
Member

miq-bot commented Feb 21, 2018

Checked commit hstastna@1b60e5f with ruby 2.3.3, rubocop 0.52.0, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 1 offense detected

**

  • 💣 💥 🔥 🚒 - Linter/Haml - Linter::Haml STDERR:
warning: parser/current is loading parser/ruby23, which recognizes
warning: 2.3.5-compliant syntax, but you are running 2.3.3.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.

@mzazrivec mzazrivec self-assigned this Feb 22, 2018
@mzazrivec mzazrivec added this to the Sprint 80 Ending Feb 26, 2018 milestone Feb 22, 2018
@mzazrivec mzazrivec merged commit 16f9b83 into ManageIQ:master Feb 22, 2018
pkomanek pushed a commit to pkomanek/manageiq-ui-classic that referenced this pull request Aug 20, 2019
Since ManageIQ#3444 (which fixed the user input filter modal to hide after Apply):

* clicking the apply button triggers a ?button=apply request
* but, thanks to data-dismiss="modal", it also closes the modal
* BUT, closing the modal this way triggers a ?button=cancel request

Thus, clicking apply triggers apply & cancel, in random order.

Ideally, we should not be using data-dismiss on the Apply button,
but using `$('#quicksearchbox').modal('hide')` in `quick_search_apply_click`, same as in `quick_search_cancel_click`.

The problem with that is that this would involve changing every single `replace_right_cell`, or somehow amending their output after the fact.

So, leaving the data-dismiss mechanism as is, but:

* explicitly adding code to not send the ?button=cancel request when the Apply button was clicked
* explicitly triggering hiding the modal when enter was clicked in the form (previously it would just apply)

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1715550
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants