recordselect 4.0.9 → 4.0.11
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 +4 -4
- data/app/assets/javascripts/record_select.js +7 -27
- data/lib/record_select/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: afe776cd3e3b4d4d572a88c702538a07fe49d998f4a6ed4d7a5968b1a24ba1ba
|
|
4
|
+
data.tar.gz: eac7e66d1daf9989bac8b2bd7c4c11e3d9b79ad3cf5b3febe79e7b48d97eaffa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2c67e5065b17a64b218748c6309d67ccb441601a821255c6bc3b6148543e8763300a63763f817807eda59892b3447dc6f474b96e7cbba5878a1f5e2f4e209b65
|
|
7
|
+
data.tar.gz: 9c0cdd99a7171c793777219a42f3744045baf9b8d0c41f5a9930d890ee4cf78a97c1e0295899d2d6ec65310744c908b803f77babce266b6f59b4ef6b4575e6af
|
|
@@ -110,6 +110,9 @@
|
|
|
110
110
|
})(jQuery);
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
+
window.RecordSelect = new Object();
|
|
114
|
+
RecordSelect.document_loaded = false;
|
|
115
|
+
|
|
113
116
|
jQuery(document).ready(function() {
|
|
114
117
|
RecordSelect.document_loaded = true;
|
|
115
118
|
jQuery('[data-rs-type]').each(function() { RecordSelect.from_attributes(jQuery(this)); });
|
|
@@ -155,13 +158,10 @@
|
|
|
155
158
|
else $clear_button.removeClass('enabled');
|
|
156
159
|
});
|
|
157
160
|
jQuery(document).on('ajax:beforeSend', 'a.rs-mode', function() {
|
|
158
|
-
|
|
161
|
+
jQuery(this).closest('.record-select').find('form input[name="rs_mode"]').val(jQuery(this).data('value'));
|
|
159
162
|
});
|
|
160
163
|
});
|
|
161
164
|
|
|
162
|
-
window.RecordSelect = new Object();
|
|
163
|
-
RecordSelect.document_loaded = false;
|
|
164
|
-
|
|
165
165
|
RecordSelect.from_attributes = function(item) {
|
|
166
166
|
if (item.prop('disabled')) return;
|
|
167
167
|
var rs_class = RecordSelect[item.attr('data-rs-type')];
|
|
@@ -292,7 +292,7 @@
|
|
|
292
292
|
this.container.css('left', offset.left);
|
|
293
293
|
this.container.css('top', '');
|
|
294
294
|
this.container.css('bottom', '');
|
|
295
|
-
if (this.above ||
|
|
295
|
+
if (this.above || this.fixed && top + height > window_height) {
|
|
296
296
|
this.container.css('bottom', window_height - offset.top);
|
|
297
297
|
} else {
|
|
298
298
|
var below_space = window_height-(top-scroll), above_space = offset.top - scroll, position;
|
|
@@ -302,34 +302,18 @@
|
|
|
302
302
|
} else position = 'top';
|
|
303
303
|
if (position == 'top') this.container.css('top', top);
|
|
304
304
|
else {
|
|
305
|
-
var bottom = document_height - offset.top,
|
|
305
|
+
var bottom = document_height - offset.top,
|
|
306
|
+
body_height = this.body_static ? window_height : jQuery(document.body).height();
|
|
306
307
|
if (body_height < document_height) bottom -= document_height - body_height;
|
|
307
308
|
this.container.css('bottom', bottom);
|
|
308
309
|
}
|
|
309
310
|
}
|
|
310
|
-
|
|
311
|
-
if (this._use_iframe_mask()) {
|
|
312
|
-
this.container.after('<iframe src="javascript:false;" class="record-select-mask" />');
|
|
313
|
-
var mask = this.container.next('iframe');
|
|
314
|
-
mask.css('left', this.container.css('left'))
|
|
315
|
-
.css('top', this.container.css('top'));
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
if (this._use_iframe_mask()) {
|
|
319
|
-
var dimensions = this.container.children().first();
|
|
320
|
-
mask.css('width', dimensions.css('width'))
|
|
321
|
-
.css('height', dimensions.css('height'));
|
|
322
|
-
}
|
|
323
311
|
},
|
|
324
312
|
|
|
325
313
|
/**
|
|
326
314
|
* closes the recordselect by emptying the container
|
|
327
315
|
*/
|
|
328
316
|
close: function() {
|
|
329
|
-
if (this._use_iframe_mask()) {
|
|
330
|
-
this.container.next('iframe').remove();
|
|
331
|
-
}
|
|
332
|
-
|
|
333
317
|
this.container.hide();
|
|
334
318
|
// hopefully by using remove() instead of innerHTML we won't leak memory
|
|
335
319
|
this.container.children().remove();
|
|
@@ -421,10 +405,6 @@
|
|
|
421
405
|
if (this.onkeydown) {
|
|
422
406
|
text_field.keydown(jQuery.proxy(this, "onkeydown"));
|
|
423
407
|
}
|
|
424
|
-
},
|
|
425
|
-
|
|
426
|
-
_use_iframe_mask: function() {
|
|
427
|
-
return this.container.insertAdjacentHTML ? true : false;
|
|
428
408
|
}
|
|
429
409
|
});
|
|
430
410
|
|
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: 4.0.
|
|
4
|
+
version: 4.0.11
|
|
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: 2026-
|
|
13
|
+
date: 2026-03-03 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: bundler
|