card-mod-layout 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a010cdf8ddf8544349b9ce45dc8f6a38a7c71194feaade35bf9ee0db6d671bde
4
- data.tar.gz: 5434b772d20ed8baa252595d39151414c768c992aecef806da4dd4635f68af76
3
+ metadata.gz: d422d379a50d97e95a79521f7716ee4986944ee491f72c2281e5b9b4d74ff66d
4
+ data.tar.gz: aad0964661d8e323696dc00f93471995c31db13f2cb6da1bb8b1a0e3d2553475
5
5
  SHA512:
6
- metadata.gz: 877f2b691f701cd0dca2849f3ebf2bcc427ce211d72ea39af047eadad29e45b515d225ac029ca093b185af900f9a5cfcc7479dc5fe90f1a2d00b5a77bb9fa96d
7
- data.tar.gz: a1099f073b75dc18d19914b915f9280dd118c5b1eadee3f033f87fe0e564fa1377f5344ae16c77f3a4eacfb28659090e00514d45b6928d9b80ce86843a7a7898
6
+ metadata.gz: 90a0a97d483c60e9b1fc0fbc85bf72f03fe1e65b7b8c7d789b708036dca2247c1b5f737455bc9c382418ac379e2cadcb75d2409c546754f6b0ae9610ebe67c86
7
+ data.tar.gz: 22d8b6526a3ad2d098fe25581a5ce6ba82b1885fa237674052e4c5a675adac86b0e200c6040043effd150d93721cc13e1ff475e6bb57ac82ee0a5bd95f765aa3
@@ -26,7 +26,7 @@ jQuery.fn.extend
26
26
  replaceOverlay: (overlay) ->
27
27
  @overlaySlot().trigger "decko.slot.destroy"
28
28
  @overlaySlot().replaceWith overlay
29
- $(".bridge-sidebar .tab-pane:not(.active) .bridge-pills > .nav-item > .nav-link.active").removeClass("active")
29
+ $(".board-sidebar .tab-pane:not(.active) .board-pills > .nav-item > .nav-link.active").removeClass("active")
30
30
 
31
31
  isInOverlay: ->
32
32
  return @closest(".card-slot._overlay").length
@@ -45,7 +45,7 @@ jQuery.fn.extend
45
45
  bottomlay.parent().removeClass("overlay-container")
46
46
  else
47
47
  bottomlay.unwrap()
48
- bottomlay.removeClass("_bottomlay-slot").updateBridge(true, bottomlay)
48
+ bottomlay.removeClass("_bottomlay-slot").updateBoard(true, bottomlay)
49
49
 
50
50
  #bottomlay.find(".tinymce-textarea").each ->
51
51
  # tinymce.EditorManager.execCommand('mceAddControl',true, editor_id);
@@ -8,6 +8,9 @@
8
8
  overflow: auto;
9
9
  .card-slot.overlay_rule-view {
10
10
  border-left: 5px solid $primary;
11
+ .d0-card-body {
12
+ padding: 0 1em;
13
+ }
11
14
  }
12
15
 
13
16
  .d0-card-overlay
@@ -43,6 +46,11 @@
43
46
  }
44
47
  }
45
48
 
49
+ .overlay-menu {
50
+ display: inline-flex;
51
+ vertical-align: middle;
52
+ }
53
+
46
54
  // FIXME: this directly overrides above rule.
47
55
 
48
56
  .d0-card-overlay > .d0-card-frame > .d0-card-header {
@@ -3,4 +3,4 @@
3
3
  // modal.js.coffee
4
4
  (function(){var o,d;$(window).ready(function(){return $("body").on("hidden.bs.modal",function(){return decko.removeModal()}),$("body").on("show.bs.modal","._modal-slot",function(d){var a;return a=$(d.relatedTarget),o($(this),a),$(this).modal("handleUpdate"),decko.contentLoaded($(d.target),a)}),$("._modal-slot").each(function(){return d($(this)),o($(this))}),$("body").on("click",".submit-modal",function(){return $(this).closest(".modal-content").find("form").submit()})}),d=function(o){var d;if((d=o.find(".modal-content")).length>0&&d.html().length>0)return $("#main > .card-slot").registerAsOrigin("modal",o),o.modal("show")},o=function(o,d){var a,l;if(l=o.find(".modal-dialog"),null!=(a=null!=d?d.data("modal-class"):o.data("modal-class"))&&null!=l)return l.addClass(a)},jQuery.fn.extend({showAsModal:function(o){var d;return null!=o&&(d=this.modalify(o)),$("body > ._modal-slot").is(":visible")?this.addModal(d,o):($("body > ._modal-slot")[0]?($("._modal-slot").trigger("decko.slot.destroy"),$("body > ._modal-slot").replaceWith(d)):$("body").append(d),o.registerAsOrigin("modal",d),d.modal("show",o))},addModal:function(d,a){var l;return"modal-replace"===a.data("slotter-mode")?(o(d,a),l=d.find(".modal-dialog"),d.adoptModalOrigin(),$("._modal-slot").trigger("decko.slot.destroy"),$("body > ._modal-slot > .modal-dialog").replaceWith(l),decko.contentLoaded(l,a)):(decko.pushModal(d),a.registerAsOrigin("modal",d),d.modal("show",a))},adoptModalOrigin:function(){var o;return o=$("body > ._modal-slot .card-slot[data-modal-origin-slot-id]").data("modal-origin-slot-id"),this.find(".modal-body .card-slot").attr("data-modal-origin-slot-id",o)},modalSlot:function(){var o;return(o=$("#modal-container")).length>0?o:decko.createModalSlot()},modalify:function(o){var d;return null!=o.data("modal-body")&&this.find(".modal-body").append(o.data("modal-body")),this.hasClass("_modal-slot")?this:((d=$("<div/>",{id:"modal-container","class":"modal fade _modal-slot"})).append($("<div/>",{"class":"modal-dialog"}).append($("<div/>",{"class":"modal-content"}).append(this))),d)}}),$.extend(decko,{createModalSlot:function(){var o;return o=$("<div/>",{id:"modal-container","class":"modal fade _modal-slot"}),$("body").append(o),o},removeModal:function(){return $("._modal-stack")[0]?decko.popModal():($("._modal-slot").trigger("decko.slot.destroy"),$(".modal-dialog").empty())},pushModal:function(o){var d;return(d=$("body > ._modal-slot")).removeAttr("id"),d.removeClass("_modal-slot").addClass("_modal-stack").removeClass("modal").addClass("background-modal"),o.insertBefore(d),$(".modal-backdrop").removeClass("show")},popModal:function(){return $(".modal-backdrop").addClass("show"),$("body > ._modal-slot").trigger("decko.slot.destroy"),$("body > ._modal-slot").remove(),$($("._modal-stack")[0]).addClass("_modal-slot").removeClass("_modal-stack").attr("id","modal-container").addClass("modal").removeClass("background-modal"),$(document.body).addClass("modal-open")}})}).call(this);
5
5
  // overlay.js.coffee
6
- (function(){jQuery.fn.extend({overlaySlot:function(){var e;return null!=(e=this.closest(".card-slot._overlay"))[0]?e:null!=(e=this.closest(".overlay-container").find("._overlay"))[0]&&$(e[0])},addOverlay:function(e,r){return this.parent().hasClass("overlay-container")?$(e).hasClass("_stack-overlay")?this.before(e):($("._overlay-origin").removeClass("_overlay-origin"),this.replaceOverlay(e)):(this.parent().hasClass("_overlay-container-placeholder")?this.parent().addClass("overlay-container"):this.wrapAll('<div class="overlay-container">'),this.addClass("_bottomlay-slot"),this.before(e)),r.registerAsOrigin("overlay",e),decko.contentLoaded(e,r)},replaceOverlay:function(e){return this.overlaySlot().trigger("decko.slot.destroy"),this.overlaySlot().replaceWith(e),$(".bridge-sidebar .tab-pane:not(.active) .bridge-pills > .nav-item > .nav-link.active").removeClass("active")},isInOverlay:function(){return this.closest(".card-slot._overlay").length},removeOverlay:function(){var e;if(e=this.overlaySlot())return e.removeOverlaySlot()},removeOverlaySlot:function(){var e;return this.trigger("decko.slot.destroy"),1===this.siblings().length&&(e=$(this.siblings()[0])).hasClass("_bottomlay-slot")&&(e.parent().hasClass("_overlay-container-placeholder")?e.parent().removeClass("overlay-container"):e.unwrap(),e.removeClass("_bottomlay-slot").updateBridge(!0,e)),this.remove()}})}).call(this);
6
+ (function(){jQuery.fn.extend({overlaySlot:function(){var e;return null!=(e=this.closest(".card-slot._overlay"))[0]?e:null!=(e=this.closest(".overlay-container").find("._overlay"))[0]&&$(e[0])},addOverlay:function(e,a){return this.parent().hasClass("overlay-container")?$(e).hasClass("_stack-overlay")?this.before(e):($("._overlay-origin").removeClass("_overlay-origin"),this.replaceOverlay(e)):(this.parent().hasClass("_overlay-container-placeholder")?this.parent().addClass("overlay-container"):this.wrapAll('<div class="overlay-container">'),this.addClass("_bottomlay-slot"),this.before(e)),a.registerAsOrigin("overlay",e),decko.contentLoaded(e,a)},replaceOverlay:function(e){return this.overlaySlot().trigger("decko.slot.destroy"),this.overlaySlot().replaceWith(e),$(".board-sidebar .tab-pane:not(.active) .board-pills > .nav-item > .nav-link.active").removeClass("active")},isInOverlay:function(){return this.closest(".card-slot._overlay").length},removeOverlay:function(){var e;if(e=this.overlaySlot())return e.removeOverlaySlot()},removeOverlaySlot:function(){var e;return this.trigger("decko.slot.destroy"),1===this.siblings().length&&(e=$(this.siblings()[0])).hasClass("_bottomlay-slot")&&(e.parent().hasClass("_overlay-container-placeholder")?e.parent().removeClass("overlay-container"):e.unwrap(),e.removeClass("_bottomlay-slot").updateBoard(!0,e)),this.remove()}})}).call(this);
data/data/real.yml CHANGED
@@ -32,18 +32,10 @@
32
32
  :content: "[[:recent|Recent Changes]]"
33
33
  :codename: main_menu
34
34
  :conflict: :defer
35
- :fields:
36
- :self:
37
- :fields:
38
- :read: Anyone
39
35
 
40
36
  - :name: "*header"
41
37
  :type: :html
42
38
  :codename: header
43
- :fields:
44
- :self:
45
- :fields:
46
- :read: Anyone
47
39
  :content: |
48
40
  <nav class="navbar navbar-expand-lg navbar-dark bg-dark mb-3 nodblclick">
49
41
  <div class="container">
@@ -68,6 +60,18 @@
68
60
  </div>
69
61
  </nav>
70
62
 
63
+ - :name:
64
+ - :header
65
+ - :self
66
+ - :read
67
+ :content: Anyone
68
+
69
+ - :name:
70
+ - :main_menu
71
+ - :self
72
+ - :read
73
+ :content: Anyone
74
+
71
75
  - :name: "*footer"
72
76
  :codename: footer
73
77
  :type: :html
@@ -76,6 +80,10 @@
76
80
  {{:credit|core}}
77
81
  </div>
78
82
 
83
+ - :name: Menu
84
+ :codename: sidebar_menu
85
+ :content: "<p>[[/?view=new|Add a card]]</p>"
86
+
79
87
  - :name: "*sidebar"
80
88
  :codename: sidebar
81
89
  :content: |-
@@ -86,9 +94,6 @@
86
94
  :fields:
87
95
  :read: Anyone
88
96
 
89
- - :name: Menu
90
- :codename: sidebar_menu
91
- :content: "<p>[[/?view=new|Add a card]]</p>"
92
97
 
93
98
  - :name: Default Layout
94
99
  :codename: default_layout
@@ -0,0 +1,12 @@
1
+ # -*- encoding : utf-8 -*-
2
+
3
+ class FixOldNavbarIssue < Cardio::Migration
4
+ NEST_REGEP = /\{\{\*navbox\|navbar\}\}/
5
+
6
+ def up
7
+ header = "*header".card # name, not codename, is correct here
8
+ return unless header.content.match? NEST_REGEP
9
+
10
+ header.update! content: header.content.gsub(NEST_REGEP, "{{:search|search_box}}")
11
+ end
12
+ end
data/set/all/overlay.rb CHANGED
@@ -21,7 +21,7 @@ format :html do
21
21
  end
22
22
 
23
23
  view :overlay_menu do
24
- wrap_with :div, class: "btn-group btn-group-sm align-self-start ms-auto" do
24
+ wrap_with :div, class: "overlay-menu" do
25
25
  [render_overlay_help_link, slotify_overlay_link, close_overlay_link]
26
26
  end
27
27
  end
@@ -35,7 +35,7 @@ format :html do
35
35
  def add_open_guide_opts opts
36
36
  return unless card.guide_card
37
37
 
38
- slot_selector = ".bridge-sidebar > ._overlay-container-placeholder > .card-slot"
38
+ slot_selector = ".board-sidebar > ._overlay-container-placeholder > .card-slot"
39
39
  opts.merge! remote: true,
40
40
  href: path(mark: card, view: :overlay_guide),
41
41
  "data-slot-selector": slot_selector,
@@ -68,8 +68,8 @@ format :html do
68
68
  end
69
69
 
70
70
  def overlay_menu_link icon, args={}
71
- add_class args, "border-light text-dark p-1 ms-1"
72
- button_link icon_tag(icon), args.merge(btn_type: "outline-secondary")
71
+ add_class args, "text-muted p-1 ms-1"
72
+ smart_link_to icon_tag(icon), args
73
73
  end
74
74
 
75
75
  def overlay_header title=nil
@@ -43,7 +43,7 @@ format :html do
43
43
  def explicit_modal_wrapper? view
44
44
  return unless (wrap_view = view_setting :wrap, view)
45
45
 
46
- (wrapper_names(wrap_view) & %i[modal bridge]).any?
46
+ (wrapper_names(wrap_view) & %i[modal board]).any?
47
47
  end
48
48
 
49
49
  private
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: card-mod-layout
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.4
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-04-03 00:00:00.000000000 Z
13
+ date: 2023-05-02 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: card
@@ -18,56 +18,56 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 1.105.4
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.4
28
+ version: 1.105.6
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: card-mod-account
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.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.4
42
+ version: 0.15.6
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: card-mod-session
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.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.4
56
+ version: 0.15.6
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: card-mod-tabs
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - '='
62
62
  - !ruby/object:Gem::Version
63
- version: 0.15.4
63
+ version: 0.15.6
64
64
  type: :runtime
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - '='
69
69
  - !ruby/object:Gem::Version
70
- version: 0.15.4
70
+ version: 0.15.6
71
71
  description: ''
72
72
  email:
73
73
  - info@decko.org
@@ -86,6 +86,7 @@ files:
86
86
  - data/files/mod_layout_script_asset_output/file.js
87
87
  - data/real.yml
88
88
  - data/test.yml
89
+ - db/migrate_core_cards/20230406205931_fix_old_navbar_issue.rb
89
90
  - lib/card/layout.rb
90
91
  - lib/card/layout/card_layout.rb
91
92
  - lib/card/layout/code_layout.rb
@@ -142,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
143
  - !ruby/object:Gem::Version
143
144
  version: '0'
144
145
  requirements: []
145
- rubygems_version: 3.3.11
146
+ rubygems_version: 3.2.33
146
147
  signing_key:
147
148
  specification_version: 4
148
149
  summary: decko layouts