agilibox 1.0.1 → 1.0.2

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: b6cb9165286426fdf543bd20255dcbee6562178f
4
- data.tar.gz: 4ffd8ea0ec2a3348bb80e1a80820ebdfb714e70d
3
+ metadata.gz: a14a11da198f153509c6e6af15d96ad168a07eba
4
+ data.tar.gz: 5c1f8a8e56ad1bfd3b41b5a39e39acebd521d82e
5
5
  SHA512:
6
- metadata.gz: a26d7098f32d3c8e1b3c51c8fda1a3a91b3c50e191f5efbc3bed0b0929a6c5a6b7ad55dc6f86520e294fba4b9566b7a02f5cf096ebc7673eed6308eee730b215
7
- data.tar.gz: 5191b6b7de41476345bd0f6afa1fdc69618832a3070dc410123a59ecaf01efcf176df13c5bf7ae2df62bdbdd991bd15053866b988193daf39475ea910ba663ae
6
+ metadata.gz: 60900886cfe07983d2e3c03c57d6f49143e05b1d62570d278d1d603b5254920a3181bf6ee44d8893880439b3074efb97f88dafd140997c74466cdf2831925bc4
7
+ data.tar.gz: c57c664537f7583547eb4fe543aae666d8d25f66551896be12c40151d226a5845684ba65c864afac656eacfdcf6f5b47b5c950924311a430bfee0e17a7a1f8cc
data/CHANGELOG.md CHANGED
@@ -1,8 +1,9 @@
1
1
  # Changelog
2
2
 
3
- ## Next version
3
+ ## 1.0.2
4
4
 
5
- Nothing.
5
+ - Button helper changes
6
+ - Modals use event delegation
6
7
 
7
8
  ## 1.0.1
8
9
 
@@ -103,27 +103,11 @@ window.modal =
103
103
  return true
104
104
 
105
105
  setup: ->
106
- $(document)
107
- .off("keyup", modal._callbacks.escape)
108
- .on("keyup", modal._callbacks.escape)
109
-
110
- $("#modal-overlay, #modal-close")
111
- .off("click", modal.autoclose)
112
- .on("click", modal.autoclose)
113
-
114
- $("a[href][data-modal=1], #modal-body a[href]")
115
- .not("[data-modal=0]")
116
- .not("[data-method]")
117
- .not("[data-remote]")
118
- .off("click", modal._callbacks.links)
119
- .on("click", modal._callbacks.links)
120
-
121
- $("form[data-modal=1], #modal-body form")
122
- .not("[data-modal=0]")
123
- .not("[data-remote]")
124
- .off("submit", modal._callbacks.forms)
125
- .on("submit", modal._callbacks.forms)
126
-
127
-
128
- $(document).on "turbolinks:load modal:open", ->
129
- modal.setup()
106
+ $(document).on("keyup", modal._callbacks.escape)
107
+ $(document).on("click", "#modal-overlay, #modal-close", modal.autoclose)
108
+ $(document).on("click", "a[data-modal=1], #modal a[href]:not([data-modal=0]):not([data-remote]):not([data-method])", modal._callbacks.links)
109
+ $(document).on("submit", "form[data-modal=1], #modal form:not([data-modal=0]):not([data-remote])", modal._callbacks.forms)
110
+ # Forms created by jquery_ujs for remote links
111
+ $(document).on("submit", "body.modal-open > form", modal._callbacks.forms)
112
+
113
+ modal.setup()
@@ -8,7 +8,7 @@ module Agilibox::ButtonHelper
8
8
  text = "#{icon icon} <span>#{text}</span>".html_safe
9
9
 
10
10
  options = {
11
- :class => "btn btn-xs link_#{action}",
11
+ :class => "btn btn-xs btn-default link_#{action}",
12
12
  :title => title,
13
13
  }.deep_merge(options)
14
14
 
@@ -83,6 +83,16 @@ module Agilibox::ButtonHelper
83
83
  bs_button(url, options)
84
84
  end
85
85
 
86
+ def import_button(url, options = {})
87
+ options = {
88
+ :icon => "cloud-upload",
89
+ :action => :import,
90
+ :download => url,
91
+ }.merge(options)
92
+
93
+ bs_button(url, options)
94
+ end
95
+
86
96
  def update_button(url, options = {})
87
97
  options = {
88
98
  :icon => :pencil,
@@ -1,3 +1,3 @@
1
1
  module Agilibox
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: agilibox
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - agilidée
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-28 00:00:00.000000000 Z
11
+ date: 2017-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails-i18n
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
108
  version: '0'
109
109
  requirements: []
110
110
  rubyforge_project:
111
- rubygems_version: 2.5.1
111
+ rubygems_version: 2.6.11
112
112
  signing_key:
113
113
  specification_version: 4
114
114
  summary: Agilibox