         toggleOpen: (event) ->
             target = $(event.currentTarget).data('type')
             isNavigationVisible = !!$('#navigation-contents').children().length
-            
+
             # An early return if the element is search input
             return if target == 'search'
 

            @selectedUnits = options.selectedUnits

        onShow: ->
            searchInputView = new SearchInputView({@searchState, @searchResults, expandCallback: _.bind(@_expandSearch, @)})
            @search.show searchInputView
            @listenTo searchInputView, 'open', =>
                @updateClasses 'search'
                @navigationLayout.updatePersonalisationButtonClass 'search'
            @browse.show new BrowseButtonView()

        _expandSearch: ->
            @_open 'search', disableAutoFocus: true, reason: 'userClickedSearchInputElement'

        _open: (actionType, opts) ->
            @updateClasses actionType
            @navigationLayout.change actionType, opts

                        collection: new models.UnitList()

                when 'search'
                    if @searchResults.length > 0
                        # We want to prevent any open UI element from
                        # closing just because the user clicked on the
                        # search bar.
