inline_forms 1.6.57 → 1.6.58

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OTM0NGNlYzlmMjI5OTg1YWNjNGZkNjRjNGNhM2RhOGE4YzMzMWUwYg==
4
+ NmM0ZjljOTYxMzQzYzUwODczYmNlMzZmN2I3ZmJhY2IyYTYxYmQyNg==
5
5
  data.tar.gz: !binary |-
6
- MTU2NTJjY2IzNmRhNjVhMzhhN2IzN2FmNGQ4MjM4ZjE5ZWI5OTgwNw==
7
- !binary "U0hBNTEy":
6
+ NjNhYTM2MTQwZTZmNTZmNmU5ZjM3NTk2N2ViZjgzMWE5MzJhYjc4MA==
7
+ SHA512:
8
8
  metadata.gz: !binary |-
9
- ZDI4OThmM2VkMWVjYmViNjFlYmNiYWU2ZTQ3ZWY0MWQxM2U3OWNlMjJlMzc2
10
- MjdlYjMwZDVjNGM4ZmQ3ZjliNzk3MWZmZjNjOGM0OTQwMjcwOTBmOTExMGRj
11
- NWU1OWIwMTJkZjU2YjljODQ3YTExNDhjMjgzMDMxMzc3MTgyODk=
9
+ MWM1YWMzY2Q3OWFjZDE5NmJhMWE1MDY5NjUxMjZlZjkxYmZhMzNiM2JlMDhh
10
+ OGNiODM5NDIzODFhMjcxZTQ5YzM5ZjE1YzM4OTQ2MzhmNjZiZjA4ZTkwN2M3
11
+ YTg3NmUyZjljNzNjM2M0YWQ3NDRiMmUzOWY5NzE1NDhmOGNhMzg=
12
12
  data.tar.gz: !binary |-
13
- YzIzOWYxOTNhOTI2YzkwNmRkODk1NWMzNWQyOTY2MzJjMzI3NDRkMGZmODZh
14
- N2JhOTc1ZWRjNTNkMTI3ODQwZjdlMTYxM2QyZTI5MmFkZTBlMTVhNTk0ZTAw
15
- MjExOTczZjcwNDAzY2E3ZWQ3OWUzYTFkNjAzZDZmZTQyNWRkNDk=
13
+ MzU0YzA4YTE1MzVlYjdjYzUxOGYzMzhlMDk4YjU2NGZhOGQ5YTdmY2NlNTUy
14
+ ZmQxZDVjOTU2MTI4OGRiYzRlZTkxZjQ3MDEwODIyNGQ3ZGQ5M2YzYTRiYzU0
15
+ ZWZiNTJhYzQyZGJkZDI4ZGZhYjg0MjIxZmI2OGY1ZTAxMTY3MWM=
@@ -9,9 +9,8 @@ class InlineFormsApplicationController < ActionController::Base
9
9
  #set the locale based on the subdomain
10
10
  def set_locale
11
11
  I18n.locale = extract_locale_from_subdomain || I18n.default_locale
12
-
13
12
  end
14
-
13
+
15
14
  # Get locale code from request subdomain (like http://it.application.local:3000)
16
15
  def extract_locale_from_subdomain
17
16
  locale = request.subdomains.first
@@ -9,13 +9,14 @@ def text_area_show(object, attribute)
9
9
  cktext_area_tag(
10
10
  attribute,
11
11
  object[attribute],
12
- :input_html => { :id => "textarea_#{object.class.name.underscore}_#{object.id}_#{attribute.to_s}",
13
- :width => '100%' },
14
- :height => '200px',
15
- :toolbar => "None",
16
- :readOnly => "true",
17
- :resize_enabled => "false",
18
- :toolbarCanCollapse => "false"
12
+ :id => "textarea_#{object.class.name.underscore}_#{object.id}_#{attribute.to_s}",
13
+ :ckeditor => { :width => '100%',
14
+ :height => '200px',
15
+ :toolbar => "None",
16
+ :readOnly => "true",
17
+ :resize_enabled => "false",
18
+ :toolbarCanCollapse => "false"
19
+ }
19
20
  ) +
20
21
  image_tag( 'glass_plate.gif',
21
22
  :class => "glass_plate",
@@ -31,9 +32,10 @@ def text_area_edit(object, attribute)
31
32
  cktext_area_tag(
32
33
  attribute,
33
34
  object[attribute],
34
- :input_html => { :id => "textarea_#{object.class.name.underscore}_#{object.id}_#{attribute.to_s}",
35
- :width => '100%'},
36
- :height => '200px'
35
+ :id => "textarea_#{object.class.name.underscore}_#{object.id}_#{attribute.to_s}",
36
+ :ckeditor => { :width => '100%',
37
+ :height => '200px'
38
+ }
37
39
  )
38
40
  else
39
41
  text_area_tag attribute, object[attribute], :class => 'attribute_text_area'
@@ -1,3 +1,4 @@
1
+ <% @BUTTONS_UNDER = [ "text_area" ] %>
1
2
  <%= form_tag send(@object.class.to_s.underscore + '_path', :update => @update_span,
2
3
  :attribute => @attribute,
3
4
  :form_element => @form_element,
@@ -7,23 +8,49 @@
7
8
  :class => "edit_form",
8
9
  :abide => true,
9
10
  :remote => true do -%>
10
- <div class="row collapse">
11
- <div class="small-9 columns">
12
- <%= send("#{@form_element}_edit", @object, @attribute) %>
11
+ <% if @BUTTONS_UNDER.include? @form_element %>
12
+ <div class="row collapse">
13
+ <div class="small-12 columns">
14
+ <%= send("#{@form_element}_edit", @object, @attribute) %>
15
+ </div>
13
16
  </div>
14
- <div class="small-1 columns">
15
- <%= submit_tag "ok", :class => "postfix button"-%>
17
+ <div class="row collapse">
18
+ <div class="small-9 columns">
19
+ &nbsp;
20
+ </div>
21
+ <div class="small-1 columns">
22
+ <%= submit_tag "ok", :class => "postfix button"-%>
23
+ </div>
24
+ <div class="small-2 columns">
25
+ <%= link_to( send( @object.class.to_s.underscore + '_path', :update => @update_span || "field_#{@attribute}_#{@object.id.to_s}",
26
+ :attribute => @attribute,
27
+ :form_element => @form_element,
28
+ :sub_id => @sub_id ),
29
+ :method => :get, # this is going to the show method!
30
+ :remote => true ) do %>
31
+ <input type="button" name="cancel" value="cancel" class="button alert postfix radius" />
32
+ <% end %>
33
+ </div>
16
34
  </div>
17
- <div class="small-2 columns">
18
- <%= link_to( send( @object.class.to_s.underscore + '_path', :update => @update_span || "field_#{@attribute}_#{@object.id.to_s}",
19
- :attribute => @attribute,
20
- :form_element => @form_element,
21
- :sub_id => @sub_id ),
22
- :method => :get, # this is going to the show method!
23
- :remote => true ) do %>
24
- <input type="button" name="cancel" value="cancel" class="button alert postfix radius" />
25
- <% end %>
35
+ <% else %>
36
+ <div class="row collapse">
37
+ <div class="small-9 columns">
38
+ <%= send("#{@form_element}_edit", @object, @attribute) %>
39
+ </div>
40
+ <div class="small-1 columns">
41
+ <%= submit_tag "ok", :class => "postfix button"-%>
42
+ </div>
43
+ <div class="small-2 columns">
44
+ <%= link_to( send( @object.class.to_s.underscore + '_path', :update => @update_span || "field_#{@attribute}_#{@object.id.to_s}",
45
+ :attribute => @attribute,
46
+ :form_element => @form_element,
47
+ :sub_id => @sub_id ),
48
+ :method => :get, # this is going to the show method!
49
+ :remote => true ) do %>
50
+ <input type="button" name="cancel" value="cancel" class="button alert postfix radius" />
51
+ <% end %>
52
+ </div>
26
53
  </div>
27
- </div>
54
+ <% end%>
28
55
 
29
56
  <% end -%>
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module InlineForms
3
- VERSION = "1.6.57"
3
+ VERSION = "1.6.58"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inline_forms
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.57
4
+ version: 1.6.58
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ace Suares
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-18 00:00:00.000000000 Z
11
+ date: 2014-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rvm
@@ -288,7 +288,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
288
288
  version: '0'
289
289
  requirements: []
290
290
  rubyforge_project: inline_forms
291
- rubygems_version: 2.0.3
291
+ rubygems_version: 2.1.9
292
292
  signing_key:
293
293
  specification_version: 4
294
294
  summary: Inline editing of forms.