diff --git a/org.fortiss.af3.rcp.help/html/requirements/MIRA.glossary.html b/org.fortiss.af3.rcp.help/html/requirements/MIRA.glossary.html index 314ee3bbe2497e3ce15fb0c446bb4a378b7d1acd..b6d99d268e7bdef033ecb2d1818a651a4f8443c9 100644 --- a/org.fortiss.af3.rcp.help/html/requirements/MIRA.glossary.html +++ b/org.fortiss.af3.rcp.help/html/requirements/MIRA.glossary.html @@ -91,27 +91,7 @@ When you add a picture it is copied into the <i>Images</i> folder in the project If you want to send the model file to someone else, you should also send the <i>Images</i> folder. </p> </div> -<!-- TODO (SB): Move to separate .js file --> -<script> -//Get the button -var upButton = document.getElementById("upBtn"); - -// When the user scrolls down 20px from the top of the document, show the button -window.onscroll = function() {scrollFunction()}; - -function scrollFunction() { - if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) { - upButton.style.display = "block"; - } else { - upButton.style.display = "none"; - } -} - -// When the user clicks on the button, scroll to the top of the document -function topFunction() { - document.body.scrollTop = 0; - document.documentElement.scrollTop = 0; -} +<script src="jsscript/topBtn.js"> </script> </body> </html> \ No newline at end of file diff --git a/org.fortiss.af3.rcp.help/html/requirements/MIRA.requirements.html b/org.fortiss.af3.rcp.help/html/requirements/MIRA.requirements.html index df9dbc8b8d0f5ea1af39b8f3e5c93f89e8ba674d..e79442b3180352eb1a2f0d559640a22516c6d8fb 100644 --- a/org.fortiss.af3.rcp.help/html/requirements/MIRA.requirements.html +++ b/org.fortiss.af3.rcp.help/html/requirements/MIRA.requirements.html @@ -80,27 +80,7 @@ </div> -<!-- TODO (SB): Move to separate .js file --> -<script> -//Get the button -var upButton = document.getElementById("upBtn"); - -// When the user scrolls down 20px from the top of the document, show the button -window.onscroll = function() {scrollFunction()}; - -function scrollFunction() { - if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) { - upButton.style.display = "block"; - } else { - upButton.style.display = "none"; - } -} - -// When the user clicks on the button, scroll to the top of the document -function topFunction() { - document.body.scrollTop = 0; - document.documentElement.scrollTop = 0; -} +<script src="jsscript/topBtn.js"> </script> </body> </html> \ No newline at end of file diff --git a/org.fortiss.af3.rcp.help/html/requirements/MIRA.requirements_analysis.html b/org.fortiss.af3.rcp.help/html/requirements/MIRA.requirements_analysis.html index 249728b0d6dc28bc292b83398afdb8aba8ca4798..461096cf933d3ed904b72848658fbfd3045af92c 100644 --- a/org.fortiss.af3.rcp.help/html/requirements/MIRA.requirements_analysis.html +++ b/org.fortiss.af3.rcp.help/html/requirements/MIRA.requirements_analysis.html @@ -64,28 +64,7 @@ <p>The list of requirements can be sorted by clicking on the column headers of the overview list. You can filter the requirements by inserting filter text in the filter section. Double-clicking on a requirement opens the corresponding requirement.</p> </div> - -<!-- TODO (SB): Move to separate .js file --> -<script> -//Get the button -var upButton = document.getElementById("upBtn"); - -// When the user scrolls down 20px from the top of the document, show the button -window.onscroll = function() {scrollFunction()}; - -function scrollFunction() { - if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) { - upButton.style.display = "block"; - } else { - upButton.style.display = "none"; - } -} - -// When the user clicks on the button, scroll to the top of the document -function topFunction() { - document.body.scrollTop = 0; - document.documentElement.scrollTop = 0; -} +<script src="jsscript/topBtn.js"> </script> </body> </html> \ No newline at end of file diff --git a/org.fortiss.af3.rcp.help/html/requirements/jsscript/topBtn.js b/org.fortiss.af3.rcp.help/html/requirements/jsscript/topBtn.js new file mode 100644 index 0000000000000000000000000000000000000000..62267082b04838c2975c1beeecb170cffa407d7f --- /dev/null +++ b/org.fortiss.af3.rcp.help/html/requirements/jsscript/topBtn.js @@ -0,0 +1,20 @@ + +//Get the button +var upButton = document.getElementById("upBtn"); + +// When the user scrolls down 20px from the top of the document, show the button +window.onscroll = function() {scrollFunction()}; + +function scrollFunction() { + if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) { + upButton.style.display = "block"; + } else { + upButton.style.display = "none"; + } +} + +// When the user clicks on the button, scroll to the top of the document +function topFunction() { + document.body.scrollTop = 0; + document.documentElement.scrollTop = 0; +} \ No newline at end of file