responsive-nav-rails 1.0.15 → 1.0.16

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: 1688868dad4b56b871fb5e5de337ade12aedc389
4
- data.tar.gz: f92eaa0d81fbeb028f9fe9c56d0d5e484e6d2115
3
+ metadata.gz: d7a0b34914ded84e6193744a983ae66b7c63d3b0
4
+ data.tar.gz: 9fcb1a078feda99f6e1b04e960a381d0f116af54
5
5
  SHA512:
6
- metadata.gz: 8dcbef8356e6738766b7577c3fb4df7e9a3a8af89c3354e229cecef2720c353adad0c9dfdd70d6237f1adaac33ea4cd9187eec16ed73fce57b5ec72866b9b048
7
- data.tar.gz: c2615a3891c6b7879f7aa3edc16cb9321df792966b309c29246d4f12060917e8c176ac0cb6e92d0d3078253afa43fa958f8836ddf0e6dd209f6759dc2c68ca19
6
+ metadata.gz: dc9858f2c5943d833526fb090e9f4ae1c9dfca5d6ec696eca5c0c897f1cbb40b275899be6e0c551dbd3a8bf7ac5cf9c917807cfc82217ab9ff0935a142ae22ba
7
+ data.tar.gz: 5a48e491af944a7902fd9e52ea4050ba35778bea14800ec55b6e4d8632d846b54d3d86d6c9a78b02e4661ea017ecc07ebffe9da8b287a3af544585eaaaf97852
data/.gitignore CHANGED
@@ -1,17 +1,17 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- .yardoc
6
- Gemfile.lock
7
- InstalledFiles
8
- _yardoc
9
- coverage
10
- doc/
11
- lib/bundler/man
12
- pkg
13
- rdoc
14
- spec/reports
15
- test/tmp
16
- test/version_tmp
17
- tmp
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source "http://rubygems.org"
2
-
3
- # Specify your gem's dependencies in responsive-nav-rails.gemspec
4
- gemspec
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in responsive-nav-rails.gemspec
4
+ gemspec
data/LICENSE.md CHANGED
File without changes
data/README.md CHANGED
@@ -1,27 +1,27 @@
1
- # responsive-nav-rails
2
-
3
- [responsive-nav](http://responsive-nav.com) for the Rails asset pipeline
4
-
5
- ## Installation
6
-
7
- Add this line to your application's Gemfile:
8
-
9
- gem "responsive-nav-rails"
10
-
11
- ## Usage
12
-
13
- In your CSS manifest file:
14
-
15
- *= responsive-nav
16
-
17
- In your JavaScript manifest file:
18
-
19
- //= responsive-nav
20
-
21
- or for the minified version
22
-
23
- //= responsive-nav.min
24
-
25
- ## License
26
-
1
+ # responsive-nav-rails
2
+
3
+ [responsive-nav](http://responsive-nav.com) for the Rails asset pipeline
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem "responsive-nav-rails"
10
+
11
+ ## Usage
12
+
13
+ In your CSS manifest file:
14
+
15
+ *= responsive-nav
16
+
17
+ In your JavaScript manifest file:
18
+
19
+ //= responsive-nav
20
+
21
+ or for the minified version
22
+
23
+ //= responsive-nav.min
24
+
25
+ ## License
26
+
27
27
  [The MIT License](https://github.com/vevix/responsive-nav-rails/blob/master/LICENSE.md)
data/Rakefile CHANGED
@@ -1 +1 @@
1
- require "bundler/gem_tasks"
1
+ require "bundler/gem_tasks"
File without changes
File without changes
@@ -1,3 +1,3 @@
1
1
  module ResponsiveNavRails
2
- VERSION = "1.0.15"
2
+ VERSION = "1.0.16"
3
3
  end
@@ -1,18 +1,18 @@
1
- # coding: utf-8
2
- require File.expand_path("../lib/responsive-nav-rails/version", __FILE__)
3
-
4
- Gem::Specification.new do |spec|
5
- spec.name = "responsive-nav-rails"
6
- spec.version = ResponsiveNavRails::VERSION
7
- spec.authors = ["Thomas McNiven"]
8
- spec.email = ["trmcniven@vevix.net"]
9
- spec.description = "responsive-nav.com for the rails asset pipeline"
10
- spec.summary = "an asset gemification of the responsive-nav plugin"
11
- spec.homepage = "https://github.com/vevix/responsive-nav-rails"
12
- spec.license = "MIT"
13
-
14
- spec.files = `git ls-files`.split($/)
15
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
16
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
17
- spec.require_paths = ["lib"]
18
- end
1
+ # coding: utf-8
2
+ require File.expand_path("../lib/responsive-nav-rails/version", __FILE__)
3
+
4
+ Gem::Specification.new do |spec|
5
+ spec.name = "responsive-nav-rails"
6
+ spec.version = ResponsiveNavRails::VERSION
7
+ spec.authors = ["Thomas McNiven"]
8
+ spec.email = ["trmcniven@vevix.net"]
9
+ spec.description = "responsive-nav.com for the rails asset pipeline"
10
+ spec.summary = "an asset gemification of the responsive-nav plugin"
11
+ spec.homepage = "https://github.com/vevix/responsive-nav-rails"
12
+ spec.license = "MIT"
13
+
14
+ spec.files = `git ls-files`.split($/)
15
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
16
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
17
+ spec.require_paths = ["lib"]
18
+ end
@@ -1,4 +1,4 @@
1
- /*! responsive-nav.js v1.0.15
1
+ /*! responsive-nav.js v1.0.16
2
2
  * https://github.com/viljamis/responsive-nav.js
3
3
  * http://responsive-nav.com
4
4
  *
@@ -38,7 +38,7 @@ var responsiveNav = (function (window, document) {
38
38
  opts,
39
39
  navToggle,
40
40
  styleElement = document.createElement("style"),
41
- navOpen = false,
41
+ navOpen,
42
42
 
43
43
  // fn arg can be an object or a function, thanks to handleEvent
44
44
  // read more at: http://www.thecssninja.com/javascript/handleevent
@@ -255,6 +255,7 @@ var responsiveNav = (function (window, document) {
255
255
  // Private methods
256
256
  _init: function () {
257
257
  addClass(nav, "closed");
258
+ navOpen = false;
258
259
  this._createToggle();
259
260
 
260
261
  addEvent(window, "load", this, false);
@@ -1,12 +1,12 @@
1
- /*! responsive-nav.js v1.0.15 by @viljamis, http://responsive-nav.com, MIT license */
2
- var responsiveNav=function(g,h){var u=!!g.getComputedStyle;g.getComputedStyle||(g.getComputedStyle=function(a){this.el=a;this.getPropertyValue=function(b){var c=/(\-([a-z]){1})/g;"float"===b&&(b="styleFloat");c.test(b)&&(b=b.replace(c,function(a,b,c){return c.toUpperCase()}));return a.currentStyle[b]?a.currentStyle[b]:null};return this});var d,f,e,n=h.createElement("style"),s=!1,k=function(a,b,c,d){if("addEventListener"in a)try{a.addEventListener(b,c,d)}catch(e){if("object"===typeof c&&c.handleEvent)a.addEventListener(b,
1
+ /*! responsive-nav.js v1.0.16 by @viljamis, http://responsive-nav.com, MIT license */
2
+ var responsiveNav=function(g,h){var u=!!g.getComputedStyle;g.getComputedStyle||(g.getComputedStyle=function(a){this.el=a;this.getPropertyValue=function(b){var c=/(\-([a-z]){1})/g;"float"===b&&(b="styleFloat");c.test(b)&&(b=b.replace(c,function(a,b,c){return c.toUpperCase()}));return a.currentStyle[b]?a.currentStyle[b]:null};return this});var d,f,e,n=h.createElement("style"),p,k=function(a,b,c,d){if("addEventListener"in a)try{a.addEventListener(b,c,d)}catch(e){if("object"===typeof c&&c.handleEvent)a.addEventListener(b,
3
3
  function(a){c.handleEvent.call(c,a)},d);else throw e;}else"attachEvent"in a&&("object"===typeof c&&c.handleEvent?a.attachEvent("on"+b,function(){c.handleEvent.call(c)}):a.attachEvent("on"+b,c))},l=function(a,b,c,d){if("removeEventListener"in a)try{a.removeEventListener(b,c,d)}catch(e){if("object"===typeof c&&c.handleEvent)a.removeEventListener(b,function(a){c.handleEvent.call(c,a)},d);else throw e;}else"detachEvent"in a&&("object"===typeof c&&c.handleEvent?a.detachEvent("on"+b,function(){c.handleEvent.call(c)}):
4
- a.detachEvent("on"+b,c))},v=function(a){if(1>a.children.length)throw Error("The Nav container has no containing elements");for(var b=[],c=0;c<a.children.length;c++)1===a.children[c].nodeType&&b.push(a.children[c]);return b},m=function(a,b){for(var c in b)a.setAttribute(c,b[c])},p=function(a,b){a.className+=" "+b;a.className=a.className.replace(/(^\s*)|(\s*$)/g,"")},q=function(a,b){a.className=a.className.replace(RegExp("(\\s|^)"+b+"(\\s|$)")," ").replace(/(^\s*)|(\s*$)/g,"")},t=function(a,b){var c;
5
- this.options={animate:!0,transition:400,label:"Menu",insert:"after",customToggle:"",openPos:"relative",jsClass:"js",init:function(){},open:function(){},close:function(){}};for(c in b)this.options[c]=b[c];p(h.documentElement,this.options.jsClass);this.wrapperEl=a.replace("#","");if(h.getElementById(this.wrapperEl))this.wrapper=h.getElementById(this.wrapperEl);else throw Error("The nav element you are trying to select doesn't exist");this.wrapper.inner=v(this.wrapper);f=this.options;d=this.wrapper;
6
- this._init(this)};t.prototype={destroy:function(){this._removeStyles();q(d,"closed");q(d,"opened");d.removeAttribute("style");d.removeAttribute("aria-hidden");r=d=null;l(g,"load",this,!1);l(g,"resize",this,!1);l(e,"mousedown",this,!1);l(e,"touchstart",this,!1);l(e,"touchend",this,!1);l(e,"keyup",this,!1);l(e,"click",this,!1);f.customToggle?e.removeAttribute("aria-hidden"):e.parentNode.removeChild(e)},toggle:function(){s?(q(d,"opened"),p(d,"closed"),m(d,{"aria-hidden":"true"}),f.animate?setTimeout(function(){d.style.position=
7
- "absolute"},f.transition+10):d.style.position="absolute",s=!1,f.close()):(q(d,"closed"),p(d,"opened"),d.style.position=f.openPos,m(d,{"aria-hidden":"false"}),s=!0,f.open())},handleEvent:function(a){a=a||g.event;switch(a.type){case "mousedown":this._onmousedown(a);break;case "touchstart":this._ontouchstart(a);break;case "touchend":this._ontouchend(a);break;case "keyup":this._onkeyup(a);break;case "click":this._onclick(a);break;case "load":this._transitions(a);this._resize(a);break;case "resize":this._resize(a)}},
8
- _init:function(){p(d,"closed");this._createToggle();k(g,"load",this,!1);k(g,"resize",this,!1);k(e,"mousedown",this,!1);k(e,"touchstart",this,!1);k(e,"touchend",this,!1);k(e,"keyup",this,!1);k(e,"click",this,!1)},_createStyles:function(){n.parentNode||h.getElementsByTagName("head")[0].appendChild(n)},_removeStyles:function(){n.parentNode&&n.parentNode.removeChild(n)},_createToggle:function(){if(f.customToggle){var a=f.customToggle.replace("#","");if(h.getElementById(a))e=h.getElementById(a);else throw Error("The custom nav toggle you are trying to select doesn't exist");
4
+ a.detachEvent("on"+b,c))},v=function(a){if(1>a.children.length)throw Error("The Nav container has no containing elements");for(var b=[],c=0;c<a.children.length;c++)1===a.children[c].nodeType&&b.push(a.children[c]);return b},m=function(a,b){for(var c in b)a.setAttribute(c,b[c])},q=function(a,b){a.className+=" "+b;a.className=a.className.replace(/(^\s*)|(\s*$)/g,"")},r=function(a,b){a.className=a.className.replace(RegExp("(\\s|^)"+b+"(\\s|$)")," ").replace(/(^\s*)|(\s*$)/g,"")},t=function(a,b){var c;
5
+ this.options={animate:!0,transition:400,label:"Menu",insert:"after",customToggle:"",openPos:"relative",jsClass:"js",init:function(){},open:function(){},close:function(){}};for(c in b)this.options[c]=b[c];q(h.documentElement,this.options.jsClass);this.wrapperEl=a.replace("#","");if(h.getElementById(this.wrapperEl))this.wrapper=h.getElementById(this.wrapperEl);else throw Error("The nav element you are trying to select doesn't exist");this.wrapper.inner=v(this.wrapper);f=this.options;d=this.wrapper;
6
+ this._init(this)};t.prototype={destroy:function(){this._removeStyles();r(d,"closed");r(d,"opened");d.removeAttribute("style");d.removeAttribute("aria-hidden");s=d=null;l(g,"load",this,!1);l(g,"resize",this,!1);l(e,"mousedown",this,!1);l(e,"touchstart",this,!1);l(e,"touchend",this,!1);l(e,"keyup",this,!1);l(e,"click",this,!1);f.customToggle?e.removeAttribute("aria-hidden"):e.parentNode.removeChild(e)},toggle:function(){p?(r(d,"opened"),q(d,"closed"),m(d,{"aria-hidden":"true"}),f.animate?setTimeout(function(){d.style.position=
7
+ "absolute"},f.transition+10):d.style.position="absolute",p=!1,f.close()):(r(d,"closed"),q(d,"opened"),d.style.position=f.openPos,m(d,{"aria-hidden":"false"}),p=!0,f.open())},handleEvent:function(a){a=a||g.event;switch(a.type){case "mousedown":this._onmousedown(a);break;case "touchstart":this._ontouchstart(a);break;case "touchend":this._ontouchend(a);break;case "keyup":this._onkeyup(a);break;case "click":this._onclick(a);break;case "load":this._transitions(a);this._resize(a);break;case "resize":this._resize(a)}},
8
+ _init:function(){q(d,"closed");p=!1;this._createToggle();k(g,"load",this,!1);k(g,"resize",this,!1);k(e,"mousedown",this,!1);k(e,"touchstart",this,!1);k(e,"touchend",this,!1);k(e,"keyup",this,!1);k(e,"click",this,!1)},_createStyles:function(){n.parentNode||h.getElementsByTagName("head")[0].appendChild(n)},_removeStyles:function(){n.parentNode&&n.parentNode.removeChild(n)},_createToggle:function(){if(f.customToggle){var a=f.customToggle.replace("#","");if(h.getElementById(a))e=h.getElementById(a);else throw Error("The custom nav toggle you are trying to select doesn't exist");
9
9
  }else a=h.createElement("a"),a.innerHTML=f.label,m(a,{href:"#",id:"nav-toggle"}),"after"===f.insert?d.parentNode.insertBefore(a,d.nextSibling):d.parentNode.insertBefore(a,d),e=h.getElementById("nav-toggle")},_preventDefault:function(a){a.preventDefault?(a.preventDefault(),a.stopPropagation()):a.returnValue=!1},_onmousedown:function(a){var b=a||g.event;3!==b.which&&2!==b.button&&(this._preventDefault(a),this.toggle(a))},_ontouchstart:function(a){e.onmousedown=null;this._preventDefault(a);this.toggle(a)},
10
10
  _ontouchend:function(){var a=this;d.addEventListener("click",a._preventDefault,!0);setTimeout(function(){d.removeEventListener("click",a._preventDefault,!0)},f.transition)},_onkeyup:function(a){13===(a||g.event).keyCode&&this.toggle(a)},_onclick:function(a){this._preventDefault(a)},_transitions:function(){if(f.animate){var a=d.style,b="max-height "+f.transition+"ms";a.WebkitTransition=b;a.MozTransition=b;a.OTransition=b;a.transition=b}},_calcHeight:function(){for(var a=0,b=0;b<d.inner.length;b++)a+=
11
- d.inner[b].offsetHeight;a="#"+this.wrapperEl+".opened{max-height:"+a+"px}";u&&(n.innerHTML=a)},_resize:function(){"none"!==g.getComputedStyle(e,null).getPropertyValue("display")?(m(e,{"aria-hidden":"false"}),d.className.match(/(^|\s)closed(\s|$)/)&&(m(d,{"aria-hidden":"true"}),d.style.position="absolute"),this._createStyles(),this._calcHeight()):(m(e,{"aria-hidden":"true"}),m(d,{"aria-hidden":"false"}),d.style.position=f.openPos,this._removeStyles());f.init()}};var r;return function(a,b){r||(r=new t(a,
12
- b));return r}}(window,document);
11
+ d.inner[b].offsetHeight;a="#"+this.wrapperEl+".opened{max-height:"+a+"px}";u&&(n.innerHTML=a)},_resize:function(){"none"!==g.getComputedStyle(e,null).getPropertyValue("display")?(m(e,{"aria-hidden":"false"}),d.className.match(/(^|\s)closed(\s|$)/)&&(m(d,{"aria-hidden":"true"}),d.style.position="absolute"),this._createStyles(),this._calcHeight()):(m(e,{"aria-hidden":"true"}),m(d,{"aria-hidden":"false"}),d.style.position=f.openPos,this._removeStyles());f.init()}};var s;return function(a,b){s||(s=new t(a,
12
+ b));return s}}(window,document);
@@ -1,4 +1,4 @@
1
- /*! responsive-nav.js v1.0.15 by @viljamis */
1
+ /*! responsive-nav.js v1.0.16 by @viljamis */
2
2
 
3
3
  #nav ul {
4
4
  margin: 0;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: responsive-nav-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.15
4
+ version: 1.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas McNiven
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-06-29 00:00:00.000000000 Z
11
+ date: 2013-08-05 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: responsive-nav.com for the rails asset pipeline
14
14
  email:
@@ -49,7 +49,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
49
49
  version: '0'
50
50
  requirements: []
51
51
  rubyforge_project:
52
- rubygems_version: 2.0.0
52
+ rubygems_version: 2.0.3
53
53
  signing_key:
54
54
  specification_version: 4
55
55
  summary: an asset gemification of the responsive-nav plugin