Interactive radio instead of CHART_REPO placeholders

This commit is contained in:
Vincent Fiduccia
2019-02-16 19:57:19 -08:00
committed by Denise
parent 44095cbc62
commit 3b4dfaaaa1
8 changed files with 54 additions and 14 deletions
+18
View File
@@ -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();
});