responsive-nav-rails 1.0.21 → 1.0.22
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a50735e96dfe6afa5858de91f321a5eaba989c56
|
4
|
+
data.tar.gz: cdbf2fe9d2144b23b3991543ee33f16040fc59a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05645ceceaabe64df77e1418bc9dd8c34f8f4fb8856d808ad3c70ada4ef01e4f7da9a6e510e570c0dd58332bdd6dcb76d311513df9a8a18e49078fdbf4852d2f
|
7
|
+
data.tar.gz: 38e69908eed0d34a5c0b06457c55ea5e042c2c0e364e4f563fbe9aba2237dab742b546f9c0c79570d9054b96af11739fdad5eabd6bbde21ca6c8f138ffc00b6b
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! responsive-nav.js v1.0.
|
1
|
+
/*! responsive-nav.js v1.0.22
|
2
2
|
* https://github.com/viljamis/responsive-nav.js
|
3
3
|
* http://responsive-nav.com
|
4
4
|
*
|
@@ -181,6 +181,7 @@ var responsiveNav = function (el, options) {
|
|
181
181
|
this._removeStyles();
|
182
182
|
removeClass(nav, "closed");
|
183
183
|
removeClass(nav, "opened");
|
184
|
+
removeClass(nav, "nav-collapse");
|
184
185
|
nav.removeAttribute("style");
|
185
186
|
nav.removeAttribute("aria-hidden");
|
186
187
|
nav = null;
|
@@ -231,6 +232,26 @@ var responsiveNav = function (el, options) {
|
|
231
232
|
}
|
232
233
|
},
|
233
234
|
|
235
|
+
resize: function () {
|
236
|
+
if (window.getComputedStyle(navToggle, null).getPropertyValue("display") !== "none") {
|
237
|
+
setAttributes(navToggle, {"aria-hidden": "false"});
|
238
|
+
|
239
|
+
// If the navigation is hidden
|
240
|
+
if (nav.className.match(/(^|\s)closed(\s|$)/)) {
|
241
|
+
setAttributes(nav, {"aria-hidden": "true"});
|
242
|
+
nav.style.position = "absolute";
|
243
|
+
}
|
244
|
+
|
245
|
+
this._createStyles();
|
246
|
+
this._calcHeight();
|
247
|
+
} else {
|
248
|
+
setAttributes(navToggle, {"aria-hidden": "true"});
|
249
|
+
setAttributes(nav, {"aria-hidden": "false"});
|
250
|
+
nav.style.position = opts.openPos;
|
251
|
+
this._removeStyles();
|
252
|
+
}
|
253
|
+
},
|
254
|
+
|
234
255
|
handleEvent: function (e) {
|
235
256
|
var evt = e || window.event;
|
236
257
|
|
@@ -252,7 +273,7 @@ var responsiveNav = function (el, options) {
|
|
252
273
|
this._onKeyUp(evt);
|
253
274
|
break;
|
254
275
|
case "resize":
|
255
|
-
this.
|
276
|
+
this.resize(evt);
|
256
277
|
break;
|
257
278
|
}
|
258
279
|
},
|
@@ -266,7 +287,7 @@ var responsiveNav = function (el, options) {
|
|
266
287
|
|
267
288
|
this._createToggle();
|
268
289
|
this._transitions();
|
269
|
-
this.
|
290
|
+
this.resize();
|
270
291
|
|
271
292
|
addEvent(window, "resize", this, false);
|
272
293
|
addEvent(document.body, "touchmove", this, false);
|
@@ -401,26 +422,6 @@ var responsiveNav = function (el, options) {
|
|
401
422
|
}
|
402
423
|
|
403
424
|
innerStyles = "";
|
404
|
-
},
|
405
|
-
|
406
|
-
_resize: function () {
|
407
|
-
if (window.getComputedStyle(navToggle, null).getPropertyValue("display") !== "none") {
|
408
|
-
setAttributes(navToggle, {"aria-hidden": "false"});
|
409
|
-
|
410
|
-
// If the navigation is hidden
|
411
|
-
if (nav.className.match(/(^|\s)closed(\s|$)/)) {
|
412
|
-
setAttributes(nav, {"aria-hidden": "true"});
|
413
|
-
nav.style.position = "absolute";
|
414
|
-
}
|
415
|
-
|
416
|
-
this._createStyles();
|
417
|
-
this._calcHeight();
|
418
|
-
} else {
|
419
|
-
setAttributes(navToggle, {"aria-hidden": "true"});
|
420
|
-
setAttributes(nav, {"aria-hidden": "false"});
|
421
|
-
nav.style.position = opts.openPos;
|
422
|
-
this._removeStyles();
|
423
|
-
}
|
424
425
|
}
|
425
426
|
|
426
427
|
};
|
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.
|
4
|
+
version: 1.0.22
|
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-09-
|
11
|
+
date: 2013-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: responsive-nav.com for the rails asset pipeline
|
14
14
|
email:
|