card-mod-format 0.15.0 → 0.15.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/script/decko/decko.js.coffee +5 -0
- data/assets/script/decko/slotter.js.coffee +6 -4
- data/assets/style/common.scss +3 -1
- data/assets/style/logo_and_credit.scss +1 -1
- data/assets/style/menu.scss +8 -0
- data/assets/style/misc.scss +1 -5
- data/{locales → config/locales}/de.yml +1 -0
- data/{locales → config/locales}/en.yml +1 -0
- data/data/files/mod_format_script_asset_output/file.js +2 -2
- data/set/all/data.rb +12 -12
- data/set/all/html/error.rb +1 -1
- data/set/all/html/head.rb +1 -1
- data/set/all/html/menu.rb +12 -13
- data/set/all/html/views.rb +5 -13
- data/set/type/basic.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6385d27eaf6708d0704daa72425a148df5130f657e4670c93fe204de622a019e
|
4
|
+
data.tar.gz: bfc1ff58ad8c05d9698f9ae31b16cc461594d1db81098433e5bc8cd002863857
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4d83073a5ba048b617879b4337b38ca6395c47e22f1939884fce4b3d19e237773f840ab9bccb9503b6fbd0aaea03db428474fd695c660b300cf62fbeb50e040
|
7
|
+
data.tar.gz: 8a45d1a24c7d128c0fe1ba1b2c8b2e499ec0914ecf6e758f8ffa6e9c25ca5132b642f24a963fb6198ca00dea167a5e7b16db39d583cd4d459c735792a45526e4
|
@@ -36,6 +36,8 @@
|
|
36
36
|
# possible values are
|
37
37
|
# replace (default)
|
38
38
|
# replace the closest slot with new slot
|
39
|
+
# override
|
40
|
+
# the same as replace, but overrides the slot options of the slot that is replaced
|
39
41
|
# modal
|
40
42
|
# show new slot in modal; if there is already a modal then put it on top
|
41
43
|
# modal-replace
|
@@ -201,8 +203,8 @@ jQuery.fn.extend
|
|
201
203
|
slotter.addClass "_close-#{type}"
|
202
204
|
|
203
205
|
slotterBeforeSend: (opt) ->
|
204
|
-
return if opt.noSlotParams
|
205
|
-
|
206
206
|
# avoiding duplication. could be better test?
|
207
|
-
|
208
|
-
|
207
|
+
return if opt.noSlotParams or opt.url.match(/home_view/) or
|
208
|
+
@data("slotter-mode") == "modal" or @data("slotter-mode") == "override"
|
209
|
+
|
210
|
+
opt.url = decko.slot.path opt.url, @slot()
|
data/assets/style/common.scss
CHANGED
data/assets/style/menu.scss
CHANGED
@@ -14,6 +14,14 @@
|
|
14
14
|
}
|
15
15
|
}
|
16
16
|
|
17
|
+
.d0-card-content .card-menu i {
|
18
|
+
font-size: 1.2em
|
19
|
+
}
|
20
|
+
|
21
|
+
.modal-menu a {
|
22
|
+
color: $text-muted;
|
23
|
+
}
|
24
|
+
|
17
25
|
|
18
26
|
@include media-breakpoint-up(xs) {
|
19
27
|
// Hover over these, and only the card menus that are immediate children will appear
|
data/assets/style/misc.scss
CHANGED
@@ -23,7 +23,6 @@ pre,
|
|
23
23
|
font-size: .85em;
|
24
24
|
}
|
25
25
|
|
26
|
-
|
27
26
|
.one-line {
|
28
27
|
text-overflow: ellipsis;
|
29
28
|
white-space: nowrap;
|
@@ -62,12 +61,9 @@ pre,
|
|
62
61
|
/* Material icon placement */
|
63
62
|
.material-icons {
|
64
63
|
vertical-align: sub;
|
65
|
-
font-size: medium;
|
64
|
+
//font-size: medium;
|
66
65
|
}
|
67
66
|
|
68
|
-
.material-icons.md-24 { font-size: 24px; }
|
69
|
-
|
70
|
-
|
71
67
|
//a.external-link {
|
72
68
|
// // color: $warning;
|
73
69
|
// &:after {
|
@@ -3,6 +3,7 @@ de:
|
|
3
3
|
format_bad_address: "404: Ungültige Adresse"
|
4
4
|
format_close: Schließen
|
5
5
|
format_configure_card: "%{cardname} konfigurieren"
|
6
|
+
format_confirm_edit_loss: Nicht gespeicherte Änderungen gehen verloren. Fortfahren?
|
6
7
|
format_denial: Erlaubnis abgelehnt
|
7
8
|
format_denied_task: to %{denied_task} this
|
8
9
|
format_invalid_json: ungültiges json
|
@@ -3,6 +3,7 @@ en:
|
|
3
3
|
format_bad_address: "404: Bad Address"
|
4
4
|
format_close: Close
|
5
5
|
format_configure_card: Configure %{cardname}
|
6
|
+
format_confirm_edit_loss: Unsaved changes will be lost. Do you want to proceed?
|
6
7
|
format_denial: Permission Denied
|
7
8
|
format_denied_task: to %{denied_task} this
|
8
9
|
format_invalid_json: invalid json
|
@@ -53,13 +53,13 @@ i.call(this)}),!1!==this._start(e)&&this._repeat(null,t(e.currentTarget).hasClas
|
|
53
53
|
*/
|
54
54
|
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):e(window.jQuery)}(function(e){"use strict";var t=0,r=e,n="parseJSON";"JSON"in window&&"parse"in JSON&&(r=JSON,n="parse"),e.ajaxTransport("iframe",function(r){if(r.async){var n,a,o,i=r.initialIframeSrc||"javascript:false;";return{send:function(p,f){(n=e('<form style="display:none;"></form>')).attr("accept-charset",r.formAcceptCharset),o=/\?/.test(r.url)?"&":"?","DELETE"===r.type?(r.url=r.url+o+"_method=DELETE",r.type="POST"):"PUT"===r.type?(r.url=r.url+o+"_method=PUT",r.type="POST"):"PATCH"===r.type&&(r.url=r.url+o+"_method=PATCH",r.type="POST"),a=e('<iframe src="'+i+'" name="iframe-transport-'+(t+=1)+'"></iframe>').on("load",function(){var t,o=e.isArray(r.paramName)?r.paramName:[r.paramName];a.off("load").on("load",function(){var t;try{if(!(t=a.contents()).length||!t[0].firstChild)throw new Error}catch(r){t=undefined}f(200,"success",{iframe:t}),e('<iframe src="'+i+'"></iframe>').appendTo(n),window.setTimeout(function(){n.remove()},0)}),n.prop("target",a.prop("name")).prop("action",r.url).prop("method",r.type),r.formData&&e.each(r.formData,function(t,r){e('<input type="hidden"/>').prop("name",r.name).val(r.value).appendTo(n)}),r.fileInput&&r.fileInput.length&&"POST"===r.type&&(t=r.fileInput.clone(),r.fileInput.after(function(e){return t[e]}),r.paramName&&r.fileInput.each(function(t){e(this).prop("name",o[t]||r.paramName)}),n.append(r.fileInput).prop("enctype","multipart/form-data").prop("encoding","multipart/form-data"),r.fileInput.removeAttr("form")),window.setTimeout(function(){n.submit(),t&&t.length&&r.fileInput.each(function(r,n){var a=e(t[r]);e(n).prop("name",a.prop("name")).attr("form",a.attr("form")),a.replaceWith(n)})},0)}),n.append(a).appendTo(document.body)},abort:function(){a&&a.off("load").prop("src",i),n&&n.remove()}}}}),e.ajaxSetup({converters:{"iframe text":function(t){return t&&e(t[0].body).text()},"iframe json":function(t){return t&&r[n](e(t[0].body).text())},"iframe html":function(t){return t&&e(t[0].body).html()},"iframe xml":function(t){var r=t&&t[0];return r&&e.isXMLDoc(r)?r:e.parseXML(r.XMLDocument&&r.XMLDocument.xml||e(r.body).html())},"iframe script":function(t){return t&&e.globalEval(e(t[0].body).text())}}})});
|
55
55
|
// decko.js.coffee
|
56
|
-
(function(){window.decko={rootUrl:"",path:function(n){return n.match(/^\/|:\/\//)?n:decko.rootUrl+n},editors:{init:{},content:{},add:function(n,o,
|
56
|
+
(function(){window.decko={rootUrl:"",path:function(n){return n.match(/^\/|:\/\//)?n:decko.rootUrl+n},editors:{init:{},content:{},add:function(n,o,t){return decko.editors.init[n]=o,decko.editors.content[n]=t}},warn:function(n){if("undefined"!=typeof console&&null!==console)return console.log(n)},snakeCase:function(n){return n.replace(/([a-z])([A-Z])/g,function(n){return n[0]+"_"+n[1].toLowerCase()})}},$(window).ready(function(){return $.ajaxSetup({cache:!1}),$("body").on("click","._confirm",function(){return confirm($(this).data("confirm-msg")||"Are you sure?")})})}).call(this);
|
57
57
|
// decko_jquery.js.coffee
|
58
58
|
(function(){jQuery.fn.extend({findCard:function(n){return this.find("[data-card-id='"+n+"']")},isMain:function(){return this.slot().parent("#main")[0]},cardMark:function(){return this.data("cardId")?"~"+this.data("cardId"):this.data("cardName")},isMainOrMainModal:function(){var n;return(n=$(this)).closest(".modal")[0]&&(n=n.slotOrigin("modal")),n&&n.isMain()},notify:function(n,i){var a,t,d;return(t=(d=this.slot(i)).find(".card-notice"))[0]||(t=$('<div class="card-notice"></div>'),(a=d.find(".card-form"))[0]?$(a[0]).append(t):d.append(t)),t.html(n),t.show("blind")}})}).call(this);
|
59
59
|
// slot.js.coffee
|
60
60
|
(function(){var t,o,s;decko.slot={path:function(t,s){var e;return e=o(s),decko.path(t)+(t.match(/\?/)?"&":"?")+$.param(e)},ready:function(t){return $("document").ready(function(){return $("body").on("decko.slot.ready",".card-slot",function(o,s){return o.stopPropagation(),null!=s?t.call(this,$(this),$(s)):t.call(this,$(this))})})},destroy:function(t){return $("document").ready(function(){return $("body").on("decko.slot.destroy",".card-slot, ._modal-slot",function(o){return o.stopPropagation(),t.call(this,$(this))})})}},jQuery.fn.extend({isSlot:function(){return $(this).hasClass("card-slot")},triggerSlotReady:function(t){return this.isSlot()&&this.trigger("decko.slot.ready",t),this.find(".card-slot").trigger("decko.slot.ready",t)},slot:function(t,o){return null==t&&(t="success"),null==o&&(o="replace"),"modal"===o?this.modalSlot():this._slotSelect("slot-"+t+"-selector")||this._slotSelect("slot-selector")||this.closest(".card-slot")},slotUrl:function(){var t;return t=$(this),decko.slot.path(t.cardMark()+"/"+t.data("slot").view)},slotFind:function(t){switch(t){case"modal-origin":return this.slotOrigin("modal");case"overlay-origin":return this.slotOrigin("overlay");default:return s(this.closest(t),this.closest(".card-slot"),t)}},slotClear:function(){return this.trigger("decko.slot.destroy"),this.empty()},slotOrigin:function(t){var o,s;return s=this.closest("[data-"+t+"-origin-slot-id]").data(t+"-origin-slot-id"),null!=(o=$("[data-slot-id="+s+"]"))[0]?o:decko.warn("couldn't find origin with slot id "+s)},slotReload:function(t){return this.each(function(){return $(this)._slotReloadSingle(t)})},slotUpdate:function(t,o){return o||(o="replace"),this.slotContent(t,o,$(this))},slotContent:function(t,o,s){var e;return"string"==typeof(e=$(t)[0]&&$(t)||t)?this.slot("success",o)._slotFillOrReplace(e,s):(e.hasClass("_overlay")?o="overlay":e.hasClass("_modal")&&(o="modal"),this.slot("success",o)._slotContentFromElement(e,o,s)),e},_slotContentFromElement:function(t,o,s){var e;return"overlay"===o?this.addOverlay(t,s):t.hasClass("_modal-slot")||"modal"===o?t.showAsModal(s):((e=this.data("slot-id"))&&t.attr("data-slot-id",e),this.trigger("decko.slot.destroy"),this._slotFillOrReplace(t,s),decko.contentLoaded(t,s))},_slotFillOrReplace:function(t,o){return this.hasClass("_fixed-slot")?this.html(t):this.replaceWith(t),decko.contentLoaded(this,o)},_slotSelect:function(t){var o,s;if(o=this.data(t))return(s=this.slotFind(o))&&s[0]&&s},_slotReloadSingle:function(t){var o;return o=$(this),null==t&&(t=o.slotUrl()),o.addClass("slotter"),o.data("url",t),o.data("remote",!0),o.attr("href",t),this[0].href=t,$.rails.handleRemote(o)}}),o=function(o){var s,e,l;return e={},null!=(s=$("#main").children(".card-slot").data("cardName"))&&(e.main=s),o&&(o.isMain()&&(e.is_main=!0),null!=(l=o.data("slot"))&&(t(l,e,"slot"),l.type&&(e.type=l.type))),e},t=function(o,s,e){return $.each(o,function(o,l){var r;return r=e+"["+decko.snakeCase(o)+"]","items"===o?t(l,s,r):s[r]=l})},s=function(t,o,s){for(;0===t.length&&o.length>0;)t=$(o).find(s),o=$(o).parent().closest(".card-slot");return 0===t.length?$(s):t}}).call(this);
|
61
61
|
// slotter.js.coffee
|
62
|
-
(function(){$(window).ready(function(){return $("body").on("ajax:success",".slotter",function(t,s){return $(this).slotterSuccess(t,s)}),$("body").on("ajax:error",".slotter",function(t,s){return $(this).showErrorResponse(s.status,s.responseText)}),$("body").on("click","button.slotter",function(){return!!$.rails.allowAction($(this))&&$.rails.handleRemote($(this))}),$("body").on("click",'[data-bs-dismiss="overlay"]',function(){return $(this).slotFind(".card-slot._overlay").removeOverlay()}),$("body").on("click","._close-overlay-on-success",function(){return $(this).closeOnSuccess("overlay")}),$("body").on("click","._close-modal-on-success",function(){return $(this).closeOnSuccess("modal")}),$("body").on("click","._close-on-success",function(){return $(this).closeOnSuccess()}),$("body").on("click","._update-origin",function(){return $(this).closest(".slotter").data("slotter-mode","update-origin")}),$("body").on("submit","form.slotter",function(){var t;if((t=$(this)).data("main-success")&&t.isMainOrMainModal())return t.mainSuccess()}),$("body").on("ajax:beforeSend",".slotter",function(t,s,o){return $(this).slotterBeforeSend(o)})}),jQuery.fn.extend({mainSuccess:function(){var t;return t=$(this),$.each(t.data("main-success"),function(s,o){var e,i;return i="[name=success\\["+s+"\\]]",(e=t.find(i))[0]||(e=$('<input type="hidden" name="success['+s+']"/>'),t.append(e)),e.val(o)})},slotterSuccess:function(t,s){var o,e,i;if(this.hasClass("slotter")){if(!t.slotSuccessful)return this.showSuccessResponse(s,this.data("slotter-mode")),this.hasClass("_close-overlay")&&this.removeOverlay(),this.hasClass("_close-modal")&&this.closest(".modal").modal("hide"),this.hasClass("card-paging-link")&&(i=this.slot().offset().top,$("body").scrollTop(i)),this.data("update-foreign-slot")&&(o=this.slotFind(this.data("update-foreign-slot")),e=this.data("update-foreign-slot-url"),o.slotReload(e)),this.data("original-slotter-mode")&&this.attr("data-slotter-mode",this.data("original-slotter-mode")),this.data("original-slot-selector")&&this.attr("data-slot-selector",this.data("original-slot-selector")),t.slotSuccessful=!0}else console.log("warning: slotterSuccess called on non-slotter element "+this)},showSuccessResponse:function(t,s){if(t.redirect)return window.location=t.redirect;if(t.reload)return window.location.reload(!0);switch(s){case"silent-success":break;case"update-modal-origin":return this.updateModalOrigin();case"update-origin":return this.updateOrigin();default:return this.slotUpdate(t,s)}},showErrorResponse:function(t,s){return 403===t?$(s).showAsModal($(this)):900===t?$(s).showAsModal($(this)):(this.notify(s,"error"),409===t?this.slot().find(".current_revision_id").val(this.slot().find(".new-current-revision-id").text()):void 0)},updateModalOrigin:function(){return this.overlaySlot()?this.slotOrigin("overlay").updateOrigin():this.closest("#modal-container")[0]?this.updateOrigin():void 0},updateOrigin:function(){var t,s;if(null!=(s=this.overlaySlot()?"overlay":this.closest("#modal-container")[0]?"modal":void 0))return(t=this.slotOrigin(s))&&null!=t[0]?t.slotReload():void 0},registerAsOrigin:function(t,s){return s.hasClass("_modal-slot")&&(s=s.find(".modal-body")),s.attr("data-"+t+"-origin-slot-id",this.slot().data("slot-id"))},closeOnSuccess:function(t){var s;return s=this.closest(".slotter"),null==t&&(t=this.isInOverlay()?"overlay":"modal"),s.addClass("_close-"+t)},slotterBeforeSend:function(t){if(!t.noSlotParams
|
62
|
+
(function(){$(window).ready(function(){return $("body").on("ajax:success",".slotter",function(t,s){return $(this).slotterSuccess(t,s)}),$("body").on("ajax:error",".slotter",function(t,s){return $(this).showErrorResponse(s.status,s.responseText)}),$("body").on("click","button.slotter",function(){return!!$.rails.allowAction($(this))&&$.rails.handleRemote($(this))}),$("body").on("click",'[data-bs-dismiss="overlay"]',function(){return $(this).slotFind(".card-slot._overlay").removeOverlay()}),$("body").on("click","._close-overlay-on-success",function(){return $(this).closeOnSuccess("overlay")}),$("body").on("click","._close-modal-on-success",function(){return $(this).closeOnSuccess("modal")}),$("body").on("click","._close-on-success",function(){return $(this).closeOnSuccess()}),$("body").on("click","._update-origin",function(){return $(this).closest(".slotter").data("slotter-mode","update-origin")}),$("body").on("submit","form.slotter",function(){var t;if((t=$(this)).data("main-success")&&t.isMainOrMainModal())return t.mainSuccess()}),$("body").on("ajax:beforeSend",".slotter",function(t,s,o){return $(this).slotterBeforeSend(o)})}),jQuery.fn.extend({mainSuccess:function(){var t;return t=$(this),$.each(t.data("main-success"),function(s,o){var e,i;return i="[name=success\\["+s+"\\]]",(e=t.find(i))[0]||(e=$('<input type="hidden" name="success['+s+']"/>'),t.append(e)),e.val(o)})},slotterSuccess:function(t,s){var o,e,i;if(this.hasClass("slotter")){if(!t.slotSuccessful)return this.showSuccessResponse(s,this.data("slotter-mode")),this.hasClass("_close-overlay")&&this.removeOverlay(),this.hasClass("_close-modal")&&this.closest(".modal").modal("hide"),this.hasClass("card-paging-link")&&(i=this.slot().offset().top,$("body").scrollTop(i)),this.data("update-foreign-slot")&&(o=this.slotFind(this.data("update-foreign-slot")),e=this.data("update-foreign-slot-url"),o.slotReload(e)),this.data("original-slotter-mode")&&this.attr("data-slotter-mode",this.data("original-slotter-mode")),this.data("original-slot-selector")&&this.attr("data-slot-selector",this.data("original-slot-selector")),t.slotSuccessful=!0}else console.log("warning: slotterSuccess called on non-slotter element "+this)},showSuccessResponse:function(t,s){if(t.redirect)return window.location=t.redirect;if(t.reload)return window.location.reload(!0);switch(s){case"silent-success":break;case"update-modal-origin":return this.updateModalOrigin();case"update-origin":return this.updateOrigin();default:return this.slotUpdate(t,s)}},showErrorResponse:function(t,s){return 403===t?$(s).showAsModal($(this)):900===t?$(s).showAsModal($(this)):(this.notify(s,"error"),409===t?this.slot().find(".current_revision_id").val(this.slot().find(".new-current-revision-id").text()):void 0)},updateModalOrigin:function(){return this.overlaySlot()?this.slotOrigin("overlay").updateOrigin():this.closest("#modal-container")[0]?this.updateOrigin():void 0},updateOrigin:function(){var t,s;if(null!=(s=this.overlaySlot()?"overlay":this.closest("#modal-container")[0]?"modal":void 0))return(t=this.slotOrigin(s))&&null!=t[0]?t.slotReload():void 0},registerAsOrigin:function(t,s){return s.hasClass("_modal-slot")&&(s=s.find(".modal-body")),s.attr("data-"+t+"-origin-slot-id",this.slot().data("slot-id"))},closeOnSuccess:function(t){var s;return s=this.closest(".slotter"),null==t&&(t=this.isInOverlay()?"overlay":"modal"),s.addClass("_close-"+t)},slotterBeforeSend:function(t){if(!t.noSlotParams&&!t.url.match(/home_view/)&&"modal"!==this.data("slotter-mode")&&"override"!==this.data("slotter-mode"))return t.url=decko.slot.path(t.url,this.slot())}})}).call(this);
|
63
63
|
// slot_ready.js.coffee
|
64
64
|
(function(){decko.slot.ready(function(a){return a.find("card-view-placeholder").each(function(){var a;if(!(a=$(this)).data("loading"))return a.data("loading",!0),$.get(a.data("url"),function(e){return a.replaceWith(e)})}),a.find("._disappear").delay(5e3).animate({height:0},1e3,function(){return $(this).hide()})})}).call(this);
|
65
65
|
// clicks_and_hovers.js.coffee
|
data/set/all/data.rb
CHANGED
@@ -2,35 +2,35 @@ def cast
|
|
2
2
|
real? ? { id: id } : { name: name, type_id: type_id, content: db_content }
|
3
3
|
end
|
4
4
|
|
5
|
-
def
|
6
|
-
{ name:
|
7
|
-
type:
|
5
|
+
def pod_hash field_tags: []
|
6
|
+
{ name: pod_name,
|
7
|
+
type: pod_type,
|
8
8
|
codename: codename,
|
9
|
-
content:
|
10
|
-
fields:
|
9
|
+
content: pod_content,
|
10
|
+
fields: pod_fields(field_tags) }.compact_blank
|
11
11
|
end
|
12
12
|
|
13
|
-
def
|
13
|
+
def pod_fields marks
|
14
14
|
marks.each_with_object({}) do |mark, hash|
|
15
|
-
hash[mark] = [name, mark].card&.
|
15
|
+
hash[mark] = [name, mark].card&.pod_content
|
16
16
|
end.compact_blank
|
17
17
|
end
|
18
18
|
|
19
|
-
def
|
19
|
+
def pod_type
|
20
20
|
type_name.codename_or_string
|
21
21
|
end
|
22
22
|
|
23
|
-
def
|
23
|
+
def pod_name
|
24
24
|
simple? ? name.s : name.part_names.map(&:codename_or_string)
|
25
25
|
end
|
26
26
|
|
27
|
-
def
|
27
|
+
def pod_content
|
28
28
|
structure ? nil : db_content
|
29
29
|
end
|
30
30
|
|
31
31
|
format :data do
|
32
|
-
view :
|
33
|
-
card.
|
32
|
+
view :pod do
|
33
|
+
card.pod_hash
|
34
34
|
end
|
35
35
|
|
36
36
|
view :core, unknown: true do
|
data/set/all/html/error.rb
CHANGED
data/set/all/html/head.rb
CHANGED
data/set/all/html/menu.rb
CHANGED
@@ -53,12 +53,10 @@ format :html do
|
|
53
53
|
bridge_link
|
54
54
|
end
|
55
55
|
|
56
|
-
def bridge_link text: "", in_modal: true
|
56
|
+
def bridge_link text: "", in_modal: true, confirm: false
|
57
57
|
opts = { class: "bridge-link" }
|
58
|
-
if in_modal
|
59
|
-
|
60
|
-
opts["data-slotter-mode"] = "modal-replace"
|
61
|
-
end
|
58
|
+
opts["data-slotter-mode"] = "modal-replace" if in_modal
|
59
|
+
confirm_edit_loss opts if confirm
|
62
60
|
link_to_view :bridge, "#{bridge_icon} #{text}", opts
|
63
61
|
end
|
64
62
|
|
@@ -71,7 +69,7 @@ format :html do
|
|
71
69
|
def help_link text=nil, title=nil
|
72
70
|
opts = help_popover_opts text, title
|
73
71
|
add_class opts, "_card-menu-popover"
|
74
|
-
link_to
|
72
|
+
link_to icon_tag(:help), opts
|
75
73
|
end
|
76
74
|
|
77
75
|
def help_popover_opts text=nil, title=nil
|
@@ -80,10 +78,6 @@ format :html do
|
|
80
78
|
popover_opts text, title, opts
|
81
79
|
end
|
82
80
|
|
83
|
-
def help_icon
|
84
|
-
material_icon("help")
|
85
|
-
end
|
86
|
-
|
87
81
|
def help_title
|
88
82
|
"#{name_parts_links} (#{render_type}) #{full_page_link unless card.simple?}"
|
89
83
|
end
|
@@ -136,7 +130,7 @@ format :html do
|
|
136
130
|
end
|
137
131
|
|
138
132
|
def menu_icon
|
139
|
-
|
133
|
+
icon_tag "edit"
|
140
134
|
end
|
141
135
|
|
142
136
|
def full_page_icon
|
@@ -144,10 +138,15 @@ format :html do
|
|
144
138
|
end
|
145
139
|
|
146
140
|
def modal_icon
|
147
|
-
|
141
|
+
icon_tag :modal
|
148
142
|
end
|
149
143
|
|
150
144
|
def bridge_icon
|
151
|
-
|
145
|
+
icon_tag :board
|
146
|
+
end
|
147
|
+
|
148
|
+
def confirm_edit_loss opts
|
149
|
+
add_class opts, "_confirm"
|
150
|
+
opts["data-confirm-msg"] = t(:format_confirm_edit_loss)
|
152
151
|
end
|
153
152
|
end
|
data/set/all/html/views.rb
CHANGED
@@ -3,25 +3,17 @@
|
|
3
3
|
format :html do
|
4
4
|
def prepare_content_slot
|
5
5
|
class_up "card-slot", "d0-card-content"
|
6
|
-
voo.hide :menu
|
7
6
|
end
|
8
7
|
|
9
8
|
before(:content) { prepare_content_slot }
|
10
9
|
|
11
10
|
view :content do
|
12
|
-
voo.hide :edit_button
|
13
11
|
wrap do
|
14
|
-
[
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
prepare_content_slot
|
20
|
-
end
|
21
|
-
|
22
|
-
view :content_with_edit_button, unknown: true do
|
23
|
-
wrap do
|
24
|
-
[render_menu, render_core, render_edit_button(edit: :inline)]
|
12
|
+
[
|
13
|
+
render_menu(optional: :hide),
|
14
|
+
render_core,
|
15
|
+
render_edit_button(optional: :hide, edit: :inline)
|
16
|
+
]
|
25
17
|
end
|
26
18
|
end
|
27
19
|
|
data/set/type/basic.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: card-mod-format
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.15.
|
4
|
+
version: 0.15.1
|
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-03-29 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: card
|
@@ -18,28 +18,28 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.105.
|
21
|
+
version: 1.105.1
|
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.1
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: card-mod-content
|
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.1
|
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.1
|
43
43
|
description: ''
|
44
44
|
email:
|
45
45
|
- info@decko.org
|
@@ -63,6 +63,8 @@ files:
|
|
63
63
|
- assets/style/messaging.scss
|
64
64
|
- assets/style/misc.scss
|
65
65
|
- assets/style/open_and_closed.scss
|
66
|
+
- config/locales/de.yml
|
67
|
+
- config/locales/en.yml
|
66
68
|
- data/files/credit_image.svg
|
67
69
|
- data/files/mod_format_script_asset_output/file.js
|
68
70
|
- data/real.yml
|
@@ -81,8 +83,6 @@ files:
|
|
81
83
|
- lib/card/mod/format.rb
|
82
84
|
- lib/card/path.rb
|
83
85
|
- lib/card/path/cast_params.rb
|
84
|
-
- locales/de.yml
|
85
|
-
- locales/en.yml
|
86
86
|
- set/all/base.rb
|
87
87
|
- set/all/content.rb
|
88
88
|
- set/all/css.rb
|