Browse Source

10.8.9 release

Gaudenz Alder 6 years ago
parent
commit
0737c1d76a

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+04-JUL-2019: 10.8.9
+
+- Uses mxGraph 4.0.2 beta 1
+- Adds fill-/strokealpha for stencils
+- Setting autosave to true triggers save
+
 03-JUL-2019: 10.8.8
 03-JUL-2019: 10.8.8
 
 
 - Adds timer to check for unsaved changes
 - Adds timer to check for unsaved changes

+ 1 - 1
VERSION

@@ -1 +1 @@
-10.8.8
+10.8.9

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


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

@@ -1,7 +1,7 @@
 CACHE MANIFEST
 CACHE MANIFEST
 
 
 # THIS FILE WAS GENERATED. DO NOT MODIFY!
 # THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 07/03/2019 06:31 PM
+# 07/04/2019 05:30 PM
 
 
 app.html
 app.html
 index.html?offline=1
 index.html?offline=1

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


+ 100 - 73
src/main/webapp/js/diagramly/App.js

@@ -25,88 +25,42 @@ App = function(editor, container, lightbox)
 			
 			
 			if (file != null && file.constructor == DriveFile && file.isModified() && this.drive != null)
 			if (file != null && file.constructor == DriveFile && file.isModified() && this.drive != null)
 			{
 			{
-				EditorUi.logEvent({category: 'DISCARD-SAVE-FILE-' + file.getHash() + '.' +
+				EditorUi.logEvent({category: 'DISCARD-FILE-' + file.getHash() + '.' +
 					file.desc.headRevisionId + '.' + file.desc.modifiedDate + '-size_' + file.getSize(),
 					file.desc.headRevisionId + '.' + file.desc.modifiedDate + '-size_' + file.getSize(),
-					action: 'saved_' + ((file.lastSaved != null) ? Math.round((new Date().getTime() - file.lastSaved) / 1000) : 'never') +
-					'-opened_' + ((file.opened != null) ? Math.round((new Date().getTime() - file.opened) / 1000) : 'never') +
-					'-autosave_' + ((this.editor.autosave) ? 'on' : 'off') +
-					'-changelistener_' + ((file.changeListenerEnabled) ? 'on' : 'off') +
-					'-conflict_' + ((file.inConflictState) ? 'yes' : 'no') +
-					'-checksum_' + ((file.invalidChecksum) ? 'invalid' : 'valid') +
-					'-saving_' + ((file.savingFile) ? 'true' : 'false'),
+					action: 'open_' + ((file.opened != null) ? Math.round((Date.now() - file.opened.getTime()) / 1000) : 'x') +
+					'-save_' + ((file.lastSaved != null) ?  Math.round((Date.now() - file.lastSaved.getTime()) / 1000) : 'x') +
+					'-change_' + ((file.lastChanged != null) ?  Math.round((Date.now() - file.lastChanged.getTime()) / 1000) : 'x') +
+					((this.editor.autosave) ? '' : '-nosave') +
+					((file.isAutosave()) ? '' : '-noauto') +
+					((file.changeListenerEnabled) ? '' : '-nolisten') +
+					((file.inConflictState) ? '-conflict' : '') +
+					((file.invalidChecksum) ? '-invalid' : '') +
+					((file.savingFile) ? '-saving' : '') +
+					((file.savingFile && file.savingFileTime != null) ? '_' +
+						Math.round((Date.now() - file.savingFileTime) / 1000) : '') +
+					((file.autosaveThread != null) ? '-thread' : ''),
 					label: ((this.drive.user != null) ? 'user_' + this.drive.user.id : 'unknown') +
 					label: ((this.drive.user != null) ? 'user_' + this.drive.user.id : 'unknown') +
 					((file.sync != null) ? ('-client_' + file.sync.clientId) : '-nosync')});
 					((file.sync != null) ? ('-client_' + file.sync.clientId) : '-nosync')});
 			}
 			}
 			else if (file != null && file.isModified())
 			else if (file != null && file.isModified())
 			{
 			{
-				EditorUi.logEvent({category: 'DISCARD-SAVE-FILE-' + file.getHash() + '-size_' + file.getSize(),
-					action: 'saved_' + ((file.lastSaved != null) ?  Math.round((new Date().getTime() - file.lastSaved) / 1000) : 'never') +
-					'-opened_' + ((file.opened != null) ? Math.round((new Date().getTime() - file.opened) / 1000) : 'never') +
-					'-autosave_' + ((this.editor.autosave) ? 'on' : 'off') +
-					'-changelistener_' + ((file.changeListenerEnabled) ? 'on' : 'off')});
+				EditorUi.logEvent({category: 'DISCARD-FILE-' + file.getHash() + '-size_' + file.getSize(),
+					action: 'open_' + ((file.opened != null) ? Math.round((Date.now() - file.opened.getTime()) / 1000) : 'x') +
+					'-save_' + ((file.lastSaved != null) ?  Math.round((Date.now() - file.lastSaved.getTime()) / 1000) : 'x') +
+					'-change_' + ((file.lastChanged != null) ?  Math.round((Date.now() - file.lastChanged.getTime()) / 1000) : 'x') +
+					((this.editor.autosave) ? '' : '-nosave') +
+					((file.isAutosave()) ? '' : '-noauto') +
+					((file.changeListenerEnabled) ? '' : '-nolisten') +
+					((file.inConflictState) ? '-conflict' : '') +
+					((file.invalidChecksum) ? '-invalid' : '') +
+					((file.savingFile) ? '-saving' : '') +
+					((file.savingFile && file.savingFileTime != null) ? '_' +
+						Math.round((Date.now() - file.savingFileTime) / 1000) : '') +
+					((file.autosaveThread != null) ? '-thread' : '')});
 			}
 			}
 		});
 		});
 	}
 	}
-	
-	var sanityCheck = mxUtils.bind(this, function()
-	{
-		var file = this.getCurrentFile();
-		
-		if (file != null && (file.isModified() && file.isAutosave()))
-		{
-			var delay = Date.now() - ((file.lastSaved != null) ? file.lastSaved.getTime() : file.opened);
-			
-			if (delay >  this.warnInterval && (file.lastWarned == null || Date.now() - file.lastWarned > this.warnInterval))
-			{
-				var msg = mxResources.get('ensureDataSaved');
-				
-				if (file.lastSaved != null)
-				{
-					var str = this.timeSince(new Date(file.lastSaved));
-				
-					// Only show if more than a minute ago
-					if (str != null)
-					{
-						msg = mxResources.get('lastSaved', [str]);
-					}
-				}
-				
-				EditorUi.logEvent({category: 'WARN-SAVE-FILE-' + file.getHash() + '-size_' + file.getSize(),
-					action: 'saved_' + ((file.lastSaved != null) ?  Math.round((new Date().getTime() - file.lastSaved) / 1000) : 'never') +
-					'-opened_' + ((file.opened != null) ? Math.round((new Date().getTime() - file.opened) / 1000) : 'never') +
-					'-delay_' + Math.round(delay / 1000) + '-autosave_' + ((this.editor.autosave) ? 'on' : 'off') +
-					'-changelistener_' + ((file.changeListenerEnabled) ? 'on' : 'off') +
-					'-conflict_' + ((file.inConflictState) ? 'yes' : 'no') +
-					'-checksum_' + ((file.invalidChecksum) ? 'invalid' : 'valid') +
-					'-saving_' + ((file.savingFile) ? 'true' : 'false')});
-				
-				this.showError(mxResources.get('unsavedChanges'), msg, mxResources.get('ignore'),
-					mxUtils.bind(this, function()
-					{
-						this.hideDialog();
-					}), null, mxResources.get('save'), mxUtils.bind(this, function()
-					{
-						this.actions.get((this.mode == null || !file.isEditable()) ?
-							'saveAs' : 'save').funct();
-					}), null, null, 360, 120, null, mxUtils.bind(this, function(cancel, isEsc)
-					{
-						window.setTimeout(sanityCheck, this.warnInterval);
-						file.lastWarned = Date.now();
-					}));
-			}
-			else
-			{
-				window.setTimeout(sanityCheck, this.warnInterval);
-			}
-		}
-		else
-		{
-			window.setTimeout(sanityCheck, this.warnInterval);
-		}
-	});
-	
-	window.setTimeout(sanityCheck, this.warnInterval);
-	
+
 	// Logs changes to autosave
 	// Logs changes to autosave
 	this.editor.addListener('autosaveChanged', mxUtils.bind(this, function()
 	this.editor.addListener('autosaveChanged', mxUtils.bind(this, function()
 	{
 	{
@@ -1531,6 +1485,79 @@ App.prototype.init = function()
 	}
 	}
 };
 };
 
 
+App.prototype.scheduleSanityCheck = function()
+{
+	if (this.sanityCheckThread == null)
+	{
+		this.sanityCheckThread = window.setTimeout(mxUtils.bind(this, function()
+		{
+			this.sanityCheckThread = null;
+			this.sanityCheck();
+		}), this.warnInterval);
+	}
+};
+
+App.prototype.stopSanityCheck = function()
+{
+	if (this.sanityCheckThread != null)
+	{
+		window.clearTimeout(this.sanityCheckThread);
+		this.sanityCheckThread = null;
+	}
+};
+
+App.prototype.sanityCheck = function()
+{
+	var file = this.getCurrentFile();
+
+	if (file != null && file.isModified() && file.isAutosave() &&
+		(Date.now() - ((file.lastSaved != null) ? file.lastSaved.getTime() :
+		file.opened.getTime())) >= this.warnInterval)
+	{
+		var msg = mxResources.get('ensureDataSaved');
+		
+		if (file.lastSaved != null)
+		{
+			var str = this.timeSince(file.lastSaved);
+			
+			if (str == null)
+			{
+				str = mxResources.get('lessThanAMinute');
+			}
+
+			msg = mxResources.get('lastSaved', [str]);
+		}
+		
+		EditorUi.logEvent({category: 'WARN-FILE-' + file.getHash(),
+			action: 'open_' + ((file.opened != null) ? Math.round((Date.now() - file.opened.getTime()) / 1000) : 'x') +
+			'-save_' + ((file.lastSaved != null) ?  Math.round((Date.now() - file.lastSaved.getTime()) / 1000) : 'x') +
+			'-change_' + ((file.lastChanged != null) ?  Math.round((Date.now() - file.lastChanged.getTime()) / 1000) : 'x') +
+			((this.editor.autosave) ? '' : '-nosave') +
+			((file.isAutosave()) ? '' : '-noauto') +
+			((file.changeListenerEnabled) ? '' : '-nolisten') +
+			((file.inConflictState) ? '-conflict' : '') +
+			((file.invalidChecksum) ? '-invalid' : '') +
+			((file.savingFile) ? '-saving' : '') +
+			((file.savingFile && file.savingFileTime != null) ? '_' +
+				Math.round((Date.now() - file.savingFileTime) / 1000) : '') +
+			((file.autosaveThread != null) ? '-thread' : '')});
+		
+		this.showError(mxResources.get('unsavedChanges'), msg, mxResources.get('ignore'),
+			mxUtils.bind(this, function()
+			{
+				this.hideDialog();
+			}), null, mxResources.get('save'), mxUtils.bind(this, function()
+			{
+				this.stopSanityCheck();
+				this.actions.get((this.mode == null || !file.isEditable()) ?
+					'saveAs' : 'save').funct();
+			}), null, null, 360, 120, null, mxUtils.bind(this, function()
+			{
+				this.scheduleSanityCheck();
+			}));
+	}
+};
+
 /**
 /**
  * Returns true if the current domain is for the new drive app.
  * Returns true if the current domain is for the new drive app.
  */
  */

+ 11 - 16
src/main/webapp/js/diagramly/DrawioFile.js

@@ -94,15 +94,10 @@ DrawioFile.prototype.lastAutosave = null;
  */
  */
 DrawioFile.prototype.lastSaved = null;
 DrawioFile.prototype.lastSaved = null;
 
 
-/**
- * Stores the time stamp for the last change.
- */
-DrawioFile.prototype.lastIdleReport = null;
-
 /**
 /**
  * Stores the time stamp for the last autosave.
  * Stores the time stamp for the last autosave.
  */
  */
-DrawioFile.prototype.lastWarned = null;
+DrawioFile.prototype.lastChanged = null;
 
 
 /**
 /**
  * Stores the time stamp when the file was opened.
  * Stores the time stamp when the file was opened.
@@ -1210,14 +1205,6 @@ DrawioFile.prototype.getDescriptorSecret = function(desc)
 	return null;
 	return null;
 };
 };
 
 
-/**
- * Installs the change listener.
- */
-DrawioFile.prototype.getIdleTime = function()
-{
-	return null;
-};
-
 /**
 /**
  * Installs the change listener.
  * Installs the change listener.
  */
  */
@@ -1702,19 +1689,27 @@ DrawioFile.prototype.getErrorMessage = function(err)
  */
  */
 DrawioFile.prototype.fileChanged = function()
 DrawioFile.prototype.fileChanged = function()
 {
 {
+	this.lastChanged = new Date();
 	this.setModified(true);
 	this.setModified(true);
 	
 	
 	if (this.isAutosave())
 	if (this.isAutosave())
 	{
 	{
 		this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get('saving')) + '...');
 		this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get('saving')) + '...');
+		this.ui.scheduleSanityCheck();
 		
 		
 		this.autosave(this.autosaveDelay, this.maxAutosaveDelay, mxUtils.bind(this, function(resp)
 		this.autosave(this.autosaveDelay, this.maxAutosaveDelay, mxUtils.bind(this, function(resp)
 		{
 		{
+			this.ui.stopSanityCheck();
+
 			// Does not update status if another autosave was scheduled
 			// Does not update status if another autosave was scheduled
 			if (this.autosaveThread == null)
 			if (this.autosaveThread == null)
 			{
 			{
 				this.handleFileSuccess(true);
 				this.handleFileSuccess(true);
 			}
 			}
+			else if (this.isModified())
+			{
+				this.ui.scheduleSanityCheck();
+			}
 		}), mxUtils.bind(this, function(err)
 		}), mxUtils.bind(this, function(err)
 		{
 		{
 			this.handleFileError(err);
 			this.handleFileError(err);
@@ -1798,10 +1793,10 @@ DrawioFile.prototype.autosave = function(delay, maxDelay, success, error)
 {
 {
 	if (this.lastAutosave == null)
 	if (this.lastAutosave == null)
 	{
 	{
-		this.lastAutosave = new Date().getTime();
+		this.lastAutosave = Date.now();
 	}
 	}
 	
 	
-	var tmp = (new Date().getTime() - this.lastAutosave < maxDelay) ? delay : 0;
+	var tmp = (Date.now() - this.lastAutosave < maxDelay) ? delay : 0;
 	this.clearAutosave();
 	this.clearAutosave();
 	
 	
 	// Starts new timer or executes immediately if not unsaved for maxDelay
 	// Starts new timer or executes immediately if not unsaved for maxDelay

+ 10 - 4
src/main/webapp/js/diagramly/DriveClient.js

@@ -1105,8 +1105,11 @@ DriveClient.prototype.saveFile = function(file, revision, success, errFn, noChec
 				
 				
 				EditorUi.logEvent({category: 'ERROR-SAVE-FILE-' + file.getHash() + '.' +
 				EditorUi.logEvent({category: 'ERROR-SAVE-FILE-' + file.getHash() + '.' +
 					file.desc.headRevisionId + '-mod_' + file.desc.modifiedDate + '-size_' + file.getSize() +
 					file.desc.headRevisionId + '-mod_' + file.desc.modifiedDate + '-size_' + file.getSize() +
-					((this.ui.editor.autosave) ? '-autosave_on' : '-autosave_off') +
-					'-changelistener_' + ((file.changeListenerEnabled) ? 'on' : 'off'),
+					((this.ui.editor.autosave) ? '' : '-nosave') +
+					((file.isAutosave()) ? '' : '-noauto') +
+					((file.changeListenerEnabled) ? '' : '-nolisten') +
+					((file.inConflictState) ? '-conflict' : '') +
+					((file.invalidChecksum) ? '-invalid' : ''),
 					action: err, label: ((this.user != null) ? 'user_' + this.user.id : 'unknown') +
 					action: err, label: ((this.user != null) ? 'user_' + this.user.id : 'unknown') +
 					((file.sync != null) ? ('-client_' + file.sync.clientId) : '-nosync')});
 					((file.sync != null) ? ('-client_' + file.sync.clientId) : '-nosync')});
 			}
 			}
@@ -1336,8 +1339,11 @@ DriveClient.prototype.saveFile = function(file, revision, success, errFn, noChec
 									EditorUi.logEvent({category: 'SUCCESS-SAVE-FILE-' + file.getHash() +
 									EditorUi.logEvent({category: 'SUCCESS-SAVE-FILE-' + file.getHash() +
 										'.' + head0 + '-mod_' + mod0, action: 'saved-' + resp.headRevisionId +
 										'.' + head0 + '-mod_' + mod0, action: 'saved-' + resp.headRevisionId +
 										'-mod_' + resp.modifiedDate + '-size_' + file.getSize() +
 										'-mod_' + resp.modifiedDate + '-size_' + file.getSize() +
-										((this.ui.editor.autosave) ? '-autosave_on' : '-autosave_off') +
-										'-changelistener_' + ((file.changeListenerEnabled) ? 'on' : 'off'),
+										((this.ui.editor.autosave) ? '' : '-nosave') +
+										((file.isAutosave()) ? '' : '-noauto') +
+										((file.changeListenerEnabled) ? '' : '-nolisten') +
+										((file.inConflictState) ? '-conflict' : '') +
+										((file.invalidChecksum) ? '-invalid' : ''),
 										label: ((this.user != null) ? 'user_' + this.user.id : 'unknown') +
 										label: ((this.user != null) ? 'user_' + this.user.id : 'unknown') +
 										((file.sync != null) ? ('-client_' + file.sync.clientId) : '-nosync')});
 										((file.sync != null) ? ('-client_' + file.sync.clientId) : '-nosync')});
 								}
 								}

+ 3 - 20
src/main/webapp/js/diagramly/DriveFile.js

@@ -22,25 +22,6 @@ DriveFile.prototype.saveDelay = 0;
  */
  */
 DriveFile.prototype.allChangesSavedKey = 'allChangesSavedInDrive';
 DriveFile.prototype.allChangesSavedKey = 'allChangesSavedInDrive';
 
 
-/**
- * Installs the change listener.
- */
-DriveFile.prototype.getIdleTime = function()
-{
-	if (this.lastSaved != null)
-	{
-		return new Date().getTime() - this.lastSaved.getTime();
-	}
-	else if (this.opened != null)
-	{
-		return new Date().getTime() - this.opened;
-	}
-	else
-	{
-		return null;
-	}
-};
-
 /**
 /**
  * Specifies if notify events should be ignored.
  * Specifies if notify events should be ignored.
  */
  */
@@ -187,7 +168,8 @@ DriveFile.prototype.saveFile = function(title, revision, success, error, unloadi
 					var modified = this.isModified();
 					var modified = this.isModified();
 					this.setModified(false);
 					this.setModified(false);
 					this.savingFile = true;
 					this.savingFile = true;
-		
+					this.savingFileTime = new Date();
+					
 					// Waits for success for modified state to be visible
 					// Waits for success for modified state to be visible
 					var prevModified = this.isModified;
 					var prevModified = this.isModified;
 					
 					
@@ -266,6 +248,7 @@ DriveFile.prototype.saveFile = function(title, revision, success, error, unloadi
 								if (this.sync != null)
 								if (this.sync != null)
 								{
 								{
 									this.savingFile = true;
 									this.savingFile = true;
+									this.savingFileTime = new Date();
 									
 									
 									this.sync.fileConflict(desc, mxUtils.bind(this, function()
 									this.sync.fileConflict(desc, mxUtils.bind(this, function()
 									{
 									{

+ 1 - 0
src/main/webapp/js/diagramly/DropboxFile.js

@@ -214,6 +214,7 @@ DropboxFile.prototype.saveFile = function(title, revision, success, error)
 			if (checked)
 			if (checked)
 			{
 			{
 				this.savingFile = true;
 				this.savingFile = true;
+				this.savingFileTime = new Date();
 				
 				
 				// Makes sure no changes get lost while the file is saved
 				// Makes sure no changes get lost while the file is saved
 				var prevModified = this.isModified;
 				var prevModified = this.isModified;

+ 5 - 0
src/main/webapp/js/diagramly/Editor.js

@@ -2055,6 +2055,11 @@
 					}, function(checked)
 					}, function(checked)
 					{
 					{
 						ui.editor.setAutosave(checked);
 						ui.editor.setAutosave(checked);
+						
+						if (ui.editor.autosave && file.isModified())
+						{
+							file.fileChanged();
+						}
 					},
 					},
 					{
 					{
 						install: function(apply)
 						install: function(apply)

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

@@ -3705,7 +3705,7 @@
 	{
 	{
 		if (file != null)
 		if (file != null)
 		{
 		{
-			file.opened = new Date().getTime();
+			file.opened = new Date();
 		}
 		}
 		
 		
 		this.currentFile = file;
 		this.currentFile = file;

+ 2 - 0
src/main/webapp/js/diagramly/GitHubFile.js

@@ -215,6 +215,7 @@ GitHubFile.prototype.saveFile = function(title, revision, success, error, unload
 				var prevModified = this.isModified;
 				var prevModified = this.isModified;
 				var modified = this.isModified();
 				var modified = this.isModified();
 				this.savingFile = true;
 				this.savingFile = true;
+				this.savingFileTime = new Date();
 					
 					
 				var prepare = mxUtils.bind(this, function()
 				var prepare = mxUtils.bind(this, function()
 				{
 				{
@@ -285,6 +286,7 @@ GitHubFile.prototype.saveFile = function(title, revision, success, error, unload
 			else
 			else
 			{
 			{
 				this.savingFile = true;
 				this.savingFile = true;
+				this.savingFileTime = new Date();
 				
 				
 				this.ui.pickFolder(App.MODE_GITHUB, mxUtils.bind(this, function(folderId)
 				this.ui.pickFolder(App.MODE_GITHUB, mxUtils.bind(this, function(folderId)
 				{
 				{

+ 3 - 0
src/main/webapp/js/diagramly/OneDriveFile.js

@@ -327,6 +327,7 @@ OneDriveFile.prototype.saveFile = function(title, revision, success, error, unlo
 				var prevModified = this.isModified;
 				var prevModified = this.isModified;
 				var modified = this.isModified();
 				var modified = this.isModified();
 				this.savingFile = true;
 				this.savingFile = true;
+				this.savingFileTime = new Date();
 				
 				
 				var prepare = mxUtils.bind(this, function()
 				var prepare = mxUtils.bind(this, function()
 				{
 				{
@@ -369,6 +370,7 @@ OneDriveFile.prototype.saveFile = function(title, revision, success, error, unlo
 						if (this.sync != null)
 						if (this.sync != null)
 						{
 						{
 							this.savingFile = true;
 							this.savingFile = true;
+							this.savingFileTime = new Date();
 							
 							
 							this.sync.fileConflict(null, mxUtils.bind(this, function()
 							this.sync.fileConflict(null, mxUtils.bind(this, function()
 							{
 							{
@@ -417,6 +419,7 @@ OneDriveFile.prototype.saveFile = function(title, revision, success, error, unlo
 		else
 		else
 		{
 		{
 			this.savingFile = true;
 			this.savingFile = true;
+			this.savingFileTime = new Date();
 		
 		
 			this.ui.oneDrive.insertFile(title, this.getData(), mxUtils.bind(this, function(file)
 			this.ui.oneDrive.insertFile(title, this.getData(), mxUtils.bind(this, function(file)
 			{
 			{

+ 1 - 0
src/main/webapp/js/diagramly/TrelloFile.js

@@ -106,6 +106,7 @@ TrelloFile.prototype.saveFile = function(title, revision, success, error)
 	else if (!this.savingFile)
 	else if (!this.savingFile)
 	{
 	{
 		this.savingFile = true;
 		this.savingFile = true;
+		this.savingFileTime = new Date();
 		
 		
 		if (this.getTitle() == title)
 		if (this.getTitle() == title)
 		{
 		{

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

@@ -45,6 +45,15 @@ if (!Date.prototype.toISOString)
     }());
     }());
 }
 }
 
 
+// Shim for Date.now()
+if (!Date.now)
+{
+	Date.now = function()
+	{
+		return new Date().getTime();
+	};
+}
+
 // Changes default colors
 // Changes default colors
 mxConstants.SHADOW_OPACITY = 0.25;
 mxConstants.SHADOW_OPACITY = 0.25;
 mxConstants.SHADOWCOLOR = '#000000';
 mxConstants.SHADOWCOLOR = '#000000';

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


+ 2 - 0
src/main/webapp/resources/dia.txt

@@ -1,3 +1,5 @@
+# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*
+# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE
 aboutDrawio=About draw.io
 aboutDrawio=About draw.io
 accessDenied=Access Denied
 accessDenied=Access Denied
 action=Action
 action=Action

+ 45 - 45
src/main/webapp/resources/dia_ru.txt

@@ -52,7 +52,7 @@ attachments=Вложения
 aws=AWS
 aws=AWS
 aws3d=AWS 3D
 aws3d=AWS 3D
 azure=Azure
 azure=Azure
-back=Back
+back=Назад
 background=Фон
 background=Фон
 backgroundColor=Цвет фона
 backgroundColor=Цвет фона
 backgroundImage=Картинка фона
 backgroundImage=Картинка фона
@@ -73,7 +73,7 @@ bottomLeft=Левый нижний
 bottomRight=Правый нижний
 bottomRight=Правый нижний
 bpmn=BPMN
 bpmn=BPMN
 browser=Браузер
 browser=Браузер
-browserUnsupportedFiletype=Your browser does not support this filetype.
+browserUnsupportedFiletype=Ваш браузер не поддерживает данный тип файлов
 bulletedList=Маркированный список
 bulletedList=Маркированный список
 business=Бизнес
 business=Бизнес
 busy=Операция выполняется
 busy=Операция выполняется
@@ -86,7 +86,7 @@ cannotOpenFile=Невозможно открыть файл
 change=Изменить
 change=Изменить
 changeOrientation=Изменить ориентацию
 changeOrientation=Изменить ориентацию
 changeUser=Сменить пользователя
 changeUser=Сменить пользователя
-changeStorage=Change storage
+changeStorage=Изменить место хранения
 changesNotSaved=Изменения не сохранены
 changesNotSaved=Изменения не сохранены
 userJoined={1} присоединился
 userJoined={1} присоединился
 userLeft={1} вышел
 userLeft={1} вышел
@@ -272,9 +272,9 @@ fileNotFoundOrDenied=Файл не найден. Он не существует,
 fileNotLoaded=Файл не загружен
 fileNotLoaded=Файл не загружен
 fileNotSaved=Файл не сохранен
 fileNotSaved=Файл не сохранен
 fileOpenLocation=Как вы хотите открыть эти файл(ы)?
 fileOpenLocation=Как вы хотите открыть эти файл(ы)?
-filetypeHtml=.html causes file to save as HTML with redirect to cloud URL
-filetypePng=.png causes file to save as PNG with embedded data
-filetypeSvg=.svg causes file to save as SVG with embedded data
+filetypeHtml=Расширение ".html" говорит о необходимости сохранить файл в формате HTML с переадресацией на адрес в "облачном" хранилище
+filetypePng=Расширение ".png" говорит о необходимости сохранить файл в формате PNG, внедрив в него данные
+filetypeSvg=Расширение ".svg" говорит о необходимости сохранить файл в формате SVG, внедрив в него данные
 fileWillBeSavedInAppFolder={1} будет сохранен в папке программы.
 fileWillBeSavedInAppFolder={1} будет сохранен в папке программы.
 fill=Заливка
 fill=Заливка
 fillColor=Цвет заливки
 fillColor=Цвет заливки
@@ -334,7 +334,7 @@ googleDocs=Google Docs
 googleDrive=Google Drive
 googleDrive=Google Drive
 googleGadget=Google Gadget
 googleGadget=Google Gadget
 googlePlus=Google+
 googlePlus=Google+
-googleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:
+googleSharingNotAvailable=Совместный доступ к документу возможен только с использованием Google Drive. Щелкните по ссылке Открыть и используйте команды меню чтобы открыть доступ
 googleSlides=Google Slides
 googleSlides=Google Slides
 googleSites=Google Sites
 googleSites=Google Sites
 gradient=Градиент
 gradient=Градиент
@@ -389,7 +389,7 @@ insertText=Добавить текст
 inserting=Вставка
 inserting=Вставка
 invalidFilename=Название диаграммы не может содержать следующие символы: \ / | : ; { < & + ? = "
 invalidFilename=Название диаграммы не может содержать следующие символы: \ / | : ; { < & + ? = "
 invalidLicenseSeeThisPage=Ваша лицензия недействительна. Пожалуйста, посетите эту<a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">страницу</a>.
 invalidLicenseSeeThisPage=Ваша лицензия недействительна. Пожалуйста, посетите эту<a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">страницу</a>.
-invalidInput=Invalid input
+invalidInput=Некорректное значение
 invalidName=Некорректное имя
 invalidName=Некорректное имя
 invalidOrMissingFile=Файл поврежден или отсутствует
 invalidOrMissingFile=Файл поврежден или отсутствует
 invalidPublicUrl=Некорректная ссылка
 invalidPublicUrl=Некорректная ссылка
@@ -468,7 +468,7 @@ new=Создать
 newLibrary=Новая библиотека
 newLibrary=Новая библиотека
 nextPage=Следующая страница
 nextPage=Следующая страница
 no=нет
 no=нет
-noPickFolder=No, pick folder
+noPickFolder=Нет, необходимо выбрать папку
 noAttachments=Вложения не найдены
 noAttachments=Вложения не найдены
 noColor=Нет цвета
 noColor=Нет цвета
 noFiles=Нет файлов
 noFiles=Нет файлов
@@ -689,7 +689,7 @@ title=Название
 to=по
 to=по
 toBack=На задний план
 toBack=На задний план
 toFront=На передний план
 toFront=На передний план
-toolbar=Toolbar
+toolbar=Панель инструментов
 tooltips=Подсказки
 tooltips=Подсказки
 top=Сверху
 top=Сверху
 topAlign=По верхнему краю
 topAlign=По верхнему краю
@@ -720,14 +720,14 @@ updatingPreview=Подготовка предпросмотра. Пожалуй
 updatingSelection=Обновление выделенной области. Пожалуйста, подождите...
 updatingSelection=Обновление выделенной области. Пожалуйста, подождите...
 upload=Загрузить
 upload=Загрузить
 url=URL-адрес
 url=URL-адрес
-useOffline=Use Offline
-useRootFolder=Use root folder?
+useOffline=Работать автономно
+useRootFolder=Использовать корневую папку?
 userManual=Инструкция
 userManual=Инструкция
 vertical=Вертикально
 vertical=Вертикально
 verticalFlow=Вертикальный поток
 verticalFlow=Вертикальный поток
 verticalTree=Вертикальное дерево
 verticalTree=Вертикальное дерево
 view=Вид
 view=Вид
-viewerSettings=Viewer Settings
+viewerSettings=Параметры просмотра
 viewUrl=Ссылка для просмотра: {1}
 viewUrl=Ссылка для просмотра: {1}
 voiceAssistant=Голосовой помошник (beta)
 voiceAssistant=Голосовой помошник (beta)
 warning=Внимание
 warning=Внимание
@@ -758,38 +758,38 @@ venndiagrams=Диаграммы Венна
 webEmailOrOther=Адрес страницы, e-mail или иной интернет-адрес
 webEmailOrOther=Адрес страницы, e-mail или иной интернет-адрес
 webLink=Сетевая ссылка
 webLink=Сетевая ссылка
 wireframes=Макеты интерфейсов (UI)
 wireframes=Макеты интерфейсов (UI)
-property=Property
-value=Value
-showMore=Show More
-showLess=Show Less
-myDiagrams=My Diagrams
-allDiagrams=All Diagrams
-recentlyUsed=Recently used
-listView=List view
-gridView=Grid view
-resultsFor=Results for '{1}'
-oneDriveCharsNotAllowed=The following characters are not allowed: ~ " # %  * : < > ? / \ { | }
-oneDriveInvalidDeviceName=The specified device name is invalid
-officeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.
-officeSelectSingleDiag=Please select a single draw.io diagram only without other contents.
-officeSelectDiag=Please select a draw.io diagram.
-officeCannotFindDiagram=Cannot find a draw.io diagram in the selection
-noDiagrams=No diagrams found
-authFailed=Authentication failed
-officeFailedAuthMsg=Unable to successfully authenticate user or authorize application.
-convertingDiagramFailed=Converting diagram failed
-officeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.
-insertingImageFailed=Inserting image failed
-officeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.
-folderEmpty=Folder is empty
-recent=Recent
-sharedWithMe=Shared With Me
-sharepointSites=Sharepoint Sites
-errorFetchingFolder=Error fetching folder items
-errorAuthOD=Error authenticating to OneDrive
-officeMainHeader=draw.io adds diagrams from OneDrive to your document.
-officeStepsHeader=This add-in performs the following steps:
-officeStep1=Connects to OneDrive.
+property=Параметр
+value=Значение
+showMore=Раскрыть
+showLess=Скрыть
+myDiagrams=Мои диаграммы
+allDiagrams=Все диаграммы
+recentlyUsed=Недавно использованные
+listView=Список
+gridView=Таблица
+resultsFor=Результаты для '{1}'
+oneDriveCharsNotAllowed=Запрещено использовать символы ~ " # %  * : < > ? / \ { | }
+oneDriveInvalidDeviceName=Введено некорректное имя устройства
+officeNotLoggedOD=Вы не выполнили вход в OneDrive. Пожалуйста, откройте панель задач Draw.io и выполните вход
+officeSelectSingleDiag=Пожалуйста, выберите диаграмму Draw.io без сторонних данных
+officeSelectDiag=Пожалуйста, выберите диаграмму Draw.io
+officeCannotFindDiagram=В выбранных данных отсутствуют диаграммы Draw.io
+noDiagrams=Диаграммы не найдены
+authFailed=Ошибка при выполнении входа
+officeFailedAuthMsg=Ошибка при авторизации пользователя или приложения
+convertingDiagramFailed=Ошибка при преобразовании диаграммы
+officeCopyImgErrMsg=Из-за ограничений в возможностях локального приложения вставить изображение невозможно. Пожалуйста, скопируйте изображение вручную, после чего вставьте его в документ
+insertingImageFailed=Ошибка при вставке изображения
+officeCopyImgInst=Инструкция: Щелкните правой кнопкой мыши по изображению (см. ниже). Вызовите команду "Копировать изображение" из контекстного меню. Щелкните правой кнопкой мыши по полю документа и вызовите команду "Вставить"
+folderEmpty=Папка пуста
+recent=Последние
+sharedWithMe=Предоставленные мне
+sharepointSites=Сайты Sharepoint
+errorFetchingFolder=Ошибка при считывании имен папок
+errorAuthOD=Ошибка при входе в OneDrive
+officeMainHeader=Draw.io загружает диаграммы из OneDrive  в ваш документ
+officeStepsHeader=Это расширение выполняет следующие действия:
+officeStep1=Подключается к OneDrive
 officeStep2=Select a draw.io diagram from OneDrive.
 officeStep2=Select a draw.io diagram from OneDrive.
 officeStep3=Insert the diagram into the document.
 officeStep3=Insert the diagram into the document.
 officeAuthPopupInfo=Please complete the authentication in the pop-up window.
 officeAuthPopupInfo=Please complete the authentication in the pop-up window.