symphonia 4.1.3 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d64b152203dc6bf578501b1095fbd81e2cbe5ede1fd34a4eb020ffdf54ee8f57
4
- data.tar.gz: 1c87c27bf654326f38c574bfb4afcf0eb0d7a19e442fa2581438d90953b7bbe9
3
+ metadata.gz: 8b1926adf23dfcc6193affda2c0eaf6edcf7729eba7ee21fde5d65d7ffe6fa64
4
+ data.tar.gz: 16cd15eb367b3f597e6fc67f60d8d8de7941010d08ec42b5b02baecf3fddf623
5
5
  SHA512:
6
- metadata.gz: a328cfbc0aae03353f32c05a5516f1a75525fb79660eaa01addbd3562a471b7d38be4aa0f0f7618328cd77bd55e7296e830a9205043d78c6a3f7df17971619ea
7
- data.tar.gz: 14d656d24c7c1741d52ee4faa3cff9eebfabaea0b6ff1de737c7b99e1329e12f6fcad977a76bcec1a07fecd072429f132c7fe9446649cd51502b93f8ecf979c2
6
+ metadata.gz: c3b96b59bd3014de2cd86cbf53a5c4bfe1c30f4f1ee6d1b9a60a71c98784c33c1a8b270471dfe8a5db35f80c00f02c931e3d54c98e712000737828e805226480
7
+ data.tar.gz: 31b3f194941fb8661419af1f52a1ab9c4423f40da86443846876f9996505127903002473ec7c1923f91891858851201bb134420feb1210f7ecf061f182ae11bb
data/CHANGELOG.md CHANGED
@@ -5,6 +5,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
7
  ## [Unreleased]
8
+ ## [4.2.0] - 2022-04-07
9
+ ### Removed
10
+ - awesome_nested_set dependency
11
+ ### Changed
12
+ - start with Ruby3 support
13
+
8
14
  ## [4.1.3] - 2022-03-02
9
15
  ### Changed
10
16
  - update sidekiq
@@ -1,42 +1,42 @@
1
1
  /**
2
2
  * Symphonia modal dialog pop-up.
3
3
  * @param {String} id
4
- * @param {Object} options
5
- * @param {String} options.title - Title of dialog window.
6
- * @param {Boolean} options.force - If dialog element exists, will remove and replace new one.
7
- * @param {String} options.text - Text for body of dialog window.
8
- * @param {String} options.html - Content (html) for body of dialog window.
9
- * @param {String} options.submit - Text of submit button. If provided generate submit button.
10
- * @param {Boolean} options.large - Use Large modal
4
+ * @param {Object} opts
5
+ * @param {String} opts.title - Title of dialog window.
6
+ * @param {Boolean} opts.force - If dialog element exists, will remove and replace new one.
7
+ * @param {String} opts.text - Text for body of dialog window.
8
+ * @param {String} opts.html - Content (html) for body of dialog window.
9
+ * @param {String} opts.submit - Text of submit button. If provided generate submit button.
10
+ * @param {Boolean} opts.large - Use Large modal
11
11
  */
12
- SymphoniaDialog = function (id, options) {
13
- var options = $.extend(options, {});
12
+ SymphoniaDialog = function (id, opts) {
13
+ const options = $.extend(opts, {});
14
14
  if (options["force"] === undefined)
15
15
  options["force"] = true;
16
16
 
17
17
  this.id = id || 'ajax_modal';
18
- var m = document.getElementById(this.id);
18
+ const m = document.getElementById(this.id);
19
19
 
20
20
  // var currentDialog = document.getElementById(this.id + "__symphonia_dialog");
21
21
  // if (currentDialog) {
22
22
  // currentDialog.remove();
23
23
  // }
24
24
 
25
- var dialog = document.createElement("div");
26
- var modalDialog = document.createElement("div");
25
+ const dialog = document.createElement("div");
26
+ const modalDialog = document.createElement("div");
27
27
  modalDialog.className = "modal-dialog";
28
28
  if (options["large"]) {
29
29
  modalDialog.classList.add("modal-lg")
30
30
  }
31
31
  dialog.setAttribute("role", "document");
32
32
 
33
- var content = document.createElement("div");
33
+ const content = document.createElement("div");
34
34
  content.className = "modal-content";
35
- var heading = document.createElement("div");
35
+ const heading = document.createElement("div");
36
36
  heading.className = "modal-header";
37
- var modalTitle = document.createElement("h5");
37
+ const modalTitle = document.createElement("h5");
38
38
  modalTitle.className = "modal-title";
39
- var body = document.createElement("div");
39
+ const body = document.createElement("div");
40
40
 
41
41
  body.className = "modal-body";
42
42
  dialog.id = this.id;
@@ -46,7 +46,7 @@ SymphoniaDialog = function (id, options) {
46
46
  // =-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-
47
47
 
48
48
  this.appendSubmitButton = function (label) {
49
- var submitButton = document.createElement('button');
49
+ const submitButton = document.createElement('button');
50
50
  submitButton.onclick = this.submit;
51
51
  submitButton.innerText = (label === true) && 'Submit' || label;
52
52
  submitButton.className = "btn btn-primary";
@@ -54,14 +54,14 @@ SymphoniaDialog = function (id, options) {
54
54
  return submitButton;
55
55
  };
56
56
  this.submit = function () {
57
- var form = dialog.querySelector("form");
57
+ const form = dialog.querySelector("form");
58
58
  if (form)
59
59
  form.submit();
60
60
  };
61
61
  this.show = function () {
62
62
  // dialog.find(".modal-body > .modal-content-inner-container").css({'max-height': window.innerHeight - 200});
63
63
  // dialog.find(".modal-body > .modal-content-inner-container").css({'max-height': window.innerHeight - 200});
64
- var t = dialog.querySelector(".title");
64
+ const t = dialog.querySelector(".title");
65
65
  if (t && t.innerHTML === '') {
66
66
  this.title = modalTitle.innerHTML;
67
67
  t.remove();
@@ -83,7 +83,7 @@ SymphoniaDialog = function (id, options) {
83
83
 
84
84
  modalTitle.innerText = options.title || '';
85
85
 
86
- var closeButton = document.createElement("button");
86
+ const closeButton = document.createElement("button");
87
87
  closeButton.className = "close fa fa-times";
88
88
  closeButton.dataset['dismiss'] = "modal";
89
89
  heading.appendChild(modalTitle);
@@ -114,7 +114,7 @@ SymphoniaDialog = function (id, options) {
114
114
  dialog.appendChild(modalDialog);
115
115
 
116
116
  if (options.force) {
117
- var currentDialog = document.getElementById(dialog.id);
117
+ const currentDialog = document.getElementById(dialog.id);
118
118
  if (currentDialog)
119
119
  currentDialog.remove();
120
120
  }
@@ -130,7 +130,7 @@ SymphoniaDialog.prototype.close = function () {
130
130
  };
131
131
  window.Symphonia.dialog = {
132
132
  show: function(IDcontainer, options) {
133
- var modal = new SymphoniaDialog(IDcontainer, options);
133
+ const modal = new SymphoniaDialog(IDcontainer, options);
134
134
  modal.show();
135
135
  }
136
- }
136
+ }
@@ -16,9 +16,6 @@ require 'jquery-rails'
16
16
  require 'jquery-ui-rails'
17
17
  require 'rdiscount'
18
18
  require 'sortable-table'
19
- # require 'paperclip'
20
- require 'awesome_nested_set'
21
- # require 'acts_as_list'
22
19
  require 'bootstrap_form'
23
20
  require 'bootstrap-datepicker-rails'
24
21
  # require 'wicked_pdf'
@@ -106,7 +106,7 @@ module Symphonia
106
106
 
107
107
  # TODO: @klass.name || @klass.base_class.name || entity.class.name
108
108
  def format_value(view, value, _entity)
109
- view.t("#{@klass.name.underscore}.#{name.to_s.pluralize}.#{value}", format_options)
109
+ view.t("#{@klass.name.underscore}.#{name.to_s.pluralize}.#{value}", **format_options)
110
110
  end
111
111
 
112
112
  def input_field
@@ -179,7 +179,7 @@ module Symphonia
179
179
  class DateAttribute < Attribute
180
180
 
181
181
  def format_value(view, value, _entity)
182
- value && view.l(value.to_date, format_options)
182
+ value && view.l(value.to_date, **format_options)
183
183
  end
184
184
 
185
185
  end
@@ -187,7 +187,7 @@ module Symphonia
187
187
  class DateTimeAttribute < Attribute
188
188
 
189
189
  def format_value(view, value, _entity)
190
- value && view.l(value.localtime, format_options)
190
+ value && view.l(value.localtime, **format_options)
191
191
  end
192
192
 
193
193
  end
@@ -1,5 +1,5 @@
1
1
  module Symphonia
2
2
 
3
- VERSION = '4.1.3'
3
+ VERSION = '4.2.0'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: symphonia
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.3
4
+ version: 4.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lukas Pokorny
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-02 00:00:00.000000000 Z
11
+ date: 2022-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: api-pagination
@@ -38,20 +38,6 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: 6.4.0
41
- - !ruby/object:Gem::Dependency
42
- name: awesome_nested_set
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: 3.2.1
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: 3.2.1
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: bootstrap
57
43
  requirement: !ruby/object:Gem::Requirement
@@ -240,14 +226,14 @@ dependencies:
240
226
  requirements:
241
227
  - - "~>"
242
228
  - !ruby/object:Gem::Version
243
- version: '1.2'
229
+ version: '1.3'
244
230
  type: :runtime
245
231
  prerelease: false
246
232
  version_requirements: !ruby/object:Gem::Requirement
247
233
  requirements:
248
234
  - - "~>"
249
235
  - !ruby/object:Gem::Version
250
- version: '1.2'
236
+ version: '1.3'
251
237
  - !ruby/object:Gem::Dependency
252
238
  name: sortable-table
253
239
  requirement: !ruby/object:Gem::Requirement
@@ -507,7 +493,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
507
493
  - !ruby/object:Gem::Version
508
494
  version: '0'
509
495
  requirements: []
510
- rubygems_version: 3.1.4
496
+ rubygems_version: 3.3.9
511
497
  signing_key:
512
498
  specification_version: 4
513
499
  summary: My administration