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

Warn before exit Message #3

Closed
martindsouza opened this issue Jan 29, 2021 · 5 comments
Closed

Warn before exit Message #3

martindsouza opened this issue Jan 29, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@martindsouza
Copy link

Example: If changing a number to a percentage (0.12 to 12%) everything displays properly on the screen for the user. If the user tries to exit page without saving (ie cancel etc) they'll get the warning before saving.

Need to resolve this issue so that this is not raised. Sample snippet to resolve:

elem.setAttribute('value', apex.item(elem).getValue());
@martindsouza
Copy link
Author

Full solution (in JS file):

...

isChanged:function() {
      // #3: Use the unformated numer to determine if the value has been changed or not
			return (this.node.defaultValue != (AutoNumeric.isManagedByAutoNumeric("#"+this.id) ? AutoNumeric.getNumber("#"+this.id) : this.getValue()));
		},

@grlicaa
Copy link
Owner

grlicaa commented Jan 29, 2021

Nice one seems more neat and clean, I'll change with current setting :

		isChanged:function() {
			return (this.node.defaultValue != this.getValue());
		},

@grlicaa grlicaa added the bug Something isn't working label Jan 29, 2021
@martindsouza
Copy link
Author

@grlicaa I'm actually working on all the changes so give me the day before you apply. I'll do a PR and you can apply the changes you want

@grlicaa
Copy link
Owner

grlicaa commented Jan 29, 2021

@martindsouza Perfect :)
Thank you, any help is much appreciated.

martindsouza added a commit to martindsouza/AutoNumeric that referenced this issue Jan 30, 2021
…es are directly in plugin. Need to diff vs original to see changes in JS and PL/SQL files
@grlicaa
Copy link
Owner

grlicaa commented Feb 2, 2021

Added to version 4.6.0.4

@grlicaa grlicaa closed this as completed Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants