active_scaffold_vho 3.1.6 → 3.1.8
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/app/assets/javascripts/jquery/active_scaffold.js +18 -4
- data/app/assets/stylesheets/active_scaffold_core.css.erb +7 -7
- data/frontends/default/views/_messages.html.erb +1 -0
- data/lib/active_scaffold/actions/field_search.rb +6 -2
- data/lib/active_scaffold/actions/nested.rb +1 -1
- data/lib/active_scaffold/bridges/calendar_date_select/bridge.rb +1 -1
- data/lib/active_scaffold/bridges/date_picker/lib/datepicker_bridge.rb +3 -2
- data/lib/active_scaffold/bridges/file_column/bridge.rb +1 -1
- data/lib/active_scaffold/bridges/file_column/lib/as_file_column_bridge.rb +1 -1
- data/lib/active_scaffold/bridges/paperclip/bridge.rb +1 -1
- data/lib/active_scaffold/bridges/paperclip/lib/paperclip_bridge_helpers.rb +1 -1
- data/lib/active_scaffold/data_structures/column.rb +10 -1
- data/lib/active_scaffold/finder.rb +1 -0
- data/lib/active_scaffold/helpers/view_helpers.rb +6 -1
- data/lib/active_scaffold/locale/de.yml +2 -0
- data/lib/active_scaffold/version.rb +1 -1
- metadata +12 -15
data/Gemfile.lock
CHANGED
@@ -937,7 +937,9 @@ var ActiveScaffold = {
|
|
937
937
|
load_embedded_conrollers: function(){
|
938
938
|
$.each($('a.as_link_to_component'), function(index) {
|
939
939
|
var div_element = $(this).closest('div.active-scaffold-component');
|
940
|
-
div_element.load($(this).attr('href').append_params({embedded: true}))
|
940
|
+
div_element.load($(this).attr('href').append_params({embedded: true}), function() {
|
941
|
+
ActiveScaffold.trigger_load_events($(this).find('[data-as_load]'));
|
942
|
+
});
|
941
943
|
});
|
942
944
|
},
|
943
945
|
|
@@ -1176,12 +1178,20 @@ ActiveScaffold.ActionLink.Record = ActiveScaffold.ActionLink.Abstract.extend({
|
|
1176
1178
|
|
1177
1179
|
if (this.position == 'after') {
|
1178
1180
|
this.target.after(this.wrap_with_adapter_html(content, should_refresh_data));
|
1179
|
-
|
1181
|
+
if(this.action == 'index') {
|
1182
|
+
ActiveScaffold.trigger_load_events(this.target.next().find('.records').first().find('> [data-as_load]'));
|
1183
|
+
} else {
|
1184
|
+
ActiveScaffold.trigger_load_events(this.target.next().find('[data-as_load]'));
|
1185
|
+
}
|
1180
1186
|
this.set_adapter(this.target.next());
|
1181
1187
|
}
|
1182
1188
|
else if (this.position == 'before') {
|
1183
1189
|
this.target.before(this.wrap_with_adapter_html(content, should_refresh_data));
|
1184
|
-
|
1190
|
+
if (this.action == 'index') {
|
1191
|
+
ActiveScaffold.trigger_load_events(this.target.prev().find('.records').first().find('> [data-as_load]'));
|
1192
|
+
} else {
|
1193
|
+
ActiveScaffold.trigger_load_events(this.target.prev().find('[data-as_load]'));
|
1194
|
+
}
|
1185
1195
|
this.set_adapter(this.target.prev());
|
1186
1196
|
}
|
1187
1197
|
else {
|
@@ -1224,7 +1234,11 @@ ActiveScaffold.ActionLink.Record = ActiveScaffold.ActionLink.Abstract.extend({
|
|
1224
1234
|
}
|
1225
1235
|
if (!new_adapter.hasClass('as_adapter')) {
|
1226
1236
|
new_adapter = ActiveScaffold.replace(new_adapter, this.wrap_with_adapter_html(new_adapter.children(':first-child').html(), should_refresh_data), true);
|
1227
|
-
|
1237
|
+
if (this.action == 'index') {
|
1238
|
+
ActiveScaffold.trigger_load_events(new_adapter.find('.records').first().find('> [data-as_load]'));
|
1239
|
+
} else {
|
1240
|
+
ActiveScaffold.trigger_load_events(new_adapter.find('[data-as_load]'));
|
1241
|
+
}
|
1228
1242
|
}
|
1229
1243
|
this.set_adapter(new_adapter);
|
1230
1244
|
this.disable();
|
@@ -530,9 +530,10 @@ color: #ccc;
|
|
530
530
|
}
|
531
531
|
|
532
532
|
.active-scaffold-footer .pagination {
|
533
|
-
|
533
|
+
text-align: right;
|
534
534
|
white-space: nowrap;
|
535
535
|
margin-right: 5px;
|
536
|
+
font: bold 12px arial, sans-serif;
|
536
537
|
}
|
537
538
|
|
538
539
|
.blue-theme .active-scaffold-footer .active-scaffold-records {
|
@@ -543,8 +544,7 @@ margin-left: 5px;
|
|
543
544
|
text-decoration: none;
|
544
545
|
letter-spacing: 0;
|
545
546
|
padding: 0 2px;
|
546
|
-
margin: 0
|
547
|
-
font: bold 12px arial, sans-serif;
|
547
|
+
margin: 0;
|
548
548
|
}
|
549
549
|
|
550
550
|
.blue-theme .active-scaffold-footer a,
|
@@ -777,7 +777,7 @@ padding: 6px 0;
|
|
777
777
|
}
|
778
778
|
|
779
779
|
.active-scaffold li.form-element dd {
|
780
|
-
float:
|
780
|
+
float: none;
|
781
781
|
}
|
782
782
|
|
783
783
|
.active-scaffold li.form-element dd input[type="checkbox"] {
|
@@ -1002,9 +1002,9 @@ height: 27px;
|
|
1002
1002
|
background: url(<%= asset_data_uri 'close_touch.png' %>) 0 0 no-repeat;
|
1003
1003
|
}
|
1004
1004
|
|
1005
|
-
.as_touch .active-scaffold-pagination a {
|
1006
|
-
font-size: 20px;
|
1007
|
-
padding: 3px 10px;
|
1005
|
+
.as_touch .active-scaffold-footer .pagination, .as_touch .active-scaffold-footer .pagination a {
|
1006
|
+
font-size: 20px;
|
1007
|
+
padding: 3px 10px;
|
1008
1008
|
}
|
1009
1009
|
|
1010
1010
|
.as_touch .active-scaffold-header div.actions a {
|
@@ -43,12 +43,16 @@ module ActiveScaffold::Actions
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def do_search
|
46
|
-
|
46
|
+
prepare_search_conditions(search_params)
|
47
|
+
end
|
48
|
+
|
49
|
+
def prepare_search_conditions(params)
|
50
|
+
unless params.nil?
|
47
51
|
text_search = active_scaffold_config.field_search.text_search
|
48
52
|
search_conditions = []
|
49
53
|
human_condition_columns = [] if active_scaffold_config.field_search.human_conditions
|
50
54
|
columns = field_search_columns
|
51
|
-
|
55
|
+
params.each do |key, value|
|
52
56
|
next unless columns.include? key
|
53
57
|
search_condition = self.class.condition_for_column(active_scaffold_config.columns[key], value, text_search)
|
54
58
|
unless search_condition.blank?
|
@@ -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)
|
87
87
|
elsif nested? && nested.scope
|
88
88
|
nested.parent_scope.send(nested.scope)
|
89
89
|
else
|
@@ -3,7 +3,7 @@ ActiveScaffold::Bridges.bridge "CalendarDateSelect" do
|
|
3
3
|
# check to see if the old bridge was installed. If so, warn them
|
4
4
|
# we can detect this by checking to see if the bridge was installed before calling this code
|
5
5
|
|
6
|
-
if ActiveScaffold::Config::Core.
|
6
|
+
if ActiveScaffold::Config::Core.instance_method_names.include?("initialize_with_calendar_date_select")
|
7
7
|
raise RuntimeError, "We've detected that you have active_scaffold_calendar_date_select_bridge installed. This plugin has been moved to core. Please remove active_scaffold_calendar_date_select_bridge to prevent any conflicts"
|
8
8
|
end
|
9
9
|
|
@@ -41,7 +41,7 @@ module ActiveScaffold
|
|
41
41
|
'%m' => 'mm',
|
42
42
|
'%y' => 'y',
|
43
43
|
'%Y' => 'yy',
|
44
|
-
'%H' => '
|
44
|
+
'%H' => 'HH', # options ampm => false
|
45
45
|
'%I' => 'hh', # options ampm => true
|
46
46
|
'%M' => 'mm',
|
47
47
|
'%p' => 'tt',
|
@@ -168,12 +168,13 @@ module ActiveScaffold
|
|
168
168
|
def self.split_datetime_format(datetime_format)
|
169
169
|
date_format = datetime_format
|
170
170
|
time_format = nil
|
171
|
-
time_start_indicators = %w{hh mm tt ss}
|
171
|
+
time_start_indicators = %w{HH hh mm tt ss}
|
172
172
|
unless datetime_format.nil?
|
173
173
|
start_indicator = time_start_indicators.detect {|indicator| datetime_format.include?(indicator)}
|
174
174
|
unless start_indicator.nil?
|
175
175
|
pos_time_format = datetime_format.index(start_indicator)
|
176
176
|
date_format = datetime_format.to(pos_time_format - 1)
|
177
|
+
date_format.strip!
|
177
178
|
time_format = datetime_format.from(pos_time_format)
|
178
179
|
end
|
179
180
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
ActiveScaffold::Bridges.bridge "FileColumn" do
|
2
2
|
install do
|
3
|
-
if ActiveScaffold::Config::Core.
|
3
|
+
if ActiveScaffold::Config::Core.instance_method_names.include?("initialize_with_file_column")
|
4
4
|
raise RuntimeError, "We've detected that you have active_scaffold_file_column_bridge installed. This plugin has been moved to core. Please remove active_scaffold_file_column_bridge to prevent any conflicts"
|
5
5
|
end
|
6
6
|
require File.join(File.dirname(__FILE__), "lib/as_file_column_bridge")
|
@@ -24,7 +24,7 @@ module ActiveScaffold::Config
|
|
24
24
|
}
|
25
25
|
end
|
26
26
|
|
27
|
-
alias_method_chain :initialize, :file_column unless self.
|
27
|
+
alias_method_chain :initialize, :file_column unless self.instance_method_names.include?("initialize_without_file_column")
|
28
28
|
|
29
29
|
def configure_file_column_field(field)
|
30
30
|
# set list_ui first because it gets its default value from form_ui
|
@@ -1,6 +1,6 @@
|
|
1
1
|
ActiveScaffold::Bridges.bridge "Paperclip" do
|
2
2
|
install do
|
3
|
-
if ActiveScaffold::Config::Core.
|
3
|
+
if ActiveScaffold::Config::Core.instance_method_names.include?("initialize_with_paperclip")
|
4
4
|
raise RuntimeError, "We've detected that you have active_scaffold_paperclip_bridge installed. This plugin has been moved to core. Please remove active_scaffold_paperclip_bridge to prevent any conflicts"
|
5
5
|
end
|
6
6
|
require File.join(File.dirname(__FILE__), "lib/form_ui")
|
@@ -7,7 +7,7 @@ module ActiveScaffold
|
|
7
7
|
self.thumbnail_style = :thumbnail
|
8
8
|
|
9
9
|
def self.generate_delete_helper(klass, field)
|
10
|
-
klass.class_eval <<-EOF, __FILE__, __LINE__ + 1 unless klass.
|
10
|
+
klass.class_eval <<-EOF, __FILE__, __LINE__ + 1 unless klass.instance_method_names.include?("delete_#{field}=")
|
11
11
|
attr_reader :delete_#{field}
|
12
12
|
|
13
13
|
def delete_#{field}=(value)
|
@@ -188,7 +188,16 @@ module ActiveScaffold::DataStructures
|
|
188
188
|
end
|
189
189
|
|
190
190
|
def stripped_value(value)
|
191
|
-
stripable?
|
191
|
+
if stripable?
|
192
|
+
begin
|
193
|
+
value.strip
|
194
|
+
rescue
|
195
|
+
Rails.logger.error("stripped_value: column #{self.name} is a db text column, but value is nt a string: #{value.inspect}. Please define column[:#{self.name}].stripable = false in config")
|
196
|
+
value
|
197
|
+
end
|
198
|
+
else
|
199
|
+
value
|
200
|
+
end
|
192
201
|
end
|
193
202
|
|
194
203
|
# to set how many associated records a column with plural association must show in list
|
@@ -266,6 +266,7 @@ module ActiveScaffold
|
|
266
266
|
options[:count_includes] ||= full_includes unless search_conditions.nil?
|
267
267
|
|
268
268
|
klass = beginning_of_chain
|
269
|
+
klass = klass.where("") if klass.is_a?(Array)
|
269
270
|
|
270
271
|
# create a general-use options array that's compatible with Rails finders
|
271
272
|
finder_options = { :order => options[:sorting].try(:clause),
|
@@ -146,7 +146,12 @@ module ActiveScaffold
|
|
146
146
|
if link.type == :member && !options[:authorized]
|
147
147
|
action_link_html(link, nil, {:class => "disabled #{link.action}#{link.html_options[:class].blank? ? '' : (' ' + link.html_options[:class])}"}, record)
|
148
148
|
else
|
149
|
-
|
149
|
+
begin
|
150
|
+
render_action_link(link, url_options, record)
|
151
|
+
rescue
|
152
|
+
Rails.logger.error("render_action_link: exception occured: #{$!} link: #{link.inspect}, url_options: #{url_options.inspect}, options: #{options.inspect}, record: #{record.inspect}")
|
153
|
+
action_link_html(link, nil, {:class => "disabled #{link.action}#{link.html_options[:class].blank? ? '' : (' ' + link.html_options[:class])}"}, record)
|
154
|
+
end
|
150
155
|
end
|
151
156
|
end
|
152
157
|
|
@@ -22,6 +22,7 @@ de:
|
|
22
22
|
download: 'Download'
|
23
23
|
edit: 'Bearbeiten'
|
24
24
|
export: 'Exportieren'
|
25
|
+
'false': 'Nein'
|
25
26
|
nested_for_model: '%{nested_model} für %{parent_model}'
|
26
27
|
nested_of_model: '%{nested_model} von %{parent_model}'
|
27
28
|
filtered: '(Gefiltert)'
|
@@ -50,6 +51,7 @@ de:
|
|
50
51
|
show: 'Anzeigen'
|
51
52
|
show_model: 'Zeige %{model} an'
|
52
53
|
_to_ : ' zu '
|
54
|
+
'true': 'Ja'
|
53
55
|
update: 'Speichern'
|
54
56
|
update_model: 'Editiere %{model}'
|
55
57
|
updated_model: '%{model} aktualisiert'
|
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.1.
|
4
|
+
version: 3.1.8
|
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:
|
12
|
+
date: 2014-01-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: shoulda
|
16
|
-
requirement: &
|
16
|
+
requirement: &19626940 !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: *19626940
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: bundler
|
27
|
-
requirement: &
|
27
|
+
requirement: &19626440 !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: *19626440
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rcov
|
38
|
-
requirement: &
|
38
|
+
requirement: &19625940 !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: *19625940
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rails
|
49
|
-
requirement: &
|
49
|
+
requirement: &19625380 !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: *19625380
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: kaminari
|
60
|
-
requirement: &
|
60
|
+
requirement: &19625000 !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: *19625000
|
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
|
@@ -378,9 +378,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
378
378
|
- - ! '>='
|
379
379
|
- !ruby/object:Gem::Version
|
380
380
|
version: '0'
|
381
|
-
segments:
|
382
|
-
- 0
|
383
|
-
hash: -3291551366358840762
|
384
381
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
385
382
|
none: false
|
386
383
|
requirements:
|