mirror of https://github.com/CGAL/cgal
If the current version of the doc is not in the array, display it
anyway. To be etested.
This commit is contained in:
parent
b289509fce
commit
726a7fccc1
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
var url_re = /(cgal\.geometryfactory\.com\/CGAL\/doc\/|doc\.cgal\.org\/)(master|latest|(\d\.\d+|\d\.\d+\.\d+))\//;
|
||||
var url_local = /.*\/doc_output\//;
|
||||
var current_version_local = '4.13-beta1'
|
||||
var all_versions = [
|
||||
'master',
|
||||
'latest',
|
||||
|
|
@ -21,7 +22,6 @@
|
|||
|
||||
function build_select(current_version) {
|
||||
var buf = ['<select>'];
|
||||
|
||||
$.each(all_versions, function(id) {
|
||||
var version = all_versions[id];
|
||||
buf.push('<option value="' + version + '"');
|
||||
|
|
@ -32,7 +32,11 @@
|
|||
}
|
||||
buf.push('</option>');
|
||||
});
|
||||
|
||||
if ( !all_versions.includes(current_version)) {
|
||||
buf.push('<option value="' + current_version + '"');
|
||||
buf.push(' selected="selected">' + current_version);
|
||||
buf.push('</option>');
|
||||
}
|
||||
buf.push('</select>');
|
||||
return buf.join('');
|
||||
}
|
||||
|
|
@ -77,7 +81,7 @@
|
|||
else {
|
||||
match = url_local.exec(window.location.href);
|
||||
if (match) {
|
||||
var version = '4.11';
|
||||
var version = current_version_local;
|
||||
var select = build_select(version);
|
||||
spanNode.innerHTML=select;
|
||||
$('.version_menu select').bind('change', on_switch);
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
var url_re = /(cgal\.geometryfactory\.com\/CGAL\/doc\/|doc\.cgal\.org\/)(master|latest|(\d\.\d+|\d\.\d+\.\d+))\//;
|
||||
var url_local = /.*\/doc_output\//;
|
||||
var current_version_local = '4.13-beta1'
|
||||
var all_versions = [
|
||||
'master',
|
||||
'latest',
|
||||
|
|
@ -21,7 +22,6 @@
|
|||
|
||||
function build_select(current_version) {
|
||||
var buf = ['<select>'];
|
||||
|
||||
$.each(all_versions, function(id) {
|
||||
var version = all_versions[id];
|
||||
buf.push('<option value="' + version + '"');
|
||||
|
|
@ -32,7 +32,11 @@
|
|||
}
|
||||
buf.push('</option>');
|
||||
});
|
||||
|
||||
if ( !all_versions.includes(current_version)) {
|
||||
buf.push('<option value="' + current_version + '"');
|
||||
buf.push(' selected="selected">' + current_version);
|
||||
buf.push('</option>');
|
||||
}
|
||||
buf.push('</select>');
|
||||
return buf.join('');
|
||||
}
|
||||
|
|
@ -77,7 +81,7 @@
|
|||
else {
|
||||
match = url_local.exec(window.location.href);
|
||||
if (match) {
|
||||
var version = '4.11';
|
||||
var version = current_version_local;
|
||||
var select = build_select(version);
|
||||
spanNode.innerHTML=select;
|
||||
$('.version_menu select').bind('change', on_switch);
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
var url_re = /(cgal\.geometryfactory\.com\/CGAL\/doc\/|doc\.cgal\.org\/)(master|latest|(\d\.\d+|\d\.\d+\.\d+))\//;
|
||||
var url_local = /.*\/doc_output\//;
|
||||
var current_version_local = '4.13-beta1'
|
||||
var all_versions = [
|
||||
'master',
|
||||
'latest',
|
||||
|
|
@ -21,7 +22,6 @@
|
|||
|
||||
function build_select(current_version) {
|
||||
var buf = ['<select>'];
|
||||
|
||||
$.each(all_versions, function(id) {
|
||||
var version = all_versions[id];
|
||||
buf.push('<option value="' + version + '"');
|
||||
|
|
@ -32,7 +32,11 @@
|
|||
}
|
||||
buf.push('</option>');
|
||||
});
|
||||
|
||||
if ( !all_versions.includes(current_version)) {
|
||||
buf.push('<option value="' + current_version + '"');
|
||||
buf.push(' selected="selected">' + current_version);
|
||||
buf.push('</option>');
|
||||
}
|
||||
buf.push('</select>');
|
||||
return buf.join('');
|
||||
}
|
||||
|
|
@ -77,7 +81,7 @@
|
|||
else {
|
||||
match = url_local.exec(window.location.href);
|
||||
if (match) {
|
||||
var version = '4.11';
|
||||
var version = current_version_local;
|
||||
var select = build_select(version);
|
||||
spanNode.innerHTML=select;
|
||||
$('.version_menu select').bind('change', on_switch);
|
||||
|
|
|
|||
Loading…
Reference in New Issue