         currentModal = null
         this.remove()
         return
+
+  initMenu: (activeNode) ->
+    @updateNavigation(activeNode) if activeNode?
+    
+    opts =
+      accordion: true
+      speed: $.menu_speed
+      closedSign: "<em class=\"fa fa-plus-square-o\"></em>"
+      openedSign: "<em class=\"fa fa-minus-square-o\"></em>"
+    $(@el).jarvismenu opts
 
   closeModal: ->
     if currentModal


  render: (options) ->
    @setElement @renderTemplate('OpenOrchestraMediaAdminBundle:BackOffice:Underscore/mediaModalView', @options)
    opts =
      accordion: true
      speed: $.menu_speed
      closedSign: "<em class=\"fa fa-plus-square-o\"></em>"
      openedSign: "<em class=\"fa fa-minus-square-o\"></em>"
    $(@el).jarvismenu opts

    if currentModal != null
      $('.modal-dialog', currentModal).replaceWith $('.modal-dialog', @$el)

    $.ajax
      url: @options.url
      method: 'GET'
      context: @
      success: (response) ->
        $('.modal-body-menu', currentModal).html response
        @initMenu($('#media-modal-' + $('#oo_folder_id').val()))
    return

  openFormFolder: (event) ->
