jqr-helpers 1.0.66 → 1.0.67
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/Readme.md +1 -0
- data/app/assets/javascripts/jqr-helpers.js +34 -25
- data/jqr-helpers.gemspec +2 -2
- data/lib/jqr-helpers/railtie.rb +2 -2
- data/lib/jqr-helpers/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MGQ5YmQwOTQ1NTAzN2I1YzcyZmFhYjRlNWM5MjVkOTBmN2M2NDc5Mw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OWU4N2M2ZWM5MWIyOGM3M2JkYjQ2MzU0MDNlNjg3NDAyZWJkMDg2OA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YWE3MGQyZTc2ODg2Y2NhYWVjODg1NDViNjRmY2YzZGRiY2Y3MmFhY2Y5OWZl
|
10
|
+
N2ZmZDQ4OWYwODQ1MjcxZjJmNmVjYzcxNmE2NWRmOGJmOTNkNjI5MmI5MTEx
|
11
|
+
MzgwODMxNzUzNzNhNTBjOWYzNmU2Nzg3ZjMwYWM2NzU4NzViOTQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MTc4NjY4MWZiNTRjMTFhNGZlNjdjNTg3MGE0NjA4Zjc4NWE2YjAwZmI1NTI0
|
14
|
+
NGM2ZmNiMmJkNzY4ZWIxMTU4M2YzMDkzYzZiOTYyNTcyMTFhNzlhZDA5OGVi
|
15
|
+
MmQ4OTA1NTFlN2EwMjY3MGIxMjg3NDlhYmRlZGViZDM0OGQyZjU=
|
data/Readme.md
CHANGED
@@ -192,6 +192,7 @@ You can monitor a field for changes using the ``ajax_change`` method:
|
|
192
192
|
|
193
193
|
<%= ajax_change('/toggle_complete_url', :update => '.parent-row') do %>
|
194
194
|
<%= check_box_tag 'toggle_complete', 1, my_model.complete? %>
|
195
|
+
<%= hidden_field_tag :additional_field, 'additional_value' %>
|
195
196
|
<% end %>
|
196
197
|
|
197
198
|
## Panel Renderers ##
|
@@ -499,31 +499,40 @@
|
|
499
499
|
element.removeAttr('data-' + val);
|
500
500
|
});
|
501
501
|
element.removeClass('ujs-ajax');
|
502
|
-
$(this).find('
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
502
|
+
var hidden = $(this).find('[type=hidden]');
|
503
|
+
$(this).find('input, select').not('[type=hidden]').data(dataMap).
|
504
|
+
change(function() {
|
505
|
+
var params = hidden.map(function() {
|
506
|
+
return $(this).attr('name') + '=' +
|
507
|
+
encodeURIComponent($(this).val());
|
508
|
+
});
|
509
|
+
params = $.makeArray(params).join('&');
|
510
|
+
// unchecked checkboxes would not be included. We'll replace it
|
511
|
+
// with a checked one and value 0.
|
512
|
+
$('body').remove('.jqr-hidden-checkbox');
|
513
|
+
if ($(this).is(':checkbox:not(:checked)')) {
|
514
|
+
$(this).uniqueId();
|
515
|
+
element = $(this).clone();
|
516
|
+
element.attr('id', '');
|
517
|
+
element.data($(this).data());
|
518
|
+
element.data('real-element', $(this).attr('id'));
|
519
|
+
element.prop('value', '0');
|
520
|
+
element.prop('checked', true);
|
521
|
+
element.hide();
|
522
|
+
element.addClass('jqr-hidden-checkbox').addClass('ujs-ajax');
|
523
|
+
element.attr('data-remote', true);
|
524
|
+
$('body').append(element);
|
525
|
+
$(element).data('params', params);
|
526
|
+
$.rails.handleRemote(element);
|
527
|
+
}
|
528
|
+
else {
|
529
|
+
// Rails checks the attribute, not the data
|
530
|
+
$(this).attr('data-remote', true).addClass('ujs-ajax');
|
531
|
+
$(this).data('params', params);
|
532
|
+
$.rails.handleRemote($(this));
|
533
|
+
$(this).removeAttr('data-remote');
|
534
|
+
}
|
535
|
+
});
|
527
536
|
});
|
528
537
|
$(event.target).trigger('jqr.afterload');
|
529
538
|
}
|
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.
|
5
|
-
s.date = '2015-
|
4
|
+
s.version = '1.0.67'
|
5
|
+
s.date = '2015-03-02'
|
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
|
data/lib/jqr-helpers/railtie.rb
CHANGED
data/lib/jqr-helpers/version.rb
CHANGED
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.
|
4
|
+
version: 1.0.67
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Orner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|