summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2012-08-17 03:29:03 (EDT)
committer Manik Kishore2012-08-17 03:29:03 (EDT)
commit905216cc2121e29f7495945c24f3f23421c0dfd7 (patch)
treec4be4dfcc914f9516df289362b2247c30245b9de
parent06425204030eb4985b3bac9ae68d23856d2f00a0 (diff)
downloadorg.eclipse.stardust.ui.web-905216cc2121e29f7495945c24f3f23421c0dfd7.zip
org.eclipse.stardust.ui.web-905216cc2121e29f7495945c24f3f23421c0dfd7.tar.gz
org.eclipse.stardust.ui.web-905216cc2121e29f7495945c24f3f23421c0dfd7.tar.bz2
Jira-ID: CRNT-25692
Sync submit for create Data in Drag and Drop of Structured Type to Canvas. Made changes to set "async" : true/false in m_communicationController.js postData() git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@58465 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_commandsController.js4
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_communicationController.js1
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_data.js8
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_dataSymbol.js8
4 files changed, 9 insertions, 12 deletions
diff --git a/web-modeler/src/main/resources/META-INF/xhtml/js/m_commandsController.js b/web-modeler/src/main/resources/META-INF/xhtml/js/m_commandsController.js
index f60e22c..e84a4ef 100644
--- a/web-modeler/src/main/resources/META-INF/xhtml/js/m_commandsController.js
+++ b/web-modeler/src/main/resources/META-INF/xhtml/js/m_commandsController.js
@@ -216,7 +216,9 @@ define(
m_communicationController
.postData(
{
- "url" : url
+ "url" : url,
+ "sync" : command.sync ? true // Optional param for sync submit
+ : false
},
// Added to remove any cyclic reference
JSON.stringify(command, function(key, val) {
diff --git a/web-modeler/src/main/resources/META-INF/xhtml/js/m_communicationController.js b/web-modeler/src/main/resources/META-INF/xhtml/js/m_communicationController.js
index 26c473d..2cfff6b 100644
--- a/web-modeler/src/main/resources/META-INF/xhtml/js/m_communicationController.js
+++ b/web-modeler/src/main/resources/META-INF/xhtml/js/m_communicationController.js
@@ -24,6 +24,7 @@ define([ "m_utils", "m_constants", "m_urlUtils" ], function(m_utils, m_constants
var result = jQuery.ajax({
type: 'POST',
url: options.url,
+ async: options.sync ? false : true, //default :true
contentType: options.hasOwnProperty('contentType') ? options.contentType : 'application/json',
data: dataToBePosted,
success: callbacks.hasOwnProperty('success') ? callbacks.success : null,
diff --git a/web-modeler/src/main/resources/META-INF/xhtml/js/m_data.js b/web-modeler/src/main/resources/META-INF/xhtml/js/m_data.js
index 96dcaee..1d7886d 100644
--- a/web-modeler/src/main/resources/META-INF/xhtml/js/m_data.js
+++ b/web-modeler/src/main/resources/META-INF/xhtml/js/m_data.js
@@ -38,7 +38,7 @@ define([ "m_utils", "m_constants", "m_modelElement", "m_command", "m_commandsCon
data.type = m_constants.STRUCTURED_DATA_TYPE;
data.structuredDataTypeFullId = dataStructure.getFullId();
-
+
return data;
},
@@ -126,13 +126,15 @@ define([ "m_utils", "m_constants", "m_modelElement", "m_command", "m_commandsCon
*
*/
Data.prototype.submitCreation = function() {
- m_commandsController.submitCommand(m_command
+ var command =m_command
.createCreateStructuredDataCommand(this.model.id, this.model.id,
{
"name" : this.name,
"id" : this.id,
"structuredDataTypeFullId" : this.structuredDataTypeFullId
- }));
+ });
+ command.sync = true; // sync submit
+ return m_commandsController.submitCommand(command);
};
/**
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 d2dd672..71c6edd 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
@@ -142,14 +142,6 @@ define(
return path;
};
-
- /**
- *
- */
- DataSymbol.prototype.createCreateCommand = function() {
- this.createAndSubmitCreateCommand();
- };
-
/**
*
*/