       jqXHR.breakFlash = true
       if jqXHR.responseText
         try
+          # try parse respose as json
           if parsedJSON = $.parseJSON jqXHR.responseText
+            # catch 'flash' object and call auto() method with autodetecting flash-notice type
             return @auto parsedJSON['flash']  if parsedJSON['flash']
+            # catch 'error' object and call alert() method
             return @alert parsedJSON['error']  if parsedJSON['error']
-            if @settings.showFormError and _.isBoolean @settings.showFormError
+            # may be parsedJSON is form errors
+            if @settings.detectFormErrors is true
+              # show message about form with errors
               return @alert @settings.formFieldsError
-            else if _.isFunction @settings.showFormError
-              return @settings.showFormError.apply @, [parsedJSON]
+            else if _.isFunction @settings.detectFormErrors
+              # using showFormError as callback
+              return @settings.detectFormErrors.apply @, [parsedJSON]
             else
+              # nothing
               return false
         catch e
           # nop

   * @return {Boolean}                    статус выполнения показа сообщения
  ###
  ajaxSuccess: (successArgs) ->
    successArgs = args successArgs
    successArgs.shift()  if successArgs[0].target # remove event
    if $.isString successArgs[0]
      [data, textStatus, jqXHR] = successArgs
    else
      [jqXHR, ajaxSettings, data] = successArgs
    # prevent recall
    return false  if jqXHR.breakFlash
    jqXHR.breakFlash = true
    if $.isString data
      return @notice data  if data.length and not $.isHTML data
    else if $.isPlainObject data
      return @auto data['flash']  if data['flash']
    false


 *
###

# TODO architecture of wiggets in ultimate/widgets.js.coffee
# TODO customizable show() and hide()
# TODO improve English

class UltimateFlashWidget

