     """
 
   addSubView:(view, selector = ".kdmodal-content")->
-
     selector = null if @$(selector).length is 0
     super view, selector
 
   setButtons:(buttonDataSet)->
-
     @buttons or= {}
     @setClass "with-buttons"
     defaultFocusTitle = null

class KDModalView extends KDView

  constructor:(options = {}, data)->

    options.overlay       ?= no            # a Boolean
    options.overlayClick  ?= yes           # a Boolean
    options.height       or= "auto"        # a Number for pixel value or a String e.g. "100px" or "20%" or "auto"

    @setClass "fx"                                if options.fx
    @setTitle options.title                       if options.title
    @setContent options.content                   if options.content
    @addSubView options.view                      if options.view

    @on 'ModalCancelled', options.cancel          if options.cancel

