[Bf-docboard-svn] bf-manual: [7429] trunk/blender_docs/resources/theme/js/version_switch.js: Fix latest manual version warning that it is not the latest version

Brecht Van Lommel noreply at blender.org
Thu Nov 26 17:48:21 CET 2020


Revision: 7429
          https://developer.blender.org/rBM7429
Author:   brecht
Date:     2020-11-26 17:48:21 +0100 (Thu, 26 Nov 2020)
Log Message:
-----------
Fix latest manual version warning that it is not the latest version

This problem was introduced in r6839, assuming the dev version is the latest
official release is not correct.

The mechanism for this warning is still broken and it's not clear that it ever
worked well. For that reason it is disabled. See code comments for what needs
to be fixed.

Revision Links:
--------------
    https://developer.blender.org/rBM6839

Modified Paths:
--------------
    trunk/blender_docs/resources/theme/js/version_switch.js

Modified: trunk/blender_docs/resources/theme/js/version_switch.js
===================================================================
--- trunk/blender_docs/resources/theme/js/version_switch.js	2020-11-26 04:52:01 UTC (rev 7428)
+++ trunk/blender_docs/resources/theme/js/version_switch.js	2020-11-26 16:48:21 UTC (rev 7429)
@@ -85,9 +85,14 @@
 	this.$btn.on("keydown", function(e){ if(that.keybtnfilter(e)){that.btnhandler();} });
 },
 warn_old: function(release, all_versions) {
-	var current = all_versions.dev
+	// Note this is effectively disabled now, two issues must fixed:
+	// * versions.js does not contain a current entry, because that leads to
+	//   duplicate version numbers in the menu. These need to be deduplicated.
+	// * It only shows the warning after opening the menu to switch version
+	//   or language, when versions.js is loaded. This is too late to be useful.
+	var current = all_versions.current
 	if (!current) {
-		console.log("Version Switch Error: no 'dev' in version.json.");
+		//console.log("Version Switch Error: no 'current' in version.json.");
 		return;
 	}
 	const m = current.match(/\d\.\d+/g);



More information about the Bf-docboard-svn mailing list