Closed soulflyman closed 7 years ago
I meant LTR and RTL integration, not only LTR.
Hey Stefan. Thanks for putting this together. Do you have any concerns about this breaking backwards compatibility for users?
If they are on version 3.3.1 then no. If the options are not set it falls back to the default order finish, next, prev. The only incompatibility I can recognize is for user that do not use one of the releases but use the unreleased code from the master branch. Because they could expect that the includeFinishButton and reverseButtonsOrder are still functional. But even in this case there code will not break, It won't even throw an error.
Ultimately this project isn't being maintained, so arguably any pull is a good one.
However I wonder if it'd be worth a bit of extra code to support the old options, so that people who upgrade won't be affected. i.e. document the options as 'deprecated' with a prominent note that they will be removed.
For example, keep your new loop and switch statement which considers only buttonOrder
, but then in the initialization rearrange that array if the user provided reverseButtonsOrder
or includeFinishButton
What do you think?
I reimplemented the two options to maintain backward compatibility as you suggested.
This is great, Thanks for the pull!
Replaced reverseButtonOrder and includeFinishButton with the new option buttonOrder. ButtonOrder is a String array which can take up to 3 elements. These elements are 'finish', 'next' and 'prev'. By changing the order of the elements in the buttonOrder the Order of the buttons will change. Elements will not be displayed if removed from the list. By replacing reverseButtonOrder and includeFinishButton with buttonOrder, a better customizing and LTR integration will be possible