summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/flash.js.coffee
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/flash.js.coffee')
-rw-r--r--app/assets/javascripts/flash.js.coffee28
1 files changed, 0 insertions, 28 deletions
diff --git a/app/assets/javascripts/flash.js.coffee b/app/assets/javascripts/flash.js.coffee
deleted file mode 100644
index 5a493041538..00000000000
--- a/app/assets/javascripts/flash.js.coffee
+++ /dev/null
@@ -1,28 +0,0 @@
-class @Flash
- hideFlash = -> $(@).fadeOut()
-
- constructor: (message, type = 'alert', parent = null)->
- if parent
- @flashContainer = parent.find('.flash-container')
- else
- @flashContainer = $('.flash-container-page')
-
- @flashContainer.html('')
-
- flash = $('<div/>',
- class: "flash-#{type}"
- )
- flash.on 'click', hideFlash
-
- textDiv = $('<div/>',
- class: 'flash-text',
- text: message
- )
- textDiv.appendTo(flash)
-
- if @flashContainer.parent().hasClass('content-wrapper')
- textDiv.addClass('container-fluid container-limited')
-
- flash.appendTo(@flashContainer)
- @flashContainer.show()
-