mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 21:46:22 +00:00
chore: linting
This commit is contained in:
parent
ae06e3e788
commit
b3a1673795
6 changed files with 21 additions and 18 deletions
|
@ -1,6 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# Implementa la nueva interfaz de
|
# Implementa la nueva interfaz de gestión de valores
|
||||||
class MetadataNewArray < MetadataArray
|
class MetadataNewArray < MetadataArray
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,8 +5,9 @@
|
||||||
@param :action [String] Acción de Stimulus
|
@param :action [String] Acción de Stimulus
|
||||||
@param :target [String] Objetivo de Stimulus
|
@param :target [String] Objetivo de Stimulus
|
||||||
@param [Hash] Atributos en bruto, con mayor prioridad que action y target
|
@param [Hash] Atributos en bruto, con mayor prioridad que action y target
|
||||||
- attributes = local_assigns.to_h.except(:content)
|
:ruby
|
||||||
- attributes[:data] ||= {}
|
attributes = local_assigns.to_h.except(:content)
|
||||||
- attributes[:data][:action] ||= local_assigns[:action]
|
attributes[:data] ||= {}
|
||||||
- attributes[:data][:target] ||= local_assigns[:target]
|
attributes[:data][:action] ||= local_assigns[:action]
|
||||||
|
attributes[:data][:target] ||= local_assigns[:target]
|
||||||
%button.btn.btn-secondary{ type: 'button', **attributes }= content
|
%button.btn.btn-secondary{ type: 'button', **attributes }= content
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
- help_id = "#{id}_help"
|
:ruby
|
||||||
- checkbox_attributes = local_assigns.slice(:id, :type, :name, :value, :required, :checked)
|
help_id = "#{id}_help"
|
||||||
- checkbox_attributes[:type] ||= 'checkbox'
|
checkbox_attributes = local_assigns.slice(:id, :type, :name, :value, :required, :checked)
|
||||||
|
checkbox_attributes[:type] ||= 'checkbox'
|
||||||
|
|
||||||
.custom-control.custom-checkbox
|
.custom-control.custom-checkbox
|
||||||
%input.custom-control-input{ **checkbox_attributes }
|
%input.custom-control-input{ **checkbox_attributes }
|
||||||
|
|
|
@ -18,9 +18,10 @@
|
||||||
- content_for :algo_footer do
|
- content_for :algo_footer do
|
||||||
= 'pie'
|
= 'pie'
|
||||||
|
|
||||||
- local_assigns[:hide_actions] ||= []
|
:ruby
|
||||||
- local_assigns[:hide_actions] << 'click->modal#hide'
|
local_assigns[:hide_actions] ||= []
|
||||||
- local_assigns[:modal_content_attributes] ||= {}
|
local_assigns[:hide_actions] << 'click->modal#hide'
|
||||||
|
local_assigns[:modal_content_attributes] ||= {}
|
||||||
|
|
||||||
.modal.fade{ tabindex: -1, aria: { hidden: 'true' }, data: { target: 'modal.modal' } }
|
.modal.fade{ tabindex: -1, aria: { hidden: 'true' }, data: { target: 'modal.modal' } }
|
||||||
.modal-backdrop.fade{ data: { target: 'modal.backdrop', action: local_assigns[:hide_actions].join(' ') } }
|
.modal-backdrop.fade{ data: { target: 'modal.backdrop', action: local_assigns[:hide_actions].join(' ') } }
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
-#
|
-#
|
||||||
Genera un listado de checkboxes entre los que se puede elegir para guardar
|
Genera un listado de checkboxes entre los que se puede elegir para guardar
|
||||||
- id = "#{base}_#{attribute}"
|
:ruby
|
||||||
- name = "#{base}[#{attribute}][]"
|
id = "#{base}_#{attribute}"
|
||||||
- form_id = "form-#{Nanoid.generate}"
|
name = "#{base}[#{attribute}][]"
|
||||||
|
form_id = "form-#{Nanoid.generate}"
|
||||||
|
|
||||||
%div{ data: { controller: 'modal array', 'array-original-value': metadata.value.to_json, 'array-new-array-value': site_posts_new_array_value_path(site) } }
|
%div{ data: { controller: 'modal array', 'array-original-value': metadata.value.to_json, 'array-new-array-value': site_posts_new_array_value_path(site) } }
|
||||||
.form-group
|
.form-group
|
||||||
|
|
Loading…
Reference in a new issue