From fd3d102af84bc2ba2162bf5977be91b5e3f9b175 Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Sat, 27 Oct 2012 23:12:48 +0300 Subject: [PATCH] #8040: fix the version. --- Doc/tools/sphinxext/static/version_switch.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Doc/tools/sphinxext/static/version_switch.js b/Doc/tools/sphinxext/static/version_switch.js index cc99153db29..363bebfcd8a 100644 --- a/Doc/tools/sphinxext/static/version_switch.js +++ b/Doc/tools/sphinxext/static/version_switch.js @@ -52,8 +52,12 @@ } $(document).ready(function() { - var select = build_select(DOCUMENTATION_OPTIONS.VERSION, - DOCUMENTATION_OPTIONS.RELEASE); + var version = DOCUMENTATION_OPTIONS.VERSION.split('.'), + release = DOCUMENTATION_OPTIONS.RELEASE || DOCUMENTATION_OPTIONS.VERSION; + + version = version[0] + '.' + version[1]; + var select = build_select(version, release); + $('.version_switcher_placeholder').html(select); $('.version_switcher_placeholder select').bind('change', on_switch); });