summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2012-09-14 10:59:30 (EDT)
committerStephan Born2012-09-14 10:59:30 (EDT)
commiteb4a95ae72a9270d352992abb7e207a394dd624a (patch)
treea3d503b74bef9967a1cd4d2a0185138b8a04e46e
parente34ec6506ac5b9e36fe398e6a693a6e1013ec172 (diff)
downloadorg.eclipse.stardust.ui.web-eb4a95ae72a9270d352992abb7e207a394dd624a.zip
org.eclipse.stardust.ui.web-eb4a95ae72a9270d352992abb7e207a394dd624a.tar.gz
org.eclipse.stardust.ui.web-eb4a95ae72a9270d352992abb7e207a394dd624a.tar.bz2
CRNT-25998
1)Added code to show informative message on connection creation complete. git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@59238 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_connection.js30
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_diagram.js10
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_symbol.js1
3 files changed, 33 insertions, 8 deletions
diff --git a/web-modeler/src/main/resources/META-INF/xhtml/js/m_connection.js b/web-modeler/src/main/resources/META-INF/xhtml/js/m_connection.js
index 34abac9..146cfee 100644
--- a/web-modeler/src/main/resources/META-INF/xhtml/js/m_connection.js
+++ b/web-modeler/src/main/resources/META-INF/xhtml/js/m_connection.js
@@ -417,6 +417,8 @@ define(
updateConnection.modelElement.inDataMapping = true;
updateConnection.modelElement.outDataMapping = true;
updateConnection.createUpdateCommand();
+ m_messageDisplay
+ .showMessage("Connection updated");
break;
}
}
@@ -804,6 +806,16 @@ define(
*
*/
Connection.prototype.reroute = function() {
+ if (this.path.removed) {
+ // If dummy connections are there,remove it
+ this.remove();
+ var symbol = this.diagram
+ .findSymbolByGuid(this.toModelElementOid)
+ if (null != symbol) {
+ m_utils.removeItemFromArray(symbol, this);
+ }
+ return;
+ }
if (this.isControlFlow()) {
this.segments = new Array();
@@ -1348,7 +1360,6 @@ define(
*
*/
Connection.prototype.remove = function() {
- // TODO add symbol/diagram cleanup
this.removePrimitives();
this.removeFlyOutMenu();
this.removeProximitySensor();
@@ -1362,6 +1373,13 @@ define(
if (this.toAnchorPoint && this.toAnchorPoint.symbol) {
m_utils.removeItemFromArray(
this.toAnchorPoint.symbol.connections, this);
+
+ } else if (this.toModelElementOid != null) {
+ var symbol = this.diagram
+ .findSymbolByGuid(this.toModelElementOid)
+ if (null != symbol) {
+ m_utils.removeItemFromArray(symbol, this);
+ }
}
};
@@ -1372,7 +1390,9 @@ define(
var n = 0;
while (n < this.primitives.length) {
- this.primitives[n].remove();
+ if(this.primitives[n].node){
+ this.primitives[n].remove();
+ }
n++;
}
};
@@ -1423,7 +1443,7 @@ define(
*/
Connection.prototype.validateCreateConnection = function(
fromAnchorPoint, toAnchorPoint) {
- m_messageDisplay.clear();
+ /*m_messageDisplay.clear();*/
if (fromAnchorPoint.symbol.type == m_constants.EVENT_SYMBOL) {
// Check for OUT connections on End Event
if (fromAnchorPoint.symbol.modelElement.eventType == m_constants.STOP_EVENT_TYPE) {
@@ -1508,14 +1528,14 @@ define(
.showErrorMessage("No more OUT Connection allowed to this activity.");
return false;
}
- }/*else if (toAnchorPoint.symbol.type == m_constants.ACTIVITY_SYMBOL) {
+ }else if (toAnchorPoint.symbol.type == m_constants.ACTIVITY_SYMBOL) {
if (!toAnchorPoint.symbol
.validateCreateConnection()) {
m_messageDisplay
.showErrorMessage("No more connections allowed to this symbol.");
return false;
}
- }*/
+ }
// If Start and End symbol are same, show error
if (fromAnchorPoint.symbol.oid == toAnchorPoint.symbol.oid) {
m_messageDisplay
diff --git a/web-modeler/src/main/resources/META-INF/xhtml/js/m_diagram.js b/web-modeler/src/main/resources/META-INF/xhtml/js/m_diagram.js
index 4ae70b0..fad5ea6 100644
--- a/web-modeler/src/main/resources/META-INF/xhtml/js/m_diagram.js
+++ b/web-modeler/src/main/resources/META-INF/xhtml/js/m_diagram.js
@@ -1342,6 +1342,7 @@ define(
&& this.currentConnection != null) {
this.currentConnection.remove();
this.currentConnection = null;
+ m_messageDisplay.clear();
this.mode = this.NORMAL_MODE;
}
};
@@ -1517,12 +1518,17 @@ define(
this.currentConnection.remove();
} else {
this.currentConnection.select();
+ m_messageDisplay
+ .showMessage("Connection created");
}
this.currentConnection = null;
this.mode = this.NORMAL_MODE;
}else{
- m_utils.removeItemFromArray(
- this.currentConnection.toAnchorPoint.symbol.connections, this);
+ if(this.currentConnection.toAnchorPoint.symbol){
+ m_utils.removeItemFromArray(
+ this.currentConnection.toAnchorPoint.symbol.connections, this.currentConnection);
+ }
+
}
}
};
diff --git a/web-modeler/src/main/resources/META-INF/xhtml/js/m_symbol.js b/web-modeler/src/main/resources/META-INF/xhtml/js/m_symbol.js
index 06282c2..64b227d 100644
--- a/web-modeler/src/main/resources/META-INF/xhtml/js/m_symbol.js
+++ b/web-modeler/src/main/resources/META-INF/xhtml/js/m_symbol.js
@@ -1000,7 +1000,6 @@ define(
this.hideFlyOutMenu();
} else {
this.hideAnchorPoints();
- m_messageDisplay.clear();
}
};