     @banner.on Events.Banner.Close, =>
       @unsetClass 'has-message'
       kd.utils.wait 500, @banner.bound 'hide'
+
     @forwardEvent @banner, Events.Action
+
+    @on Events.Action, (event) =>
+      if event is Events.Menu.Rename
+        @templateTitle.makeEnabled()
+        @templateTitle.setFocus()
 
 
   setTitle: (data) ->

debug = (require 'debug') 'nse:toolbar'

kd = require 'kd'
JView = require 'app/jview'

Events = require '../events'
Banner = require './banner'


module.exports = class Toolbar extends JView

      disabled     : yes
      attributes   :
        spellcheck : no

      callback     : (value) =>
        debug 'hit enter on title input', value
        @emit Events.Action, Events.TemplateTitleChangeRequested, value
        kd.utils.defer @templateTitle.bound 'makeDisabled'

      keyup        : _.debounce (e) ->
        EnvironmentFlux.actions
          .changeTemplateTitle @getData()._id, e.target.value
      , 100

    @actionButton = new kd.ButtonView
      cssClass : 'action-button solid green compact'
