inline_forms 1.2.8 → 1.2.9

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.
@@ -83,7 +83,7 @@ gem 'cancan'
83
83
  gem 'inline_forms'
84
84
  gem 'mini_magick'
85
85
  gem 'jquery_datepicker'
86
- gem 'rails3-jquery-autocomplete'
86
+
87
87
  "
88
88
  gemfile_development_group ="
89
89
 
@@ -7,4 +7,3 @@
7
7
  //= require_directory ./jquery.tools
8
8
  //= require validation_tooltips
9
9
  //= require jquery-ui
10
- //= require autocomplete-rails
@@ -0,0 +1,12 @@
1
+ # Used in autocomplete
2
+ #
3
+ class GeoCodeCuracaoController < ApplicationController
4
+ def index
5
+ @term = params[:term]
6
+ respond_to do |format|
7
+ format.html { render 'inline_forms/_list', :layout => 'inline_forms' } unless @Klass.not_accessible_through_html?
8
+ format.js { render :list }
9
+ end
10
+ end
11
+
12
+ end
@@ -6,8 +6,16 @@ def geo_code_curacao_show(object, attribute)
6
6
  link_to_inline_edit object, attribute, attribute_value
7
7
  end
8
8
  def geo_code_curacao_edit(object, attribute)
9
- autocomplete_field_tag :geo_code_curacao, 'straatje', autocomplete_geo_code_curacao_street_clients_path
9
+ attribute_value = object.send(attribute).presentation rescue nil
10
+ out = text_field_tag attribute, attribute_value
11
+ out << '<script>
12
+ $( "#geo_code_curacao" ).autocomplete({
13
+ source: "/clients",
14
+ minLength: 2,
15
+ });
16
+ </script>'.html_safe
10
17
  end
18
+
11
19
  def geo_code_curacao_update(object, attribute)
12
20
  # extract the geocode
13
21
  geo_code = params[attribute.to_sym][:street].scan(/\d\d\d\d\d\d/).to_s || nil
@@ -144,9 +144,6 @@ module InlineForms
144
144
  paths["app/assets"] << "lib/app/assets"
145
145
  end
146
146
 
147
-
148
-
149
-
150
147
  end
151
148
 
152
149
  # make the current method and the calling method available
@@ -1,3 +1,3 @@
1
1
  module InlineForms
2
- VERSION = "1.2.8"
2
+ VERSION = "1.2.9"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inline_forms
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 8
10
- version: 1.2.8
9
+ - 9
10
+ version: 1.2.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ace Suares
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-01-30 00:00:00 Z
18
+ date: 2012-02-01 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rspec-rails
@@ -143,6 +143,7 @@ files:
143
143
  - lib/app/assets/stylesheets/inline_forms_application.css
144
144
  - lib/app/assets/stylesheets/jquery-ui-1.8.16.custom.css
145
145
  - lib/app/assets/stylesheets/validation_tooltips.css
146
+ - lib/app/controllers/geo_code_curacao_controller.rb
146
147
  - lib/app/controllers/inline_forms_controller.rb
147
148
  - lib/app/helpers/form_elements/check_box.rb
148
149
  - lib/app/helpers/form_elements/check_list.rb