active_scaffold_vho 3.2.0 → 3.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +44 -45
- data/app/assets/javascripts/jquery/jquery.editinplace.js +29 -23
- data/frontends/default/views/_on_post_form_action.js.erb +45 -0
- data/frontends/default/views/_on_put_form_action.js.erb +31 -0
- data/frontends/default/views/on_create.js.erb +1 -45
- data/frontends/default/views/on_update.js.erb +1 -31
- data/lib/active_scaffold/version.rb +1 -1
- metadata +14 -12
data/Gemfile.lock
CHANGED
@@ -1,82 +1,81 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
active_scaffold_vho (3.1
|
4
|
+
active_scaffold_vho (3.2.1)
|
5
5
|
kaminari
|
6
6
|
rails (>= 3.1.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: http://rubygems.org/
|
10
10
|
specs:
|
11
|
-
actionmailer (3.2.
|
12
|
-
actionpack (= 3.2.
|
13
|
-
mail (~> 2.
|
14
|
-
actionpack (3.2.
|
15
|
-
activemodel (= 3.2.
|
16
|
-
activesupport (= 3.2.
|
11
|
+
actionmailer (3.2.16)
|
12
|
+
actionpack (= 3.2.16)
|
13
|
+
mail (~> 2.5.4)
|
14
|
+
actionpack (3.2.16)
|
15
|
+
activemodel (= 3.2.16)
|
16
|
+
activesupport (= 3.2.16)
|
17
17
|
builder (~> 3.0.0)
|
18
18
|
erubis (~> 2.7.0)
|
19
19
|
journey (~> 1.0.4)
|
20
|
-
rack (~> 1.4.
|
20
|
+
rack (~> 1.4.5)
|
21
21
|
rack-cache (~> 1.2)
|
22
22
|
rack-test (~> 0.6.1)
|
23
23
|
sprockets (~> 2.2.1)
|
24
|
-
activemodel (3.2.
|
25
|
-
activesupport (= 3.2.
|
24
|
+
activemodel (3.2.16)
|
25
|
+
activesupport (= 3.2.16)
|
26
26
|
builder (~> 3.0.0)
|
27
|
-
activerecord (3.2.
|
28
|
-
activemodel (= 3.2.
|
29
|
-
activesupport (= 3.2.
|
27
|
+
activerecord (3.2.16)
|
28
|
+
activemodel (= 3.2.16)
|
29
|
+
activesupport (= 3.2.16)
|
30
30
|
arel (~> 3.0.2)
|
31
31
|
tzinfo (~> 0.3.29)
|
32
|
-
activeresource (3.2.
|
33
|
-
activemodel (= 3.2.
|
34
|
-
activesupport (= 3.2.
|
35
|
-
activesupport (3.2.
|
36
|
-
i18n (~> 0.6)
|
32
|
+
activeresource (3.2.16)
|
33
|
+
activemodel (= 3.2.16)
|
34
|
+
activesupport (= 3.2.16)
|
35
|
+
activesupport (3.2.16)
|
36
|
+
i18n (~> 0.6, >= 0.6.4)
|
37
37
|
multi_json (~> 1.0)
|
38
|
-
arel (3.0.
|
38
|
+
arel (3.0.3)
|
39
39
|
builder (3.0.4)
|
40
40
|
erubis (2.7.0)
|
41
|
-
hike (1.2.
|
42
|
-
i18n (0.6.
|
41
|
+
hike (1.2.3)
|
42
|
+
i18n (0.6.9)
|
43
43
|
journey (1.0.4)
|
44
|
-
json (1.8.
|
44
|
+
json (1.8.1)
|
45
45
|
kaminari (0.14.1)
|
46
46
|
actionpack (>= 3.0.0)
|
47
47
|
activesupport (>= 3.0.0)
|
48
|
-
mail (2.
|
49
|
-
i18n (>= 0.4.0)
|
48
|
+
mail (2.5.4)
|
50
49
|
mime-types (~> 1.16)
|
51
50
|
treetop (~> 1.4.8)
|
52
|
-
mime-types (1.25)
|
53
|
-
multi_json (1.
|
54
|
-
polyglot (0.3.
|
55
|
-
rack (1.4.
|
51
|
+
mime-types (1.25.1)
|
52
|
+
multi_json (1.9.2)
|
53
|
+
polyglot (0.3.4)
|
54
|
+
rack (1.4.5)
|
56
55
|
rack-cache (1.2)
|
57
56
|
rack (>= 0.4)
|
58
|
-
rack-ssl (1.3.
|
57
|
+
rack-ssl (1.3.4)
|
59
58
|
rack
|
60
59
|
rack-test (0.6.2)
|
61
60
|
rack (>= 1.0)
|
62
|
-
rails (3.2.
|
63
|
-
actionmailer (= 3.2.
|
64
|
-
actionpack (= 3.2.
|
65
|
-
activerecord (= 3.2.
|
66
|
-
activeresource (= 3.2.
|
67
|
-
activesupport (= 3.2.
|
61
|
+
rails (3.2.16)
|
62
|
+
actionmailer (= 3.2.16)
|
63
|
+
actionpack (= 3.2.16)
|
64
|
+
activerecord (= 3.2.16)
|
65
|
+
activeresource (= 3.2.16)
|
66
|
+
activesupport (= 3.2.16)
|
68
67
|
bundler (~> 1.0)
|
69
|
-
railties (= 3.2.
|
70
|
-
railties (3.2.
|
71
|
-
actionpack (= 3.2.
|
72
|
-
activesupport (= 3.2.
|
68
|
+
railties (= 3.2.16)
|
69
|
+
railties (3.2.16)
|
70
|
+
actionpack (= 3.2.16)
|
71
|
+
activesupport (= 3.2.16)
|
73
72
|
rack-ssl (~> 1.3.2)
|
74
73
|
rake (>= 0.8.7)
|
75
74
|
rdoc (~> 3.4)
|
76
75
|
thor (>= 0.14.6, < 2.0)
|
77
|
-
rake (10.1
|
76
|
+
rake (10.3.1)
|
78
77
|
rcov (0.9.9)
|
79
|
-
rdoc (3.12)
|
78
|
+
rdoc (3.12.2)
|
80
79
|
json (~> 1.4)
|
81
80
|
shoulda (2.11.3)
|
82
81
|
sprockets (2.2.2)
|
@@ -84,12 +83,12 @@ GEM
|
|
84
83
|
multi_json (~> 1.0)
|
85
84
|
rack (~> 1.0)
|
86
85
|
tilt (~> 1.1, != 1.3.0)
|
87
|
-
thor (0.
|
88
|
-
tilt (1.
|
89
|
-
treetop (1.4.
|
86
|
+
thor (0.19.1)
|
87
|
+
tilt (1.4.1)
|
88
|
+
treetop (1.4.15)
|
90
89
|
polyglot
|
91
90
|
polyglot (>= 0.3.1)
|
92
|
-
tzinfo (0.3.
|
91
|
+
tzinfo (0.3.39)
|
93
92
|
|
94
93
|
PLATFORMS
|
95
94
|
ruby
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
A jQuery edit in place plugin
|
4
4
|
|
5
|
-
Version 2.
|
5
|
+
Version 2.3.0
|
6
6
|
|
7
7
|
Authors:
|
8
8
|
Dave Hauenstein
|
@@ -11,7 +11,7 @@ Authors:
|
|
11
11
|
Project home:
|
12
12
|
http://code.google.com/p/jquery-in-place-editor/
|
13
13
|
|
14
|
-
Patches with tests welcomed! For guidance see the tests
|
14
|
+
Patches with tests welcomed! For guidance see the tests </spec/unit/>. To submit, attach them to the bug tracker.
|
15
15
|
|
16
16
|
License:
|
17
17
|
This source file is subject to the BSD license bundled with this package.
|
@@ -179,14 +179,15 @@ $.extend(InlineEditor.prototype, {
|
|
179
179
|
if ( ! this.shouldOpenEditor(anEvent))
|
180
180
|
return;
|
181
181
|
|
182
|
-
this.workAroundFirefoxBlurBug();
|
183
182
|
this.disconnectOpeningEvents();
|
184
183
|
this.removeHoverEffect();
|
185
184
|
this.removeInsertedDefaultTextIfNeccessary();
|
186
185
|
this.saveOriginalValue();
|
187
186
|
this.markEditorAsActive();
|
188
187
|
this.replaceContentWithEditor();
|
189
|
-
this.
|
188
|
+
this.setInitialValue();
|
189
|
+
this.workAroundMissingBlurBug();
|
190
|
+
this.connectClosingEventsToEditor();
|
190
191
|
this.triggerDelegateCall('didOpenEditInPlace');
|
191
192
|
},
|
192
193
|
|
@@ -239,20 +240,16 @@ $.extend(InlineEditor.prototype, {
|
|
239
240
|
this.dom.text(aValue);
|
240
241
|
},
|
241
242
|
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
//
|
247
|
-
|
248
|
-
// Firefox will forget to send a blur event to an input element when another one is
|
249
|
-
// created and selected programmatically. This means that if another inline editor is
|
250
|
-
// opened, existing inline editors will _not_ close if they are configured to submit when blurred.
|
251
|
-
// This is actually the first time I've written browser specific code for a browser different than IE! Wohoo!
|
243
|
+
workAroundMissingBlurBug: function() {
|
244
|
+
// Strangely, all browser will forget to send a blur event to an input element
|
245
|
+
// when another one is created and selected programmatically. (at least under some circumstances).
|
246
|
+
// This means that if another inline editor is opened, existing inline editors will _not_ close
|
247
|
+
// if they are configured to submit when blurred.
|
252
248
|
|
253
249
|
// Using parents() instead document as base to workaround the fact that in the unittests
|
254
250
|
// the editor is not a child of window.document but of a document fragment
|
255
|
-
this.dom.
|
251
|
+
var ourInput = this.dom.find(':input');
|
252
|
+
this.dom.parents(':last').find('.editInPlace-active :input').not(ourInput).blur();
|
256
253
|
},
|
257
254
|
|
258
255
|
replaceContentWithEditor: function() {
|
@@ -288,6 +285,17 @@ $.extend(InlineEditor.prototype, {
|
|
288
285
|
editor.val(this.triggerDelegateCall('willOpenEditInPlace', this.originalValue));
|
289
286
|
return editor;
|
290
287
|
},
|
288
|
+
|
289
|
+
setInitialValue: function() {
|
290
|
+
var initialValue = this.triggerDelegateCall('willOpenEditInPlace', this.originalValue);
|
291
|
+
var editor = this.dom.find(':input');
|
292
|
+
editor.val(initialValue);
|
293
|
+
|
294
|
+
// Workaround for select fields which don't contain the original value.
|
295
|
+
// Somehow the browsers don't like to select the instructional choice (disabled) in that case
|
296
|
+
if (editor.val() !== initialValue)
|
297
|
+
editor.val(''); // selects instructional choice
|
298
|
+
},
|
291
299
|
|
292
300
|
createRemoteGeneratedEditor: function () {
|
293
301
|
this.dom.html(this.settings.loading_text);
|
@@ -371,9 +379,8 @@ $.extend(InlineEditor.prototype, {
|
|
371
379
|
var optionsArray = this.settings.select_options;
|
372
380
|
if ( ! $.isArray(optionsArray))
|
373
381
|
optionsArray = optionsArray.split(',');
|
374
|
-
|
382
|
+
|
375
383
|
for (var i=0; i<optionsArray.length; i++) {
|
376
|
-
|
377
384
|
var currentTextAndValue = optionsArray[i];
|
378
385
|
if ( ! $.isArray(currentTextAndValue))
|
379
386
|
currentTextAndValue = currentTextAndValue.split(':');
|
@@ -385,12 +392,11 @@ $.extend(InlineEditor.prototype, {
|
|
385
392
|
var option = $('<option ' + selected + ' ></option>').val(value).text(text);
|
386
393
|
editor.append(option);
|
387
394
|
}
|
388
|
-
return editor;
|
389
395
|
|
396
|
+
return editor;
|
390
397
|
},
|
391
398
|
|
392
|
-
|
393
|
-
connectOpeningEventsToEditor: function() {
|
399
|
+
connectClosingEventsToEditor: function() {
|
394
400
|
var that = this;
|
395
401
|
function cancelEditorAction(anEvent) {
|
396
402
|
that.handleCancelEditor(anEvent);
|
@@ -415,8 +421,8 @@ $.extend(InlineEditor.prototype, {
|
|
415
421
|
else
|
416
422
|
form.find(".inplace_field").blur(cancelEditorAction);
|
417
423
|
|
418
|
-
// workaround for firefox bug where it won't submit on enter if no button is shown
|
419
|
-
if ($.browser.mozilla)
|
424
|
+
// workaround for msie & firefox bug where it won't submit on enter if no button is shown
|
425
|
+
if ($.browser.mozilla || $.browser.msie)
|
420
426
|
this.bindSubmitOnEnterInInput();
|
421
427
|
}
|
422
428
|
|
@@ -609,7 +615,7 @@ $.extend(InlineEditor.prototype, {
|
|
609
615
|
if ( ! aCallback)
|
610
616
|
return; // callback wasn't specified after all
|
611
617
|
|
612
|
-
var callbackArguments = Array.prototype.
|
618
|
+
var callbackArguments = Array.prototype.slice.call(arguments, 1);
|
613
619
|
return aCallback.apply(this.dom[0], callbackArguments);
|
614
620
|
},
|
615
621
|
|
@@ -0,0 +1,45 @@
|
|
1
|
+
try {
|
2
|
+
<% form_selector = "#{element_form_id(:action => form_action)}"
|
3
|
+
insert_at ||= :top %>
|
4
|
+
var action_link = ActiveScaffold.find_action_link('<%= form_selector%>');
|
5
|
+
action_link.update_flash_messages('<%=escape_javascript(render(:partial => 'messages').strip)%>');
|
6
|
+
<% if controller.send :successful? %>
|
7
|
+
<% if render_parent? && controller.respond_to?(:render_component_into_view) %>
|
8
|
+
<% parent_rendered = controller.send(:render_component_into_view, render_parent_options) %>
|
9
|
+
<% if nested_singular_association? %>
|
10
|
+
action_link.close('<%= escape_javascript(parent_rendered) %>');
|
11
|
+
<% else %>
|
12
|
+
<% if render_parent_action == :row %>
|
13
|
+
ActiveScaffold.create_record_row(action_link.scaffold(),'<%= escape_javascript(parent_rendered) %>', <%= {:insert_at => insert_at}.to_json.html_safe %>);
|
14
|
+
<% elsif render_parent_action == :index %>
|
15
|
+
<%= parent_rendered %>
|
16
|
+
<% end %>
|
17
|
+
action_link.close();
|
18
|
+
<% end %>
|
19
|
+
<%#page.call 'ActiveScaffold.replace', active_scaffold_calculations_id, render(:partial => 'list_calculations') if active_scaffold_config.list.columns.any? {|c| c.calculation?}%>
|
20
|
+
<% elsif (active_scaffold_config.send(form_action).refresh_list) %>
|
21
|
+
ActiveScaffold.replace_html('<%= active_scaffold_content_id%>', '<%= escape_javascript(render(:partial => 'list', :layout => false)) %>');
|
22
|
+
<% elsif params[:parent_controller].nil? %>
|
23
|
+
<% new_row = render :partial => 'list_record', :locals => {:record => @record} %>
|
24
|
+
ActiveScaffold.create_record_row(action_link.scaffold(),'<%=escape_javascript(new_row)%>', <%={:insert_at => insert_at}.to_json.html_safe%>);
|
25
|
+
<% if active_scaffold_config.list.columns.any? {|c| c.calculation?}%>
|
26
|
+
ActiveScaffold.replace('<%=active_scaffold_calculations_id%>', '<%=escape_javascript(render(:partial => 'list_calculations'))%>');
|
27
|
+
<% end %>
|
28
|
+
<% end %>
|
29
|
+
|
30
|
+
<% unless render_parent? %>
|
31
|
+
<% if (active_scaffold_config.send(form_action).persistent) %>
|
32
|
+
action_link.reload();
|
33
|
+
<% else %>
|
34
|
+
action_link.close();
|
35
|
+
<% end %>
|
36
|
+
<% if (active_scaffold_config.send(form_action).edit_after_create) %>
|
37
|
+
var link = $('<%=action_link_id 'edit', @record.id%>');
|
38
|
+
if (link) (function() { link.action_link.open() }).defer();
|
39
|
+
<% end %>
|
40
|
+
<% end %>
|
41
|
+
<% else %>
|
42
|
+
ActiveScaffold.replace('<%=form_selector%>','<%=escape_javascript(render(:partial => 'create_form', :locals => {:xhr => true, :form_action => form_action}))%>');
|
43
|
+
ActiveScaffold.scroll_to('<%=form_selector%>');
|
44
|
+
<% end %>
|
45
|
+
} catch (e) { alert('RJS error:\n\n' + e.toString());}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
try {
|
2
|
+
<% form_selector = "#{element_form_id(:action => form_action)}" %>
|
3
|
+
var action_link = ActiveScaffold.find_action_link('<%= form_selector%>');
|
4
|
+
action_link.update_flash_messages('<%=escape_javascript(render(:partial => 'messages').strip)%>');
|
5
|
+
<% if controller.send :successful? %>
|
6
|
+
<% if render_parent? && controller.respond_to?(:render_component_into_view) %>
|
7
|
+
<% parent_rendered = controller.send(:render_component_into_view, render_parent_options) %>
|
8
|
+
<% if nested_singular_association? %>
|
9
|
+
action_link.close('<%= escape_javascript(parent_rendered) %>');
|
10
|
+
<% else %>
|
11
|
+
<% if render_parent_action == :row %>
|
12
|
+
action_link.close('<%= escape_javascript(parent_rendered) %>');
|
13
|
+
<% elsif render_parent_action == :index %>
|
14
|
+
<%= parent_rendered %>
|
15
|
+
<% end %>
|
16
|
+
<% end %>
|
17
|
+
<%#page.call 'ActiveScaffold.replace', active_scaffold_calculations_id, render(:partial => 'list_calculations') if active_scaffold_config.list.columns.any? {|c| c.calculation?}%>
|
18
|
+
<% elsif update_refresh_list? %>
|
19
|
+
ActiveScaffold.replace_html('<%= active_scaffold_content_id%>', '<%= escape_javascript(render(:partial => 'list', :layout => false))%>');
|
20
|
+
<% else %>
|
21
|
+
<% updated_row = render :partial => 'list_record', :locals => {:record => @record}%>
|
22
|
+
action_link.close('<%= escape_javascript(updated_row)%>');
|
23
|
+
<% if active_scaffold_config.list.columns.any? {|c| c.calculation?}%>
|
24
|
+
ActiveScaffold.replace('<%=active_scaffold_calculations_id%>', '<%=escape_javascript(render(:partial => 'list_calculations'))%>');
|
25
|
+
<% end %>
|
26
|
+
<% end %>
|
27
|
+
<% else %>
|
28
|
+
ActiveScaffold.replace('<%=form_selector%>','<%=escape_javascript(render(:partial => "update_form", :locals => {:xhr => true, :form_action => form_action}))%>');
|
29
|
+
ActiveScaffold.scroll_to('<%=form_selector%>');
|
30
|
+
<% end %>
|
31
|
+
} catch (e) { alert('RJS error:\n\n' + e.toString());}
|
@@ -1,45 +1 @@
|
|
1
|
-
|
2
|
-
<% form_selector = "#{element_form_id(:action => :create)}"
|
3
|
-
insert_at ||= :top %>
|
4
|
-
var action_link = ActiveScaffold.find_action_link('<%= form_selector%>');
|
5
|
-
action_link.update_flash_messages('<%=escape_javascript(render(:partial => 'messages').strip)%>');
|
6
|
-
<% if controller.send :successful? %>
|
7
|
-
<% if render_parent? && controller.respond_to?(:render_component_into_view) %>
|
8
|
-
<% parent_rendered = controller.send(:render_component_into_view, render_parent_options) %>
|
9
|
-
<% if nested_singular_association? %>
|
10
|
-
action_link.close('<%= escape_javascript(parent_rendered) %>');
|
11
|
-
<% else %>
|
12
|
-
<% if render_parent_action == :row %>
|
13
|
-
ActiveScaffold.create_record_row(action_link.scaffold(),'<%= escape_javascript(parent_rendered) %>', <%= {:insert_at => insert_at}.to_json.html_safe %>);
|
14
|
-
<% elsif render_parent_action == :index %>
|
15
|
-
<%= parent_rendered %>
|
16
|
-
<% end %>
|
17
|
-
action_link.close();
|
18
|
-
<% end %>
|
19
|
-
<%#page.call 'ActiveScaffold.replace', active_scaffold_calculations_id, render(:partial => 'list_calculations') if active_scaffold_config.list.columns.any? {|c| c.calculation?}%>
|
20
|
-
<% elsif (active_scaffold_config.create.refresh_list) %>
|
21
|
-
ActiveScaffold.replace_html('<%= active_scaffold_content_id%>', '<%= escape_javascript(render(:partial => 'list', :layout => false)) %>');
|
22
|
-
<% elsif params[:parent_controller].nil? %>
|
23
|
-
<% new_row = render :partial => 'list_record', :locals => {:record => @record} %>
|
24
|
-
ActiveScaffold.create_record_row(action_link.scaffold(),'<%=escape_javascript(new_row)%>', <%={:insert_at => insert_at}.to_json.html_safe%>);
|
25
|
-
<% if active_scaffold_config.list.columns.any? {|c| c.calculation?}%>
|
26
|
-
ActiveScaffold.replace('<%=active_scaffold_calculations_id%>', '<%=escape_javascript(render(:partial => 'list_calculations'))%>');
|
27
|
-
<% end %>
|
28
|
-
<% end %>
|
29
|
-
|
30
|
-
<% unless render_parent? %>
|
31
|
-
<% if (active_scaffold_config.create.persistent) %>
|
32
|
-
action_link.reload();
|
33
|
-
<% else %>
|
34
|
-
action_link.close();
|
35
|
-
<% end %>
|
36
|
-
<% if (active_scaffold_config.create.edit_after_create) %>
|
37
|
-
var link = $('<%=action_link_id 'edit', @record.id%>');
|
38
|
-
if (link) (function() { link.action_link.open() }).defer();
|
39
|
-
<% end %>
|
40
|
-
<% end %>
|
41
|
-
<% else %>
|
42
|
-
ActiveScaffold.replace('<%=form_selector%>','<%=escape_javascript(render(:partial => 'create_form', :locals => {:xhr => true}))%>');
|
43
|
-
ActiveScaffold.scroll_to('<%=form_selector%>');
|
44
|
-
<% end %>
|
45
|
-
} catch (e) { alert('RJS error:\n\n' + e.toString());}
|
1
|
+
<%= render :partial => 'on_post_form_action', formats: [:js], :locals => {:form_action => :create} %>
|
@@ -1,31 +1 @@
|
|
1
|
-
|
2
|
-
<% form_selector = "#{element_form_id(:action => :update)}" %>
|
3
|
-
var action_link = ActiveScaffold.find_action_link('<%= form_selector%>');
|
4
|
-
action_link.update_flash_messages('<%=escape_javascript(render(:partial => 'messages').strip)%>');
|
5
|
-
<% if controller.send :successful? %>
|
6
|
-
<% if render_parent? && controller.respond_to?(:render_component_into_view) %>
|
7
|
-
<% parent_rendered = controller.send(:render_component_into_view, render_parent_options) %>
|
8
|
-
<% if nested_singular_association? %>
|
9
|
-
action_link.close('<%= escape_javascript(parent_rendered) %>');
|
10
|
-
<% else %>
|
11
|
-
<% if render_parent_action == :row %>
|
12
|
-
action_link.close('<%= escape_javascript(parent_rendered) %>');
|
13
|
-
<% elsif render_parent_action == :index %>
|
14
|
-
<%= parent_rendered %>
|
15
|
-
<% end %>
|
16
|
-
<% end %>
|
17
|
-
<%#page.call 'ActiveScaffold.replace', active_scaffold_calculations_id, render(:partial => 'list_calculations') if active_scaffold_config.list.columns.any? {|c| c.calculation?}%>
|
18
|
-
<% elsif update_refresh_list? %>
|
19
|
-
ActiveScaffold.replace_html('<%= active_scaffold_content_id%>', '<%= escape_javascript(render(:partial => 'list', :layout => false))%>');
|
20
|
-
<% else %>
|
21
|
-
<% updated_row = render :partial => 'list_record', :locals => {:record => @record}%>
|
22
|
-
action_link.close('<%= escape_javascript(updated_row)%>');
|
23
|
-
<% if active_scaffold_config.list.columns.any? {|c| c.calculation?}%>
|
24
|
-
ActiveScaffold.replace('<%=active_scaffold_calculations_id%>', '<%=escape_javascript(render(:partial => 'list_calculations'))%>');
|
25
|
-
<% end %>
|
26
|
-
<% end %>
|
27
|
-
<% else %>
|
28
|
-
ActiveScaffold.replace('<%=form_selector%>','<%=escape_javascript(render(:partial => 'update_form', :locals => {:xhr => true}))%>');
|
29
|
-
ActiveScaffold.scroll_to('<%=form_selector%>');
|
30
|
-
<% end %>
|
31
|
-
} catch (e) { alert('RJS error:\n\n' + e.toString());}
|
1
|
+
<%= render :partial => 'on_put_form_action', formats: [:js], :locals => {:form_action => :update} %>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_scaffold_vho
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-04-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: shoulda
|
16
|
-
requirement: &
|
16
|
+
requirement: &20166240 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *20166240
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: bundler
|
27
|
-
requirement: &
|
27
|
+
requirement: &20165760 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 1.0.0
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *20165760
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rcov
|
38
|
-
requirement: &
|
38
|
+
requirement: &20165280 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *20165280
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rails
|
49
|
-
requirement: &
|
49
|
+
requirement: &20164800 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 3.1.0
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *20164800
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: kaminari
|
60
|
-
requirement: &
|
60
|
+
requirement: &20164420 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,7 +65,7 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *20164420
|
69
69
|
description: Save time and headaches, and create a more easily maintainable set of
|
70
70
|
pages, with ActiveScaffold. ActiveScaffold handles all your CRUD (create, read,
|
71
71
|
update, delete) user interface needs, leaving you more time to focus on more challenging
|
@@ -140,6 +140,8 @@ files:
|
|
140
140
|
- frontends/default/views/_list_record_columns.html.erb
|
141
141
|
- frontends/default/views/_list_with_header.html.erb
|
142
142
|
- frontends/default/views/_messages.html.erb
|
143
|
+
- frontends/default/views/_on_post_form_action.js.erb
|
144
|
+
- frontends/default/views/_on_put_form_action.js.erb
|
143
145
|
- frontends/default/views/_render_field.js.erb
|
144
146
|
- frontends/default/views/_row.html.erb
|
145
147
|
- frontends/default/views/_search.html.erb
|