corn_starch 1.6.0 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0ff009fb05712f3b4ebc7dc20123a22deac0b27f
4
- data.tar.gz: adf810125f172782a013affa6bd8e012c49b5380
3
+ metadata.gz: af02d5a73ddbb4898af79492f2df01e7454bb225
4
+ data.tar.gz: f11cb145b4a6a671b9f63e7754f732957af4075c
5
5
  SHA512:
6
- metadata.gz: 602879545f8c967b20566a9316031b9efb07c12b0c6277521ec4782ce96ddb249c269521d307cdb57cf2e79c35b0552005bb2923b4d3926d9ec29d50b92585b6
7
- data.tar.gz: 526a9a6de1329470e2f93a57ca3503f309513d89c2a74b7a12a096aae1b5fb47ab5f8d774625cb702bfff2670e4e393247f0d5a5dc7873a52232c951560ffd48
6
+ metadata.gz: bc89c7ba08a43fb732c6e48840c18c1f3f0ae283c7b8c5f27be3e755a94d7da807da97a70b157a5d3bd0182e0537b6844bd455dfd62e35a96be3b524576586fe
7
+ data.tar.gz: 7004cf965425d663232fee519c61ca0474bb5833099d841a5ace2f57ef4fb049a7ee99f9dfc7661e24dc4e3b482ee9c9cbf2f9e91bb06bb0a5b89a4a794b63d6
@@ -48,7 +48,7 @@ window.infiniscroll = (container) ->
48
48
  $(window).scroll infiniscroll_handler
49
49
 
50
50
  # Scroll Handler
51
- window.infiniscroll_handler = () ->
51
+ window.infiniscroll_handler = ->
52
52
 
53
53
  # Acquire Container
54
54
  infiniscroll_container = $('.infiniscroll-container')[0]
@@ -63,7 +63,7 @@ window.infiniscroll_handler = () ->
63
63
  infiniscroll infiniscroll_container.id
64
64
 
65
65
  # InfiniScroll Init
66
- window.infiniscroll_init = () ->
66
+ window.infiniscroll_init = ->
67
67
 
68
68
  # Acquire Container
69
69
  infiniscroll_container = $('.infiniscroll-container')
@@ -0,0 +1,17 @@
1
+ # CornStarch
2
+ # by Eresse <eresse@eresse.net>
3
+
4
+ # Modal JS
5
+
6
+ # Init Modal
7
+ window.modal_init = (modal) ->
8
+
9
+ # Wire up Show Button
10
+ if $("#modal-#{modal}-btn-show").length
11
+ $("#modal-#{modal}-btn-show").click ->
12
+ $("#modal-#{modal}").show 'fast'
13
+
14
+ # Wire up Hide Button
15
+ if $("#modal-#{modal}-btn-hide").length
16
+ $("#modal-#{modal}-btn-hide").click ->
17
+ $("#modal-#{modal}").hide 'fast'
@@ -0,0 +1,25 @@
1
+ # CornStarch
2
+ # by Eresse <eresse@eresse.net>
3
+
4
+ # CornStarch Module
5
+ module CornStarch
6
+
7
+ # Modal Helper
8
+ module ModalHelper
9
+
10
+ # Modal Tag
11
+ def modal_tag params, &block
12
+ render partial: 'modal', locals: { modal: params }, &block
13
+ end
14
+
15
+ # Hide Button Tag
16
+ def modal_hide_btn_tag modal
17
+ div_tag class: 'modal-close-btn', id: "modal-#{modal[:name]}-btn-hide"
18
+ end
19
+
20
+ # Modal Block Tag
21
+ def modal_block_tag &block
22
+ div_tag class: 'modal-block', &block
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,14 @@
1
+ <%# Modal %>
2
+ <div class='modal' id='modal-<%= modal[:name] %>'>
3
+ <div class='modal-content'>
4
+ <%= yield %>
5
+ </div>
6
+ </div>
7
+
8
+ <%# Modal JS %>
9
+ <script>
10
+
11
+ <%# Init Modal %>
12
+ $(document).ready(function() { modal_init(<%= modal[:name] %>); });
13
+ $(document).on('page:load', function() { modal_init(<%= modal[:name] %>); });
14
+ </script>
@@ -1,3 +1,3 @@
1
1
  module CornStarch
2
- VERSION = '1.6.0'
2
+ VERSION = '1.7.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: corn_starch
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eresse
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-06-10 00:00:00.000000000 Z
11
+ date: 2016-06-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,12 +52,15 @@ 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/modal.js.coffee
55
56
  - app/assets/javascripts/corn_starch/notifications.js.coffee
56
57
  - app/controllers/corn_starch/corn_starch_controller.rb
57
58
  - app/controllers/corn_starch/sessions_controller.rb
58
59
  - app/helpers/corn_starch/corn_starch_helper.rb
59
60
  - app/helpers/corn_starch/gravatar_helper.rb
60
61
  - app/helpers/corn_starch/infiniscroll_helper.rb
62
+ - app/helpers/corn_starch/modal_helper.rb
63
+ - app/views/corn_starch/layouts/_modal.html.erb
61
64
  - app/views/corn_starch/layouts/_notifications.html.erb
62
65
  - app/views/corn_starch/layouts/_pagination.html.erb
63
66
  - bin/console