redmine_extensions 1.0.0 → 1.1.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db2b763f3499a1153f144dc525f6b394c95ddeb198a8e014e581878f4eed9823
|
4
|
+
data.tar.gz: e2bc5958760257c6fd6284bd361e4855c7e00b01a4533af7726fbab4fe92a5b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c135cc0580a2a2ce55e1a48a3372d668c48c182f7b3b70b7262442187e37cfb215dfb9c1c1cb54f19376fa8bb0111c5a2c7bb5942694aa2a2451562790fed97c
|
7
|
+
data.tar.gz: 7ee97bf3548bd702d38c928e5c6e89cb85fa9341ee64ab1c6937a910745de55819fba5f32c7a173205081ff6dc436021cd7479d0050107b7e6c33a48e7225463
|
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: 1.
|
4
|
+
version: 1.1.0
|
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: 2023-09-
|
11
|
+
date: 2023-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -41,7 +41,6 @@ files:
|
|
41
41
|
- app/assets/javascripts/redmine_extensions/blocking_module.js
|
42
42
|
- app/assets/javascripts/redmine_extensions/blocking_namespace.js
|
43
43
|
- app/assets/javascripts/redmine_extensions/blocking_polyfill.js
|
44
|
-
- app/assets/javascripts/redmine_extensions/blocking_render.js
|
45
44
|
- app/assets/javascripts/redmine_extensions/blocking_utils.js
|
46
45
|
- app/assets/javascripts/redmine_extensions/easy_togglers.js
|
47
46
|
- app/assets/javascripts/redmine_extensions/jquery.entityarray.js
|
@@ -1,111 +0,0 @@
|
|
1
|
-
(function () {
|
2
|
-
/**
|
3
|
-
* @callback RenderFunction
|
4
|
-
*/
|
5
|
-
// noinspection JSMismatchedCollectionQueryUpdate
|
6
|
-
/**
|
7
|
-
* @type {Array.<{body:RenderFunction,ctx:Object}>}
|
8
|
-
*/
|
9
|
-
var readQueue = [];
|
10
|
-
// noinspection JSMismatchedCollectionQueryUpdate
|
11
|
-
/**
|
12
|
-
* @type {Array.<{body:RenderFunction,ctx:Object,value:*}>}
|
13
|
-
*/
|
14
|
-
var renderQueue = [];
|
15
|
-
var renderPhase = false;
|
16
|
-
var lastTime = 0.0;
|
17
|
-
/**
|
18
|
-
* Wrapper for safe execution of [body] function only in read phase to prevent force-redraws.
|
19
|
-
* @example
|
20
|
-
* // fill storage with values from DOM
|
21
|
-
* var storage = {};
|
22
|
-
* EasyGem.read(function(){
|
23
|
-
* this.offset = $element.offset();
|
24
|
-
* this.scrollTop = $(window).scrollTop();
|
25
|
-
* }, storage);
|
26
|
-
* @param {RenderFunction} body
|
27
|
-
* @param {Object} [context]
|
28
|
-
*/
|
29
|
-
EasyGem.read = function (body, context) {
|
30
|
-
if (renderPhase) {
|
31
|
-
readQueue.push({body: body, ctx: context});
|
32
|
-
} else {
|
33
|
-
body.call(context);
|
34
|
-
}
|
35
|
-
};
|
36
|
-
/**
|
37
|
-
* Wrapper for safe execution of [body] function only in render phase to prevent force-redraws.
|
38
|
-
* @example
|
39
|
-
* var left = $element.css("left");
|
40
|
-
* EasyGem.render(function(){
|
41
|
-
* $element.css({left: (left + 5) + "px"});
|
42
|
-
* });
|
43
|
-
* @param {RenderFunction} body - obtain execution time as first parameter
|
44
|
-
* @param {Object} [context]
|
45
|
-
*/
|
46
|
-
EasyGem.render = function (body, context) {
|
47
|
-
if (renderPhase) {
|
48
|
-
body.call(context, lastTime);
|
49
|
-
} else {
|
50
|
-
renderQueue.push({body: body, ctx: context});
|
51
|
-
}
|
52
|
-
};
|
53
|
-
/**
|
54
|
-
* Complex and most-safe wrapper for DOM-manipulation code
|
55
|
-
* Execute [read] and [render] function only in proper phases.
|
56
|
-
* @example
|
57
|
-
* // prevents layout thrashing
|
58
|
-
* $table.find("td.first_column").each(function() {
|
59
|
-
* EasyGem.readAndRender(function() {
|
60
|
-
* return this.width();
|
61
|
-
* }, function(width, time) {
|
62
|
-
* this.next().width(width);
|
63
|
-
* }, $(this));
|
64
|
-
* });
|
65
|
-
* @param {RenderFunction} read
|
66
|
-
* @param {RenderFunction} render - function(readResult, time) callback
|
67
|
-
* @param {Object} [context]
|
68
|
-
*/
|
69
|
-
EasyGem.readAndRender = function (read, render, context) {
|
70
|
-
if (renderPhase) {
|
71
|
-
readQueue.push({
|
72
|
-
body: function () {
|
73
|
-
var value = read.call(context);
|
74
|
-
renderQueue.push({body: render, ctx: context, value: value});
|
75
|
-
}, ctx: context
|
76
|
-
});
|
77
|
-
} else {
|
78
|
-
var value = read.call(context);
|
79
|
-
renderQueue.push({body: render, ctx: context, value: value});
|
80
|
-
}
|
81
|
-
};
|
82
|
-
EasyGem.schedule.main(function () {
|
83
|
-
var loop = function (time) {
|
84
|
-
renderPhase = true;
|
85
|
-
lastTime=time;
|
86
|
-
|
87
|
-
setTimeout(function () {
|
88
|
-
renderPhase = false;
|
89
|
-
if (readQueue.length) {
|
90
|
-
var queue = readQueue;
|
91
|
-
readQueue = [];
|
92
|
-
for (i = 0; i < queue.length; i++) {
|
93
|
-
var pack = queue[i];
|
94
|
-
pack.body.call(pack.ctx);
|
95
|
-
}
|
96
|
-
}
|
97
|
-
}, 0);
|
98
|
-
if (renderQueue.length) {
|
99
|
-
var queue = renderQueue;
|
100
|
-
renderQueue = [];
|
101
|
-
for (var i = 0; i < queue.length; i++) {
|
102
|
-
var pack = queue[i];
|
103
|
-
pack.body.call(pack.ctx, pack.value, time);
|
104
|
-
}
|
105
|
-
renderQueue = [];
|
106
|
-
}
|
107
|
-
requestAnimationFrame(loop);
|
108
|
-
};
|
109
|
-
requestAnimationFrame(loop);
|
110
|
-
});
|
111
|
-
})();
|