Sfoglia il codice sorgente

9.2.6 release

Former-commit-id: d47a2585b7bc5d896633fa4fa267d8b2eae6780b
Gaudenz Alder 6 anni fa
parent
commit
5112ce36bd

+ 4 - 0
ChangeLog

@@ -1,3 +1,7 @@
+14-OCT-2018: 9.2.6
+
+- Fixes possible NPE during delayed loading of plugins
+
 14-OCT-2018: 9.2.5
 
 - Adds customPresetColors, override config option

+ 1 - 1
VERSION

@@ -1 +1 @@
-9.2.5
+9.2.6

+ 1 - 1
src/main/webapp/cache.manifest

@@ -1,7 +1,7 @@
 CACHE MANIFEST
 
 # THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 10/14/2018 12:44 PM
+# 10/14/2018 06:11 PM
 
 app.html
 index.html?offline=1

File diff suppressed because it is too large
+ 566 - 566
src/main/webapp/js/app.min.js


File diff suppressed because it is too large
+ 1004 - 1004
src/main/webapp/js/atlas.min.js


+ 82 - 81
src/main/webapp/js/diagramly/App.js

@@ -456,7 +456,89 @@ App.main = function(callback, createUi)
 			frame.setAttribute('src', 'offline.html');
 			document.body.appendChild(frame);
 		}
+		
+		/**
+		 * Loading plugins.
+		 */
+		if (urlParams['plugins'] != '0' && urlParams['offline'] != '1')
+		{
+			// mxSettings is not yet initialized in configure mode, redirect parameter
+			// to p URL parameter in caller for plugins in embed mode
+			var plugins = (mxSettings.settings != null) ? mxSettings.getPlugins() : null;
+			var pluginsLoaded = {};
+			var temp = urlParams['p'];
+			App.initPluginCallback();
+
+			if (temp != null)
+			{
+				// Used to request draw.io sources in dev mode
+				var drawDevUrl = '';
 
+				if (urlParams['drawdev'] == '1')
+				{
+					drawDevUrl = document.location.protocol + '//drawhost.jgraph.com/';
+				}
+				
+				// Mapping from key to URL in App.plugins
+				var t = temp.split(';');
+				
+				for (var i = 0; i < t.length; i++)
+				{
+					var url = App.pluginRegistry[t[i]];
+					
+					if (url != null && pluginsLoaded[url] == null)
+					{
+						pluginsLoaded[url] = true;
+						mxscript(drawDevUrl + url);
+					}
+					else if (window.console != null)
+					{
+						console.log('Unknown plugin:', t[i]);
+					}
+				}
+			}
+			else if (urlParams['chrome'] != '0' && !EditorUi.isElectronApp)
+			{
+				mxscript(App.FOOTER_PLUGIN_URL, null, null, null, mxClient.IS_SVG);
+			}
+			
+			if (plugins != null && plugins.length > 0 && urlParams['plugins'] != '0')
+			{
+				// Loading plugins inside the asynchronous block below stops the page from loading so a 
+				// hardcoded message for the warning dialog is used since the resources are loadd below
+				var warning = 'The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n';
+				var tmp = window.location.protocol + '//' + window.location.host;
+				var local = true;
+				
+				for (var i = 0; i < plugins.length && local; i++)
+				{
+					if (plugins[i].charAt(0) != '/' && plugins[i].substring(0, tmp.length) != tmp)
+					{
+						local = false;
+					}
+				}
+				
+				if (local || mxUtils.confirm(mxResources.replacePlaceholders(warning, [plugins.join('\n')]).replace(/\\n/g, '\n')))
+				{
+					for (var i = 0; i < plugins.length; i++)
+					{
+						try
+						{
+							if (pluginsLoaded[plugins[i]] == null)
+							{
+								pluginsLoaded[url] = true;
+								mxscript(plugins[i]);
+							}
+						}
+						catch (e)
+						{
+							// ignore
+						}
+					}
+				}
+			}
+		}
+		
 		// Loads gapi for all browsers but IE8 and below if not disabled or if enabled and in embed mode
 		// Special case: Cannot load in asynchronous code below
 		if (typeof window.DriveClient === 'function' &&
@@ -596,87 +678,6 @@ App.main = function(callback, createUi)
 
 	function doMain()
 	{
-		
-		/**
-		 * Loading plugins.
-		 */
-		if (urlParams['plugins'] != '0' && urlParams['offline'] != '1')
-		{
-			var plugins = mxSettings.getPlugins();
-			var pluginsLoaded = {};
-			var temp = urlParams['p'];
-			App.initPluginCallback();
-
-			if (temp != null)
-			{
-				// Used to request draw.io sources in dev mode
-				var drawDevUrl = '';
-
-				if (urlParams['drawdev'] == '1')
-				{
-					drawDevUrl = document.location.protocol + '//drawhost.jgraph.com/';
-				}
-				
-				// Mapping from key to URL in App.plugins
-				var t = temp.split(';');
-				
-				for (var i = 0; i < t.length; i++)
-				{
-					var url = App.pluginRegistry[t[i]];
-					
-					if (url != null && pluginsLoaded[url] == null)
-					{
-						pluginsLoaded[url] = true;
-						mxscript(drawDevUrl + url);
-					}
-					else if (window.console != null)
-					{
-						console.log('Unknown plugin:', t[i]);
-					}
-				}
-			}
-			else if (urlParams['chrome'] != '0' && !EditorUi.isElectronApp)
-			{
-				mxscript(App.FOOTER_PLUGIN_URL, null, null, null, mxClient.IS_SVG);
-			}
-			
-			if (plugins != null && plugins.length > 0 && urlParams['plugins'] != '0')
-			{
-				// Loading plugins inside the asynchronous block below stops the page from loading so a 
-				// hardcoded message for the warning dialog is used since the resources are loadd below
-				var warning = 'The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n';
-				var tmp = window.location.protocol + '//' + window.location.host;
-				var local = true;
-				
-				for (var i = 0; i < plugins.length && local; i++)
-				{
-					if (plugins[i].charAt(0) != '/' && plugins[i].substring(0, tmp.length) != tmp)
-					{
-						local = false;
-					}
-				}
-				
-				if (local || mxUtils.confirm(mxResources.replacePlaceholders(warning, [plugins.join('\n')]).replace(/\\n/g, '\n')))
-				{
-					for (var i = 0; i < plugins.length; i++)
-					{
-						try
-						{
-							if (pluginsLoaded[plugins[i]] == null)
-							{
-								pluginsLoaded[url] = true;
-								mxscript(plugins[i]);
-							}
-						}
-						catch (e)
-						{
-							// ignore
-						}
-					}
-				}
-			}
-		}
-		
 		// Adds required resources (disables loading of fallback properties, this can only
 		// be used if we know that all keys are defined in the language specific file)
 		mxResources.loadDefaultBundle = false;

File diff suppressed because it is too large
+ 1 - 1
src/main/webapp/js/embed-static.min.js


File diff suppressed because it is too large
+ 1 - 1
src/main/webapp/js/reader.min.js