 
 # TODO customizable show() and hide()
 # TODO improve English
+# TODO settings by call
+# TODO jGrowl features
 
 ###
  * Invoke Ultimate Flash functionality for the first element in the set of matched elements.

      if jqXHR.status >= 400 and jqXHR.responseText
        # try detect Rails raise message
        if raiseMatches = jqXHR.responseText.match /<\/h1>\n<pre>(.+?)<\/pre>/
          cout "replace thrownError = '#{thrownError}' with raiseMatches[1] = '#{raiseMatches[1]}'"
          thrownError = raiseMatches[1]
        else
          # try detect short text message as error
          if jqXHR.responseText.length <= @settings.detectPlainTextMaxLength
            cout "replace thrownError = '#{thrownError}' with jqXHR.responseText = '#{jqXHR.responseText}'"
            thrownError = jqXHR.responseText
      else
        if _.isString thrownError and not $.isEmptyString thrownError
          cout "replace thrownError = '#{thrownError}' with @settings.translations.defaultThrownError = '#{@settings.translations.defaultThrownError}'"
          thrownError = @settings.translations.defaultThrownError
      text += ': '  if text
      text += "#{thrownError} [#{jqXHR.status}]"



class Ultimate.Plugins.Flash extends Ultimate.Proto.Widget
  @className: 'Flash'

  @selector: '.l-page__flashes'

