Helios-Core.deploy.js 54 KB

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