inline_forms 1.6.36 → 1.6.37

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
- ODU0NDY3YjdhMjlmNzEyNGMxYWJkY2I1N2JlNTEwYWQ3ODM4Njk1OA==
4
+ M2JmNDE5Nzc4MDc2YjY1M2U1N2E5OTMzN2Q5NWQ5NjNjMjk2NmJjOQ==
5
5
  data.tar.gz: !binary |-
6
- M2IwMzdlNDkwOTEwOGIyOWY0OGQyZGNmNTlhNTRhZmFkZTIxNDJhMQ==
6
+ NTVmN2UxNGYwNjBhOTM4OGFjOTgwOTZiMDk3YTUyZGU5ZjhkZjg1YQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NzYwMjllYzhjMTU5MGJhNDI5NTA3ZWIzZDk3ZTY0MTZjYzRjOTFjZGZjMmZj
10
- NzhlOTU5Yjc5ZjI3Mjg1N2EzZGY2ZGY5OTIwZjdlYTM0ODA1ZDlmNWVjMzg5
11
- OTcxZGRmNzMyYTRlMmI5ZmExYTk4ZjJjMzMyOGM2Mjc0NmU0ZTY=
9
+ M2ZmZWE3NDY3NzZiN2U2ZjBhZjNlNGUxODAwNjQ5NWNmMjk1N2M4YTJiYmM3
10
+ OTk5MWQ1MzdiN2M5Y2M4MjBjMjMwZDcxODVmNmYwOTZmNWM5MjUzMTliNDJh
11
+ MmM1MjFiYWIzY2RhNmYwZDYxMjJjOWIxN2JiMTFiY2ExNWE1MDI=
12
12
  data.tar.gz: !binary |-
13
- YjA2ZmFlZmIyMmE2YTFkZGExZTY3ZjkwMzQ2ZTQzMzk0OGY3ZTE4Y2I3OTIy
14
- OWEzYTFlNDkzZDU3OTQwNDljNDVkYTcyNTgwMzQ0OTA1N2RiYjRjOGM2ZTAy
15
- ZWVmMGRiOTYwYmI2Y2VhZGNhNzA1MDlkODRjYmM4NzJjNDE4ZWM=
13
+ YjRhZjJlYjcwYjdhNDcxMWJiOWM1MDlmNjUwZmVjZDIzNzBkYmZmMWZlYjA1
14
+ NjdlYzBkZDZiODdlMGFjYjVlZTNjOGZkNzgwZTkwYzgyZTliZDA5MGNlODcy
15
+ YTk1YzNmODBkNTg2NDdjNjcyNWNiYTZhODYzMjdlNjcxZmU2NjA=
@@ -26,6 +26,7 @@ gem 'i18n-active_record', :git => 'git://github.com/acesuares/i18n-active_record
26
26
  gem 'unicorn'
27
27
  gem 'rvm'
28
28
  gem 'rvm-capistrano'
29
+ gem 'foundation-rails'
29
30
 
30
31
  gem_group :development do
31
32
  gem 'sqlite3'
@@ -46,7 +47,6 @@ gem_group :assets do
46
47
  gem 'coffee-rails', '~> 3.2.1'
47
48
  gem 'uglifier', '>= 1.0.3'
48
49
  gem 'compass-rails' # you need this or you get an err
49
- gem 'zurb-foundation', '~> 4.0.0'
50
50
  end
51
51
 
52
52
  say "- Running bundle..."
@@ -185,7 +185,21 @@ ul.checklist li {
185
185
  padding: 0;
186
186
  }
187
187
 
188
- #Header {
188
+ /* HEADER */
189
+
190
+ #inline_forms_application_header {
191
+ background-color: #B94C32;
192
+ color: #FFFFFF;
193
+ }
194
+
195
+ #logout, #logout a {
196
+ background-color: #B94C32;
197
+ color: #FFFFFF;
198
+ }
199
+
200
+
201
+ /* Deprecated by foundation
202
+ #Header {
189
203
  background-color: #B94C32;
190
204
  color: #FFFFFF;
191
205
  font-weight: bold;
@@ -193,52 +207,47 @@ ul.checklist li {
193
207
  -webkit-border-radius: 5px;
194
208
  -webkit-box-shadow: 0 1px 3px rgba(0,0,0, .4);
195
209
  -moz-box-shadow: 0 1px 3px rgba(0,0,0, .4);
196
- /* border: 1px solid white;*/
210
+ /* border: 1px solid white; *\/
197
211
  padding: 0.4em;
198
212
  margin: 0.4em 0 0.3em 0;
199
- }
200
-
201
- /* HEADER */
202
-
203
- #title {
213
+ }
214
+ #title {
204
215
  float: left;
205
216
  height: 1.5em;
206
- }
207
-
208
- #logout {
209
- float:right;
210
- height: 1.5em;
211
- }
212
-
213
- #locales {
214
- float: left;
215
- height: 1.5em;
216
- margin-left: 2em;
217
- }
218
-
219
- #locales ul {
220
- list-style: none;
221
- list-style-position: inside;
222
- margin: 0;
223
- padding: 0;
224
- }
225
-
226
- #locales li {
227
- display: inline-block;
228
- height: 1.5em;
229
- }
230
-
231
- #locales li a {
232
- color: white;
233
- }
234
-
235
- #locales li .active_locale {
236
- color: yellow;
237
- }
238
-
239
- #logout a {
240
- color: white;
241
- }
217
+ }
218
+ #logout {
219
+ float:right;
220
+ height: 1.5em;
221
+ }
222
+ #logout a {
223
+ color: white;
224
+ }
225
+ #locales {
226
+ float: left;
227
+ height: 1.5em;
228
+ margin-left: 2em;
229
+ }
230
+
231
+ #locales ul {
232
+ list-style: none;
233
+ list-style-position: inside;
234
+ margin: 0;
235
+ padding: 0;
236
+ }
237
+
238
+ #locales li {
239
+ display: inline-block;
240
+ height: 1.5em;
241
+ }
242
+
243
+ #locales li a {
244
+ color: white;
245
+ }
246
+
247
+ #locales li .active_locale {
248
+ color: yellow;
249
+ }
250
+ */
242
251
 
243
252
  /* END HEADER */
244
253
 
@@ -1,2 +1,7 @@
1
- <%= link_to_destroy(@object, @update_span) -%>
2
- <%= link_to h(@object._presentation), send(@object.class.to_s.underscore + "_path", @object, :update => @update_span), :remote => true -%>
1
+ <div class="small-1 column">
2
+ <%= link_to_destroy(@object, @update_span) -%>
3
+ </div>
4
+ <div class="small-11 column">
5
+ <%= link_to h(@object._presentation), send(@object.class.to_s.underscore + "_path", @object, :update => @update_span), :remote => true -%>
6
+ </div>
7
+
@@ -1 +1,23 @@
1
- <div id="Header">Inline Forms</div>
1
+ <nav id='inline_forms_application_header' class="top-bar" data-topbar>
2
+ <ul class="title-area">
3
+ <li class="name">
4
+ <h1><a href="#"><%= application_title %> v<%= inline_forms_version %></a></h1>
5
+ </li>
6
+ <li class="toggle-topbar menu-icon">
7
+ <a href="#"><span></span></a>
8
+ </li>
9
+ </ul>
10
+ <section class="top-bar-section" id="logout">
11
+ <ul class="right">
12
+ <li class="has-dropdown">
13
+ <a href="#"><%= current_user.name %></a>
14
+ <ul class="dropdown">
15
+ <li>
16
+ <%= link_to("Afmelden...", destroy_user_session_path, :method => :delete) if current_user %>
17
+ </li>
18
+ </ul>
19
+ </li>
20
+ </ul>
21
+ </section>
22
+
23
+ </nav>
@@ -47,7 +47,7 @@ they are @object. We need this magic here to rewrite all the @variables to varia
47
47
  <% objects = objects.paginate :page => params[:page], :per_page => @PER_PAGE || 5, :conditions => conditions %>
48
48
  <% end %>
49
49
 
50
- <%= raw "<ul id=\"#{update_span}\" class=\"inline_forms_list\">" if ul_needed -%>
50
+ <%= raw "<div id=\"#{update_span}\" class=\"inline_forms_list\">" if ul_needed -%>
51
51
  <!-- # link to new -->
52
52
  <%= link_to_new_record(model, path_to_new, update_span, parent_class, parent_id) -%>
53
53
  <!-- # list of objects -->
@@ -59,12 +59,16 @@ they are @object. We need this magic here to rewrite all the @variables to varia
59
59
  <% css_class_id = parent_class.to_s.underscore + '_' + parent_id.to_s + '_' + attribute.to_s.singularize.underscore + "_" + object.id.to_s -%>
60
60
  <% path_to_object = attribute.to_s.singularize.underscore + "_path" %>
61
61
  <% end %>
62
- <li id="<%= css_class_id -%>" class="<%= cycle('odd', 'even') -%>" >
63
- <%= link_to_destroy(object, css_class_id) -%>
64
- <%= link_to h(object._presentation),
65
- send( path_to_object, object, :update => css_class_id),
66
- :remote => true -%>
67
- </li>
62
+ <div class="row <%= cycle('odd', 'even') %>" id="<%= css_class_id -%>">
63
+ <div class="small-1 column">
64
+ <%= link_to_destroy(object, css_class_id) -%>
65
+ </div>
66
+ <div class="small-11 column">
67
+ <%= link_to h(object._presentation),
68
+ send( path_to_object, object, :update => css_class_id),
69
+ :remote => true -%>
70
+ </div>
71
+ </div>
68
72
  <% end -%>
69
73
  <!-- # pagination -->
70
74
  <% if parent_id.nil? -%>
@@ -72,5 +76,5 @@ they are @object. We need this magic here to rewrite all the @variables to varia
72
76
  <% else %>
73
77
  <% pagination = will_paginate objects, :remote => true, :params => {:controller => attribute, :action => :index, :id => nil, :parent_class => parent_class, :parent_id => parent_id, :update => "#{parent_class.to_s.underscore}_#{parent_id}_#{attribute}", :ul_needed => true } -%>
74
78
  <% end %>
75
- <%= raw "<li class=\"#{cycle('odd', 'even')}\">" + pagination + "</li>" if pagination -%>
76
- <%= raw "</ul>" if ul_needed -%>
79
+ <%= raw "<div class=\"row\><div class=\"large-12 column #{cycle('odd', 'even')}\">" + pagination + "</div></div>" if pagination -%>
80
+ <%= raw "</div>" if ul_needed -%>
@@ -3,70 +3,63 @@
3
3
  <div id="flash" class="flash <%= key %>">
4
4
  <ul>
5
5
  <% value.each do |m| %>
6
- <li><%= m %></li>
6
+ <li>
7
+ <%= m %>
8
+ </li>
7
9
  <% end %>
8
10
  </ul>
9
11
  </div>
10
12
  <% end %>
11
13
  <script type="text/javascript">
12
- $(function() { $("#flash").delay(1000).fadeTo('slow', 0.33); } );
14
+ $(function() {
15
+ $("#flash").delay(1000).fadeTo('slow', 0.33);
16
+ });
13
17
  </script>
14
- <%= form_tag send(@Klass.to_s.underscore.pluralize + '_path', :update => @update_span,
15
- :parent_class => @parent_class,
16
- :parent_id => @parent_id ),
17
- :multipart => true, :remote => true, :class => "edit_form" do -%>
18
+ <%= form_tag send(@Klass.to_s.underscore.pluralize + '_path', :update => @update_span,
19
+ :parent_class => @parent_class,
20
+ :parent_id => @parent_id ),
21
+ :multipart => true, :remote => true, :class => "edit_form" do -%>
18
22
  <div class="edit_form_field">
19
- <table cellspacing="0" cellpadding="0">
20
- <tr>
21
- <th colspan="2" valign="top">
22
- <div class="object_presentation" >
23
- <%= t('inline_forms.view.add_new', :model => @Klass.model_name.human ) -%>
23
+ <div class="row" >
24
+ <div class="large-12 column object_presentation" >
25
+ <%= t('inline_forms.view.add_new', :model => @Klass.model_name.human ) -%>
26
+ </div>
27
+ </div>
28
+ <% attributes = @inline_forms_attribute_list || @object.inline_forms_attribute_list -%>
29
+ <% attributes.each do | attribute, name, form_element | -%>
30
+ <% unless form_element.to_sym == :associated || (cancan_enabled? && cannot?(:read, @Klass.to_s.underscore.pluralize.to_sym, attribute)) -%>
31
+ <% css_class_id = "attribute_#{attribute}_#{@object.id}" -%>
32
+ <% if form_element == :header %>
33
+ <div class="row" >
34
+ <div class='large-12 column<%= " attribute_name attribute_#{attribute} form_element_#{form_element}" -%>' >
35
+ <%= @object.class.human_attribute_name(attribute) -%>
36
+ </div>
37
+ </div>
38
+ <% else %>
39
+ <div class="row <%= 'has_validations ' if @object.has_validations_for?(attribute) -%>" validation-hint="<%= validation_hints_as_list_for(@object, attribute) -%>">
40
+ <div class='large-4 column<%= " attribute_name attribute_#{attribute} form_element_#{form_element}" -%>' >
41
+ <%= @object.class.human_attribute_name(attribute) -%>
42
+ </div>
43
+ <div class='large-8 column<%= " attribute_value attribute_#{attribute} form_element_#{form_element}" -%>' >
44
+ <span id="<%= css_class_id -%>" > <%= send("#{form_element}_edit", @object, attribute) -%> </span>
45
+ </div>
24
46
  </div>
25
- </th>
26
- </tr>
27
- <% attributes = @inline_forms_attribute_list || @object.inline_forms_attribute_list -%>
28
- <% attributes.each do | attribute, name, form_element | -%>
29
- <% unless form_element.to_sym == :associated || (cancan_enabled? && cannot?(:read, @Klass.to_s.underscore.pluralize.to_sym, attribute)) -%>
30
- <% css_class_id = "attribute_#{attribute}_#{@object.id}" -%>
31
- <% if form_element == :header %>
32
- <tr>
33
- <td valign="top" class="header" colspan="2">
34
- <div class='<%= "attribute_name attribute_#{attribute} form_element_#{form_element}" -%>' >
35
- <%= @object.class.human_attribute_name(attribute) -%>
36
- </div>
37
- </td>
38
- </tr>
39
- <% else %>
40
- <tr>
41
- <td valign="top" class="<%= 'has_validations ' if @object.has_validations_for?(attribute) -%>" validation-hint="<%= validation_hints_as_list_for(@object, attribute) -%>">
42
- <div class='<%= "attribute_name attribute_#{attribute} form_element_#{form_element}" -%>' >
43
- <%= @object.class.human_attribute_name(attribute) -%>
44
- </div>
45
- </td>
46
- <td valign="top">
47
- <div class='<%= "attribute_value attribute_#{attribute} form_element_#{form_element}" -%>' >
48
- <span id="<%= css_class_id -%>" >
49
- <%= send("#{form_element}_edit", @object, attribute) -%>
50
- </span>
51
- </div>
52
- </td>
53
- </tr>
54
- <% end -%>
55
47
  <% end -%>
56
48
  <% end -%>
57
- </table>
58
- </div>
59
- <%= link_to( send(@Klass.to_s.underscore.pluralize + '_path', :update => @update_span,
60
- :parent_class => @parent_class,
61
- :parent_id => @parent_id ),
62
- :remote => true,
63
- :class => "edit_form_cancel" ) do %>
64
- <input type="button" name="cancel" value="cancel" />
49
+ <% end -%>
50
+ <%= link_to( send(@Klass.to_s.underscore.pluralize + '_path', :update => @update_span,
51
+ :parent_class => @parent_class,
52
+ :parent_id => @parent_id ),
53
+ :remote => true,
54
+ :class => "edit_form_cancel" ) do -%>
55
+ <input type="button" name="cancel" value="cancel" />
56
+ <% end %>
57
+ <%= submit_tag "ok", :class => "edit_form_submit"-%>
58
+ <div style="clear: both;"></div>
65
59
  <% end %>
66
- <%= submit_tag "ok", :class => "edit_form_submit"-%>
67
- <div style="clear: both;"></div>
68
- <% end %>
69
60
  </li>
70
61
  <script type="text/javascript">
71
- $(function() { $("#newnew").slideDown(4000); } );
62
+ $(function() {
63
+ $("#newnew").slideDown(4000);
64
+ });
72
65
  </script>
@@ -1,49 +1,39 @@
1
- <table cellspacing="0" cellpadding="0" style="height: 0">
2
- <tr>
3
- <th valign="top" colspan="2">
4
- <div class="object_presentation" >
5
- <%= h(@object._presentation) -%>
1
+ <div class="row">
2
+ <div class="large-10 column object_presentation">
3
+ <%= h(@object._presentation) -%>
4
+ </div>
5
+ <div class="large-1 column close_link" >
6
+ <%= close_link(@object, @update_span) -%>
7
+ </div>
8
+ </div>
9
+ <% attributes = @inline_forms_attribute_list || @object.inline_forms_attribute_list -%>
10
+ <% attributes.each do | attribute, name, form_element | -%>
11
+ <% if cancan_disabled? || can?(:read, @object, attribute) %>
12
+ <% css_class_id = "#{@object.class.name.underscore}_#{@object.id}_#{attribute}" -%>
13
+ <% if form_element == :header %>
14
+ <div class="row header">
15
+ <div class='large-12 column<%= " attribute_name attribute_#{attribute} form_element_#{form_element}" -%>' >
16
+ <%= @object.class.human_attribute_name(attribute) -%>
17
+ </div>
6
18
  </div>
7
- <div class="close_link" >
8
- <%= close_link(@object, @update_span) -%>
19
+ <% else %>
20
+ <div class="row <%= 'has_validations ' if @object.has_validations_for?(attribute) -%>" validation-hint="<%= validation_hints_as_list_for(@object, attribute) -%>">
21
+ <div class='large-4 column<%= " attribute_name attribute_#{attribute} form_element_#{form_element}" -%>' >
22
+ <%= @object.class.human_attribute_name(attribute) -%>
23
+ </div>
24
+ <div class='large-8 column<%= " attribute_value attribute_#{attribute} form_element_#{form_element}" -%>' >
25
+ <span id="<%= css_class_id -%>" >
26
+ <% if form_element == :associated -%>
27
+ <%= render :partial => "inline_forms/list",
28
+ :locals => { :parent_class => @object.class,
29
+ :parent_id => @object.id,
30
+ :attribute => attribute } %>
31
+ <% else -%>
32
+ <%= send("#{form_element}_show", @object, attribute) -%>
33
+ <% end -%>
34
+ </span>
35
+ </div>
9
36
  </div>
10
- </th>
11
- </tr>
12
- <% attributes = @inline_forms_attribute_list || @object.inline_forms_attribute_list -%>
13
- <% attributes.each do | attribute, name, form_element | -%>
14
- <% if cancan_disabled? || can?(:read, @object, attribute) %>
15
- <% css_class_id = "#{@object.class.name.underscore}_#{@object.id}_#{attribute}" -%>
16
- <% if form_element == :header %>
17
- <tr>
18
- <td valign="top" class="header" colspan="2">
19
- <div class='<%= "attribute_name attribute_#{attribute} form_element_#{form_element}" -%>' >
20
- <%= @object.class.human_attribute_name(attribute) -%>
21
- </div>
22
- </td>
23
- </tr>
24
- <% else %>
25
- <tr>
26
- <td valign="top" class="<%= 'has_validations ' if @object.has_validations_for?(attribute) -%>" validation-hint="<%= validation_hints_as_list_for(@object, attribute) -%>">
27
- <div class='<%= "attribute_name attribute_#{attribute} form_element_#{form_element}" -%>' >
28
- <%= @object.class.human_attribute_name(attribute) -%>
29
- </div>
30
- </td>
31
- <td valign="top">
32
- <div class='<%= "attribute_value attribute_#{attribute} form_element_#{form_element}" -%>' >
33
- <span id="<%= css_class_id -%>" >
34
- <% if form_element == :associated -%>
35
- <%= render :partial => "inline_forms/list",
36
- :locals => { :parent_class => @object.class,
37
- :parent_id => @object.id,
38
- :attribute => attribute } %>
39
- <% else -%>
40
- <%= send("#{form_element}_show", @object, attribute) -%>
41
- <% end -%>
42
- </span>
43
- </div>
44
- </td>
45
- </tr>
46
- <% end -%>
47
37
  <% end -%>
48
38
  <% end -%>
49
- </table>
39
+ <% end -%>
@@ -4,7 +4,7 @@
4
4
  <head>
5
5
  <title><%= t('application_name') + " v" + InlineForms::VERSION -%></title>
6
6
  <%= stylesheet_link_tag 'inline_forms_application', 'application' %>
7
- <%= javascript_include_tag 'application', 'inline_forms_application' %>
7
+ <%= javascript_include_tag "vendor/modernizr" %>
8
8
  <%= csrf_meta_tag %>
9
9
  <%= yield(:head) %>
10
10
  <script>
@@ -28,5 +28,6 @@
28
28
  <div id="inline_forms_main_list">
29
29
  <%= yield %>
30
30
  </div>
31
+ <%= javascript_include_tag 'application', 'inline_forms_application' %>
31
32
  </body>
32
33
  </html>
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module InlineForms
3
- VERSION = "1.6.36"
3
+ VERSION = "1.6.37"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inline_forms
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.36
4
+ version: 1.6.37
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ace Suares