[Python-checkins] cpython (merge 3.3 -> default): merge with 3.3
georg.brandl
python-checkins at python.org
Sun Oct 28 08:05:32 CET 2012
http://hg.python.org/cpython/rev/21c6175fbcb8
changeset: 79998:21c6175fbcb8
parent: 79993:57a33af85407
parent: 79997:8bde13c5277e
user: Georg Brandl <georg at python.org>
date: Sun Oct 28 08:00:01 2012 +0100
summary:
merge with 3.3
files:
Doc/tools/sphinxext/static/version_switch.js | 18 +++++----
1 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/Doc/tools/sphinxext/static/version_switch.js b/Doc/tools/sphinxext/static/version_switch.js
--- a/Doc/tools/sphinxext/static/version_switch.js
+++ b/Doc/tools/sphinxext/static/version_switch.js
@@ -43,19 +43,21 @@
if (new_url != url) {
// check beforehand if url exists, else redirect to version's start page
- $.get(new_url, function() {
- window.location.href = new_url;
- }).error(function() {
- window.location.href = 'http://docs.python.org/' + selected;
+ $.ajax({
+ url: new_url,
+ success: function() {
+ window.location.href = new_url;
+ },
+ error: function() {
+ window.location.href = 'http://docs.python.org/' + selected;
+ }
});
}
}
$(document).ready(function() {
- var version = DOCUMENTATION_OPTIONS.VERSION.split('.'),
- release = DOCUMENTATION_OPTIONS.RELEASE || DOCUMENTATION_OPTIONS.VERSION;
-
- version = version[0] + '.' + version[1];
+ var release = DOCUMENTATION_OPTIONS.VERSION;
+ var version = release.substr(0, 3);
var select = build_select(version, release);
$('.version_switcher_placeholder').html(select);
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list