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

Convert the password prompt to a class #7219

Merged
merged 1 commit into from
Apr 21, 2016

Conversation

timvandermeij
Copy link
Contributor

@timvandermeij timvandermeij commented Apr 18, 2016

Furthermore we introduce a new method named setUpdateCallback so external code does not change the properties of the class directly. We also update various names of properties and methods to be more self-explanatory.

Use, for example, http://async5.org/moz/passwordOU.pdf to verify this patch.


this.passwordCancel.addEventListener('click', this.close.bind(this));
this.callback = null;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, callback seems a bit too generic to me. I think that the reason for the current code using updatePassword is that it's called that in the API (see https://github.com/mozilla/pdf.js/blob/master/src/display/api.js#L1361). How about e.g. updateCallback instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. I have changed this to updateCallback in the new commit.

Furthermore we introduce two new methods named `setCallback` and
`setReason` so external code does not change the properties of the class
directly. Finally we update various names of properties and methods to
be more self-explanatory.
@timvandermeij
Copy link
Contributor Author

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 0

Live output at: http://107.21.233.14:8877/2c7d5b62cbbb363/output.txt

@Snuffleupagus
Copy link
Collaborator

Thank you for the patch!

@Snuffleupagus Snuffleupagus merged commit 2001953 into mozilla:master Apr 21, 2016
@timvandermeij timvandermeij deleted the password-prompt-class branch April 21, 2016 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants