Helios-Core.deploy.js 53 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563
  1. smalltalk.addPackage('Helios-Core');
  2. smalltalk.addClass('HLTab', smalltalk.Widget, ['widget', 'label', 'root'], 'Helios-Core');
  3. smalltalk.addMethod(
  4. "_activate",
  5. smalltalk.method({
  6. selector: "activate",
  7. fn: function () {
  8. var self=this;
  9. return smalltalk.withContext(function($ctx1) { _st(_st(self)._manager())._activate_(self);
  10. return self}, function($ctx1) {$ctx1.fill(self,"activate",{},smalltalk.HLTab)});},
  11. messageSends: ["activate:", "manager"]}),
  12. smalltalk.HLTab);
  13. smalltalk.addMethod(
  14. "_add",
  15. smalltalk.method({
  16. selector: "add",
  17. fn: function () {
  18. var self=this;
  19. return smalltalk.withContext(function($ctx1) { _st(_st(self)._manager())._addTab_(self);
  20. return self}, function($ctx1) {$ctx1.fill(self,"add",{},smalltalk.HLTab)});},
  21. messageSends: ["addTab:", "manager"]}),
  22. smalltalk.HLTab);
  23. smalltalk.addMethod(
  24. "_displayLabel",
  25. smalltalk.method({
  26. selector: "displayLabel",
  27. fn: function () {
  28. var self=this;
  29. return smalltalk.withContext(function($ctx1) { var $2,$1;
  30. $2=_st(_st(_st(self)._label())._size()).__gt((20));
  31. if(smalltalk.assert($2)){
  32. $1=_st(_st(_st(self)._label())._first_((20))).__comma("...");
  33. } else {
  34. $1=_st(self)._label();
  35. };
  36. return $1;
  37. }, function($ctx1) {$ctx1.fill(self,"displayLabel",{},smalltalk.HLTab)});},
  38. messageSends: ["ifTrue:ifFalse:", ",", "first:", "label", ">", "size"]}),
  39. smalltalk.HLTab);
  40. smalltalk.addMethod(
  41. "_focus",
  42. smalltalk.method({
  43. selector: "focus",
  44. fn: function () {
  45. var self=this;
  46. return smalltalk.withContext(function($ctx1) { var $1;
  47. $1=_st(_st(self)._widget())._canHaveFocus();
  48. if(smalltalk.assert($1)){
  49. _st(_st(self)._widget())._focus();
  50. };
  51. return self}, function($ctx1) {$ctx1.fill(self,"focus",{},smalltalk.HLTab)});},
  52. messageSends: ["ifTrue:", "focus", "widget", "canHaveFocus"]}),
  53. smalltalk.HLTab);
  54. smalltalk.addMethod(
  55. "_hide",
  56. smalltalk.method({
  57. selector: "hide",
  58. fn: function () {
  59. var self=this;
  60. return smalltalk.withContext(function($ctx1) { var $1;
  61. $1=self["@root"];
  62. if(($receiver = $1) == nil || $receiver == undefined){
  63. $1;
  64. } else {
  65. _st(_st(self["@root"])._asJQuery())._hide();
  66. };
  67. return self}, function($ctx1) {$ctx1.fill(self,"hide",{},smalltalk.HLTab)});},
  68. messageSends: ["ifNotNil:", "hide", "asJQuery"]}),
  69. smalltalk.HLTab);
  70. smalltalk.addMethod(
  71. "_isActive",
  72. smalltalk.method({
  73. selector: "isActive",
  74. fn: function () {
  75. var self=this;
  76. return smalltalk.withContext(function($ctx1) { var $1;
  77. $1=_st(_st(_st(self)._manager())._activeTab()).__eq(self);
  78. return $1;
  79. }, function($ctx1) {$ctx1.fill(self,"isActive",{},smalltalk.HLTab)});},
  80. messageSends: ["=", "activeTab", "manager"]}),
  81. smalltalk.HLTab);
  82. smalltalk.addMethod(
  83. "_label",
  84. smalltalk.method({
  85. selector: "label",
  86. fn: function () {
  87. var self=this;
  88. return smalltalk.withContext(function($ctx1) { var $2,$1;
  89. $2=self["@label"];
  90. if(($receiver = $2) == nil || $receiver == undefined){
  91. $1="";
  92. } else {
  93. $1=$2;
  94. };
  95. return $1;
  96. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLTab)});},
  97. messageSends: ["ifNil:"]}),
  98. smalltalk.HLTab);
  99. smalltalk.addMethod(
  100. "_label_",
  101. smalltalk.method({
  102. selector: "label:",
  103. fn: function (aString) {
  104. var self=this;
  105. return smalltalk.withContext(function($ctx1) { self["@label"]=aString;
  106. return self}, function($ctx1) {$ctx1.fill(self,"label:",{aString:aString},smalltalk.HLTab)});},
  107. messageSends: []}),
  108. smalltalk.HLTab);
  109. smalltalk.addMethod(
  110. "_manager",
  111. smalltalk.method({
  112. selector: "manager",
  113. fn: function () {
  114. var self=this;
  115. return smalltalk.withContext(function($ctx1) { var $1;
  116. $1=_st((smalltalk.HLManager || HLManager))._current();
  117. return $1;
  118. }, function($ctx1) {$ctx1.fill(self,"manager",{},smalltalk.HLTab)});},
  119. messageSends: ["current"]}),
  120. smalltalk.HLTab);
  121. smalltalk.addMethod(
  122. "_registerBindings",
  123. smalltalk.method({
  124. selector: "registerBindings",
  125. fn: function () {
  126. var self=this;
  127. return smalltalk.withContext(function($ctx1) { _st(_st(self)._widget())._registerBindings();
  128. return self}, function($ctx1) {$ctx1.fill(self,"registerBindings",{},smalltalk.HLTab)});},
  129. messageSends: ["registerBindings", "widget"]}),
  130. smalltalk.HLTab);
  131. smalltalk.addMethod(
  132. "_remove",
  133. smalltalk.method({
  134. selector: "remove",
  135. fn: function () {
  136. var self=this;
  137. return smalltalk.withContext(function($ctx1) { var $1;
  138. $1=self["@root"];
  139. if(($receiver = $1) == nil || $receiver == undefined){
  140. $1;
  141. } else {
  142. _st(_st(self["@root"])._asJQuery())._remove();
  143. };
  144. return self}, function($ctx1) {$ctx1.fill(self,"remove",{},smalltalk.HLTab)});},
  145. messageSends: ["ifNotNil:", "remove", "asJQuery"]}),
  146. smalltalk.HLTab);
  147. smalltalk.addMethod(
  148. "_renderOn_",
  149. smalltalk.method({
  150. selector: "renderOn:",
  151. fn: function (html) {
  152. var self=this;
  153. return smalltalk.withContext(function($ctx1) { var $1,$2;
  154. $1=_st(html)._div();
  155. _st($1)._class_("tab");
  156. $2=_st($1)._yourself();
  157. self["@root"]=$2;
  158. _st(self)._renderTab();
  159. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.HLTab)});},
  160. messageSends: ["class:", "div", "yourself", "renderTab"]}),
  161. smalltalk.HLTab);
  162. smalltalk.addMethod(
  163. "_renderTab",
  164. smalltalk.method({
  165. selector: "renderTab",
  166. fn: function () {
  167. var self=this;
  168. return smalltalk.withContext(function($ctx1) { var $1,$2;
  169. _st(self["@root"])._contents_((function(html){
  170. return smalltalk.withContext(function($ctx2) { $1=_st(html)._div();
  171. _st($1)._class_("amber_box");
  172. $2=_st($1)._with_((function(){
  173. return smalltalk.withContext(function($ctx3) { return _st(_st(self)._widget())._renderOn_(html);
  174. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  175. return $2;
  176. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  177. return self}, function($ctx1) {$ctx1.fill(self,"renderTab",{},smalltalk.HLTab)});},
  178. messageSends: ["contents:", "class:", "div", "with:", "renderOn:", "widget"]}),
  179. smalltalk.HLTab);
  180. smalltalk.addMethod(
  181. "_show",
  182. smalltalk.method({
  183. selector: "show",
  184. fn: function () {
  185. var self=this;
  186. return smalltalk.withContext(function($ctx1) { var $1;
  187. $1=self["@root"];
  188. if(($receiver = $1) == nil || $receiver == undefined){
  189. _st(self)._appendToJQuery_(_st("body")._asJQuery());
  190. } else {
  191. _st(_st(self["@root"])._asJQuery())._show();
  192. };
  193. return self}, function($ctx1) {$ctx1.fill(self,"show",{},smalltalk.HLTab)});},
  194. messageSends: ["ifNil:ifNotNil:", "appendToJQuery:", "asJQuery", "show"]}),
  195. smalltalk.HLTab);
  196. smalltalk.addMethod(
  197. "_widget",
  198. smalltalk.method({
  199. selector: "widget",
  200. fn: function () {
  201. var self=this;
  202. return smalltalk.withContext(function($ctx1) { var $1;
  203. $1=self["@widget"];
  204. return $1;
  205. }, function($ctx1) {$ctx1.fill(self,"widget",{},smalltalk.HLTab)});},
  206. messageSends: []}),
  207. smalltalk.HLTab);
  208. smalltalk.addMethod(
  209. "_widget_",
  210. smalltalk.method({
  211. selector: "widget:",
  212. fn: function (aWidget) {
  213. var self=this;
  214. return smalltalk.withContext(function($ctx1) { self["@widget"]=aWidget;
  215. return self}, function($ctx1) {$ctx1.fill(self,"widget:",{aWidget:aWidget},smalltalk.HLTab)});},
  216. messageSends: []}),
  217. smalltalk.HLTab);
  218. smalltalk.addMethod(
  219. "_on_labelled_",
  220. smalltalk.method({
  221. selector: "on:labelled:",
  222. fn: function (aWidget, aString) {
  223. var self=this;
  224. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  225. $2=_st(self)._new();
  226. _st($2)._widget_(aWidget);
  227. _st($2)._label_(aString);
  228. $3=_st($2)._yourself();
  229. $1=$3;
  230. return $1;
  231. }, function($ctx1) {$ctx1.fill(self,"on:labelled:",{aWidget:aWidget,aString:aString},smalltalk.HLTab.klass)});},
  232. messageSends: ["widget:", "new", "label:", "yourself"]}),
  233. smalltalk.HLTab.klass);
  234. smalltalk.addClass('HLWidget', smalltalk.Widget, ['wrapper'], 'Helios-Core');
  235. smalltalk.addMethod(
  236. "_alert_",
  237. smalltalk.method({
  238. selector: "alert:",
  239. fn: function (aString) {
  240. var self=this;
  241. return smalltalk.withContext(function($ctx1) { _st(window)._alert_(aString);
  242. return self}, function($ctx1) {$ctx1.fill(self,"alert:",{aString:aString}, smalltalk.HLWidget)});},
  243. messageSends: ["alert:"]}),
  244. smalltalk.HLWidget);
  245. smalltalk.addMethod(
  246. "_canHaveFocus",
  247. smalltalk.method({
  248. selector: "canHaveFocus",
  249. fn: function () {
  250. var self=this;
  251. return smalltalk.withContext(function($ctx1) { return false;
  252. }, function($ctx1) {$ctx1.fill(self,"canHaveFocus",{},smalltalk.HLWidget)});},
  253. messageSends: []}),
  254. smalltalk.HLWidget);
  255. smalltalk.addMethod(
  256. "_confirm_",
  257. smalltalk.method({
  258. selector: "confirm:",
  259. fn: function (aString) {
  260. var self=this;
  261. return smalltalk.withContext(function($ctx1) { var $1;
  262. $1=_st(window)._confirm_(aString);
  263. return $1;
  264. }, function($ctx1) {$ctx1.fill(self,"confirm:",{aString:aString}, smalltalk.HLWidget)});},
  265. messageSends: ["confirm:"]}),
  266. smalltalk.HLWidget);
  267. smalltalk.addMethod(
  268. "_execute_",
  269. smalltalk.method({
  270. selector: "execute:",
  271. fn: function (aCommand){
  272. var self=this;
  273. function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  274. return smalltalk.withContext(function($ctx1) {
  275. var $1,$2;
  276. $1=_st(_st($HLManager())._current())._keyBinder();
  277. _st($1)._activate();
  278. $2=_st($1)._applyBinding_(_st(aCommand)._asBinding());
  279. return self}, function($ctx1) {$ctx1.fill(self,"execute:",{aCommand:aCommand},smalltalk.HLWidget)})},
  280. messageSends: ["activate", "keyBinder", "current", "applyBinding:", "asBinding"]}),
  281. smalltalk.HLWidget);
  282. smalltalk.addMethod(
  283. "_manager",
  284. smalltalk.method({
  285. selector: "manager",
  286. fn: function () {
  287. var self=this;
  288. return smalltalk.withContext(function($ctx1) { var $1;
  289. $1=_st((smalltalk.HLManager || HLManager))._current();
  290. return $1;
  291. }, function($ctx1) {$ctx1.fill(self,"manager",{}, smalltalk.HLWidget)});},
  292. messageSends: ["current"]}),
  293. smalltalk.HLWidget);
  294. smalltalk.addMethod(
  295. "_refresh",
  296. smalltalk.method({
  297. selector: "refresh",
  298. fn: function () {
  299. var self=this;
  300. return smalltalk.withContext(function($ctx1) { var $1,$2;
  301. $1=_st(self)._wrapper();
  302. if(($receiver = $1) == nil || $receiver == undefined){
  303. $2=self;
  304. return $2;
  305. } else {
  306. $1;
  307. };
  308. _st(_st(_st(self)._wrapper())._asJQuery())._empty();
  309. _st((function(html){
  310. return smalltalk.withContext(function($ctx2) { return _st(self)._renderContentOn_(html);
  311. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}))._appendToJQuery_(_st(_st(self)._wrapper())._asJQuery());
  312. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{}, smalltalk.HLWidget)});},
  313. messageSends: ["ifNil:", "wrapper", "empty", "asJQuery", "appendToJQuery:", "renderContentOn:"]}),
  314. smalltalk.HLWidget);
  315. smalltalk.addMethod(
  316. "_registerBindings",
  317. smalltalk.method({
  318. selector: "registerBindings",
  319. fn: function () {
  320. var self=this;
  321. return smalltalk.withContext(function($ctx1) { _st(self)._registerBindingsOn_(_st(_st(_st(self)._manager())._keyBinder())._bindings());
  322. return self}, function($ctx1) {$ctx1.fill(self,"registerBindings",{}, smalltalk.HLWidget)});},
  323. messageSends: ["registerBindingsOn:", "bindings", "keyBinder", "manager"]}),
  324. smalltalk.HLWidget);
  325. smalltalk.addMethod(
  326. "_registerBindingsOn_",
  327. smalltalk.method({
  328. selector: "registerBindingsOn:",
  329. fn: function (aBindingGroup) {
  330. var self=this;
  331. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"registerBindingsOn:",{aBindingGroup:aBindingGroup}, smalltalk.HLWidget)});},
  332. messageSends: []}),
  333. smalltalk.HLWidget);
  334. smalltalk.addMethod(
  335. "_renderContentOn_",
  336. smalltalk.method({
  337. selector: "renderContentOn:",
  338. fn: function (html) {
  339. var self=this;
  340. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLWidget)});},
  341. messageSends: []}),
  342. smalltalk.HLWidget);
  343. smalltalk.addMethod(
  344. "_renderOn_",
  345. smalltalk.method({
  346. selector: "renderOn:",
  347. fn: function (html) {
  348. var self=this;
  349. return smalltalk.withContext(function($ctx1) { self["@wrapper"]=_st(html)._div();
  350. _st((function(renderer){
  351. return smalltalk.withContext(function($ctx2) { return _st(self)._renderContentOn_(renderer);
  352. }, function($ctx2) {$ctx2.fillBlock({renderer:renderer},$ctx1)})}))._appendToJQuery_(_st(self["@wrapper"])._asJQuery());
  353. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.HLWidget)});},
  354. messageSends: ["div", "appendToJQuery:", "asJQuery", "renderContentOn:"]}),
  355. smalltalk.HLWidget);
  356. smalltalk.addMethod(
  357. "_wrapper",
  358. smalltalk.method({
  359. selector: "wrapper",
  360. fn: function () {
  361. var self=this;
  362. return smalltalk.withContext(function($ctx1) { var $1;
  363. $1=self["@wrapper"];
  364. return $1;
  365. }, function($ctx1) {$ctx1.fill(self,"wrapper",{}, smalltalk.HLWidget)});},
  366. messageSends: []}),
  367. smalltalk.HLWidget);
  368. smalltalk.addMethod(
  369. "_canBeOpenAsTab",
  370. smalltalk.method({
  371. selector: "canBeOpenAsTab",
  372. fn: function () {
  373. var self=this;
  374. return smalltalk.withContext(function($ctx1) { return false;
  375. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{}, smalltalk.HLWidget.klass)});},
  376. messageSends: []}),
  377. smalltalk.HLWidget.klass);
  378. smalltalk.addMethod(
  379. "_openAsTab",
  380. smalltalk.method({
  381. selector: "openAsTab",
  382. fn: function () {
  383. var self=this;
  384. return smalltalk.withContext(function($ctx1) { var $1,$2;
  385. $1=_st(self)._canBeOpenAsTab();
  386. if(! smalltalk.assert($1)){
  387. $2=self;
  388. return $2;
  389. };
  390. _st(_st((smalltalk.HLManager || HLManager))._current())._addTab_(_st((smalltalk.HLTab || HLTab))._on_labelled_(_st(self)._new(),_st(self)._tabLabel()));
  391. return self}, function($ctx1) {$ctx1.fill(self,"openAsTab",{}, smalltalk.HLWidget.klass)});},
  392. messageSends: ["ifFalse:", "canBeOpenAsTab", "addTab:", "on:labelled:", "new", "tabLabel", "current"]}),
  393. smalltalk.HLWidget.klass);
  394. smalltalk.addMethod(
  395. "_tabLabel",
  396. smalltalk.method({
  397. selector: "tabLabel",
  398. fn: function () {
  399. var self=this;
  400. return smalltalk.withContext(function($ctx1) { return "Tab";
  401. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{}, smalltalk.HLWidget.klass)});},
  402. messageSends: []}),
  403. smalltalk.HLWidget.klass);
  404. smalltalk.addMethod(
  405. "_tabPriority",
  406. smalltalk.method({
  407. selector: "tabPriority",
  408. fn: function () {
  409. var self=this;
  410. return smalltalk.withContext(function($ctx1) { return (500);
  411. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{}, smalltalk.HLWidget.klass)});},
  412. messageSends: []}),
  413. smalltalk.HLWidget.klass);
  414. smalltalk.addClass('HLDebugger', smalltalk.HLWidget, [], 'Helios-Core');
  415. smalltalk.addClass('HLFocusableWidget', smalltalk.HLWidget, ['hiddenInput'], 'Helios-Core');
  416. smalltalk.addMethod(
  417. "_blur",
  418. smalltalk.method({
  419. selector: "blur",
  420. fn: function () {
  421. var self=this;
  422. return smalltalk.withContext(function($ctx1) { _st(_st(self["@hiddenInput"])._asJQuery())._blur();
  423. return self}, function($ctx1) {$ctx1.fill(self,"blur",{}, smalltalk.HLFocusableWidget)});},
  424. messageSends: ["blur", "asJQuery"]}),
  425. smalltalk.HLFocusableWidget);
  426. smalltalk.addMethod(
  427. "_canHaveFocus",
  428. smalltalk.method({
  429. selector: "canHaveFocus",
  430. fn: function () {
  431. var self=this;
  432. return smalltalk.withContext(function($ctx1) { return true;
  433. }, function($ctx1) {$ctx1.fill(self,"canHaveFocus",{},smalltalk.HLFocusableWidget)});},
  434. messageSends: []}),
  435. smalltalk.HLFocusableWidget);
  436. smalltalk.addMethod(
  437. "_focus",
  438. smalltalk.method({
  439. selector: "focus",
  440. fn: function () {
  441. var self=this;
  442. return smalltalk.withContext(function($ctx1) { _st(_st(self["@hiddenInput"])._asJQuery())._focus();
  443. return self}, function($ctx1) {$ctx1.fill(self,"focus",{}, smalltalk.HLFocusableWidget)});},
  444. messageSends: ["focus", "asJQuery"]}),
  445. smalltalk.HLFocusableWidget);
  446. smalltalk.addMethod(
  447. "_focusClass",
  448. smalltalk.method({
  449. selector: "focusClass",
  450. fn: function () {
  451. var self=this;
  452. return smalltalk.withContext(function($ctx1) { return "focused";
  453. }, function($ctx1) {$ctx1.fill(self,"focusClass",{}, smalltalk.HLFocusableWidget)});},
  454. messageSends: []}),
  455. smalltalk.HLFocusableWidget);
  456. smalltalk.addMethod(
  457. "_hasFocus",
  458. smalltalk.method({
  459. selector: "hasFocus",
  460. fn: function () {
  461. var self=this;
  462. return smalltalk.withContext(function($ctx1) { var $1;
  463. $1=_st(_st(_st(self)._wrapper())._notNil())._and_((function(){
  464. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(self)._wrapper())._asJQuery())._hasClass_(_st(self)._focusClass());
  465. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  466. return $1;
  467. }, function($ctx1) {$ctx1.fill(self,"hasFocus",{}, smalltalk.HLFocusableWidget)});},
  468. messageSends: ["and:", "hasClass:", "focusClass", "asJQuery", "wrapper", "notNil"]}),
  469. smalltalk.HLFocusableWidget);
  470. smalltalk.addMethod(
  471. "_renderContentOn_",
  472. smalltalk.method({
  473. selector: "renderContentOn:",
  474. fn: function (html) {
  475. var self=this;
  476. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLFocusableWidget)});},
  477. messageSends: []}),
  478. smalltalk.HLFocusableWidget);
  479. smalltalk.addMethod(
  480. "_renderHiddenInputOn_",
  481. smalltalk.method({
  482. selector: "renderHiddenInputOn:",
  483. fn: function (html) {
  484. var self=this;
  485. return smalltalk.withContext(function($ctx1) { var $1,$2;
  486. $1=_st(html)._input();
  487. _st($1)._style_("position: absolute; left: -100000px;");
  488. _st($1)._onBlur_((function(){
  489. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(self)._wrapper())._asJQuery())._removeClass_(_st(self)._focusClass());
  490. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  491. $2=_st($1)._onFocus_((function(){
  492. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(self)._wrapper())._asJQuery())._addClass_(_st(self)._focusClass());
  493. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  494. self["@hiddenInput"]=$2;
  495. return self}, function($ctx1) {$ctx1.fill(self,"renderHiddenInputOn:",{html:html}, smalltalk.HLFocusableWidget)});},
  496. messageSends: ["style:", "input", "onBlur:", "removeClass:", "focusClass", "asJQuery", "wrapper", "onFocus:", "addClass:"]}),
  497. smalltalk.HLFocusableWidget);
  498. smalltalk.addMethod(
  499. "_renderOn_",
  500. smalltalk.method({
  501. selector: "renderOn:",
  502. fn: function (html) {
  503. var self=this;
  504. return smalltalk.withContext(function($ctx1) { var $1,$2;
  505. _st(self)._registerBindings();
  506. _st(self)._renderHiddenInputOn_(html);
  507. $1=_st(html)._div();
  508. _st($1)._class_("hl_widget");
  509. _st($1)._onClick_((function(){
  510. return smalltalk.withContext(function($ctx2) { return _st(_st(self["@hiddenInput"])._asJQuery())._focus();
  511. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  512. $2=_st($1)._with_((function(){
  513. return smalltalk.withContext(function($ctx2) { return _st(self)._renderContentOn_(html);
  514. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  515. self["@wrapper"]=$2;
  516. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html}, smalltalk.HLFocusableWidget)});},
  517. messageSends: ["registerBindings", "renderHiddenInputOn:", "class:", "div", "onClick:", "focus", "asJQuery", "with:", "renderContentOn:"]}),
  518. smalltalk.HLFocusableWidget);
  519. smalltalk.addClass('HLListWidget', smalltalk.HLFocusableWidget, ['items', 'selectedItem', 'mapping'], 'Helios-Core');
  520. smalltalk.addMethod(
  521. "_activateFirstListItem",
  522. smalltalk.method({
  523. selector: "activateFirstListItem",
  524. fn: function () {
  525. var self=this;
  526. return smalltalk.withContext(function($ctx1) { _st(self)._activateListItem_(_st(window)._jQuery_(_st(_st(_st(self["@wrapper"])._asJQuery())._find_("li"))._get_((0))));
  527. return self}, function($ctx1) {$ctx1.fill(self,"activateFirstListItem",{}, smalltalk.HLListWidget)});},
  528. messageSends: ["activateListItem:", "jQuery:", "get:", "find:", "asJQuery"]}),
  529. smalltalk.HLListWidget);
  530. smalltalk.addMethod(
  531. "_activateItem_",
  532. smalltalk.method({
  533. selector: "activateItem:",
  534. fn: function (anObject) {
  535. var self=this;
  536. return smalltalk.withContext(function($ctx1) { var $1;
  537. var $early={};
  538. try {
  539. _st(self)._activateListItem_(_st(_st(self["@mapping"])._at_ifAbsent_(anObject,(function(){
  540. return smalltalk.withContext(function($ctx2) { $1=self;
  541. throw $early=[$1];
  542. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._asJQuery());
  543. return self}
  544. catch(e) {if(e===$early)return e[0]; throw e}
  545. }, function($ctx1) {$ctx1.fill(self,"activateItem:",{anObject:anObject},smalltalk.HLListWidget)});},
  546. messageSends: ["activateListItem:", "asJQuery", "at:ifAbsent:"]}),
  547. smalltalk.HLListWidget);
  548. smalltalk.addMethod(
  549. "_activateListItem_",
  550. smalltalk.method({
  551. selector: "activateListItem:",
  552. fn: function (aListItem) {
  553. var self=this;
  554. var parent,position,item;
  555. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5;
  556. $1=_st(aListItem)._get_((0));
  557. if(($receiver = $1) == nil || $receiver == undefined){
  558. $2=self;
  559. return $2;
  560. } else {
  561. $1;
  562. };
  563. position=_st(self)._positionOf_(aListItem);
  564. parent=_st(aListItem)._parent();
  565. _st(_st(parent)._children())._removeClass_("active");
  566. _st(aListItem)._addClass_("active");
  567. $3=_st(_st(_st(aListItem)._position())._top()).__lt((0));
  568. if(smalltalk.assert($3)){
  569. _st(_st(parent)._get_((0)))._scrollTop_(_st(_st(_st(_st(parent)._get_((0)))._scrollTop()).__plus(_st(_st(aListItem)._position())._top())).__minus((10)));
  570. };
  571. $4=_st(_st(_st(_st(aListItem)._position())._top()).__plus(_st(aListItem)._height())).__gt(_st(parent)._height());
  572. if(smalltalk.assert($4)){
  573. _st(_st(parent)._get_((0)))._scrollTop_(_st(_st(_st(_st(_st(parent)._get_((0)))._scrollTop()).__plus(_st(aListItem)._height())).__minus(_st(_st(parent)._height()).__minus(_st(_st(aListItem)._position())._top()))).__plus((10)));
  574. };
  575. item=_st(_st(self)._items())._at_(_st(_st(aListItem)._attr_("list-data"))._asNumber());
  576. $5=_st(_st(self)._selectedItem()).__eq_eq(item);
  577. if(! smalltalk.assert($5)){
  578. _st(self)._selectItem_(item);
  579. };
  580. return self}, function($ctx1) {$ctx1.fill(self,"activateListItem:",{aListItem:aListItem,parent:parent,position:position,item:item},smalltalk.HLListWidget)});},
  581. messageSends: ["ifNil:", "get:", "positionOf:", "parent", "removeClass:", "children", "addClass:", "ifTrue:", "scrollTop:", "-", "+", "top", "position", "scrollTop", "<", "height", ">", "at:", "asNumber", "attr:", "items", "ifFalse:", "selectItem:", "==", "selectedItem"]}),
  582. smalltalk.HLListWidget);
  583. smalltalk.addMethod(
  584. "_activateNextListItem",
  585. smalltalk.method({
  586. selector: "activateNextListItem",
  587. fn: function () {
  588. var self=this;
  589. return smalltalk.withContext(function($ctx1) { _st(self)._activateListItem_(_st(_st(window)._jQuery_(".focused .nav-pills .active"))._next());
  590. return self}, function($ctx1) {$ctx1.fill(self,"activateNextListItem",{},smalltalk.HLListWidget)});},
  591. messageSends: ["activateListItem:", "next", "jQuery:"]}),
  592. smalltalk.HLListWidget);
  593. smalltalk.addMethod(
  594. "_activatePreviousListItem",
  595. smalltalk.method({
  596. selector: "activatePreviousListItem",
  597. fn: function () {
  598. var self=this;
  599. return smalltalk.withContext(function($ctx1) { _st(self)._activateListItem_(_st(_st(window)._jQuery_(".focused .nav-pills .active"))._prev());
  600. return self}, function($ctx1) {$ctx1.fill(self,"activatePreviousListItem",{},smalltalk.HLListWidget)});},
  601. messageSends: ["activateListItem:", "prev", "jQuery:"]}),
  602. smalltalk.HLListWidget);
  603. smalltalk.addMethod(
  604. "_cssClassForItem_",
  605. smalltalk.method({
  606. selector: "cssClassForItem:",
  607. fn: function (anObject) {
  608. var self=this;
  609. return smalltalk.withContext(function($ctx1) { var $2,$1;
  610. $2=_st(_st(self)._selectedItem()).__eq(anObject);
  611. if(smalltalk.assert($2)){
  612. $1="active";
  613. } else {
  614. $1="inactive";
  615. };
  616. return $1;
  617. }, function($ctx1) {$ctx1.fill(self,"cssClassForItem:",{anObject:anObject}, smalltalk.HLListWidget)});},
  618. messageSends: ["ifTrue:ifFalse:", "=", "selectedItem"]}),
  619. smalltalk.HLListWidget);
  620. smalltalk.addMethod(
  621. "_defaultItems",
  622. smalltalk.method({
  623. selector: "defaultItems",
  624. fn: function () {
  625. var self=this;
  626. return smalltalk.withContext(function($ctx1) { return [];
  627. }, function($ctx1) {$ctx1.fill(self,"defaultItems",{}, smalltalk.HLListWidget)});},
  628. messageSends: []}),
  629. smalltalk.HLListWidget);
  630. smalltalk.addMethod(
  631. "_focus",
  632. smalltalk.method({
  633. selector: "focus",
  634. fn: function () {
  635. var self=this;
  636. return smalltalk.withContext(function($ctx1) { var $1,$2;
  637. smalltalk.HLFocusableWidget.fn.prototype._focus.apply(_st(self), []);
  638. $1=_st(_st(self)._items())._isEmpty();
  639. if(! smalltalk.assert($1)){
  640. $2=_st(self)._selectedItem();
  641. if(($receiver = $2) == nil || $receiver == undefined){
  642. _st(self)._activateFirstListItem();
  643. } else {
  644. $2;
  645. };
  646. };
  647. return self}, function($ctx1) {$ctx1.fill(self,"focus",{}, smalltalk.HLListWidget)});},
  648. messageSends: ["focus", "ifFalse:", "ifNil:", "activateFirstListItem", "selectedItem", "isEmpty", "items"]}),
  649. smalltalk.HLListWidget);
  650. smalltalk.addMethod(
  651. "_iconForItem_",
  652. smalltalk.method({
  653. selector: "iconForItem:",
  654. fn: function (anObject) {
  655. var self=this;
  656. return smalltalk.withContext(function($ctx1) { return "";
  657. }, function($ctx1) {$ctx1.fill(self,"iconForItem:",{anObject:anObject}, smalltalk.HLListWidget)});},
  658. messageSends: []}),
  659. smalltalk.HLListWidget);
  660. smalltalk.addMethod(
  661. "_initialize",
  662. smalltalk.method({
  663. selector: "initialize",
  664. fn: function () {
  665. var self=this;
  666. return smalltalk.withContext(function($ctx1) { smalltalk.HLFocusableWidget.fn.prototype._initialize.apply(_st(self), []);
  667. self["@mapping"]=_st((smalltalk.Dictionary || Dictionary))._new();
  668. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLListWidget)});},
  669. messageSends: ["initialize", "new"]}),
  670. smalltalk.HLListWidget);
  671. smalltalk.addMethod(
  672. "_items",
  673. smalltalk.method({
  674. selector: "items",
  675. fn: function () {
  676. var self=this;
  677. return smalltalk.withContext(function($ctx1) { var $2,$1;
  678. $2=self["@items"];
  679. if(($receiver = $2) == nil || $receiver == undefined){
  680. self["@items"]=_st(self)._defaultItems();
  681. $1=self["@items"];
  682. } else {
  683. $1=$2;
  684. };
  685. return $1;
  686. }, function($ctx1) {$ctx1.fill(self,"items",{}, smalltalk.HLListWidget)});},
  687. messageSends: ["ifNil:", "defaultItems"]}),
  688. smalltalk.HLListWidget);
  689. smalltalk.addMethod(
  690. "_items_",
  691. smalltalk.method({
  692. selector: "items:",
  693. fn: function (aCollection) {
  694. var self=this;
  695. return smalltalk.withContext(function($ctx1) { self["@items"]=aCollection;
  696. return self}, function($ctx1) {$ctx1.fill(self,"items:",{aCollection:aCollection}, smalltalk.HLListWidget)});},
  697. messageSends: []}),
  698. smalltalk.HLListWidget);
  699. smalltalk.addMethod(
  700. "_positionOf_",
  701. smalltalk.method({
  702. selector: "positionOf:",
  703. fn: function (aListItem) {
  704. var self=this;
  705. return smalltalk.withContext(function($ctx1) {
  706. return aListItem.parent().children().get().indexOf(aListItem.get(0)) + 1
  707. ;
  708. return self}, function($ctx1) {$ctx1.fill(self,"positionOf:",{aListItem:aListItem}, smalltalk.HLListWidget)});},
  709. messageSends: []}),
  710. smalltalk.HLListWidget);
  711. smalltalk.addMethod(
  712. "_registerMappingFrom_to_",
  713. smalltalk.method({
  714. selector: "registerMappingFrom:to:",
  715. fn: function (anObject, aTag) {
  716. var self=this;
  717. return smalltalk.withContext(function($ctx1) { _st(self["@mapping"])._at_put_(anObject,aTag);
  718. return self}, function($ctx1) {$ctx1.fill(self,"registerMappingFrom:to:",{anObject:anObject,aTag:aTag},smalltalk.HLListWidget)});},
  719. messageSends: ["at:put:"]}),
  720. smalltalk.HLListWidget);
  721. smalltalk.addMethod(
  722. "_renderButtonsOn_",
  723. smalltalk.method({
  724. selector: "renderButtonsOn:",
  725. fn: function (html) {
  726. var self=this;
  727. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html}, smalltalk.HLListWidget)});},
  728. messageSends: []}),
  729. smalltalk.HLListWidget);
  730. smalltalk.addMethod(
  731. "_renderContentOn_",
  732. smalltalk.method({
  733. selector: "renderContentOn:",
  734. fn: function (html) {
  735. var self=this;
  736. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  737. $1=_st(html)._ul();
  738. _st($1)._class_("nav nav-pills nav-stacked");
  739. $2=_st($1)._with_((function(){
  740. return smalltalk.withContext(function($ctx2) { return _st(self)._renderListOn_(html);
  741. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  742. $3=_st(html)._div();
  743. _st($3)._class_("pane_actions form-actions");
  744. $4=_st($3)._with_((function(){
  745. return smalltalk.withContext(function($ctx2) { return _st(self)._renderButtonsOn_(html);
  746. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  747. _st(self)._setupKeyBindings();
  748. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLListWidget)});},
  749. messageSends: ["class:", "ul", "with:", "renderListOn:", "div", "renderButtonsOn:", "setupKeyBindings"]}),
  750. smalltalk.HLListWidget);
  751. smalltalk.addMethod(
  752. "_renderItem_on_",
  753. smalltalk.method({
  754. selector: "renderItem:on:",
  755. fn: function (anObject, html) {
  756. var self=this;
  757. var li;
  758. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$2;
  759. li=_st(html)._li();
  760. _st(self)._registerMappingFrom_to_(anObject,li);
  761. $1=li;
  762. _st($1)._class_(_st(self)._cssClassForItem_(anObject));
  763. _st($1)._at_put_("list-data",_st(_st(_st(self)._items())._indexOf_(anObject))._asString());
  764. $2=_st($1)._with_((function(){
  765. return smalltalk.withContext(function($ctx2) { $3=_st(html)._a();
  766. _st($3)._with_((function(){
  767. return smalltalk.withContext(function($ctx3) { _st(_st(html)._tag_("i"))._class_(_st(self)._iconForItem_(anObject));
  768. return _st(self)._renderItemLabel_on_(anObject,html);
  769. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  770. $4=_st($3)._onClick_((function(){
  771. return smalltalk.withContext(function($ctx3) { return _st(self)._activateListItem_(_st(li)._asJQuery());
  772. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  773. return $4;
  774. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  775. return self}, function($ctx1) {$ctx1.fill(self,"renderItem:on:",{anObject:anObject,html:html,li:li},smalltalk.HLListWidget)});},
  776. messageSends: ["li", "registerMappingFrom:to:", "class:", "cssClassForItem:", "at:put:", "asString", "indexOf:", "items", "with:", "iconForItem:", "tag:", "renderItemLabel:on:", "a", "onClick:", "activateListItem:", "asJQuery"]}),
  777. smalltalk.HLListWidget);
  778. smalltalk.addMethod(
  779. "_renderItemLabel_on_",
  780. smalltalk.method({
  781. selector: "renderItemLabel:on:",
  782. fn: function (anObject, html) {
  783. var self=this;
  784. return smalltalk.withContext(function($ctx1) { _st(html)._with_(_st(anObject)._asString());
  785. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{anObject:anObject,html:html}, smalltalk.HLListWidget)});},
  786. messageSends: ["with:", "asString"]}),
  787. smalltalk.HLListWidget);
  788. smalltalk.addMethod(
  789. "_renderListOn_",
  790. smalltalk.method({
  791. selector: "renderListOn:",
  792. fn: function (html) {
  793. var self=this;
  794. return smalltalk.withContext(function($ctx1) { self["@mapping"]=_st((smalltalk.Dictionary || Dictionary))._new();
  795. _st(_st(self)._items())._do_((function(each){
  796. return smalltalk.withContext(function($ctx2) { return _st(self)._renderItem_on_(each,html);
  797. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  798. return self}, function($ctx1) {$ctx1.fill(self,"renderListOn:",{html:html},smalltalk.HLListWidget)});},
  799. messageSends: ["new", "do:", "renderItem:on:", "items"]}),
  800. smalltalk.HLListWidget);
  801. smalltalk.addMethod(
  802. "_selectItem_",
  803. smalltalk.method({
  804. selector: "selectItem:",
  805. fn: function (anObject) {
  806. var self=this;
  807. return smalltalk.withContext(function($ctx1) { _st(self)._selectedItem_(anObject);
  808. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{anObject:anObject}, smalltalk.HLListWidget)});},
  809. messageSends: ["selectedItem:"]}),
  810. smalltalk.HLListWidget);
  811. smalltalk.addMethod(
  812. "_selectedItem",
  813. smalltalk.method({
  814. selector: "selectedItem",
  815. fn: function () {
  816. var self=this;
  817. return smalltalk.withContext(function($ctx1) { var $1;
  818. $1=self["@selectedItem"];
  819. return $1;
  820. }, function($ctx1) {$ctx1.fill(self,"selectedItem",{}, smalltalk.HLListWidget)});},
  821. messageSends: []}),
  822. smalltalk.HLListWidget);
  823. smalltalk.addMethod(
  824. "_selectedItem_",
  825. smalltalk.method({
  826. selector: "selectedItem:",
  827. fn: function (anObject) {
  828. var self=this;
  829. return smalltalk.withContext(function($ctx1) { self["@selectedItem"]=anObject;
  830. return self}, function($ctx1) {$ctx1.fill(self,"selectedItem:",{anObject:anObject}, smalltalk.HLListWidget)});},
  831. messageSends: []}),
  832. smalltalk.HLListWidget);
  833. smalltalk.addMethod(
  834. "_setupKeyBindings",
  835. smalltalk.method({
  836. selector: "setupKeyBindings",
  837. fn: function () {
  838. var self=this;
  839. var active,interval,delay,repeatInterval;
  840. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5;
  841. active=false;
  842. repeatInterval=(70);
  843. _st(_st(self["@hiddenInput"])._asJQuery())._unbind_("keydown");
  844. _st(_st(self["@hiddenInput"])._asJQuery())._keydown_((function(e){
  845. return smalltalk.withContext(function($ctx2) { $1=_st(_st(_st(e)._which()).__eq((38)))._and_((function(){
  846. return smalltalk.withContext(function($ctx3) { return _st(active).__eq(false);
  847. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  848. if(smalltalk.assert($1)){
  849. active=true;
  850. active;
  851. _st(self)._activatePreviousListItem();
  852. delay=_st((function(){
  853. return smalltalk.withContext(function($ctx3) { interval=_st((function(){
  854. return smalltalk.withContext(function($ctx4) { return _st(self)._activatePreviousListItem();
  855. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}))._valueWithInterval_(repeatInterval);
  856. return interval;
  857. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}))._valueWithTimeout_((300));
  858. delay;
  859. };
  860. $2=_st(_st(_st(e)._which()).__eq((40)))._and_((function(){
  861. return smalltalk.withContext(function($ctx3) { return _st(active).__eq(false);
  862. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  863. if(smalltalk.assert($2)){
  864. active=true;
  865. active;
  866. _st(self)._activateNextListItem();
  867. delay=_st((function(){
  868. return smalltalk.withContext(function($ctx3) { interval=_st((function(){
  869. return smalltalk.withContext(function($ctx4) { return _st(self)._activateNextListItem();
  870. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}))._valueWithInterval_(repeatInterval);
  871. return interval;
  872. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}))._valueWithTimeout_((300));
  873. return delay;
  874. };
  875. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1)})}));
  876. _st(_st(self["@hiddenInput"])._asJQuery())._keyup_((function(e){
  877. return smalltalk.withContext(function($ctx2) { $3=active;
  878. if(smalltalk.assert($3)){
  879. active=false;
  880. active;
  881. $4=interval;
  882. if(($receiver = $4) == nil || $receiver == undefined){
  883. $4;
  884. } else {
  885. _st(interval)._clearInterval();
  886. };
  887. $5=delay;
  888. if(($receiver = $5) == nil || $receiver == undefined){
  889. return $5;
  890. } else {
  891. return _st(delay)._clearTimeout();
  892. };
  893. };
  894. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1)})}));
  895. return self}, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{active:active,interval:interval,delay:delay,repeatInterval:repeatInterval},smalltalk.HLListWidget)});},
  896. messageSends: ["unbind:", "asJQuery", "keydown:", "ifTrue:", "activatePreviousListItem", "valueWithTimeout:", "valueWithInterval:", "and:", "=", "which", "activateNextListItem", "keyup:", "ifNotNil:", "clearInterval", "clearTimeout"]}),
  897. smalltalk.HLListWidget);
  898. smalltalk.addClass('HLNavigationListWidget', smalltalk.HLListWidget, ['previous', 'next'], 'Helios-Core');
  899. smalltalk.addMethod(
  900. "_next",
  901. smalltalk.method({
  902. selector: "next",
  903. fn: function () {
  904. var self=this;
  905. return smalltalk.withContext(function($ctx1) { var $1;
  906. $1=self["@next"];
  907. return $1;
  908. }, function($ctx1) {$ctx1.fill(self,"next",{}, smalltalk.HLNavigationListWidget)});},
  909. messageSends: []}),
  910. smalltalk.HLNavigationListWidget);
  911. smalltalk.addMethod(
  912. "_next_",
  913. smalltalk.method({
  914. selector: "next:",
  915. fn: function (aWidget) {
  916. var self=this;
  917. return smalltalk.withContext(function($ctx1) { var $1;
  918. self["@next"]=aWidget;
  919. $1=_st(_st(aWidget)._previous()).__eq(self);
  920. if(! smalltalk.assert($1)){
  921. _st(aWidget)._previous_(self);
  922. };
  923. return self}, function($ctx1) {$ctx1.fill(self,"next:",{aWidget:aWidget}, smalltalk.HLNavigationListWidget)});},
  924. messageSends: ["ifFalse:", "previous:", "=", "previous"]}),
  925. smalltalk.HLNavigationListWidget);
  926. smalltalk.addMethod(
  927. "_nextFocus",
  928. smalltalk.method({
  929. selector: "nextFocus",
  930. fn: function () {
  931. var self=this;
  932. return smalltalk.withContext(function($ctx1) { var $1;
  933. $1=_st(self)._next();
  934. if(($receiver = $1) == nil || $receiver == undefined){
  935. $1;
  936. } else {
  937. _st(_st(self)._next())._focus();
  938. };
  939. return self}, function($ctx1) {$ctx1.fill(self,"nextFocus",{}, smalltalk.HLNavigationListWidget)});},
  940. messageSends: ["ifNotNil:", "focus", "next"]}),
  941. smalltalk.HLNavigationListWidget);
  942. smalltalk.addMethod(
  943. "_previous",
  944. smalltalk.method({
  945. selector: "previous",
  946. fn: function () {
  947. var self=this;
  948. return smalltalk.withContext(function($ctx1) { var $1;
  949. $1=self["@previous"];
  950. return $1;
  951. }, function($ctx1) {$ctx1.fill(self,"previous",{}, smalltalk.HLNavigationListWidget)});},
  952. messageSends: []}),
  953. smalltalk.HLNavigationListWidget);
  954. smalltalk.addMethod(
  955. "_previous_",
  956. smalltalk.method({
  957. selector: "previous:",
  958. fn: function (aWidget) {
  959. var self=this;
  960. return smalltalk.withContext(function($ctx1) { var $1;
  961. self["@previous"]=aWidget;
  962. $1=_st(_st(aWidget)._next()).__eq(self);
  963. if(! smalltalk.assert($1)){
  964. _st(aWidget)._next_(self);
  965. };
  966. return self}, function($ctx1) {$ctx1.fill(self,"previous:",{aWidget:aWidget}, smalltalk.HLNavigationListWidget)});},
  967. messageSends: ["ifFalse:", "next:", "=", "next"]}),
  968. smalltalk.HLNavigationListWidget);
  969. smalltalk.addMethod(
  970. "_previousFocus",
  971. smalltalk.method({
  972. selector: "previousFocus",
  973. fn: function () {
  974. var self=this;
  975. return smalltalk.withContext(function($ctx1) { var $1;
  976. $1=_st(self)._previous();
  977. if(($receiver = $1) == nil || $receiver == undefined){
  978. $1;
  979. } else {
  980. _st(_st(self)._previous())._focus();
  981. };
  982. return self}, function($ctx1) {$ctx1.fill(self,"previousFocus",{}, smalltalk.HLNavigationListWidget)});},
  983. messageSends: ["ifNotNil:", "focus", "previous"]}),
  984. smalltalk.HLNavigationListWidget);
  985. smalltalk.addMethod(
  986. "_setupKeyBindings",
  987. smalltalk.method({
  988. selector: "setupKeyBindings",
  989. fn: function () {
  990. var self=this;
  991. return smalltalk.withContext(function($ctx1) { var $1,$2;
  992. smalltalk.HLListWidget.fn.prototype._setupKeyBindings.apply(_st(self), []);
  993. _st(_st(self["@hiddenInput"])._asJQuery())._keydown_((function(e){
  994. return smalltalk.withContext(function($ctx2) { $1=_st(_st(e)._which()).__eq((39));
  995. if(smalltalk.assert($1)){
  996. _st(self)._nextFocus();
  997. };
  998. $2=_st(_st(e)._which()).__eq((37));
  999. if(smalltalk.assert($2)){
  1000. return _st(self)._previousFocus();
  1001. };
  1002. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1)})}));
  1003. return self}, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{}, smalltalk.HLNavigationListWidget)});},
  1004. messageSends: ["setupKeyBindings", "keydown:", "ifTrue:", "nextFocus", "=", "which", "previousFocus", "asJQuery"]}),
  1005. smalltalk.HLNavigationListWidget);
  1006. smalltalk.addClass('HLManager', smalltalk.HLWidget, ['tabs', 'activeTab', 'keyBinder', 'environment', 'history'], 'Helios-Core');
  1007. smalltalk.addMethod(
  1008. "_activate_",
  1009. smalltalk.method({
  1010. selector: "activate:",
  1011. fn: function (aTab) {
  1012. var self=this;
  1013. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1014. _st(_st(self)._keyBinder())._flushBindings();
  1015. _st(aTab)._registerBindings();
  1016. self["@activeTab"]=aTab;
  1017. $1=self;
  1018. _st($1)._refresh();
  1019. _st($1)._addToHistory_(aTab);
  1020. $2=_st($1)._show_(aTab);
  1021. return self}, function($ctx1) {$ctx1.fill(self,"activate:",{aTab:aTab},smalltalk.HLManager)});},
  1022. messageSends: ["flushBindings", "keyBinder", "registerBindings", "refresh", "addToHistory:", "show:"]}),
  1023. smalltalk.HLManager);
  1024. smalltalk.addMethod(
  1025. "_activeTab",
  1026. smalltalk.method({
  1027. selector: "activeTab",
  1028. fn: function () {
  1029. var self=this;
  1030. return smalltalk.withContext(function($ctx1) { var $1;
  1031. $1=self["@activeTab"];
  1032. return $1;
  1033. }, function($ctx1) {$ctx1.fill(self,"activeTab",{}, smalltalk.HLManager)});},
  1034. messageSends: []}),
  1035. smalltalk.HLManager);
  1036. smalltalk.addMethod(
  1037. "_addTab_",
  1038. smalltalk.method({
  1039. selector: "addTab:",
  1040. fn: function (aTab) {
  1041. var self=this;
  1042. return smalltalk.withContext(function($ctx1) { _st(_st(self)._tabs())._add_(aTab);
  1043. _st(self)._activate_(aTab);
  1044. return self}, function($ctx1) {$ctx1.fill(self,"addTab:",{aTab:aTab}, smalltalk.HLManager)});},
  1045. messageSends: ["add:", "tabs", "activate:"]}),
  1046. smalltalk.HLManager);
  1047. smalltalk.addMethod(
  1048. "_addToHistory_",
  1049. smalltalk.method({
  1050. selector: "addToHistory:",
  1051. fn: function (aTab) {
  1052. var self=this;
  1053. return smalltalk.withContext(function($ctx1) { _st(self)._removeFromHistory_(aTab);
  1054. _st(_st(self)._history())._add_(aTab);
  1055. return self}, function($ctx1) {$ctx1.fill(self,"addToHistory:",{aTab:aTab}, smalltalk.HLManager)});},
  1056. messageSends: ["removeFromHistory:", "add:", "history"]}),
  1057. smalltalk.HLManager);
  1058. smalltalk.addMethod(
  1059. "_defaultEnvironment",
  1060. smalltalk.method({
  1061. selector: "defaultEnvironment",
  1062. fn: function () {
  1063. var self=this;
  1064. return smalltalk.withContext(function($ctx1) { var $1;
  1065. $1=_st((smalltalk.HLLocalEnvironment || HLLocalEnvironment))._new();
  1066. return $1;
  1067. }, function($ctx1) {$ctx1.fill(self,"defaultEnvironment",{}, smalltalk.HLManager)});},
  1068. messageSends: ["new"]}),
  1069. smalltalk.HLManager);
  1070. smalltalk.addMethod(
  1071. "_environment",
  1072. smalltalk.method({
  1073. selector: "environment",
  1074. fn: function () {
  1075. var self=this;
  1076. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1077. $2=self["@environment"];
  1078. if(($receiver = $2) == nil || $receiver == undefined){
  1079. self["@environment"]=_st(self)._defaultEnvironment();
  1080. $1=self["@environment"];
  1081. } else {
  1082. $1=$2;
  1083. };
  1084. return $1;
  1085. }, function($ctx1) {$ctx1.fill(self,"environment",{}, smalltalk.HLManager)});},
  1086. messageSends: ["ifNil:", "defaultEnvironment"]}),
  1087. smalltalk.HLManager);
  1088. smalltalk.addMethod(
  1089. "_environment_",
  1090. smalltalk.method({
  1091. selector: "environment:",
  1092. fn: function (anEnvironment) {
  1093. var self=this;
  1094. return smalltalk.withContext(function($ctx1) { self["@environment"]=anEnvironment;
  1095. return self}, function($ctx1) {$ctx1.fill(self,"environment:",{anEnvironment:anEnvironment}, smalltalk.HLManager)});},
  1096. messageSends: []}),
  1097. smalltalk.HLManager);
  1098. smalltalk.addMethod(
  1099. "_history",
  1100. smalltalk.method({
  1101. selector: "history",
  1102. fn: function () {
  1103. var self=this;
  1104. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1105. $2=self["@history"];
  1106. if(($receiver = $2) == nil || $receiver == undefined){
  1107. self["@history"]=_st((smalltalk.OrderedCollection || OrderedCollection))._new();
  1108. $1=self["@history"];
  1109. } else {
  1110. $1=$2;
  1111. };
  1112. return $1;
  1113. }, function($ctx1) {$ctx1.fill(self,"history",{}, smalltalk.HLManager)});},
  1114. messageSends: ["ifNil:", "new"]}),
  1115. smalltalk.HLManager);
  1116. smalltalk.addMethod(
  1117. "_history_",
  1118. smalltalk.method({
  1119. selector: "history:",
  1120. fn: function (aCollection) {
  1121. var self=this;
  1122. return smalltalk.withContext(function($ctx1) { self["@history"]=aCollection;
  1123. return self}, function($ctx1) {$ctx1.fill(self,"history:",{aCollection:aCollection}, smalltalk.HLManager)});},
  1124. messageSends: []}),
  1125. smalltalk.HLManager);
  1126. smalltalk.addMethod(
  1127. "_initialize",
  1128. smalltalk.method({
  1129. selector: "initialize",
  1130. fn: function () {
  1131. var self=this;
  1132. return smalltalk.withContext(function($ctx1) { smalltalk.HLWidget.fn.prototype._initialize.apply(_st(self), []);
  1133. _st(_st(self)._keyBinder())._setupEvents();
  1134. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.HLManager)});},
  1135. messageSends: ["initialize", "setupEvents", "keyBinder"]}),
  1136. smalltalk.HLManager);
  1137. smalltalk.addMethod(
  1138. "_keyBinder",
  1139. smalltalk.method({
  1140. selector: "keyBinder",
  1141. fn: function () {
  1142. var self=this;
  1143. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1144. $2=self["@keyBinder"];
  1145. if(($receiver = $2) == nil || $receiver == undefined){
  1146. self["@keyBinder"]=_st((smalltalk.HLKeyBinder || HLKeyBinder))._new();
  1147. $1=self["@keyBinder"];
  1148. } else {
  1149. $1=$2;
  1150. };
  1151. return $1;
  1152. }, function($ctx1) {$ctx1.fill(self,"keyBinder",{}, smalltalk.HLManager)});},
  1153. messageSends: ["ifNil:", "new"]}),
  1154. smalltalk.HLManager);
  1155. smalltalk.addMethod(
  1156. "_refresh",
  1157. smalltalk.method({
  1158. selector: "refresh",
  1159. fn: function () {
  1160. var self=this;
  1161. return smalltalk.withContext(function($ctx1) { _st(_st(window)._jQuery_(".navbar"))._remove();
  1162. _st(self)._appendToJQuery_(_st("body")._asJQuery());
  1163. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},smalltalk.HLManager)});},
  1164. messageSends: ["remove", "jQuery:", "appendToJQuery:", "asJQuery"]}),
  1165. smalltalk.HLManager);
  1166. smalltalk.addMethod(
  1167. "_removeActiveTab",
  1168. smalltalk.method({
  1169. selector: "removeActiveTab",
  1170. fn: function () {
  1171. var self=this;
  1172. return smalltalk.withContext(function($ctx1) { _st(self)._removeTab_(_st(self)._activeTab());
  1173. return self}, function($ctx1) {$ctx1.fill(self,"removeActiveTab",{}, smalltalk.HLManager)});},
  1174. messageSends: ["removeTab:", "activeTab"]}),
  1175. smalltalk.HLManager);
  1176. smalltalk.addMethod(
  1177. "_removeFromHistory_",
  1178. smalltalk.method({
  1179. selector: "removeFromHistory:",
  1180. fn: function (aTab) {
  1181. var self=this;
  1182. return smalltalk.withContext(function($ctx1) { _st(self)._history_(_st(_st(self)._history())._reject_((function(each){
  1183. return smalltalk.withContext(function($ctx2) { return _st(each).__eq_eq(aTab);
  1184. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})));
  1185. return self}, function($ctx1) {$ctx1.fill(self,"removeFromHistory:",{aTab:aTab}, smalltalk.HLManager)});},
  1186. messageSends: ["history:", "reject:", "==", "history"]}),
  1187. smalltalk.HLManager);
  1188. smalltalk.addMethod(
  1189. "_removeTab_",
  1190. smalltalk.method({
  1191. selector: "removeTab:",
  1192. fn: function (aTab) {
  1193. var self=this;
  1194. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1195. $1=_st(_st(self)._tabs())._includes_(aTab);
  1196. if(! smalltalk.assert($1)){
  1197. $2=self;
  1198. return $2;
  1199. };
  1200. _st(self)._removeFromHistory_(aTab);
  1201. _st(_st(self)._tabs())._remove_(aTab);
  1202. _st(_st(self)._keyBinder())._flushBindings();
  1203. _st(aTab)._remove();
  1204. _st(self)._refresh();
  1205. _st(_st(self)._history())._ifNotEmpty_((function(){
  1206. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(self)._history())._last())._activate();
  1207. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1208. return self}, function($ctx1) {$ctx1.fill(self,"removeTab:",{aTab:aTab},smalltalk.HLManager)});},
  1209. messageSends: ["ifFalse:", "includes:", "tabs", "removeFromHistory:", "remove:", "flushBindings", "keyBinder", "remove", "refresh", "ifNotEmpty:", "activate", "last", "history"]}),
  1210. smalltalk.HLManager);
  1211. smalltalk.addMethod(
  1212. "_renderAddOn_",
  1213. smalltalk.method({
  1214. selector: "renderAddOn:",
  1215. fn: function (html) {
  1216. var self=this;
  1217. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$5,$7,$8,$6,$2;
  1218. $1=_st(html)._li();
  1219. _st($1)._class_("dropdown");
  1220. $2=_st($1)._with_((function(){
  1221. return smalltalk.withContext(function($ctx2) { $3=_st(html)._a();
  1222. _st($3)._class_("dropdown-toggle");
  1223. _st($3)._at_put_("data-toggle","dropdown");
  1224. $4=_st($3)._with_((function(){
  1225. return smalltalk.withContext(function($ctx3) { _st(html)._with_("Open...");
  1226. return _st(_st(html)._tag_("b"))._class_("caret");
  1227. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1228. $4;
  1229. $5=_st(html)._ul();
  1230. _st($5)._class_("dropdown-menu");
  1231. $6=_st($5)._with_((function(){
  1232. return smalltalk.withContext(function($ctx3) { return _st(_st(_st(_st((smalltalk.HLWidget || HLWidget))._withAllSubclasses())._select_((function(each){
  1233. return smalltalk.withContext(function($ctx4) { return _st(each)._canBeOpenAsTab();
  1234. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx1)})})))._sorted_((function(a,b){
  1235. return smalltalk.withContext(function($ctx4) { return _st(_st(a)._tabPriority()).__lt(_st(b)._tabPriority());
  1236. }, function($ctx4) {$ctx4.fillBlock({a:a,b:b},$ctx1)})})))._do_((function(each){
  1237. return smalltalk.withContext(function($ctx4) { return _st(_st(html)._li())._with_((function(){
  1238. return smalltalk.withContext(function($ctx5) { $7=_st(html)._a();
  1239. _st($7)._with_(_st(each)._tabLabel());
  1240. $8=_st($7)._onClick_((function(){
  1241. return smalltalk.withContext(function($ctx6) { return _st(each)._openAsTab();
  1242. }, function($ctx6) {$ctx6.fillBlock({},$ctx1)})}));
  1243. return $8;
  1244. }, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
  1245. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx1)})}));
  1246. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1247. return $6;
  1248. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1249. return self}, function($ctx1) {$ctx1.fill(self,"renderAddOn:",{html:html}, smalltalk.HLManager)});},
  1250. messageSends: ["class:", "li", "with:", "a", "at:put:", "tag:", "ul", "do:", "tabLabel", "onClick:", "openAsTab", "sorted:", "<", "tabPriority", "select:", "canBeOpenAsTab", "withAllSubclasses"]}),
  1251. smalltalk.HLManager);
  1252. smalltalk.addMethod(
  1253. "_renderContentOn_",
  1254. smalltalk.method({
  1255. selector: "renderContentOn:",
  1256. fn: function (html) {
  1257. var self=this;
  1258. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$2;
  1259. $1=_st(html)._div();
  1260. _st($1)._class_("navbar navbar-fixed-top");
  1261. $2=_st($1)._with_((function(){
  1262. return smalltalk.withContext(function($ctx2) { $3=_st(html)._div();
  1263. _st($3)._class_("navbar-inner");
  1264. $4=_st($3)._with_((function(){
  1265. return smalltalk.withContext(function($ctx3) { return _st(self)._renderTabsOn_(html);
  1266. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1267. return $4;
  1268. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1269. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLManager)});},
  1270. messageSends: ["class:", "div", "with:", "renderTabsOn:"]}),
  1271. smalltalk.HLManager);
  1272. smalltalk.addMethod(
  1273. "_renderTabsOn_",
  1274. smalltalk.method({
  1275. selector: "renderTabsOn:",
  1276. fn: function (html) {
  1277. var self=this;
  1278. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$6,$5,$8,$9,$7,$2;
  1279. $1=_st(html)._ul();
  1280. _st($1)._class_("nav");
  1281. $2=_st($1)._with_((function(){
  1282. return smalltalk.withContext(function($ctx2) { _st(_st(self)._tabs())._do_((function(each){
  1283. return smalltalk.withContext(function($ctx3) { $3=_st(html)._li();
  1284. $4=$3;
  1285. $6=_st(each)._isActive();
  1286. if(smalltalk.assert($6)){
  1287. $5="active";
  1288. } else {
  1289. $5="inactive";
  1290. };
  1291. _st($4)._class_($5);
  1292. $7=_st($3)._with_((function(){
  1293. return smalltalk.withContext(function($ctx4) { $8=_st(html)._a();
  1294. _st($8)._with_((function(){
  1295. return smalltalk.withContext(function($ctx5) { _st(_st(_st(html)._tag_("i"))._class_("icon-remove"))._onClick_((function(){
  1296. return smalltalk.withContext(function($ctx6) { return _st(self)._removeTab_(each);
  1297. }, function($ctx6) {$ctx6.fillBlock({},$ctx1)})}));
  1298. return _st(html)._with_(_st(each)._displayLabel());
  1299. }, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
  1300. $9=_st($8)._onClick_((function(){
  1301. return smalltalk.withContext(function($ctx5) { return _st(each)._activate();
  1302. }, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
  1303. return $9;
  1304. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  1305. return $7;
  1306. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
  1307. return _st(self)._renderAddOn_(html);
  1308. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1309. return self}, function($ctx1) {$ctx1.fill(self,"renderTabsOn:",{html:html},smalltalk.HLManager)});},
  1310. messageSends: ["class:", "ul", "with:", "do:", "ifTrue:ifFalse:", "isActive", "li", "onClick:", "removeTab:", "tag:", "displayLabel", "a", "activate", "tabs", "renderAddOn:"]}),
  1311. smalltalk.HLManager);
  1312. smalltalk.addMethod(
  1313. "_show_",
  1314. smalltalk.method({
  1315. selector: "show:",
  1316. fn: function (aTab) {
  1317. var self=this;
  1318. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1319. _st(_st(self)._tabs())._do_((function(each){
  1320. return smalltalk.withContext(function($ctx2) { return _st(each)._hide();
  1321. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1322. $1=aTab;
  1323. _st($1)._show();
  1324. $2=_st($1)._focus();
  1325. return self}, function($ctx1) {$ctx1.fill(self,"show:",{aTab:aTab},smalltalk.HLManager)});},
  1326. messageSends: ["do:", "hide", "tabs", "show", "focus"]}),
  1327. smalltalk.HLManager);
  1328. smalltalk.addMethod(
  1329. "_tabs",
  1330. smalltalk.method({
  1331. selector: "tabs",
  1332. fn: function () {
  1333. var self=this;
  1334. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1335. $2=self["@tabs"];
  1336. if(($receiver = $2) == nil || $receiver == undefined){
  1337. self["@tabs"]=_st((smalltalk.OrderedCollection || OrderedCollection))._new();
  1338. $1=self["@tabs"];
  1339. } else {
  1340. $1=$2;
  1341. };
  1342. return $1;
  1343. }, function($ctx1) {$ctx1.fill(self,"tabs",{}, smalltalk.HLManager)});},
  1344. messageSends: ["ifNil:", "new"]}),
  1345. smalltalk.HLManager);
  1346. smalltalk.HLManager.klass.iVarNames = ['current'];
  1347. smalltalk.addMethod(
  1348. "_current",
  1349. smalltalk.method({
  1350. selector: "current",
  1351. fn: function () {
  1352. var self=this;
  1353. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1354. $2=self["@current"];
  1355. if(($receiver = $2) == nil || $receiver == undefined){
  1356. self["@current"]=_st(_st(self)._basicNew())._initialize();
  1357. $1=self["@current"];
  1358. } else {
  1359. $1=$2;
  1360. };
  1361. return $1;
  1362. }, function($ctx1) {$ctx1.fill(self,"current",{}, smalltalk.HLManager.klass)});},
  1363. messageSends: ["ifNil:", "initialize", "basicNew"]}),
  1364. smalltalk.HLManager.klass);
  1365. smalltalk.addMethod(
  1366. "_initialize",
  1367. smalltalk.method({
  1368. selector: "initialize",
  1369. fn: function () {
  1370. var self=this;
  1371. return smalltalk.withContext(function($ctx1) { _st(_st(self)._current())._appendToJQuery_(_st("body")._asJQuery());
  1372. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.HLManager.klass)});},
  1373. messageSends: ["appendToJQuery:", "asJQuery", "current"]}),
  1374. smalltalk.HLManager.klass);
  1375. smalltalk.addMethod(
  1376. "_new",
  1377. smalltalk.method({
  1378. selector: "new",
  1379. fn: function () {
  1380. var self=this;
  1381. return smalltalk.withContext(function($ctx1) { _st(self)._shouldNotImplement();
  1382. return self}, function($ctx1) {$ctx1.fill(self,"new",{}, smalltalk.HLManager.klass)});},
  1383. messageSends: ["shouldNotImplement"]}),
  1384. smalltalk.HLManager.klass);
  1385. smalltalk.addClass('HLSUnit', smalltalk.HLWidget, [], 'Helios-Core');
  1386. smalltalk.addMethod(
  1387. "_canBeOpenAsTab",
  1388. smalltalk.method({
  1389. selector: "canBeOpenAsTab",
  1390. fn: function () {
  1391. var self=this;
  1392. return smalltalk.withContext(function($ctx1) { return true;
  1393. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{}, smalltalk.HLSUnit.klass)});},
  1394. messageSends: []}),
  1395. smalltalk.HLSUnit.klass);
  1396. smalltalk.addMethod(
  1397. "_tabLabel",
  1398. smalltalk.method({
  1399. selector: "tabLabel",
  1400. fn: function () {
  1401. var self=this;
  1402. return smalltalk.withContext(function($ctx1) { return "SUnit";
  1403. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{}, smalltalk.HLSUnit.klass)});},
  1404. messageSends: []}),
  1405. smalltalk.HLSUnit.klass);
  1406. smalltalk.addMethod(
  1407. "_tabPriority",
  1408. smalltalk.method({
  1409. selector: "tabPriority",
  1410. fn: function () {
  1411. var self=this;
  1412. return smalltalk.withContext(function($ctx1) { return (1000);
  1413. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{}, smalltalk.HLSUnit.klass)});},
  1414. messageSends: []}),
  1415. smalltalk.HLSUnit.klass);
  1416. smalltalk.addClass('HLTranscript', smalltalk.HLWidget, [], 'Helios-Core');
  1417. smalltalk.addMethod(
  1418. "_canBeOpenAsTab",
  1419. smalltalk.method({
  1420. selector: "canBeOpenAsTab",
  1421. fn: function () {
  1422. var self=this;
  1423. return smalltalk.withContext(function($ctx1) { return true;
  1424. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{}, smalltalk.HLTranscript.klass)});},
  1425. messageSends: []}),
  1426. smalltalk.HLTranscript.klass);
  1427. smalltalk.addMethod(
  1428. "_tabLabel",
  1429. smalltalk.method({
  1430. selector: "tabLabel",
  1431. fn: function () {
  1432. var self=this;
  1433. return smalltalk.withContext(function($ctx1) { return "Transcript";
  1434. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{}, smalltalk.HLTranscript.klass)});},
  1435. messageSends: []}),
  1436. smalltalk.HLTranscript.klass);
  1437. smalltalk.addMethod(
  1438. "_tabPriority",
  1439. smalltalk.method({
  1440. selector: "tabPriority",
  1441. fn: function () {
  1442. var self=this;
  1443. return smalltalk.withContext(function($ctx1) { return (600);
  1444. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{}, smalltalk.HLTranscript.klass)});},
  1445. messageSends: []}),
  1446. smalltalk.HLTranscript.klass);