resin 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/amber/css/amber-normalize.css +73 -73
- data/amber/css/amber-normalize.less +1 -1
- data/amber/css/amber.css +106 -106
- data/amber/css/helios.css +242 -0
- data/amber/images/hsplitter.png +0 -0
- data/amber/images/vsplitter.png +0 -0
- data/amber/js/Benchfib.deploy.js +116 -38
- data/amber/js/Benchfib.js +120 -42
- data/amber/js/Canvas.deploy.js +674 -403
- data/amber/js/Canvas.js +682 -411
- data/amber/js/Compiler-AST.deploy.js +1150 -0
- data/amber/js/Compiler-AST.js +1591 -0
- data/amber/js/Compiler-Core.deploy.js +1562 -0
- data/amber/js/Compiler-Core.js +1972 -0
- data/amber/js/Compiler-Exceptions.deploy.js +114 -0
- data/amber/js/Compiler-Exceptions.js +161 -0
- data/amber/js/Compiler-IR.deploy.js +2326 -0
- data/amber/js/Compiler-IR.js +3146 -0
- data/amber/js/Compiler-Inlining.deploy.js +1147 -0
- data/amber/js/Compiler-Inlining.js +1514 -0
- data/amber/js/Compiler-Semantic.deploy.js +1207 -0
- data/amber/js/Compiler-Semantic.js +1628 -0
- data/amber/js/Compiler-Tests.deploy.js +646 -60
- data/amber/js/Compiler-Tests.js +843 -82
- data/amber/js/Compiler.deploy.js +1097 -159
- data/amber/js/Compiler.js +1414 -161
- data/amber/js/Examples.deploy.js +31 -15
- data/amber/js/Examples.js +33 -17
- data/amber/js/Helios-Announcements.deploy.js +127 -0
- data/amber/js/Helios-Announcements.js +157 -0
- data/amber/js/Helios-Browser.deploy.js +1473 -0
- data/amber/js/Helios-Browser.js +1953 -0
- data/amber/js/Helios-Commands.deploy.js +403 -0
- data/amber/js/Helios-Commands.js +563 -0
- data/amber/js/Helios-Core.deploy.js +1070 -0
- data/amber/js/Helios-Core.js +1445 -0
- data/amber/js/Helios-Environments.deploy.js +132 -0
- data/amber/js/Helios-Environments.js +179 -0
- data/amber/js/Helios-Inspector.deploy.js +855 -0
- data/amber/js/Helios-Inspector.js +1155 -0
- data/amber/js/Helios-KeyBindings.deploy.js +753 -0
- data/amber/js/Helios-KeyBindings.js +1023 -0
- data/amber/js/Helios-Layout.deploy.js +383 -0
- data/amber/js/Helios-Layout.js +523 -0
- data/amber/js/Helios-Workspace.deploy.js +799 -0
- data/amber/js/Helios-Workspace.js +1074 -0
- data/amber/js/IDE.deploy.js +2541 -1490
- data/amber/js/IDE.js +2721 -1660
- data/amber/js/Importer-Exporter.deploy.js +671 -0
- data/amber/js/Importer-Exporter.js +816 -0
- data/amber/js/Kernel-Announcements.deploy.js +137 -20
- data/amber/js/Kernel-Announcements.js +176 -22
- data/amber/js/Kernel-Classes.deploy.js +555 -168
- data/amber/js/Kernel-Classes.js +662 -205
- data/amber/js/Kernel-Collections.deploy.js +1403 -618
- data/amber/js/Kernel-Collections.js +1545 -690
- data/amber/js/Kernel-Exceptions.deploy.js +109 -45
- data/amber/js/Kernel-Exceptions.js +123 -49
- data/amber/js/Kernel-Methods.deploy.js +196 -81
- data/amber/js/Kernel-Methods.js +214 -89
- data/amber/js/Kernel-Objects.deploy.js +1542 -1117
- data/amber/js/Kernel-Objects.js +1593 -1148
- data/amber/js/Kernel-Tests.deploy.js +1725 -772
- data/amber/js/Kernel-Tests.js +2301 -1123
- data/amber/js/Kernel-Transcript.deploy.js +23 -25
- data/amber/js/Kernel-Transcript.js +24 -26
- data/amber/js/SUnit.deploy.js +204 -131
- data/amber/js/SUnit.js +222 -139
- data/amber/js/Spaces.deploy.js +240 -0
- data/amber/js/Spaces.js +326 -0
- data/amber/js/amber.js +26 -7
- data/amber/js/boot.js +65 -47
- data/amber/js/init.js +1 -1
- data/amber/js/lib/CodeMirror/amber.css +21 -21
- data/amber/js/lib/CodeMirror/codemirror.css +119 -13
- data/amber/js/lib/CodeMirror/codemirror.js +2219 -1220
- data/amber/js/lib/CodeMirror/smalltalk.js +134 -129
- data/amber/js/lib/bootstrap/css/bootstrap.css +5837 -0
- data/amber/js/lib/bootstrap/css/bootstrap.min.css +841 -0
- data/amber/js/lib/bootstrap/img/glyphicons-halflings-white.png +0 -0
- data/amber/js/lib/bootstrap/img/glyphicons-halflings.png +0 -0
- data/amber/js/lib/bootstrap/js/bootstrap.js +2038 -0
- data/amber/js/lib/bootstrap/js/bootstrap.min.js +7 -0
- data/amber/js/lib/jQuery/jquery-1.8.2.min.js +2 -0
- data/amber/js/lib/jQuery/jquery-ui-1.8.24.custom.min.js +125 -0
- data/amber/st/Compiler-AST.st +505 -0
- data/amber/st/Compiler-Core.st +835 -0
- data/amber/st/Compiler-Exceptions.st +87 -0
- data/amber/st/Compiler-IR.st +1097 -0
- data/amber/st/Compiler-Inlining.st +650 -0
- data/amber/st/Compiler-Semantic.st +558 -0
- data/amber/st/Compiler-Tests.st +285 -381
- data/amber/st/Compiler.st +725 -2
- data/amber/st/Helios-Announcements.st +104 -0
- data/amber/st/Helios-Browser.st +708 -0
- data/amber/st/Helios-Commands.st +223 -0
- data/amber/st/Helios-Core.st +532 -0
- data/amber/st/Helios-Environments.st +98 -0
- data/amber/st/Helios-Inspector.st +367 -0
- data/amber/st/Helios-KeyBindings.st +337 -0
- data/amber/st/Helios-Layout.st +199 -0
- data/amber/st/Helios-Workspace.st +367 -0
- data/amber/st/IDE.st +75 -53
- data/amber/st/Importer-Exporter.st +386 -0
- data/amber/st/Kernel-Announcements.st +92 -0
- data/amber/st/Kernel-Classes.st +137 -15
- data/amber/st/Kernel-Collections.st +137 -47
- data/amber/st/Kernel-Exceptions.st +14 -0
- data/amber/st/Kernel-Methods.st +9 -1
- data/amber/st/Kernel-Objects.st +29 -5
- data/amber/st/Kernel-Tests.st +545 -199
- data/amber/st/SUnit.st +10 -0
- data/amber/st/Spaces.st +142 -0
- data/lib/resin/app.rb +1 -1
- metadata +86 -31
- data/amber/js/lib/jQuery/jquery-1.4.4.min.js +0 -167
- data/amber/js/lib/jQuery/jquery-1.6.4.min.js +0 -4
|
@@ -0,0 +1,1070 @@
|
|
|
1
|
+
smalltalk.addPackage('Helios-Core', {});
|
|
2
|
+
smalltalk.addClass('HLTab', smalltalk.Object, ['widget', 'label'], 'Helios-Core');
|
|
3
|
+
smalltalk.addMethod(
|
|
4
|
+
"_activate",
|
|
5
|
+
smalltalk.method({
|
|
6
|
+
selector: "activate",
|
|
7
|
+
fn: function () {
|
|
8
|
+
var self = this;
|
|
9
|
+
smalltalk.send(smalltalk.send(self, "_manager", []), "_activate_", [self]);
|
|
10
|
+
return self;
|
|
11
|
+
}
|
|
12
|
+
}),
|
|
13
|
+
smalltalk.HLTab);
|
|
14
|
+
|
|
15
|
+
smalltalk.addMethod(
|
|
16
|
+
"_add",
|
|
17
|
+
smalltalk.method({
|
|
18
|
+
selector: "add",
|
|
19
|
+
fn: function () {
|
|
20
|
+
var self = this;
|
|
21
|
+
smalltalk.send(smalltalk.send(self, "_manager", []), "_addTab_", [self]);
|
|
22
|
+
return self;
|
|
23
|
+
}
|
|
24
|
+
}),
|
|
25
|
+
smalltalk.HLTab);
|
|
26
|
+
|
|
27
|
+
smalltalk.addMethod(
|
|
28
|
+
"_isActive",
|
|
29
|
+
smalltalk.method({
|
|
30
|
+
selector: "isActive",
|
|
31
|
+
fn: function () {
|
|
32
|
+
var self = this;
|
|
33
|
+
var $1;
|
|
34
|
+
$1 = smalltalk.send(smalltalk.send(smalltalk.send(self, "_manager", []), "_activeTab", []), "__eq", [self]);
|
|
35
|
+
return $1;
|
|
36
|
+
}
|
|
37
|
+
}),
|
|
38
|
+
smalltalk.HLTab);
|
|
39
|
+
|
|
40
|
+
smalltalk.addMethod(
|
|
41
|
+
"_label",
|
|
42
|
+
smalltalk.method({
|
|
43
|
+
selector: "label",
|
|
44
|
+
fn: function () {
|
|
45
|
+
var self = this;
|
|
46
|
+
var $1;
|
|
47
|
+
if (($receiver = self['@label']) == nil || $receiver == undefined) {
|
|
48
|
+
$1 = "";
|
|
49
|
+
} else {
|
|
50
|
+
$1 = self['@label'];
|
|
51
|
+
}
|
|
52
|
+
return $1;
|
|
53
|
+
}
|
|
54
|
+
}),
|
|
55
|
+
smalltalk.HLTab);
|
|
56
|
+
|
|
57
|
+
smalltalk.addMethod(
|
|
58
|
+
"_label_",
|
|
59
|
+
smalltalk.method({
|
|
60
|
+
selector: "label:",
|
|
61
|
+
fn: function (aString) {
|
|
62
|
+
var self = this;
|
|
63
|
+
self['@label'] = aString;
|
|
64
|
+
return self;
|
|
65
|
+
}
|
|
66
|
+
}),
|
|
67
|
+
smalltalk.HLTab);
|
|
68
|
+
|
|
69
|
+
smalltalk.addMethod(
|
|
70
|
+
"_manager",
|
|
71
|
+
smalltalk.method({
|
|
72
|
+
selector: "manager",
|
|
73
|
+
fn: function () {
|
|
74
|
+
var self = this;
|
|
75
|
+
var $1;
|
|
76
|
+
$1 = smalltalk.send(smalltalk.HLManager || HLManager, "_current", []);
|
|
77
|
+
return $1;
|
|
78
|
+
}
|
|
79
|
+
}),
|
|
80
|
+
smalltalk.HLTab);
|
|
81
|
+
|
|
82
|
+
smalltalk.addMethod(
|
|
83
|
+
"_widget",
|
|
84
|
+
smalltalk.method({
|
|
85
|
+
selector: "widget",
|
|
86
|
+
fn: function () {
|
|
87
|
+
var self = this;
|
|
88
|
+
return self['@widget'];
|
|
89
|
+
}
|
|
90
|
+
}),
|
|
91
|
+
smalltalk.HLTab);
|
|
92
|
+
|
|
93
|
+
smalltalk.addMethod(
|
|
94
|
+
"_widget_",
|
|
95
|
+
smalltalk.method({
|
|
96
|
+
selector: "widget:",
|
|
97
|
+
fn: function (aWidget) {
|
|
98
|
+
var self = this;
|
|
99
|
+
self['@widget'] = aWidget;
|
|
100
|
+
return self;
|
|
101
|
+
}
|
|
102
|
+
}),
|
|
103
|
+
smalltalk.HLTab);
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
smalltalk.addMethod(
|
|
107
|
+
"_on_labelled_",
|
|
108
|
+
smalltalk.method({
|
|
109
|
+
selector: "on:labelled:",
|
|
110
|
+
fn: function (aWidget, aString) {
|
|
111
|
+
var self = this;
|
|
112
|
+
var $2, $3, $1;
|
|
113
|
+
$2 = smalltalk.send(self, "_new", []);
|
|
114
|
+
smalltalk.send($2, "_widget_", [aWidget]);
|
|
115
|
+
smalltalk.send($2, "_label_", [aString]);
|
|
116
|
+
$3 = smalltalk.send($2, "_yourself", []);
|
|
117
|
+
$1 = $3;
|
|
118
|
+
return $1;
|
|
119
|
+
}
|
|
120
|
+
}),
|
|
121
|
+
smalltalk.HLTab.klass);
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
smalltalk.addClass('HLWidget', smalltalk.Widget, ['wrapper'], 'Helios-Core');
|
|
125
|
+
smalltalk.addMethod(
|
|
126
|
+
"_manager",
|
|
127
|
+
smalltalk.method({
|
|
128
|
+
selector: "manager",
|
|
129
|
+
fn: function () {
|
|
130
|
+
var self = this;
|
|
131
|
+
var $1;
|
|
132
|
+
$1 = smalltalk.send(smalltalk.HLManager || HLManager, "_current", []);
|
|
133
|
+
return $1;
|
|
134
|
+
}
|
|
135
|
+
}),
|
|
136
|
+
smalltalk.HLWidget);
|
|
137
|
+
|
|
138
|
+
smalltalk.addMethod(
|
|
139
|
+
"_refresh",
|
|
140
|
+
smalltalk.method({
|
|
141
|
+
selector: "refresh",
|
|
142
|
+
fn: function () {
|
|
143
|
+
var self = this;
|
|
144
|
+
var $1;
|
|
145
|
+
$1 = smalltalk.send(self, "_wrapper", []);
|
|
146
|
+
if (($receiver = $1) == nil || $receiver == undefined) {
|
|
147
|
+
return self;
|
|
148
|
+
} else {
|
|
149
|
+
}
|
|
150
|
+
smalltalk.send(smalltalk.send(smalltalk.send(self, "_wrapper", []), "_asJQuery", []), "_empty", []);
|
|
151
|
+
smalltalk.send(function (html) {return smalltalk.send(self, "_renderContentOn_", [html]);}, "_appendToJQuery_", [smalltalk.send(smalltalk.send(self, "_wrapper", []), "_asJQuery", [])]);
|
|
152
|
+
return self;
|
|
153
|
+
}
|
|
154
|
+
}),
|
|
155
|
+
smalltalk.HLWidget);
|
|
156
|
+
|
|
157
|
+
smalltalk.addMethod(
|
|
158
|
+
"_registerBindings",
|
|
159
|
+
smalltalk.method({
|
|
160
|
+
selector: "registerBindings",
|
|
161
|
+
fn: function () {
|
|
162
|
+
var self = this;
|
|
163
|
+
smalltalk.send(self, "_registerBindingsOn_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_manager", []), "_keyBinder", []), "_bindings", [])]);
|
|
164
|
+
return self;
|
|
165
|
+
}
|
|
166
|
+
}),
|
|
167
|
+
smalltalk.HLWidget);
|
|
168
|
+
|
|
169
|
+
smalltalk.addMethod(
|
|
170
|
+
"_registerBindingsOn_",
|
|
171
|
+
smalltalk.method({
|
|
172
|
+
selector: "registerBindingsOn:",
|
|
173
|
+
fn: function (aBindingGroup) {
|
|
174
|
+
var self = this;
|
|
175
|
+
return self;
|
|
176
|
+
}
|
|
177
|
+
}),
|
|
178
|
+
smalltalk.HLWidget);
|
|
179
|
+
|
|
180
|
+
smalltalk.addMethod(
|
|
181
|
+
"_renderContentOn_",
|
|
182
|
+
smalltalk.method({
|
|
183
|
+
selector: "renderContentOn:",
|
|
184
|
+
fn: function (html) {
|
|
185
|
+
var self = this;
|
|
186
|
+
return self;
|
|
187
|
+
}
|
|
188
|
+
}),
|
|
189
|
+
smalltalk.HLWidget);
|
|
190
|
+
|
|
191
|
+
smalltalk.addMethod(
|
|
192
|
+
"_renderOn_",
|
|
193
|
+
smalltalk.method({
|
|
194
|
+
selector: "renderOn:",
|
|
195
|
+
fn: function (html){
|
|
196
|
+
var self=this;
|
|
197
|
+
smalltalk.send(self,"_registerBindings",[]);
|
|
198
|
+
self["@wrapper"]=smalltalk.send(html,"_div",[]);
|
|
199
|
+
smalltalk.send((function(renderer){
|
|
200
|
+
return smalltalk.send(self,"_renderContentOn_",[renderer]);
|
|
201
|
+
}),"_appendToJQuery_",[smalltalk.send(self["@wrapper"],"_asJQuery",[])]);
|
|
202
|
+
return self}
|
|
203
|
+
}),
|
|
204
|
+
smalltalk.HLWidget);
|
|
205
|
+
|
|
206
|
+
smalltalk.addMethod(
|
|
207
|
+
"_wrapper",
|
|
208
|
+
smalltalk.method({
|
|
209
|
+
selector: "wrapper",
|
|
210
|
+
fn: function () {
|
|
211
|
+
var self = this;
|
|
212
|
+
return self['@wrapper'];
|
|
213
|
+
}
|
|
214
|
+
}),
|
|
215
|
+
smalltalk.HLWidget);
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
smalltalk.addMethod(
|
|
219
|
+
"_canBeOpenAsTab",
|
|
220
|
+
smalltalk.method({
|
|
221
|
+
selector: "canBeOpenAsTab",
|
|
222
|
+
fn: function () {
|
|
223
|
+
var self = this;
|
|
224
|
+
return false;
|
|
225
|
+
}
|
|
226
|
+
}),
|
|
227
|
+
smalltalk.HLWidget.klass);
|
|
228
|
+
|
|
229
|
+
smalltalk.addMethod(
|
|
230
|
+
"_openAsTab",
|
|
231
|
+
smalltalk.method({
|
|
232
|
+
selector: "openAsTab",
|
|
233
|
+
fn: function () {
|
|
234
|
+
var self = this;
|
|
235
|
+
smalltalk.send(smalltalk.send(smalltalk.HLManager || HLManager, "_current", []), "_addTab_", [smalltalk.send(smalltalk.HLTab || HLTab, "_on_labelled_", [smalltalk.send(self, "_new", []), smalltalk.send(self, "_tabLabel", [])])]);
|
|
236
|
+
return self;
|
|
237
|
+
}
|
|
238
|
+
}),
|
|
239
|
+
smalltalk.HLWidget.klass);
|
|
240
|
+
|
|
241
|
+
smalltalk.addMethod(
|
|
242
|
+
"_tabLabel",
|
|
243
|
+
smalltalk.method({
|
|
244
|
+
selector: "tabLabel",
|
|
245
|
+
fn: function () {
|
|
246
|
+
var self = this;
|
|
247
|
+
return "Tab";
|
|
248
|
+
}
|
|
249
|
+
}),
|
|
250
|
+
smalltalk.HLWidget.klass);
|
|
251
|
+
|
|
252
|
+
smalltalk.addMethod(
|
|
253
|
+
"_tabPriority",
|
|
254
|
+
smalltalk.method({
|
|
255
|
+
selector: "tabPriority",
|
|
256
|
+
fn: function () {
|
|
257
|
+
var self = this;
|
|
258
|
+
return 500;
|
|
259
|
+
}
|
|
260
|
+
}),
|
|
261
|
+
smalltalk.HLWidget.klass);
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
smalltalk.addClass('HLDebugger', smalltalk.HLWidget, [], 'Helios-Core');
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
smalltalk.addClass('HLFocusableWidget', smalltalk.HLWidget, ['hiddenInput'], 'Helios-Core');
|
|
268
|
+
smalltalk.addMethod(
|
|
269
|
+
"_blur",
|
|
270
|
+
smalltalk.method({
|
|
271
|
+
selector: "blur",
|
|
272
|
+
fn: function () {
|
|
273
|
+
var self = this;
|
|
274
|
+
smalltalk.send(smalltalk.send(self['@hiddenInput'], "_asJQuery", []), "_blur", []);
|
|
275
|
+
return self;
|
|
276
|
+
}
|
|
277
|
+
}),
|
|
278
|
+
smalltalk.HLFocusableWidget);
|
|
279
|
+
|
|
280
|
+
smalltalk.addMethod(
|
|
281
|
+
"_focus",
|
|
282
|
+
smalltalk.method({
|
|
283
|
+
selector: "focus",
|
|
284
|
+
fn: function () {
|
|
285
|
+
var self = this;
|
|
286
|
+
smalltalk.send(smalltalk.send(self['@hiddenInput'], "_asJQuery", []), "_focus", []);
|
|
287
|
+
return self;
|
|
288
|
+
}
|
|
289
|
+
}),
|
|
290
|
+
smalltalk.HLFocusableWidget);
|
|
291
|
+
|
|
292
|
+
smalltalk.addMethod(
|
|
293
|
+
"_focusClass",
|
|
294
|
+
smalltalk.method({
|
|
295
|
+
selector: "focusClass",
|
|
296
|
+
fn: function () {
|
|
297
|
+
var self = this;
|
|
298
|
+
return "focused";
|
|
299
|
+
}
|
|
300
|
+
}),
|
|
301
|
+
smalltalk.HLFocusableWidget);
|
|
302
|
+
|
|
303
|
+
smalltalk.addMethod(
|
|
304
|
+
"_hasFocus",
|
|
305
|
+
smalltalk.method({
|
|
306
|
+
selector: "hasFocus",
|
|
307
|
+
fn: function () {
|
|
308
|
+
var self = this;
|
|
309
|
+
var $1;
|
|
310
|
+
$1 = smalltalk.send(smalltalk.send(smalltalk.send(self, "_wrapper", []), "_notNil", []), "_and_", [function () {return smalltalk.send(smalltalk.send(smalltalk.send(self, "_wrapper", []), "_asJQuery", []), "_hasClass_", [smalltalk.send(self, "_focusClass", [])]);}]);
|
|
311
|
+
return $1;
|
|
312
|
+
}
|
|
313
|
+
}),
|
|
314
|
+
smalltalk.HLFocusableWidget);
|
|
315
|
+
|
|
316
|
+
smalltalk.addMethod(
|
|
317
|
+
"_renderContentOn_",
|
|
318
|
+
smalltalk.method({
|
|
319
|
+
selector: "renderContentOn:",
|
|
320
|
+
fn: function (html) {
|
|
321
|
+
var self = this;
|
|
322
|
+
return self;
|
|
323
|
+
}
|
|
324
|
+
}),
|
|
325
|
+
smalltalk.HLFocusableWidget);
|
|
326
|
+
|
|
327
|
+
smalltalk.addMethod(
|
|
328
|
+
"_renderHiddenInputOn_",
|
|
329
|
+
smalltalk.method({
|
|
330
|
+
selector: "renderHiddenInputOn:",
|
|
331
|
+
fn: function (html) {
|
|
332
|
+
var self = this;
|
|
333
|
+
var $1, $2;
|
|
334
|
+
$1 = smalltalk.send(html, "_input", []);
|
|
335
|
+
smalltalk.send($1, "_style_", ["position: absolute; left: -100000px;"]);
|
|
336
|
+
smalltalk.send($1, "_onBlur_", [function () {return smalltalk.send(smalltalk.send(smalltalk.send(self, "_wrapper", []), "_asJQuery", []), "_removeClass_", [smalltalk.send(self, "_focusClass", [])]);}]);
|
|
337
|
+
$2 = smalltalk.send($1, "_onFocus_", [function () {return smalltalk.send(smalltalk.send(smalltalk.send(self, "_wrapper", []), "_asJQuery", []), "_addClass_", [smalltalk.send(self, "_focusClass", [])]);}]);
|
|
338
|
+
self['@hiddenInput'] = $2;
|
|
339
|
+
return self;
|
|
340
|
+
}
|
|
341
|
+
}),
|
|
342
|
+
smalltalk.HLFocusableWidget);
|
|
343
|
+
|
|
344
|
+
smalltalk.addMethod(
|
|
345
|
+
"_renderOn_",
|
|
346
|
+
smalltalk.method({
|
|
347
|
+
selector: "renderOn:",
|
|
348
|
+
fn: function (html) {
|
|
349
|
+
var self = this;
|
|
350
|
+
var $1, $2;
|
|
351
|
+
smalltalk.send(self, "_registerBindings", []);
|
|
352
|
+
smalltalk.send(self, "_renderHiddenInputOn_", [html]);
|
|
353
|
+
$1 = smalltalk.send(html, "_div", []);
|
|
354
|
+
smalltalk.send($1, "_class_", ["hl_widget"]);
|
|
355
|
+
smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(smalltalk.send(self['@hiddenInput'], "_asJQuery", []), "_focus", []);}]);
|
|
356
|
+
$2 = smalltalk.send($1, "_with_", [function () {return smalltalk.send(self, "_renderContentOn_", [html]);}]);
|
|
357
|
+
self['@wrapper'] = $2;
|
|
358
|
+
return self;
|
|
359
|
+
}
|
|
360
|
+
}),
|
|
361
|
+
smalltalk.HLFocusableWidget);
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
smalltalk.addClass('HLListWidget', smalltalk.HLFocusableWidget, ['items', 'selectedItem'], 'Helios-Core');
|
|
366
|
+
smalltalk.addMethod(
|
|
367
|
+
"_activateFirstListItem",
|
|
368
|
+
smalltalk.method({
|
|
369
|
+
selector: "activateFirstListItem",
|
|
370
|
+
fn: function (){
|
|
371
|
+
var self=this;
|
|
372
|
+
smalltalk.send(self,"_activateListItem_",[smalltalk.send(window,"_jQuery_",[smalltalk.send(smalltalk.send(smalltalk.send(self["@wrapper"],"_asJQuery",[]),"_find_",["li"]),"_get_",[(0)])])]);
|
|
373
|
+
return self}
|
|
374
|
+
}),
|
|
375
|
+
smalltalk.HLListWidget);
|
|
376
|
+
|
|
377
|
+
smalltalk.addMethod(
|
|
378
|
+
"_activateListItem_",
|
|
379
|
+
smalltalk.method({
|
|
380
|
+
selector: "activateListItem:",
|
|
381
|
+
fn: function (aListItem) {
|
|
382
|
+
var self = this;
|
|
383
|
+
var $1, $2, $3;
|
|
384
|
+
var parent;
|
|
385
|
+
var position;
|
|
386
|
+
$1 = smalltalk.send(aListItem, "_get_", [0]);
|
|
387
|
+
if (($receiver = $1) == nil || $receiver == undefined) {
|
|
388
|
+
return self;
|
|
389
|
+
} else {
|
|
390
|
+
}
|
|
391
|
+
position = aListItem.parent().children().get().indexOf(aListItem.get(0)) + 1;
|
|
392
|
+
parent = smalltalk.send(aListItem, "_parent", []);
|
|
393
|
+
smalltalk.send(smalltalk.send(parent, "_children", []), "_removeClass_", ["active"]);
|
|
394
|
+
smalltalk.send(aListItem, "_addClass_", ["active"]);
|
|
395
|
+
$2 = smalltalk.send(smalltalk.send(smalltalk.send(aListItem, "_position", []), "_top", []), "__lt", [0]);
|
|
396
|
+
if (smalltalk.assert($2)) {
|
|
397
|
+
smalltalk.send(smalltalk.send(parent, "_get_", [0]), "_scrollTop_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(parent, "_get_", [0]), "_scrollTop", []), "__plus", [smalltalk.send(smalltalk.send(aListItem, "_position", []), "_top", [])]), "__minus", [10])]);
|
|
398
|
+
}
|
|
399
|
+
$3 = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aListItem, "_position", []), "_top", []), "__plus", [smalltalk.send(aListItem, "_height", [])]), "__gt", [smalltalk.send(parent, "_height", [])]);
|
|
400
|
+
if (smalltalk.assert($3)) {
|
|
401
|
+
smalltalk.send(smalltalk.send(parent, "_get_", [0]), "_scrollTop_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(parent, "_get_", [0]), "_scrollTop", []), "__plus", [smalltalk.send(aListItem, "_height", [])]), "__minus", [smalltalk.send(smalltalk.send(parent, "_height", []), "__minus", [smalltalk.send(smalltalk.send(aListItem, "_position", []), "_top", [])])]), "__plus", [10])]);
|
|
402
|
+
}
|
|
403
|
+
smalltalk.send(self, "_selectItem_", [smalltalk.send(smalltalk.send(self, "_items", []), "_at_", [smalltalk.send(smalltalk.send(aListItem, "_attr_", ["list-data"]), "_asNumber", [])])]);
|
|
404
|
+
return self;
|
|
405
|
+
}
|
|
406
|
+
}),
|
|
407
|
+
smalltalk.HLListWidget);
|
|
408
|
+
|
|
409
|
+
smalltalk.addMethod(
|
|
410
|
+
"_cssClassForItem_",
|
|
411
|
+
smalltalk.method({
|
|
412
|
+
selector: "cssClassForItem:",
|
|
413
|
+
fn: function (anObject) {
|
|
414
|
+
var self = this;
|
|
415
|
+
var $2, $1;
|
|
416
|
+
$2 = smalltalk.send(smalltalk.send(self, "_selectedItem", []), "__eq", [anObject]);
|
|
417
|
+
if (smalltalk.assert($2)) {
|
|
418
|
+
$1 = "active";
|
|
419
|
+
} else {
|
|
420
|
+
$1 = "inactive";
|
|
421
|
+
}
|
|
422
|
+
return $1;
|
|
423
|
+
}
|
|
424
|
+
}),
|
|
425
|
+
smalltalk.HLListWidget);
|
|
426
|
+
|
|
427
|
+
smalltalk.addMethod(
|
|
428
|
+
"_defaultItems",
|
|
429
|
+
smalltalk.method({
|
|
430
|
+
selector: "defaultItems",
|
|
431
|
+
fn: function () {
|
|
432
|
+
var self = this;
|
|
433
|
+
return [];
|
|
434
|
+
}
|
|
435
|
+
}),
|
|
436
|
+
smalltalk.HLListWidget);
|
|
437
|
+
|
|
438
|
+
smalltalk.addMethod(
|
|
439
|
+
"_focus",
|
|
440
|
+
smalltalk.method({
|
|
441
|
+
selector: "focus",
|
|
442
|
+
fn: function (){
|
|
443
|
+
var self=this;
|
|
444
|
+
var $1,$2;
|
|
445
|
+
smalltalk.send(self,"_focus",[],smalltalk.HLFocusableWidget);
|
|
446
|
+
$1=smalltalk.send(smalltalk.send(self,"_items",[]),"_isEmpty",[]);
|
|
447
|
+
if(! smalltalk.assert($1)){
|
|
448
|
+
$2=smalltalk.send(self,"_selectedItem",[]);
|
|
449
|
+
if(($receiver = $2) == nil || $receiver == undefined){
|
|
450
|
+
smalltalk.send(self,"_activateFirstListItem",[]);
|
|
451
|
+
} else {
|
|
452
|
+
$2;
|
|
453
|
+
};
|
|
454
|
+
};
|
|
455
|
+
return self}
|
|
456
|
+
}),
|
|
457
|
+
smalltalk.HLListWidget);
|
|
458
|
+
|
|
459
|
+
smalltalk.addMethod(
|
|
460
|
+
"_iconForItem_",
|
|
461
|
+
smalltalk.method({
|
|
462
|
+
selector: "iconForItem:",
|
|
463
|
+
fn: function (anObject) {
|
|
464
|
+
var self = this;
|
|
465
|
+
return "";
|
|
466
|
+
}
|
|
467
|
+
}),
|
|
468
|
+
smalltalk.HLListWidget);
|
|
469
|
+
|
|
470
|
+
smalltalk.addMethod(
|
|
471
|
+
"_items",
|
|
472
|
+
smalltalk.method({
|
|
473
|
+
selector: "items",
|
|
474
|
+
fn: function () {
|
|
475
|
+
var self = this;
|
|
476
|
+
var $1;
|
|
477
|
+
if (($receiver = self['@items']) == nil || $receiver == undefined) {
|
|
478
|
+
self['@items'] = smalltalk.send(self, "_defaultItems", []);
|
|
479
|
+
$1 = self['@items'];
|
|
480
|
+
} else {
|
|
481
|
+
$1 = self['@items'];
|
|
482
|
+
}
|
|
483
|
+
return $1;
|
|
484
|
+
}
|
|
485
|
+
}),
|
|
486
|
+
smalltalk.HLListWidget);
|
|
487
|
+
|
|
488
|
+
smalltalk.addMethod(
|
|
489
|
+
"_items_",
|
|
490
|
+
smalltalk.method({
|
|
491
|
+
selector: "items:",
|
|
492
|
+
fn: function (aCollection) {
|
|
493
|
+
var self = this;
|
|
494
|
+
self['@items'] = aCollection;
|
|
495
|
+
return self;
|
|
496
|
+
}
|
|
497
|
+
}),
|
|
498
|
+
smalltalk.HLListWidget);
|
|
499
|
+
|
|
500
|
+
smalltalk.addMethod(
|
|
501
|
+
"_renderButtonsOn_",
|
|
502
|
+
smalltalk.method({
|
|
503
|
+
selector: "renderButtonsOn:",
|
|
504
|
+
fn: function (html) {
|
|
505
|
+
var self = this;
|
|
506
|
+
return self;
|
|
507
|
+
}
|
|
508
|
+
}),
|
|
509
|
+
smalltalk.HLListWidget);
|
|
510
|
+
|
|
511
|
+
smalltalk.addMethod(
|
|
512
|
+
"_renderContentOn_",
|
|
513
|
+
smalltalk.method({
|
|
514
|
+
selector: "renderContentOn:",
|
|
515
|
+
fn: function (html) {
|
|
516
|
+
var self = this;
|
|
517
|
+
var $1, $2, $3, $4;
|
|
518
|
+
$1 = smalltalk.send(html, "_ul", []);
|
|
519
|
+
smalltalk.send($1, "_class_", ["nav nav-pills nav-stacked"]);
|
|
520
|
+
$2 = smalltalk.send($1, "_with_", [function () {return smalltalk.send(self, "_renderListOn_", [html]);}]);
|
|
521
|
+
$3 = smalltalk.send(html, "_div", []);
|
|
522
|
+
smalltalk.send($3, "_class_", ["pane_actions form-actions"]);
|
|
523
|
+
$4 = smalltalk.send($3, "_with_", [function () {return smalltalk.send(self, "_renderButtonsOn_", [html]);}]);
|
|
524
|
+
smalltalk.send(self, "_setupKeyBindings", []);
|
|
525
|
+
return self;
|
|
526
|
+
}
|
|
527
|
+
}),
|
|
528
|
+
smalltalk.HLListWidget);
|
|
529
|
+
|
|
530
|
+
smalltalk.addMethod(
|
|
531
|
+
"_renderItem_on_",
|
|
532
|
+
smalltalk.method({
|
|
533
|
+
selector: "renderItem:on:",
|
|
534
|
+
fn: function (anObject, html) {
|
|
535
|
+
var self = this;
|
|
536
|
+
var $2, $3, $1;
|
|
537
|
+
var li;
|
|
538
|
+
li = smalltalk.send(html, "_li", []);
|
|
539
|
+
smalltalk.send(li, "_class_", [smalltalk.send(self, "_cssClassForItem_", [anObject])]);
|
|
540
|
+
smalltalk.send(li, "_at_put_", ["list-data", smalltalk.send(smalltalk.send(smalltalk.send(self, "_items", []), "_indexOf_", [anObject]), "_asString", [])]);
|
|
541
|
+
$1 = smalltalk.send(li, "_with_", [function () {$2 = smalltalk.send(html, "_a", []);smalltalk.send($2, "_with_", [function () {smalltalk.send(smalltalk.send(html, "_tag_", ["i"]), "_class_", [smalltalk.send(self, "_iconForItem_", [anObject])]);return smalltalk.send(self, "_renderItemLabel_on_", [anObject, html]);}]);$3 = smalltalk.send($2, "_onClick_", [function () {return smalltalk.send(self, "_activateListItem_", [smalltalk.send(li, "_asJQuery", [])]);}]);return $3;}]);
|
|
542
|
+
return self;
|
|
543
|
+
}
|
|
544
|
+
}),
|
|
545
|
+
smalltalk.HLListWidget);
|
|
546
|
+
|
|
547
|
+
smalltalk.addMethod(
|
|
548
|
+
"_renderItemLabel_on_",
|
|
549
|
+
smalltalk.method({
|
|
550
|
+
selector: "renderItemLabel:on:",
|
|
551
|
+
fn: function (anObject, html) {
|
|
552
|
+
var self = this;
|
|
553
|
+
smalltalk.send(html, "_with_", [smalltalk.send(anObject, "_asString", [])]);
|
|
554
|
+
return self;
|
|
555
|
+
}
|
|
556
|
+
}),
|
|
557
|
+
smalltalk.HLListWidget);
|
|
558
|
+
|
|
559
|
+
smalltalk.addMethod(
|
|
560
|
+
"_renderListOn_",
|
|
561
|
+
smalltalk.method({
|
|
562
|
+
selector: "renderListOn:",
|
|
563
|
+
fn: function (html) {
|
|
564
|
+
var self = this;
|
|
565
|
+
smalltalk.send(smalltalk.send(self, "_items", []), "_do_", [function (each) {return smalltalk.send(self, "_renderItem_on_", [each, html]);}]);
|
|
566
|
+
return self;
|
|
567
|
+
}
|
|
568
|
+
}),
|
|
569
|
+
smalltalk.HLListWidget);
|
|
570
|
+
|
|
571
|
+
smalltalk.addMethod(
|
|
572
|
+
"_selectItem_",
|
|
573
|
+
smalltalk.method({
|
|
574
|
+
selector: "selectItem:",
|
|
575
|
+
fn: function (anObject) {
|
|
576
|
+
var self = this;
|
|
577
|
+
smalltalk.send(self, "_selectedItem_", [anObject]);
|
|
578
|
+
return self;
|
|
579
|
+
}
|
|
580
|
+
}),
|
|
581
|
+
smalltalk.HLListWidget);
|
|
582
|
+
|
|
583
|
+
smalltalk.addMethod(
|
|
584
|
+
"_selectedItem",
|
|
585
|
+
smalltalk.method({
|
|
586
|
+
selector: "selectedItem",
|
|
587
|
+
fn: function () {
|
|
588
|
+
var self = this;
|
|
589
|
+
return self['@selectedItem'];
|
|
590
|
+
}
|
|
591
|
+
}),
|
|
592
|
+
smalltalk.HLListWidget);
|
|
593
|
+
|
|
594
|
+
smalltalk.addMethod(
|
|
595
|
+
"_selectedItem_",
|
|
596
|
+
smalltalk.method({
|
|
597
|
+
selector: "selectedItem:",
|
|
598
|
+
fn: function (anObject) {
|
|
599
|
+
var self = this;
|
|
600
|
+
self['@selectedItem'] = anObject;
|
|
601
|
+
return self;
|
|
602
|
+
}
|
|
603
|
+
}),
|
|
604
|
+
smalltalk.HLListWidget);
|
|
605
|
+
|
|
606
|
+
smalltalk.addMethod(
|
|
607
|
+
"_setupKeyBindings",
|
|
608
|
+
smalltalk.method({
|
|
609
|
+
selector: "setupKeyBindings",
|
|
610
|
+
fn: function () {
|
|
611
|
+
var self = this;
|
|
612
|
+
var $1, $2, $3;
|
|
613
|
+
var next;
|
|
614
|
+
smalltalk.send(smalltalk.send(self['@hiddenInput'], "_asJQuery", []), "_unbind_", ["keydown"]);
|
|
615
|
+
smalltalk.send(smalltalk.send(self['@hiddenInput'], "_asJQuery", []), "_keydown_", [function (e) {var selected;selected = smalltalk.send(window, "_jQuery_", [".focused .nav-pills .active"]);$1 = smalltalk.send(smalltalk.send(e, "_which", []), "__eq", [38]);if (smalltalk.assert($1)) {smalltalk.send(self, "_activateListItem_", [smalltalk.send(selected, "_prev", [])]);}$2 = smalltalk.send(smalltalk.send(e, "_which", []), "__eq", [40]);if (smalltalk.assert($2)) {next = smalltalk.send(selected, "_next", []);next;$3 = smalltalk.send(next, "_get_", [0]);if (($receiver = $3) == nil || $receiver == undefined) {next = smalltalk.send(window, "_jQuery_", [".focused .nav-pills li:first-child"]);next;} else {$3;}return smalltalk.send(self, "_activateListItem_", [next]);}}]);
|
|
616
|
+
return self;
|
|
617
|
+
}
|
|
618
|
+
}),
|
|
619
|
+
smalltalk.HLListWidget);
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
smalltalk.addClass('HLNavigationListWidget', smalltalk.HLListWidget, ['previous', 'next'], 'Helios-Core');
|
|
624
|
+
smalltalk.addMethod(
|
|
625
|
+
"_next",
|
|
626
|
+
smalltalk.method({
|
|
627
|
+
selector: "next",
|
|
628
|
+
fn: function () {
|
|
629
|
+
var self = this;
|
|
630
|
+
return self['@next'];
|
|
631
|
+
}
|
|
632
|
+
}),
|
|
633
|
+
smalltalk.HLNavigationListWidget);
|
|
634
|
+
|
|
635
|
+
smalltalk.addMethod(
|
|
636
|
+
"_next_",
|
|
637
|
+
smalltalk.method({
|
|
638
|
+
selector: "next:",
|
|
639
|
+
fn: function (aWidget) {
|
|
640
|
+
var self = this;
|
|
641
|
+
var $1;
|
|
642
|
+
self['@next'] = aWidget;
|
|
643
|
+
$1 = smalltalk.send(smalltalk.send(aWidget, "_previous", []), "__eq", [self]);
|
|
644
|
+
if (!smalltalk.assert($1)) {
|
|
645
|
+
smalltalk.send(aWidget, "_previous_", [self]);
|
|
646
|
+
}
|
|
647
|
+
return self;
|
|
648
|
+
}
|
|
649
|
+
}),
|
|
650
|
+
smalltalk.HLNavigationListWidget);
|
|
651
|
+
|
|
652
|
+
smalltalk.addMethod(
|
|
653
|
+
"_nextFocus",
|
|
654
|
+
smalltalk.method({
|
|
655
|
+
selector: "nextFocus",
|
|
656
|
+
fn: function () {
|
|
657
|
+
var self = this;
|
|
658
|
+
var $1;
|
|
659
|
+
$1 = smalltalk.send(self, "_next", []);
|
|
660
|
+
if (($receiver = $1) == nil || $receiver == undefined) {
|
|
661
|
+
} else {
|
|
662
|
+
smalltalk.send(smalltalk.send(self, "_next", []), "_focus", []);
|
|
663
|
+
}
|
|
664
|
+
return self;
|
|
665
|
+
}
|
|
666
|
+
}),
|
|
667
|
+
smalltalk.HLNavigationListWidget);
|
|
668
|
+
|
|
669
|
+
smalltalk.addMethod(
|
|
670
|
+
"_previous",
|
|
671
|
+
smalltalk.method({
|
|
672
|
+
selector: "previous",
|
|
673
|
+
fn: function () {
|
|
674
|
+
var self = this;
|
|
675
|
+
return self['@previous'];
|
|
676
|
+
}
|
|
677
|
+
}),
|
|
678
|
+
smalltalk.HLNavigationListWidget);
|
|
679
|
+
|
|
680
|
+
smalltalk.addMethod(
|
|
681
|
+
"_previous_",
|
|
682
|
+
smalltalk.method({
|
|
683
|
+
selector: "previous:",
|
|
684
|
+
fn: function (aWidget) {
|
|
685
|
+
var self = this;
|
|
686
|
+
var $1;
|
|
687
|
+
self['@previous'] = aWidget;
|
|
688
|
+
$1 = smalltalk.send(smalltalk.send(aWidget, "_next", []), "__eq", [self]);
|
|
689
|
+
if (!smalltalk.assert($1)) {
|
|
690
|
+
smalltalk.send(aWidget, "_next_", [self]);
|
|
691
|
+
}
|
|
692
|
+
return self;
|
|
693
|
+
}
|
|
694
|
+
}),
|
|
695
|
+
smalltalk.HLNavigationListWidget);
|
|
696
|
+
|
|
697
|
+
smalltalk.addMethod(
|
|
698
|
+
"_previousFocus",
|
|
699
|
+
smalltalk.method({
|
|
700
|
+
selector: "previousFocus",
|
|
701
|
+
fn: function () {
|
|
702
|
+
var self = this;
|
|
703
|
+
var $1;
|
|
704
|
+
$1 = smalltalk.send(self, "_previous", []);
|
|
705
|
+
if (($receiver = $1) == nil || $receiver == undefined) {
|
|
706
|
+
} else {
|
|
707
|
+
smalltalk.send(smalltalk.send(self, "_previous", []), "_focus", []);
|
|
708
|
+
}
|
|
709
|
+
return self;
|
|
710
|
+
}
|
|
711
|
+
}),
|
|
712
|
+
smalltalk.HLNavigationListWidget);
|
|
713
|
+
|
|
714
|
+
smalltalk.addMethod(
|
|
715
|
+
"_setupKeyBindings",
|
|
716
|
+
smalltalk.method({
|
|
717
|
+
selector: "setupKeyBindings",
|
|
718
|
+
fn: function () {
|
|
719
|
+
var self = this;
|
|
720
|
+
var $1, $2;
|
|
721
|
+
smalltalk.send(self, "_setupKeyBindings", [], smalltalk.HLListWidget);
|
|
722
|
+
smalltalk.send(smalltalk.send(self['@hiddenInput'], "_asJQuery", []), "_keydown_", [function (e) {$1 = smalltalk.send(smalltalk.send(e, "_which", []), "__eq", [39]);if (smalltalk.assert($1)) {smalltalk.send(self, "_nextFocus", []);}$2 = smalltalk.send(smalltalk.send(e, "_which", []), "__eq", [37]);if (smalltalk.assert($2)) {return smalltalk.send(self, "_previousFocus", []);}}]);
|
|
723
|
+
return self;
|
|
724
|
+
}
|
|
725
|
+
}),
|
|
726
|
+
smalltalk.HLNavigationListWidget);
|
|
727
|
+
|
|
728
|
+
|
|
729
|
+
|
|
730
|
+
smalltalk.addClass('HLManager', smalltalk.HLWidget, ['tabs', 'activeTab', 'keyBinder', 'environment'], 'Helios-Core');
|
|
731
|
+
smalltalk.addMethod(
|
|
732
|
+
"_activate_",
|
|
733
|
+
smalltalk.method({
|
|
734
|
+
selector: "activate:",
|
|
735
|
+
fn: function (aTab) {
|
|
736
|
+
var self = this;
|
|
737
|
+
var $1;
|
|
738
|
+
smalltalk.send(smalltalk.send(self, "_keyBinder", []), "_flushBindings", []);
|
|
739
|
+
self['@activeTab'] = aTab;
|
|
740
|
+
smalltalk.send(self, "_refresh", []);
|
|
741
|
+
$1 = smalltalk.send(self, "_show_", [aTab]);
|
|
742
|
+
return self;
|
|
743
|
+
}
|
|
744
|
+
}),
|
|
745
|
+
smalltalk.HLManager);
|
|
746
|
+
|
|
747
|
+
smalltalk.addMethod(
|
|
748
|
+
"_activeTab",
|
|
749
|
+
smalltalk.method({
|
|
750
|
+
selector: "activeTab",
|
|
751
|
+
fn: function () {
|
|
752
|
+
var self = this;
|
|
753
|
+
return self['@activeTab'];
|
|
754
|
+
}
|
|
755
|
+
}),
|
|
756
|
+
smalltalk.HLManager);
|
|
757
|
+
|
|
758
|
+
smalltalk.addMethod(
|
|
759
|
+
"_addTab_",
|
|
760
|
+
smalltalk.method({
|
|
761
|
+
selector: "addTab:",
|
|
762
|
+
fn: function (aTab) {
|
|
763
|
+
var self = this;
|
|
764
|
+
smalltalk.send(smalltalk.send(self, "_tabs", []), "_add_", [aTab]);
|
|
765
|
+
smalltalk.send(self, "_activate_", [aTab]);
|
|
766
|
+
return self;
|
|
767
|
+
}
|
|
768
|
+
}),
|
|
769
|
+
smalltalk.HLManager);
|
|
770
|
+
|
|
771
|
+
smalltalk.addMethod(
|
|
772
|
+
"_defaultEnvironment",
|
|
773
|
+
smalltalk.method({
|
|
774
|
+
selector: "defaultEnvironment",
|
|
775
|
+
fn: function () {
|
|
776
|
+
var self = this;
|
|
777
|
+
var $1;
|
|
778
|
+
$1 = smalltalk.send(smalltalk.HLLocalEnvironment || HLLocalEnvironment, "_new", []);
|
|
779
|
+
return $1;
|
|
780
|
+
}
|
|
781
|
+
}),
|
|
782
|
+
smalltalk.HLManager);
|
|
783
|
+
|
|
784
|
+
smalltalk.addMethod(
|
|
785
|
+
"_environment",
|
|
786
|
+
smalltalk.method({
|
|
787
|
+
selector: "environment",
|
|
788
|
+
fn: function () {
|
|
789
|
+
var self = this;
|
|
790
|
+
var $1;
|
|
791
|
+
if (($receiver = self['@environment']) == nil || $receiver == undefined) {
|
|
792
|
+
self['@environment'] = smalltalk.send(self, "_defaultEnvironment", []);
|
|
793
|
+
$1 = self['@environment'];
|
|
794
|
+
} else {
|
|
795
|
+
$1 = self['@environment'];
|
|
796
|
+
}
|
|
797
|
+
return $1;
|
|
798
|
+
}
|
|
799
|
+
}),
|
|
800
|
+
smalltalk.HLManager);
|
|
801
|
+
|
|
802
|
+
smalltalk.addMethod(
|
|
803
|
+
"_environment_",
|
|
804
|
+
smalltalk.method({
|
|
805
|
+
selector: "environment:",
|
|
806
|
+
fn: function (anEnvironment) {
|
|
807
|
+
var self = this;
|
|
808
|
+
self['@environment'] = anEnvironment;
|
|
809
|
+
return self;
|
|
810
|
+
}
|
|
811
|
+
}),
|
|
812
|
+
smalltalk.HLManager);
|
|
813
|
+
|
|
814
|
+
smalltalk.addMethod(
|
|
815
|
+
"_initialize",
|
|
816
|
+
smalltalk.method({
|
|
817
|
+
selector: "initialize",
|
|
818
|
+
fn: function () {
|
|
819
|
+
var self = this;
|
|
820
|
+
smalltalk.send(self, "_initialize", [], smalltalk.HLWidget);
|
|
821
|
+
smalltalk.send(smalltalk.send(self, "_keyBinder", []), "_setupEvents", []);
|
|
822
|
+
return self;
|
|
823
|
+
}
|
|
824
|
+
}),
|
|
825
|
+
smalltalk.HLManager);
|
|
826
|
+
|
|
827
|
+
smalltalk.addMethod(
|
|
828
|
+
"_keyBinder",
|
|
829
|
+
smalltalk.method({
|
|
830
|
+
selector: "keyBinder",
|
|
831
|
+
fn: function () {
|
|
832
|
+
var self = this;
|
|
833
|
+
var $1;
|
|
834
|
+
if (($receiver = self['@keyBinder']) == nil || $receiver == undefined) {
|
|
835
|
+
self['@keyBinder'] = smalltalk.send(smalltalk.HLKeyBinder || HLKeyBinder, "_new", []);
|
|
836
|
+
$1 = self['@keyBinder'];
|
|
837
|
+
} else {
|
|
838
|
+
$1 = self['@keyBinder'];
|
|
839
|
+
}
|
|
840
|
+
return $1;
|
|
841
|
+
}
|
|
842
|
+
}),
|
|
843
|
+
smalltalk.HLManager);
|
|
844
|
+
|
|
845
|
+
smalltalk.addMethod(
|
|
846
|
+
"_refresh",
|
|
847
|
+
smalltalk.method({
|
|
848
|
+
selector: "refresh",
|
|
849
|
+
fn: function () {
|
|
850
|
+
var self = this;
|
|
851
|
+
smalltalk.send(smalltalk.send(window, "_jQuery_", [".navbar"]), "_remove", []);
|
|
852
|
+
smalltalk.send(smalltalk.send(window, "_jQuery_", ["#container"]), "_remove", []);
|
|
853
|
+
smalltalk.send(self, "_appendToJQuery_", [smalltalk.send("body", "_asJQuery", [])]);
|
|
854
|
+
return self;
|
|
855
|
+
}
|
|
856
|
+
}),
|
|
857
|
+
smalltalk.HLManager);
|
|
858
|
+
|
|
859
|
+
smalltalk.addMethod(
|
|
860
|
+
"_removeTab_",
|
|
861
|
+
smalltalk.method({
|
|
862
|
+
selector: "removeTab:",
|
|
863
|
+
fn: function (aTab) {
|
|
864
|
+
var self = this;
|
|
865
|
+
var $1;
|
|
866
|
+
$1 = smalltalk.send(smalltalk.send(self, "_tabs", []), "_includes_", [aTab]);
|
|
867
|
+
if (!smalltalk.assert($1)) {
|
|
868
|
+
return self;
|
|
869
|
+
}
|
|
870
|
+
smalltalk.send(smalltalk.send(self, "_tabs", []), "_remove_", [aTab]);
|
|
871
|
+
smalltalk.send(self, "_refresh", []);
|
|
872
|
+
return self;
|
|
873
|
+
}
|
|
874
|
+
}),
|
|
875
|
+
smalltalk.HLManager);
|
|
876
|
+
|
|
877
|
+
smalltalk.addMethod(
|
|
878
|
+
"_renderAddOn_",
|
|
879
|
+
smalltalk.method({
|
|
880
|
+
selector: "renderAddOn:",
|
|
881
|
+
fn: function (html) {
|
|
882
|
+
var self = this;
|
|
883
|
+
var $1, $3, $4, $5, $7, $8, $6, $2;
|
|
884
|
+
$1 = smalltalk.send(html, "_li", []);
|
|
885
|
+
smalltalk.send($1, "_class_", ["dropdown"]);
|
|
886
|
+
$2 = smalltalk.send($1, "_with_", [function () {$3 = smalltalk.send(html, "_a", []);smalltalk.send($3, "_class_", ["dropdown-toggle"]);smalltalk.send($3, "_at_put_", ["data-toggle", "dropdown"]);$4 = smalltalk.send($3, "_with_", [function () {smalltalk.send(html, "_with_", ["Open..."]);return smalltalk.send(smalltalk.send(html, "_tag_", ["b"]), "_class_", ["caret"]);}]);$4;$5 = smalltalk.send(html, "_ul", []);smalltalk.send($5, "_class_", ["dropdown-menu"]);$6 = smalltalk.send($5, "_with_", [function () {return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.HLWidget || HLWidget, "_withAllSubclasses", []), "_select_", [function (each) {return smalltalk.send(each, "_canBeOpenAsTab", []);}]), "_sorted_", [function (a, b) {return smalltalk.send(smalltalk.send(a, "_tabPriority", []), "__lt", [smalltalk.send(b, "_tabPriority", [])]);}]), "_do_", [function (each) {return smalltalk.send(smalltalk.send(html, "_li", []), "_with_", [function () {$7 = smalltalk.send(html, "_a", []);smalltalk.send($7, "_with_", [smalltalk.send(each, "_tabLabel", [])]);$8 = smalltalk.send($7, "_onClick_", [function () {return smalltalk.send(each, "_openAsTab", []);}]);return $8;}]);}]);}]);return $6;}]);
|
|
887
|
+
return self;
|
|
888
|
+
}
|
|
889
|
+
}),
|
|
890
|
+
smalltalk.HLManager);
|
|
891
|
+
|
|
892
|
+
smalltalk.addMethod(
|
|
893
|
+
"_renderContentOn_",
|
|
894
|
+
smalltalk.method({
|
|
895
|
+
selector: "renderContentOn:",
|
|
896
|
+
fn: function (html) {
|
|
897
|
+
var self = this;
|
|
898
|
+
var $1, $3, $4, $2;
|
|
899
|
+
$1 = smalltalk.send(html, "_div", []);
|
|
900
|
+
smalltalk.send($1, "_class_", ["navbar navbar-fixed-top"]);
|
|
901
|
+
$2 = smalltalk.send($1, "_with_", [function () {$3 = smalltalk.send(html, "_div", []);smalltalk.send($3, "_class_", ["navbar-inner"]);$4 = smalltalk.send($3, "_with_", [function () {return smalltalk.send(self, "_renderTabsOn_", [html]);}]);return $4;}]);
|
|
902
|
+
smalltalk.send(smalltalk.send(html, "_div", []), "_id_", ["container"]);
|
|
903
|
+
return self;
|
|
904
|
+
}
|
|
905
|
+
}),
|
|
906
|
+
smalltalk.HLManager);
|
|
907
|
+
|
|
908
|
+
smalltalk.addMethod(
|
|
909
|
+
"_renderTabsOn_",
|
|
910
|
+
smalltalk.method({
|
|
911
|
+
selector: "renderTabsOn:",
|
|
912
|
+
fn: function (html) {
|
|
913
|
+
var self = this;
|
|
914
|
+
var $1, $3, $5, $4, $7, $8, $6, $2;
|
|
915
|
+
$1 = smalltalk.send(html, "_ul", []);
|
|
916
|
+
smalltalk.send($1, "_class_", ["nav"]);
|
|
917
|
+
$2 = smalltalk.send($1, "_with_", [function () {smalltalk.send(smalltalk.send(self, "_tabs", []), "_do_", [function (each) {$3 = smalltalk.send(html, "_li", []);$5 = smalltalk.send(each, "_isActive", []);if (smalltalk.assert($5)) {$4 = "active";} else {$4 = "inactive";}smalltalk.send($3, "_class_", [$4]);$6 = smalltalk.send($3, "_with_", [function () {$7 = smalltalk.send(html, "_a", []);smalltalk.send($7, "_with_", [function () {smalltalk.send(smalltalk.send(smalltalk.send(html, "_tag_", ["i"]), "_class_", ["icon-remove-circle"]), "_onClick_", [function () {return smalltalk.send(self, "_removeTab_", [each]);}]);return smalltalk.send(html, "_with_", [smalltalk.send(each, "_label", [])]);}]);$8 = smalltalk.send($7, "_onClick_", [function () {return smalltalk.send(each, "_activate", []);}]);return $8;}]);return $6;}]);return smalltalk.send(self, "_renderAddOn_", [html]);}]);
|
|
918
|
+
return self;
|
|
919
|
+
}
|
|
920
|
+
}),
|
|
921
|
+
smalltalk.HLManager);
|
|
922
|
+
|
|
923
|
+
smalltalk.addMethod(
|
|
924
|
+
"_show_",
|
|
925
|
+
smalltalk.method({
|
|
926
|
+
selector: "show:",
|
|
927
|
+
fn: function (aTab) {
|
|
928
|
+
var self = this;
|
|
929
|
+
smalltalk.send(smalltalk.send(window, "_jQuery_", ["#container"]), "_empty", []);
|
|
930
|
+
smalltalk.send(smalltalk.send(aTab, "_widget", []), "_appendToJQuery_", [smalltalk.send("#container", "_asJQuery", [])]);
|
|
931
|
+
return self;
|
|
932
|
+
}
|
|
933
|
+
}),
|
|
934
|
+
smalltalk.HLManager);
|
|
935
|
+
|
|
936
|
+
smalltalk.addMethod(
|
|
937
|
+
"_tabs",
|
|
938
|
+
smalltalk.method({
|
|
939
|
+
selector: "tabs",
|
|
940
|
+
fn: function () {
|
|
941
|
+
var self = this;
|
|
942
|
+
var $1;
|
|
943
|
+
if (($receiver = self['@tabs']) == nil || $receiver == undefined) {
|
|
944
|
+
self['@tabs'] = smalltalk.send(smalltalk.OrderedCollection || OrderedCollection, "_new", []);
|
|
945
|
+
$1 = self['@tabs'];
|
|
946
|
+
} else {
|
|
947
|
+
$1 = self['@tabs'];
|
|
948
|
+
}
|
|
949
|
+
return $1;
|
|
950
|
+
}
|
|
951
|
+
}),
|
|
952
|
+
smalltalk.HLManager);
|
|
953
|
+
|
|
954
|
+
|
|
955
|
+
smalltalk.HLManager.klass.iVarNames = ['current'];
|
|
956
|
+
smalltalk.addMethod(
|
|
957
|
+
"_current",
|
|
958
|
+
smalltalk.method({
|
|
959
|
+
selector: "current",
|
|
960
|
+
fn: function () {
|
|
961
|
+
var self = this;
|
|
962
|
+
var $1;
|
|
963
|
+
if (($receiver = self['@current']) == nil || $receiver == undefined) {
|
|
964
|
+
self['@current'] = smalltalk.send(smalltalk.send(self, "_basicNew", []), "_initialize", []);
|
|
965
|
+
$1 = self['@current'];
|
|
966
|
+
} else {
|
|
967
|
+
$1 = self['@current'];
|
|
968
|
+
}
|
|
969
|
+
return $1;
|
|
970
|
+
}
|
|
971
|
+
}),
|
|
972
|
+
smalltalk.HLManager.klass);
|
|
973
|
+
|
|
974
|
+
smalltalk.addMethod(
|
|
975
|
+
"_initialize",
|
|
976
|
+
smalltalk.method({
|
|
977
|
+
selector: "initialize",
|
|
978
|
+
fn: function () {
|
|
979
|
+
var self = this;
|
|
980
|
+
smalltalk.send(smalltalk.send(self, "_current", []), "_appendToJQuery_", [smalltalk.send("body", "_asJQuery", [])]);
|
|
981
|
+
return self;
|
|
982
|
+
}
|
|
983
|
+
}),
|
|
984
|
+
smalltalk.HLManager.klass);
|
|
985
|
+
|
|
986
|
+
smalltalk.addMethod(
|
|
987
|
+
"_new",
|
|
988
|
+
smalltalk.method({
|
|
989
|
+
selector: "new",
|
|
990
|
+
fn: function () {
|
|
991
|
+
var self = this;
|
|
992
|
+
smalltalk.send(self, "_shouldNotImplement", []);
|
|
993
|
+
return self;
|
|
994
|
+
}
|
|
995
|
+
}),
|
|
996
|
+
smalltalk.HLManager.klass);
|
|
997
|
+
|
|
998
|
+
|
|
999
|
+
smalltalk.addClass('HLSUnit', smalltalk.HLWidget, [], 'Helios-Core');
|
|
1000
|
+
|
|
1001
|
+
smalltalk.addMethod(
|
|
1002
|
+
"_canBeOpenAsTab",
|
|
1003
|
+
smalltalk.method({
|
|
1004
|
+
selector: "canBeOpenAsTab",
|
|
1005
|
+
fn: function () {
|
|
1006
|
+
var self = this;
|
|
1007
|
+
return true;
|
|
1008
|
+
}
|
|
1009
|
+
}),
|
|
1010
|
+
smalltalk.HLSUnit.klass);
|
|
1011
|
+
|
|
1012
|
+
smalltalk.addMethod(
|
|
1013
|
+
"_tabLabel",
|
|
1014
|
+
smalltalk.method({
|
|
1015
|
+
selector: "tabLabel",
|
|
1016
|
+
fn: function () {
|
|
1017
|
+
var self = this;
|
|
1018
|
+
return "SUnit";
|
|
1019
|
+
}
|
|
1020
|
+
}),
|
|
1021
|
+
smalltalk.HLSUnit.klass);
|
|
1022
|
+
|
|
1023
|
+
smalltalk.addMethod(
|
|
1024
|
+
"_tabPriority",
|
|
1025
|
+
smalltalk.method({
|
|
1026
|
+
selector: "tabPriority",
|
|
1027
|
+
fn: function () {
|
|
1028
|
+
var self = this;
|
|
1029
|
+
return 1000;
|
|
1030
|
+
}
|
|
1031
|
+
}),
|
|
1032
|
+
smalltalk.HLSUnit.klass);
|
|
1033
|
+
|
|
1034
|
+
|
|
1035
|
+
smalltalk.addClass('HLTranscript', smalltalk.HLWidget, [], 'Helios-Core');
|
|
1036
|
+
|
|
1037
|
+
smalltalk.addMethod(
|
|
1038
|
+
"_canBeOpenAsTab",
|
|
1039
|
+
smalltalk.method({
|
|
1040
|
+
selector: "canBeOpenAsTab",
|
|
1041
|
+
fn: function () {
|
|
1042
|
+
var self = this;
|
|
1043
|
+
return true;
|
|
1044
|
+
}
|
|
1045
|
+
}),
|
|
1046
|
+
smalltalk.HLTranscript.klass);
|
|
1047
|
+
|
|
1048
|
+
smalltalk.addMethod(
|
|
1049
|
+
"_tabLabel",
|
|
1050
|
+
smalltalk.method({
|
|
1051
|
+
selector: "tabLabel",
|
|
1052
|
+
fn: function () {
|
|
1053
|
+
var self = this;
|
|
1054
|
+
return "Transcript";
|
|
1055
|
+
}
|
|
1056
|
+
}),
|
|
1057
|
+
smalltalk.HLTranscript.klass);
|
|
1058
|
+
|
|
1059
|
+
smalltalk.addMethod(
|
|
1060
|
+
"_tabPriority",
|
|
1061
|
+
smalltalk.method({
|
|
1062
|
+
selector: "tabPriority",
|
|
1063
|
+
fn: function () {
|
|
1064
|
+
var self = this;
|
|
1065
|
+
return 600;
|
|
1066
|
+
}
|
|
1067
|
+
}),
|
|
1068
|
+
smalltalk.HLTranscript.klass);
|
|
1069
|
+
|
|
1070
|
+
|