active_scaffold 3.6.6 → 3.6.8
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/CHANGELOG.rdoc +8 -0
- data/app/assets/javascripts/active_scaffold.js.erb +1 -0
- data/app/assets/javascripts/jquery/active_scaffold.js +4 -44
- data/app/assets/javascripts/jquery/date_picker_bridge.js.erb +1 -0
- data/lib/active_scaffold/bridges/date_picker.rb +4 -0
- data/lib/active_scaffold/version.rb +1 -1
- data/vendor/assets/javascripts/jquery-ui-timepicker-addon.js +2289 -1880
- data/vendor/assets/javascripts/jquery.ba-throttle-debounce.js +252 -0
- data/vendor/assets/stylesheets/jquery-ui-timepicker-addon.css +30 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d63c8ce5c055421403fdf35bce2cc09fa4797ad8ccf282fd0ab96b80a254b56
|
4
|
+
data.tar.gz: af6eea7aa4e45b55bfafcdc1c2cedbd2e3880bf71af800fd2720a291fde329a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: edd5caa3ba54351a67da98599a5bf684eb1e6cdc573c951a5318d25cbb6f36fceabfb963f0a6e4c64a21320c75aecfcefb07c6f4f049fd4f49a585ff3e74c09c
|
7
|
+
data.tar.gz: 7a1a1ed5fb94ded3584468ccec6ec7321d781f0ae90efd767a6723c8ff5cd29b11a5f67620599e32a44becd5c6ec322835056c5f1baf1430802c132db16f42c9
|
data/CHANGELOG.rdoc
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
= 3.6.8
|
2
|
+
- Add depend_on available translations in app to data picker bridge JS
|
3
|
+
- Fix live search with rails-ujs
|
4
|
+
- Replace delayedObserver with $.debounce
|
5
|
+
|
6
|
+
= 3.6.7
|
7
|
+
- Upgrade jquery ui timepicker addon to 1.6.3
|
8
|
+
|
1
9
|
= 3.6.6
|
2
10
|
- Fix format string for timezone in jquery timepicker
|
3
11
|
|
@@ -354,6 +354,10 @@ jQuery(document).ready(function($) {
|
|
354
354
|
}
|
355
355
|
});
|
356
356
|
|
357
|
+
jQuery(document).on('input paste', 'form.search.live input[type=search]', $.debounce((ActiveScaffold.config.live_search_delay || 0.5) * 1000, function() {
|
358
|
+
jQuery(this).parent().find('[type=submit]').click();
|
359
|
+
}));
|
360
|
+
|
357
361
|
jQuery(document).on('turbolinks:before-visit', function() {
|
358
362
|
if (history.state.active_scaffold) {
|
359
363
|
history.replaceState({turbolinks: true, url: document.location.href}, '', document.location.href);
|
@@ -459,44 +463,6 @@ jQuery(document).on('turbolinks:load', function($) {
|
|
459
463
|
};
|
460
464
|
})();
|
461
465
|
|
462
|
-
/*
|
463
|
-
$ delayed observer
|
464
|
-
(c) 2007 - Maxime Haineault (max@centdessin.com)
|
465
|
-
|
466
|
-
Special thanks to Stephen Goguen & Tane Piper.
|
467
|
-
|
468
|
-
Slight modifications by Elliot Winkler
|
469
|
-
*/
|
470
|
-
|
471
|
-
if (typeof(jQuery.fn.delayedObserver) === 'undefined') {
|
472
|
-
(function($){
|
473
|
-
$.extend($.fn, {
|
474
|
-
delayedObserver: function(callback, delay, options){
|
475
|
-
return this.each(function(){
|
476
|
-
var el = $(this);
|
477
|
-
var op = options || {};
|
478
|
-
el.data('oldval', el.val())
|
479
|
-
.data('delay', delay === 0 ? delay : (delay || 0.5))
|
480
|
-
.data('condition', op.condition || function() { return ($(this).data('oldval') == $(this).val()); })
|
481
|
-
.data('callback', callback)
|
482
|
-
[(op.event||'keyup')](function(){
|
483
|
-
if (el.data('condition').apply(el)) { return; }
|
484
|
-
else {
|
485
|
-
if (el.data('timer')) { clearTimeout(el.data('timer')); }
|
486
|
-
el.data('timer', setTimeout(function(){
|
487
|
-
var callback = el.data('callback')
|
488
|
-
if (callback) callback.apply(el);
|
489
|
-
}, el.data('delay') * 1000));
|
490
|
-
el.data('oldval', el.val());
|
491
|
-
}
|
492
|
-
});
|
493
|
-
});
|
494
|
-
}
|
495
|
-
});
|
496
|
-
})(jQuery);
|
497
|
-
};
|
498
|
-
|
499
|
-
|
500
466
|
/*
|
501
467
|
* Simple utility methods
|
502
468
|
*/
|
@@ -507,7 +473,6 @@ var ActiveScaffold = {
|
|
507
473
|
/* setup some elements on page/form load */
|
508
474
|
ActiveScaffold.load_embedded(container);
|
509
475
|
ActiveScaffold.enable_js_form_buttons(container);
|
510
|
-
ActiveScaffold.live_search(container);
|
511
476
|
ActiveScaffold.auto_paginate(container);
|
512
477
|
ActiveScaffold.draggable_lists('.draggable-lists', container);
|
513
478
|
ActiveScaffold.sliders(container);
|
@@ -530,11 +495,6 @@ var ActiveScaffold = {
|
|
530
495
|
}
|
531
496
|
ActiveScaffold.add_to_history(document.location.href, data, true);
|
532
497
|
},
|
533
|
-
live_search: function(element) {
|
534
|
-
jQuery('form.search.live input[type=search]', element).delayedObserver(function() {
|
535
|
-
jQuery(this).parent().trigger("submit");
|
536
|
-
}, ActiveScaffold.config.live_search_delay || 0.5);
|
537
|
-
},
|
538
498
|
auto_paginate: function(element) {
|
539
499
|
var paginate_link = jQuery('.active-scaffold-pagination.auto-paginate a:first', element);
|
540
500
|
if (paginate_link.length) {
|
@@ -1,4 +1,5 @@
|
|
1
1
|
<%# encoding: utf-8 %>
|
2
|
+
<% I18n.available_locales.map { |locale| Rails.root.join("config/locales/#{locale}.yml") }.select(&:exist?).each { |path| depend_on path.to_s } %>
|
2
3
|
<%= ActiveScaffold::Bridges[:date_picker].localization %>
|
3
4
|
Object.getPrototypeOf(jQuery.datepicker)._attachDatepicker_without_inlineSettings = Object.getPrototypeOf(jQuery.datepicker)._attachDatepicker;
|
4
5
|
jQuery.extend(Object.getPrototypeOf(jQuery.datepicker), {
|
@@ -13,6 +13,10 @@ module ActiveScaffold::Bridges
|
|
13
13
|
Jquery::Rails.const_defined?('JQUERY_UI_VERSION') || Jquery.const_defined?('Ui') if Object.const_defined?('Jquery')
|
14
14
|
end
|
15
15
|
|
16
|
+
def self.stylesheets
|
17
|
+
'jquery-ui-timepicker-addon'
|
18
|
+
end
|
19
|
+
|
16
20
|
def self.localization
|
17
21
|
"jQuery(function($){
|
18
22
|
if (typeof($.datepicker) === 'object') {
|