dynamic_fieldsets 0.1.13 → 0.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.13
1
+ 0.1.14
@@ -24,7 +24,7 @@
24
24
  <% end %>
25
25
  </li>
26
26
  <% else %>
27
- <% fieldset_child = DynamicFieldsets::FieldsetChild.where( fieldset_id: fieldset.id, child_id: child.id, child_type: "DynamicFieldsets::Field" ).first %>
27
+ <% fieldset_child = DynamicFieldsets::FieldsetChild.where( fieldset_id: fieldset.id, child_id: child.id, child_type: "DynamicFieldsets::Field" ).first %>
28
28
  <li id="child-<%= fieldset_child.id %>" class="field<%= ' required' if child.required? %>">
29
29
  <div>
30
30
  <span class="fieldtype"><%= child.type %>:</span>
@@ -59,7 +59,6 @@ function get_input_value(field, type) {
59
59
  else {
60
60
  var output = $.trim(field.parent().parent().find(':checked').parent('label').text());
61
61
  }
62
- console.log(output);
63
62
  return output;
64
63
  case 'checkbox':
65
64
  return $('input[name="' + field.attr('name') + '"]:checked').map(function(index,option) {
@@ -101,6 +100,12 @@ function get_field_type(field) {
101
100
  //
102
101
  // the dependency information is stored in dynamic_fieldsets_dependencies
103
102
  all_inputs.change( function() {
103
+ update_fields();
104
+ });
105
+
106
+ // added this break down, so that update_fields can be called from the app
107
+ // this is necessary when additional input types are used within fieldsets AU 08-14-13
108
+ function update_fields() {
104
109
  field = $(this);
105
110
  var type = get_field_type(field);
106
111
  var fieldset_child_id = get_fieldset_child_id(field, type)
@@ -118,7 +123,7 @@ all_inputs.change( function() {
118
123
  update_dependency_group_for_fieldset_child(fieldset_child_id, group, user_inputs, fieldset_associator_id);
119
124
  });
120
125
  }
121
- });
126
+ };
122
127
 
123
128
  // checks the clauses for a dependency group and runs the action
124
129
  // group: the dependency group
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "dynamic_fieldsets"
8
- s.version = "0.1.13"
8
+ s.version = "0.1.14"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jeremiah Hemphill", "Ethan Pemble", "John Carter"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynamic_fieldsets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.13
4
+ version: 0.1.14
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -520,7 +520,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
520
520
  version: '0'
521
521
  segments:
522
522
  - 0
523
- hash: 174445989240896348
523
+ hash: 637972137212984627
524
524
  required_rubygems_version: !ruby/object:Gem::Requirement
525
525
  none: false
526
526
  requirements: