active_scaffold_vho 3.0.27 → 3.0.28
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +31 -33
- data/active_scaffold_vho.gemspec +1 -1
- data/frontends/default/javascripts/jquery/active_scaffold.js +61 -54
- data/frontends/default/stylesheets/stylesheet.css +4 -5
- data/frontends/default/views/_list_record_columns.html.erb +0 -1
- data/lib/active_scaffold/actions/list.rb +2 -3
- data/lib/active_scaffold/actions/nested.rb +1 -1
- data/lib/active_scaffold/bridges/date_picker/public/javascripts/date_picker_bridge.js +2 -2
- data/lib/active_scaffold/bridges/tiny_mce/public/javascripts/jquery/tiny_mce_bridge.js +3 -4
- data/lib/active_scaffold/helpers/association_helpers.rb +2 -2
- data/lib/active_scaffold/version.rb +1 -1
- metadata +29 -32
- data/frontends/default/views/_list_pagination_links.html.erb +0 -9
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
active_scaffold_vho (3.0.
|
4
|
+
active_scaffold_vho (3.0.28)
|
5
5
|
kaminari
|
6
6
|
rails (~> 3.0.0)
|
7
7
|
|
@@ -9,38 +9,38 @@ GEM
|
|
9
9
|
remote: http://rubygems.org/
|
10
10
|
specs:
|
11
11
|
abstract (1.0.0)
|
12
|
-
actionmailer (3.0.
|
13
|
-
actionpack (= 3.0.
|
12
|
+
actionmailer (3.0.9)
|
13
|
+
actionpack (= 3.0.9)
|
14
14
|
mail (~> 2.2.19)
|
15
|
-
actionpack (3.0.
|
16
|
-
activemodel (= 3.0.
|
17
|
-
activesupport (= 3.0.
|
15
|
+
actionpack (3.0.9)
|
16
|
+
activemodel (= 3.0.9)
|
17
|
+
activesupport (= 3.0.9)
|
18
18
|
builder (~> 2.1.2)
|
19
19
|
erubis (~> 2.6.6)
|
20
20
|
i18n (~> 0.5.0)
|
21
|
-
rack (~> 1.2.
|
21
|
+
rack (~> 1.2.1)
|
22
22
|
rack-mount (~> 0.6.14)
|
23
23
|
rack-test (~> 0.5.7)
|
24
24
|
tzinfo (~> 0.3.23)
|
25
|
-
activemodel (3.0.
|
26
|
-
activesupport (= 3.0.
|
25
|
+
activemodel (3.0.9)
|
26
|
+
activesupport (= 3.0.9)
|
27
27
|
builder (~> 2.1.2)
|
28
28
|
i18n (~> 0.5.0)
|
29
|
-
activerecord (3.0.
|
30
|
-
activemodel (= 3.0.
|
31
|
-
activesupport (= 3.0.
|
29
|
+
activerecord (3.0.9)
|
30
|
+
activemodel (= 3.0.9)
|
31
|
+
activesupport (= 3.0.9)
|
32
32
|
arel (~> 2.0.10)
|
33
33
|
tzinfo (~> 0.3.23)
|
34
|
-
activeresource (3.0.
|
35
|
-
activemodel (= 3.0.
|
36
|
-
activesupport (= 3.0.
|
37
|
-
activesupport (3.0.
|
34
|
+
activeresource (3.0.9)
|
35
|
+
activemodel (= 3.0.9)
|
36
|
+
activesupport (= 3.0.9)
|
37
|
+
activesupport (3.0.9)
|
38
38
|
arel (2.0.10)
|
39
39
|
builder (2.1.2)
|
40
40
|
erubis (2.6.6)
|
41
41
|
abstract (>= 1.0.0)
|
42
42
|
i18n (0.5.0)
|
43
|
-
json (1.7.
|
43
|
+
json (1.7.6)
|
44
44
|
kaminari (0.14.1)
|
45
45
|
actionpack (>= 3.0.0)
|
46
46
|
activesupport (>= 3.0.0)
|
@@ -51,26 +51,26 @@ GEM
|
|
51
51
|
treetop (~> 1.4.8)
|
52
52
|
mime-types (1.19)
|
53
53
|
polyglot (0.3.3)
|
54
|
-
rack (1.2.
|
54
|
+
rack (1.2.7)
|
55
55
|
rack-mount (0.6.14)
|
56
56
|
rack (>= 1.0.0)
|
57
57
|
rack-test (0.5.7)
|
58
58
|
rack (>= 1.0)
|
59
|
-
rails (3.0.
|
60
|
-
actionmailer (= 3.0.
|
61
|
-
actionpack (= 3.0.
|
62
|
-
activerecord (= 3.0.
|
63
|
-
activeresource (= 3.0.
|
64
|
-
activesupport (= 3.0.
|
59
|
+
rails (3.0.9)
|
60
|
+
actionmailer (= 3.0.9)
|
61
|
+
actionpack (= 3.0.9)
|
62
|
+
activerecord (= 3.0.9)
|
63
|
+
activeresource (= 3.0.9)
|
64
|
+
activesupport (= 3.0.9)
|
65
65
|
bundler (~> 1.0)
|
66
|
-
railties (= 3.0.
|
67
|
-
railties (3.0.
|
68
|
-
actionpack (= 3.0.
|
69
|
-
activesupport (= 3.0.
|
66
|
+
railties (= 3.0.9)
|
67
|
+
railties (3.0.9)
|
68
|
+
actionpack (= 3.0.9)
|
69
|
+
activesupport (= 3.0.9)
|
70
70
|
rake (>= 0.8.7)
|
71
71
|
rdoc (~> 3.4)
|
72
72
|
thor (~> 0.14.4)
|
73
|
-
rake (0.
|
73
|
+
rake (10.0.3)
|
74
74
|
rcov (0.9.9)
|
75
75
|
rdoc (3.12)
|
76
76
|
json (~> 1.4)
|
@@ -79,15 +79,13 @@ GEM
|
|
79
79
|
treetop (1.4.12)
|
80
80
|
polyglot
|
81
81
|
polyglot (>= 0.3.1)
|
82
|
-
tzinfo (0.3.
|
82
|
+
tzinfo (0.3.35)
|
83
83
|
|
84
84
|
PLATFORMS
|
85
85
|
ruby
|
86
86
|
|
87
87
|
DEPENDENCIES
|
88
88
|
active_scaffold_vho!
|
89
|
-
bundler (
|
90
|
-
kaminari
|
91
|
-
rails (~> 3.0.0)
|
89
|
+
bundler (>= 1.0.0)
|
92
90
|
rcov
|
93
91
|
shoulda
|
data/active_scaffold_vho.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
|
|
23
23
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
24
24
|
|
25
25
|
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
26
|
-
s.add_development_dependency(%q<bundler>, ["
|
26
|
+
s.add_development_dependency(%q<bundler>, [">= 1.0.0"])
|
27
27
|
s.add_development_dependency(%q<rcov>, [">= 0"])
|
28
28
|
|
29
29
|
s.add_runtime_dependency(%q<rails>, ["~> 3.0.0"])
|
@@ -1,5 +1,5 @@
|
|
1
1
|
$(document).ready(function() {
|
2
|
-
$(
|
2
|
+
$(document).on('ajax:before', 'form.as_form', function(event) {
|
3
3
|
var as_form = $(this).closest("form");
|
4
4
|
$(this).find('.association-record-new').each(function(index) {
|
5
5
|
var record_action = 'empty';
|
@@ -12,7 +12,7 @@ $(document).ready(function() {
|
|
12
12
|
return true;
|
13
13
|
});
|
14
14
|
|
15
|
-
$(
|
15
|
+
$(document).on('ajax:beforeSend', 'form.as_form', function(event) {
|
16
16
|
var as_form = $(this).closest("form");
|
17
17
|
if (as_form && as_form.attr('data-loading') == 'true') {
|
18
18
|
ActiveScaffold.disable_form(as_form);
|
@@ -20,26 +20,26 @@ $(document).ready(function() {
|
|
20
20
|
return true;
|
21
21
|
});
|
22
22
|
|
23
|
-
$(
|
23
|
+
$(document).on('ajax:complete', 'form.as_form', function(event) {
|
24
24
|
var as_form = $(this).closest("form");
|
25
25
|
if (as_form && as_form.attr('data-loading') == 'true') {
|
26
26
|
ActiveScaffold.enable_form(as_form);
|
27
27
|
}
|
28
28
|
});
|
29
|
-
$(
|
29
|
+
$(document).on('ajax:failure', 'form.as_form', function(event) {
|
30
30
|
var as_div = $(this).closest("div.active-scaffold");
|
31
31
|
if (as_div) {
|
32
32
|
ActiveScaffold.report_500_response(as_div)
|
33
33
|
}
|
34
34
|
});
|
35
|
-
$('form.as_form.as_remote_upload'
|
35
|
+
$(document).on('submit', 'form.as_form.as_remote_upload', function(event) {
|
36
36
|
var as_form = $(this).closest("form");
|
37
37
|
if (as_form && as_form.attr('data-loading') == 'true') {
|
38
38
|
setTimeout("ActiveScaffold.disable_form('" + as_form.attr('id') + "')", 10);
|
39
39
|
}
|
40
40
|
return true;
|
41
41
|
});
|
42
|
-
$(
|
42
|
+
$(document).on('ajax:before', 'a.as_action', function(event) {
|
43
43
|
var action_link = ActiveScaffold.ActionLink.get($(this));
|
44
44
|
if (action_link) {
|
45
45
|
if (action_link.is_disabled()) {
|
@@ -62,7 +62,7 @@ $(document).ready(function() {
|
|
62
62
|
}
|
63
63
|
return true;
|
64
64
|
});
|
65
|
-
$(
|
65
|
+
$(document).on('ajax:beforeSend', 'a.as_action', function(event, xhr, settings) {
|
66
66
|
xhr.setRequestHeader('accept', '*/*;q=0.5, ' + settings.accepts.script);
|
67
67
|
var action_link = ActiveScaffold.ActionLink.get($(this));
|
68
68
|
if (action_link && action_link.position) {
|
@@ -71,7 +71,7 @@ $(document).ready(function() {
|
|
71
71
|
}
|
72
72
|
return true;
|
73
73
|
});
|
74
|
-
$(
|
74
|
+
$(document).on('ajax:success', 'a.as_action', function(event, response) {
|
75
75
|
var action_link = ActiveScaffold.ActionLink.get($(this));
|
76
76
|
if (action_link) {
|
77
77
|
if (action_link.position) {
|
@@ -84,14 +84,14 @@ $(document).ready(function() {
|
|
84
84
|
}
|
85
85
|
return true;
|
86
86
|
});
|
87
|
-
$(
|
87
|
+
$(document).on('ajax:complete', 'a.as_action', function(event) {
|
88
88
|
var action_link = ActiveScaffold.ActionLink.get($(this));
|
89
89
|
if (action_link) {
|
90
90
|
if (action_link.loading_indicator) action_link.loading_indicator.css('visibility','hidden');
|
91
91
|
}
|
92
92
|
return true;
|
93
93
|
});
|
94
|
-
$(
|
94
|
+
$(document).on('ajax:failure', 'a.as_action', function(event) {
|
95
95
|
var action_link = ActiveScaffold.ActionLink.get($(this));
|
96
96
|
if (action_link) {
|
97
97
|
ActiveScaffold.report_500_response(action_link.scaffold_id());
|
@@ -99,7 +99,7 @@ $(document).ready(function() {
|
|
99
99
|
}
|
100
100
|
return true;
|
101
101
|
});
|
102
|
-
$(
|
102
|
+
$(document).on('ajax:before', 'a.as_cancel', function(event) {
|
103
103
|
var as_cancel = $(this);
|
104
104
|
var action_link = ActiveScaffold.find_action_link(as_cancel);
|
105
105
|
|
@@ -117,7 +117,7 @@ $(document).ready(function() {
|
|
117
117
|
}
|
118
118
|
return true;
|
119
119
|
});
|
120
|
-
$(
|
120
|
+
$(document).on('ajax:beforeSend', 'a.as_cancel', function(event, xhr, settings) {
|
121
121
|
var as_cancel = $(this);
|
122
122
|
var action_link = ActiveScaffold.find_action_link(as_cancel);
|
123
123
|
var refresh_data = as_cancel.attr('data-refresh');
|
@@ -128,7 +128,7 @@ $(document).ready(function() {
|
|
128
128
|
}
|
129
129
|
return true;
|
130
130
|
});
|
131
|
-
$(
|
131
|
+
$(document).on('ajax:success', 'a.as_cancel', function(event, response) {
|
132
132
|
var action_link = ActiveScaffold.find_action_link($(this));
|
133
133
|
|
134
134
|
if (action_link) {
|
@@ -140,26 +140,26 @@ $(document).ready(function() {
|
|
140
140
|
}
|
141
141
|
return true;
|
142
142
|
});
|
143
|
-
$(
|
143
|
+
$(document).on('ajax:failure', 'a.as_cancel', function(event) {
|
144
144
|
var action_link = ActiveScaffold.find_action_link($(this));
|
145
145
|
if (action_link) {
|
146
146
|
ActiveScaffold.report_500_response(action_link.scaffold_id());
|
147
147
|
}
|
148
148
|
return true;
|
149
149
|
});
|
150
|
-
$(
|
150
|
+
$(document).on('ajax:before', 'a.as_sort', function(event) {
|
151
151
|
var as_sort = $(this);
|
152
152
|
var history_controller_id = as_sort.attr('data-page-history');
|
153
153
|
if (history_controller_id) addActiveScaffoldPageToHistory(as_sort.attr('href'), history_controller_id);
|
154
154
|
as_sort.closest('th').addClass('loading');
|
155
155
|
return true;
|
156
156
|
});
|
157
|
-
$(
|
157
|
+
$(document).on('ajax:failure', 'a.as_sort', function(event) {
|
158
158
|
var as_scaffold = $(this).closest('.active-scaffold');
|
159
159
|
ActiveScaffold.report_500_response(as_scaffold);
|
160
160
|
return true;
|
161
161
|
});
|
162
|
-
$('div.active-scaffold-footer .pagination a'
|
162
|
+
$(document).on('ajax:before','div.active-scaffold-footer .pagination a', function(event) {
|
163
163
|
var as_paginate = $(this);
|
164
164
|
var loading_indicator = as_paginate.closest('.pagination').find('img.loading-indicator').first();
|
165
165
|
var history_controller_id = as_paginate.attr('data-page-history');
|
@@ -174,16 +174,16 @@ $(document).ready(function() {
|
|
174
174
|
loading_indicator.css('visibility','visible');
|
175
175
|
return true;
|
176
176
|
});
|
177
|
-
$('div.active-scaffold-footer .pagination a'
|
177
|
+
$(document).on('ajax:failure', 'div.active-scaffold-footer .pagination a', function(event) {
|
178
178
|
var as_scaffold = $(this).closest('.active-scaffold');
|
179
179
|
ActiveScaffold.report_500_response(as_scaffold);
|
180
180
|
return true;
|
181
181
|
});
|
182
|
-
$('div.active-scaffold-footer .pagination a'
|
182
|
+
$(document).on('ajax:complete', 'div.active-scaffold-footer .pagination a', function(event) {
|
183
183
|
$(this).prevAll('img.loading-indicator').css('visibility','hidden');
|
184
184
|
return true;
|
185
185
|
});
|
186
|
-
$(
|
186
|
+
$(document).on('ajax:before', 'a.as_add_existing', function(event) {
|
187
187
|
var selected_id = $(this).prev().val();
|
188
188
|
if (selected_id) {
|
189
189
|
var url = $(this).attr('href').replace('--ID--', $(this).prev().val());
|
@@ -195,14 +195,14 @@ $(document).ready(function() {
|
|
195
195
|
}
|
196
196
|
|
197
197
|
});
|
198
|
-
$(
|
198
|
+
$(document).on('click', 'a.as_destroy_existing', function(event) {
|
199
199
|
var associated_record = $(this).closest('tr.association-record');
|
200
200
|
ActiveScaffold.delete_subform_record(associated_record);
|
201
201
|
event.stopPropagation();
|
202
202
|
return false;
|
203
203
|
});
|
204
204
|
|
205
|
-
$('input.update_form, textarea.update_form, select.update_form'
|
205
|
+
$(document).on('change', 'input.update_form, textarea.update_form, select.update_form', function(event) {
|
206
206
|
var element = $(this);
|
207
207
|
var as_form = element.closest('form.as_form');
|
208
208
|
var params = null;
|
@@ -240,12 +240,12 @@ $(document).ready(function() {
|
|
240
240
|
return true;
|
241
241
|
});
|
242
242
|
|
243
|
-
$(
|
243
|
+
$(document).on('change', 'select.as_search_range_option', function(event) {
|
244
244
|
ActiveScaffold[$(this).val() == 'BETWEEN' ? 'show' : 'hide']($(this).parent().find('.as_search_range_between'));
|
245
245
|
return true;
|
246
246
|
});
|
247
247
|
|
248
|
-
$(
|
248
|
+
$(document).on('change', 'select.as_search_range_option', function(event) {
|
249
249
|
var element = $(this);
|
250
250
|
ActiveScaffold[!(element.val() == 'PAST' || element.val() == 'FUTURE' || element.val() == 'RANGE') ? 'show' : 'hide'](element.attr('id').replace(/_opt/, '_numeric'));
|
251
251
|
ActiveScaffold[(element.val() == 'PAST' || element.val() == 'FUTURE') ? 'show' : 'hide'](element.attr('id').replace(/_opt/, '_trend'));
|
@@ -253,18 +253,18 @@ $(document).ready(function() {
|
|
253
253
|
return true;
|
254
254
|
});
|
255
255
|
|
256
|
-
$(
|
256
|
+
$(document).on('change', 'select.as_update_date_operator', function(event) {
|
257
257
|
ActiveScaffold[$(this).val() == 'REPLACE' ? 'show' : 'hide']($(this).next());
|
258
258
|
ActiveScaffold[$(this).val() == 'REPLACE' ? 'hide' : 'show']($(this).next().next());
|
259
259
|
return true;
|
260
260
|
});
|
261
261
|
|
262
|
-
$('a[data-popup]'
|
262
|
+
$(document).on('click', 'a[data-popup]', function(e) {
|
263
263
|
window.open($(this).attr('href'));
|
264
264
|
e.preventDefault();
|
265
265
|
});
|
266
266
|
|
267
|
-
$(
|
267
|
+
$(document).on("click", '.hover_click', function(event) {
|
268
268
|
var element = $(this);
|
269
269
|
var ul_element = element.children('ul').first();
|
270
270
|
if (ul_element.is(':visible')) {
|
@@ -274,19 +274,19 @@ $(document).ready(function() {
|
|
274
274
|
}
|
275
275
|
return false;
|
276
276
|
});
|
277
|
-
$('.hover_click a.as_action'
|
277
|
+
$(document).on('click', '.hover_click a.as_action', function(event) {
|
278
278
|
var element = $(this).closest('.hover_click');
|
279
279
|
if (element) {
|
280
280
|
element.find('ul').hide();
|
281
281
|
}
|
282
282
|
return true;
|
283
283
|
});
|
284
|
-
$(
|
284
|
+
$(document).on('as:form_loaded', 'form.as_form', function(event) {
|
285
285
|
var as_form = $(this).closest("form");
|
286
286
|
ActiveScaffold.focus_first_element_of_form(as_form);
|
287
287
|
return true;
|
288
288
|
});
|
289
|
-
$('li.horizontal-sub-form'
|
289
|
+
$(document).on('as:form_element_loaded', 'li.horizontal-sub-form', function(event) {
|
290
290
|
$(this).find('a.as_associated_form_link').each(function(index) {
|
291
291
|
ActiveScaffold.show($(this));
|
292
292
|
//Show select Box for add_existing as well
|
@@ -296,7 +296,7 @@ $(document).ready(function() {
|
|
296
296
|
})
|
297
297
|
return true;
|
298
298
|
});
|
299
|
-
$(
|
299
|
+
$(document).on('as:form_element_loaded', 'li.sub-form', function(event) {
|
300
300
|
$(this).find('.association-record-new').each(function(index) {
|
301
301
|
$(this).find('input, textarea, select').each(function(index) {
|
302
302
|
$(this).data('value_was', $(this).val());
|
@@ -304,17 +304,17 @@ $(document).ready(function() {
|
|
304
304
|
})
|
305
305
|
return true;
|
306
306
|
});
|
307
|
-
$('span.mark_heading, span.in_place_editor_field[data-ie_mode="inline_checkbox"]'
|
307
|
+
$(document).on('click', 'span.mark_heading, span.in_place_editor_field[data-ie_mode="inline_checkbox"]', function(event) {
|
308
308
|
ActiveScaffold.process_checkbox_inplace_edit($(this).find('input:checkbox'), ActiveScaffold.inplace_edit_options($(this)));
|
309
309
|
return true;
|
310
310
|
});
|
311
|
-
$(
|
311
|
+
$(document).on('as:list_row_loaded', 'tr.record', function(event) {
|
312
312
|
$(this).closest("tr").find('td > span.in_place_editor_field[data-ie_mode!="inline_checkbox"]').each(function(index) {
|
313
313
|
ActiveScaffold.create_inplace_editor($(this));
|
314
314
|
});
|
315
315
|
return true;
|
316
316
|
});
|
317
|
-
$('tr.inline-adapter-autoopen'
|
317
|
+
$(document).on('as:list_row_loaded', 'tr.inline-adapter-autoopen', function(event) {
|
318
318
|
var actionlink_controllers = $(event.target).attr('data-actionlink-controllers');
|
319
319
|
if(actionlink_controllers) {
|
320
320
|
actionlink_controllers = actionlink_controllers.split('::');
|
@@ -332,12 +332,12 @@ $(document).ready(function() {
|
|
332
332
|
}
|
333
333
|
return true;
|
334
334
|
});
|
335
|
-
$(
|
335
|
+
$(document).on('ajax:before', 'form.as_form', function(event) {
|
336
336
|
var as_form = $(this).closest("form");
|
337
337
|
$(this).trigger('as:form_submit');
|
338
338
|
return true;
|
339
339
|
});
|
340
|
-
$('form.as_form[data-remote!="true"]'
|
340
|
+
$(document).on('submit', 'form.as_form[data-remote!="true"]', function(event) {
|
341
341
|
var as_form = $(this).closest("form");
|
342
342
|
$(this).trigger('as:form_submit');
|
343
343
|
return true;
|
@@ -551,11 +551,12 @@ var ActiveScaffold = {
|
|
551
551
|
if (typeof(element) == 'string') element = '#' + element;
|
552
552
|
element = $(element);
|
553
553
|
var new_element = null;
|
554
|
+
var new_fragment = $(html);
|
554
555
|
if((typeof(disable_event_trigger) == 'boolean') && disable_event_trigger == true) {
|
555
|
-
new_element =
|
556
|
+
new_element = new_fragment.replaceAll(element).first();
|
556
557
|
} else {
|
557
558
|
ActiveScaffold.trigger_unload_events(element.find('[data-as_load]').andSelf());
|
558
|
-
new_element =
|
559
|
+
new_element = new_fragment.replaceAll(element).first();
|
559
560
|
ActiveScaffold.trigger_load_events(new_element.find('[data-as_load]').andSelf());
|
560
561
|
}
|
561
562
|
return new_element;
|
@@ -595,8 +596,8 @@ var ActiveScaffold = {
|
|
595
596
|
as_form = $(as_form)
|
596
597
|
var loading_indicator = $('#' + as_form.attr('id').replace(/-form$/, '-loading-indicator'));
|
597
598
|
if (loading_indicator) loading_indicator.css('visibility','visible');
|
598
|
-
$('input[type=submit]', as_form).
|
599
|
-
$("input:enabled,select:enabled,textarea:enabled", as_form).
|
599
|
+
$('input[type=submit]', as_form).prop('disabled', true);
|
600
|
+
$("input:enabled,select:enabled,textarea:enabled", as_form).prop('disabled', true);
|
600
601
|
},
|
601
602
|
|
602
603
|
enable_form: function(as_form) {
|
@@ -604,13 +605,16 @@ var ActiveScaffold = {
|
|
604
605
|
as_form = $(as_form)
|
605
606
|
var loading_indicator = $('#' + as_form.attr('id').replace(/-form$/, '-loading-indicator'));
|
606
607
|
if (loading_indicator) loading_indicator.css('visibility','hidden');
|
607
|
-
$('input[type=submit]', as_form).
|
608
|
-
$("input:disabled,select:disabled,textarea:disabled", as_form).
|
608
|
+
$('input[type=submit]', as_form).prop('disabled', false);
|
609
|
+
$("input:disabled,select:disabled,textarea:disabled", as_form).prop('disabled', false);
|
609
610
|
},
|
610
611
|
|
611
612
|
focus_first_element_of_form: function(form_element) {
|
612
|
-
if (typeof(form_element) == 'string')
|
613
|
-
|
613
|
+
if (typeof(form_element) == 'string') {
|
614
|
+
form_element = '#' + form_element;
|
615
|
+
form_element = $(form_element);
|
616
|
+
}
|
617
|
+
form_element.find("input[type!=hidden]:first").focus();
|
614
618
|
},
|
615
619
|
|
616
620
|
create_record_row: function(active_scaffold_id, html, options) {
|
@@ -697,10 +701,10 @@ var ActiveScaffold = {
|
|
697
701
|
data: options['params'],
|
698
702
|
dataType: options.ajax_data_type,
|
699
703
|
after: function(request){
|
700
|
-
checkbox.
|
704
|
+
checkbox.prop('disabled', true);
|
701
705
|
},
|
702
706
|
complete: function(request){
|
703
|
-
checkbox.
|
707
|
+
checkbox.prop('disabled', false);
|
704
708
|
}
|
705
709
|
});
|
706
710
|
},
|
@@ -722,7 +726,7 @@ var ActiveScaffold = {
|
|
722
726
|
highlight: function(element) {
|
723
727
|
if (typeof(element) == 'string') element = $('#' + element);
|
724
728
|
if (typeof(element.effect) == 'function') {
|
725
|
-
element.effect("highlight", {},
|
729
|
+
element.effect("highlight", {}, 1000);
|
726
730
|
}
|
727
731
|
},
|
728
732
|
|
@@ -1171,12 +1175,12 @@ ActiveScaffold.ActionLink.Record = ActiveScaffold.ActionLink.Abstract.extend({
|
|
1171
1175
|
|
1172
1176
|
if (this.position == 'after') {
|
1173
1177
|
this.target.after(this.wrap_with_adapter_html(content, should_refresh_data));
|
1174
|
-
ActiveScaffold.trigger_load_events(this.target.next().find('[data-as_load]'));
|
1178
|
+
ActiveScaffold.trigger_load_events(this.target.next().find('.records').first().find('> [data-as_load]'));
|
1175
1179
|
this.set_adapter(this.target.next());
|
1176
1180
|
}
|
1177
1181
|
else if (this.position == 'before') {
|
1178
1182
|
this.target.before(this.wrap_with_adapter_html(content, should_refresh_data));
|
1179
|
-
ActiveScaffold.trigger_load_events(this.target.prev().find('[data-as_load]'));
|
1183
|
+
ActiveScaffold.trigger_load_events(this.target.prev().find('.records').first().find('> [data-as_load]'));
|
1180
1184
|
this.set_adapter(this.target.prev());
|
1181
1185
|
}
|
1182
1186
|
else {
|
@@ -1211,14 +1215,17 @@ ActiveScaffold.ActionLink.Record = ActiveScaffold.ActionLink.Abstract.extend({
|
|
1211
1215
|
|
1212
1216
|
set_opened: function() {
|
1213
1217
|
var should_refresh_data = (typeof(this.refresh_ur)== 'undefined');
|
1218
|
+
var new_adapter = null;
|
1214
1219
|
if (this.position == 'after') {
|
1215
|
-
|
1216
|
-
|
1220
|
+
new_adapter = this.target.next();
|
1221
|
+
} else if (this.position == 'before') {
|
1222
|
+
new_adapter = this.target.prev();
|
1217
1223
|
}
|
1218
|
-
|
1219
|
-
|
1220
|
-
|
1224
|
+
if (!new_adapter.hasClass('as_adapter')) {
|
1225
|
+
new_adapter = ActiveScaffold.replace(new_adapter, this.wrap_with_adapter_html(new_adapter.children(':first-child').html(), should_refresh_data), true);
|
1226
|
+
ActiveScaffold.trigger_load_events(new_adapter.find('.records').first().find('> [data-as_load]'));
|
1221
1227
|
}
|
1228
|
+
this.set_adapter(new_adapter);
|
1222
1229
|
this.disable();
|
1223
1230
|
}
|
1224
1231
|
});
|
@@ -561,9 +561,9 @@ padding-left: 5px;
|
|
561
561
|
border-left: solid 1px #ccc;
|
562
562
|
}
|
563
563
|
|
564
|
-
.active-scaffold-footer .
|
565
|
-
margin-right:
|
566
|
-
padding-right:
|
564
|
+
.active-scaffold-footer .prev {
|
565
|
+
margin-right: 3px;
|
566
|
+
padding-right: 3px;
|
567
567
|
border-right: solid 1px #ccc;
|
568
568
|
}
|
569
569
|
|
@@ -993,7 +993,6 @@ font-size: 100%;
|
|
993
993
|
}
|
994
994
|
|
995
995
|
.active-scaffold-found {
|
996
|
-
float:left;
|
997
996
|
}
|
998
997
|
|
999
998
|
.as_touch a.inline-adapter-close {
|
@@ -1002,7 +1001,7 @@ height: 27px;
|
|
1002
1001
|
background: url(../../../images/active_scaffold/default/close_touch.png) 0 0 no-repeat;
|
1003
1002
|
}
|
1004
1003
|
|
1005
|
-
.as_touch .
|
1004
|
+
.as_touch .active-scaffold-pagination a {
|
1006
1005
|
font-size: 20px;
|
1007
1006
|
padding: 3px 10px;
|
1008
1007
|
}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
<% columns.each do |column| %>
|
2
2
|
<% authorized = record.authorized_for_read_column?(column.name) -%>
|
3
3
|
<% column_value = authorized ? get_column_value(record, column) : active_scaffold_config.list.empty_field_text -%>
|
4
|
-
|
5
4
|
<td class="<%= column_class(column, column_value, record) %>" >
|
6
5
|
<%= authorized ? render_list_column(column_value, column, record) : column_value %>
|
7
6
|
</td>
|
@@ -33,8 +33,7 @@ module ActiveScaffold::Actions
|
|
33
33
|
end
|
34
34
|
end
|
35
35
|
def list_respond_to_js
|
36
|
-
if params
|
37
|
-
params.delete(:embedded)
|
36
|
+
if params.delete(:embedded)
|
38
37
|
render(:partial => 'list_with_header')
|
39
38
|
else
|
40
39
|
render :action => 'list.js'
|
@@ -65,7 +64,7 @@ module ActiveScaffold::Actions
|
|
65
64
|
|
66
65
|
options = { :sorting => active_scaffold_config.list.user.sorting,
|
67
66
|
:count_includes => active_scaffold_config.list.user.count_includes }
|
68
|
-
paginate = (params[:format].nil?) ? (accepts? :html, :js) : ['html', 'js'].include?(params[:format])
|
67
|
+
paginate = (params[:format].nil?) ? (accepts? :html, :js) : ['html', 'js'].include?(params[:format].to_s)
|
69
68
|
if paginate
|
70
69
|
options.merge!({
|
71
70
|
:per_page => active_scaffold_config.list.user.per_page,
|
@@ -83,7 +83,7 @@ module ActiveScaffold::Actions
|
|
83
83
|
|
84
84
|
def beginning_of_chain
|
85
85
|
if nested? && nested.association && nested.association.collection?
|
86
|
-
nested.parent_scope.send(nested.association.name)
|
86
|
+
nested.parent_scope.send(nested.association.name).where("")
|
87
87
|
elsif nested? && nested.scope
|
88
88
|
nested.parent_scope.send(nested.scope)
|
89
89
|
else
|
@@ -1,5 +1,5 @@
|
|
1
1
|
$(document).ready(function() {
|
2
|
-
$('form.as_form, form.inplace_form'
|
2
|
+
$(document).on('as:form_loaded', 'form.as_form, form.inplace_form', function(event) {
|
3
3
|
var as_form = $(this).closest("form");
|
4
4
|
as_form.find('input.datetime_picker').each(function(index) {
|
5
5
|
var date_picker = $(this);
|
@@ -16,7 +16,7 @@ $(document).ready(function() {
|
|
16
16
|
});
|
17
17
|
return true;
|
18
18
|
});
|
19
|
-
$('form.as_form, form.inplace_form'
|
19
|
+
$(document).on('as:form_unloaded', 'form.as_form, form.inplace_form', function(event) {
|
20
20
|
var as_form = $(this).closest("form");
|
21
21
|
as_form.find('input.datetime_picker').each(function(index) {
|
22
22
|
var date_picker = $(this);
|
@@ -1,19 +1,18 @@
|
|
1
|
-
$('form.as_form, form.inplace_form'
|
1
|
+
$(document).on('as:form_loaded', 'form.as_form, form.inplace_form', function(event) {
|
2
2
|
var as_form = $(this).closest("form");
|
3
3
|
as_form.find('textarea.as_mceEditor').each(function(index, elem) {
|
4
4
|
tinyMCE.execCommand('mceAddControl', false, $(elem).attr('id'));
|
5
5
|
});
|
6
6
|
return true;
|
7
7
|
});
|
8
|
-
$('form.as_form, form.inplace_form'
|
8
|
+
$(document).on('as:form_submit', 'form.as_form, form.inplace_form', function(event) {
|
9
9
|
var as_form = $(this).closest("form");
|
10
10
|
if (as_form.has('textarea.as_mceEditor').length > 0) {
|
11
11
|
tinyMCE.triggerSave();
|
12
12
|
}
|
13
13
|
return true;
|
14
14
|
});
|
15
|
-
|
16
|
-
$('form.as_form, form.inplace_form').live('as:form_unloaded', function(event) {
|
15
|
+
$(document).on('as:form_unloaded', 'form.as_form, form.inplace_form', function(event) {
|
17
16
|
var as_form = $(this).closest("form");
|
18
17
|
as_form.find('textarea.as_mceEditor').each(function(index, elem) {
|
19
18
|
tinyMCE.execCommand('mceRemoveControl', false, $(elem).attr('id'));
|
@@ -3,11 +3,11 @@ module ActiveScaffold
|
|
3
3
|
module AssociationHelpers
|
4
4
|
# Provides a way to honor the :conditions on an association while searching the association's klass
|
5
5
|
def association_options_find(association, conditions = nil)
|
6
|
-
association.klass.where(conditions).where(association.options[:conditions])
|
6
|
+
association.klass.where(conditions).where(association.options[:conditions])
|
7
7
|
end
|
8
8
|
|
9
9
|
def association_options_count(association, conditions = nil)
|
10
|
-
|
10
|
+
association_options_find(association, conditions).count
|
11
11
|
end
|
12
12
|
|
13
13
|
# returns options for the given association as a collection of [id, label] pairs intended for the +options_for_select+ helper.
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_scaffold_vho
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 63
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 3
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 3.0.
|
9
|
+
- 28
|
10
|
+
version: 3.0.28
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Many, see README
|
@@ -15,14 +15,10 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
19
|
-
default_executable:
|
18
|
+
date: 2013-01-28 00:00:00 Z
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
22
|
-
|
23
|
-
name: shoulda
|
24
|
-
prerelease: false
|
25
|
-
version_requirements: &id001 !ruby/object:Gem::Requirement
|
21
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
26
22
|
none: false
|
27
23
|
requirements:
|
28
24
|
- - ">="
|
@@ -31,15 +27,15 @@ dependencies:
|
|
31
27
|
segments:
|
32
28
|
- 0
|
33
29
|
version: "0"
|
34
|
-
requirement: *id001
|
35
|
-
- !ruby/object:Gem::Dependency
|
36
30
|
type: :development
|
37
|
-
name:
|
31
|
+
name: shoulda
|
32
|
+
version_requirements: *id001
|
38
33
|
prerelease: false
|
39
|
-
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
40
36
|
none: false
|
41
37
|
requirements:
|
42
|
-
- -
|
38
|
+
- - ">="
|
43
39
|
- !ruby/object:Gem::Version
|
44
40
|
hash: 23
|
45
41
|
segments:
|
@@ -47,12 +43,12 @@ dependencies:
|
|
47
43
|
- 0
|
48
44
|
- 0
|
49
45
|
version: 1.0.0
|
50
|
-
requirement: *id002
|
51
|
-
- !ruby/object:Gem::Dependency
|
52
46
|
type: :development
|
53
|
-
name:
|
47
|
+
name: bundler
|
48
|
+
version_requirements: *id002
|
54
49
|
prerelease: false
|
55
|
-
|
50
|
+
- !ruby/object:Gem::Dependency
|
51
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
56
52
|
none: false
|
57
53
|
requirements:
|
58
54
|
- - ">="
|
@@ -61,12 +57,12 @@ dependencies:
|
|
61
57
|
segments:
|
62
58
|
- 0
|
63
59
|
version: "0"
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
name: rails
|
60
|
+
type: :development
|
61
|
+
name: rcov
|
62
|
+
version_requirements: *id003
|
68
63
|
prerelease: false
|
69
|
-
|
64
|
+
- !ruby/object:Gem::Dependency
|
65
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
70
66
|
none: false
|
71
67
|
requirements:
|
72
68
|
- - ~>
|
@@ -77,12 +73,12 @@ dependencies:
|
|
77
73
|
- 0
|
78
74
|
- 0
|
79
75
|
version: 3.0.0
|
80
|
-
requirement: *id004
|
81
|
-
- !ruby/object:Gem::Dependency
|
82
76
|
type: :runtime
|
83
|
-
name:
|
77
|
+
name: rails
|
78
|
+
version_requirements: *id004
|
84
79
|
prerelease: false
|
85
|
-
|
80
|
+
- !ruby/object:Gem::Dependency
|
81
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
86
82
|
none: false
|
87
83
|
requirements:
|
88
84
|
- - ">="
|
@@ -91,7 +87,10 @@ dependencies:
|
|
91
87
|
segments:
|
92
88
|
- 0
|
93
89
|
version: "0"
|
94
|
-
|
90
|
+
type: :runtime
|
91
|
+
name: kaminari
|
92
|
+
version_requirements: *id005
|
93
|
+
prerelease: false
|
95
94
|
description: Save time and headaches, and create a more easily maintainable set of pages, with ActiveScaffold. ActiveScaffold handles all your CRUD (create, read, update, delete) user interface needs, leaving you more time to focus on more challenging (and interesting!) problems.
|
96
95
|
email: activescaffold@googlegroups.com
|
97
96
|
executables: []
|
@@ -153,7 +152,6 @@ files:
|
|
153
152
|
- frontends/default/views/_list_header.html.erb
|
154
153
|
- frontends/default/views/_list_messages.html.erb
|
155
154
|
- frontends/default/views/_list_pagination.html.erb
|
156
|
-
- frontends/default/views/_list_pagination_links.html.erb
|
157
155
|
- frontends/default/views/_list_record.html.erb
|
158
156
|
- frontends/default/views/_list_record_columns.html.erb
|
159
157
|
- frontends/default/views/_list_with_header.html.erb
|
@@ -387,7 +385,6 @@ files:
|
|
387
385
|
- test/run_all.rb
|
388
386
|
- test/test_helper.rb
|
389
387
|
- uninstall.rb
|
390
|
-
has_rdoc: true
|
391
388
|
homepage: http://github.com/vhochstein/active_scaffold
|
392
389
|
licenses:
|
393
390
|
- MIT
|
@@ -417,7 +414,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
417
414
|
requirements: []
|
418
415
|
|
419
416
|
rubyforge_project:
|
420
|
-
rubygems_version: 1.
|
417
|
+
rubygems_version: 1.8.17
|
421
418
|
signing_key:
|
422
419
|
specification_version: 3
|
423
420
|
summary: Rails 3 Version of activescaffold supporting prototype and jquery
|
@@ -1,9 +0,0 @@
|
|
1
|
-
<% unless current_page.nil? -%>
|
2
|
-
<% url_options = params_for(:action => :index) -%>
|
3
|
-
<% options = {'data-page-history' => controller_id, :remote => true, :method => :get} -%>
|
4
|
-
|
5
|
-
<%= loading_indicator_tag :action => :pagination %>
|
6
|
-
<%= link_to as_(:previous), url_options.merge(:page => current_page.number - 1), options.merge(:class => "as_paginate previous") if current_page.prev? %>
|
7
|
-
<%= pagination_ajax_links current_page, url_options, options, active_scaffold_config.list.page_links_window %>
|
8
|
-
<%= link_to as_(:next), url_options.merge(:page => current_page.number + 1), options.merge(:class => "as_paginate next") if current_page.next? %>
|
9
|
-
<% end -%>
|