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

Automatic state handling for ERXNavigation #752

Merged

Commits on May 28, 2016

  1. Adds automated handling of navigation state to ERXNavigation. To achi…

    …eve this, we store each menu item's navigation state string in a dictionary ("NavigationMap"), using its relative URI as the key. In this way we can reliably determine the navigation state, when a request is due to the user clicking a navigation link.
    
    Obviously this will not work when a user clicks somewhere outside of the navigation menu. For the case of D2W, we can apply a simple heuristic that should be "good enough" for the majority of such cases (e.g. a click on a "Find" button on a query page).
    For non-D2W applications, you should retrieve the navigation state via ERXNavigationManager.manager().navigationStateFromMap() and apply it as you see fit, e.g. in Session.awake().
    
    Also adds a defaultChild attribute to navigation elements. Instead of specifying the same action as on one of the children, one can now simply specify a defaultChild to achieve the same result.
    fbarthez committed May 28, 2016
    Configuration menu
    Copy the full SHA
    b7c5434 View commit details
    Browse the repository at this point in the history
  2. Removing all navigationState rules from ERModernMoviesTest, except on…

    …e for "Home", for which the pageConfiguration is null. Add functional tests.
    fbarthez committed May 28, 2016
    Configuration menu
    Copy the full SHA
    bce1abd View commit details
    Browse the repository at this point in the history