super_tools 0.0.13 → 0.0.14

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
- SHA256:
3
- metadata.gz: 0335c45c48a1df81df191c9f0b0ee4f4d7529af6407fdb8aeecca380847e5675
4
- data.tar.gz: 149c4a2c0118d5cce4df3ca6d16a8ef53ac4e8c4ff994172c964887ad689a461
2
+ SHA1:
3
+ metadata.gz: 4629c593e7e200633427dd00312a6796f89214f0
4
+ data.tar.gz: 44f7a6c84dec5dbcf3684063a822f3505dea8bc8
5
5
  SHA512:
6
- metadata.gz: c59b31cf7a51ae06c595f958cad780fc36169290cc4be478ecee84aaa15cd84fcc34fd665f83858cb977d52104c3efa43f99b78f0f685f3047add33ff30bee69
7
- data.tar.gz: 42d10f4c9a3cd07527f64fb962c032a74b869d4d5b6965284bb3186b3ec0d16a7321b2061dcfa7b64d6693a2f5d3911761c556e27554a095ffe13f32f5ab3c2a
6
+ metadata.gz: 748d60139166797eeef6b99493e162d411eb27a8b0600d19cc0bece66024236e8f7f2f5b2086a91eba306fbb86ce9b0585dcc0cd62fbe74342d5ff7e3dfe2af8
7
+ data.tar.gz: 4f07b57896dd2fc6a1c59554365dae3c33b7d1b9756622c4fa380ba75d84731a1f4f66a7b04fbe87afd04e3a43a18dee401837364919f4d03c28ffb4bb5c8d7d
@@ -32,7 +32,7 @@ module SuperInteraction
32
32
  # 注意:不要包 respond_to :js 會有問題
33
33
  def modal(partial: nil, size: 'md', title: '', desc: '')
34
34
  partial ||= context.action_name
35
- modal_html = context.render_to_string(partial, layout: 'modal.html.haml', locals: { bs_modal_size: size, title: title, desc: desc })
35
+ modal_html = context.render_to_string(partial, layout: "interaction_modal.html.haml", locals: { bs_modal_size: size, title: title, desc: desc })
36
36
  cmd("$(function() { $.modal.show('#{helpers.j(modal_html)}'); });")
37
37
  end
38
38
 
@@ -0,0 +1,5 @@
1
+ module SuperInteraction
2
+ class Engine < Rails::Engine
3
+ paths["app/views"] = "lib/super_interaction/views"
4
+ end
5
+ end
@@ -0,0 +1,24 @@
1
+ - if Rails.version[0].to_i >= 5
2
+ - bs_modal_size = local_assigns[:bs_modal_size]
3
+ - title = local_assigns[:title]
4
+ - desc = local_assigns[:desc]
5
+ .modal
6
+ = yield :wrapper
7
+ .modal-dialog{ class: "modal-#{bs_modal_size}" }
8
+ .modal-content
9
+ .modal-header
10
+ %button.close{"aria-label" => "Close", "data-dismiss" => "modal", :type => "button"}
11
+ = fa_icon('times')
12
+ = yield :header
13
+ - if title.present?
14
+ %h4.modal-title= title
15
+ = yield
16
+ = yield :before_body
17
+ - body_html = capture { yield :body }
18
+ - if body_html.present?
19
+ .modal-body= body_html
20
+ = yield :after_body
21
+
22
+ - footer_html = capture { yield :footer }
23
+ - if footer_html.present?
24
+ .modal-footer= footer_html
@@ -1,3 +1,3 @@
1
1
  module SuperTools
2
- VERSION = '0.0.13'
2
+ VERSION = '0.0.14'
3
3
  end
data/lib/super_tools.rb CHANGED
@@ -42,6 +42,7 @@ require 'super_search/scroll'
42
42
  # ZIP CODE
43
43
  require 'super_zipcode/taiwan'
44
44
  # INTERACTION
45
+ require 'super_interaction/engine'
45
46
  require 'super_interaction/command'
46
47
  require 'super_interaction/controller_helper'
47
48
  # FORMATTER
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: super_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - eddie
@@ -318,6 +318,8 @@ files:
318
318
  - lib/super_formatter/tcat/row.rb
319
319
  - lib/super_interaction/command.rb
320
320
  - lib/super_interaction/controller_helper.rb
321
+ - lib/super_interaction/engine.rb
322
+ - lib/super_interaction/views/layouts/interaction_modal.html.haml
321
323
  - lib/super_logger/formatter.rb
322
324
  - lib/super_process/core.rb
323
325
  - lib/super_search/scroll.rb
@@ -352,7 +354,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
352
354
  version: '0'
353
355
  requirements: []
354
356
  rubyforge_project:
355
- rubygems_version: 2.7.6.2
357
+ rubygems_version: 2.4.8
356
358
  signing_key:
357
359
  specification_version: 4
358
360
  summary: Rails 開發環境常用工具 Forms/Process/Spreadsheet