-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathTestCheckList.jsx
More file actions
95 lines (84 loc) · 2.94 KB
/
TestCheckList.jsx
File metadata and controls
95 lines (84 loc) · 2.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#include '../../$$.jsxinc'
#include '../../etc/$$.ScriptUI.jsxinc'
#include '../../etc/ScriptUI/factories/$$.Popup.jsxinc'
#include '../../etc/ScriptUI/factories/$$.CheckList.jsxinc'
$$.load();
// =============================================================================
// TestCheckList [210814] [211207]
// CheckListFactory tester, using a Popup component.
// [CHG211207] The 'InDesign' item is made LOCKED using `###` prefix
// =============================================================================
try
{
ScriptUI.builder
({
properties: { type:'dialog', text:"Test CheckListFactory" },
margins: 0,
spacing: 0,
orientation: 'stack',
Group$0:
{
margins: 20,
spacing: 20,
orientation: 'row',
Group$0:
{
orientation: 'column',
alignChildren: ScriptUI.LT,
margins: 20,
spacing: 10,
StaticText$0: { properties:{text:__("List of products:")} },
CheckListFactory$MyCheckList:
[{
data: [
"+ Adobe",
"++ Design", "### InDesign", "+++ Illustrator", "--- Photoshop", "--- Acrobat",
"-- Video", "--- Premiere", "--- AfterEffects",
"-- Audio", "--- Audition",
"+ Indiscripts", "++ IndexMatic", "++ IndyFont", "++ BookBarcode", "++ HurryCover", "++ Wordalizer", "++ Claquos",
"- (Others)", "-- Product1", "-- Product2", "-- Product3", "-- Product4"
],
maxLines: 16,
onValueChange: function onValueChange()
{
var n = this.countNodes();
var N = this.countNodes('all');
this.window.Info.text = __("%1/%2 nodes selected.", n, N) + '\r\r' + this.getString(1,'slashed').replace(RegExp.X1,'\r');
},
onRightClick: function onRightClick()
{
this.popup( __("Click to check/uncheck items or branches. Use Ctrl A to select all nodes, Ctrl Alt A to deselect all nodes."), 2, 4 );
},
}],
},
Group$1:
{
orientation: 'column',
alignment: ScriptUI.LF,
margins: 20,
spacing: 10,
Group$1:
{
alignment: ScriptUI.LT,
StaticText$Info: { properties:{text:'',multiline:true}, minimumSize:[250,300] },
},
Group$2:
{
margins: 20,
orientation: 'row',
alignment: ScriptUI.CB,
alignChildren: ScriptUI.CC,
Button$OK: { properties: { text: __("OK"), name: 'ok'} },
Button$KO: { properties: { text: __("Cancel"), name: 'cancel'} },
}
},
},
PopupFactory$MyPopup: [{ auto:1, lineChars:50 }],
})
.show();
}
catch(e)
{
$$.receiveError(e);
}
$$.unload();