inline_forms 1.6.41 → 1.6.42

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
- MWFjNjRiMmNjMzA0MjkwYTFmNTFlZDcwYzc4NjA1OTczODYzYTdiYQ==
4
+ NDI4YThkNTYxYWU2YTI5MWIxNTYxM2Y4ZDU3YWViMjZkZDlhNjdjYw==
5
5
  data.tar.gz: !binary |-
6
- MGFmYWRjNzg0NjYwNWViY2ViMTUxOWU2NWVmM2I4NDNmMTU0YjcwNA==
6
+ YzgxNjNmYzc5MDdhMTkxYzhhYzA3NmI3YzVmYWZjOWJmMDZhNjg0Nw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OTgzNzVlZTQxY2I0YmVmNzJhYjBhMGM1NDlkMmZmOWEzM2UzODNiOGUxNGRh
10
- YmZlMTgyZjg0Y2I1YTdhZjQyNmM3Y2E3ODJkNzdkOGZiM2EzYzgwNjkwMGRi
11
- ZmFiODM5MTY3NDQ1ZTk4ZGEyYWI4YTA4MzJkMzU1ZGYxMGIyN2M=
9
+ OWNmNDAzNzMwMWViMjAyOWIzZDY5ZDE2ZDkyZGIxZmUwMWFlMmZiYjJjNmVm
10
+ ODUxNDFiZWM0MTAzMWZmNGNkYzMxM2VjYWRjNGIzMDk1Mzc1NDc3N2YyMzhh
11
+ NDEzYWEzMGUzYWJjMzg0YTZiOTYxNGYxMzZmNTBlMTYzNzYxOTg=
12
12
  data.tar.gz: !binary |-
13
- NWVlN2Q3ODQ5Yjc3MGJmYTI1MTNkZGQzZTQ2MjJlMTY3ZWUwNjNkNTBjM2Jl
14
- ZDkyY2I3YzI4NGE1Y2I3NjBlNzg2OGJlYzRjNTM2MWMxM2M1OTZhOTdmYTRj
15
- ZTc4NjllN2ZkNWE4ZGQ1ZjNjYjFiYjg4MmJhNWVlZTBlMjgyNzg=
13
+ YzQ0MmQ5MGNlNTcxMDdkNzgyYzI4N2Y1MTI4YTAzY2Y1ODIyZDc2ZjYyOGIy
14
+ YzNhMjQyZTk3NTQwYmVmNmNhNDNlZjdkMmI0MDFkOGZiODY2NjE0ZWM4ZDJk
15
+ YzJiZTY1OWZiNWRhMGI4ODZiMGZlNmI0NjFiODdhMGEwMmRlY2Y=
@@ -1,8 +1,8 @@
1
- /*
2
1
  $(document).ready(function() {
3
- // get rid of translation_missing tooltips
2
+ // foundation datepicker
3
+ $('.datepicker').fdatepicker()
4
+ // get rid of translation_missing tooltips
4
5
  $(this).on("mouseover", ".translation_missing", function() {
5
- $(this).attr('title', '');
6
+ $(this).attr('title', '');
6
7
  });
7
8
  });
8
- */
@@ -8,13 +8,7 @@ end
8
8
 
9
9
  def date_select_edit(object, attribute)
10
10
  css_id = 'datepicker_' + object.class.to_s.underscore + '_' + object.id.to_s + '_' + attribute.to_s
11
- out = text_field_tag attribute, ( object.send(attribute).nil? ? "" : object.send(attribute).strftime("%d-%m-%Y") ), :id => css_id
12
- out << '<SCRIPT>'.html_safe
13
- out << "$(function() { ".html_safe
14
- out << '$("#'.html_safe + css_id.html_safe + '").datepicker({ yearRange: "-100:+5" });'.html_safe
15
- out << '});'.html_safe
16
- out << '</SCRIPT>'.html_safe
17
- return out
11
+ text_field_tag attribute, ( object.send(attribute).nil? ? "" : object.send(attribute).strftime("%d-%m-%Y") ), :id => css_id, :class =>'datepicker'
18
12
  end
19
13
 
20
14
  def date_select_update(object, attribute)
@@ -1,23 +1,28 @@
1
1
  <%= form_tag send(@object.class.to_s.underscore + '_path', :update => @update_span,
2
- :attribute => @attribute,
3
- :form_element => @form_element,
4
- :sub_id => @sub_id ),
5
- :method => :put, # this is going to the update method!
6
- :multipart => true,
7
- :class => "edit_form",
8
- :remote => true do -%>
9
- <div class="edit_form_field">
10
- <%= send("#{@form_element}_edit", @object, @attribute) %>
11
- </div>
12
- <%= link_to( send( @object.class.to_s.underscore + '_path', :update => @update_span || "field_#{@attribute}_#{@object.id.to_s}",
2
+ :attribute => @attribute,
3
+ :form_element => @form_element,
4
+ :sub_id => @sub_id ),
5
+ :method => :put, # this is going to the update method!
6
+ :multipart => true,
7
+ :class => "edit_form",
8
+ :remote => true do -%>
9
+ <div class="row collapse">
10
+ <div class="small-9 columns">
11
+ <%= send("#{@form_element}_edit", @object, @attribute) %>
12
+ </div>
13
+ <div class="small-1 columns">
14
+ <%= submit_tag "ok", :class => "postfix button"-%>
15
+ </div>
16
+ <div class="small-2 columns">
17
+ <%= link_to( send( @object.class.to_s.underscore + '_path', :update => @update_span || "field_#{@attribute}_#{@object.id.to_s}",
13
18
  :attribute => @attribute,
14
19
  :form_element => @form_element,
15
20
  :sub_id => @sub_id ),
16
- :method => :get, # this is going to the show method!
17
- :class => "edit_form_cancel",
18
- :remote => true ) do %>
19
- <input type="button" name="cancel" value="cancel" />
20
- <% end %>
21
- <%= submit_tag "ok", :class => "edit_form_submit"-%>
22
- <div style="clear: both;"></div>
21
+ :method => :get, # this is going to the show method!
22
+ :remote => true ) do %>
23
+ <input type="button" name="cancel" value="cancel" class="button alert postfix radius" />
24
+ <% end %>
25
+ </div>
26
+ </div>
27
+
23
28
  <% end -%>
@@ -20,12 +20,12 @@
20
20
  </div>
21
21
  <% else %>
22
22
  <div class="row <%= cycle('odd', 'even') %><%= ' has_validations ' if @object.has_validations_for?(attribute) -%>" validation-hint="">
23
- <div class='large-4 column<%= " attribute_name attribute_#{attribute} form_element_#{form_element}" -%>' >
23
+ <div class='medium-3 large-3 column<%= " attribute_name attribute_#{attribute} form_element_#{form_element}" -%>' >
24
24
  <span data-tooltip class="has-tip tip-top" title="<%= validation_hints_as_list_for(@object, attribute) -%>">
25
25
  <%= @object.class.human_attribute_name(attribute) -%>
26
26
  </span>
27
27
  </div>
28
- <div class='large-8 column<%= " attribute_value attribute_#{attribute} form_element_#{form_element}" -%>' >
28
+ <div class='medium-9 large-9 column<%= " attribute_value attribute_#{attribute} form_element_#{form_element}" -%>' >
29
29
  <span id="<%= css_class_id -%>" >
30
30
  <% if form_element == :associated -%>
31
31
  <%= render :partial => "inline_forms/list",
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module InlineForms
3
- VERSION = "1.6.41"
3
+ VERSION = "1.6.42"
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.41
4
+ version: 1.6.42
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-01-09 00:00:00.000000000 Z
11
+ date: 2014-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rvm