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
DialogRunner - fix miq_observe functionality on selectpickers #6476
DialogRunner - fix miq_observe functionality on selectpickers #6476
Conversation
depends on 9a828a4, which is the important part of the fix this fixes initializeDialogSelectPicker to not assume trigger_auto_refresh by default and calls that instead of miqInitSelectPicker + miqSelectPickerEvent (both are called from initializeDialogSelectPicker) also selectedValue is made optional (because it is already handled by select_tag) also, the data-miq_observe attribue is removed from drop_downs, since that functionality is handled by miqSelectPickerEvent for selectpickers https://bugzilla.redhat.com/show_bug.cgi?id=1302331
wip because aand fixed in 30e5964 |
…e jQuery this fixes `refreshRadioList` and `addOptionsToDropDownList` to always use jQuery to create the new elements (`option` or `input` + `label`). That way, it won't break on options with angle brackets - like `{values: {refreshed_values: [[null, "<Script error>"]], checked_value: ""}}`. Should be otherwise identical, except we're no longed passing the `onclick=` part of the onClickString argument (and passing it to new Function instead of creating the node with it).
fixes failing tests, this is handled by initializeDialogSelectPicker also removed duplicate :remote
@mfalesni can you try out this fix? Thx, Dan |
@dclarizio I can try applying the commits to a 5.5 appliance. |
So, the tag control is working again, however I get a lot of errors of |
@eclarizio can you also review this? Thx, Dan |
@himdel The only thing I'd like to see is an adjustment to |
@eclarizio right, that's probably a good idea, will do :) |
…rAutoRefresh is false
Added a test for just that :) |
Checked commits https://github.com/himdel/manageiq/compare/8f45d8e8258195f6226c77db4ea52ba369f72753~...bd428c0c6a36b578326d36fd2b70a9bdf7c618ad with ruby 2.2.3, rubocop 0.34.2, and haml-lint 0.13.0 |
@himdel Cool, looks good 👍 |
@dclarizio please review now that @eclarizio has given his 👍 |
DialogRunner - fix miq_observe functionality on selectpickers
dialog_field_refresh - don't construct new DOM elements textually, use jQuery this fixes `refreshRadioList` and `addOptionsToDropDownList` to always use jQuery to create the new elements (`option` or `input` + `label`). That way, it won't break on options with angle brackets - like `{values: {refreshed_values: [[null, "<Script error>"]], checked_value: ""}}`. Should be otherwise identical, except we're no longed passing the `onclick=` part of the onClickString argument (and passing it to new Function instead of creating the node with it). (cherry picked from commit 30e5964) --- 5.5 BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1312049 upstream PR: ManageIQ#6476 (commit 30e5964) clean cherry-pick except for `__('text') -> 'text'` because we have no JS gettext in 5.5 See merge request !824
depends on 9a828a4, which is the important part of the fix
this fixes
initializeDialogSelectPicker
to not assumetrigger_auto_refresh
by defaultand calls that instead of
miqInitSelectPicker
+miqSelectPickerEvent
(both are called frominitializeDialogSelectPicker
)also, the
data-miq_observe
attribue is removed from drop_downs, since that functionality is handled bymiqSelectPickerEvent
for selectpickershttps://bugzilla.redhat.com/show_bug.cgi?id=1302331