瀏覽代碼

Merge pull request #50 from AToMPM/workflow-fixes

Fix workflows
BentleyJOakes 7 年之前
父節點
當前提交
2fd44ed98a

+ 23 - 11
client/window_management.js

@@ -603,8 +603,13 @@ WindowManagement = function(){
 			 completion */
 	this.spawnClient = function (fname,callbackURL)
 	{
-		var c 		= window.open(window.location.href, '_blank'),
-		onspawn = 
+		let c 		= window.open(window.location.href, '_blank');
+
+		if (c == undefined){
+			WindowManagement.openDialog(_ERROR, "Failed to open new window. Are pop-ups blocked?");
+			return;
+		}
+			let onspawn =
 			 function()
 			 {
 				 if( (fname || callbackURL)	 &&
@@ -638,8 +643,15 @@ WindowManagement = function(){
 		the instance*/	
 	this.spawnClientOption = function (fname,tbname,option,trafo,msg)
 	{
-		var c 		= window.open(window.location.href, '_blank'),
-		onspawn = 
+        let c = window.open(window.location.href, '_blank');
+
+        if (c == undefined) {
+            WindowManagement.openDialog(_ERROR, "Failed to open new window. Are pop-ups blocked?\n" +
+                "Please reload the workflow model after allowing pop-ups.");
+            return;
+        }
+
+		let onspawn =
 			 function()
 			 {
 				if( (fname|| tbname)	 &&
@@ -656,13 +668,13 @@ WindowManagement = function(){
 				if (trafo == undefined){
 					trafo = option;
 				}
-				if( tbname ){
-						toolbars = tbname.split(",");
-						for ( var n in toolbars){
-							c._loadToolbar(toolbars[n]);
-						}						
-				}				
-				if( fname ){
+                 if (tbname) {
+                     let toolbars = tbname.split(",");
+                     for (let toolbar of toolbars) {
+                         c._loadToolbar(toolbar);
+                     }
+                 }
+                 if( fname ){
 						c.__saveas = fname;
 						if( option.length > 2 ){
 							c._loadModel(fname);

+ 4 - 4
users/(default)/Formalisms/Workflows/Templates/CreateDSL.model

@@ -1235,7 +1235,7 @@
 							"185": {
 								"textContent": {
 									"type": "string",
-									"value": "2 ConcretSyntax"
+									"value": "2 ConcreteSyntax"
 								},
 								"style": {
 									"type": "map<string,string>",
@@ -4892,7 +4892,7 @@
 			"0": {
 				"parameterList": {
 					"type": "string",
-					"value": "{2:/Formalisms/__LanguageSyntax__/SimpleClassDiagram/SimpleClassDiagram.umlIcons.metamodel,4:.model,7:/Formalisms/__LanguageSyntax__/ConcreteSyntax/ConcreteSyntax.defaultIcons.metamodel,9:Icons.model,3:Create the metamodel,8:Create the Concret Syntax,10:Icons.model,11:.model,13:Icons.model}"
+					"value": "{2:/Formalisms/__LanguageSyntax__/SimpleClassDiagram/SimpleClassDiagram.umlIcons.metamodel,4:.model,7:/Formalisms/__LanguageSyntax__/ConcreteSyntax/ConcreteSyntax.defaultIcons.metamodel,9:Icons.model,3:Create the metamodel,8:Create the Concrete Syntax,10:Icons.model,11:.model,13:Icons.model}"
 				},
 				"$type": "/Formalisms/Workflows/Workflows/Parameters"
 			},
@@ -4986,7 +4986,7 @@
 				},
 				"name": {
 					"type": "string",
-					"value": "2 ConcretSyntax"
+					"value": "2 ConcreteSyntax"
 				},
 				"current": {
 					"type": "boolean",
@@ -4997,7 +4997,7 @@
 			"8": {
 				"Message": {
 					"type": "string",
-					"value": "Create the Concret Syntax"
+					"value": "Create the Concrete Syntax"
 				},
 				"Duration": {
 					"type": "int",

文件差異過大導致無法顯示
+ 2 - 2
users/(default)/Formalisms/Workflows/simulate/R_AddDependParam.model