card-mod-edit 0.15.4 → 0.15.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ea9b1f493b67c38374683a50f8c1f9770db2b173d4bd6e0b3c79df1785d679cb
4
- data.tar.gz: 1cd27a05b3848822a77759d0f88f8e72bed84337206e01f4b7d8ba0ba1f526be
3
+ metadata.gz: 725ae3cc85e3dd44646cb7d24a95e289e52f4e4f594cd880953803108601e28a
4
+ data.tar.gz: 9f33c8db6e9f970359760a59c6629a536be0d9d7d46a2b09c61e5173f5be042e
5
5
  SHA512:
6
- metadata.gz: 16230d6934d8701c1f650254baf0a8bfeb29b2ecf8a6e29a560a8d4b2d60efb589bcc0168357b1d8af0dda237466c191b807b9b5337a6e67d2c4d2542dd32fec
7
- data.tar.gz: e48a9b9b74420471559df186a334d66c7688c18577fbd3d7460374e5e423ada0ffb7822c55adf48d07e09e592b605f31974df52a1599217889c037077341361a
6
+ metadata.gz: a17700979be6d82b84190ec04c93ee00b0643eb297a6c1baaeea1b8f7b4de51f42fb20822f277d2c360c93ba3ff37b5e09c9777647d5a79bc767017e474eae03
7
+ data.tar.gz: 79c835748853ea1c87091a4a0a1b4eb581a59ed66c413e9888edbda9713721edf6e42352ce83c6479daa2b490d04c51c44475b28b20d3eb6db6848aea011af1b
@@ -1,25 +1,25 @@
1
1
  decko.slot.ready (slot, slotter) ->
2
- slot.updateBridge(false, slotter)
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 bridge update was
9
+ # overlayClosed=true means the board update was
10
10
  # triggered by closing an overlay
11
- updateBridge: (overlayClosed=false, slotter) ->
12
- return unless @closest(".bridge").length > 0
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
- $(".bridge-pills > .nav-item > .nav-link.active").removeClass("active")
19
+ $(".board-pills > .nav-item > .nav-link.active").removeClass("active")
20
20
 
21
21
  updateBreadcrumb: () ->
22
- bc_item = $(".modal-header ._bridge-breadcrumb li:last-child")
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
 
@@ -40,5 +40,5 @@ slotEditLink = (slot) ->
40
40
  slotEditView = (slot) ->
41
41
  switch slot.data("slot").edit
42
42
  when "inline" then "edit_inline"
43
- when "full" then "bridge"
43
+ when "full" then "board"
44
44
  else "edit"
@@ -1,5 +1,5 @@
1
1
 
2
- // Bridge
2
+ // Board
3
3
  ._modal-stack {
4
4
  z-index: 1010;
5
5
  }
@@ -18,9 +18,9 @@
18
18
  }
19
19
  }
20
20
 
21
- $bridge-line-color: $border-color;
21
+ $board-line-color: $border-color;
22
22
 
23
- .bridge-sidebar {
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
- .bridge-main {
40
- border-right: 1px solid $bridge-line-color;
39
+ .board-main {
40
+ border-right: 1px solid $board-line-color;
41
41
  padding-left: 0;
42
42
  padding-right: 0;
43
- > ._overlay-container-placeholder > .bridge-view {
44
- padding-top: 10px;
45
- padding-left: 15px;
46
- padding-right: 15px;
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
- > .overlay-container > .bridge-view {
49
- padding-top: 0px;
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
- .bridge-pills {
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
- .bridge {
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 $bridge-line-color;
93
- border-top: 1px solid $bridge-line-color;
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
- .bridge-sidebar {
106
+ .board-sidebar {
99
107
  .history_tab-view > div {
100
108
  margin: 0.5rem;
101
109
  }
@@ -12,7 +12,7 @@
12
12
 
13
13
  .d0-card-header a {
14
14
  color: $body-color;
15
- &.edit-link, &.bridge-link, &.help-link {
15
+ &.edit-link, &.board-link, &.help-link {
16
16
  color: $text-muted;
17
17
  }
18
18
  }
@@ -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
- // bridge.js.coffee
4
- (function(){decko.slot.ready(function(e,t){var r;if(e.updateBridge(!1,t),1===(r=e.find("ul._auto-single-select > li.nav-item > a.nav-link")).length)return $(r[0]).click()}),jQuery.fn.extend({updateBridge:function(e,t){if(null==e&&(e=!1),this.closest(".bridge").length>0)return this.data("breadcrumb")?this.updateBreadcrumb():t&&$(t).data("breadcrumb")&&$(t).updateBreadcrumb(),e?$(".bridge-pills > .nav-item > .nav-link.active").removeClass("active"):void 0},updateBreadcrumb:function(){var e;return(e=$(".modal-header ._bridge-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);
3
+ // board.js.coffee
4
+ (function(){decko.slot.ready(function(e,t){var r;if(e.updateBoard(!1,t),1===(r=e.find("ul._auto-single-select > li.nav-item > a.nav-link")).length)return $(r[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,r;$(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))&&r($(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]},r=function(t){var r,e,d,o;return d=t.slot(),(r=n(d))?r.click():(e=i(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,i){return $(i).slot().data("slotId")===t.data("slotId")}))[0]&&$(n[0])},i=function(t){switch(t.data("slot").edit){case"inline":return"edit_inline";case"full":return"bridge";default:return"edit"}}}).call(this);
8
+ (function(){var t,n,i,r;$(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))&&r($(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]},r=function(t){var r,e,d,o;return d=t.slot(),(r=n(d))?r.click():(e=i(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,i){return $(i).slot().data("slotId")===t.data("slotId")}))[0]&&$(n[0])},i=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,8 @@
1
+ .board.container-fluid
2
+ .row
3
+ .col-8.board-main
4
+ ._overlay-container-placeholder
5
+ = interior
6
+ .col-4.board-sidebar.nodblclick
7
+ ._overlay-container-placeholder
8
+ = board_tabs
@@ -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, followers_bridge_link, follow_overview_button]
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
- bridge_link_opts(class: "btn btn-sm btn-secondary",
19
- "data-cy": "follow-overview")
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 = bridge_link_opts(class: "btn btn-sm btn-primary",
24
- path: { view: :overlay_rule },
25
- "data-cy": "follow-advanced")
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 followers_bridge_link
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
- bridge_link_opts(class: "btn btn-sm ms-2 btn-secondary slotter",
35
- remote: true, "data-cy": "followers")
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
- acts_bridge_layout card.history_acts
9
+ acts_board_layout card.history_acts
10
10
  end
11
11
 
12
12
  view :related_tab do
13
- bridge_pill_sections "Related" do
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,6 +1,6 @@
1
1
  format :html do
2
- def visible_bridge_tabs
3
- Bridge::BRIDGE_TABS.select do |_title, view|
2
+ def visible_board_tabs
3
+ Board::BOARD_TABS.select do |_title, view|
4
4
  send "show_#{view}?"
5
5
  end
6
6
  end
@@ -1,43 +1,43 @@
1
- BRIDGE_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
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
- BRIDGE_TAB_NAMES = BRIDGE_TABS.invert.freeze
8
+ BOARD_TAB_NAMES = BOARD_TABS.invert.freeze
9
9
 
10
10
  format :html do
11
- wrapper :bridge do
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: bridge_breadcrumbs,
16
- menu: :bridge_menu) do
17
- haml :bridge
15
+ title: board_breadcrumbs,
16
+ menu: :board_menu) do
17
+ haml :board
18
18
  end
19
19
  end
20
20
 
21
- def bridge_tabs
21
+ def board_tabs
22
22
  wrap do
23
- tabs(visible_bridge_tabs, BRIDGE_TAB_NAMES[bridge_tab], load: :lazy) do
24
- _render bridge_tab
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 bridge_tab
30
- @bridge_tab ||= bridge_param :tab
29
+ def board_tab
30
+ @board_tab ||= board_param :tab
31
31
  end
32
32
 
33
- def bridge_param key
34
- params.dig(:bridge, key)&.to_sym || try("default_bridge_#{key}")
33
+ def board_param key
34
+ params.dig(:board, key)&.to_sym || try("default_board_#{key}")
35
35
  end
36
36
 
37
- def bridge_breadcrumbs
37
+ def board_breadcrumbs
38
38
  <<-HTML.strip_heredoc
39
39
  <nav aria-label="breadcrumb">
40
- <ol class="breadcrumb _bridge-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,8 +45,8 @@ format :html do
45
45
  HTML
46
46
  end
47
47
 
48
- def bridge_link_opts opts={}
49
- opts[:"data-slot-selector"] = bridge_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"
@@ -55,12 +55,12 @@ format :html do
55
55
  opts
56
56
  end
57
57
 
58
- def bridge_slot_selector
59
- ".bridge-main > .overlay-container > .card-slot._bottomlay-slot," \
60
- ".bridge-main > ._overlay-container-placeholder > .card-slot"
58
+ def board_slot_selector
59
+ ".board-main > .overlay-container > .card-slot._bottomlay-slot," \
60
+ ".board-main > ._overlay-container-placeholder > .card-slot"
61
61
  end
62
62
 
63
- def default_bridge_tab
63
+ def default_board_tab
64
64
  show_guide_tab? ? :guide_tab : :engage_tab
65
65
  end
66
66
 
@@ -69,7 +69,7 @@ format :html do
69
69
  { "data-breadcrumb": title, "data-breadcrumb-class": html_class }
70
70
  end
71
71
 
72
- def bridge_menu
72
+ def board_menu
73
73
  wrap_with_modal_menu do
74
74
  [
75
75
  close_modal_window,
@@ -44,7 +44,7 @@ format :html do
44
44
 
45
45
  def edit_modal_menu
46
46
  wrap_with_modal_menu do
47
- [close_modal_window, bridge_link(confirm: true)]
47
+ [close_modal_window, board_link(confirm: true)]
48
48
  end
49
49
  end
50
50
 
@@ -0,0 +1,7 @@
1
+ .col-3.text-end
2
+ %label
3
+ = title
4
+ .col-7
5
+ = content
6
+ .col-2.text-end
7
+ = edit_link
@@ -14,7 +14,7 @@ format :html do
14
14
  end
15
15
 
16
16
  view :edit_name_row do
17
- edit_row_fixed_width "Name", card.name, :name_form
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 bridge
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
- edit_row_fixed_width render_title, render_core, :edit_inline, 75
34
+ edit_row render_title, render_core, :edit_inline
35
35
  end
36
36
 
37
- def edit_row_fixed_width title, content, edit_view, width=50
37
+ def edit_row title, content, edit_view
38
38
  class_up "card-slot", "d-flex form-group"
39
- wrap do
40
- ["<label style='width: #{width}px'>#{title}</label>",
41
- content,
42
- edit_inline_link(edit_view, align: :right)]
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 _render_bridge_type_formgroup if voo.visible?(:type_form) { false }
19
+ return _render_board_type_formgroup if voo.visible?(:type_form) { false }
20
20
 
21
- edit_row_fixed_width "Type", link_to_card(card.type), :bridge_type_formgroup
21
+ edit_row "Type", link_to_card(card.type), :board_type_formgroup
22
22
  end
23
23
 
24
- view :bridge_type_formgroup, unknown: true, wrap: :slot do
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 :bridge, perms: :update, unknown: true, cache: :never, wrap: :bridge do
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
- bridge_parts
8
+ board_parts
9
9
  end
10
10
  end
11
11
  end
12
12
 
13
- view :cardboard, :bridge
13
+ view :cardboard, :board
14
14
 
15
- def bridge_parts
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: :bridge_rules_tab
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/new.rb CHANGED
@@ -54,7 +54,7 @@ format :html do
54
54
 
55
55
  def new_modal_menu
56
56
  wrap_with_modal_menu do
57
- [close_modal_window, render_bridge_link]
57
+ [close_modal_window, render_board_link]
58
58
  end
59
59
  end
60
60
 
@@ -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 bridge sidebar)
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
4
+ version: 0.15.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: 2023-04-03 00:00:00.000000000 Z
13
+ date: 2023-04-20 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.4
21
+ version: 1.105.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.105.4
28
+ version: 1.105.5
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.4
35
+ version: 0.15.5
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.4
42
+ version: 0.15.5
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.4
49
+ version: 0.15.5
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.4
56
+ version: 0.15.5
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/bridge.js.coffee
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/bridge.scss
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/bridge.rb
76
- - set/all/bridge/bridge.haml
77
- - set/all/bridge/bridge_pills.rb
78
- - set/all/bridge/follow_section.rb
79
- - set/all/bridge/related_section.rb
80
- - set/all/bridge/tab_views.rb
81
- - set/all/bridge/tab_visibility.rb
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
@@ -1,8 +0,0 @@
1
- .bridge.container-fluid
2
- .row
3
- .col-8.bridge-main
4
- ._overlay-container-placeholder
5
- = interior
6
- .col-4.bridge-sidebar.nodblclick
7
- ._overlay-container-placeholder
8
- = bridge_tabs
@@ -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