activeadmin_expandable_inputs 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0099f059c8e83260cff5380662f1522b08206d0f
|
4
|
+
data.tar.gz: 301f876656a2402a4fffe5bff56021773b2152d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 587ff0be6cca4ea25fe92e8ea6a00a8b279aaffbf2c9f48f6aae1508d35c24774002b1902fdc820bb493b0cdefb20dfbbe480e435a828f4dc7ca7bc645b16272
|
7
|
+
data.tar.gz: 50bd5a9784a2ac74bc0168593025d86cd426f5ba416c4c99443c06ceda99a6ec907cb6c8aca0e5af586536793cc17550f50806c801b5142cfe6ce01d63f0a6d2
|
data/README.md
CHANGED
@@ -32,13 +32,13 @@ Add to application.css
|
|
32
32
|
```
|
33
33
|
### Create expandable elements
|
34
34
|
|
35
|
-
Add the class 'expandable' and 'in' (if you want it to start expanded) or 'out' (to start closed)
|
35
|
+
Add the class 'expandable' and 'in' (if you want it to start expanded) or 'out' (to start closed). Don't forget to put the class 'inputs' so you don't lose the box style.
|
36
36
|
|
37
37
|
Example:
|
38
38
|
```ruby
|
39
39
|
ActiveAdmin.register AdminUser do
|
40
40
|
form do |f|
|
41
|
-
f.inputs "Admin Details", :class => 'expandable in' do
|
41
|
+
f.inputs "Admin Details", :class => 'inputs expandable in' do
|
42
42
|
f.input :email
|
43
43
|
f.input :password
|
44
44
|
f.input :password_confirmation
|
@@ -64,7 +64,7 @@ ActiveAdmin.register Post do
|
|
64
64
|
end
|
65
65
|
|
66
66
|
# The legend added to the inputs box it's based on the new_record button text. In this case, the text in the button will be 'Add Theme'. So the legend, will be 'Theme'.
|
67
|
-
f.has_many :categories, :allow_destroy => true, :heading => 'Themes', :new_record => 'Add Theme', :class => 'expandable in' do |cf|
|
67
|
+
f.has_many :categories, :allow_destroy => true, :heading => 'Themes', :new_record => 'Add Theme', :class => 'inputs expandable in' do |cf|
|
68
68
|
cf.input :title
|
69
69
|
end
|
70
70
|
f.actions
|
@@ -1 +1 @@
|
|
1
|
-
(function(){var e,t,n;n=typeof exports!="undefined"&&exports!==null?exports:this,$(function(){return $(".expandable").each(function(){return n.set_collapse($(this))})}),$(function(){return $(".button.has_many_add").click(function(e){return t($(this))})}),t=function(t){var r;return r=t.parents(".has_many_container"),n.delay(10,function(){var t;return t=r.find(".expandable:last"),e(t),n.set_collapse(t)})},n.set_collapse=function(e){var t;return t=e.children("legend:first"),t.click(function(t){return t.preventDefault(),e.children("ol:first").toggle("fast",function(){return e.hasClass("in")?(e.removeClass("in"),e.addClass("out")):(e.addClass("in"),e.removeClass("out"))})})},e=function(e,t){var n;t==null&&(t=void 0);if(e.children("legend").length<1)return t===void 0&&(t=e.parents(".has_many_container").find(".button.has_many_add").text().split(" ").slice(1).join(" ")),n=$("<legend>").append($("<span>").text(t)),e.prepend(n)},$(function(){return $(".expandable.out").each(function(){return $(this).find("ol:first").css({display:"none"})})})}).call(this);
|
1
|
+
(function(){var e,t,n;n=typeof exports!="undefined"&&exports!==null?exports:this,$(function(){return $(".expandable").each(function(){return n.set_collapse($(this))})}),$(function(){return $(".button.has_many_add").click(function(e){return t($(this))})}),t=function(t){var r;return r=t.parents(".has_many_container"),n.delay(10,function(){var t;return t=r.find(".expandable:last"),e(t),n.set_collapse(t)})},n.set_collapse=function(e){var t;return t=e.children("legend:first"),t.click(function(t){return t.preventDefault(),e.children("ol:first").toggle("fast",function(){return e.hasClass("in")?(e.removeClass("in"),e.addClass("out")):(e.addClass("in"),e.removeClass("out"))})})},e=function(e,t){var n;t==null&&(t=void 0);if(e.children("legend").length<1)return t===void 0&&(t=e.parents(".has_many_container").find(".button.has_many_add:last").text().split(" ").slice(1).join(" ")),n=$("<legend>").append($("<span>").text(t)),e.prepend(n)},$(function(){return $(".expandable.out").each(function(){return $(this).find("ol:first").css({display:"none"})})})}).call(this);
|
@@ -1 +1 @@
|
|
1
|
-
.expandable legend{position:relative;width:100%}.expandable legend:after,.expandable legend:before{position:absolute;right:10px;top:5px;z-index:1;text-shadow:#fff 0 1px 0;font-size:1em;font-weight:700;line-height:18px;color:#5e6469}.expandable legend:after{content:"Expandir +"}.expandable legend:before{content:"Minimizar -"}.expandable.in legend:before{display:block}.expandable.in legend:after,.expandable.out legend:before{display:none}.expandable.out legend:after{display:block}form .inputs ol li.input fieldset legend span{position:static;margin-bottom:.5em}form .inputs ol li.input fieldset ol{padding:0;width:100%}form .inputs ol li.input fieldset ol li{padding:10px}
|
1
|
+
.expandable legend{position:relative;width:100%}.expandable legend:after,.expandable legend:before{position:absolute;right:10px;top:5px;z-index:1;text-shadow:#fff 0 1px 0;font-size:1em;font-weight:700;line-height:18px;color:#5e6469}.expandable legend:after{content:"Expandir +"}.expandable legend:before{content:"Minimizar -"}.expandable.in legend:before{display:block}.expandable.in legend:after,.expandable.out legend:before{display:none}.expandable.out legend:after{display:block}form .inputs ol li.input fieldset legend span{position:static;margin-bottom:.5em}form .inputs ol li.input fieldset ol{padding:0;width:100%}form .inputs ol li.input fieldset ol li{padding:10px}fieldset.inputs{box-shadow: 0 0 5px;rgba(0, 0, 0, 0.5)}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activeadmin_expandable_inputs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ariel Schvartz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|