1
|
Index: globals.js
|
2
|
===================================================================
|
3
|
--- globals.js (revision 84)
|
4
|
+++ globals.js (working copy)
|
5
|
@@ -8,6 +8,7 @@
|
6
|
* OS dependent button-reverse patch by Harjo Kompagnie
|
7
|
* Many JSDoc (Servoy 6.0/6.1) fixes by Sanneke Aleman
|
8
|
* RuntimeForm support in FIMD by Sanneke Aleman
|
9
|
+ * 2012.Oct.14 Patch for form in dialog not creating proper form by Tom Parry
|
10
|
*
|
11
|
* @properties={typeid:35,uuid:"EFF9564C-DBDB-4087-A9DF-A56826FE2CC7",variableType:-4}
|
12
|
*/
|
13
|
@@ -81,7 +82,9 @@
|
14
|
|
15
|
//Create requested blueprint
|
16
|
if (!forms[_sFormName]) {
|
17
|
- var _oForm = solutionModel.newForm(_sFormName, forms[_sBaseFormName].controller.getDataSource(), _sStyleSheet, false, _nWidth, _nHeight);
|
18
|
+ var base_form = solutionModel.getForm(_sBaseFormName);//tp assumes not null!
|
19
|
+ var ds = base_form.dataSource;//tp
|
20
|
+ var _oForm = solutionModel.newForm(_sFormName, ds, _sStyleSheet, false, _nWidth, _nHeight);
|
21
|
_oForm.extendsForm = _sBaseFormName;
|
22
|
|
23
|
//Store pointer to otherwise private method on the form, to be used when hiding the form
|
24
|
@@ -112,8 +115,9 @@
|
25
|
if (_aArgs[0] instanceof RuntimeForm) _aArgs[0] = _aArgs[0].controller.getName()
|
26
|
|
27
|
if (_sDlgType == 'FIMD') {
|
28
|
- dialogWindow = application.createWindow("W_" + _sUniqueName, JSWindow.MODAL_DIALOG);
|
29
|
- dialogWindow.setLocation(_aArgs[1] | JSWindow.DEFAULT, _aArgs[2] || JSWindow.DEFAULT);
|
30
|
+ var win_name = "W_" + _sUniqueName;//tp
|
31
|
+ dialogWindow = application.createWindow(win_name, JSWindow.MODAL_DIALOG);//tp
|
32
|
+ dialogWindow.setLocation(_aArgs[1] || JSWindow.DEFAULT, _aArgs[2] || JSWindow.DEFAULT);//tp changed single | to double ||
|
33
|
if (_aArgs[5]) {
|
34
|
dialogWindow.title = _aArgs[5];
|
35
|
} else {
|
36
|
@@ -121,18 +125,19 @@
|
37
|
}
|
38
|
dialogWindow.resizable = (_aArgs[6] == null ? true : _aArgs[6]);
|
39
|
dialogWindow.showTextToolbar(_aArgs[7] == null ? false : _aArgs[7]);
|
40
|
- forms[_aArgs[0]]['windowName'] = "W_" + _sUniqueName;
|
41
|
+ forms[_aArgs[0]]['windowName'] = win_name;
|
42
|
|
43
|
if (application.getApplicationType() == APPLICATION_TYPES.WEB_CLIENT) {
|
44
|
var _nWidth = (_aArgs[3] == null || _aArgs[3] == JSWindow.DEFAULT) ? solutionModel.getForm(_aArgs[0]).width : _aArgs[3];
|
45
|
var _nHeight = (_aArgs[4] == null || _aArgs[4] == JSWindow.DEFAULT) ? solutionModel.getForm(_aArgs[0]).getBodyPart().height : _aArgs[4];
|
46
|
|
47
|
- newFormBluePrint(_sUniqueName, 'dialogs_fimd', _nWidth, _nHeight);
|
48
|
+ var _extended = 'X_' + _sUniqueName;//tp
|
49
|
+ newFormBluePrint(_extended, 'dialogs_fimd', _nWidth, _nHeight);//tp
|
50
|
/** @type {RuntimeForm<dialogs_fimd>}*/
|
51
|
- var form = forms[_sUniqueName];
|
52
|
+ var form = forms[_extended];//tp
|
53
|
form.continuation = new Continuation(); // saves the current methodStack into variable x, so it can be continued later on
|
54
|
- form.windowName = "W_" + _sUniqueName;
|
55
|
- form.setupForm(_aArgs[0], _nWidth, _nHeight);
|
56
|
+ form.windowName = win_name;//tp
|
57
|
+ form.setupForm(_sUniqueName, _nWidth, _nHeight);//tp
|
58
|
|
59
|
// Need to add 22 pixels to the width with the original (built-in) servoy stylesheet or else you get scrollbars. You may want to adjust this value when you use a custom (override) stylesheet
|
60
|
dialogWindow.setSize(_nWidth + _nWidthPadding, _nHeight);
|
61
|
@@ -350,8 +355,8 @@
|
62
|
|
63
|
/**
|
64
|
* Show a Form In Modal Dialog
|
65
|
- *
|
66
|
- * @param {String||RuntimeForm} formName
|
67
|
+ * NOTE:2012.Oct.11 T.Parry changed from @param {String||RuntimeForm} to @param {String|RuntimeForm} formName
|
68
|
+ * @param {String|RuntimeForm} formName
|
69
|
* @param {Number} [left]
|
70
|
* @param {Number} [top]
|
71
|
* @param {Number} [width]
|
72
|
Index: forms/dialogs_base.js
|
73
|
===================================================================
|
74
|
--- forms/dialogs_base.js (revision 84)
|
75
|
+++ forms/dialogs_base.js (working copy)
|
76
|
@@ -7,7 +7,7 @@
|
77
|
|
78
|
/**
|
79
|
* @type {String}
|
80
|
- * @properties={typeid:35,uuid:"6F681452-1E7D-4320-AC85-9CFBB4B12030",variableType:12}
|
81
|
+ * @properties={typeid:35,uuid:"6F681452-1E7D-4320-AC85-9CFBB4B12030"}
|
82
|
*/
|
83
|
var returnValue = '';
|
84
|
|
85
|
@@ -37,7 +37,7 @@
|
86
|
/**
|
87
|
* @type {String}
|
88
|
*
|
89
|
- * @properties={typeid:35,uuid:"EC0A188F-684C-4DCC-817B-AA573B9DD8FA",variableType:12}
|
90
|
+ * @properties={typeid:35,uuid:"EC0A188F-684C-4DCC-817B-AA573B9DD8FA"}
|
91
|
*/
|
92
|
var windowName;
|
93
|
|
94
|
@@ -94,7 +94,7 @@
|
95
|
*/
|
96
|
function setupButtons(buttonArray, redraw, dialogWidth, dialogHeight) {
|
97
|
var _oForm = solutionModel.getForm(controller.getName()),
|
98
|
- _oMethod = solutionModel.getForm("dialogs_base").getFormMethod('onButtonAction'),
|
99
|
+ _oMethod = solutionModel.getForm("dialogs_base").getMethod('onButtonAction'), //tp changed .getFormMethod (deprecated) to .getMethod
|
100
|
_oBtn,
|
101
|
_nBtnMinWidth = 80,
|
102
|
_nBtnWidth, // = _nBtnMinWidth,
|
103
|
Index: forms/dialogs_fimd.js
|
104
|
===================================================================
|
105
|
--- forms/dialogs_fimd.js (revision 84)
|
106
|
+++ forms/dialogs_fimd.js (working copy)
|
107
|
@@ -1,4 +1,7 @@
|
108
|
/**
|
109
|
+ * @param {String} _sFormName
|
110
|
+ * @param {Number} _nWidth
|
111
|
+ * @param {Number} _nHeight
|
112
|
* @properties={typeid:24,uuid:"D81D27BA-0DFB-41A5-9251-47C3EDA9F260"}
|
113
|
*/
|
114
|
function setupForm(_sFormName, _nWidth, _nHeight) {
|
115
|
@@ -19,4 +22,4 @@
|
116
|
function onHide(event) {
|
117
|
elements.tplMain.removeAllTabs(); // workaround for an issue in 5.2.8 and below. Should be fixed in 5.2.9
|
118
|
return _super.onHide(event)
|
119
|
-}
|
120
|
+}
|
121
|
\ No newline at end of file
|