card-mod-edit 0.16.0 → 0.17.0

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: 8d890d76f4d509eacfac1c8d9fabe7fed4bc88d1f5af7de7ec2a482f4a8163ac
4
- data.tar.gz: 2d9484594ccd4ea9c661269a665540d80d048975407d0c7bd8b0cc314c571ceb
3
+ metadata.gz: e88b6209cac77acda87eaa4cfd917577c9f47d0c9438a50e36c16dbe9400060a
4
+ data.tar.gz: 48dbe2d433745509e5bc220e666497b3187e28788e376af7a2a8f4c02302c5ae
5
5
  SHA512:
6
- metadata.gz: dc309b78486b62445638cd76978ad628ecc3a562b1caabc521688e366db051d551d6ca6f1b079c5b4adf3fe84559c31e8d21b6cacc1062a33999db8bf1f15ceb
7
- data.tar.gz: de141c2298170fc5d42ee78f568fae95b75d22fa26cec35c8696a93b7a5d6b19fbcbc7976e5bcff5b5e7a8fff64abe990497ece1fb248b8094a671b7e801544a
6
+ metadata.gz: b54151cdfdfe9f1b98b3d8834ea6ca16b0bc301bc38d1159f86d69ddf3c45a3e7aec3eb497f22d9371ec286bb822f7379d083de45c81f6f1277931f8e3a92276
7
+ data.tar.gz: 42f1d1adcb63f688cbd2ab61b8fcb9a25d475e5338fa0b733bf0e5f1a71f746e094febcee63707edd545fc953ac35bf4bed625f54c85fef9ba47c6bcceea70af
@@ -0,0 +1,4 @@
1
+ $ ->
2
+ tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
3
+ tooltipList = $.map tooltipTriggerList, (tooltipTriggerEl) ->
4
+ new bootstrap.Tooltip tooltipTriggerEl
data/config/admin.yml ADDED
@@ -0,0 +1,8 @@
1
+ settings:
2
+ - input_type
3
+ views:
4
+ - edit_form
5
+ - edit_inline
6
+ - edit_name
7
+ - edit_type
8
+ - board
@@ -10,5 +10,7 @@
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
12
12
  (function(){var n,e;e=null,$(window).ready(function(){return $("body").on("keyup",".name-editor input",function(a){var t;return e&&clearTimeout(e),t=$(this),13===a.which?(n(t),e=null):e=setTimeout(function(){return n(t),e=null},400)})}),decko.pingName=function(n,e){return $.getJSON(decko.path(""),{format:"json",view:"status","card[name]":n},e)},n=function(n){var e;return e=n.val(),decko.pingName(e,function(a){var t,r,l,u,i,s,o;return n.val()!==e?null:(o=a.status)?(t=n.parent(),(u=(l=n.closest("fieldset").find("legend")).find(".name-messages"))[0]||(u=$('<span class="name-messages"></span>'),l.append(null!=u)),t.removeClass("real-name virtual-name known-name"),s=n.slot().data("cardId"),"unknown"===o||s&&parseInt(s)===a.id?u.html(""):(t.addClass(o+"-name known-name"),i="virtual"===o?"in virtual":"already in",r=decko.path(a.url_key),u.html("\"<a href='"+r+"'>"+e+'</a>" '+i+" use"))):void 0})}}).call(this);
13
+ // tooltip.js.coffee
14
+ (function(){$(function(){var t;return t=document.querySelectorAll('[data-bs-toggle="tooltip"]'),$.map(t,function(t){return new bootstrap.Tooltip(t)})})}).call(this);
13
15
  // type_editor.js.coffee
14
16
  (function(){var t;$(window).ready(function(){return $("body").on("change","._live-type-field",function(){var a;return a=$(this),t(a),a.data("params",a.closest("form").serialize()),a.data("url",a.attr("href"))}),$("body").on("change",".edit-type-field",function(){return $(this).closest("form").submit()})}),t=function(t,a){var e;if(null==a&&(a=null),(e=t.closest(".slotter")).length&&(e.attr("data-slotter-mode")&&(e.attr("data-original-slotter-mode",e.attr("data-slotter-mode")),e.attr("data-slotter-mode",a)),e.attr("data-slot-selector")))return e.attr("data-original-slot-selector",e.attr("data-slot-selector")),e.removeAttr("data-slot-selector")}}).call(this);
@@ -3,6 +3,15 @@ format :html do
3
3
  output [standard_save_button, standard_save_and_close_button]
4
4
  end
5
5
 
6
+ # Generates a standard save button with optional parameters.
7
+ #
8
+ # @param [Hash] opts The options for the save button.
9
+ # @option opts [String] :text ("Save") The text displayed on the button.
10
+ #
11
+ # @return [String] The HTML code for the standard save button.
12
+ #
13
+ # @example
14
+ # standard_save_button(text: "Update")
6
15
  def standard_save_button opts={}
7
16
  return if voo&.hide?(:save_button)
8
17
 
@@ -14,7 +23,6 @@ format :html do
14
23
 
15
24
  # @param opts [Hash]
16
25
  # @option close [:modal, :overlay]
17
- #
18
26
  def standard_save_and_close_button opts={}
19
27
  close = opts.delete(:close) || :modal
20
28
  text = opts[:text] || "Save and Close"
@@ -42,6 +42,20 @@ format :html do
42
42
  end
43
43
  end
44
44
 
45
+ # Generates an HTML submit button with optional parameters.
46
+ #
47
+ # @param [Hash] args The options for the submit button.
48
+ # @option args [String] :text ("Submit") The text displayed on the button.
49
+ # @option args [String] :situation ("primary") The visual style of the button.
50
+ # Possible values: "primary", "secondary", "success", "danger", etc.
51
+ # @option args [Hash] :data ({}) Additional data attributes for the button.
52
+ # @option args [String] :disable_with ("Submitting") Text to display on the button
53
+ # while it is being submitted/disabled.
54
+ #
55
+ # @return [String] The HTML code for the submit button.
56
+ #
57
+ # @example
58
+ # submit_button(text: "Create", situation: "success", disable_with: "Creating")
45
59
  def submit_button args={}
46
60
  text = args.delete(:text) || "Submit"
47
61
  args.reverse_merge! situation: "primary", data: {}
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.16.0
4
+ version: 0.17.0
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-11-18 00:00:00.000000000 Z
13
+ date: 2024-06-12 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.106.0
21
+ version: 1.107.0
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.106.0
28
+ version: 1.107.0
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.16.0
35
+ version: 0.17.0
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.16.0
42
+ version: 0.17.0
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.16.0
49
+ version: 0.17.0
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.16.0
56
+ version: 0.17.0
57
57
  description: ''
58
58
  email:
59
59
  - info@decko.org
@@ -69,9 +69,11 @@ files:
69
69
  - assets/script/doubleclick.js.coffee
70
70
  - assets/script/editor.js.coffee
71
71
  - assets/script/name_editor.js.coffee
72
+ - assets/script/tooltip.js.coffee
72
73
  - assets/script/type_editor.js.coffee
73
74
  - assets/style/board.scss
74
75
  - assets/style/edit.scss
76
+ - config/admin.yml
75
77
  - data/files/mod_edit_script_asset_output/file.js
76
78
  - data/real.yml
77
79
  - set/all/board.rb
@@ -123,14 +125,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
123
125
  requirements:
124
126
  - - ">="
125
127
  - !ruby/object:Gem::Version
126
- version: '2.5'
128
+ version: '3.0'
127
129
  required_rubygems_version: !ruby/object:Gem::Requirement
128
130
  requirements:
129
131
  - - ">="
130
132
  - !ruby/object:Gem::Version
131
133
  version: '0'
132
134
  requirements: []
133
- rubygems_version: 3.4.10
135
+ rubygems_version: 3.5.10
134
136
  signing_key:
135
137
  specification_version: 4
136
138
  summary: Edit handling