redmine_extensions 0.0.18 → 0.0.19

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
  SHA1:
3
- metadata.gz: 819759a42ce63ed87fb572ed29353e3e257e2aea
4
- data.tar.gz: 5755dc4029d5bcab2e252f1b0a0da99388d98306
3
+ metadata.gz: 0e36a3344464567fd02f34045c70fab7efcea96c
4
+ data.tar.gz: 28e77ddf8bd3fc8c0dc2986a58e047614f46f94b
5
5
  SHA512:
6
- metadata.gz: 4a070f4a48b5c572b34fc988bb301e8df30b8cd60029c534ed757b490a2e439c7f5b1d1a5aa129baa6bb1bac49ca62056056f021cb3e0c142996d7087d98b8cf
7
- data.tar.gz: cf66c2c61870826dda6cfeafec72643513f8b947608f4992251b024a39e629c3efec4e75953a6d63e65017d7760238c5bc6976a7a3863113cd54aed8a9e7f321
6
+ metadata.gz: d6e4e0e80f3f996f39ac8b3f50cb19dbcbc10d3d111db87b7cd108e347d2dfd390ef12406b6832d57b8f9374847d060af3427926f14f05e185f05b141eb7a98f
7
+ data.tar.gz: 59c9572575deae9d46a96b0931d46a17740e93e01921248f77f94e47b9ebd6a9e52011c7e860ba3bd075f688caedd3d11abf18611ea3c47e6ecffde79d47c85f
@@ -215,3 +215,58 @@ REDMINE_EXTENSIONS = {
215
215
  }
216
216
 
217
217
  })(jQuery);
218
+
219
+ window.cancelAnimFrame = ( function() {
220
+ return window.cancelAnimationFrame ||
221
+ window.webkitCancelRequestAnimationFrame ||
222
+ window.mozCancelRequestAnimationFrame ||
223
+ window.oCancelRequestAnimationFrame ||
224
+ window.msCancelRequestAnimationFrame ||
225
+ clearTimeout
226
+ } )();
227
+
228
+ window.requestAnimFrame = (function(){
229
+ return window.requestAnimationFrame ||
230
+ window.webkitRequestAnimationFrame ||
231
+ window.mozRequestAnimationFrame ||
232
+ window.oRequestAnimationFrame ||
233
+ window.msRequestAnimationFrame ||
234
+ function(callback){
235
+ return window.setTimeout(callback, 1000 / 60);
236
+ };
237
+ })();
238
+
239
+ window.showFlashMessage = (function(type, message, delay){
240
+ var $content = $("#content");
241
+ delay = typeof delay !== 'undefined' ? delay : false;
242
+ $content.find(".flash").remove();
243
+ var element = document.createElement("div");
244
+ element.className = 'fixed flash ' + type;
245
+ element.style.position = 'fixed';
246
+ element.style.zIndex = '10001';
247
+ element.style.right = '5px';
248
+ element.style.top = '5px';
249
+ var close = document.createElement("a");
250
+ close.className = 'icon-close';
251
+ close.setAttribute("href", "javascript:void(0)");
252
+ close.setAttribute("onclick", "closeFlashMessage($(this))");
253
+ var msg = document.createTextNode(message);
254
+ var span = document.createElement("span");
255
+ span.appendChild(msg);
256
+ element.appendChild(span);
257
+ element.appendChild(close);
258
+ $content.prepend(element);
259
+ var $element = $(element);
260
+ if(delay){
261
+ setTimeout(function(){
262
+ requestFrame(function(){
263
+ closeFlashMessage($element);
264
+ });
265
+ }, delay);
266
+ }
267
+ return $element;
268
+ })();
269
+
270
+ window.closeFlashMessage = (function($element){
271
+ $element.closest('.flash').fadeOut(500, function(){$element.remove()});
272
+ })();
@@ -1,3 +1,3 @@
1
1
  module RedmineExtensions
2
- VERSION = '0.0.18'
2
+ VERSION = '0.0.19'
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.0.18
4
+ version: 0.0.19
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: 2016-01-05 00:00:00.000000000 Z
11
+ date: 2016-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails