# -*- encoding : utf-8 -*-
module Admin::JavascriptsHelper
	
	def flash_notice()
	    if flash[:notice]
	      text = flash[:notice]
	      flash[:notice] = nil
	      return raw('flash_notice("'+escape_javascript(text)+'");')
	    end
	end
	
	def flash_alert()
	    if flash[:alert]
	      text = flash[:alert]
	      flash[:alert] = nil
	      return raw('flash_alert("'+escape_javascript(text)+'");')
	    end
	end
	
	def flashs()
		r= flash_notice().to_s
		r+= flash_alert().to_s
		
		return raw(r)
	end
	
	
end
