inline_forms 0.9.13 → 0.9.14
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.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.9.
|
1
|
+
0.9.14
|
@@ -0,0 +1,20 @@
|
|
1
|
+
InlineForms::SPECIAL_COLUMN_TYPES[:datetime_select]=:date
|
2
|
+
|
3
|
+
# datetime
|
4
|
+
def datetime_select_show(object, attribute)
|
5
|
+
link_to_inline_edit object, attribute, object.send(attribute)
|
6
|
+
end
|
7
|
+
|
8
|
+
def datetime_select_edit(object, attribute)
|
9
|
+
out = text_field_tag attribute, object[attribute]
|
10
|
+
out << '<SCRIPT>'.html_safe
|
11
|
+
out << "$(function() { ".html_safe
|
12
|
+
out << '$("#'.html_safe + attribute.to_s.html_safe + '").datepicker();'.html_safe
|
13
|
+
out << '});'.html_safe
|
14
|
+
out << '</SCRIPT>'.html_safe
|
15
|
+
return out
|
16
|
+
end
|
17
|
+
|
18
|
+
def datetime_select_update(object, attribute)
|
19
|
+
object[attribute.to_sym] = params[attribute.to_sym]
|
20
|
+
end
|
data/inline_forms.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{inline_forms}
|
8
|
-
s.version = "0.9.
|
8
|
+
s.version = "0.9.14"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Ace Suares"]
|
12
|
-
s.date = %q{2011-06-
|
12
|
+
s.date = %q{2011-06-14}
|
13
13
|
s.description = %q{Inline Forms aims to ease the setup of forms that provide inline editing. The field list can be specified in the model.}
|
14
14
|
s.email = %q{ace@suares.an}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -28,6 +28,7 @@ Gem::Specification.new do |s|
|
|
28
28
|
"app/helpers/form_elements/check_box.rb",
|
29
29
|
"app/helpers/form_elements/check_list.rb",
|
30
30
|
"app/helpers/form_elements/date.rb",
|
31
|
+
"app/helpers/form_elements/datetime.rb",
|
31
32
|
"app/helpers/form_elements/dropdown.rb",
|
32
33
|
"app/helpers/form_elements/dropdown_with_integers.rb",
|
33
34
|
"app/helpers/form_elements/dropdown_with_values.rb",
|
@@ -150,7 +150,7 @@ module InlineForms
|
|
150
150
|
unless @inline_forms_attribute_list.empty?
|
151
151
|
@inline_forms_attribute_list = "\n" +
|
152
152
|
" def inline_forms_attribute_list\n" +
|
153
|
-
" [\n" +
|
153
|
+
" @inline_forms_attribute_list ||= [\n" +
|
154
154
|
@inline_forms_attribute_list +
|
155
155
|
" ]\n" +
|
156
156
|
" end\n" +
|
@@ -1,6 +1,7 @@
|
|
1
1
|
class <%= name %> < ActiveRecord::Base
|
2
2
|
cattr_reader :per_page
|
3
3
|
@@per_page = 10
|
4
|
+
attr_writer :inline_forms_attribute_list
|
4
5
|
|
5
6
|
<%= @belongs_to if @belongs_to.length > 1 -%>
|
6
7
|
<%= @has_many if @has_many.length > 1 -%>
|
@@ -15,4 +16,8 @@ class <%= name %> < ActiveRecord::Base
|
|
15
16
|
<%= @flag_not_accessible_through_html %>
|
16
17
|
end
|
17
18
|
|
19
|
+
def self.order_by_clause
|
20
|
+
"name"
|
21
|
+
end
|
22
|
+
|
18
23
|
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:
|
4
|
+
hash: 39
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 9
|
9
|
-
-
|
10
|
-
version: 0.9.
|
9
|
+
- 14
|
10
|
+
version: 0.9.14
|
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: 2011-06-
|
18
|
+
date: 2011-06-14 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -99,6 +99,7 @@ files:
|
|
99
99
|
- app/helpers/form_elements/check_box.rb
|
100
100
|
- app/helpers/form_elements/check_list.rb
|
101
101
|
- app/helpers/form_elements/date.rb
|
102
|
+
- app/helpers/form_elements/datetime.rb
|
102
103
|
- app/helpers/form_elements/dropdown.rb
|
103
104
|
- app/helpers/form_elements/dropdown_with_integers.rb
|
104
105
|
- app/helpers/form_elements/dropdown_with_values.rb
|