SM OR - Save button does not become enabled when changing an input of a dateChooser #150

Open
Chasyl opened this Issue Apr 19, 2016 · 5 comments

Projects

None yet

2 participants

@Chasyl
Chasyl commented Apr 19, 2016 edited

Steps to reproduce:
Change something in any contract to enable the cancel and save button -> press cancel or save-> try to change the input of a dateChooser (e.g. signature date in general tab) manually by using the backspace or delete buttons -> the cancel and save buttons do not become enable.
Please note that this works for all the other inputs in the screen and it works for the dateChoosers input when you press any other input key from the keyboard.

1 oro-907 - save button does not become enabled when changing an input of a datechooser

2 oro-907 - save button does not become enabled when changing an input of a datechooser

3 oro-907 - save button does not become enabled when changing an input of a datechooser

@YurinM
Contributor
YurinM commented Apr 19, 2016

Hello. Thank you for the request.
I have a question. I don't completely understand how the Save button functionality connects with inputField/dropDownField components behaviour.
Did you check inputField/dropDownField events and did these events work correctly?

@Chasyl
Chasyl commented Apr 21, 2016

Hi,
We have a js function which adds a listener to all the inputs which on change will enable button and signal that the field was changed
It's in OnAir.js -> addListenerToInputs.
I checked and the dateChoosers input field has this event and as I wrote this works for all the other inputs in the screen and it works for the dateChoosers input when you press any other input key from the keyboard.
Thank you!

@YurinM
Contributor
YurinM commented Apr 21, 2016

I'm meaning that recently you had the same issue - the Save didn't refresh. And in that case, the onchange event didn't refresh Save button at all. Could you please verify, does on change event is working for the Save button - maybe JSF didn't found the Save ids ?

@Chasyl
Chasyl commented Jul 12, 2016

As I wrote this works for all the other inputs in the screen and it works for the dateChoosers input when you press any other input key from the keyboard.

@YurinM
Contributor
YurinM commented Aug 19, 2016 edited

Hello,

I verified the issue again, unfortunately, this issue is not connected with OpenFaces project.
You can fix this issue next way, add a class or a data attribute to the component on which changes the Save button should be updated, and create event listener in the OnAir.js -> addListenerToInputs function, like this:

contractView.xhtml: 
<h:inputText id="contractName" data-enable-main-bar="enabled"/>

function addListenerToInputs() {
..
jQuery("[data-enable-main-bar]").on('change', enableMainButtonBarButtons);
..
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment