phantom_forms 0.2.0.alpha3 → 0.2.0.alpha4
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c69885ce921dd10232efa37b4ed63d99497923e
|
4
|
+
data.tar.gz: 6a5921e92bd916b4c84d33fd89fd8e32d33f6792
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5755d76667f5f4fe64f16843f53232d3169753af496eafdfc34ed555dd1258bac39b12931b5bb13319fe1f7ebb741d2cdaa387a5142c54b819c667c3ce762f3
|
7
|
+
data.tar.gz: ed72afaaf67da64fa4b2eb1c96cb0a19cc8052859fe5c7cab4dc22cba081e82f4f7b0fcb7665d58ebfd45d5040e65cf0495b68a5529703f76cd36f74694706a6
|
data/lib/phantom_forms/helper.rb
CHANGED
@@ -8,7 +8,7 @@ module PhantomForms
|
|
8
8
|
options[:html] = {:class => 'remote-form form'}
|
9
9
|
|
10
10
|
object_name = get_class(extract_object(object))
|
11
|
-
object_class = options[:resource] ||
|
11
|
+
object_class = options[:resource] || object_name
|
12
12
|
label = options[:label] || t("#{object_name.underscore}.singular")
|
13
13
|
|
14
14
|
content_tag :div, class: "panel panel-primary" do
|
@@ -23,7 +23,7 @@ module PhantomForms
|
|
23
23
|
options[:html] = {:class => 'normal-form form'}
|
24
24
|
|
25
25
|
object_name = get_class(extract_object(object))
|
26
|
-
object_class = options[:resource] ||
|
26
|
+
object_class = options[:resource] || object_name
|
27
27
|
label = options[:label] || t("#{object_name.underscore}.singular")
|
28
28
|
|
29
29
|
content_tag :div, class: "panel panel-primary" do
|
@@ -32,7 +32,6 @@ module PhantomForms
|
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
|
-
|
36
35
|
def modal_form_for(object, options = {}, &block)
|
37
36
|
options[:validate] = true
|
38
37
|
options[:builder] = PhantomForms::FormBuilders::ValidateFormBuilder
|
@@ -40,7 +39,7 @@ module PhantomForms
|
|
40
39
|
options[:remote] = true
|
41
40
|
|
42
41
|
object_name = get_class(extract_object(object))
|
43
|
-
object_class = options[:resource] ||
|
42
|
+
object_class = options[:resource] || object_name
|
44
43
|
label = options[:label] || t("#{object_name.underscore}.singular")
|
45
44
|
|
46
45
|
content_tag :div, class: "col-md-12 alert-dismissable" do
|
@@ -57,7 +56,7 @@ module PhantomForms
|
|
57
56
|
options[:html] = {:'data-type' => 'script', :class => 'normal-form'}
|
58
57
|
|
59
58
|
object_name = get_class(extract_object(object))
|
60
|
-
object_class = options[:resource] ||
|
59
|
+
object_class = options[:resource] || object_name
|
61
60
|
label = options[:label] || t("#{object_name.underscore}.singular")
|
62
61
|
|
63
62
|
content_tag :div, class: "panel panel-primary" do
|
@@ -68,16 +67,17 @@ module PhantomForms
|
|
68
67
|
|
69
68
|
def buttons_for(object, options = {})
|
70
69
|
object_name = get_class(object)
|
71
|
-
object_class = options[:resource] ||
|
70
|
+
object_class = options[:resource] || object_name
|
72
71
|
|
73
72
|
locale_name = object_name.underscore
|
74
73
|
locale = options[:label] || t("#{locale_name}.save")
|
75
|
-
content_tag :div, class:
|
76
|
-
|
74
|
+
content_tag :div, class: 'row' do
|
75
|
+
content_tag :div, class: 'col-xs-12' do
|
76
|
+
submit_button(locale, :id => "submit-#{object_class}-button")
|
77
|
+
end
|
77
78
|
end
|
78
79
|
end
|
79
80
|
|
80
|
-
|
81
81
|
def modal_form_error(id)
|
82
82
|
content_tag :div, nil, :id => id
|
83
83
|
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
button.close-form {
|
2
|
+
float: right;
|
3
|
+
position: relative;
|
4
|
+
padding: 0px;
|
5
|
+
margin: -7px 0px 0px 0px;
|
6
|
+
border: 0;
|
7
|
+
font-size: 24px;
|
8
|
+
font-weight: bold;
|
9
|
+
background: transparent;
|
10
|
+
color: white;
|
11
|
+
cursor: pointer;
|
12
|
+
text-shadow: 0 1px 0 #ccc;
|
13
|
+
opacity:.8;
|
14
|
+
filter:alpha(opacity=80);
|
15
|
+
|
16
|
+
&:hover, &:focus {
|
17
|
+
text-decoration:none;
|
18
|
+
cursor:pointer;
|
19
|
+
opacity:1;
|
20
|
+
filter:alpha(opacity=100);
|
21
|
+
}
|
22
|
+
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phantom_forms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.0.
|
4
|
+
version: 0.2.0.alpha4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vassil Kalkov
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-11-
|
13
|
+
date: 2013-11-21 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails4_client_side_validations
|
@@ -65,7 +65,7 @@ files:
|
|
65
65
|
- lib/phantom_forms/form_builders/validate_form_builder.rb
|
66
66
|
- lib/phantom_forms.rb
|
67
67
|
- vendor/assets/stylesheets/phantom_forms.css
|
68
|
-
- vendor/assets/stylesheets/forms.
|
68
|
+
- vendor/assets/stylesheets/forms.scss
|
69
69
|
- vendor/assets/javascripts/phantom_forms.js
|
70
70
|
- vendor/assets/javascripts/forms.js.coffee
|
71
71
|
- README.md
|
@@ -96,4 +96,3 @@ signing_key:
|
|
96
96
|
specification_version: 4
|
97
97
|
summary: Phantom Forms
|
98
98
|
test_files: []
|
99
|
-
has_rdoc:
|
@@ -1,24 +0,0 @@
|
|
1
|
-
.close-form {
|
2
|
-
position: relative;
|
3
|
-
top: -2px;
|
4
|
-
right: 0px;
|
5
|
-
color: red;
|
6
|
-
font-size: 24px;
|
7
|
-
padding: 0;
|
8
|
-
cursor: pointer;
|
9
|
-
background: transparent;
|
10
|
-
border: 0;
|
11
|
-
-webkit-appearance: none;
|
12
|
-
font-weight: bold;
|
13
|
-
line-height: 1;
|
14
|
-
text-shadow: 0 1px 0 #fff;
|
15
|
-
opacity: .2;
|
16
|
-
float: right;
|
17
|
-
}
|
18
|
-
|
19
|
-
.close-form:hover,.close-form:focus {
|
20
|
-
text-decoration:none;
|
21
|
-
cursor:pointer;
|
22
|
-
opacity:.5;
|
23
|
-
filter:alpha(opacity=50)
|
24
|
-
}
|