mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-09-28 22:18:52 +00:00
Interactive radio instead of CHART_REPO placeholders
This commit is contained in:
@@ -117,9 +117,27 @@ const bootstrapIdLinks = function() {
|
||||
});
|
||||
}
|
||||
|
||||
const replaceReleaseChannel = function() {
|
||||
const form = $('#release-channel')[0];
|
||||
if ( form ) {
|
||||
const val = form.channel.value;
|
||||
|
||||
$('CODE').each((idx, code) => {
|
||||
const $code = $(code);
|
||||
const text = $code.data('original') || code.innerHTML;
|
||||
|
||||
if ( text.includes('<CHART_REPO>') ) {
|
||||
$code.data('original', text);
|
||||
code.innerHTML = text.replace(/<CHART_REPO>/g, val);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$(document).ready(() => {
|
||||
bootstrapDocsSearch();
|
||||
bootstrapIdLinks();
|
||||
replaceReleaseChannel();
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user