Project

General

Profile

Defect #533 ยป patch2.txt

Sanneke Aleman, 07/26/2012 11:05 AM

 
1
### Eclipse Workspace Patch 1.0
2
#P mod_dialog
3
Index: globals.js
4
===================================================================
5
--- globals.js	(revision 672)
6
+++ globals.js	(working copy)
7
@@ -42,7 +42,7 @@
8
 		application.output('Marking form "' + formName + '" for cleanup', LOGGINGLEVEL.DEBUG);
9
 		bluePrintStack.push(formName);
10
 	}
11
-
12
+	
13
 	var terminator = (application.getApplicationType() == APPLICATION_TYPES.WEB_CLIENT ? new Continuation() : null);
14
 
15
 	/**
16
@@ -91,7 +91,7 @@
17
 	/**
18
 	 * @private
19
 	 *
20
-	 * @param {String} _sFormName
21
+	 * @param {String|RuntimeForm} _sFormName
22
 	 * @param {String} _sDlgType
23
 	 * @param {Array} _aArguments
24
 	 * @param {String} [_sIconStyle]
25
@@ -99,17 +99,24 @@
26
 	 * @return {String}
27
 	 */
28
 	function showDialog(_sFormName, _sDlgType, _aArguments, _sIconStyle) {
29
+		
30
 		var _aArgs = Array.prototype.slice.call(_aArguments),
31
 			_nWidthPadding = 22,
32
 			i, dialogWindow;
33
 		var _sUniqueName = _aArgs[8] || utils.stringReplace(application.getUUID().toString(), "-", "");
34
 
35
+		if(_aArgs[0] instanceof  RuntimeForm) _aArgs[0] = _aArgs[0].controller.getName()
36
+		
37
 		if (_sDlgType == 'FIMD') {
38
 			dialogWindow = application.createWindow("W_" + _sUniqueName, JSWindow.MODAL_DIALOG);
39
 			dialogWindow.setLocation(_aArgs[1] | JSWindow.DEFAULT, _aArgs[2] || JSWindow.DEFAULT);
40
 			if (_aArgs[5]) {
41
 				dialogWindow.title = _aArgs[5];
42
 			}
43
+			else
44
+			{
45
+				dialogWindow.title = solutionModel.getForm(_aArgs[0]).titleText
46
+			}
47
 			dialogWindow.resizable = (_aArgs[6] == null ? true : _aArgs[6]);
48
 			dialogWindow.showTextToolbar(_aArgs[7] == null ? false : _aArgs[7]);
49
 			forms[_aArgs[0]]['windowName'] = "W_" + _sUniqueName;
    (1-1/1)