five-two-nw-olivander 0.2.0.13 → 0.2.0.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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aed9cd5294bad36b42c4ccf1bf3e5cc42a1143840b5dd26567d72e3bdabccc70
|
4
|
+
data.tar.gz: c3ea995ad812717f1ebe0741e398db06c4c7dc5171518da53ca81b0ac307a57b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a098d569b60f79a1c76e7b3858110f1c6ca670c12e95009af0f1669a0877748aaa528e0ee085fcfbef498a9dbd690d126cf3ca14c35d71232088be4dd2de1d7a
|
7
|
+
data.tar.gz: ee64f8f78f9ace8439bd0235099238f80cfc5c6702de1c1c5ff0fa900fb09986fc2bc33bf3e6e1e614bc10832210b770d10b7ebf78ef1886af1fbfc16bbeea4e
|
@@ -3,7 +3,6 @@ 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')
|
7
6
|
var self = this,
|
8
7
|
el = self.element;
|
9
8
|
|
@@ -12,6 +11,7 @@ export default class extends Controller {
|
|
12
11
|
dropdownParent: $(el).parent(),
|
13
12
|
minimumInputLength: el.dataset.minimumInputLength || 0,
|
14
13
|
tags: el.dataset.taggable == 'true',
|
14
|
+
placeholder: el.dataset.placeholder || 'Select...',
|
15
15
|
createTag: function (tag) {
|
16
16
|
return {
|
17
17
|
id: tag.term,
|
@@ -53,6 +53,24 @@ module Olivander
|
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
56
|
+
def show
|
57
|
+
Rails.logger.info 'Processed by Effective::CrudController#show'
|
58
|
+
|
59
|
+
self.resource ||= resource_scope.find(params[:id])
|
60
|
+
|
61
|
+
EffectiveResources.authorize!(self, :show, resource)
|
62
|
+
@page_title ||= resource.to_s
|
63
|
+
|
64
|
+
run_callbacks(:resource_render)
|
65
|
+
|
66
|
+
respond_to do |format|
|
67
|
+
format.html { }
|
68
|
+
format.js { render('show', formats: :js) }
|
69
|
+
format.json { render json: resource }
|
70
|
+
format.turbo_stream {}
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
56
74
|
def permitted_params
|
57
75
|
params.fetch(resource_klass.name.underscore.gsub('/', '_').to_sym, {}).permit!
|
58
76
|
end
|
@@ -79,6 +97,7 @@ module Olivander
|
|
79
97
|
)
|
80
98
|
end
|
81
99
|
end
|
100
|
+
format.json { render json: resource }
|
82
101
|
end
|
83
102
|
elsif template_present?(action)
|
84
103
|
respond_to do |format|
|
@@ -6,13 +6,19 @@ class DateTimeInput < SimpleForm::Inputs::Base
|
|
6
6
|
|
7
7
|
disabled = options[:disabled] || false
|
8
8
|
|
9
|
-
|
9
|
+
hash = { id: "#{attribute_name}_datetimepicker", class: 'form-control', value: raw_value, disabled: disabled, 'data-toggle': 'datetimepicker', 'data-target': "##{attribute_name}_datetimepicker" }
|
10
|
+
data = options[:data]
|
11
|
+
data.keys.each do |d|
|
12
|
+
hash["data-#{d.to_s.dasherize}".to_sym] = data[d]
|
13
|
+
end
|
14
|
+
field = @builder.text_field(attribute_name, hash)
|
10
15
|
|
11
16
|
add_on_class = options[:add_on_class] || "fa fa-calendar"
|
12
17
|
|
13
18
|
add_on = template.content_tag(:div, class: "input-group-prepend") do
|
14
19
|
add_on = template.content_tag(:div, class: "input-group-text") do
|
15
|
-
|
20
|
+
hash = { class: add_on_class, 'data-toggle': 'datetimepicker', 'data-target': "##{attribute_name}_datetimepicker" }
|
21
|
+
template.content_tag(:i, '', hash)
|
16
22
|
end
|
17
23
|
end
|
18
24
|
|
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.14
|
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-04-
|
11
|
+
date: 2024-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chartkick
|