card-mod-layout 0.15.3 → 0.15.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/script/overlay.js.coffee +2 -2
- data/assets/style/overlay.scss +8 -0
- data/data/files/mod_layout_script_asset_output/file.js +1 -1
- data/data/real.yml +12 -8
- data/db/migrate_core_cards/20230406205931_fix_old_navbar_issue.rb +12 -0
- data/set/all/overlay.rb +4 -4
- data/set/all/process_layout.rb +1 -1
- metadata +11 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8ab6ecd17d44c151ca1d37dfdc48ad5819be19909d86d8380184e593fa51ad6
|
4
|
+
data.tar.gz: 1bdfe8eafc32352188e3e4a8375e181aebfecdc9c716da821082364b80f5ba76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56a2cf1ad562e11776a234757cc0d335a6b1e78622a902cd6ec3c28de5cbcab011aea8c336cf0123af90dc7edd89a44679f94dcf57825395d4ebcfe638138497
|
7
|
+
data.tar.gz: 9666e58a145c0bfdf09fec7c9e8f784581ba5baca9d9259b4898dc4ae056d7db08c6164212e2d2869d91b0049d0255da12bd999b69be61ef52ecb1d2c2baaff5
|
@@ -26,7 +26,7 @@ jQuery.fn.extend
|
|
26
26
|
replaceOverlay: (overlay) ->
|
27
27
|
@overlaySlot().trigger "decko.slot.destroy"
|
28
28
|
@overlaySlot().replaceWith overlay
|
29
|
-
$(".
|
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").
|
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);
|
data/assets/style/overlay.scss
CHANGED
@@ -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),$(".
|
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),$(".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
|
@@ -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: "
|
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 = ".
|
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, "
|
72
|
-
|
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
|
data/set/all/process_layout.rb
CHANGED
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
|
+
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-
|
13
|
+
date: 2023-04-20 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.
|
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.
|
28
|
+
version: 1.105.5
|
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.
|
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.
|
42
|
+
version: 0.15.5
|
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.
|
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.
|
56
|
+
version: 0.15.5
|
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.
|
63
|
+
version: 0.15.5
|
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.
|
70
|
+
version: 0.15.5
|
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
|