jqr-helpers 1.0.55 → 1.0.56

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MDQxYmUwMjdhZmU0ZjdkZmRjNTc1OTg4ZmI1NmUwZWM5NTI5M2U1Mw==
4
+ Yjk2NjM2MDhjY2ViZTA0N2RjNGM0YTU4NGQ0MTdlM2NlNTI1YWU4Yw==
5
5
  data.tar.gz: !binary |-
6
- OTA3NDQ4OTYwZTZkZDhiMTgzMjljMTg2ODQ3MGZmMTBhMWZlNGViMQ==
6
+ M2UyMzZjZjcyOTEzY2ZiNDBkNTg4NTNmY2Y3YjU5YjcxZjc1YTViNw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NTc1MTEwYWFjMjM0NzQ1ZjM0NDU1OGNmZjBlYzAxODJjODgxMjhlMmI0MzU5
10
- ZDVmYzM0NDdhMDdlNzM3MTA1NDJhMGJhMmNkNjBhZTdkMmMzZTcwNjdiNDky
11
- MDg5OTJlYjM1MWI4N2QwZDZkY2ZhY2MzMTJiYzlmYjVmODI3NmU=
9
+ ZjU3MmRkZTY5M2U1ODFiNTY3YTBmNzQ3MGVhNmI2M2M3ZmZlMWMyNDIyNTY1
10
+ ZGUxMzA3N2I4YmZmNGZmYWU3NzAwNmNlZDI1MjA1ZTdmNmQ1YzM3NmViNzE0
11
+ YjBiMTQ1YThkMGNjMjJmZDg1MWY3ZDRkM2MzNmE3ZDFkYjg2Y2E=
12
12
  data.tar.gz: !binary |-
13
- ZWY2MzhkMDIzYWY0OWNjNDM3MzNhYTFhN2FmZjIwYTFkODE2Mjk2MzYzYjFk
14
- NTE2ZTJjOTZmMGVmN2I0MDg3YzdkYTM0MTA1YTM4M2Y2MjViYTE1YzQwZTUy
15
- MDE2ZjZmNjQ4OTZjNWU2Y2RmOGI1ZDBmYmE2OGI5YTE4MzkzMTQ=
13
+ YjY4MzBjNjVhNDI2NDJmOGI3N2VmNGYzOTk1ZTU5ZjQ2NTI0NzU4YTBiZWFm
14
+ OWJjM2IxOWQ3YWRlYjhmYWE4YzM4NTQ2Y2I2ZDVjYzBjMDViNjY2M2FiMzQw
15
+ YmVkZTI5NzQwMWM2NWFlNDE3ODJmNmQ2MGQzMzFjNjI1YjMzNjM=
data/jqr-helpers.gemspec CHANGED
@@ -1,8 +1,8 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'jqr-helpers'
3
3
  s.require_paths = %w(. lib lib/jqr-helpers)
4
- s.version = '1.0.55'
5
- s.date = '2014-08-15'
4
+ s.version = '1.0.56'
5
+ s.date = '2014-08-18'
6
6
  s.summary = 'Helpers to print unobtrusive jQuery-UI tags.'
7
7
  s.description = <<-EOF
8
8
  This gem adds helper methods to create unobtrusive jQuery code. It outputs
@@ -390,11 +390,16 @@ module JqrHelpers
390
390
  # "ujs-toggle-closed" so you can style it.
391
391
  # @param body [String] the text for the link.
392
392
  # @param id [String] the ID of the element to toggle.
393
- # @param options [Hash] HTML options for the link.
393
+ # @param options [Hash] HTML options for the link. An extra option is
394
+ # start_open which indicates that the content to toggle is already
395
+ # visible.
394
396
  def link_to_toggle(body, id, options={})
395
397
  tag_name = options.delete(:tag_name) || :a
396
398
  options[:class] ||= ''
397
- options[:class] << ' ujs-toggle ujs-toggle-closed'
399
+ options[:class] << ' ujs-toggle'
400
+ options[:class] << (options.delete(:start_open) ?
401
+ ' ujs-toggle-open' :
402
+ ' ujs-toggle-closed')
398
403
  content_tag tag_name, body, options.merge(:'data-id' => id)
399
404
  end
400
405
 
@@ -1,6 +1,6 @@
1
1
  module JqrHelpers
2
2
  # @private
3
3
  module Rails
4
- VERSION = '1.0.55'
4
+ VERSION = '1.0.56'
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jqr-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.55
4
+ version: 1.0.56
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Orner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-15 00:00:00.000000000 Z
11
+ date: 2014-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement