holder_rails 2.3.1 → 2.3.2

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
  SHA1:
3
- metadata.gz: 19c45c9631f1fea2be54fa296d8010fb0c42910a
4
- data.tar.gz: 8b6d3fa95200977f01459a64135f16331963f6fd
3
+ metadata.gz: 9d4c5391864aeeb4e04e5b8f0b467ca61cca8358
4
+ data.tar.gz: d179ff86cc9c397770b216fbcddf9f0d9d42637b
5
5
  SHA512:
6
- metadata.gz: 6a7b99c7d5b4c87ffd06309ffe3f66cd60b0c0cf7e25230b44a01e3cb6f644527b0e37e2fb9452a2d5586b4d03e2597b7fb7ce516a19f88d071079614ab91f6e
7
- data.tar.gz: 27a6b401c6c07a9fc8d3f4870ca5c78a0054ae2dd3d36e1dfbf84658e20752a3d798aa1b5591cbc77d6e306efc3d944ab5156ccb07589a722be132144c970745
6
+ metadata.gz: fe0699d0b3d113166e4f3e2a4a0a363b1a44780959493b760ae776aceb8448ca5224752f37d39acbc4a619dc85ae309ff277a82cd5486943a1091df9c192e830
7
+ data.tar.gz: 5951359b06cf9e48bd39d7a8eb276514a5d60db3c4b37994e2b6c4c4fd387cb3f1374beb6e9921e29246ff9863a07e078f5244604e9d6fccacc333bde644e7c3
data/README.md CHANGED
@@ -58,7 +58,7 @@ For more information, check out [holder readme](https://github.com/imsky/holder#
58
58
 
59
59
  ## Versioning
60
60
 
61
- holder_rails X.Y.Z == Holder.js X.Y
61
+ holder_rails X.Y.Z == Holder.js X.Y.Z
62
62
 
63
63
  ## License
64
64
 
@@ -1,3 +1,3 @@
1
1
  module HolderRails
2
- VERSION = "2.3.1"
2
+ VERSION = "2.3.2"
3
3
  end
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
 
3
- Holder - 2.3.1 - client side image placeholders
3
+ Holder - 2.3.2 - client side image placeholders
4
4
  (c) 2012-2014 Ivan Malopinsky / http://imsky.co
5
5
 
6
6
  Provided under the MIT License.
@@ -269,7 +269,7 @@ function draw_svg(args){
269
269
  font:font,
270
270
  template:template
271
271
  })
272
- return "data:image/svg+xml;base64,"+btoa(string);
272
+ return "data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(string)));
273
273
  }
274
274
 
275
275
  function draw(args) {
@@ -500,6 +500,7 @@ app.add_image = function (src, el) {
500
500
  };
501
501
 
502
502
  app.run = function (o) {
503
+
503
504
  instance_config = extend({}, system_config)
504
505
  preempted = true;
505
506
 
@@ -507,12 +508,12 @@ app.run = function (o) {
507
508
  images = [],
508
509
  imageNodes = [],
509
510
  bgnodes = [];
510
-
511
+
511
512
  if(options.use_canvas != null && options.use_canvas){
512
513
  instance_config.use_canvas = true;
513
514
  instance_config.use_svg = false;
514
515
  }
515
-
516
+
516
517
  if (typeof (options.images) == "string") {
517
518
  imageNodes = selector(options.images);
518
519
  } else if (window.NodeList && options.images instanceof window.NodeList) {
@@ -531,6 +532,7 @@ app.run = function (o) {
531
532
  bgnodes = [options.bgnodes];
532
533
  }
533
534
  for (i = 0, l = imageNodes.length; i < l; i++) images.push(imageNodes[i]);
535
+
534
536
  var holdercss = document.getElementById("holderjs-style");
535
537
  if (!holdercss) {
536
538
  holdercss = document.createElement("style");
@@ -538,13 +540,17 @@ app.run = function (o) {
538
540
  holdercss.type = "text/css";
539
541
  document.getElementsByTagName("head")[0].appendChild(holdercss);
540
542
  }
543
+
541
544
  if (!options.nocss) {
542
545
  if (holdercss.styleSheet) {
543
546
  holdercss.styleSheet.cssText += options.stylesheet;
544
547
  } else {
545
- holdercss.appendChild(document.createTextNode(options.stylesheet));
548
+ if(options.stylesheet.length){
549
+ holdercss.appendChild(document.createTextNode(options.stylesheet));
550
+ }
546
551
  }
547
552
  }
553
+
548
554
  var cssregex = new RegExp(options.domain + "\/(.*?)\"?\\)");
549
555
  for (var l = bgnodes.length, i = 0; i < l; i++) {
550
556
  var src = window.getComputedStyle(bgnodes[i], null)
@@ -598,6 +604,10 @@ contentLoaded(win, function () {
598
604
  window.attachEvent("onresize", resizable_update)
599
605
  }
600
606
  preempted || app.run({});
607
+
608
+ if (typeof window.Turbolinks === "object") {
609
+ document.addEventListener("page:change", function() { app.run({}) })
610
+ }
601
611
  });
602
612
  if (typeof define === "function" && define.amd) {
603
613
  define([], function () {
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: holder_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.1
4
+ version: 2.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nihad Abbasov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-01 00:00:00.000000000 Z
11
+ date: 2014-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 3.1.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 3.1.0
27
27
  description: Provides Holder.js to render image placeholders entirely on the client
@@ -32,7 +32,7 @@ executables: []
32
32
  extensions: []
33
33
  extra_rdoc_files: []
34
34
  files:
35
- - .gitignore
35
+ - ".gitignore"
36
36
  - Gemfile
37
37
  - LICENSE.txt
38
38
  - README.md
@@ -52,17 +52,17 @@ require_paths:
52
52
  - lib
53
53
  required_ruby_version: !ruby/object:Gem::Requirement
54
54
  requirements:
55
- - - '>='
55
+ - - ">="
56
56
  - !ruby/object:Gem::Version
57
57
  version: '0'
58
58
  required_rubygems_version: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - '>='
60
+ - - ">="
61
61
  - !ruby/object:Gem::Version
62
62
  version: '0'
63
63
  requirements: []
64
64
  rubyforge_project:
65
- rubygems_version: 2.0.0
65
+ rubygems_version: 2.2.2
66
66
  signing_key:
67
67
  specification_version: 4
68
68
  summary: Holder.js for Rails 3.1 asset pipeline