five-two-nw-olivander 0.2.0.8 → 0.2.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/controllers/input_control_association_controller.js +0 -4
- data/app/components/olivander/components/resource_form_component.html.haml +17 -16
- data/app/components/olivander/components/resource_form_component.rb +0 -1
- data/lib/olivander/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d03db809e6a048326facbf9b2af1d2a41b97ed6931c338a931e923ce092687e0
|
4
|
+
data.tar.gz: 2f879a0e932ce2732c3a595b3ede5e3c76767c8e69d2ebe50afbfa38793c5d7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f50ce97f66bd83cc7f79e8c17debfeb371be45abf09aed81e722c95cf220a7641e3ccbdf67bd87e139e8c96c7a6595028bb3865e65f160f961d24e84fe574f5
|
7
|
+
data.tar.gz: c036f2874e20c609005eb82143899b7ce2c61dc178e016ba6240d02df763025af0c3e634019219c2827695d875f67ae197ecc36be2f7dc10afda44c2a752a879
|
@@ -3,12 +3,9 @@ import { Controller } from "@hotwired/stimulus"
|
|
3
3
|
// Connects to data-controller="input-control-association"
|
4
4
|
export default class extends Controller {
|
5
5
|
connect() {
|
6
|
-
console.log('setting up select2')
|
7
6
|
var self = this,
|
8
7
|
el = self.element;
|
9
8
|
|
10
|
-
console.log(el.dataset)
|
11
|
-
|
12
9
|
if (!$(el).hasClass("select2-hidden-accessible")) {
|
13
10
|
$(el).select2({
|
14
11
|
dropdownParent: $(el).parent(),
|
@@ -36,7 +33,6 @@ export default class extends Controller {
|
|
36
33
|
}
|
37
34
|
}
|
38
35
|
}).on('select2:select', function (e) {
|
39
|
-
|
40
36
|
let tag = e.params.data;
|
41
37
|
if (tag.isNew === true)
|
42
38
|
{
|
@@ -1,16 +1,17 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
.
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
1
|
+
%div{ data: { controller: "#{@resource.class.name.underscore.gsub('_', '-').gsub('/', '--')}-form" } }
|
2
|
+
- @resource.class.resource_field_groups.select{ |x| x.editable }.each do |rfg|
|
3
|
+
%h3= resource_field_group_label(@resource.class, rfg.key) unless rfg.key == :default
|
4
|
+
- rfg.sections.each do |section|
|
5
|
+
.row
|
6
|
+
- section.fields.each do |field|
|
7
|
+
%div{ class: section.column_class }
|
8
|
+
- if association?(field)
|
9
|
+
- collection = collection_for(field)
|
10
|
+
- if one_through?(field)
|
11
|
+
= @f.input field.sym, collection: [collection].flatten, disabled: !field.editable, input_html: { data: association_data_hash_for(field) }, selected: collection
|
12
|
+
- else
|
13
|
+
= @f.association field.sym, collection: [collection].flatten, disabled: !field.editable, input_html: { data: association_data_hash_for(field) }
|
14
|
+
- elsif boolean?(field)
|
15
|
+
= @f.input field.sym, disabled: !field.editable, as: field.type.to_sym, input_html: { data: { controller: "input-control-#{field.type}" } }
|
16
|
+
- else
|
17
|
+
= @f.input field.sym, disabled: !field.editable, as: field.type.to_sym, input_html: { rows: 10, data: { controller: "input-control-#{field.type}" } }
|
data/lib/olivander/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: five-two-nw-olivander
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.0.
|
4
|
+
version: 0.2.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Dennis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-03-
|
11
|
+
date: 2024-03-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chartkick
|