jquery/jquery-mobile — pull request #7188 by gabrielschulhof (2014-02-27 11:03:39+00:00)
Title: Toolbar: Back button correctly appears/disappears on external toolbar

This commit makes the following modifications:
1. Rename _addBackButton() to _updateBackButton() and move the decision making
as to whether to add or remove a back button from _setOptions() into
_updateBackButton().

2. Call _updateBackButton() from refresh() as well. This will cause the back
button to be updated whenever the page changes, because the "pageshow"
handler is hooked up to refresh().

3. Modify _addHeaderButtonClasses to not recognize the back button as a left
button.

4. Modify the preconditions for adding a button to include an alternative to
checking the page's URL for instances where there is no page present - i.e.
when the toolbar is external. In such cases one must add a back button if
the active item on the history stack is not the first item.

Fixes gh-7091