Browse Source

7.2.8 release

Gaudenz Alder 8 years ago
parent
commit
e45939f7b9

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+25-AUG-2017: 7.2.8
+
+- Fixes open in new window for local exports
+- Fixes collapse/expand for containers
+- Uses mxGraph 3.7.5 beta 14
+
 24-AUG-2017: 7.2.7
 
 - Fixes file usage stats

+ 1 - 1
VERSION

@@ -1 +1 @@
-7.2.7
+7.2.8

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


+ 1 - 1
war/cache.manifest

@@ -1,7 +1,7 @@
 CACHE MANIFEST
 
 # THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 08/24/2017 05:26 PM
+# 08/25/2017 09:23 AM
 
 app.html
 index.html?offline=1

File diff suppressed because it is too large
+ 23 - 26
war/js/app.min.js


File diff suppressed because it is too large
+ 3 - 3
war/js/atlas-viewer.min.js


File diff suppressed because it is too large
+ 405 - 408
war/js/atlas.min.js


+ 7 - 210
war/js/diagramly/App.js

@@ -186,6 +186,11 @@ App.TRELLO_URL = 'https://api.trello.com/1/client.js';
  */
 App.TRELLO_JQUERY_URL = 'https://code.jquery.com/jquery-1.7.1.min.js';
 
+/**
+ * Trello JQuery dependency
+ */
+App.FOOTER_PLUGIN_URL = 'https://www.jgraph.com/drawio-footer.js';
+
 /**
  * Defines plugin IDs for loading via p URL parameter. Update the table at
  * https://desk.draw.io/solution/articles/16000042546
@@ -525,10 +530,8 @@ App.main = function(callback)
 			var plugins = mxSettings.getPlugins();
 			var temp = urlParams['p'];
 			
-			if ((temp != null) || (plugins != null && plugins.length > 0))
-			{
-				App.initPluginCallback();
-			}
+			App.initPluginCallback();
+			mxscript(App.FOOTER_PLUGIN_URL);
 			
 			if (temp != null)
 			{
@@ -813,26 +816,6 @@ App.prototype.init = function()
 	 */	
 	this.descriptorChangedListener = mxUtils.bind(this, this.descriptorChanged);
 
-	/**
-	 * Basic adds for all backends.
-	 */
-	this.basicAds = ['<a title="' + mxResources.get('loveIt', ['draw.io']) +
-		'" target="_blank" href="https://twitter.com/intent/tweet?text=' +
-		encodeURIComponent(mxResources.get('loveIt', ['www.draw.io'])) +
-		'" onclick="javascript:window.open(this.href, \'\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,' +
-		'left=\'+((screen.width-640)/2)+\',top=\'+((screen.height-280)/3)+\',height=280,width=640\');return false;"\'>' +
-		'<img border="0" align="absmiddle" width="18" height="18" style="margin-top:-2px;padding-right:8px;" src="' +
-		Editor.tweetImage + '"/>' + mxResources.get('loveIt', ['draw.io']) + '</a>',
-		'<a title="Share on Facebook" target="_blank" href="https://www.facebook.com/sharer.php?u=' +
-		encodeURIComponent('https://www.draw.io') +
-		'" onclick="javascript:window.open(this.href, \'\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,' +
-		'left=\'+((screen.width-640)/2)+\',top=\'+((screen.height-520)/3)+\',height=520,width=640\');return false;"\'>' +
-		'<img border="0" align="absmiddle" width="18" height="18" style="margin-top:-2px;padding-right:8px;" src="' +
-		Editor.facebookImage + '"/>Share on Facebook</a>',
-		'<a title="draw.io Offline" href="https://www.draw.io/app" target="_blank">' +
-		'<img border="0" align="absmiddle" style="margin-top:-1px;padding-right:8px;" src="images/download.png"/>' +
-		'draw.io Offline</a>'];
-
 	/**
 	 * Creates github client.
 	 */
@@ -961,17 +944,6 @@ App.prototype.init = function()
 					
 					this.drive.addListener('userChanged', mxUtils.bind(this, function()
 					{
-						// Changes the footer ads for Google Accounts
-//						if (this.updateAd != null)
-//						{
-//							this.adsHtml = this.basicAds.concat([
-//								'<a title="Google Docs Add-on" href="https://chrome.google.com/webstore/detail/drawio-diagrams/clpbjldiohnnmfmkngmaohehlnfkmoea" target="_blank">' +
-//								'<img border="0" align="absmiddle" style="margin-top:-4px;" src="images/glyphicons_star.png"/>&nbsp;&nbsp;Google Docs Add-on</a>',
-//								'<a title="Please help us to 5 stars" href="https://chrome.google.com/webstore/detail/drawio-pro/onlkggianjhjenigcpigpjehhpplldkc/reviews" target="_blank">' +
-//								'<img border="0" align="absmiddle" style="margin-top:-4px;" src="images/glyphicons_star.png"/>&nbsp;&nbsp;Please help us to 5 stars</a>']);
-//							this.updateAd(this.adsHtml.length - 1);
-//						}
-						
 						this.updateUserElement();
 						this.restoreLibraries();
 						this.checkLicense();
@@ -1089,182 +1061,7 @@ App.prototype.init = function()
 	}
 
 	this.updateHeader();
-	
-	var rotate = mxUtils.bind(this, function(elt, html, delay, fn)
-	{
-		delay = (delay != null) ? delay : 1000;
-		mxUtils.setPrefixedStyle(elt.style, 'transition', 'all ' + (delay / 1000) + 's ease');
-		mxUtils.setPrefixedStyle(elt.style, 'transform', 'scale(0)');
-		elt.style.visibility = 'visible';
-		elt.style.opacity = '0';
-		
-		window.setTimeout(mxUtils.bind(this, function()
-		{
-			elt.innerHTML = html;
-			mxUtils.setPrefixedStyle(elt.style, 'transform', 'scale(1)');
-			elt.style.opacity = '1';
-			
-			if (fn != null)
-			{
-				fn();
-			}
-		}), delay);
-	});
-	
-	// Announce Desktop Apps
-	var td2 = document.getElementById('geFooterItem1');
-	
-	if (td2 != null)
-	{
-		mxEvent.addListener(td2, 'click', mxUtils.bind(this, function()
-		{
-			if (typeof window.ga === 'function' && !this.isOffline())
-			{
-				ga('send', 'event', 'Footer', 'click', 'Confluence');
-			}
-		}));
-	}
-//		var link = 'https://download.draw.io/';
-//		var lastHtml = td2.innerHTML;
-//		var os = 'draw.io';
-//
-//		if (['Macintosh', 'MacIntel', 'MacPPC', 'Mac68K'].indexOf(navigator.platform) >= 0)
-//		{
-//			os += ' for macOS';
-//		}
-//		else if (['Win32', 'Win64', 'Windows', 'WinCE'].indexOf(navigator.platform) >= 0)
-//		{
-//			os += ' for Windows';
-//		}
-//		else if (/\bCrOS\b/.test(navigator.userAgent))
-//		{
-//			os += ' for Chrome OS';
-//		}
-//		else if (/Linux/.test(navigator.platform))
-//		{
-//			os += ' for Linux';
-//		}
-//		else
-//		{
-//			os += ' Desktop';
-//		}
-//		
-//		td2.innerHTML = '<a title="' + os + '" href="' + link + '" target="_blank">' +
-//			'<img border="0" align="absmiddle" style="margin-top:-4px;" width="24" height="24" ' +
-//			'src="images/drawlogo48.png"/>&nbsp;&nbsp;' + os + '</a>';
-//		
-//		window.setInterval(mxUtils.bind(this, function()
-//		{
-//			var temp = lastHtml;
-//			lastHtml = td2.innerHTML;
-//			rotate(td2, temp);
-//		}), 300000);
-//	}
-	
-	// Changes footer from time to time
-	var td = document.getElementById('geFooterItem2');
-	
-	if (td != null && mxClient.IS_SVG)
-	{
-		td.innerHTML = '<a title="Collaborate on diagrams in Samepage" target="_blank" ' +
-			((mxClient.IS_SF) ? 'style="margin-top:-22px;" ' : '') +
-			'href="https://www.samepage.io/draw-diagram-online?SPcid=SIOF%2BDraw%2Breferral%2BDraw%2Bv1%2BNA"\>' +
-			'<img border="0" align="absmiddle" width="24" height="24" style="margin-top:-2px;padding-right:8px;" ' +
-			'src="' + IMAGE_PATH + '/samepage-icon-color.svg"/>Collaborate on diagrams in Samepage</a>';
-		
-		mxEvent.addListener(td, 'click', mxUtils.bind(this, function()
-		{
-			if (typeof window.ga === 'function' && !this.isOffline())
-			{
-				ga('send', 'event', 'Footer', 'click', 'Samepage');
-			}
-		}));
 
-//		this.basicAds.push(td.innerHTML);
-//		this.adsHtml = this.basicAds;
-//		var lastAd = this.adsHtml.length - 1;
-//		var thread2 = null;
-//		var thread = null;
-//		
-//		this.updateAd = function(index, delay)
-//		{
-//			if (thread != null)
-//			{
-//				window.clearTimeout(thread);
-//				thread = null;
-//			}
-//
-//			if (thread2 != null)
-//			{
-//				window.clearTimeout(thread2);
-//				thread2 = null;
-//			}
-//			
-//			if (this.adsHtml.length == 0)
-//			{
-//				td.style.display = 'none';
-//				td.innerHTML = '';
-//			}
-//			else
-//			{
-//				var schedule = mxUtils.bind(this, function()
-//				{
-//					if (this.adsHtml.length > 0)
-//					{
-//						thread = window.setTimeout(mxUtils.bind(this, function()
-//						{
-//							var tmp = 0;
-//							
-//							if (this.adsHtml.length > 1)
-//							{
-//								tmp = Math.round(Math.random() * (this.adsHtml.length - 2));
-//								
-//								if (tmp == lastAd)
-//								{
-//									tmp++;
-//								}
-//							}
-//							
-//							this.updateAd(tmp);
-//						}), 180000);
-//					}
-//				});
-//			
-//				if (index != lastAd)
-//				{
-//					rotate(td, this.adsHtml[index], delay, function()
-//					{
-//						lastAd = index;
-//						schedule();
-//					});
-//				}
-//				else
-//				{
-//					schedule();
-//				}
-//			}
-//		};
-//		
-//		mxEvent.addListener(td, 'click', mxUtils.bind(this, function()
-//		{
-//			this.adsHtml.splice(lastAd, 1);
-//			lastAd = null;
-//			this.updateAd(0);
-//		}));
-//
-//		if (mxSettings.getOpenCounter() > 10 && urlParams['embed'] != '1')
-//		{
-//			thread2 = window.setTimeout(mxUtils.bind(this, function()
-//			{
-//				this.updateAd(0);
-//			}), 15000);
-//		}
-//		else
-//		{
-//			this.updateAd(this.adsHtml.length - 1);
-//		}
-	}
-	
 	if (this.menubar != null)
 	{
 		this.buttonContainer = document.createElement('div');

+ 2 - 1
war/js/diagramly/EditorUi.js

@@ -2726,7 +2726,8 @@
 					if (mimeType != null && mimeType.substring(0, 6) == 'image/' &&
 						(mimeType.substring(0, 9) != 'image/svg' || mxClient.IS_SVG))
 					{
-						if (mxClient.IS_EDGE || document.documentMode == 11 || document.documentMode == 10)
+						// In Google Chrome 60 the code from below produces a blank window 
+						if (mxClient.IS_GC || mxClient.IS_EDGE || document.documentMode == 11 || document.documentMode == 10)
 						{
 							var win = window.open('about:blank');
 							

+ 4 - 2
war/js/diagramly/Trees.js

@@ -179,7 +179,7 @@ EditorUi.prototype.addTrees = function()
 		this.model.beginUpdate();
 		try
 		{
-			var newCells = cells.splice();
+			var newCells = cells.slice();
 			var tmp = [];
 			
 			for (var i = 0; i < cells.length; i++)
@@ -212,12 +212,14 @@ EditorUi.prototype.addTrees = function()
 			}
 			
 			cells = newCells;
-			graphFoldCells.apply(this, arguments);
+			cells = graphFoldCells.apply(this, arguments);
 		}
 		finally
 		{
 			this.model.endUpdate();
 		}
+		
+		return cells;
 	};
 	
 	var graphRemoveCells = graph.removeCells;

+ 57 - 52
war/js/diagramly/TrelloClient.js

@@ -175,60 +175,65 @@ TrelloClient.prototype.writeFile = function(filename, data, cardId, success, err
 			return;
 		}
 		
-		Trello.authorize({
-		  type: 'popup',
-		  name: 'draw.io',
-		  scope: {
-		    read: 'true',
-		    write: 'true' 
-		  },
-		  expiration: 'never',
-		  success: mxUtils.bind(this, function() 
-		  {
-			  var acceptResponse = true;
-				
-			  var timeoutThread = window.setTimeout(mxUtils.bind(this, function()
-			  {
-				acceptResponse = false;
-				error({code: App.ERROR_TIMEOUT, retry: fn});
-			  }), this.ui.timeout);
-				
-			  var formData = new FormData();
-			  formData.append("key", Trello.key());
-			  formData.append("token", Trello.token());
-			  formData.append("file", data);
-			  formData.append("name", filename);  
-
-			  var request = new XMLHttpRequest();
-			  request.responseType = "json";
-			  
-			  request.onreadystatechange = mxUtils.bind(this, function() 
+		var fn = mxUtils.bind(this, function()
+		{
+			Trello.authorize({
+			  type: 'popup',
+			  name: 'draw.io',
+			  scope: {
+			    read: 'true',
+			    write: 'true' 
+			  },
+			  expiration: 'never',
+			  success: mxUtils.bind(this, function() 
 			  {
-			    if (request.readyState === 4)
-			    {
-			    	window.clearTimeout(timeoutThread);
-			    	
-			    	if (acceptResponse)
-		    		{
-			    		if (request.status == 200)
-		    			{
-			    			var fileMeta = request.response;
-			    			fileMeta.compoundId = cardId + this.SEPARATOR + fileMeta.id
-			    			success(fileMeta);
-		    			}
-		    			else
-	    				{
-			    			error();
-	    				}
-		    		}
-			    }
-			  });
-			  
-			  request.open("POST", this.baseUrl + 'cards/' + cardId + '/attachments');
-			  request.send(formData);
-		  }),
-		  error: error
+				  var acceptResponse = true;
+					
+				  var timeoutThread = window.setTimeout(mxUtils.bind(this, function()
+				  {
+					acceptResponse = false;
+					error({code: App.ERROR_TIMEOUT, retry: fn});
+				  }), this.ui.timeout);
+					
+				  var formData = new FormData();
+				  formData.append("key", Trello.key());
+				  formData.append("token", Trello.token());
+				  formData.append("file", data);
+				  formData.append("name", filename);  
+	
+				  var request = new XMLHttpRequest();
+				  request.responseType = "json";
+				  
+				  request.onreadystatechange = mxUtils.bind(this, function() 
+				  {
+				    if (request.readyState === 4)
+				    {
+				    	window.clearTimeout(timeoutThread);
+				    	
+				    	if (acceptResponse)
+			    		{
+				    		if (request.status == 200)
+			    			{
+				    			var fileMeta = request.response;
+				    			fileMeta.compoundId = cardId + this.SEPARATOR + fileMeta.id
+				    			success(fileMeta);
+			    			}
+			    			else
+		    				{
+				    			error();
+		    				}
+			    		}
+				    }
+				  });
+				  
+				  request.open("POST", this.baseUrl + 'cards/' + cardId + '/attachments');
+				  request.send(formData);
+			  }),
+			  error: error
+			});
 		});
+		
+		fn();
 	}
 	else
 	{

File diff suppressed because it is too large
+ 2 - 2
war/js/embed-static.min.js


File diff suppressed because it is too large
+ 2 - 2
war/js/reader.min.js


File diff suppressed because it is too large
+ 3 - 3
war/js/viewer.min.js