Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
84 lines (64 sloc) 1.87 KB

AuiFlash

Welcome to Aui Flash gem!

This gem helps you to build nice flashs or messages using style of atlassian UI like below : all flash sample

Installation

Add this line to your application's Gemfile:

gem 'aui_flash'

And then execute:

$ bundle

Or install it yourself as:

$ gem install aui_flash

Usage

In the javascripts/applicaiton.js

//= require aui-flash

In the stylesheets/application.css.scss

*= require aui-flash

Sample

<div class="aui-message">
  <p class="title">
      <strong>Backup stale</strong>
  </p>
  <p>This instance was last backed up on Thursday, 18 September 2011.</p>
</div>

will display

demo aui message

If you want to add the icon close to the message

<div class="aui-message closeable">
  <p class="title">
      <strong>Backup stale</strong>
  </p>
  <p>This instance was last backed up on Thursday, 18 September 2011.</p>
  <span class="aui-icon icon-close" role="button" tabindex="0"></span>
</div>

result

aui message info with close icon

Warning message sample

<div class="aui-message aui-message-warning">
    <p class="title">
        <strong>Backing up attachments</strong>
    </p>
    <p>Attachments will not be backed up. This needs to be done manually.</p>
</div>

aui warning message

Try to replace class "aui-message-warning" in above sample with the list of class below

aui-message-error
aui-message-success
aui-message-info
aui-message-generic

License

The gem is available as open source under the terms of the MIT License.