Browse Source

10.0.35 release

Gaudenz Alder 6 years ago
parent
commit
0a0fba3a05

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+13-JAN-2019: 10.0.35
+
+- Fixes device option in splash
+- Adds Insert Template
+
 12-JAN-2019: 10.0.34
 
 - Fixes save dialog icon CSS flow

+ 1 - 1
VERSION

@@ -1 +1 @@
-10.0.34
+10.0.35

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

@@ -1,7 +1,7 @@
 CACHE MANIFEST
 
 # THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 01/12/2019 08:41 PM
+# 01/13/2019 10:31 AM
 
 app.html
 index.html?offline=1

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


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


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


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

@@ -285,10 +285,7 @@ var StorageDialog = function(editorUi, fn, rowLimit)
 		addLogo(IMAGE_PATH + '/onedrive-logo.svg', mxResources.get('oneDrive'), App.MODE_ONEDRIVE, 'oneDrive');
 	}
 
-	if (/*!mxClient.IS_IOS || */urlParams['storage'] == 'device')
-	{
-		addLogo(IMAGE_PATH + '/osa_drive-harddisk.png', mxResources.get('device'), App.MODE_DEVICE);
-	}
+	addLogo(IMAGE_PATH + '/osa_drive-harddisk.png', mxResources.get('device'), App.MODE_DEVICE);
 	
 	if (isLocalStorage && (urlParams['browser'] == '1' || urlParams['offline'] == '1'))
 	{
@@ -2657,7 +2654,7 @@ var ParseDialog = function(editorUi, title, defaultType)
  */
 var NewDialog = function(editorUi, compact, showName, callback, createOnly, cancelCallback,
 		leftHighlight, rightHighlight, rightHighlightBorder, itemPadding, templateFile,
-		recentDocsCallback, searchDocsCallback, openExtDocCallback, showImport)
+		recentDocsCallback, searchDocsCallback, openExtDocCallback, showImport, createButtonLabel)
 {
 	showName = (showName != null) ? showName : true;
 	createOnly = (createOnly != null) ? createOnly : false;
@@ -2799,7 +2796,7 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
 		}
 	};
 
-	var createButton = mxUtils.button(mxResources.get('create'), function()
+	var createButton = mxUtils.button(createButtonLabel || mxResources.get('create'), function()
 	{
 		createButton.setAttribute('disabled', 'disabled');
 		create();

+ 7 - 3
src/main/webapp/js/diagramly/EditorUi.js

@@ -252,6 +252,11 @@
 	 */
 	EditorUi.prototype.formatEnabled = urlParams['format'] != '0';
 
+	/**
+	 * Whether template action should be shown in insert menu.
+	 */
+	EditorUi.prototype.insertTemplateEnabled = true;
+	
 	/**
 	 * Restores app defaults for UI
 	 */
@@ -11338,12 +11343,11 @@
 			serviceCount++
 		}
 		
-		if (allowBrowser && isLocalStorage && (urlParams['browser'] == '1' || mxClient.IS_IOS))
+		if (allowBrowser && isLocalStorage && urlParams['browser'] == '1')
 		{
 			serviceCount++
 		}
-		
-		//if (!mxClient.IS_IOS)
+		else
 		{
 			serviceCount++
 		}

+ 54 - 13
src/main/webapp/js/diagramly/Menus.js

@@ -111,7 +111,24 @@
 					}
 				}), true, null, 'svg');
 		}));
+		
+		editorUi.actions.put('insertTemplate', new Action(mxResources.get('template') + '...', function()
+		{
+			var dlg = new NewDialog(editorUi, null, false, function(xml)
+			{
+				editorUi.hideDialog();
+				
+				if (xml != null)
+				{
+					graph.setSelectionCells(editorUi.importXml(xml));
+					graph.scrollCellToVisible(graph.getSelectionCell());
+				}
+			}, null, null, null, null, null, null, null, null, null, null,
+				false, mxResources.get('insert'));
 
+			editorUi.showDialog(dlg.container, 620, 440, true, true);
+		}));
+		
 		editorUi.actions.put('exportXml', new Action(mxResources.get('formatXml') + '...', function()
 		{
 			var div = document.createElement('div');
@@ -1562,7 +1579,7 @@
 			}
 		})));
 
-		this.put('importFrom', new Menu(function(menu, parent)
+		this.put('importFrom', new Menu(mxUtils.bind(this, function(menu, parent)
 		{
 			var doImportFile = mxUtils.bind(this, function(data, mime, filename)
 			{
@@ -1787,7 +1804,7 @@
 					dlg.init();
 				}, parent);
 			}
-		})).isEnabled = isGraphEnabled;
+		}))).isEnabled = isGraphEnabled;
 
 		this.put('theme', new Menu(mxUtils.bind(this, function(menu, parent)
 		{
@@ -2090,38 +2107,56 @@
 	    	return cell;
 		};
 		
-		editorUi.actions.addAction('insertText', function()
+		
+		editorUi.actions.put('exportSvg', new Action(mxResources.get('formatSvg') + '...', function()
+				{
+					editorUi.showExportDialog(mxResources.get('formatSvg'), true, mxResources.get('export'),
+						'https://support.draw.io/display/DO/Exporting+Files',
+						mxUtils.bind(this, function(scale, transparentBackground, ignoreSelection, addShadow,
+							editable, embedImages, border, cropImage, currentPage, linkTarget)
+						{
+							var val = parseInt(scale);
+							
+							if (!isNaN(val) && val > 0)
+							{
+							   	editorUi.exportSvg(val / 100, transparentBackground, ignoreSelection, addShadow,
+							   		editable, embedImages, border, !cropImage, currentPage, linkTarget);
+							}
+						}), true, null, 'svg');
+				}));
+		
+		editorUi.actions.put('insertText', new Action(mxResources.get('text'), function()
 		{
 			if (graph.isEnabled() && !graph.isCellLocked(graph.getDefaultParent()))
 			{
     			graph.startEditingAtCell(insertVertex('Text', 40, 20, 'text;html=1;resizable=0;autosize=1;' +
     				'align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;'));
 			}
-		}, null, null, Editor.ctrlKey + '+Shift+X').isEnabled = isGraphEnabled;
+		}), null, null, Editor.ctrlKey + '+Shift+X').isEnabled = isGraphEnabled;
 		
-		editorUi.actions.addAction('insertRectangle', function()
+		editorUi.actions.put('insertRectangle', new Action(mxResources.get('rectangle'), function()
 		{
 			if (graph.isEnabled() && !graph.isCellLocked(graph.getDefaultParent()))
 			{
     	    	insertVertex('', 120, 60, 'whiteSpace=wrap;html=1;');
 			}
-		}, null, null, Editor.ctrlKey + '+K').isEnabled = isGraphEnabled;
-		
-		editorUi.actions.addAction('insertEllipse', function()
+		}), null, null, Editor.ctrlKey + '+K').isEnabled = isGraphEnabled;
+
+		editorUi.actions.put('insertEllipse', new Action(mxResources.get('ellipse'), function()
 		{
 			if (graph.isEnabled() && !graph.isCellLocked(graph.getDefaultParent()))
 			{
     	    	insertVertex('', 80, 80, 'ellipse;whiteSpace=wrap;html=1;');
 			}
-		}, null, null, Editor.ctrlKey + '+Shift+K').isEnabled = isGraphEnabled;
+		}), null, null, Editor.ctrlKey + '+Shift+K').isEnabled = isGraphEnabled;
 		
-		editorUi.actions.addAction('insertRhombus', function()
+		editorUi.actions.put('insertRhombus', new Action(mxResources.get('rhombus'), function()
 		{
 			if (graph.isEnabled() && !graph.isCellLocked(graph.getDefaultParent()))
 			{
     	    	insertVertex('', 80, 80, 'rhombus;whiteSpace=wrap;html=1;');
 			}
-		}).isEnabled = isGraphEnabled;
+		})).isEnabled = isGraphEnabled;
 		
 		var addInsertMenuItems = mxUtils.bind(this, function(menu, parent, methods)
 		{
@@ -2140,8 +2175,14 @@
 
 		this.put('insert', new Menu(mxUtils.bind(this, function(menu, parent)
 		{
-			this.addMenuItems(menu, ['insertText', 'insertRectangle', '-', 'insertEllipse', 'insertRhombus', '-', 'insertLink', 'insertImage'], parent);
-			menu.addSeparator(parent);
+			this.addMenuItems(menu, ['insertRectangle', 'insertEllipse', 'insertRhombus', '-',
+				'insertText', 'insertLink', '-', 'insertImage'], parent);
+
+			if (editorUi.insertTemplateEnabled && !editorUi.isOffline())
+			{
+				this.addMenuItems(menu, ['insertTemplate', '-'], parent);
+			}
+			
 			this.addSubmenu('insertLayout', menu, parent, mxResources.get('layout'));
 			menu.addSeparator(parent);
 			addInsertMenuItems(menu, parent, ['fromText', 'plantUml', '-', 'formatSql']);

+ 13 - 18
src/main/webapp/js/diagramly/Minimal.js

@@ -536,11 +536,9 @@ EditorUi.initMinimalTheme = function()
         {
             menu.addSeparator();
             this.addMenuItems(menu, ['editData'], null, evt);
-        	menu.addSeparator();
-            this.addSubmenu('insert', menu);
-            this.addSubmenu('layout', menu);
             menu.addSeparator();
             this.addSubmenu('view', menu, null, mxResources.get('options'));
+            this.addSubmenu('layout', menu);
             this.addMenuItems(menu, ['-', 'exitGroup'], null, evt);
         }
         else if (graph.isEnabled())
@@ -650,14 +648,7 @@ EditorUi.initMinimalTheme = function()
         var ui = this.editorUi;
         var graph = ui.editor.graph;
         
-        ui.actions.get('insertText').label = mxResources.get('text');
-        ui.actions.get('insertText').label = mxResources.get('text');
         ui.actions.get('editDiagram').label = mxResources.get('formatXml') + '...';
-        ui.actions.get('insertRectangle').label = mxResources.get('rectangle');
-        ui.actions.get('insertEllipse').label = mxResources.get('ellipse');
-        ui.actions.get('insertRhombus').label = mxResources.get('rhombus');
-        ui.actions.get('insertImage').label = mxResources.get('image') + '...';
-        ui.actions.get('insertLink').label = mxResources.get('link') + '...';
         ui.actions.get('createShape').label = mxResources.get('shape') + '...';
         ui.actions.get('outline').label = mxResources.get('outline') + '...';
         ui.actions.get('layers').label = mxResources.get('layers') + '...';
@@ -887,8 +878,18 @@ EditorUi.initMinimalTheme = function()
         
         this.put('insert', new Menu(mxUtils.bind(this, function(menu, parent)
         {
-            ui.menus.addMenuItems(menu, ['insertRectangle', 'insertEllipse', 'insertRhombus', '-', 'insertText',
-                                         'insertLink', '-', 'insertImage'], parent);
+            ui.menus.addMenuItems(menu, ['insertRectangle', 'insertEllipse', 'insertRhombus', '-',
+            	'insertText', 'insertLink', '-', 'insertImage'], parent);
+            
+            if (ui.insertTemplateEnabled && !ui.isOffline())
+			{
+                ui.menus.addMenuItems(menu, ['insertTemplate'], parent);
+			}
+            
+            menu.addSeparator(parent);
+            ui.menus.addSubmenu('insertLayout', menu, parent);
+            ui.menus.addSubmenu('insertAdvanced', menu, parent);
+            menu.addSeparator(parent);
             
             if (mxClient.IS_CHROMEAPP || EditorUi.isElectronApp)
             {
@@ -898,12 +899,6 @@ EditorUi.initMinimalTheme = function()
             {
             	ui.menus.addSubmenu('importFrom', menu, parent);
             }
-            
-            menu.addSeparator(parent);
-            ui.menus.addSubmenu('insertLayout', menu, parent);
-            ui.menus.addSubmenu('insertAdvanced', menu, parent);
-            menu.addSeparator(parent);
-			menu.addItem(mxResources.get('more') + '...', null, ui.actions.get('toggleShapes').funct, parent);
         })));
 
         var methods = ['horizontalFlow', 'verticalFlow', '-', 'horizontalTree', 'verticalTree',

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


+ 10 - 10
src/main/webapp/js/mxgraph/Actions.js

@@ -360,7 +360,15 @@ Actions.prototype.init = function()
 			});
 		}
 	}, null, null, 'Alt+Shift+L');
-	this.addAction('insertLink...', function()
+	this.put('insertImage', new Action(mxResources.get('image') + '...', function()
+	{
+		if (graph.isEnabled() && !graph.isCellLocked(graph.getDefaultParent()))
+		{
+			graph.clearSelection();
+			ui.actions.get('image').funct();
+		}
+	})).isEnabled = isGraphEnabled;
+	this.put('insertLink', new Action(mxResources.get('link') + '...', function()
 	{
 		if (graph.isEnabled() && !graph.isCellLocked(graph.getDefaultParent()))
 		{
@@ -411,7 +419,7 @@ Actions.prototype.init = function()
 				}
 			});
 		}
-	}).isEnabled = isGraphEnabled;
+	})).isEnabled = isGraphEnabled;
 	this.addAction('link...', mxUtils.bind(this, function()
 	{
 		var graph = ui.editor.graph;
@@ -1239,14 +1247,6 @@ Actions.prototype.init = function()
 			}, graph.cellEditor.isContentEditing(), !graph.cellEditor.isContentEditing());
 		}
 	}).isEnabled = isGraphEnabled;
-	this.addAction('insertImage...', function()
-	{
-		if (graph.isEnabled() && !graph.isCellLocked(graph.getDefaultParent()))
-		{
-			graph.clearSelection();
-			ui.actions.get('image').funct();
-		}
-	}).isEnabled = isGraphEnabled;
 	action = this.addAction('layers', mxUtils.bind(this, function()
 	{
 		if (this.layersWindow == null)

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


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