             />
         else
             <ShareButton
-                id     = {@props.name}
-                type   = 'folder'/>
+                id       = {@props.name}
+                on_click = {=> @props.actions.set_all_files_unchecked();@props.actions.set_file_checked(@props.name, true);@props.actions.set_file_action('share')}
+                type     = 'folder'/>
 
     render_time: ->
         if @props.time?

    propTypes:
        id     : rtypes.string
        type   : rtypes.string # directory or file

    render_share_popover: ->
        <Popover title={"Share this #{@props.type} publicly?"} id={@props.id} >
            <span style={wordWrap:'break-word'}>
                TODO: ADD SHARE UI HERE. Baller.
            </span>
        </Popover>

    render: ->
        <span><Space/>
            <OverlayTrigger
                trigger   = 'click'
                rootClose = {true}
                overlay   = {@render_share_popover()}
            >
                <Button
                    bsStyle = 'default'
                    bsSize  = 'xsmall'
                    onClick = {(e)->e.stopPropagation()}
                >
                    <Icon name='share-square-o' /> <span className='hidden-xs'>Share...</span>
                </Button>
            </OverlayTrigger>
        </span>

PublicButton = rclass

            />
        else
            <ShareButton
                id       = {@props.name}
                on_click = {=> @props.actions.set_all_files_unchecked();@props.actions.set_file_checked(@props.name, true);@props.actions.set_file_action('share')}
                type     = 'file'
            />

    fullpath: ->
