-
Notifications
You must be signed in to change notification settings - Fork 371
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
[frontend] fixed calendar button alignment in Oozie WF Submit form #3740
Conversation
Thanks @tarunjangid for contributing a fix! I've tagged the UI code owners for reviewing this PR. |
position: fixed; | ||
} | ||
#param-container .btn-group.open { | ||
position: absolute !important; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need !important here? If so perhaps some other class is more specific...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed this #param-container .btn-group.open style.
Earlier to acknowledge the issue where the calendar button moved from its place when we zoomed in, I added the position as fixed. Because of this fixed position, when we opened the calendar button it overlapped with the button below that (as shown in the attached image), hence I used the !important with position style of #param-container .btn-group.open.
The ideal solution would be to have an absolute position for the #param-container .btn-group style.
@@ -168,6 +172,14 @@ else: | |||
huePubSub.subscribeOnce('hide.datepicker', function () { | |||
_el.datepicker('hide'); | |||
}); | |||
$(document).on("click.hideDatepicker", function (event) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This attaches an event listener on every click ($(".calendera-link").on("click" ... above). Better to attach it on show and detach on hide.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
made code changes
_el.datepicker('hide'); | ||
} | ||
}); | ||
$(".calendar-link, input[type='text']").on("click.stopPropagation", function(event) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
made code changes
desktop/core/src/desktop/templates/scheduler/submit_job_popup.mako
Outdated
Show resolved
Hide resolved
$(document).off("click.hideDatepicker", function (event) { | ||
event.stopPropagation(); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has no effect. When a function is provided to off it must be equal to the function provided in the on
call. To remove all event handlers do $(document).off("click.hideDatepicker");
This PR is stale because it has been open 45 days with no activity and is not labeled "Prevent stale". Remove "stale" label or comment or this will be closed in 10 days. |
2783603
to
88fcfc7
Compare
_el.datepicker('hide'); | ||
} | ||
}); | ||
$(document).off("click.hideDatepicker"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will remove the event handler right after it's been added on line 170. It's probably not what you intend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks! :-)
What changes were proposed in this pull request?
How was this patch tested?
Before:
before_changes.mov
After:
after_changes.mov
Please review Hue Contributing Guide before opening a pull request.