corn_starch 1.5.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e3240e911e3c456780a292206bdc16aa67d4517a
4
- data.tar.gz: 405d8c6bf1ec56636fa33f743e8a62f21e653482
3
+ metadata.gz: 0ff009fb05712f3b4ebc7dc20123a22deac0b27f
4
+ data.tar.gz: adf810125f172782a013affa6bd8e012c49b5380
5
5
  SHA512:
6
- metadata.gz: d98e8fbfd6c5c665722bb0d4cd0e64116a10c014be468781c0483527566aa03d5a36008adade312a695febc9fef6665d7f4d074f92d9fa2536bf733be636b519
7
- data.tar.gz: e2408851ae6ee3485966fe552e5cb74ae7d9a13f88394d35e4793418b0b4b70749079992ea1a3e11178c251bd72ff56d1e0f9a0ad41f9d0047828454f3d3347c
6
+ metadata.gz: 602879545f8c967b20566a9316031b9efb07c12b0c6277521ec4782ce96ddb249c269521d307cdb57cf2e79c35b0552005bb2923b4d3926d9ec29d50b92585b6
7
+ data.tar.gz: 526a9a6de1329470e2f93a57ca3503f309513d89c2a74b7a12a096aae1b5fb47ab5f8d774625cb702bfff2670e4e393247f0d5a5dc7873a52232c951560ffd48
@@ -0,0 +1,10 @@
1
+ # CornStarch
2
+ # by Eresse <eresse@eresse.net>
3
+
4
+ # Notifications JS
5
+
6
+ # Dismiss Notifications
7
+ window.notifications_dismiss = (container) ->
8
+
9
+ # Drop Notification
10
+ $("##{container}").hide 'fast'
@@ -1,6 +1,9 @@
1
1
  <!-- Display Flash Notifications -->
2
2
  <% flash.each do |name, msg| %>
3
- <%= content_tag :div, class: "alert alert-#{{ notice: 'success', alert: 'danger' }[name.to_sym]}", role: :alert do %>
3
+ <%= content_tag :div, id: "notification-#{name}", class: "alert alert-#{{ notice: 'success', alert: 'danger' }[name.to_sym]}", role: :alert do %>
4
+ <%= content_tag :div, class: 'notification-dismiss-btn', onclick: "notifications_dismiss('notification-#{name}')" do %>
5
+ &#10006;
6
+ <% end %>
4
7
  <strong><%= msg.symbolize_keys[:head] %></strong>
5
8
  <p><%= msg.symbolize_keys[:body] %></p>
6
9
  <% end %>
@@ -1,3 +1,3 @@
1
1
  module CornStarch
2
- VERSION = '1.5.0'
2
+ VERSION = '1.6.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: corn_starch
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eresse
@@ -52,6 +52,7 @@ files:
52
52
  - Rakefile
53
53
  - app/assets/javascripts/corn_starch/application.js
54
54
  - app/assets/javascripts/corn_starch/infiniscroll.js.coffee
55
+ - app/assets/javascripts/corn_starch/notifications.js.coffee
55
56
  - app/controllers/corn_starch/corn_starch_controller.rb
56
57
  - app/controllers/corn_starch/sessions_controller.rb
57
58
  - app/helpers/corn_starch/corn_starch_helper.rb