Browse Source

8.6.2 release

David Benson 7 years ago
parent
commit
a26e3e4045

+ 4 - 0
ChangeLog

@@ -1,3 +1,7 @@
+09-MAY-2018: 8.6.2
+
+- Replaces domain apex redirect
+
 08-MAY-2018: 8.6.1
 
 - Fixes links for transparent groups in viewer

+ 1 - 1
VERSION

@@ -1 +1 @@
-8.6.1
+8.6.2

+ 0 - 158
src/main/webapp/auth.html

@@ -1,158 +0,0 @@
-<html>
-  <head>
-  	<title>Test running...</title>
-  </head>
-  <body>
-  	This is a test for checking repeated authentication dialog problem in draw.io. It will execute a request every 10 seconds.<br>
-  	<br>
-  	<div id="status" style="font-size:18pt;padding:20px;border:1px solid black;display:inline-block;">Loading page...</div>
-  	<br><br>
-    <script type="text/javascript">
-		function logEvent(data)
-		{
-			try
-			{
-				var img = new Image();
-				img.src = 'https://www.draw.io/images/1x1.png?' + 'q=auth-test&id=' + encodeURIComponent(id) + '&data=' + encodeURIComponent(JSON.stringify(data));
-	    	}
-			catch (e)
-			{
-	    			// ignore
-			}
-		};
-		
-		var id = (function()
-		{
-		  function s4()
-		  {
-		    return Math.floor((1 + Math.random()) * 0x10000)
-		      .toString(16)
-		      .substring(1);
-		  }
-		  
-		  return s4() + s4();
-		})();
-
-      function handleClientLoad() {
-    	document.getElementById('status').innerHTML = 'Loading client...';
-		logEvent({event: 'init', useragent: navigator.userAgent});
-
-        // Loads the client library and the auth2 library together for efficiency.
-        // Loading the auth2 library is optional here since `gapi.client.init` function will load
-        // it if not already loaded. Loading it upfront can save one network request.
-        gapi.load('client:auth2', function()
-        {
-        	gapi.client.load('drive', 'v2', function()
-    		{
-    			initClient();
-    		});
-        });
-      }
-      
-      function initClient() {
-        // Initialize the client with API key and People API, and initialize OAuth with an
-        // OAuth 2.0 client ID and scopes (space delimited string) to request access.
-        gapi.client.init({
-            clientId: '671128082532.apps.googleusercontent.com',
-            scope: 'profile'
-        }).then(function () {
-          // Listen for sign-in state changes.
-          gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);
-
-          // Handle the initial sign-in state.
-          updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());
-        });
-      }
-
-      function updateSigninStatus(isSignedIn) {
-    	  
-    	  logEvent({event: 'update', isSignedIn: isSignedIn});
-        // When signin status changes, this function is called.
-        // If the signin status is changed to signedIn, we make an API call.
-        if (isSignedIn) {
-          runTest();
-          document.getElementById('status').style.display = 'inline-block';
-        }
-        else
-        {
-        	document.getElementById('status').innerHTML = 'Please click below to sign-in!';
-        	document.getElementById('status').style.display = 'none';
-      	  document.getElementById('signin-button').style.display = 'block';
-        }
-      }
-
-      function handleSignInClick(event) {
-        // Ideally the button should only show up after gapi.client.init finishes, so that this
-        // handler won't be called before OAuth is initialized.
-        gapi.auth2.getAuthInstance().signIn();
-      }
-
-      function handleSignOutClick(event) {
-        gapi.auth2.getAuthInstance().signOut();
-      }
-      
-      var thread = null;
-    	  
-          var start = new Date().getTime();
-          var counter = 0;
-
-   		  
-     	function update()
-  	  	  {
-     		if (thread != null)
-     		{
-  			  var now = new Date().getTime();
-  			  document.getElementById('status').innerHTML = 'RUNNING test: #' + counter + ' uptime: ' + Math.ceil((now - start) / 1000) + ' secs';
-     		}
-  	  	  };
-     		  
-  		  window.setInterval(update, 1000);
-  		  update();
-  		  
-      function runTest() {
-    	  if (thread != null)
-    	  {
-    		  window.clearInterval(thread);
-    	  }
-    	  
-          start = new Date().getTime();
-          counter = 0;
-
-    	  logEvent({event: 'start'});
-    	  document.getElementById('signin-button').style.display = 'none';
-
-    	  function test()
-    	  {
-			  var now = new Date().getTime();
-        	  counter++;
-        	  try
-        	  {
-	    		  gapi.client.drive.about.get().execute(function(resp) {
-	    			  //console.log('resp', resp);
-	    			// Permisison is logged to detect change of user
-	       		   	logEvent({event: 'result', error: resp.error, user: resp.user,
-	       		   		counter: counter, uptime: Math.ceil((now - start) / 1000)});
-	       		   });
-        	  }
-        	  catch (e)
-        	  {
-        			//console.log('err',e); 
-        		  logEvent({event: 'error', error: e, counter: counter, uptime: Math.ceil((now - start) / 1000)});
-        	  }
-    	  };
-    	  
-    	  thread = window.setInterval(test, 10000);
-   		  test();
-      }
-    </script>
-    <script async defer src="https://apis.google.com/js/api.js"
-      onload="this.onload=function(){};handleClientLoad()"
-      onreadystatechange="if (this.readyState === 'complete') this.onload()">
-    </script>
-    <button id="signin-button" onclick="handleSignInClick()" style="font-size:20pt;font-weight:bold;display:none;">Please click here to sign in!</button>
-    Run this test for at least the time
-  	it normally takes for the dialog to appear twice, if you can leave it open for longer, that helps us.
-  	<br><br>
-  	 <b>Please do not close this window or tab!</b>
-  </body>
-</html>

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

@@ -1,7 +1,7 @@
 CACHE MANIFEST
 
 # THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 05/08/2018 11:00 AM
+# 05/09/2018 04:27 PM
 
 app.html
 index.html?offline=1

File diff suppressed because it is too large
+ 0 - 270
src/main/webapp/connect/confluence/connect-dev.json


+ 0 - 93
src/main/webapp/connect/jira/connect-dev.json

@@ -1,93 +0,0 @@
-{
-     "name": "Draw.io gaudenz",
-     "description": "Draw.io add-on for JIRA",
-     "key": "com.mxgraph.jira.plugins.drawio.gaudenz",
-     "baseUrl": "https://0d961297.ngrok.io/",
-     "vendor": {
-         "name": "JGraph Ltd.",
-         "url": "https://www.jgraph.com"
-     },
-     "authentication": 
-     {
-         "type": "none"
-     },
-     "version": "1.0.4",
-     "scopes": 
-     [
-     	"READ",
-     	"WRITE",
-     	"DELETE"
-	 ],
-     "modules": 
-     {
-      "generalPages": 
-      [
-      	{
-			"url":"/connect/jira/editor2.html?issueId=${issue.id}",
-			"key":"drawioEditor",
-			"name":
-			{
-				"value":"Draw.io Editor"
-			},
-			"location":"hidden"
-		},
-		{
-			"url":"/connect/jira/fullScreenViewer2.html?issueId=${issue.id}",
-			"key":"drawioFullScreenViewer",
-			"name":
-			{
-				"value":"Draw.io Full Screen Viewer"
-			},
-			"location":"hidden"
-		}
-      ],
-	  "webItems": [
-	    {
-	      "location": "operations-attachments",
-	      "weight": 50,
-	      "key": "drawioEditorBlank",
-	      "url": "/connect/jira/editor2.html?issueId=${issue.id}",
-	      "name": {
-	        "value": "Add Draw.io Diagram"
-	      },
-	      "target": 
-	      {
-			"type":"dialog",
-			"options": 
-			{
-				"width":"100%",
-				"height":"100%",
-				"chrome":false
-			}
-		  }
-	    }, 
-	    {
-       	   "key": "drawioEditorDialog",
-	        "name": 
-	        {
-	            "value": "Draw.io Editor"
-	        },
-	        "url": "/connect/jira/editor2.html?issueId=${issue.id}",
-	        "location": "none",
-	        "context": "addon"
-	    }
-	  ],
-	  "webPanels": 
-	  [
-      {
-        "url": "/connect/jira/viewerPanel2.html?issueId=${issue.id}",
-        "location": "atl.jira.view.issue.right.context",
-        "layout": 
-        {
-          "width": "300px"
-        },
-        "weight": 50,
-        "key": "drawioViewerPanel",
-        "name": 
-        {
-          "value": "Draw.io Diagrams"
-        }
-      }
-    ] 
-	}
- }

+ 31 - 0
src/main/webapp/index.html

@@ -73,6 +73,37 @@
 			}
 		}
 		
+		// Redirects page if required
+		if (urlParams['dev'] != '1')
+		{
+			(function()
+			{
+				var proto = window.location.protocol;
+				
+				// Electron protocol is file:
+				if (proto != 'file:')
+				{
+					var host = window.location.host;
+		
+					// Redirects apex and rt to www
+					if (host === 'draw.io' || host === 'rt.draw.io')
+					{
+						host = 'www.draw.io';
+					}
+					
+					var href = proto + '//' + host + window.location.href.substring(
+							window.location.protocol.length +
+							window.location.host.length + 2);
+		
+					// Redirects if href changes
+					if (href != window.location.href)
+					{
+						window.location.href = href;
+					}
+				}
+			})();
+		}
+		
 		/**
 		 * Adds meta tags with application name (depends on offline URL parameter)
 		 */

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


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


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


+ 22 - 2
src/main/webapp/js/diagramly/App.js

@@ -3318,7 +3318,7 @@ App.prototype.fileCreated = function(file, libs, replace, done)
  * @param {number} dx X-coordinate of the translation.
  * @param {number} dy Y-coordinate of the translation.
  */
-App.prototype.loadFile = function(id, sameWindow, file)
+App.prototype.loadFile = function(id, sameWindow, file, success)
 {
 	this.hideDialog();
 	
@@ -3354,6 +3354,11 @@ App.prototype.loadFile = function(id, sameWindow, file)
 						if (data != null)
 						{
 							this.fileLoaded(new StorageFile(this, data, id));
+
+							if (success != null)
+							{
+								success();
+							}
 						}
 						else
 						{
@@ -3375,6 +3380,11 @@ App.prototype.loadFile = function(id, sameWindow, file)
 				// File already loaded
 				this.spinner.stop();
 				this.fileLoaded(file);
+
+				if (success != null)
+				{
+					success();
+				}
 			}
 			else if (id.charAt(0) == 'R')
 			{
@@ -3394,6 +3404,11 @@ App.prototype.loadFile = function(id, sameWindow, file)
 					return id;
 				};
 				this.fileLoaded(tempFile);
+
+				if (success != null)
+				{
+					success();
+				}
 			}
 			else if (id.charAt(0) == 'U')
 			{
@@ -3452,7 +3467,7 @@ App.prototype.loadFile = function(id, sameWindow, file)
 									if (this.drive != null)
 									{
 										this.spinner.stop();
-										this.loadFile('G' + url.substring(31, url.lastIndexOf('&')), sameWindow);
+										this.loadFile('G' + url.substring(31, url.lastIndexOf('&')), sameWindow, success);
 										
 										return true;
 									}
@@ -3517,6 +3532,11 @@ App.prototype.loadFile = function(id, sameWindow, file)
 					{
 						this.spinner.stop();
 						this.fileLoaded(file);
+
+						if (success != null)
+						{
+							success();
+						}
 					}), mxUtils.bind(this, function(resp)
 					{
 						// Makes sure the file does not save the invalid UI model and overwrites anything important

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

@@ -4,7 +4,7 @@
 EditorUi.initMinimalTheme = function()
 {
 	// Disabled in lightbox mode
-	if (urlParams['lightbox'] == '1')
+	if (urlParams['lightbox'] == '1' || urlParams['chrome'] == '0')
 	{
 		return;
 	}
@@ -757,8 +757,23 @@ EditorUi.initMinimalTheme = function()
 				menu.addSeparator(parent);
 				ui.menus.addSubmenu('save', menu, parent);
 			}
-
+			
 			ui.menus.addSubmenu('exportAs', menu, parent);
+
+			var file = ui.getCurrentFile();
+			
+			if (file != null && file.constructor == DriveFile)
+			{
+				ui.menus.addMenuItems(menu, ['-', 'share'], parent);
+
+				if (file.realtime != null)
+				{
+					ui.menus.addMenuItems(menu, ['chatWindowTitle'], parent);
+				}
+				
+				menu.addSeparator(parent);
+			}
+			
 			ui.menus.addMenuItems(menu, ['-', 'outline', 'layers', '-', 'find', 'tags', '-'], parent);
 			
 			// Cannot use print in standalone mode on iOS as we cannot open new windows
@@ -799,7 +814,7 @@ EditorUi.initMinimalTheme = function()
 			
 			if (file != null && file.constructor == DriveFile)
 			{
-				ui.menus.addMenuItems(menu, ['share', '-', 'makeCopy', 'moveToFolder'], parent);
+				ui.menus.addMenuItems(menu, ['createRevision', 'makeCopy', '-', 'rename', 'moveToFolder'], parent);
 			}
 			else
 			{
@@ -811,11 +826,6 @@ EditorUi.initMinimalTheme = function()
 				ui.menus.addMenuItems(menu, ['-', 'revisionHistory'], parent);
 			}
 			
-			if (file != null && file.constructor == DriveFile)
-			{
-				ui.menus.addMenuItems(menu, ['createRevision'], parent);
-			}
-			
 			ui.menus.addMenuItems(menu, ['-', 'autosave'], parent);
         })));
         

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


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
+ 11 - 10
src/main/webapp/js/viewer.min.js