[Python-checkins] cpython (merge 2.6 -> 2.7): merge with 2.6
georg.brandl
python-checkins at python.org
Sun Oct 28 08:05:00 CET 2012
http://hg.python.org/cpython/rev/ee33671b2c6a
changeset: 79995:ee33671b2c6a
branch: 2.7
parent: 79983:7ca30af90c11
parent: 79994:4a17784f2fee
user: Georg Brandl <georg at python.org>
date: Sun Oct 28 08:06:11 2012 +0100
summary:
merge with 2.6
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