Gaudenz Alder 6 anni fa
parent
commit
b411180471

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+23-JUL-2019: 11.0.3
+
+- Fixes handling of repository paths in GitLab
+- Ignores hidden cells for selectAll
+- Uses mxGraph 3.7.5 beta 5
+
 22-JUL-2019: 11.0.2
 
 - Replaces alt+click with shift+click in ChromeOS

+ 1 - 1
VERSION

@@ -1 +1 @@
-11.0.2
+11.0.3

File diff suppressed because it is too large
+ 2 - 2
etc/mxgraph/mxClient.js


+ 1 - 1
src/main/java/com/mxgraph/online/AbsAuthServlet.java

@@ -157,7 +157,7 @@ abstract public class AbsAuthServlet extends HttpServlet
 					}
 				}
 				
-				if (e.getMessage().contains("401"))
+				if (e.getMessage() != null && e.getMessage().contains("401"))
 				{
 					response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
 				}

+ 7 - 0
src/main/java/com/mxgraph/online/ConverterServlet.java

@@ -9,6 +9,8 @@ import java.io.OutputStream;
 import java.net.HttpURLConnection;
 import java.net.URL;
 import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServlet;
@@ -27,6 +29,9 @@ public class ConverterServlet  extends HttpServlet
 {
 	private static final long serialVersionUID = -5084595244442555865L;
 
+	private static final Logger log = Logger
+			.getLogger(HttpServlet.class.getName());
+	
 	private static final int MAX_DIM = 5000;
 	private static final double EMF_10thMM2PXL = 26.458;
 	private static final String API_KEY_FILE_PATH = "/WEB-INF/cloud_convert_api_key";
@@ -69,6 +74,8 @@ public class ConverterServlet  extends HttpServlet
 	protected void doPost(HttpServletRequest request,
 			HttpServletResponse response) throws ServletException, IOException
 	{
+		log.log(Level.CONFIG, "EMF-CONVERT: Request from " + request.getHeader("referer"));
+		
 		readApiKey();
 		
 		String inputformat = null, outputformat = null, fileName = null;

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

@@ -1,7 +1,7 @@
 CACHE MANIFEST
 
 # THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 07/22/2019 01:10 PM
+# 07/23/2019 03:26 PM
 
 app.html
 index.html?offline=1

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


+ 6 - 6
src/main/webapp/js/diagramly/Dialogs.js

@@ -392,7 +392,7 @@ var StorageDialog = function(editorUi, fn, rowLimit)
 	{
 		var recentSelect = document.createElement('select');
 		recentSelect.style.marginTop = '8px';
-		recentSelect.style.width = '140px';
+		recentSelect.style.maxWidth = '170px';
 
 		var titleOption = document.createElement('option');
 		titleOption.setAttribute('value', '');
@@ -4395,7 +4395,7 @@ var ImageDialog = function(editorUi, title, initialValue, fn, ignoreExisting, co
 	
 	var btns = document.createElement('div');
 	btns.style.marginTop = (mxClient.IS_QUIRKS) ? '22px' : '14px';
-	btns.style.textAlign = 'right';
+	btns.style.textAlign = 'center';
 	
 	var cancelBtn = mxUtils.button(mxResources.get('cancel'), function()
 	{
@@ -4628,7 +4628,8 @@ var LinkDialog = function(editorUi, initialValue, btnLabel, fn, showPages)
 	linkInput.setAttribute('placeholder', mxResources.get('dragUrlsHere'));
 	linkInput.setAttribute('type', 'text');
 	linkInput.style.marginTop = '6px';
-	linkInput.style.width = '440px';
+	linkInput.style.width = '100%';
+	linkInput.style.boxSizing = 'border-box';
 	linkInput.style.backgroundImage = 'url(\'' + Dialog.prototype.clearImage + '\')';
 	linkInput.style.backgroundRepeat = 'no-repeat';
 	linkInput.style.backgroundPosition = '100% 50%';
@@ -4668,7 +4669,7 @@ var LinkDialog = function(editorUi, initialValue, btnLabel, fn, showPages)
 	pageRadio.setAttribute('name', 'current-linkdialog');
 
 	var pageSelect = document.createElement('select');
-	pageSelect.style.width = '420px';
+	pageSelect.style.width = '100%';
 	
 	if (showPages && editorUi.pages != null)
 	{
@@ -4684,7 +4685,6 @@ var LinkDialog = function(editorUi, initialValue, btnLabel, fn, showPages)
 			urlRadio.defaultChecked = true;
 		}
 		
-		linkInput.style.width = '420px';
 		inner.appendChild(urlRadio);
 		inner.appendChild(linkInput);
 		inner.appendChild(cross);
@@ -4839,7 +4839,7 @@ var LinkDialog = function(editorUi, initialValue, btnLabel, fn, showPages)
 	
 	var btns = document.createElement('div');
 	btns.style.marginTop = '20px';
-	btns.style.textAlign = 'right';
+	btns.style.textAlign = 'center';
 	
 	var helpBtn = mxUtils.button(mxResources.get('help'), function()
 	{

+ 8 - 1
src/main/webapp/js/diagramly/EditorUi.js

@@ -6807,6 +6807,13 @@
 			{
 				if (this.isRemoteVisioFormat(filename) && VSD_CONVERT_URL != null) 
 				{
+					if (filename.substring(filename.length - 3, filename.length) === 'vss')
+					{
+						EditorUi.logEvent({category: 'EMF',
+							action: 'vss upload',
+							label: filename});
+					}
+					
 					var formData = new FormData();
 					formData.append('file1', file, filename);
 
@@ -11630,7 +11637,7 @@
 	EditorUi.prototype.showLinkDialog = function(value, btnLabel, fn)
 	{
 		var dlg = new LinkDialog(this, value, btnLabel, fn, true);
-		this.showDialog(dlg.container, 480, 130, true, true);
+		this.showDialog(dlg.container, 560, 130, true, true);
 		dlg.init();
 	};
 

+ 1 - 1
src/main/webapp/js/diagramly/GitLabClient.js

@@ -1073,7 +1073,7 @@ GitLabClient.prototype.showGitLabDialog = function(showFiles, fn)
 							temp.appendChild(createLink(repository.name_with_namespace, mxUtils.bind(this, function()
 							{
 								org = repository.owner.username;
-								repo = repository.name;
+								repo = repository.path;
 								ref = repository.default_branch || 'master';
 								path = '';
 		

+ 1 - 1
src/main/webapp/js/diagramly/Init.js

@@ -15,7 +15,7 @@ window.EXPORT_URL = window.EXPORT_URL || 'https://exp.draw.io/ImageExport4/expor
 window.PLANT_URL = window.PLANT_URL || 'https://exp-plant.draw.io/plantuml4';
 window.DRAW_MATH_URL = window.DRAW_MATH_URL || 'https://www.draw.io/math';
 window.VSD_CONVERT_URL = window.VSD_CONVERT_URL || "https://convert.draw.io/VsdConverter/api/converter";
-window.EMF_CONVERT_URL = window.EMF_CONVERT_URL || "https://convert.draw.io/emf2png/convertEMF";
+window.EMF_CONVERT_URL = window.EMF_CONVERT_URL || "convert";
 window.SAVE_URL = window.SAVE_URL || 'save';
 window.OPEN_URL = window.OPEN_URL || 'open';
 window.PROXY_URL = window.PROXY_URL || 'proxy';

+ 10 - 0
src/main/webapp/js/mxgraph/Graph.js

@@ -6599,6 +6599,16 @@ if (typeof mxVertexHandler != 'undefined')
 				
 				imgExport = (imgExport != null) ? imgExport : this.createSvgImageExport();
 				var imgExportDrawCellState = imgExport.drawCellState;
+
+				// Ignores custom links
+				var imgExportGetLinkForCellState = imgExport.getLinkForCellState;
+				
+				imgExport.getLinkForCellState = function(state, canvas)
+				{
+					var result = imgExportGetLinkForCellState.apply(this, arguments);
+					
+					return (result != null && !state.view.graph.isCustomLink(result)) ? result : null;
+				};
 				
 				// Implements ignoreSelection flag
 				imgExport.drawCellState = function(state, canvas)

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


+ 7 - 1
src/main/webapp/plugins/anonymize.js

@@ -26,7 +26,6 @@ Draw.loadPlugin(function(editorUi)
 			}
 		}
 	};
-
 	
 	function anonymizeHtml(html)
 	{
@@ -70,6 +69,13 @@ Draw.loadPlugin(function(editorUi)
 			{
 				model.setValue(queue[i].cell, queue[i].label);
 			}
+						
+			// Change page title
+			if (editorUi.currentPage != null)
+			{
+				model.execute(new RenamePage(editorUi, editorUi.currentPage,
+					editorUi.anonymizeString(editorUi.currentPage.getName())));
+			}
 		}
 		finally
 		{