carnival 0.0.43 → 0.0.44
Sign up to get free protection for your applications and to get access to all the features.
- data/app/assets/stylesheets/carnival/main.css +1 -1
- data/app/datatable/carnival/generic_datatable.rb +1 -1
- data/app/models/carnival/model_helper.rb +5 -0
- data/app/views/carnival/shared/form/_form.html.haml +3 -3
- data/app/views/carnival/shared/form/_inner_form.html.haml +5 -4
- data/lib/carnival/version.rb +1 -1
- metadata +2 -2
@@ -124,7 +124,7 @@ module Carnival
|
|
124
124
|
|
125
125
|
date_filter_field = @presenter.date_filter_field
|
126
126
|
if(date_filter_field.present? && params[:from].present? && params[:from] != "" && params[:to].present? && params[:to] != "")
|
127
|
-
|
127
|
+
records = records.where("#{@presenter.table_name}.#{date_filter_field.name} between ? and ?", "#{params[:from]} 00:00:00", "#{params[:to]} 23:59:59")
|
128
128
|
add_filter 'Período',"#{params[:from]} - #{params[:to]}"
|
129
129
|
end
|
130
130
|
|
@@ -11,7 +11,7 @@
|
|
11
11
|
nestedForms[getFormName(element)] = element;
|
12
12
|
element.remove();
|
13
13
|
});
|
14
|
-
|
14
|
+
|
15
15
|
$(".existing-options").hide();
|
16
16
|
$(".nested-form-subtitle").hide();
|
17
17
|
});
|
@@ -52,6 +52,6 @@
|
|
52
52
|
$(".existing-options").toggle();
|
53
53
|
}
|
54
54
|
|
55
|
-
function renderSelectOptions(){
|
56
|
-
$(
|
55
|
+
function renderSelectOptions(selector){
|
56
|
+
$(selector).show();
|
57
57
|
}
|
@@ -21,12 +21,13 @@
|
|
21
21
|
|
22
22
|
- if field.nested_form_modes?(:associate)
|
23
23
|
= " | "
|
24
|
-
= link_to_function t("nested_form.existing_option"), "renderSelectOptions()"
|
25
|
-
|
26
|
-
.existing-options
|
24
|
+
= link_to_function t("nested_form.existing_option"), "renderSelectOptions('.existing-options.#{field.name}')"
|
25
|
+
|
26
|
+
.existing-options{:class => field.name}
|
27
27
|
%h4.existing-options-title
|
28
28
|
= t("nested_form.existing_option_title")
|
29
|
-
=
|
29
|
+
- field_presenter = model_presenter.presenter_to_field(field, nil)
|
30
|
+
= f.collection_check_boxes "#{field.name.singularize.to_sym}_ids".to_sym, field_presenter.model_class.send("all"), :id, field_presenter.model_class.to_label_options
|
30
31
|
|
31
32
|
%ul.nested-form-list{:class => field.name}
|
32
33
|
%h4.nested-form-subtitle
|
data/lib/carnival/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: carnival
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.44
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-04-
|
12
|
+
date: 2014-04-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|