 
       button.render
 
-    initialize : () ->
-      $container = if options.dialogsInBody then $(document.body) else $editor
-      body = '<div class="list-group">' + htmlList + '</div>'
+      @initialize =  ->
+        $container = if options.dialogsInBody then $(document.body) else $editor
+        body = '<div class="list-group">' + htmlList + '</div>'
 
-      @$dialog = ui.dialog
-        className: 'link-dialog'
-        title: lang.load
-        fade: options.dialogsFade
-        body: body
-        footer: ''
+        @$dialog = ui.dialog
+          className: 'link-dialog'
+          title: lang.load
+          fade: options.dialogsFade
+          body: body
+          footer: ''
 
-      @$dialog.render
-      @$dialog.appendTo $container
+        @$dialog.render()
+        @$dialog.appendTo $container
+        return
+
+      @destroy = ->
+        ui.hideDialog @$dialog
+          .remove()
+        return
+
+      @show = ->
+        ui.showDialog @$dialog
+        $selectedDraft = @$dialog.find '.note-draft'
+          .click (e) ->
+            e.preventDefault
+            div = document.createElement 'div'
+            key = $ this
+              .data 'draft'
+            data = drafts[key]
+
+            if data
+              div.innerHTML = data.body
+              context.invoke('editor.insertNode', div)
+
+            # if no data show some error or something
+            false
+          return
+
+      @getDrafts = ->
+        drafts = []
+        store.each (value, key) ->
+          if key.indexOf(options.sDrafts.storePrefix) >= 0
+            drafts[key] = value
+
+        drafts
       return
-
-    destroy = ->
-      ui.hideDialog @$dialog
-        .remove
-      return
-
-    show = ->
-      ui.showDialog @$dialog
-      $selectedDraft = @$dialog.find '.note-draft'
-        .click (e) ->
-          e.preventDefault
-          div = document.createElement 'div'
-          key = $ this
-            .data 'draft'
-          data = drafts[key]
-
-          if data
-            div.innerHTML = data.body
-            context.invoke('editor.insertNode', div)
-
-          # if no data show some error or something
-          false
-
-    getDrafts = ->
-      drafts = []
-      store.each (value, key) ->
-        if key.indexOf(options.sDrafts.storePrefix) >= 0
-          drafts[key] = value
-
-      drafts

            @saveDraft draftName
            false

      saveDraft = (name) ->
        isoDate = new Date
          .toISOString
        name ?= isoDate

            false
        button.render

      @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>'
