summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2012-09-17 08:18:07 (EDT)
committerStephan Born2012-09-17 08:18:07 (EDT)
commit4d6ea38219134ef2d8dd3304327c86e4b22a467e (patch)
tree982848cda25c3a4d3b3b89d7115ab871d2a6b7de
parentb4b5aca45be6d349063989459647aee26aac4114 (diff)
downloadorg.eclipse.stardust.ui.web-4d6ea38219134ef2d8dd3304327c86e4b22a467e.zip
org.eclipse.stardust.ui.web-4d6ea38219134ef2d8dd3304327c86e4b22a467e.tar.gz
org.eclipse.stardust.ui.web-4d6ea38219134ef2d8dd3304327c86e4b22a467e.tar.bz2
CRNT-26001
1)Added code to remove error messages in m_messageDisplay.js 2)made changes in code of creating dataSymbol to set dataFullId using dataId. 3)Made change in m_diagram.js processCommand to refresh last symbol git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@59267 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_connection.js3
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_dataSymbol.js2
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_diagram.js4
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_messageDisplay.js34
4 files changed, 37 insertions, 6 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 c7eef1e..0158416 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
@@ -547,6 +547,8 @@ define(
Connection.prototype.setDummySecondAnchorPoint = function() {
this.setSecondAnchorPoint(this.fromAnchorPoint
.createFlippedClone());
+ m_messageDisplay
+ .showMessage("Select second anchor point for connection.");
};
/**
@@ -1436,6 +1438,7 @@ define(
*/
Connection.prototype.validateCreateConnection = function(
fromAnchorPoint, toAnchorPoint) {
+ m_messageDisplay.clearErrorMessages();
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) {
diff --git a/web-modeler/src/main/resources/META-INF/xhtml/js/m_dataSymbol.js b/web-modeler/src/main/resources/META-INF/xhtml/js/m_dataSymbol.js
index ae327be..dbf75ed 100644
--- a/web-modeler/src/main/resources/META-INF/xhtml/js/m_dataSymbol.js
+++ b/web-modeler/src/main/resources/META-INF/xhtml/js/m_dataSymbol.js
@@ -29,7 +29,7 @@ define(
// Data is not present at server side, using DataIndex and
// modelId to create dataId
dataSymbol.dataFullId = m_model.getFullId(diagram.model,
- "Data" + index);
+ dataSymbol.dataId);
return dataSymbol;
},
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 32ec5bd..704d3f9 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
@@ -639,6 +639,7 @@ define(
.match(this.lastSymbol.type)) {
this.lastSymbol
.applyChanges(obj.changes.added[i]);
+ this.lastSymbol.refresh();
this.lastSymbol = null;
}// For connections lastSymbol will be empty
else if (null != obj.changes.added[i].modelElement) {
@@ -1366,9 +1367,6 @@ define(
this, symbol.anchorPoints[1]);
}
if(null!=this.currentConnection){
- m_messageDisplay
- .showMessage("Select second anchor point for connection.");
-
// Set dummy anchor point
this.currentConnection.setDummySecondAnchorPoint();
}else{
diff --git a/web-modeler/src/main/resources/META-INF/xhtml/js/m_messageDisplay.js b/web-modeler/src/main/resources/META-INF/xhtml/js/m_messageDisplay.js
index 4e41ba7..07c9d57 100644
--- a/web-modeler/src/main/resources/META-INF/xhtml/js/m_messageDisplay.js
+++ b/web-modeler/src/main/resources/META-INF/xhtml/js/m_messageDisplay.js
@@ -22,7 +22,8 @@ define(
markModified : markModified,
showMessage : showMessage,
showErrorMessage : showErrorMessage,
- clear : clear
+ clear : clear,
+ clearErrorMessages : clearErrorMessages
};
/**
@@ -75,6 +76,34 @@ define(
}
/**
+ * clearing error messages
+ */
+ function clearErrorMessages() {
+ clearDisplay();
+ messagePanel.removeAttr("class");
+ messageIcon.parent().removeAttr("class");
+ messageDisplay.removeAttr("class");
+ messageDisplay.empty();
+
+ for(var n in messages){
+ message = messages[n];
+ // remove all error messages, before connection rules
+ // validation
+ if (message && message.type == ERROR_MESSAGE) {
+ m_utils.removeItemFromArray(messages,message);
+ }
+ }
+
+ if (messages.length > 0) {
+ message = messages[messages.length - 1];
+ messagePanel.attr("class", "messagePanelHighlight");
+ messageIcon.parent().attr("class", "infoSeverityIssueItem");
+ messageDisplay.append(message.content);
+ }
+
+ }
+
+ /**
*
*/
function clear() {
@@ -93,7 +122,8 @@ define(
messageDisplay.append(message.content);
} else {
- messageDisplay.append(message.content);
+ //TODO - Do we need this?
+ //messageDisplay.append(message.content);
}
}
}