active_scaffold 3.4.24 → 3.4.25
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +3 -0
- data/app/assets/javascripts/jquery/active_scaffold.js +14 -4
- data/lib/active_scaffold/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ee6cc12616f927c3500f0da84efc6ccbf7f60bf
|
4
|
+
data.tar.gz: c4f7d12b9993f732eab7632b61b37fa36b1ac5c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b1177b6f0c4875ef0353058e0187313f390420f940a2471b8139ad46e244f0f0daeae6fce320dc5e1e9b82abd9056fc7c7b6088606836a28603db76b98fcf34
|
7
|
+
data.tar.gz: ef249a6e53a32b40d7dbaa807d5611bf576e3950c76f0ee50d3465fd30e78d1c19f23c7fbd97f179a64ccfa4074d4c04a070efe9f2f932193d1c0da3d0098c53
|
data/CHANGELOG
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
- call focus_first_element after highlight and trigger element_created
|
2
|
+
- fix restoring focus to element which triggers update column
|
3
|
+
|
1
4
|
= 3.4.24
|
2
5
|
- allow to set :controller in active_scaffold_record_select_autocomplete parameter or active_scaffold_input_text_options
|
3
6
|
- fix keeping focus after update_columns when focus was changed to a field which is going to be updated
|
@@ -791,8 +791,8 @@ var ActiveScaffold = {
|
|
791
791
|
element.prepend(content);
|
792
792
|
}
|
793
793
|
}
|
794
|
-
ActiveScaffold.focus_first_element_of_form(content, '');
|
795
794
|
content.trigger('as:element_created');
|
795
|
+
ActiveScaffold.focus_first_element_of_form(content, '');
|
796
796
|
},
|
797
797
|
|
798
798
|
render_form_field: function(source, content, options) {
|
@@ -960,10 +960,20 @@ var ActiveScaffold = {
|
|
960
960
|
type: 'post',
|
961
961
|
beforeSend: function(xhr, settings) {
|
962
962
|
element.nextAll('img.loading-indicator').css('visibility','visible');
|
963
|
-
|
963
|
+
/* force to blur and save previous last_focus, because disable_form will trigger
|
964
|
+
* blur on focused element and we will not be able to restore focus later
|
965
|
+
*/
|
966
|
+
var last_focus = ActiveScaffold.last_focus;
|
967
|
+
if (last_focus) {
|
968
|
+
$(last_focus).blur();
|
969
|
+
ActiveScaffold.last_focus = last_focus;
|
970
|
+
}
|
971
|
+
//ActiveScaffold.disable_form(as_form); // not needed: called from on('ajax:beforeSend', 'form.as_form')
|
972
|
+
|
964
973
|
if ($.rails.fire(element, 'ajax:beforeSend', [xhr, settings])) {
|
965
974
|
element.trigger('ajax:send', xhr);
|
966
975
|
} else {
|
976
|
+
$(ActiveScaffold.last_focus).focus();
|
967
977
|
return false;
|
968
978
|
}
|
969
979
|
},
|
@@ -1232,8 +1242,8 @@ ActiveScaffold.ActionLink.Record = ActiveScaffold.ActionLink.Abstract.extend({
|
|
1232
1242
|
else {
|
1233
1243
|
return false;
|
1234
1244
|
}
|
1235
|
-
ActiveScaffold.focus_first_element_of_form(this.adapter);
|
1236
1245
|
ActiveScaffold.highlight(this.adapter.find('td'));
|
1246
|
+
ActiveScaffold.focus_first_element_of_form(this.adapter);
|
1237
1247
|
},
|
1238
1248
|
|
1239
1249
|
close: function(refreshed_content_or_reload) {
|
@@ -1300,7 +1310,7 @@ ActiveScaffold.ActionLink.Table = ActiveScaffold.ActionLink.Abstract.extend({
|
|
1300
1310
|
else {
|
1301
1311
|
throw 'Unknown position "' + this.position + '"'
|
1302
1312
|
}
|
1303
|
-
ActiveScaffold.focus_first_element_of_form(this.adapter);
|
1304
1313
|
ActiveScaffold.highlight(this.adapter.find('td').first().children());
|
1314
|
+
ActiveScaffold.focus_first_element_of_form(this.adapter);
|
1305
1315
|
}
|
1306
1316
|
});
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_scaffold
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.4.
|
4
|
+
version: 3.4.25
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Many, see README
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: brakeman
|