Gaudenz Alder 6 lat temu
rodzic
commit
aecbc0f0cf

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+28-JUN-2019: 10.8.3
+
+- Embed diagrams from URL in Jira Cloud
+- Makes custom fonts persistent
+- Uses mxGraph 4.0.1 beta 9
+
 27-JUN-2019: 10.8.2
 
 - Fixes handling of special font names

+ 1 - 1
VERSION

@@ -1 +1 @@
-10.8.2
+10.8.3

Plik diff jest za duży
+ 6 - 6
etc/mxgraph/mxClient.js


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

@@ -1,7 +1,7 @@
 CACHE MANIFEST
 
 # THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 06/27/2019 03:56 PM
+# 06/28/2019 01:22 PM
 
 app.html
 index.html?offline=1

Plik diff jest za duży
+ 176 - 171
src/main/webapp/js/app.min.js


+ 10 - 5
src/main/webapp/js/diagramly/App.js

@@ -1068,7 +1068,8 @@ App.prototype.init = function()
 			'white-space:nowrap;left:50%;bottom:2px;';
 		footer.className = className;
 
-		var icn = ((className == 'geStatusAlert') ? '<img src="' + this.editor.graph.warningImage.src + '" border="0" style="margin-top:-4px;margin-right:2px;margin-left:2px;" valign="middle"/>' : '');
+		var icn = ((className == 'geStatusAlert') ? '<img src="' + mxClient.imageBasePath + '/warning.gif" border="0" ' +
+				'style="margin-top:-4px;margin-right:8px;margin-left:8px;" valign="middle"/>' : '');
 		
 		mxUtils.setPrefixedStyle(footer.style, 'transform', 'translate(-50%,110%)');
 		mxUtils.setPrefixedStyle(footer.style, 'transition', 'all 1s ease');
@@ -1120,7 +1121,8 @@ App.prototype.init = function()
 					
 					if (this.oneDrive.user != null && (!isLocalStorage || mxSettings.settings == null ||
 						mxSettings.settings.closeRealtimeWarning == null || mxSettings.settings.closeFooter == null) &&
-						(!this.editor.chromeless || this.editor.editable) && !this.footerShowing)
+						(!this.editor.chromeless || this.editor.editable) &&
+						!this.footerShowing && urlParams['open'] == null)
 					{
 						var footer = createFooter('Add-in for Microsoft Office now available',
 							'https://appsource.microsoft.com/product/office/wa200000113',
@@ -1248,13 +1250,16 @@ App.prototype.init = function()
 						
 						if (this.drive.user != null && (!isLocalStorage || mxSettings.settings == null ||
 							mxSettings.settings.closeRealtimeWarning == null || mxSettings.settings.closeRealtimeWarning <
-							new Date().getTime() - (30 * 24 * 60 * 60 * 1000)) &&
+							new Date().getTime() - (7 * 24 * 60 * 60 * 1000)) &&
 							(!this.editor.chromeless || this.editor.editable))
 						{
 							this.drive.checkRealtimeFiles(mxUtils.bind(this, function()
 							{
-								var footer = createFooter('You need to take action to convert legacy files. Click here.',
-									'https://desk.draw.io/support/solutions/articles/16000092210',
+								// Remaining days before 09/27/2019 where Google real time JSON will be disabled 
+								var days = Math.round((1569535200000 - Date.now()) / (1000 * 60 * 60 * 24));
+								
+								var footer = createFooter(days + ' days left to convert your files. Click here!',
+									'https://www.draw.io/?mode=google&convert-realtime=1',
 									'geStatusAlert',
 									mxUtils.bind(this, function()
 									{

+ 7 - 5
src/main/webapp/js/diagramly/DriveClient.js

@@ -2551,6 +2551,7 @@ DriveClient.prototype.convertRealtimeFiles = function()
 	});
 	
 	print('draw.io (' + EditorUi.VERSION + ') is searching files to be converted...');
+	print('<a href="https://desk.draw.io/support/solutions/articles/16000092210" target="_blank">Click here for help</a>');
 	
 	if (this.ui.spinner.spin(document.body, 'Searching files...'))
 	{
@@ -2825,13 +2826,14 @@ DriveClient.prototype.convertRealtimeFiles = function()
 					{
 						this.ui.spinner.stop();
 						
-						this.ui.confirm('You are about to convert ' + total + ' file(s)', mxUtils.bind(this, function()
-						{
-							doConvert();
-						}), mxUtils.bind(this, function()
+						this.ui.showError('Confirm', 'You are about to convert ' + total + ' file(s)',
+							'Cancel', mxUtils.bind(this, function()
 						{
 							print('Cancelled by user.<br><br>This window can now be closed.');
-						}));
+						}), null, 'OK', doConvert, 'Help', function()
+						{
+							window.open('https://desk.draw.io/support/solutions/articles/16000092210');
+						}, 340, 120);
 					}
 				}));
 			});

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

@@ -9082,7 +9082,18 @@
 
 			// Updates UI to reflect current edge style
 			this.fireEvent(new mxEventObject('styleChanged', 'keys', [], 'values', [], 'cells', []));
-
+			
+			/**
+			 * Persists custom fonts.
+			 */
+			this.menus.customFonts = mxSettings.getCustomFonts();
+			
+			this.addListener('customFontsChanged', mxUtils.bind(this, function(sender, evt)
+			{
+				mxSettings.setCustomFonts(this.menus.customFonts);
+				mxSettings.save();
+			}));
+			
 			/**
 			 * Persists copy on connect switch.
 			 */

+ 6 - 5
src/main/webapp/js/diagramly/Minimal.js

@@ -20,6 +20,7 @@ EditorUi.initMinimalTheme = function()
        style.innerHTML = '* { -webkit-font-smoothing: antialiased; }' +
        	   'html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }' +
        	   'html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }' +
+       	   'table.mxWindow * { font-size:13px; }' +
            'html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700;border-radius: 5px; }' +
            'html body button.geBtn:active { opacity: 0.6; }' +
            'html body a.geMenuItem { opacity: 0.75; }' +
@@ -48,13 +49,13 @@ EditorUi.initMinimalTheme = function()
            '.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }' +
            '.mxWindow div button.geStyleButton { box-sizing: border-box; }' +
            'table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }' +
-           'td.mxWindowPane .geSidebarContainer button { padding:2px 0 2px 0; box-sizing: border-box; }' +
+           'td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }' +
            'html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }' +
            // Styling for Minimal
            '.geToolbarContainer { background:#fff !important; }' +
-           'div.mxWindow .geSidebarContainer .geTitle { background-color:#fdfdfd; }' +
-           'div.mxWindow .geSidebarContainer .geTitle:hover { background-color:#fafafa; }' +
-           'div.geSidebar { background-color: #fff !important;}' +
+           'div.geSidebarContainer { background-color: #ffffff; }' +
+           'div.geSidebar { border-bottom: none; }' +
+           'div.geSidebarContainer .geTitle { background-color:#ffffff; border-bottom: none; }' +
            'div.mxWindow td.mxWindowPane button { background-image: none; float: none; }' +
            'td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }' +
            'div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:#fff !important; }' +
@@ -174,7 +175,7 @@ EditorUi.initMinimalTheme = function()
 
 	    if (ui.sidebarWindow == null)
 	    {
-	        var w = Math.min(graph.container.clientWidth - 10, 266);
+	        var w = Math.min(graph.container.clientWidth - 10, 242);
 	        
 	        ui.sidebarWindow = new WrapperWindow(ui, mxResources.get('shapes'), 10, 56,
 	           w - 6, Math.min(650, graph.container.clientHeight - 30),

+ 15 - 1
src/main/webapp/js/diagramly/Settings.js

@@ -10,7 +10,7 @@ var mxSettings =
 	/**
 	 * Defines current version of settings.
 	 */
-	currentVersion: 17,
+	currentVersion: 18,
 	
 	defaultFormatWidth: (screen.width < 600) ? '0' : '240',
 	
@@ -73,6 +73,14 @@ var mxSettings =
 	{
 		mxSettings.settings.openCounter = openCounter;
 	},
+	setCustomFonts: function(fonts)
+	{
+		mxSettings.settings.customFonts = fonts;
+	},
+	getCustomFonts: function(fonts)
+	{
+		return mxSettings.settings.customFonts;
+	},
 	getLibraries: function()
 	{
 		return mxSettings.settings.libraries;
@@ -158,6 +166,7 @@ var mxSettings =
 		{
 			language: '',
 			configVersion: Editor.configVersion,
+			customFonts: [],
 			libraries: Sidebar.prototype.defaultEntries,
 			customLibraries: Editor.defaultCustomLibraries,
 			plugins: [],
@@ -228,6 +237,11 @@ var mxSettings =
 				{
 					mxSettings.settings.recentColors = [];
 				}
+
+				if (mxSettings.settings.customFonts == null)
+				{
+					mxSettings.settings.customFonts = [];
+				}
 				
 				if (mxSettings.settings.libraries == null)
 				{

+ 6 - 1
src/main/webapp/js/mxgraph/Menus.js

@@ -91,6 +91,7 @@ Menus.prototype.init = function()
 			menu.addItem(mxResources.get('reset'), null, mxUtils.bind(this, function()
 			{
 				this.customFonts = [];
+				this.editorUi.fireEvent(new mxEventObject('customFontsChanged'));
 			}), parent);
 			
 			menu.addSeparator(parent);
@@ -98,7 +99,11 @@ Menus.prototype.init = function()
 		
 		this.promptChange(menu, mxResources.get('custom') + '...', '', mxConstants.DEFAULT_FONTFAMILY, mxConstants.STYLE_FONTFAMILY, parent, true, mxUtils.bind(this, function(newValue)
 		{
-			this.customFonts.push(newValue);
+			if (mxUtils.indexOf(this.customFonts, newValue) < 0)
+			{
+				this.customFonts.push(newValue);
+				this.editorUi.fireEvent(new mxEventObject('customFontsChanged'));
+			}
 		}));
 	})));
 	this.put('formatBlock', new Menu(mxUtils.bind(this, function(menu, parent)

+ 5 - 5
src/main/webapp/js/mxgraph/Sidebar.js

@@ -669,7 +669,7 @@ Sidebar.prototype.addSearchPalette = function(expand)
 	button.style.marginTop = '4px';
 	button.style.marginBottom = '8px';
 	center.style.paddingTop = '4px';
-	center.style.paddingBottom = '8px';
+	center.style.paddingBottom = '4px';
 	
 	center.appendChild(button);
 	div.appendChild(center);
@@ -957,6 +957,9 @@ Sidebar.prototype.addGeneralPalette = function(expand)
 	    this.createVertexTemplateEntry('shape=card;whiteSpace=wrap;html=1;', 80, 100, '', 'Card'),
 	    this.createVertexTemplateEntry('shape=callout;whiteSpace=wrap;html=1;perimeter=calloutPerimeter;', 120, 80, '', 'Callout', null, null, 'bubble chat thought speech message'),
 	 	this.createVertexTemplateEntry('shape=umlActor;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;html=1;outlineConnect=0;', 30, 60, 'Actor', 'Actor', false, null, 'user person human stickman'),
+	 	this.createVertexTemplateEntry('shape=xor;whiteSpace=wrap;html=1;', 60, 80, '', 'Or', null, null, 'logic or'),
+	 	this.createVertexTemplateEntry('shape=or;whiteSpace=wrap;html=1;', 60, 80, '', 'And', null, null, 'logic and'),
+	 	this.createVertexTemplateEntry('shape=dataStorage;whiteSpace=wrap;html=1;', 100, 80, '', 'Data Storage'),    
 	 	this.addEntry('curve', mxUtils.bind(this, function()
 	 	{
 			var cell = new mxCell('', new mxGeometry(0, 0, 50, 50), 'curved=1;endArrow=classic;html=1;');
@@ -1122,9 +1125,6 @@ Sidebar.prototype.createAdvancedShapes = function()
 	field.vertex = true;
 
 	return [
-	 	this.createVertexTemplateEntry('shape=xor;whiteSpace=wrap;html=1;', 60, 80, '', 'Or', null, null, 'logic or'),
-	 	this.createVertexTemplateEntry('shape=or;whiteSpace=wrap;html=1;', 60, 80, '', 'And', null, null, 'logic and'),
-	 	this.createVertexTemplateEntry('shape=dataStorage;whiteSpace=wrap;html=1;', 100, 80, '', 'Data Storage'),    
 	 	this.createVertexTemplateEntry('shape=tapeData;whiteSpace=wrap;html=1;perimeter=ellipsePerimeter;', 80, 80, '', 'Tape Data'),
 	 	this.createVertexTemplateEntry('shape=manualInput;whiteSpace=wrap;html=1;', 80, 80, '', 'Manual Input'),
 	 	this.createVertexTemplateEntry('shape=loopLimit;whiteSpace=wrap;html=1;', 100, 80, '', 'Loop Limit'),
@@ -3419,7 +3419,7 @@ Sidebar.prototype.addFoldingHandler = function(title, content, funct)
 						mxClient.NO_FO = Editor.prototype.originalNoForeignObject;
 						funct(content, title);
 						mxClient.NO_FO = fo;
-					}, 0);
+					}, (mxClient.IS_FF) ? 20 : 0);
 				}
 				else
 				{

Plik diff jest za duży
+ 144 - 143
src/main/webapp/js/viewer.min.js


+ 1 - 1
src/main/webapp/plugins/tags.js

@@ -266,7 +266,7 @@ Draw.loadPlugin(function(editorUi)
 					}
 					else
 					{
-						span.style.background = '#ffffff';
+						span.style.background = (uiTheme == 'dark') ? 'transparent' : '#ffffff';
 					}
 					
 					mxEvent.addListener(span, 'click', (function(tag)

+ 1 - 1
src/main/webapp/styles/dark.css

@@ -16,7 +16,7 @@ html body .geTabContainer {
 html body .geMenubarContainer .geItem:active {
 	opacity: 0.7;
 }
-html body .geFooterContainer, html body #geFooterItem1, html body textarea, html body .mxWindowTitle, html body .geDialogTitle, html body .geDialogFooter {
+html body .geFooterContainer, html body #geFooterItem1, html body textarea, html body .mxWindowTitle, html body .geDialogTitle, html body .geDialogFooter, select {
 	background:#2a2a2a;
 	color:#cccccc;
 }

+ 1 - 1
src/main/webapp/styles/grapheditor.css

@@ -352,7 +352,7 @@ div.mxWindow .geButton {
 	padding-left:10px;
 	_padding:2px;
 	_padding-left:6px;
-	padding-bottom:12px;
+	padding-bottom:6px;
 	overflow:hidden;
 }
 .geSidebarContainer .geTitle {