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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a4831b05c3fabaa2fe6df1b4a0a7d4a548a89344fc174322e6afc98cdbed3c39
4
- data.tar.gz: defeae8ec613a2044f7c1af895607f8f2718e5f5ed37972283f2eaa6f1f7eed0
3
+ metadata.gz: 6385d27eaf6708d0704daa72425a148df5130f657e4670c93fe204de622a019e
4
+ data.tar.gz: bfc1ff58ad8c05d9698f9ae31b16cc461594d1db81098433e5bc8cd002863857
5
5
  SHA512:
6
- metadata.gz: 35cb14e6738063019f3dda1925be996524b966de600a418f09d0685a4c067b94aba1e1d03dc320fe6c77c389acee0d6bc469c6a2ceb3d5a68caad50790726d0e
7
- data.tar.gz: 950d8600fb84f203b40252d1481306733f8112c96b06a281d31d5fa45f1aa00fda5f5646a72f201085e13b781db59b0f5011801fb569863a4bd5ee0e62e2e1d6
6
+ metadata.gz: a4d83073a5ba048b617879b4337b38ca6395c47e22f1939884fce4b3d19e237773f840ab9bccb9503b6fbd0aaea03db428474fd695c660b300cf62fbeb50e040
7
+ data.tar.gz: 8a45d1a24c7d128c0fe1ba1b2c8b2e499ec0914ecf6e758f8ffa6e9c25ca5132b642f24a963fb6198ca00dea167a5e7b16db39d583cd4d459c735792a45526e4
@@ -29,4 +29,9 @@ window.decko =
29
29
  $(window).ready ->
30
30
  $.ajaxSetup cache: false
31
31
 
32
+ $('body').on 'click', '._confirm', ->
33
+ confirm $(this).data('confirm-msg') || 'Are you sure?'
34
+
35
+
36
+
32
37
 
@@ -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
- unless (opt.url.match(/home_view/) or @data("slotter-mode") == "modal")
208
- opt.url = decko.slot.path opt.url, @slot()
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()
@@ -64,7 +64,9 @@ a:focus, a:hover {
64
64
 
65
65
  a.unknown-link {
66
66
  color: $text-muted;
67
- font-variant: small-caps;
67
+ .card-title {
68
+ font-variant: small-caps;
69
+ }
68
70
  &:hover {
69
71
  color: $primary;
70
72
  }
@@ -19,6 +19,6 @@ $credit_color: $primary !default;
19
19
  }
20
20
 
21
21
  [id^='svg-card-']:nth-child(even) use { // even cards
22
- fill: $secondary;
22
+ fill: $light;
23
23
  }
24
24
 
@@ -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
@@ -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,e){return decko.editors.init[n]=o,decko.editors.content[n]=e}},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})})}).call(this);
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)return t.url.match(/home_view/)||"modal"===this.data("slotter-mode")?void 0:t.url=decko.slot.path(t.url,this.slot())}})}).call(this);
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 export_hash field_tags: []
6
- { name: export_name,
7
- type: export_type,
5
+ def pod_hash field_tags: []
6
+ { name: pod_name,
7
+ type: pod_type,
8
8
  codename: codename,
9
- content: export_content,
10
- fields: export_fields(field_tags) }.compact_blank
9
+ content: pod_content,
10
+ fields: pod_fields(field_tags) }.compact_blank
11
11
  end
12
12
 
13
- def export_fields marks
13
+ def pod_fields marks
14
14
  marks.each_with_object({}) do |mark, hash|
15
- hash[mark] = [name, mark].card&.export_content
15
+ hash[mark] = [name, mark].card&.pod_content
16
16
  end.compact_blank
17
17
  end
18
18
 
19
- def export_type
19
+ def pod_type
20
20
  type_name.codename_or_string
21
21
  end
22
22
 
23
- def export_name
23
+ def pod_name
24
24
  simple? ? name.s : name.part_names.map(&:codename_or_string)
25
25
  end
26
26
 
27
- def export_content
27
+ def pod_content
28
28
  structure ? nil : db_content
29
29
  end
30
30
 
31
31
  format :data do
32
- view :export do
33
- card.export_hash
32
+ view :pod do
33
+ card.pod_hash
34
34
  end
35
35
 
36
36
  view :core, unknown: true do
@@ -27,7 +27,7 @@ format :html do
27
27
  end
28
28
 
29
29
  def unknown_icon
30
- fa_icon "plus-square"
30
+ icon_tag :unknown
31
31
  end
32
32
 
33
33
  view :compact_missing, perms: :none do
data/set/all/html/head.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  basket[:head_views] =
2
2
  %i[page_title_tag meta_tags favicon_tag
3
- head_stylesheet head_remote_stylesheets
3
+ head_remote_stylesheets head_stylesheet
4
4
  universal_edit_button rss_links]
5
5
  # TODO: the last two should be in mods
6
6
 
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
- # add_class opts, "close"
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 help_icon, opts
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
- material_icon "edit"
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
- fa_icon :expand
141
+ icon_tag :modal
148
142
  end
149
143
 
150
144
  def bridge_icon
151
- fa_icon :box
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
@@ -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
- [render_menu, render_core, render_edit_button(edit: :inline)]
15
- end
16
- end
17
-
18
- before :content_with_edit_button do
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
@@ -1,3 +1,3 @@
1
- def export_type
1
+ def pod_type
2
2
  nil
3
3
  end
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.0
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-01-04 00:00:00.000000000 Z
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.0
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.0
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.0
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.0
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