External "header" toolbar ignores options - jQM 1.4 #6950
Comments
To set an option you have to call Edit: The method name is "option", not "options". |
@gabrielschulhof thank you for your fast reply. Kindly go through my code again, I've already assigned
Edit: |
When I add option as attributes, I get the following error.
|
@gabrielschulhof I'm a jQM advocate; I'm here to assist. Unfortunately, I'm not a programmer and I have a minimal experience in Javascript, otherwise I'd have fixed it myself. |
Any update on this? I'm also running into this issue. I was hoping to get a bit of a performance bump from using external headers and panels, but I need this to work in order to upgrade to 1.4. |
@twilly86 we will have to wait ;) |
This only effects the addBackButton option this currently does not work with external toolbars all other options work fine in external toolbars the addBackButton this will be fixed in the next release please see #7188 |
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. Closes gh-7188 Fixes gh-6950
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. (cherry picked from commit b0685b3) Closes gh-7188 Fixes gh-6950
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. Closes jquery-archivegh-7188 Fixes jquery-archivegh-6950
When appending/prepending an external header with options after page is initialized,
$("[data-role=header]").toolbar("options", "addBackBtn");
returnstrue
but back button doesn't appear in header. Even though there is a second page in DOM but not created yet.Test on PC - Chrome Version 32.0.1700.76 m
JSFiddle
The text was updated successfully, but these errors were encountered: