adiwg-mdtranslator 2.0.0rc7 → 2.0.0rc8

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: d5f27b6c7c1d17ddabc4953888fb56dc38470c77
4
- data.tar.gz: 8989dc56df54e16632a070ff44075bbd5292ba81
3
+ metadata.gz: 13bbb8eca7807bfba16ecf13280d1a558c347677
4
+ data.tar.gz: d5a3d8d0dea0fd2a0ef8165aeeae4c335782ab4e
5
5
  SHA512:
6
- metadata.gz: 270f790b51e291f40f244231f3f3700618621546f5c32d976521c3f47778ffbc0bbab58bb6b17598a7a76cf2a4ed7a31cba5974b9d71829c21d5cabad7c056b8
7
- data.tar.gz: 9b042b457fc61aeb0b049a45f1165e2b4b933fbd051bd0c6619b5baa4f7825e4f543e9117dd0ede63105e521250b24d2a11e1cb67bbed232c81817714092c406
6
+ metadata.gz: 9ef6d70c38ce2070c82b4511ba0fbdccb704bf7963ebc90468e02cd7a40fdacefff5613ed0da2f18cdf74e4941869bc126f1532f09f3dbc26041456b5596c438
7
+ data.tar.gz: 317c72de89f921ead67cc611b9b7f480d1bd6020b1024923db3f44684d7eb48930b11c941b84c9c57838a4cdfe3ef34ba1837eb6ce43369dab3a1ab4227a8f61
@@ -13,7 +13,7 @@
13
13
  module ADIWG
14
14
  module Mdtranslator
15
15
  # current mdtranslator version
16
- VERSION = "2.0.0rc7"
16
+ VERSION = "2.0.0rc8"
17
17
  end
18
18
  end
19
19
 
@@ -31,7 +31,7 @@ function openDetail(evt) {
31
31
  var href = evt.target.getAttribute("href");
32
32
  href = href.slice(1);
33
33
 
34
- if(window.frameElement){
34
+ if(window.location !== window.parent.location){
35
35
  evt.preventDefault();
36
36
  var el = document.getElementById(href);
37
37
  window.scrollTo(0, el.offsetTop);
@@ -41,7 +41,10 @@ function openDetail(evt) {
41
41
  }
42
42
 
43
43
  // open all detail panels in the document
44
- function openAllDetails() {
44
+ function openAllDetails(evt) {
45
+ if(window.location !== window.parent.location){
46
+ evt.preventDefault();
47
+ }
45
48
  var arr = document.getElementsByTagName("details");
46
49
  var len = arr.length;
47
50
 
@@ -51,7 +54,10 @@ function openAllDetails() {
51
54
  }
52
55
 
53
56
  // close all detail panels in the document
54
- function closeAllDetails() {
57
+ function closeAllDetails(evt) {
58
+ if(window.location !== window.parent.location){
59
+ evt.preventDefault();
60
+ }
55
61
  var arr = document.getElementsByTagName("details");
56
62
  var len = arr.length;
57
63
 
@@ -82,6 +88,19 @@ elOpen.addEventListener("click", openAllDetails, false);
82
88
  var elClose = document.getElementById("closeAllButton");
83
89
  elClose.addEventListener("click", closeAllDetails, false);
84
90
 
91
+ //replace top links in inframes
92
+ if(window.location !== window.parent.location){
93
+ // add event listeners to all "top" links
94
+ var topList = document.querySelectorAll("a[href='#']");
95
+ var topArray = Array.prototype.slice.call(topList);
96
+ topArray.forEach(function(a) {
97
+ a.addEventListener("click", function(evt) {
98
+ evt.preventDefault();
99
+ window.scrollTo(0,0);
100
+ }, false);
101
+ });
102
+ }
103
+
85
104
  if ( typeof L === "object") {
86
105
  (function() {
87
106
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adiwg-mdtranslator
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0rc7
4
+ version: 2.0.0rc8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stan Smith
@@ -612,7 +612,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
612
612
  version: 1.3.1
613
613
  requirements: []
614
614
  rubyforge_project:
615
- rubygems_version: 2.5.2
615
+ rubygems_version: 2.6.8
616
616
  signing_key:
617
617
  specification_version: 4
618
618
  summary: The mdtranslator (metadata translator) is a tool for translating metadata