 
   constructor: (options = {}, data) ->
 
-    panelOptions = data.config.panel
+    panelOptions    = data.config.panel
+    config          = @extendOptions panelOptions
+    config.delegate = options.delegate # TODO: fatihacet - it's a quick hack, we neeed to merge all other options.
 
     @addDefaultButtons panelOptions
 
-    config = @extendOptions panelOptions
     super config, data
 
   extendOptions: (options) ->

        config.onFailed?  panel, workspace

  handleChapterSuccess: ->
    new KDModalView
      overlay      : yes
      title        : "Yay! Passed this chapter"
      cssClass     : "modal-with-text"
      content      : "<p>You have been passed this chapter. You have 3 more to go! Keep up the good work.</p>"
      buttons      :
        Next       :
          title    : "Next Chapter"
          cssClass : "modal-clean-green"
          callback : @bound "goToNextChapter"

  goToNextChapter: ->
    @destroy()
    @parent.addSubView new KDView
      partial : "dhehah"
      cssClass   : "cupid-green join-button"
      callback   : (panel, workspace) =>
        workspace.showJoinModal()
    ,
      itemClass  : KDView
      cssClass   : "chapters"
      callback   : => @bound "showChapterList"

  validateChapter: (panel, workspace) ->
    {config}   = @getData()
