inline_forms 1.6.38 → 1.6.39
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.
- checksums.yaml +8 -8
- data/lib/app/assets/javascripts/inline_forms.js +2 -0
- data/lib/app/assets/stylesheets/inline_forms.css +2 -2
- data/lib/app/helpers/inline_forms_helper.rb +26 -33
- data/lib/app/views/inline_forms/_header.html.erb +1 -1
- data/lib/app/views/inline_forms/_show.html.erb +4 -3
- data/lib/app/views/layouts/devise.html.erb +3 -13
- data/lib/app/views/layouts/inline_forms.html.erb +11 -21
- data/lib/inline_forms/version.rb +1 -1
- metadata +2 -4
- data/lib/app/assets/images/close.png +0 -0
- data/lib/app/assets/images/trash.png +0 -0
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
MGFlZTcwOTJlYThjNTg5MDdiN2FmODYzNmJhY2Y2MDQ5YzVmMTkzNQ==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
ZWM5YTU2OGZjYzZkMDZlMTI4M2IwYjRhNjk1ZmYyOWIyZDZkMTg0ZQ==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
NDJhMDkzYmEyYzBjNjdmMzRhNTYzNDU5Y2JmNDgzMDJmMTBmZDIyMjc5M2I2
|
|
10
|
+
OTBjYjQ5ZGViMjc3OGI3MTc0YWMyMzgwM2Q5ZTc1NjMyZDI5Y2RiNzZhZjli
|
|
11
|
+
ZTQ1NmQ5MzcxNWY0YzBmNGE4NjViY2JkOWQ1Yjk0ZDBjYmY3ZGU=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
ZGFkZTk0ZjdhYTJmYzM2ZDM2MmZlYzRiNDAzNjA4MDY2Y2VmM2E5Yzc0ZGRh
|
|
14
|
+
YjgwZTQ1MDI5MGU1NzQ1ZTM2ZjUwMzAwZDAyNDU4MjhmZjJlNzM5NjhhZjFi
|
|
15
|
+
MjRiYWRlMWNkY2EwMGFmNmE3MTExNWE5NmE5MzBhZTQ2MTk2MDc=
|
|
@@ -136,12 +136,12 @@
|
|
|
136
136
|
|
|
137
137
|
|
|
138
138
|
#inline_forms_application_header {
|
|
139
|
-
background-color: #
|
|
139
|
+
background-color: #A3381E;
|
|
140
140
|
color: #FFFFFF;
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
#logout, #logout a {
|
|
144
|
-
background-color: #
|
|
144
|
+
background-color: #A3381E;
|
|
145
145
|
color: #FFFFFF;
|
|
146
146
|
}
|
|
147
147
|
|
|
@@ -20,55 +20,29 @@ module InlineFormsHelper
|
|
|
20
20
|
|
|
21
21
|
# close link
|
|
22
22
|
def close_link( object, update_span )
|
|
23
|
-
link_to
|
|
24
|
-
:class => "close_icon",
|
|
25
|
-
:title => t('inline_forms.view.close') ),
|
|
23
|
+
link_to "<i class='fi-x'></i>".html_safe,
|
|
26
24
|
send( object.class.to_s.underscore + '_path',
|
|
27
25
|
object,
|
|
28
26
|
:update => update_span,
|
|
29
27
|
:close => true ),
|
|
30
|
-
:remote => true
|
|
28
|
+
:remote => true,
|
|
29
|
+
:title => t('inline_forms.view.close')
|
|
31
30
|
end
|
|
32
31
|
|
|
33
32
|
# destroy link
|
|
34
33
|
def link_to_destroy( object, update_span )
|
|
35
34
|
if cancan_disabled? || ( can? :delete, object )
|
|
36
|
-
link_to
|
|
37
|
-
:class => "trash_icon",
|
|
38
|
-
:title => t('inline_forms.view.trash') ),
|
|
35
|
+
link_to "<i class='fi-trash'></i>".html_safe,
|
|
39
36
|
send( object.class.to_s.underscore + '_path',
|
|
40
37
|
object,
|
|
41
38
|
:update => update_span ),
|
|
42
39
|
:method => :delete,
|
|
43
|
-
:remote => true
|
|
44
|
-
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
# # undo link
|
|
48
|
-
# def link_to_undo_destroy(object, update_span )
|
|
49
|
-
# link_to(t('inline_forms.view.undo'), revert_version_path(object.versions.scoped.last), :method => :post)
|
|
50
|
-
# end
|
|
51
|
-
|
|
52
|
-
# link_to_inline_edit
|
|
53
|
-
def link_to_inline_edit(object, attribute, attribute_value='')
|
|
54
|
-
attribute_value = attribute_value.to_s
|
|
55
|
-
spaces = attribute_value.length > 40 ? 0 : 40 - attribute_value.length
|
|
56
|
-
value = h(attribute_value) + (" " * spaces).html_safe
|
|
57
|
-
css_class_id = "#{object.class.to_s.underscore}_#{object.id}_#{attribute}"
|
|
58
|
-
if cancan_disabled? || ( can? :update, object, attribute )
|
|
59
|
-
link_to value,
|
|
60
|
-
send( 'edit_' + object.class.to_s.underscore + '_path',
|
|
61
|
-
object,
|
|
62
|
-
:attribute => attribute.to_s,
|
|
63
|
-
:form_element => calling_method.sub(/_[a-z]+$/,'').sub(/block in /,''),
|
|
64
|
-
:update => css_class_id ),
|
|
65
|
-
:remote => true
|
|
66
|
-
else
|
|
67
|
-
h(attribute_value)
|
|
40
|
+
:remote => true,
|
|
41
|
+
:title => t('inline_forms.view.trash')
|
|
68
42
|
end
|
|
69
43
|
end
|
|
70
44
|
|
|
71
|
-
#
|
|
45
|
+
# new link
|
|
72
46
|
def link_to_new_record(model, path_to_new, update_span, parent_class, parent_id)
|
|
73
47
|
out = ""
|
|
74
48
|
out << "<div class='new_record_link'>"
|
|
@@ -93,6 +67,25 @@ module InlineFormsHelper
|
|
|
93
67
|
end
|
|
94
68
|
end
|
|
95
69
|
|
|
70
|
+
# link_to_inline_edit
|
|
71
|
+
def link_to_inline_edit(object, attribute, attribute_value='')
|
|
72
|
+
attribute_value = attribute_value.to_s
|
|
73
|
+
spaces = attribute_value.length > 40 ? 0 : 40 - attribute_value.length
|
|
74
|
+
value = h(attribute_value) + (" " * spaces).html_safe
|
|
75
|
+
css_class_id = "#{object.class.to_s.underscore}_#{object.id}_#{attribute}"
|
|
76
|
+
if cancan_disabled? || ( can? :update, object, attribute )
|
|
77
|
+
link_to value,
|
|
78
|
+
send( 'edit_' + object.class.to_s.underscore + '_path',
|
|
79
|
+
object,
|
|
80
|
+
:attribute => attribute.to_s,
|
|
81
|
+
:form_element => calling_method.sub(/_[a-z]+$/,'').sub(/block in /,''),
|
|
82
|
+
:update => css_class_id ),
|
|
83
|
+
:remote => true
|
|
84
|
+
else
|
|
85
|
+
h(attribute_value)
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
|
|
96
89
|
# url to other language
|
|
97
90
|
def locale_url(request, locale)
|
|
98
91
|
subdomains = request.subdomains
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<% unless @skip %>
|
|
2
2
|
<div class="row">
|
|
3
|
-
<div class="
|
|
3
|
+
<div class="small-11 column object_presentation">
|
|
4
4
|
<%= h(@object._presentation) -%>
|
|
5
5
|
</div>
|
|
6
|
-
<div class="
|
|
6
|
+
<div class="small-1 column close_link" >
|
|
7
7
|
<%= close_link(@object, @update_span) -%>
|
|
8
8
|
</div>
|
|
9
9
|
</div>
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
</div>
|
|
20
20
|
</div>
|
|
21
21
|
<% else %>
|
|
22
|
-
<div class="row <%= 'has_validations ' if @object.has_validations_for?(attribute) -%>" validation-hint="">
|
|
22
|
+
<div class="row <%= cycle('odd', 'even') %><%= ' has_validations ' if @object.has_validations_for?(attribute) -%>" validation-hint="">
|
|
23
23
|
<div class='large-4 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) -%>
|
|
@@ -41,3 +41,4 @@
|
|
|
41
41
|
<% end -%>
|
|
42
42
|
<% end -%>
|
|
43
43
|
<% end -%>
|
|
44
|
+
<div class="record_footer"></div>
|
|
@@ -1,24 +1,14 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
|
-
|
|
3
|
-
<!--[if lt IE 7 ]> <html class="ie6" lang="en"> <![endif]-->
|
|
4
|
-
<!--[if IE 7 ]> <html class="ie7" lang="en"> <![endif]-->
|
|
5
|
-
<!--[if IE 8 ]> <html class="ie8" lang="en"> <![endif]-->
|
|
6
|
-
<!--[if (gte IE 9)|!(IE)]><!--> <html lang="en"> <!--<![endif]-->
|
|
2
|
+
<html lang="en">
|
|
7
3
|
<head>
|
|
8
4
|
<meta charset="utf-8" />
|
|
9
|
-
|
|
10
|
-
<!-- Uncomment to make IE8 render like IE7 -->
|
|
11
|
-
<!-- <meta http-equiv="X-UA-Compatible" content="IE=7" /> -->
|
|
12
|
-
|
|
13
|
-
<!-- Set the viewport width to device width for mobile -->
|
|
14
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
15
6
|
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,400italic' rel='stylesheet' type='text/css' />
|
|
16
|
-
<title><%= t('
|
|
7
|
+
<title><%= t('application_name') + " v" + InlineForms::VERSION -%></title>
|
|
17
8
|
|
|
18
9
|
<%= stylesheet_link_tag "application" %>
|
|
19
|
-
<%= javascript_include_tag "vendor/
|
|
10
|
+
<%= javascript_include_tag "vendor/modernizr" %>
|
|
20
11
|
<%= csrf_meta_tags %>
|
|
21
|
-
|
|
22
12
|
</head>
|
|
23
13
|
|
|
24
14
|
<body>
|
|
@@ -1,32 +1,22 @@
|
|
|
1
|
-
<!DOCTYPE html
|
|
2
|
-
|
|
3
|
-
<html>
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
4
3
|
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
|
|
5
7
|
<title><%= t('application_name') + " v" + InlineForms::VERSION -%></title>
|
|
6
|
-
|
|
8
|
+
|
|
9
|
+
<%= stylesheet_link_tag "application" %>
|
|
7
10
|
<%= javascript_include_tag "vendor/modernizr" %>
|
|
8
|
-
<%=
|
|
9
|
-
<%= yield(:head) %>
|
|
10
|
-
<script>
|
|
11
|
-
$.datepicker.setDefaults({
|
|
12
|
-
dateFormat: 'dd-mm-yy',
|
|
13
|
-
changeMonth: true,
|
|
14
|
-
changeYear: true,
|
|
15
|
-
showOtherMonths: true,
|
|
16
|
-
selectOtherMonths: true,
|
|
17
|
-
showButtonPanel: false,
|
|
18
|
-
showWeek: true,
|
|
19
|
-
firstDay: 1,
|
|
20
|
-
prevText: '<<',
|
|
21
|
-
nextText: '>>'
|
|
22
|
-
})
|
|
23
|
-
</script>
|
|
11
|
+
<%= csrf_meta_tags %>
|
|
24
12
|
</head>
|
|
13
|
+
|
|
25
14
|
<body>
|
|
15
|
+
|
|
26
16
|
<%= render "inline_forms/header" %>
|
|
27
17
|
<%= render "/inline_forms_tabs" %>
|
|
28
18
|
<div id="inline_forms_main_list">
|
|
29
|
-
|
|
19
|
+
<%= yield %>
|
|
30
20
|
</div>
|
|
31
21
|
<%= javascript_include_tag 'application', 'inline_forms_application' %>
|
|
32
22
|
</body>
|
data/lib/inline_forms/version.rb
CHANGED
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.
|
|
4
|
+
version: 1.6.39
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ace Suares
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2014-01-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rvm
|
|
@@ -170,12 +170,10 @@ files:
|
|
|
170
170
|
- bin/inline_forms
|
|
171
171
|
- bin/inline_forms_app_template.rb
|
|
172
172
|
- inline_forms.gemspec
|
|
173
|
-
- lib/app/assets/images/close.png
|
|
174
173
|
- lib/app/assets/images/devise_footer_left.png
|
|
175
174
|
- lib/app/assets/images/devise_footer_right.png
|
|
176
175
|
- lib/app/assets/images/devise_header.png
|
|
177
176
|
- lib/app/assets/images/glass_plate.gif
|
|
178
|
-
- lib/app/assets/images/trash.png
|
|
179
177
|
- lib/app/assets/javascripts/ckeditor/config.js
|
|
180
178
|
- lib/app/assets/javascripts/inline_forms.js
|
|
181
179
|
- lib/app/assets/javascripts/inline_forms_application.js
|
|
Binary file
|
|
Binary file
|