redmine_extensions 0.4.0.beta → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/redmine_extensions/blocking_namespace.js +3 -1
- data/app/assets/javascripts/redmine_extensions/easy_togglers.js +12 -4
- data/app/helpers/redmine_extensions/application_helper.rb +16 -0
- data/lib/redmine_extensions/easy_settings/key.rb +1 -1
- data/lib/redmine_extensions/easy_settings/mapper.rb +2 -2
- data/lib/redmine_extensions/version.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: 6cfd25b21afbd47411c74ccc712573a7110b3b7aa284b270f6f3d4f626ceaa33
|
4
|
+
data.tar.gz: 7c5210837d187b99b81a2f9e80504b7ab8b888bc8f719fe68ebadcb1bc3cd268
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b04693359b7efb7a7b61356a737303ce8e209a567d41535106147bd0bfaba06d18e792bed737e63441a4411fdeb952dbbd0b527bc49447b514daa29516ba5d7d
|
7
|
+
data.tar.gz: 1cc15831cc45289159517263b8e0fab1c6051baf22be9a7e1d417f6f64283d5bf1d3b5d91f79151966de7eae4c660c5d5b49ca09d5c373b7a109d4781e7ae56e
|
@@ -1,3 +1,5 @@
|
|
1
1
|
window.EASY = window.EASY || {};
|
2
2
|
window.EasyGem = window.EasyGem || {};
|
3
|
-
window.EasyGem.test = window.EasyGem.test || {};
|
3
|
+
window.EasyGem.test = window.EasyGem.test || {};
|
4
|
+
window.EASY.asyncModules = window.EASY.asyncModules || {};
|
5
|
+
window.EASY.asyncModules.states = window.EASY.asyncModules.states || {};
|
@@ -46,10 +46,18 @@ window.EasyToggler = new function() {
|
|
46
46
|
var list = document.querySelectorAll('*[data-toggle]');
|
47
47
|
for (var i = 0; i < list.length; ++i) {
|
48
48
|
var item = list.item(i);
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
49
|
+
window.EasyToggler.ensureToggleItem(item);
|
50
|
+
}
|
51
|
+
return this;
|
52
|
+
};
|
53
|
+
|
54
|
+
/**
|
55
|
+
* @param {HTMLElement} item
|
56
|
+
*/
|
57
|
+
this.ensureToggleItem = function(item) {
|
58
|
+
var container = document.getElementById(item.dataset.toggle);
|
59
|
+
if (!!storage[item.dataset.toggle]) {
|
60
|
+
toggle(container);
|
53
61
|
}
|
54
62
|
return this;
|
55
63
|
};
|
@@ -123,6 +123,22 @@ module RedmineExtensions
|
|
123
123
|
content_tag(:script, javascript_cdata_section(content), html_options)
|
124
124
|
end
|
125
125
|
|
126
|
+
def require_javascript_tag(content_or_options_with_block = nil, html_options = {}, &block)
|
127
|
+
content =
|
128
|
+
if block_given?
|
129
|
+
html_options = content_or_options_with_block if content_or_options_with_block.is_a?(Hash)
|
130
|
+
capture(&block)
|
131
|
+
else
|
132
|
+
content_or_options_with_block
|
133
|
+
end
|
134
|
+
html_options.reverse_merge!(type: 'application/javascript')
|
135
|
+
html_options[:data] ||= { container: '' }
|
136
|
+
html_options[:data][:container].slice!("#module_inside_")
|
137
|
+
content = "EasyGem.schedule.require(function(){#{content}}, function(){ return EASY.asyncModules.states['#{html_options[:data][:container]}']});"
|
138
|
+
|
139
|
+
javascript_tag content.html_safe, html_options
|
140
|
+
end
|
141
|
+
|
126
142
|
def get_jasmine_tags
|
127
143
|
tags = params[:jasmine]
|
128
144
|
return [] if tags == 'true'
|
@@ -17,13 +17,13 @@ module EasySettings
|
|
17
17
|
end
|
18
18
|
|
19
19
|
EasySetting.mapper_clear_caches
|
20
|
-
@all_keys[name] = EasySettings::Key.init(name, options)
|
20
|
+
@all_keys[name] = EasySettings::Key.init(name, **options)
|
21
21
|
end
|
22
22
|
alias_method :add_key, :key
|
23
23
|
|
24
24
|
def keys(*names, **options, &block)
|
25
25
|
names.each do |name|
|
26
|
-
key(name, options, &block)
|
26
|
+
key(name, **options, &block)
|
27
27
|
end
|
28
28
|
end
|
29
29
|
alias_method :add_keys, :keys
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redmine_extensions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Easy Software Ltd
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -196,7 +196,7 @@ homepage: https://www.easyredmine.com
|
|
196
196
|
licenses:
|
197
197
|
- GPL-2.0
|
198
198
|
metadata: {}
|
199
|
-
post_install_message:
|
199
|
+
post_install_message:
|
200
200
|
rdoc_options: []
|
201
201
|
require_paths:
|
202
202
|
- lib
|
@@ -207,12 +207,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
207
207
|
version: '2.5'
|
208
208
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
209
209
|
requirements:
|
210
|
-
- - "
|
210
|
+
- - ">="
|
211
211
|
- !ruby/object:Gem::Version
|
212
|
-
version:
|
212
|
+
version: '0'
|
213
213
|
requirements: []
|
214
|
-
rubygems_version: 3.
|
215
|
-
signing_key:
|
214
|
+
rubygems_version: 3.2.16
|
215
|
+
signing_key:
|
216
216
|
specification_version: 4
|
217
217
|
summary: Redmine Extensions is set of usefull features for Redmine. Main focus is
|
218
218
|
on development helpers, but many users can find it helpfull
|