Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Enhancement Suggestion: Allow "pageable" navbar buttons/links #1677

Closed
joelbbagley opened this issue May 20, 2011 · 2 comments
Closed

Enhancement Suggestion: Allow "pageable" navbar buttons/links #1677

joelbbagley opened this issue May 20, 2011 · 2 comments

Comments

@joelbbagley
Copy link

This is a potential enhancement suggestion for the navbar functionality. In addition to the default behavior of the navbar to wrap buttons/links to multiple lines, it would be helpful to have a feature that would allow the specification of a maximum number of links to be displayed on a single line and then display a "More" option that provides the capability to "page" through those buttons to display more/other navbar options. This would allow multiple navbar options to be provided without requiring multiple lines in the navbar if there are more than five options or if the navbar requires fewer navbar options to be displayed at any point in time due to text size limitations for small device displays.

Below is an example which might display a maximum of two buttons/links and an additional "More" button that can be used to page through the list of items:

 <div data-role="navbar" data-max-options="2" data-page-options-text="More">
     <ul>
         <li><a id="button1" name="button1" href="/some/url/path" data-transition="slide" title="Option 1">Option 1</a></li>
         <li><a id="button2" name="button2" href="/some/url/path" data-transition="slide" title="Option 2">Option 2</a></li>
         <li><a id="button3" name="button3" href="/some/url/path" data-transition="slide" title="Option 3">Option 3</a></li>
         <li><a id="button4" name="button4" href="/some/url/path" data-transition="slide" title="Option 4">Option 4</a></li>
     </ul>
 </div>

So, on the initial display the following items would be displayed in the navbar:
[Option 1] [Option 2] [More]

When the "More" option is selected the following items would be displayed in the navbar:
[Option 3] [Option 4] [More]

When the "More" options is selected a third time the following items would be displayed in the navbar:
[Option 1] [Option 2] [More]

Selecting the "More" option could move the display index on the navbar options by the maximum number of data options, looping back to the initial item when the index exceeds the maximum number of items in the navbar. This would allow any combination of odd/even number navbar items.

@toddparker
Copy link
Contributor

This is a good idea. Can you add this to the feature request wiki page, link to this issue but close it since we're only tracking 1.0 issues here? Thanks!

@joelbbagley
Copy link
Author

Added to the feature request wiki page. Thanks in advance for the consideration.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants