card-mod-rules 0.13.4 → 0.14.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: ca17208e69ce9c949ff93245c1f4f55197abcb7dd1555759bb9a70575bd42ec3
4
- data.tar.gz: c2f822d5ef3bdd690c0afcbec1791412672514b4a1a6dec62d6a1c6dcf83b156
3
+ metadata.gz: 30469534e8d60d7fd32a19643dbcbebe15771aa5cb2c6e07784d2a0e213b65c3
4
+ data.tar.gz: 36fcb0868026a8ea922bacfbfc39526a7e9fa92b2b620e2143e133f071e5e2b3
5
5
  SHA512:
6
- metadata.gz: 8d9318b982666c7155ffbd693d33fcf202fa671921037fc11c84cdd619ad1846b3a11b24fcf8c9f7c47ab1ffcbd1cd58c9146f938fb3d110a25f1c71a42d237d
7
- data.tar.gz: cce0fe7e5a04e094c330e8515c21593b66cb4521bbd418fda6417ba4894fd452a6a8dfd4cd5e67ea42f2f14a459cca5e44b3eb93d5aee0771a051afd7b992c61
6
+ metadata.gz: 7a42cedbaf64413f7cb84109de5efdfb7a5af98c6a6575d29fd566f7ca8989c9b5302b5b64db48c0924b22cd3d1eece66ccd405f8600ab342ebab37676d491a8
7
+ data.tar.gz: 342490dd90c29515cc248c33ae057cdb6a8233d77c17cfd8252ae1fbebc9522cc14ea20eb6f3fa65d36389f0674dcbb07255f59a385aa17242f2a4c91b648db6
data/locales/de.yml ADDED
@@ -0,0 +1,9 @@
1
+ de:
2
+ rules_config: Konfiguration
3
+ rules_event: Ereignisse
4
+ rules_other: Sonstige
5
+ rules_permission: Berechtigungen
6
+ rules_pointer: Zeiger
7
+ rules_templating: Schablonen
8
+ rules_webpage: Webseite
9
+ rules_editing: Bearbeiten
@@ -0,0 +1,33 @@
1
+ # TODO: Use codenames instead of names
2
+ GROUP = {
3
+ "Text" => %w[RichText PlainText Markdown Phrase HTML],
4
+ "Data" => %w[Number Toggle Date URI],
5
+ "Upload" => %w[File Image],
6
+ "Custom" => [],
7
+ "Organize" => ["List", "Pointer", "Search", "Link list", "Nest list"],
8
+ "Template" => ["Notification template", "Email template", "Twitter template"],
9
+ "Admin" => ["Cardtype", "User", "Role", "Sign up", "Session", "Set", "Setting"],
10
+ "Styling" => ["Layout", "Skin", "Bootswatch skin", "Customized bootswatch skin",
11
+ "CSS", "SCSS"],
12
+ "Scripting" => %w[JSON JavaScript CoffeeScript]
13
+ }.freeze
14
+
15
+ # DEFAULT_RULE_GROUPS = ["Text", "Data", "Upload", "Organize - Search"]
16
+ # STRUCTURE_RULE_GROUPS = ["Text", "Organize > Search"]
17
+
18
+ # group for each cardtype: { "RichText => "Content", "Layout" => "Admin", ... }
19
+ GROUP_MAP = GROUP.each_with_object({}) do |(cat, types), h|
20
+ types.each { |t| h[t] = cat }
21
+ end
22
+
23
+ format :html do
24
+ def custom_types
25
+ custom_types = []
26
+
27
+ Auth.createable_types.each do |type|
28
+ custom_types << type unless All::CardtypeGroups::GROUP_MAP[type]
29
+ end
30
+
31
+ custom_types
32
+ end
33
+ end
data/set/rule/editor.rb CHANGED
@@ -79,7 +79,7 @@ format :html do
79
79
  wrap_type_formgroup do
80
80
  type_field(
81
81
  href: path(mark: success[:id], view: :rule_form, assign: true),
82
- class: "type-field rule-type-field live-type-field",
82
+ class: "type-field rule-type-field _live-type-field",
83
83
  "data-remote" => true
84
84
  )
85
85
  end
data/set/rule/rules.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  event :save_recently_edited_settings, :integrate, on: :save, changed: %i[type content] do
2
2
  if (recent = Card[:recent_settings])
3
3
  recent.insert_item 0, name.right
4
- attach_subcard recent
4
+ subcard recent
5
5
  end
6
6
  end
7
7
 
data/set/self/cardtype.rb CHANGED
@@ -1,42 +1,12 @@
1
- GROUP = {
2
- "Text" => %w[RichText PlainText Markdown Phrase HTML],
3
- "Data" => %w[Number Toggle Date URI],
4
- "Upload" => %w[File Image],
5
- "Custom" => [],
6
- "Organize" => ["List", "Pointer", "Search", "Link list", "Nest list"],
7
- "Template" => ["Notification template", "Email template", "Twitter template"],
8
- "Admin" => ["Cardtype", "User", "Role", "Sign up", "Session", "Set", "Setting"],
9
- "Styling" => ["Layout", "Skin", "Bootswatch skin", "Customized bootswatch skin",
10
- "CSS", "SCSS"],
11
- "Scripting" => %w[JSON JavaScript CoffeeScript]
12
- }.freeze
13
1
 
14
- # DEFAULT_RULE_GROUPS = ["Text", "Data", "Upload", "Organize - Search"]
15
- # STRUCTURE_RULE_GROUPS = ["Text", "Organize > Search"]
16
-
17
- # group for each cardtype: { "RichText => "Content", "Layout" => "Admin", ... }
18
- GROUP_MAP = GROUP.each_with_object({}) do |(cat, types), h|
19
- types.each { |t| h[t] = cat }
20
- end
21
2
 
22
3
  format :html do
23
4
  view :grouped_list do
24
- GROUP.keys.map do |group|
25
- type_list = group == "Custom" ? custom_types : GROUP[group]
5
+ All::CardtypeGroups::GROUP.keys.map do |group|
6
+ type_list = group == "Custom" ? custom_types : All::CardtypeGroups::GROUP[group]
26
7
  next if type_list.empty?
27
8
 
28
9
  [wrap_with(:h5, group), wrap_with(:p, listing(type_list))]
29
10
  end.flatten.join "\n"
30
11
  end
31
-
32
- def custom_types
33
- custom_types = []
34
-
35
- Card.search(type_id: Card::CardtypeID, return: "name").each do |name|
36
- next if ::Card::Set::Self::Cardtype::GROUP_MAP[name]
37
-
38
- custom_types << name
39
- end
40
- custom_types
41
- end
42
12
  end
data/set/type/setting.rb CHANGED
@@ -1,14 +1,3 @@
1
- # require "json"
2
-
3
- def self.member_names
4
- @@member_names ||= Card.search(
5
- { type_id: SettingID, return: "key" },
6
- "all setting cards"
7
- ).each_with_object({}) do |card_key, hash|
8
- hash[card_key] = true
9
- end
10
- end
11
-
12
1
  format :data do
13
2
  view :core do
14
3
  cql = { left: { type: SetID },
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: card-mod-rules
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.4
4
+ version: 0.14.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: 2021-09-24 00:00:00.000000000 Z
13
+ date: 2021-12-22 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.103.4
21
+ version: 1.104.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.103.4
28
+ version: 1.104.0
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: card-mod-format
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.13.4
35
+ version: 0.14.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.13.4
42
+ version: 0.14.0
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: card-mod-search
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - '='
48
48
  - !ruby/object:Gem::Version
49
- version: 0.13.4
49
+ version: 0.14.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.13.4
56
+ version: 0.14.0
57
57
  description: ''
58
58
  email:
59
59
  - info@decko.org
@@ -62,8 +62,9 @@ extensions: []
62
62
  extra_rdoc_files: []
63
63
  files:
64
64
  - assets/script/script_rules.js.coffee
65
- - file/mod_rules_script_local_machine_output/file.js
65
+ - locales/de.yml
66
66
  - locales/en.yml
67
+ - set/all/cardtype_groups.rb
67
68
  - set/all/related_sets.rb
68
69
  - set/right/self.rb
69
70
  - set/right/type_plus_right.rb
@@ -118,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
119
  - !ruby/object:Gem::Version
119
120
  version: '0'
120
121
  requirements: []
121
- rubygems_version: 3.1.6
122
+ rubygems_version: 3.2.15
122
123
  signing_key:
123
124
  specification_version: 4
124
125
  summary: rules
@@ -1,2 +0,0 @@
1
- // script_rules.js.coffee
2
- (function(){$(window).ready(function(){return $("body").on("click",".perm-vals input",function(){return $(this).slot().find("#inherit").attr("checked",!1)}),$("body").on("click",".perm-editor #inherit",function(){var t;return(t=$(this).slot()).find(".perm-group input:checked").attr("checked",!1),t.find(".perm-indiv input").val("")}),$("body").on("click","._rule-submit-button",function(){var t,i;return(t=(i=$(this).closest("form")).find(".set-editor input:checked")).val()?!t.attr("warning")||confirm(t.attr("warning")):(i.find(".set-editor").addClass("attention"),$(this).notify("To what Set does this Rule apply?"),!1)})})}).call(this);