card-mod-edit 0.15.4 → 0.15.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/script/{bridge.js.coffee → board.js.coffee} +6 -6
- data/assets/script/doubleclick.js.coffee +1 -1
- data/assets/style/{bridge.scss → board.scss} +24 -16
- data/assets/style/edit.scss +1 -1
- data/data/files/mod_edit_script_asset_output/file.js +3 -3
- data/set/all/board/board.haml +8 -0
- data/set/all/board/board_pills.rb +47 -0
- data/set/all/{bridge → board}/follow_section.rb +9 -9
- data/set/all/{bridge → board}/tab_views.rb +2 -2
- data/set/all/{bridge → board}/tab_visibility.rb +2 -2
- data/set/all/{bridge.rb → board.rb} +28 -27
- data/set/all/edit_content.rb +1 -1
- data/set/all/edit_inline/edit_row.haml +7 -0
- data/set/all/edit_inline.rb +8 -8
- data/set/all/edit_type.rb +3 -3
- data/set/all/editing.rb +5 -5
- data/set/all/formgroup.rb +3 -2
- data/set/all/new.rb +1 -1
- data/set/all/overlay_guide.rb +1 -1
- metadata +19 -18
- data/set/all/bridge/bridge.haml +0 -8
- data/set/all/bridge/bridge_pills.rb +0 -47
- /data/set/all/{bridge → board}/related_section.rb +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9ab22d7ed51be0314220e919e0313def0e64bb22acff216a5d668079e6f9b45
|
4
|
+
data.tar.gz: 5f126766dc630c5ec54b75b36a6812067027f2eeaef36a9593e8f4ef6746b5ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12ad4f6cf020e2a1a00105ad9fda2271acb51def20a70b6c1015e2055f14987ba11798a4fde40fbe85037e5e7b732deddd5e88b16c8ebefe5191d6a436d3cf8d
|
7
|
+
data.tar.gz: 3b46d8d3981a2a597b4ecf71e3f15ded4b83bb6704fed7f82b76e3d8d4031d94cba5ba818fbe058a57f04a9f973c6351a88492422322a523145fe0500a725771
|
@@ -1,25 +1,25 @@
|
|
1
1
|
decko.slot.ready (slot, slotter) ->
|
2
|
-
slot.
|
2
|
+
slot.updateBoard(false, slotter)
|
3
3
|
|
4
4
|
links = slot.find('ul._auto-single-select > li.nav-item > a.nav-link')
|
5
5
|
if links.length == 1
|
6
6
|
$(links[0]).click()
|
7
7
|
|
8
8
|
jQuery.fn.extend
|
9
|
-
# overlayClosed=true means the
|
9
|
+
# overlayClosed=true means the board update was
|
10
10
|
# triggered by closing an overlay
|
11
|
-
|
12
|
-
return unless @closest(".
|
11
|
+
updateBoard: (overlayClosed=false, slotter) ->
|
12
|
+
return unless @closest(".board").length > 0
|
13
13
|
if @data("breadcrumb")
|
14
14
|
@updateBreadcrumb()
|
15
15
|
else if slotter and $(slotter).data("breadcrumb")
|
16
16
|
$(slotter).updateBreadcrumb()
|
17
17
|
|
18
18
|
if overlayClosed
|
19
|
-
$(".
|
19
|
+
$(".board-pills > .nav-item > .nav-link.active").removeClass("active")
|
20
20
|
|
21
21
|
updateBreadcrumb: () ->
|
22
|
-
bc_item = $(".modal-header .
|
22
|
+
bc_item = $(".modal-header ._board-breadcrumb li:last-child")
|
23
23
|
bc_item.text(this.data("breadcrumb"))
|
24
24
|
bc_item.attr("class", "breadcrumb-item active #{this.data('breadcrumb-class')}")
|
25
25
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
//
|
2
|
+
// Board
|
3
3
|
._modal-stack {
|
4
4
|
z-index: 1010;
|
5
5
|
}
|
@@ -18,9 +18,9 @@
|
|
18
18
|
}
|
19
19
|
}
|
20
20
|
|
21
|
-
$
|
21
|
+
$board-line-color: $border-color;
|
22
22
|
|
23
|
-
.
|
23
|
+
.board-sidebar {
|
24
24
|
background-color: darken($body-bg, 15%);
|
25
25
|
padding-left: 0;
|
26
26
|
padding-right: 0;
|
@@ -36,23 +36,31 @@ $bridge-line-color: $border-color;
|
|
36
36
|
background-color: $body-bg !important;
|
37
37
|
}
|
38
38
|
|
39
|
-
.
|
40
|
-
border-right: 1px solid $
|
39
|
+
.board-main {
|
40
|
+
border-right: 1px solid $board-line-color;
|
41
41
|
padding-left: 0;
|
42
42
|
padding-right: 0;
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
43
|
+
|
44
|
+
> .overlay-container {
|
45
|
+
> .board-view {
|
46
|
+
padding-top: 0px;
|
47
|
+
}
|
48
|
+
|
49
|
+
> .card-slot > .d0-card-frame > .d0-card-body {
|
50
|
+
padding: 1em;
|
51
|
+
}
|
47
52
|
}
|
48
|
-
|
49
|
-
|
53
|
+
|
54
|
+
> ._overlay-container-placeholder > .board-view {
|
55
|
+
padding-top: 1em;
|
56
|
+
padding-left: 1.5em;
|
57
|
+
padding-right: 1.5em;
|
50
58
|
}
|
51
59
|
}
|
52
60
|
|
53
61
|
|
54
62
|
|
55
|
-
.
|
63
|
+
.board-pills {
|
56
64
|
.help-text {
|
57
65
|
font-size: 0.8rem;
|
58
66
|
}
|
@@ -72,7 +80,7 @@ $bridge-line-color: $border-color;
|
|
72
80
|
}
|
73
81
|
}
|
74
82
|
|
75
|
-
.
|
83
|
+
.board {
|
76
84
|
.perm-editor {
|
77
85
|
margin-left: 0;
|
78
86
|
}
|
@@ -89,13 +97,13 @@ $bridge-line-color: $border-color;
|
|
89
97
|
}
|
90
98
|
li.radio {
|
91
99
|
padding: 10px 0px 0px 15px;
|
92
|
-
border-left: 1px solid $
|
93
|
-
border-top: 1px solid $
|
100
|
+
border-left: 1px solid $board-line-color;
|
101
|
+
border-top: 1px solid $board-line-color;
|
94
102
|
margin-top: 10px;
|
95
103
|
}
|
96
104
|
}
|
97
105
|
|
98
|
-
.
|
106
|
+
.board-sidebar {
|
99
107
|
.history_tab-view > div {
|
100
108
|
margin: 0.5rem;
|
101
109
|
}
|
data/assets/style/edit.scss
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
// autosave.js.coffee
|
2
2
|
(function(){jQuery.fn.extend({autosave:function(){var t,a,e,r,n;if(r=this.slot(),!this.attr("no-autosave")){if((e=this.closest(".form-group"))[0]){if(!(a=e.data("cardId")))return;": "+e.data("cardName")}else a=r.data("cardId"),"";if(a)return n=decko.path("update/~"+a),t=$("#edit_card_"+a).serializeArray().reduce(function(t,a){return t[a.name]=a.value,t},{draft:"true","success[view]":"blank"}),$.ajax(n,{data:t,type:"POST"})}}}),$(window).ready(function(){return $("body").on("change",".autosave .d0-card-content",function(){var t;return t=$(this),setTimeout(function(){return t.autosave()},500)})})}).call(this);
|
3
|
-
//
|
4
|
-
(function(){decko.slot.ready(function(e,t){var
|
3
|
+
// board.js.coffee
|
4
|
+
(function(){decko.slot.ready(function(e,t){var a;if(e.updateBoard(!1,t),1===(a=e.find("ul._auto-single-select > li.nav-item > a.nav-link")).length)return $(a[0]).click()}),jQuery.fn.extend({updateBoard:function(e,t){if(null==e&&(e=!1),this.closest(".board").length>0)return this.data("breadcrumb")?this.updateBreadcrumb():t&&$(t).data("breadcrumb")&&$(t).updateBreadcrumb(),e?$(".board-pills > .nav-item > .nav-link.active").removeClass("active"):void 0},updateBreadcrumb:function(){var e;return(e=$(".modal-header ._board-breadcrumb li:last-child")).text(this.data("breadcrumb")),e.attr("class","breadcrumb-item active "+this.data("breadcrumb-class"))}}),$(window).ready(function(){return $("body").on("select2:select","._close-rule-overlay-on-select",function(){return $(".overlay-container > ._overlay.card-slot.overlay_rule-view.RULE").removeOverlay()}),$("body").on("click","._update-history-pills",function(){return $(this).closest(".slotter").data("update-foreign-slot",".card-slot.history_tab-view")})})}).call(this);
|
5
5
|
// components.js.coffee
|
6
6
|
(function(){var t;t=null,$(window).ready(function(){return $("body").on("change","._submit-on-change",function(t){return $(t.target).closest("form").submit(),!1}),$("body").on("input","._submit-after-typing",function(e){return $(e.target).closest("form").slot().find(".autosubmit-success-notification").remove(),t&&clearTimeout(t),t=setTimeout(function(){return $(e.target).closest("form").submit(),t=null},1e3)}),$("body").on("keydown","._submit-after-typing",function(e){if(13===e.which)return t&&clearTimeout(t),t=null,$(e.target).closest("form").submit(),!1}),$("body").on("change","._edit-item",function(t){var e;return(e=$(t.target)).attr("name",e.is(":checked")?"add_item":"drop_item"),$(t.target).closest("form").submit(),!1})})}).call(this);
|
7
7
|
// doubleclick.js.coffee
|
8
|
-
(function(){var t,n,i
|
8
|
+
(function(){var t,n,r,i;$(window).ready(function(){var n;if(n={off:!1,on:!0,signed_in:decko.currentUserId},function(){return n[decko.doubleClick]}())return $("body").on("dblclick","div",function(){return t($(this))&&i($(this)),!1})}),t=function(t){return![".nodblclick",".d0-card-header",".card-editor"].some(function(n){return t.closest(n)[0]})&&null==t.slot().find(".card-editor")[0]},i=function(t){var i,e,d,o;return d=t.slot(),(i=n(d))?i.click():(e=r(d),o=decko.path("~"+d.data("cardId")+"?view="+e),d.slotReload(o))},n=function(t){var n;return!!(n=t.find(".edit-link").filter(function(n,r){return $(r).slot().data("slotId")===t.data("slotId")}))[0]&&$(n[0])},r=function(t){switch(t.data("slot").edit){case"inline":return"edit_inline";case"full":return"board";default:return"edit"}}}).call(this);
|
9
9
|
// editor.js.coffee
|
10
10
|
(function(){decko.editors.init.textarea=function(){return $(this).autosize()},$.extend(decko,{contentLoaded:function(t,n){var e;return decko.initializeEditors(t),null!=(e=n.attr("notify-success"))&&t.notify(e,"success"),t.triggerSlotReady(n)},initializeEditors:function(t,n){return null==n&&(n=decko.editors.init),$.each(n,function(n,e){return $.each(t.find(n),function(){return e.call($(this))})})}}),jQuery.fn.extend({contentField:function(){return this.closest(".card-editor").find(".d0-card-content")},setContentFieldsFromMap:function(t){var n;return null==t&&(t=decko.editors.content),n=$(this),$.each(t,function(t,e){return n.setContentFields(t,e)})},setContentFields:function(t,n){return $.each(this.find(t),function(){return $(this).setContentField(n)})},setContentField:function(t){var n,e,i;if(e=(n=this.contentField()).val(),i=t.call(this),n.val(i),e!==i)return n.change()}}),$(window).ready(function(){return setTimeout(function(){return decko.initializeEditors($("body > :not(.modal)"))},10),$("body").on("submit",".card-form",function(){return $(this).setContentFieldsFromMap(),$(this).find(".d0-card-content").attr("no-autosave","true"),!0})}),setInterval(function(){return $(".card-form").setContentFieldsFromMap()},2e4)}).call(this);
|
11
11
|
// name_editor.js.coffee
|
@@ -0,0 +1,47 @@
|
|
1
|
+
format :html do
|
2
|
+
BOARD_PILL_UL_CLASSES =
|
3
|
+
"nav nav-pills _auto-single-select board-pills flex-column".freeze
|
4
|
+
|
5
|
+
BOARD_PILL_LI_CLASSES = "nav-item".freeze
|
6
|
+
|
7
|
+
def board_pills items
|
8
|
+
list_tag class: BOARD_PILL_UL_CLASSES, items: { class: BOARD_PILL_LI_CLASSES } do
|
9
|
+
items
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def board_pill_items data, breadcrumb
|
14
|
+
data.map do |text, field, extra_opts|
|
15
|
+
opts = board_pill_item_opts breadcrumb, extra_opts, text
|
16
|
+
mark = opts.delete(:mark) == :absolute ? field : [card, field]
|
17
|
+
link_to_card mark, text, opts
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def board_pill_item_opts breadcrumb, extra_opts, text
|
22
|
+
opts = board_link_opts.merge("data-bs-toggle": "pill")
|
23
|
+
opts.merge! breadcrumb_data(breadcrumb)
|
24
|
+
|
25
|
+
if extra_opts
|
26
|
+
classes = extra_opts.delete :class
|
27
|
+
add_class opts, classes if classes
|
28
|
+
opts.deep_merge! extra_opts
|
29
|
+
end
|
30
|
+
opts["data-cy"] = "#{text.to_name.key}-pill"
|
31
|
+
add_class opts, "nav-link"
|
32
|
+
opts
|
33
|
+
end
|
34
|
+
|
35
|
+
def board_pill_sections tab_name
|
36
|
+
wrap_with :ul, class: BOARD_PILL_UL_CLASSES do
|
37
|
+
yield.map { |args| board_pill_section(tab_name, *args) }
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def board_pill_section tab_name, title, items
|
42
|
+
wrap_with(:h6, title, class: "ms-1 mt-3") +
|
43
|
+
wrap_each_with(:li, class: BOARD_PILL_LI_CLASSES) do
|
44
|
+
board_pill_items(items, tab_name)
|
45
|
+
end.html_safe
|
46
|
+
end
|
47
|
+
end
|
@@ -3,7 +3,7 @@ format :html do
|
|
3
3
|
return unless show_follow?
|
4
4
|
|
5
5
|
wrap_with :div, class: "mb-3" do
|
6
|
-
[follow_button_group,
|
6
|
+
[follow_button_group, followers_board_link, follow_overview_button]
|
7
7
|
end
|
8
8
|
end
|
9
9
|
|
@@ -15,23 +15,23 @@ format :html do
|
|
15
15
|
|
16
16
|
def follow_overview_button
|
17
17
|
link_to_card [Auth.current, :follow], "all followed cards",
|
18
|
-
|
19
|
-
|
18
|
+
board_link_opts(class: "btn btn-sm btn-secondary",
|
19
|
+
"data-cy": "follow-overview")
|
20
20
|
end
|
21
21
|
|
22
22
|
def follow_advanced
|
23
|
-
opts =
|
24
|
-
|
25
|
-
|
23
|
+
opts = board_link_opts(class: "btn btn-sm btn-primary",
|
24
|
+
path: { view: :overlay_rule },
|
25
|
+
"data-cy": "follow-advanced")
|
26
26
|
opts[:path].delete :layout
|
27
27
|
link_to_card card.follow_rule_card(Auth.current.name, new: {}),
|
28
28
|
icon_tag("more_horiz"), opts
|
29
29
|
end
|
30
30
|
|
31
|
-
def
|
31
|
+
def followers_board_link
|
32
32
|
cnt = card.followers_count
|
33
33
|
link_to_card card.name.field(:followers), "#{cnt} follower#{'s' unless cnt == 1}",
|
34
|
-
|
35
|
-
|
34
|
+
board_link_opts(class: "btn btn-sm ms-2 btn-secondary slotter",
|
35
|
+
remote: true, "data-cy": "followers")
|
36
36
|
end
|
37
37
|
end
|
@@ -6,11 +6,11 @@ format :html do
|
|
6
6
|
view :history_tab, wrap: :slot do
|
7
7
|
class_up "d0-card-body", "history-slot"
|
8
8
|
voo.hide :act_legend
|
9
|
-
|
9
|
+
acts_board_layout card.history_acts
|
10
10
|
end
|
11
11
|
|
12
12
|
view :related_tab do
|
13
|
-
|
13
|
+
board_pill_sections "Related" do
|
14
14
|
%w[name content type].map do |section_name|
|
15
15
|
["by #{section_name}", send("related_by_#{section_name}_items")]
|
16
16
|
end
|
@@ -1,43 +1,43 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
BOARD_TABS = { "Account" => :account_tab,
|
2
|
+
"Guide" => :guide_tab,
|
3
|
+
"Engage" => :engage_tab,
|
4
|
+
"History" => :history_tab,
|
5
|
+
"Related" => :related_tab,
|
6
|
+
"Rules" => :rules_tab }.freeze
|
7
7
|
|
8
|
-
|
8
|
+
BOARD_TAB_NAMES = BOARD_TABS.invert.freeze
|
9
9
|
|
10
10
|
format :html do
|
11
|
-
wrapper :
|
11
|
+
wrapper :board do
|
12
12
|
class_up "modal-dialog", "no-gaps"
|
13
13
|
voo.hide! :modal_footer
|
14
14
|
wrap_with_modal(size: :full,
|
15
|
-
title:
|
16
|
-
menu: :
|
17
|
-
haml :
|
15
|
+
title: board_breadcrumbs,
|
16
|
+
menu: :board_menu) do
|
17
|
+
haml :board
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
-
def
|
21
|
+
def board_tabs
|
22
22
|
wrap do
|
23
|
-
tabs(
|
24
|
-
_render
|
23
|
+
tabs(visible_board_tabs, BOARD_TAB_NAMES[board_tab], load: :lazy) do
|
24
|
+
_render board_tab
|
25
25
|
end
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
-
def
|
30
|
-
@
|
29
|
+
def board_tab
|
30
|
+
@board_tab ||= board_param :tab
|
31
31
|
end
|
32
32
|
|
33
|
-
def
|
34
|
-
params.dig(:
|
33
|
+
def board_param key
|
34
|
+
params.dig(:board, key)&.to_sym || try("default_board_#{key}")
|
35
35
|
end
|
36
36
|
|
37
|
-
def
|
37
|
+
def board_breadcrumbs
|
38
38
|
<<-HTML.strip_heredoc
|
39
39
|
<nav aria-label="breadcrumb">
|
40
|
-
<ol class="breadcrumb
|
40
|
+
<ol class="breadcrumb _board-breadcrumb">
|
41
41
|
<li class="breadcrumb-item">#{card.name}</li>
|
42
42
|
<li class="breadcrumb-item active">Edit</li>
|
43
43
|
</ol>
|
@@ -45,22 +45,23 @@ format :html do
|
|
45
45
|
HTML
|
46
46
|
end
|
47
47
|
|
48
|
-
def
|
49
|
-
opts[:"data-slot-selector"] =
|
48
|
+
def board_link_opts opts={}
|
49
|
+
opts[:"data-slot-selector"] = board_slot_selector
|
50
50
|
opts[:"data-slotter-mode"] = :override
|
51
51
|
opts[:remote] = true
|
52
52
|
add_class opts, "slotter"
|
53
53
|
opts.bury :path, :layout, :overlay
|
54
|
+
opts.bury :path, :slot, :items, :view, :accordion_bar
|
54
55
|
opts[:path][:view] ||= :content
|
55
56
|
opts
|
56
57
|
end
|
57
58
|
|
58
|
-
def
|
59
|
-
".
|
60
|
-
".
|
59
|
+
def board_slot_selector
|
60
|
+
".board-main > .overlay-container > .card-slot._bottomlay-slot," \
|
61
|
+
".board-main > ._overlay-container-placeholder > .card-slot"
|
61
62
|
end
|
62
63
|
|
63
|
-
def
|
64
|
+
def default_board_tab
|
64
65
|
show_guide_tab? ? :guide_tab : :engage_tab
|
65
66
|
end
|
66
67
|
|
@@ -69,7 +70,7 @@ format :html do
|
|
69
70
|
{ "data-breadcrumb": title, "data-breadcrumb-class": html_class }
|
70
71
|
end
|
71
72
|
|
72
|
-
def
|
73
|
+
def board_menu
|
73
74
|
wrap_with_modal_menu do
|
74
75
|
[
|
75
76
|
close_modal_window,
|
data/set/all/edit_content.rb
CHANGED
data/set/all/edit_inline.rb
CHANGED
@@ -14,7 +14,7 @@ format :html do
|
|
14
14
|
end
|
15
15
|
|
16
16
|
view :edit_name_row do
|
17
|
-
|
17
|
+
edit_row "Name", card.name, :name_form
|
18
18
|
end
|
19
19
|
|
20
20
|
view :edit_inline_buttons do
|
@@ -24,22 +24,22 @@ format :html do
|
|
24
24
|
end
|
25
25
|
|
26
26
|
# TODO: better styling for this so that is reusable
|
27
|
-
# At the moment it is used for the name and type field in the
|
27
|
+
# At the moment it is used for the name and type field in the board
|
28
28
|
# (with fixed 50px width for the title column) and
|
29
29
|
# for password and email for accounts (with fixed 75px width for the title column)
|
30
30
|
# The view is very similar to labeled but with fixed edit link on the right
|
31
31
|
# and a fixed width for the labels so that the content column is aligned
|
32
32
|
# There is also the problem that label and content are not vertically aligned
|
33
33
|
view :edit_row do
|
34
|
-
|
34
|
+
edit_row render_title, render_core, :edit_inline
|
35
35
|
end
|
36
36
|
|
37
|
-
def
|
37
|
+
def edit_row title, content, edit_view
|
38
38
|
class_up "card-slot", "d-flex form-group"
|
39
|
-
wrap do
|
40
|
-
|
41
|
-
|
42
|
-
|
39
|
+
wrap true, class: :row do
|
40
|
+
haml :edit_row, title: title,
|
41
|
+
content: content,
|
42
|
+
edit_link: edit_inline_link(edit_view)
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
data/set/all/edit_type.rb
CHANGED
@@ -16,12 +16,12 @@ format :html do
|
|
16
16
|
end
|
17
17
|
|
18
18
|
view :edit_type_row do
|
19
|
-
return
|
19
|
+
return _render_board_type_formgroup if voo.visible?(:type_form) { false }
|
20
20
|
|
21
|
-
|
21
|
+
edit_row "Type", link_to_card(card.type), :board_type_formgroup
|
22
22
|
end
|
23
23
|
|
24
|
-
view :
|
24
|
+
view :board_type_formgroup, unknown: true, wrap: :slot do
|
25
25
|
type_formgroup href: path(mark: card.id,
|
26
26
|
view: :edit_form,
|
27
27
|
assign: true,
|
data/set/all/editing.rb
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
format :html do
|
2
2
|
###---( TOP_LEVEL (used by menu) NEW / EDIT VIEWS )
|
3
|
-
view :
|
3
|
+
view :board, perms: :update, unknown: true, cache: :never, wrap: :board do
|
4
4
|
with_nest_mode :edit do
|
5
5
|
add_name_context
|
6
6
|
voo.show :help
|
7
7
|
wrap true, breadcrumb_data("Editing", "edit") do
|
8
|
-
|
8
|
+
board_parts
|
9
9
|
end
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
|
-
view :cardboard, :
|
13
|
+
view :cardboard, :board
|
14
14
|
|
15
|
-
def
|
15
|
+
def board_parts
|
16
16
|
voo.show! :edit_type_row
|
17
17
|
|
18
18
|
[
|
@@ -48,7 +48,7 @@ format :html do
|
|
48
48
|
end
|
49
49
|
|
50
50
|
view :edit_rules, cache: :never, unknown: true do
|
51
|
-
nest current_set_card, view: :
|
51
|
+
nest current_set_card, view: :board_rules_tab
|
52
52
|
end
|
53
53
|
|
54
54
|
view :edit_structure, cache: :never do
|
data/set/all/formgroup.rb
CHANGED
@@ -34,8 +34,9 @@ format :html do
|
|
34
34
|
|
35
35
|
def formgroup_div_args html_class
|
36
36
|
div_args = { class: ["form-group", html_class].compact.join(" ") }
|
37
|
-
div_args[
|
38
|
-
div_args[
|
37
|
+
div_args["data-card-id"] = card.id if card.real?
|
38
|
+
div_args["data-card-name"] = h card.name if card.name.present?
|
39
|
+
div_args["data-card-link-name"] = h card.name.url_key if card.name.present?
|
39
40
|
div_args
|
40
41
|
end
|
41
42
|
|
data/set/all/new.rb
CHANGED
data/set/all/overlay_guide.rb
CHANGED
@@ -3,7 +3,7 @@ format :html do
|
|
3
3
|
cache: :never, unknown: true, template: :haml,
|
4
4
|
wrap: { slot: { class: "_overlay d0-card-overlay card nodblclick" } } do
|
5
5
|
# TODO: use a common template for this and the nest editor
|
6
|
-
# (the common thing is that they both are an overlay of the
|
6
|
+
# (the common thing is that they both are an overlay of the board sidebar)
|
7
7
|
# and maybe make it look more like the overlay on the left with the same close icon
|
8
8
|
end
|
9
9
|
end
|
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.15.
|
4
|
+
version: 0.15.6
|
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: 2023-
|
13
|
+
date: 2023-05-02 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: card
|
@@ -18,42 +18,42 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.105.
|
21
|
+
version: 1.105.6
|
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.105.
|
28
|
+
version: 1.105.6
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: card-mod-rules
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
33
|
- - '='
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 0.15.
|
35
|
+
version: 0.15.6
|
36
36
|
type: :runtime
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - '='
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 0.15.
|
42
|
+
version: 0.15.6
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: card-mod-list
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
47
|
- - '='
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: 0.15.
|
49
|
+
version: 0.15.6
|
50
50
|
type: :runtime
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
54
|
- - '='
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: 0.15.
|
56
|
+
version: 0.15.6
|
57
57
|
description: ''
|
58
58
|
email:
|
59
59
|
- info@decko.org
|
@@ -62,25 +62,26 @@ extensions: []
|
|
62
62
|
extra_rdoc_files: []
|
63
63
|
files:
|
64
64
|
- assets/script/autosave.js.coffee
|
65
|
-
- assets/script/
|
65
|
+
- assets/script/board.js.coffee
|
66
66
|
- assets/script/components.js.coffee
|
67
67
|
- assets/script/doubleclick.js.coffee
|
68
68
|
- assets/script/editor.js.coffee
|
69
69
|
- assets/script/name_editor.js.coffee
|
70
70
|
- assets/script/type_editor.js.coffee
|
71
|
-
- assets/style/
|
71
|
+
- assets/style/board.scss
|
72
72
|
- assets/style/edit.scss
|
73
73
|
- data/files/mod_edit_script_asset_output/file.js
|
74
74
|
- data/real.yml
|
75
|
-
- set/all/
|
76
|
-
- set/all/
|
77
|
-
- set/all/
|
78
|
-
- set/all/
|
79
|
-
- set/all/
|
80
|
-
- set/all/
|
81
|
-
- set/all/
|
75
|
+
- set/all/board.rb
|
76
|
+
- set/all/board/board.haml
|
77
|
+
- set/all/board/board_pills.rb
|
78
|
+
- set/all/board/follow_section.rb
|
79
|
+
- set/all/board/related_section.rb
|
80
|
+
- set/all/board/tab_views.rb
|
81
|
+
- set/all/board/tab_visibility.rb
|
82
82
|
- set/all/edit_content.rb
|
83
83
|
- set/all/edit_inline.rb
|
84
|
+
- set/all/edit_inline/edit_row.haml
|
84
85
|
- set/all/edit_name.rb
|
85
86
|
- set/all/edit_name_skip_referers.haml
|
86
87
|
- set/all/edit_type.rb
|
@@ -127,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
127
128
|
- !ruby/object:Gem::Version
|
128
129
|
version: '0'
|
129
130
|
requirements: []
|
130
|
-
rubygems_version: 3.
|
131
|
+
rubygems_version: 3.2.33
|
131
132
|
signing_key:
|
132
133
|
specification_version: 4
|
133
134
|
summary: Edit handling
|
data/set/all/bridge/bridge.haml
DELETED
@@ -1,47 +0,0 @@
|
|
1
|
-
format :html do
|
2
|
-
BRIDGE_PILL_UL_CLASSES =
|
3
|
-
"nav nav-pills _auto-single-select bridge-pills flex-column".freeze
|
4
|
-
|
5
|
-
BRIDGE_PILL_LI_CLASSES = "nav-item".freeze
|
6
|
-
|
7
|
-
def bridge_pills items
|
8
|
-
list_tag class: BRIDGE_PILL_UL_CLASSES, items: { class: BRIDGE_PILL_LI_CLASSES } do
|
9
|
-
items
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
def bridge_pill_items data, breadcrumb
|
14
|
-
data.map do |text, field, extra_opts|
|
15
|
-
opts = bridge_pill_item_opts breadcrumb, extra_opts, text
|
16
|
-
mark = opts.delete(:mark) == :absolute ? field : [card, field]
|
17
|
-
link_to_card mark, text, opts
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
def bridge_pill_item_opts breadcrumb, extra_opts, text
|
22
|
-
opts = bridge_link_opts.merge("data-bs-toggle": "pill")
|
23
|
-
opts.merge! breadcrumb_data(breadcrumb)
|
24
|
-
|
25
|
-
if extra_opts
|
26
|
-
classes = extra_opts.delete :class
|
27
|
-
add_class opts, classes if classes
|
28
|
-
opts.deep_merge! extra_opts
|
29
|
-
end
|
30
|
-
opts["data-cy"] = "#{text.to_name.key}-pill"
|
31
|
-
add_class opts, "nav-link"
|
32
|
-
opts
|
33
|
-
end
|
34
|
-
|
35
|
-
def bridge_pill_sections tab_name
|
36
|
-
wrap_with :ul, class: BRIDGE_PILL_UL_CLASSES do
|
37
|
-
yield.map { |args| bridge_pill_section(tab_name, *args) }
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
def bridge_pill_section tab_name, title, items
|
42
|
-
wrap_with(:h6, title, class: "ms-1 mt-3") +
|
43
|
-
wrap_each_with(:li, class: BRIDGE_PILL_LI_CLASSES) do
|
44
|
-
bridge_pill_items(items, tab_name)
|
45
|
-
end.html_safe
|
46
|
-
end
|
47
|
-
end
|
File without changes
|