diff options
| -rwxr-xr-x | documentation/set_versions.py | 6 | ||||
| -rw-r--r-- | documentation/sphinx-static/switchers.js.in | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/documentation/set_versions.py b/documentation/set_versions.py index fceff4dbce..0fcbb993be 100755 --- a/documentation/set_versions.py +++ b/documentation/set_versions.py | |||
| @@ -207,7 +207,7 @@ with open("sphinx-static/switchers.js.in", "r") as r, open("sphinx-static/switch | |||
| 207 | lines = r.readlines() | 207 | lines = r.readlines() |
| 208 | for line in lines: | 208 | for line in lines: |
| 209 | if "VERSIONS_PLACEHOLDER" in line: | 209 | if "VERSIONS_PLACEHOLDER" in line: |
| 210 | w.write(" 'dev': 'dev (%s)',\n" % release_series[devbranch]) | 210 | w.write(" 'dev': { 'title': 'dev (%s)', 'obsolete': false,},\n" % release_series[devbranch]) |
| 211 | for branch in activereleases: | 211 | for branch in activereleases: |
| 212 | if branch == devbranch: | 212 | if branch == devbranch: |
| 213 | continue | 213 | continue |
| @@ -219,9 +219,9 @@ with open("sphinx-static/switchers.js.in", "r") as r, open("sphinx-static/switch | |||
| 219 | if versions[-1] != "0": | 219 | if versions[-1] != "0": |
| 220 | version = version + "." + versions[-1] | 220 | version = version + "." + versions[-1] |
| 221 | versions.append(version) | 221 | versions.append(version) |
| 222 | w.write(" '%s': '%s',\n" % (version, version)) | 222 | w.write(" '%s': {'title': '%s', 'obsolete': %s,},\n" % (version, version, str(branch == ourseries).lower())) |
| 223 | if ourversion not in versions and ourseries != devbranch: | 223 | if ourversion not in versions and ourseries != devbranch: |
| 224 | w.write(" '%s': '%s',\n" % (ourversion, ourversion)) | 224 | w.write(" '%s': {'title': '%s', 'obsolete': true,},\n" % (ourversion, ourversion)) |
| 225 | else: | 225 | else: |
| 226 | w.write(line) | 226 | w.write(line) |
| 227 | 227 | ||
diff --git a/documentation/sphinx-static/switchers.js.in b/documentation/sphinx-static/switchers.js.in index e7ef2ce5f5..5ae0325e6d 100644 --- a/documentation/sphinx-static/switchers.js.in +++ b/documentation/sphinx-static/switchers.js.in | |||
| @@ -65,15 +65,15 @@ by https://git.yoctoproject.org/yocto-autobuilder-helper/tree/scripts/run-docs-b | |||
| 65 | function build_version_select(current_series, current_version) { | 65 | function build_version_select(current_series, current_version) { |
| 66 | var buf = ['<select>']; | 66 | var buf = ['<select>']; |
| 67 | 67 | ||
| 68 | $.each(all_versions, function(version, title) { | 68 | $.each(all_versions, function(version, vers_data) { |
| 69 | var series = version.substr(0, 3); | 69 | var series = version.substr(0, 3); |
| 70 | if (series == current_series) { | 70 | if (series == current_series) { |
| 71 | if (version == current_version) | 71 | if (version == current_version) |
| 72 | buf.push('<option value="' + version + '" selected="selected">' + title + '</option>'); | 72 | buf.push('<option value="' + version + '" selected="selected">' + vers_data["title"] + '</option>'); |
| 73 | else | 73 | else |
| 74 | buf.push('<option value="' + version + '">' + title + '</option>'); | 74 | buf.push('<option value="' + version + '">' + vers_data["title"] + '</option>'); |
| 75 | } else { | 75 | } else { |
| 76 | buf.push('<option value="' + version + '">' + title + '</option>'); | 76 | buf.push('<option value="' + version + '">' + vers_data["title"] + '</option>'); |
| 77 | } | 77 | } |
| 78 | }); | 78 | }); |
| 79 | 79 | ||
| @@ -223,7 +223,7 @@ by https://git.yoctoproject.org/yocto-autobuilder-helper/tree/scripts/run-docs-b | |||
| 223 | $('#outdated-warning').html('Version ' + release + ' of the project is now considered obsolete, please select and use a more recent version'); | 223 | $('#outdated-warning').html('Version ' + release + ' of the project is now considered obsolete, please select and use a more recent version'); |
| 224 | $('#outdated-warning').css('padding', '.5em'); | 224 | $('#outdated-warning').css('padding', '.5em'); |
| 225 | } else if (release != "dev") { | 225 | } else if (release != "dev") { |
| 226 | $.each(all_versions, function(version, title) { | 226 | $.each(all_versions, function(version, vers_data) { |
| 227 | var series = version.substr(0, 3); | 227 | var series = version.substr(0, 3); |
| 228 | if (series == current_series && version != release) { | 228 | if (series == current_series && version != release) { |
| 229 | $('#outdated-warning').html('This document is for outdated version ' + release + ', you should select the latest release version in this series, ' + version + '.'); | 229 | $('#outdated-warning').html('This document is for outdated version ' + release + ', you should select the latest release version in this series, ' + version + '.'); |
