             false
         button.render
 
-      initialize = ->
+      @initialize = =>
         $container = if options.dialogsInBody then $(document.body) else $editor
         body = '<div class="form-group">' + '<label>' + lang.provideName + '</label>' + '<input class="note-draftName form-control" type="text" /></div>'
         footer = '<button href="#" class="btn btn-primary note-link-btn">' + lang.save + '</button>'

          body: body
          footer: footer

        @$dialog.render
        @$dialog.appendTo $container
        return

      destroy = ->
        ui.hideDialog @$dialog
          .remove
        return

      show = ->
        ui.showDialog @$dialog
        draftName = @$dialog.find '.note-draftName'
          .val

          body : context.code
        ui.hideDialog @$dialog

        return
      return

  $.extend $.summernote.plugins,
  'sDraftsLoad' : (context) ->
