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.
@@ -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
- def easy_extensions_javascripts_hook(context={})
12
- if defined?(EasyExtensions)
13
- context[:template].require_asset('redmine_extensions/blocking') unless @visited
14
- context[:template].require_asset('redmine_extensions/application')
15
- # context[:hook_caller].javascript_include_tag('redmine_extensions/application')
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
- end
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
- def view_layouts_base_html_head(context={})
20
- unless defined?(EasyExtensions)
21
- javascript_include_tag('redmine_extensions/blocking_polyfill') +
22
- javascript_include_tag('redmine_extensions/blocking_schedule') +
23
- javascript_include_tag('redmine_extensions/blocking_module') +
24
- javascript_include_tag('redmine_extensions/jquery.entityarray') +
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
@@ -1,3 +1,3 @@
1
1
  module RedmineExtensions
2
- VERSION = '0.2.4'
2
+ VERSION = '0.2.5'
3
3
  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
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-10-16 00:00:00.000000000 Z
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