card-mod-edit 0.11.4 → 0.11.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/set/all/bridge.rb +3 -3
- data/set/all/bridge/related_section.rb +2 -2
- data/set/all/bridge/tab_visibility.rb +1 -1
- data/set/all/edit_name.rb +16 -18
- data/set/all/edit_name_confirmation.haml +7 -0
- data/set/all/edit_type.rb +1 -0
- data/set/all/editor.rb +1 -2
- data/set/all/form.rb +7 -11
- data/set/all/form_buttons.rb +1 -0
- data/set/all/form_elements.rb +1 -0
- data/set/all/template_nest.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a54a9e3aa482aa83ddee3fbca1e2a2ffbbb733124cf681aab56a159e6a943e2
|
4
|
+
data.tar.gz: 7a719d423cb25de68e1974e4d73c87c6719398d0b7e1bb1d787256f93330d6a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c879f60df6bce6723ba0d1d05f2dc423594a5ca02d661640d3d708ab8f66f00dc2b4ca05768166c1fcee10fdb304023ceb4cd6c3f1000159990f290fa7dacc8
|
7
|
+
data.tar.gz: 691b4cff469c27bc9d5e0d64e61074a7b709a00701ff9fce21c0705454407b3ae606b3fefe673991a0c9e564640fd524bdca85087d68e1f7155cd1614b2eef39
|
data/set/all/bridge.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
BRIDGE_TABS = { "Account" => :account_tab,
|
2
|
-
"Guide"
|
3
|
-
"Engage"
|
2
|
+
"Guide" => :guide_tab,
|
3
|
+
"Engage" => :engage_tab,
|
4
4
|
"History" => :history_tab,
|
5
5
|
"Related" => :related_tab,
|
6
|
-
"Rules"
|
6
|
+
"Rules" => :rules_tab }.freeze
|
7
7
|
|
8
8
|
format :html do
|
9
9
|
wrapper :bridge do
|
@@ -17,7 +17,7 @@ format :html do
|
|
17
17
|
|
18
18
|
def related_by_name_items
|
19
19
|
pills = []
|
20
|
-
if card.name.
|
20
|
+
if card.name.compound?
|
21
21
|
pills += card.name.ancestors.map { |a| [a, a, { mark: :absolute }] }
|
22
22
|
end
|
23
23
|
pills += RELATED_ITEMS["by name"]
|
@@ -29,6 +29,6 @@ format :html do
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def related_by_type_items
|
32
|
-
[["#{card.type} cards", [card.type, :type, :by_name], mark: :absolute]]
|
32
|
+
[["#{card.type} cards", [card.type, :type, :by_name], { mark: :absolute }]]
|
33
33
|
end
|
34
34
|
end
|
data/set/all/edit_name.rb
CHANGED
@@ -1,10 +1,8 @@
|
|
1
1
|
format :html do
|
2
|
-
# note: depends on js with selector ".edit_name-view .card-form"
|
3
2
|
view :edit_name, perms: :update do
|
4
3
|
frame { name_form }
|
5
4
|
end
|
6
5
|
|
7
|
-
# note: depends on js with selector ".name_form-view .card-form"
|
8
6
|
view :name_form, perms: :update, wrap: :slot, cache: :never do
|
9
7
|
name_form :edit_name_row
|
10
8
|
end
|
@@ -13,10 +11,11 @@ format :html do
|
|
13
11
|
card_form({ action: :update, id: card.id },
|
14
12
|
"data-main-success": JSON(redirect: true, view: ""),
|
15
13
|
"data-update-origin": "true",
|
14
|
+
class: "_rename-form",
|
16
15
|
success: edit_name_success(success_view)) do
|
17
|
-
[
|
16
|
+
[edit_name_hidden_fields,
|
18
17
|
_render_name_formgroup,
|
19
|
-
|
18
|
+
edit_name_confirmation,
|
20
19
|
edit_name_buttons]
|
21
20
|
end
|
22
21
|
end
|
@@ -27,32 +26,31 @@ format :html do
|
|
27
26
|
success
|
28
27
|
end
|
29
28
|
|
30
|
-
def
|
29
|
+
def edit_name_hidden_fields
|
31
30
|
hidden_tags old_name: card.name, card: { update_referers: false }
|
32
31
|
end
|
33
32
|
|
34
33
|
def edit_name_buttons
|
34
|
+
class_up "button-form-group", "rename-button-form-group"
|
35
35
|
button_formgroup do
|
36
36
|
[rename_and_update_button, rename_button, standard_cancel_button]
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
40
|
+
def edit_name_confirmation
|
41
|
+
alert "warning", false, false, class: "hidden-alert" do
|
42
|
+
haml :edit_name_confirmation, referer_count: card.references_in.count
|
43
|
+
end
|
44
44
|
end
|
45
45
|
|
46
|
-
def
|
47
|
-
|
46
|
+
def rename_and_update_button
|
47
|
+
submit_button text: t(:core_rename_and_update),
|
48
|
+
disable_with: t(:core_renaming),
|
49
|
+
class: "_renamer-updater"
|
48
50
|
end
|
49
51
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
msg << %(<h6>This may change names referred to by other cards.</h6>)
|
54
|
-
msg << %(<p>You may choose to <em>update or ignore</em> the referers.</p>)
|
55
|
-
msg << hidden_field_tag(:referers, 1)
|
56
|
-
alert("warning", false, false, class: "hidden-alert") { msg }
|
52
|
+
def rename_button
|
53
|
+
button_tag t(:core_rename),
|
54
|
+
class: "renamer", data: { disable_with: t(:core_renaming) }
|
57
55
|
end
|
58
56
|
end
|
data/set/all/edit_type.rb
CHANGED
data/set/all/editor.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
1
|
Self::InputOptions.add_to_basket :options, "text area"
|
3
2
|
Self::InputOptions.add_to_basket :options, "text field"
|
4
3
|
|
@@ -46,7 +45,7 @@ format :html do
|
|
46
45
|
|
47
46
|
def text_area_input
|
48
47
|
text_area :content, rows: 5, class: "d0-card-content",
|
49
|
-
"data-card-type-code"
|
48
|
+
"data-card-type-code": card.type_code
|
50
49
|
end
|
51
50
|
|
52
51
|
def text_field_input
|
data/set/all/form.rb
CHANGED
@@ -30,15 +30,13 @@ format :html do
|
|
30
30
|
hidden_field :last_action_id_before_edit, class: "current_revision_id"
|
31
31
|
end
|
32
32
|
|
33
|
-
def wrap_content_formgroup
|
33
|
+
def wrap_content_formgroup &block
|
34
34
|
formgroup("Content", input: :content, help: false,
|
35
|
-
class: classy("card-editor"))
|
35
|
+
class: classy("card-editor"), &block)
|
36
36
|
end
|
37
37
|
|
38
|
-
def button_formgroup
|
39
|
-
wrap_with :div, class:
|
40
|
-
wrap_with :div, yield
|
41
|
-
end
|
38
|
+
def button_formgroup &block
|
39
|
+
wrap_with :div, class: "form-group #{classy 'button-form-group'}", &block
|
42
40
|
end
|
43
41
|
|
44
42
|
def name_field
|
@@ -234,18 +232,16 @@ format :html do
|
|
234
232
|
end
|
235
233
|
end
|
236
234
|
|
237
|
-
def editor_wrap type=nil
|
235
|
+
def editor_wrap type=nil, &block
|
238
236
|
html_class = "editor"
|
239
237
|
html_class << " #{type}-editor" if type
|
240
|
-
wrap_with :div, class: html_class
|
241
|
-
yield
|
242
|
-
end
|
238
|
+
wrap_with :div, class: html_class, &block
|
243
239
|
end
|
244
240
|
|
245
241
|
# FIELD VIEWS
|
246
242
|
|
247
243
|
def add_junction_class
|
248
|
-
return unless card.name.
|
244
|
+
return unless card.name.compound?
|
249
245
|
|
250
246
|
class_up "card-editor", "RIGHT-#{card.name.tag_name.safe_key}"
|
251
247
|
end
|
data/set/all/form_buttons.rb
CHANGED
data/set/all/form_elements.rb
CHANGED
@@ -52,6 +52,7 @@ format :html do
|
|
52
52
|
# redirect to *previous if no :href is given
|
53
53
|
def cancel_button args={}
|
54
54
|
return unless voo.show? :cancel_button
|
55
|
+
|
55
56
|
text = args.delete(:text) || "Cancel"
|
56
57
|
add_class args, "btn btn-#{args.delete(:situation) || 'secondary'}"
|
57
58
|
add_class args, cancel_strategy(args[:redirect], args[:href])
|
data/set/all/template_nest.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: card-mod-edit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ethan McCutchen
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-05-
|
13
|
+
date: 2021-05-10 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: card
|
@@ -18,14 +18,14 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.101.
|
21
|
+
version: 1.101.5
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - '='
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 1.101.
|
28
|
+
version: 1.101.5
|
29
29
|
description: ''
|
30
30
|
email:
|
31
31
|
- info@decko.org
|
@@ -43,6 +43,7 @@ files:
|
|
43
43
|
- set/all/edit_content.rb
|
44
44
|
- set/all/edit_inline.rb
|
45
45
|
- set/all/edit_name.rb
|
46
|
+
- set/all/edit_name_confirmation.haml
|
46
47
|
- set/all/edit_type.rb
|
47
48
|
- set/all/editing.rb
|
48
49
|
- set/all/editor.rb
|