aui_flash 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 056f701bbecf3f462f5015dbed18ae346e63a54b
4
+ data.tar.gz: 115e138e746dcb9962465d7a7f87d7b53ea17dbd
5
+ SHA512:
6
+ metadata.gz: 451999a29bdd281bc3626e75a34ba594a92c1c2c2e8dc04bcc82588a2a9aa69c535a7b6f79059da0502af5c15ee9e18f19686679ae14df75b20c309b65daa921
7
+ data.tar.gz: 59d5bba055bc977061f3dc829fb210c8d76d3e69155a47a36b49690ea56363a9274cb2210f4cc03934aa1bfc8536f2b6b8396e2b6e67ea41672f6444d8f4cf9b
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
@@ -0,0 +1,49 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, and in the interest of
4
+ fostering an open and welcoming community, we pledge to respect all people who
5
+ contribute through reporting issues, posting feature requests, updating
6
+ documentation, submitting pull requests or patches, and other activities.
7
+
8
+ We are committed to making participation in this project a harassment-free
9
+ experience for everyone, regardless of level of experience, gender, gender
10
+ identity and expression, sexual orientation, disability, personal appearance,
11
+ body size, race, ethnicity, age, religion, or nationality.
12
+
13
+ Examples of unacceptable behavior by participants include:
14
+
15
+ * The use of sexualized language or imagery
16
+ * Personal attacks
17
+ * Trolling or insulting/derogatory comments
18
+ * Public or private harassment
19
+ * Publishing other's private information, such as physical or electronic
20
+ addresses, without explicit permission
21
+ * Other unethical or unprofessional conduct
22
+
23
+ Project maintainers have the right and responsibility to remove, edit, or
24
+ reject comments, commits, code, wiki edits, issues, and other contributions
25
+ that are not aligned to this Code of Conduct, or to ban temporarily or
26
+ permanently any contributor for other behaviors that they deem inappropriate,
27
+ threatening, offensive, or harmful.
28
+
29
+ By adopting this Code of Conduct, project maintainers commit themselves to
30
+ fairly and consistently applying these principles to every aspect of managing
31
+ this project. Project maintainers who do not follow or enforce the Code of
32
+ Conduct may be permanently removed from the project team.
33
+
34
+ This code of conduct applies both within project spaces and in public spaces
35
+ when an individual is representing the project or its community.
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
38
+ reported by contacting a project maintainer at duyet.nguyen@outlook.com. All
39
+ complaints will be reviewed and investigated and will result in a response that
40
+ is deemed necessary and appropriate to the circumstances. Maintainers are
41
+ obligated to maintain confidentiality with regard to the reporter of an
42
+ incident.
43
+
44
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
45
+ version 1.3.0, available at
46
+ [http://contributor-covenant.org/version/1/3/0/][version]
47
+
48
+ [homepage]: http://contributor-covenant.org
49
+ [version]: http://contributor-covenant.org/version/1/3/0/
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in aui_flash.gemspec
4
+ gemspec
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Duyet Nguyen
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,83 @@
1
+ # AuiFlash
2
+
3
+ Welcome to Aui Flash gem!
4
+
5
+ This gem helps you to build nice flashs or messages using style of [atlassian UI](https://docs.atlassian.com/aui/latest/docs/inline-dialog.html) like below :
6
+ ![all flash sample](https://i.gyazo.com/775db2e6deed48611689a067669b9573.png)
7
+
8
+
9
+ ## Installation
10
+
11
+ Add this line to your application's Gemfile:
12
+
13
+ ```ruby
14
+ gem 'aui_flash'
15
+ ```
16
+
17
+ And then execute:
18
+
19
+ $ bundle
20
+
21
+ Or install it yourself as:
22
+
23
+ $ gem install aui_flash
24
+
25
+ ## Usage
26
+ In the javascripts/applicaiton.js
27
+ ```
28
+ //= require aui-flash
29
+ ```
30
+
31
+ In the stylesheets/application.css.scss
32
+ ```
33
+ *= require aui-flash
34
+ ```
35
+ ## Sample
36
+ ```html
37
+ <div class="aui-message">
38
+ <p class="title">
39
+ <strong>Backup stale</strong>
40
+ </p>
41
+ <p>This instance was last backed up on Thursday, 18 September 2011.</p>
42
+ </div>
43
+ ```
44
+ will display
45
+
46
+ ![demo aui message](https://gyazo.com/9319ed6b241760204657e79c020f891d.png)
47
+
48
+ If you want to add the icon close to the message
49
+ ```html
50
+ <div class="aui-message closeable">
51
+ <p class="title">
52
+ <strong>Backup stale</strong>
53
+ </p>
54
+ <p>This instance was last backed up on Thursday, 18 September 2011.</p>
55
+ <span class="aui-icon icon-close" role="button" tabindex="0"></span>
56
+ </div>
57
+ ```
58
+ result
59
+
60
+ ![aui message info with close icon](https://gyazo.com/9389ec2f8082deaf8f6190bcaf64b11f.png)
61
+
62
+ Warning message sample
63
+ ```html
64
+ <div class="aui-message aui-message-warning">
65
+ <p class="title">
66
+ <strong>Backing up attachments</strong>
67
+ </p>
68
+ <p>Attachments will not be backed up. This needs to be done manually.</p>
69
+ </div>
70
+ ```
71
+ ![aui warning message](https://gyazo.com/2567e7bdd44c146807e20e04c66cc316.png)
72
+
73
+ Try to replace class "aui-message-warning" in above sample with the list of class below
74
+ ```
75
+ aui-message-error
76
+ aui-message-success
77
+ aui-message-info
78
+ aui-message-generic
79
+ ```
80
+ ## License
81
+
82
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
83
+
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+ task :default => :spec
Binary file
Binary file
@@ -0,0 +1,32 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'aui_flash/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "aui_flash"
8
+ spec.version = AuiFlash::VERSION
9
+ spec.authors = ["Duyet Nguyen"]
10
+ spec.email = ["duyet.vn@gmail.com"]
11
+
12
+ spec.summary = "build flash message"
13
+ spec.description = "support to build flash and message with the atlassian style"
14
+ spec.homepage = "https://rubygems.org/gems/aui_flash"
15
+ spec.license = "MIT"
16
+
17
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
18
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
19
+ # if spec.respond_to?(:metadata)
20
+ # spec.metadata['allowed_push_host'] = "https://rubygems.org/gems/aui_flash"
21
+ # else
22
+ # raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
23
+ # end
24
+
25
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
26
+ spec.bindir = "exe"
27
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
+ spec.require_paths = ["lib"]
29
+
30
+ spec.add_development_dependency "bundler", "~> 1.12"
31
+ spec.add_development_dependency "rake", "~> 10.0"
32
+ end
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "aui_flash"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,6 @@
1
+ require "aui_flash/version"
2
+
3
+ module AuiFlash
4
+ class Engine < ::Rails::Engine
5
+ end
6
+ end
@@ -0,0 +1,3 @@
1
+ module AuiFlash
2
+ VERSION = "0.1.2"
3
+ end
@@ -0,0 +1,5 @@
1
+ $(document).ready(function(){
2
+ $(".icon-close").click(function(){
3
+ $(this).parent().slideUp();
4
+ })
5
+ });
@@ -0,0 +1,128 @@
1
+ .aui-message {
2
+ background: #fff;
3
+ border-top: 1px solid #3572b0;
4
+ border-right: 1px solid #3572b0;
5
+ border-bottom: 1px solid #3572b0;
6
+ border-left: 1px solid #3572b0;
7
+ border-radius: 3px;
8
+ color: #333;
9
+ line-height: 20px;
10
+ margin: 20px 0 0 0;
11
+ overflow-wrap: break-word;
12
+ padding-left: 60px;
13
+ padding-right: 40px;
14
+ position: relative;
15
+ word-wrap: break-word;
16
+ word-break: break-word;
17
+ font-family: Arial,sans-serif;
18
+ font-size: 14px;
19
+ }
20
+
21
+ .aui-message:before {
22
+ background-color: #3572b0;
23
+ bottom: 0;
24
+ content: '';
25
+ left: 0;
26
+ position: absolute;
27
+ top: 0;
28
+ width: 40px;
29
+ }
30
+
31
+ .aui-message:after {
32
+ color: #fff;
33
+ font-family: Atlassian Icons;
34
+ font-size: 16px;
35
+ -webkit-font-smoothing: antialiased;
36
+ font-style: normal;
37
+ font-weight: 400;
38
+ left: 12px;
39
+ line-height: 1;
40
+ margin-top: -8px;
41
+ position: absolute;
42
+ speak: none;
43
+ top: 50%;
44
+ content: url("icons/messages/icon-generic-white.png");
45
+ }
46
+
47
+ /* Messege warning */
48
+ .aui-message-warning, .aui-message.warning {
49
+ background: #fff;
50
+ border-color: #f6c342;
51
+ color: #333;
52
+ }
53
+
54
+ .aui-message-warning:before, .aui-message.warning:before {
55
+ background-color: #f6c342;
56
+ }
57
+
58
+ .aui-message-warning:after, .aui-message.warning:after {
59
+ content: url("icons/messages/icon-warning-grey.png");
60
+ }
61
+
62
+
63
+ /* Messege errors */
64
+ .aui-message-error, .aui-message.error {
65
+ background: #fff;
66
+ border-color: #d04437;
67
+ color: #333;
68
+ }
69
+
70
+ .aui-message-error:before, .aui-message.error:before {
71
+ background-color: #d04437;
72
+ }
73
+
74
+ .aui-message-error:after, .aui-message.error:after {
75
+ content: url("icons/messages/icon-error-white.png");
76
+ }
77
+
78
+ /* Message success */
79
+ .aui-message-success, .aui-message.success {
80
+ background: #fff;
81
+ border-color: #8eb021;
82
+ color: #333;
83
+ }
84
+
85
+ .aui-message-success:before, .aui-message.success:before {
86
+ background-color: #8eb021;
87
+ }
88
+
89
+ .aui-message-success:after, .aui-message.success:after {
90
+ content: url("icons/messages/icon-success-white.png");
91
+ }
92
+
93
+ /* Message hint */
94
+ .aui-message-hint, .aui-message-info, .aui-message.hint, .aui-message.info {
95
+ background: #fff;
96
+ border-color: #3572b0;
97
+ color: #333;
98
+ }
99
+
100
+ .aui-message-hint:before, .aui-message-info:before, .aui-message.hint:before, .aui-message.info:before {
101
+ background-color: #3572b0;
102
+ }
103
+
104
+ .aui-message-hint:after, .aui-message-info:after, .aui-message.hint:after, .aui-message.info:after {
105
+ content: url("icons/messages/icon-generic-white.png");
106
+ }
107
+
108
+ .aui-message p.title {
109
+ font-weight: 700;
110
+ }
111
+
112
+
113
+ /* Close icon */
114
+ .aui-message.closeable .icon-close {
115
+ cursor: pointer;
116
+ left: auto;
117
+ position: absolute;
118
+ right: 20px;
119
+ top: 20px;
120
+ }
121
+
122
+ .icon-close {
123
+ opacity: 1;
124
+ background: url("icons/messages/icon-close.png") no-repeat center;
125
+ width: 20px;
126
+ height: 20px;
127
+ text-align: center;
128
+ }
metadata ADDED
@@ -0,0 +1,93 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: aui_flash
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.2
5
+ platform: ruby
6
+ authors:
7
+ - Duyet Nguyen
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2016-09-14 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.12'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.12'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ description: support to build flash and message with the atlassian style
42
+ email:
43
+ - duyet.vn@gmail.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - ".gitignore"
49
+ - CODE_OF_CONDUCT.md
50
+ - Gemfile
51
+ - LICENSE.txt
52
+ - README.md
53
+ - Rakefile
54
+ - aui_flash-0.1.0.gem
55
+ - aui_flash-0.1.1.gem
56
+ - aui_flash.gemspec
57
+ - bin/console
58
+ - bin/setup
59
+ - lib/aui_flash.rb
60
+ - lib/aui_flash/version.rb
61
+ - vendor/assets/images/icons/messages/icon-close-inverted.png
62
+ - vendor/assets/images/icons/messages/icon-close.png
63
+ - vendor/assets/images/icons/messages/icon-error-white.png
64
+ - vendor/assets/images/icons/messages/icon-generic-white.png
65
+ - vendor/assets/images/icons/messages/icon-success-white.png
66
+ - vendor/assets/images/icons/messages/icon-warning-grey.png
67
+ - vendor/assets/javascripts/aui-flash.js
68
+ - vendor/assets/stylesheets/aui-flash.css
69
+ homepage: https://rubygems.org/gems/aui_flash
70
+ licenses:
71
+ - MIT
72
+ metadata: {}
73
+ post_install_message:
74
+ rdoc_options: []
75
+ require_paths:
76
+ - lib
77
+ required_ruby_version: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
82
+ required_rubygems_version: !ruby/object:Gem::Requirement
83
+ requirements:
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ version: '0'
87
+ requirements: []
88
+ rubyforge_project:
89
+ rubygems_version: 2.5.1
90
+ signing_key:
91
+ specification_version: 4
92
+ summary: build flash message
93
+ test_files: []