Helios-Core.deploy.js 53 KB

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