Skip to content

Commit

Permalink
Add js to redirect old anchors to new ones
Browse files Browse the repository at this point in the history
  • Loading branch information
fmbenhassine committed Oct 24, 2019
1 parent e7647b9 commit 1622a74
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
62 changes: 62 additions & 0 deletions spring-batch-docs/asciidoc/js/Redirect.js
@@ -0,0 +1,62 @@
$(document).ready(function(){

redirect();

function redirect() {
var anchorMap = {
"#domain": "#domainLanguageOfBatch",
"#domainJob": "#job",
"#domainJobInstance": "#jobinstance",
"#domainJobParameters": "#jobparameters",
"#domainJobExecution": "#jobexecution",
"#d5e455": "#jobexecution",
"#d5e497": "#jobexecution",
"#d5e507": "#jobexecution",
"#d5e523": "#jobexecution",
"#d5e550": "#jobexecution",
"#d5e563": "#jobexecution",
"#d5e591": "#jobexecution",
"#domainStep": "#step",
"#domainStepExecution": "#stepexecution",
"#d5e655": "#stepexecution",
"#domainExecutionContext": "#executioncontext",
"#d5e721": "#executioncontext",
"#d5e731": "#executioncontext",
"#d5e745": "#executioncontext",
"#d5e761": "#executioncontext",
"#d5e779": "#executioncontext",
"#domainJobRepository": "#jobrepository",
"#domainJobLauncher": "#joblauncher",
"#domainItemReader": "#item-reader",
"#domainItemWriter": "#item-writer",
"#domainItemProcessor": "#item-processor",
"#domainBatchNamespace": "#batch-namespace",
"#d5e970": "#jobparametersvalidator",
"#d5e1130": "#commandLineJobRunner",
"#d5e1232": "#jobregistry",
"#d5e1237": "#jobregistrybeanpostprocessor",
"#d5e1242": "#automaticjobregistrar",
"#d5e1320": "#aborting-a-job",
"#filiteringRecords": "#filteringRecords",
"#d5e2247": "#flatFileItemReader",
"#d5e2769": "#JdbcCursorItemReaderProperties",
"#stepExecutionSplitter": "#partitioner",
"#d5e3182": "#bindingInputDataToSteps",
"#d5e3241": "#repeatStatus",
"#d5e3531": "#testing-step-scoped-components",
"#patterns": "#commonPatterns",
"#d5e3959": "#item-based-processing",
"#d5e3969": "#custom-checkpointing",
"#available-attributes-of-the-job-launching-gateway": "#availableAttributesOfTheJobLaunchingGateway",
"#d5e4425": "#itemReadersAppendix",
"#d5e4494": "#itemWritersAppendix",
"#d5e4788": "#recommendationsForIndexingMetaDataTables"
};
var baseUrl = window.location.origin + window.location.pathname;
var anchor = window.location.hash;
if (anchor && anchorMap[anchor] != null) {
window.location.replace(baseUrl + anchorMap[anchor]);
}
}

});
1 change: 1 addition & 0 deletions spring-batch-docs/asciidoc/toggle.adoc
Expand Up @@ -4,6 +4,7 @@ ifdef::backend-html5[]
<script type="text/javascript" src="js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="js/js.cookie.js"></script>
<script type="text/javascript" src="js/DocumentToggle.js"></script>
<script type="text/javascript" src="js/Redirect.js"></script>
<div class="docToggle-button">
<input id="xmlButton" type="radio" name="docToggle" value="XML"><label for="xmlButton">XML</label>
<input id="javaButton" type="radio" name="docToggle" value="Java" checked><label for="javaButton">Java</label>
Expand Down

0 comments on commit 1622a74

Please sign in to comment.