recordselect 3.9.2 → 3.10.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 939fd5b49a9910e69dbfd85b888ab1838bc3167e
|
4
|
+
data.tar.gz: edc1b94925eb6edfd0e75cccd978d0b9029168b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0760dff3cec73a2067192f889af7cba14b29a226d6432eda90ffe691cb65e558f22627e5638f0217e93c4ae743ecf4b00089dc15cb37ba7bbcc2353144628470
|
7
|
+
data.tar.gz: f99d7d2cfdefb26d0de1c81ff3da3c89cf0e4d01fcbb9222a94a2a4d05af6d1e88aaa9db124cc4b70410c27cdbcd6c4ded5c9e17f138b687e09271ed29b1e30c
|
@@ -80,7 +80,7 @@ if (typeof(jQuery.fn.delayedObserver) === 'undefined') {
|
|
80
80
|
var el = $(this);
|
81
81
|
var op = options || {};
|
82
82
|
el.data('oldval', el.val())
|
83
|
-
.data('delay', delay || 0.5)
|
83
|
+
.data('delay', delay === 0 ? delay : (delay || 0.5))
|
84
84
|
.data('condition', op.condition || function() { return ($(this).data('oldval') == $(this).val()); })
|
85
85
|
.data('callback', callback)
|
86
86
|
[(op.event||'keyup')](function(){
|
@@ -117,8 +117,11 @@ jQuery(document).ready(function() {
|
|
117
117
|
return false;
|
118
118
|
});
|
119
119
|
jQuery(document).on('ajax:beforeSend', '.record-select-container', function(event, xhr) {
|
120
|
-
var rs = jQuery(this).data('recordselect'), cur = rs.current_xhr;
|
120
|
+
var rs = jQuery(this).data('recordselect'), cur = rs.current_xhr, found = jQuery(this).find('.found');
|
121
|
+
jQuery(this).find('.record, .pagination').remove();
|
122
|
+
found.html(found.data('searching'));
|
121
123
|
rs.current_xhr = xhr;
|
124
|
+
console.log(rs.current_xhr);
|
122
125
|
if (cur) cur.abort();
|
123
126
|
});
|
124
127
|
jQuery(document).on('ajax:complete', '.record-select-container', function(event, xhr, status) {
|
@@ -154,7 +157,9 @@ RecordSelect.observe = function(form) {
|
|
154
157
|
var callback = function() {
|
155
158
|
if (form.closest('body').length) form.trigger("submit");
|
156
159
|
};
|
157
|
-
|
160
|
+
var delay = parseFloat(rs.obj.data('rsDelay'));
|
161
|
+
if (isNaN(delay)) delay = 0.35;
|
162
|
+
form.find('input.text-input').delayedObserver(callback, delay, {
|
158
163
|
condition: function() {
|
159
164
|
var item = jQuery(this);
|
160
165
|
return item.data('oldval') == item.val() || item.val().length < min_length;
|
@@ -7,8 +7,8 @@ prev_url = url_for(pagination_url_params.merge(:page => page.prev.number)) if pa
|
|
7
7
|
next_url = url_for(pagination_url_params.merge(:page => page.next.number)) if page.next?
|
8
8
|
-%>
|
9
9
|
<%= content_tag :ol, :class => ('scrollable' unless record_select_config.pagination?) do %>
|
10
|
-
|
11
|
-
:model => record_select_config.model.model_name.human(:count => page.pager.count).downcase)
|
10
|
+
<%= content_tag :li, rs_(:records_found, :count => page.pager.count,
|
11
|
+
:model => record_select_config.model.model_name.human(:count => page.pager.count).downcase), class: 'found', data: {searching: rs_(:searching)} %>
|
12
12
|
<% if page.prev? -%>
|
13
13
|
<li class="pagination previous">
|
14
14
|
<%= link_to image_tag('record_select/previous.gif', :alt => rs_(:previous)) + " " + rs_(:previous_items,
|
data/config/locales/en.yml
CHANGED
data/config/locales/es.yml
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: recordselect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergio Cambra
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2018-
|
13
|
+
date: 2018-03-14 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|