     $(selector, @form)
 
   bindEvents: ->
-    self = @
+    _this = @
     @fileInput.on 'change', (e) ->
-      self.onFileInputChange(e, @)
+      _this.onFileInputChange(e, @)
 
     @pickImageEl.on 'click', @onPickImageClick
     @modalCrop.on 'shown.bs.modal', @onModalShow

    @readFile(input)

  readFile: (input) ->
    self = @
    reader = new FileReader
    reader.onload = ->
      self.modalCropImg.attr('src', reader.result)
      self.modalCrop.modal('show')

    reader.readAsDataURL(input.files[0])


    @uploadImageBtn.on 'click', @onUploadImageBtnClick
    @cropActionsBtn.on 'click', (e) ->
      btn = @
      _this.onActionBtnClick(btn)
    @croppedImageBlob = null

  onPickImageClick: =>
    @fileInput.trigger('click')

  onModalShow: =>
    _this = @
    @modalCropImg.cropper(
      viewMode: 1
      center: false
