| author | Sidharth Singh | 2012-10-04 06:45:52 (EDT) |
|---|---|---|
| committer | Manik Kishore | 2012-10-04 06:45:52 (EDT) |
| commit | 165de677762b9f5739b49f29d0170035519657c4 (patch) (side-by-side diff) | |
| tree | e41843a5f29dc46319e5a80a4c7ff7892b64e0ef | |
| parent | 91608b9c9fb37d495e341e6418e08490622a7e6a (diff) | |
| download | org.eclipse.stardust.ui.web-165de677762b9f5739b49f29d0170035519657c4.zip org.eclipse.stardust.ui.web-165de677762b9f5739b49f29d0170035519657c4.tar.gz org.eclipse.stardust.ui.web-165de677762b9f5739b49f29d0170035519657c4.tar.bz2 | |
CRNT-25969
Made changes to update the modelElement on activityType change.
git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@59761 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
| -rw-r--r-- | web-modeler/src/main/resources/META-INF/xhtml/js/m_activitySymbol.js | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/web-modeler/src/main/resources/META-INF/xhtml/js/m_activitySymbol.js b/web-modeler/src/main/resources/META-INF/xhtml/js/m_activitySymbol.js index aaed4ae..95496f7 100644 --- a/web-modeler/src/main/resources/META-INF/xhtml/js/m_activitySymbol.js +++ b/web-modeler/src/main/resources/META-INF/xhtml/js/m_activitySymbol.js @@ -12,10 +12,11 @@ define( [ "m_utils", "m_constants", "m_extensionManager", "m_command",
"m_canvasManager", "m_symbol", "m_gatewaySymbol", "m_session",
"m_eventSymbol", "m_activityPropertiesPanel", "m_model",
- "m_activity" ],
+ "m_activity", "m_commandsController", "m_command" ],
function(m_utils, m_constants, m_extensionManager, m_command,
m_canvasManager, m_symbol, m_gatewaySymbol, m_eventSymbol,
- m_session, m_activityPropertiesPanel, m_model, m_activity) {
+ m_session, m_activityPropertiesPanel, m_model, m_activity,
+ m_commandsController, m_command) {
return {
createActivitySymbol : function(diagram, type) {
@@ -491,10 +492,13 @@ define( ActivitySymbol.prototype.switchToSubprocessActivity = function() {
this.icon.hide();
+ this.modelElement.activityType = m_constants.SUBPROCESS_ACTIVITY_TYPE;
this.icon = this.subprocessIcon;
this.icon.show();
this.icon.toFront();
+
+ this.submitChanges();
};
/**
@@ -503,10 +507,13 @@ define( ActivitySymbol.prototype.switchToApplicationActivity = function() {
this.icon.hide();
+ this.modelElement.activityType = m_constants.APPLICATION_ACTIVITY_TYPE;
this.icon = this.applicationIcon;
this.icon.show();
this.icon.toFront();
+
+ this.submitChanges();
};
/**
@@ -550,6 +557,18 @@ define( };
/**
+ * Update the modelElement
+ */
+ ActivitySymbol.prototype.submitChanges = function() {
+ var changes = {
+ activityType : this.modelElement.activityType
+ };
+ m_commandsController.submitCommand(m_command
+ .createUpdateModelElementCommand(
+ this.diagram.modelId,
+ this.modelElement.oid, changes));
+ };
+ /**
*
*/
ActivitySymbol.prototype.validateCreateConnection = function(
|

