         search           : rtypes.string
         actions          : rtypes.object.isRequired
         selected         : rtypes.object
-
-    clear_and_focus_input: ->
-        ReactDOM.findDOMNode(@refs.project_log_search).focus()
-        @props.actions.setState(search:'', page:0)
-
-    render_clear_button: ->
-        s = if @props.search?.length > 0 then 'warning' else "default"
-        <Button onClick={@clear_and_focus_input} bsStyle={s}>
-            <Icon name='times-circle' />
-        </Button>
-
-    do_open_selected: (e) ->
-        e.preventDefault()
+        increment_cursor : rtypes.func
+        decrement_cursor : rtypes.func
+
+    open_selected: (value, info) ->
         e = @props.selected?.event
         if not e?
             return

            when 'open'
                target = e.filename
                if target?
                    @props.actions.open_file(path:target, foreground:true)
            when 'set'
                @props.actions.set_active_tab('settings')

    keydown: (e) ->
        if e.keyCode == 27
            @props.actions.setState(search:'', page:0)

    on_change: (e) ->
        e.preventDefault()
        x = ReactDOM.findDOMNode(@refs.project_log_search).value
        @props.actions.setState(search : x, page : 0)

    render: ->
        <form onSubmit={@do_open_selected}>
            <FormGroup>
                <InputGroup>
                    <FormControl
                        autoFocus
                        type        = 'search'
                        value       = @props.search
                        ref         = 'project_log_search'
                        placeholder = 'Search log...'
                        onChange    = {@on_change}
                        onKeyDown   = {@keydown}
                        />
                        <InputGroup.Button>
                            {@render_clear_button()}
                        </InputGroup.Button>
                </InputGroup>
            </FormGroup>
        </form>

selected_item =
    backgroundColor : '#08c'

        num_pages = Math.ceil(log.length / PAGE_SIZE)
        page = @props.page
        log = log.slice(PAGE_SIZE*page, PAGE_SIZE*(page+1))
        @displayed_log_size = log.length
        if log.length > 0
            cursor = log[@state.cursor_index].id
            selected = log[@state.cursor_index]
        else
            cursor = undefined
            selected = undefined
