redmine_extensions 0.2.4 → 0.2.5
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/application.js +2 -0
- data/app/assets/javascripts/redmine_extensions/blocking.js +6 -2
- data/app/assets/javascripts/redmine_extensions/blocking_module.js +145 -40
- data/app/assets/javascripts/redmine_extensions/blocking_namespace.js +3 -0
- data/app/assets/javascripts/redmine_extensions/blocking_polyfill.js +9 -29
- data/app/assets/javascripts/redmine_extensions/blocking_render.js +112 -0
- data/app/assets/javascripts/redmine_extensions/blocking_schedule.js +155 -41
- data/app/assets/javascripts/redmine_extensions/blocking_utils.js +40 -0
- data/app/assets/javascripts/redmine_extensions/dynamic_loading.js +26 -0
- data/app/assets/javascripts/redmine_extensions/event_bus.js +61 -0
- data/app/assets/javascripts/redmine_extensions/redmine_extensions.js +376 -376
- data/app/assets/javascripts/redmine_extensions/render_polyfill.js +20 -0
- data/lib/redmine_extensions/hooks.rb +32 -21
- data/lib/redmine_extensions/version.rb +1 -1
- metadata +8 -2
@@ -0,0 +1,20 @@
|
|
1
|
+
EasyGem.schedule.require(function (jQuery) {
|
2
|
+
var running,
|
3
|
+
animate = function (elem) {
|
4
|
+
if (running) {
|
5
|
+
window.requestAnimationFrame(animate, elem);
|
6
|
+
jQuery.fx.tick();
|
7
|
+
}
|
8
|
+
};
|
9
|
+
jQuery.fx.timer = function (timer) {
|
10
|
+
if (timer() && jQuery.timers.push(timer) && !running) {
|
11
|
+
running = true;
|
12
|
+
animate(timer.elem);
|
13
|
+
}
|
14
|
+
};
|
15
|
+
|
16
|
+
jQuery.fx.stop = function () {
|
17
|
+
running = false;
|
18
|
+
};
|
19
|
+
},'jQuery');
|
20
|
+
|
@@ -1,29 +1,40 @@
|
|
1
1
|
module RedmineExtensions
|
2
2
|
class Hooks < Redmine::Hook::ViewListener
|
3
|
-
@visited = false
|
4
|
-
def easy_extensions_blocking_javascripts_hook(context={})
|
5
|
-
if defined?(EasyExtensions)
|
6
|
-
@visited = true
|
7
|
-
context[:template].require_asset('redmine_extensions/blocking')
|
8
|
-
end
|
9
|
-
end
|
10
3
|
|
11
|
-
|
12
|
-
if
|
13
|
-
|
14
|
-
|
15
|
-
|
4
|
+
if defined?(EasyExtensions)
|
5
|
+
if EasyExtensions.try(:deferred_js)
|
6
|
+
|
7
|
+
### DEFERRED JAVASCRIPTS ###
|
8
|
+
def easy_extensions_blocking_javascripts_hook(context = {})
|
9
|
+
context[:template].require_asset('redmine_extensions/blocking')
|
10
|
+
end
|
11
|
+
|
12
|
+
def easy_extensions_javascripts_hook(context = {})
|
13
|
+
context[:template].require_asset('redmine_extensions/application')
|
14
|
+
end
|
15
|
+
else
|
16
|
+
### JAVASCRIPTS IN HEADER ###
|
17
|
+
def easy_extensions_javascripts_hook(context = {})
|
18
|
+
context[:template].require_asset('redmine_extensions/blocking')
|
19
|
+
context[:template].require_asset('redmine_extensions/application')
|
20
|
+
end
|
16
21
|
end
|
17
|
-
|
22
|
+
else
|
23
|
+
### JAVASCRIPTS IN REDMINE ###
|
24
|
+
def view_layouts_base_html_head(context = {})
|
25
|
+
## BLOCKING ##
|
26
|
+
javascript_include_tag('redmine_extensions/blocking_namespace') +
|
27
|
+
javascript_include_tag('redmine_extensions/blocking_schedule') +
|
28
|
+
javascript_include_tag('redmine_extensions/blocking_polyfill') +
|
29
|
+
javascript_include_tag('redmine_extensions/blocking_render') +
|
30
|
+
javascript_include_tag('redmine_extensions/blocking_utils') +
|
18
31
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
javascript_include_tag('redmine_extensions/redmine_extensions') +
|
26
|
-
javascript_include_tag('redmine_extensions/easy_togglers')
|
32
|
+
## DEFERRED ##
|
33
|
+
javascript_include_tag('redmine_extensions/easy_togglers') +
|
34
|
+
javascript_include_tag('redmine_extensions/jquery.entityarray') +
|
35
|
+
javascript_include_tag('redmine_extensions/render_polyfill') +
|
36
|
+
javascript_include_tag('redmine_extensions/dynamic_loading') +
|
37
|
+
javascript_include_tag('redmine_extensions/redmine_extensions')
|
27
38
|
end
|
28
39
|
end
|
29
40
|
end
|
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.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Easy Software Ltd
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -147,11 +147,17 @@ files:
|
|
147
147
|
- app/assets/javascripts/redmine_extensions/application.js
|
148
148
|
- app/assets/javascripts/redmine_extensions/blocking.js
|
149
149
|
- app/assets/javascripts/redmine_extensions/blocking_module.js
|
150
|
+
- app/assets/javascripts/redmine_extensions/blocking_namespace.js
|
150
151
|
- app/assets/javascripts/redmine_extensions/blocking_polyfill.js
|
152
|
+
- app/assets/javascripts/redmine_extensions/blocking_render.js
|
151
153
|
- app/assets/javascripts/redmine_extensions/blocking_schedule.js
|
154
|
+
- app/assets/javascripts/redmine_extensions/blocking_utils.js
|
155
|
+
- app/assets/javascripts/redmine_extensions/dynamic_loading.js
|
152
156
|
- app/assets/javascripts/redmine_extensions/easy_togglers.js
|
157
|
+
- app/assets/javascripts/redmine_extensions/event_bus.js
|
153
158
|
- app/assets/javascripts/redmine_extensions/jquery.entityarray.js
|
154
159
|
- app/assets/javascripts/redmine_extensions/redmine_extensions.js
|
160
|
+
- app/assets/javascripts/redmine_extensions/render_polyfill.js
|
155
161
|
- app/assets/stylesheets/redmine_extensions/application.css
|
156
162
|
- app/controllers/easy_settings_controller.rb
|
157
163
|
- app/helpers/redmine_extensions/application_helper.rb
|