     )
     @$el.modal("hide")
 
+
   merge : (url) ->
-    $.ajax(url: url)
-    .done( (annotation) ->
+
+    $.ajax(
+      url: url
+    ).done( (annotation) ->
       url = "/annotations/" + annotation.typ + "/" + annotation.id
       app.router.loadURL(url)
       Toast.message(annotation.messages)

                  </span>
                </form>
              </div>
              <div class="col-md-2 column ">
                <button class="btn btn-primary" id="nml-merge">Merge</button>
              </div>
            </div>
          </div>
          <div class="form-group">
            <label for="explorativs">Explorativs</label>
            <div class="row clearfix">
              <div class="col-md-10 column explorativs"></div>
              <div class="col-md-2 column ">
                <button class="btn btn-primary" id="explorativs-merge">Merge</button>
              </div>
            </div>

      @explorativs.show(@explorativSelectionView)
    )


  mergeTask : ->

    taskId = @ui.task.find("select :selected").val()
    url = "/annotations/CompoundTask/#{taskId}/merge/#{@_model.tracingType}/#{@_model.tracingId}"
    @merge(url)


  mergeTaskType : ->

    taskTypeId = @ui.tasktype.find("select :selected").prop("id")
    url = "/annotations/CompoundTaskType/#{taskTypeId}/merge/#{@_model.tracingType}/#{@_model.tracingId}"
    @merge(url)


  mergeProject : ->

    projectId = @ui.project.find("select :selected").prop("id")
    url = "/annotations/CompoundProject/#{projectId}/merge/#{@_model.tracingType}/#{@_model.tracingId}"
    @merge(url)


  mergeNml : ->

    if(@nml == "")
      Toast.error("Please upload NML file")
    else
      url = "/annotations/#{@nml.typ}/#{@nml.id}/merge/#{@_model.tracingType}/#{@_model.tracingId}"
      @merge(url)


  mergeExplorativs : ->

    explorativId = @ui.explorativs.find("select :selected").val()
    url = "/annotations/Explorational/#{explorativId}/merge/#{@_model.tracingType}/#{@_model.tracingId}"
    @merge(url)


  destroyModal : ->

