1
|
### Eclipse Workspace Patch 1.0
|
2
|
#P mod_listpicker
|
3
|
Index: forms/mod_listpicker.js
|
4
|
===================================================================
|
5
|
--- forms/mod_listpicker.js (revision 20)
|
6
|
+++ forms/mod_listpicker.js (working copy)
|
7
|
@@ -154,7 +154,11 @@
|
8
|
} catch (e) {
|
9
|
application.output(e.msg, LOGGINGLEVEL.ERROR);
|
10
|
}
|
11
|
- application.closeFormDialog();
|
12
|
+ if(_g_oListpicker.callback.closeAfterNew != false)
|
13
|
+ {
|
14
|
+ application.closeFormDialog();
|
15
|
+ }
|
16
|
+
|
17
|
}
|
18
|
|
19
|
/**
|
20
|
Index: globals.js
|
21
|
===================================================================
|
22
|
--- globals.js (revision 20)
|
23
|
+++ globals.js (working copy)
|
24
|
@@ -50,7 +50,10 @@
|
25
|
// Stores the filter param Arrays: [columnNameString,OperatorString,Value]
|
26
|
filterParam: new Array(), // optional
|
27
|
|
28
|
- loadAllRecords: false // optional, load all records when no search criteria is given.
|
29
|
+ loadAllRecords: false, // optional, load all records when no search criteria is given.
|
30
|
+
|
31
|
+ editableColumns: new Array(), // optional, only set to editable a columns if it name is in this array.
|
32
|
+ columnValuelists: new Object() // optional. Must be filled {columnName: valuelistName}
|
33
|
|
34
|
}
|
35
|
|
36
|
@@ -62,7 +65,8 @@
|
37
|
methodFormName: "", /// optional, leave empty when using global methods
|
38
|
methodName: "", // required (unless callbackFormName is used)
|
39
|
|
40
|
- createNewMethod: "" // optional
|
41
|
+ createNewMethod: "", // optional
|
42
|
+ closeAfterNew : true // optional, if false then the form won´t close after the createNewMethod callback
|
43
|
}
|
44
|
|
45
|
this.buttontext = {
|
46
|
@@ -131,7 +135,7 @@
|
47
|
_oField = _oForm.newField(this.form.displayColumns[i], SM_DISPLAYTYPE[this.form.displayTypes[i]], i + 1, (31 + i), _nFieldWidth, this.form.rowHeight);
|
48
|
}
|
49
|
_oField.titleText = this.form.displayNames[i];
|
50
|
- _oField.editable = false;
|
51
|
+ _oField.editable = (this.form.editableColumns.indexOf(this.form.displayColumns[i]) == -1)?false:true;
|
52
|
_oField.tabSeq = -2;
|
53
|
_oField.borderType = 'EmptyBorder, 0, 0, 0, 0';
|
54
|
_oField.margin = "0,2,0,0"; // little margin on the left
|
55
|
@@ -139,6 +143,7 @@
|
56
|
if ( this.form.columnWidths[i] == -1) {
|
57
|
_oField.anchors = SM_ANCHOR.WEST | SM_ANCHOR.EAST;
|
58
|
}
|
59
|
+ _oField.valuelist = (this.form.columnValuelists[this.form.displayColumns[i]])?solutionModel.getValueList(this.form.columnValuelists[this.form.displayColumns[i]]):null;
|
60
|
}
|
61
|
|
62
|
// Pass the JSListpicker object to the form-variable for further processing (like when clicking on form buttons)
|