Browse Source

6.8.18 release

Former-commit-id: 9356d63bead2220bb0331d4dbee055a2128a179e
Gaudenz Alder 8 years ago
parent
commit
a7d27f1a90
12 changed files with 978 additions and 968 deletions
  1. 5 0
      ChangeLog
  2. 1 1
      VERSION
  3. 1 1
      war/cache.manifest
  4. 260 260
      war/js/app.min.js
  5. 270 270
      war/js/atlas-viewer.min.js
  6. 128 128
      war/js/atlas.min.js
  7. 23 16
      war/js/diagramly/App.js
  8. 17 19
      war/js/diagramly/EditorUi.js
  9. 1 1
      war/js/embed-static.min.js
  10. 1 1
      war/js/reader.min.js
  11. 270 270
      war/js/viewer.min.js
  12. 1 1
      war/shortcuts.svg

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+18-JUL-2017: 6.8.18
+
+- Ctrl+drop for images shows size dialog to reset default
+- Adds dialog before unloading modified page in embed mode
+
 17-JUL-2017: 6.8.17
 
 - Adds dialog for importing large images

+ 1 - 1
VERSION

@@ -1 +1 @@
-6.8.17
+6.8.18

+ 1 - 1
war/cache.manifest

@@ -1,7 +1,7 @@
 CACHE MANIFEST
 
 # THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 07/17/2017 03:24 PM
+# 07/18/2017 12:11 PM
 
 app.html
 index.html?offline=1

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


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


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


+ 23 - 16
war/js/diagramly/App.js

@@ -1354,24 +1354,31 @@ App.prototype.removeDraft = function()
  */
 App.prototype.onBeforeUnload = function()
 {
-	var file = this.getCurrentFile();
-	
-	if (file != null)
+	if (urlParams['embed'] == '1' && this.editor.modified)
 	{
-		// KNOWN: Message is ignored by most browsers
-		if (file.constructor == LocalFile && file.getHash() == '' && !file.isModified() &&
-			urlParams['nowarn'] != '1' && !this.isDiagramEmpty() && urlParams['url'] == null &&
-			!this.editor.chromeless)
-		{
-			return mxResources.get('ensureDataSaved');
-		}
-		else if (file.constructor != DriveFile && file.isModified())
-		{
-			return mxResources.get('allChangesLost');
-		}
-		else
+		return mxResources.get('allChangesLost');
+	}
+	else
+	{
+		var file = this.getCurrentFile();
+		
+		if (file != null)
 		{
-			file.close(true);
+			// KNOWN: Message is ignored by most browsers
+			if (file.constructor == LocalFile && file.getHash() == '' && !file.isModified() &&
+				urlParams['nowarn'] != '1' && !this.isDiagramEmpty() && urlParams['url'] == null &&
+				!this.editor.chromeless)
+			{
+				return mxResources.get('ensureDataSaved');
+			}
+			else if (file.constructor != DriveFile && file.isModified())
+			{
+				return mxResources.get('allChangesLost');
+			}
+			else
+			{
+				file.close(true);
+			}
 		}
 	}
 };

+ 17 - 19
war/js/diagramly/EditorUi.js

@@ -5373,15 +5373,15 @@
 	/**
 	 * 
 	 */
-	EditorUi.prototype.importFiles = function(files, x, y, maxSize, fn, resultFn, filterFn, barrierFn, resizeImages, maxBytes, resampleThreshold, ignoreEmbeddedXml)
+	EditorUi.prototype.importFiles = function(files, x, y, maxSize, fn, resultFn, filterFn, barrierFn, resizeDialog, maxBytes, resampleThreshold, ignoreEmbeddedXml)
 	{
-		var crop = x != null && y != null;
-		
 		x = (x != null) ? x : 0;
 		y = (y != null) ? y : 0;
 		maxSize = (maxSize != null) ? maxSize : this.maxImageSize;
 		maxBytes = (maxBytes != null) ? maxBytes : this.maxImageBytes;
-		resizeImages = (resizeImages != null) ? resizeImages : true;
+		
+		var crop = x != null && y != null;
+		var resizeImages = true;
 		
 		// Checks if large images are imported
 		var largeImages = false;
@@ -5684,13 +5684,13 @@
 			}
 		});
 		
-		if (largeImages && resizeImages)
+		if (largeImages)
 		{
 			this.confirmImageResize(function(doResize)
 			{
 				resizeImages = doResize;
 				doImportFiles();
-			});
+			}, resizeDialog);
 		}
 		else
 		{
@@ -5702,24 +5702,22 @@
 	 * Parses the file using XHR2 via the server. File can be a blob or file object.
 	 * Filename is an optional parameter for blobs (that do not have a filename).
 	 */
-	EditorUi.prototype.confirmImageResize = function(fn)
+	EditorUi.prototype.confirmImageResize = function(fn, force)
 	{
+		force = (force != null) ? force : false;
 		var resume = (this.spinner != null && this.spinner.pause != null) ? this.spinner.pause() : function() {};
+		
 		var wrapper = function(remember, resize)
 		{
-			if (remember)
-			{
-				mxSettings.setResizeImages(resize);
-				mxSettings.save();
-			}
-			
+			mxSettings.setResizeImages((remember) ? resize : null);
+			mxSettings.save();
 			resume();
 			fn(resize);
 		};
 		
 		var resizeImages = (isLocalStorage || mxClient.IS_CHROMEAPP) ? mxSettings.getResizeImages() : null;
 		
-		if (resizeImages != null)
+		if (resizeImages != null && !force)
 		{
 			wrapper(false, resizeImages);
 		}
@@ -6538,7 +6536,7 @@
 					    		{
 					    			queue[i]();
 					    		}
-					    	}, !mxEvent.isControlDown(evt));
+					    	}, mxEvent.isControlDown(evt));
 			    		}
 					    else if (mxUtils.indexOf(evt.dataTransfer.types, 'text/uri-list') >= 0)
 					    {
@@ -6739,7 +6737,7 @@
 				    if (evt.dataTransfer.files.length > 0)
 				    {
 						this.importFiles(evt.dataTransfer.files, x, y, this.maxImageSize, null, null, null, null,
-							!mxEvent.isControlDown(evt), null, null, mxEvent.isShiftDown(evt));
+							mxEvent.isControlDown(evt), null, null, mxEvent.isShiftDown(evt));
 		    		}
 				    else
 				    {
@@ -6785,20 +6783,20 @@
 				    			}
 				    		}
 				    		
-				    		var resizeImages = !mxEvent.isControlDown(evt);
+				    		var resizeImages = true;
 				    		
 				    		var doInsert = mxUtils.bind(this, function()
 				    		{
 				    			graph.setSelectionCells(this.insertTextAt(html, x, y, true, asImage, null, resizeImages));
 				    		});
 				    		
-				    		if (asImage && resizeImages && html.length > this.resampleThreshold)
+				    		if (asImage && html.length > this.resampleThreshold)
 				    		{
 				    			this.confirmImageResize(function(doResize)
 		    					{
 		    						resizeImages = doResize;
 		    						doInsert();
-		    					});
+		    					}, mxEvent.isControlDown(evt));
 				    		}
 				    		else
 			    			{

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


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


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


File diff suppressed because it is too large
+ 1 - 1
war/shortcuts.svg