Helios-Core.deploy.js 51 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609
  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"))._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 parent,position,item;
  554. return smalltalk.withContext(function($ctx1) {
  555. var $1,$2,$3,$4,$5;
  556. $1=_st(aListItem)._get_((0));
  557. if(($receiver = $1) == nil || $receiver == undefined){
  558. $2=self;
  559. return $2;
  560. } else {
  561. $1;
  562. };
  563. position=_st(self)._positionOf_(aListItem);
  564. parent=_st(aListItem)._parent();
  565. _st(_st(parent)._children())._removeClass_("active");
  566. _st(aListItem)._addClass_("active");
  567. $3=_st(_st(_st(aListItem)._position())._top()).__lt((0));
  568. if(smalltalk.assert($3)){
  569. _st(_st(parent)._get_((0)))._scrollTop_(_st(_st(_st(_st(parent)._get_((0)))._scrollTop()).__plus(_st(_st(aListItem)._position())._top())).__minus((10)));
  570. };
  571. $4=_st(_st(_st(_st(aListItem)._position())._top()).__plus(_st(aListItem)._height())).__gt(_st(parent)._height());
  572. if(smalltalk.assert($4)){
  573. _st(_st(parent)._get_((0)))._scrollTop_(_st(_st(_st(_st(_st(parent)._get_((0)))._scrollTop()).__plus(_st(aListItem)._height())).__minus(_st(_st(parent)._height()).__minus(_st(_st(aListItem)._position())._top()))).__plus((10)));
  574. };
  575. item=_st(_st(self)._items())._at_(_st(_st(aListItem)._attr_("list-data"))._asNumber());
  576. $5=_st(_st(self)._selectedItem()).__eq_eq(item);
  577. if(! smalltalk.assert($5)){
  578. _st(self)._selectItem_(item);
  579. };
  580. return self}, function($ctx1) {$ctx1.fill(self,"activateListItem:",{aListItem:aListItem,parent:parent,position:position,item:item},smalltalk.HLListWidget)})},
  581. messageSends: ["ifNil:", "get:", "positionOf:", "parent", "removeClass:", "children", "addClass:", "ifTrue:", "scrollTop:", "-", "+", "top", "position", "scrollTop", "<", "height", ">", "at:", "asNumber", "attr:", "items", "ifFalse:", "selectItem:", "==", "selectedItem"]}),
  582. smalltalk.HLListWidget);
  583. smalltalk.addMethod(
  584. smalltalk.method({
  585. selector: "activateNextListItem",
  586. fn: function (){
  587. var self=this;
  588. return smalltalk.withContext(function($ctx1) {
  589. _st(self)._activateListItem_(_st(_st(window)._jQuery_(".focused .nav-pills .active"))._next());
  590. return self}, function($ctx1) {$ctx1.fill(self,"activateNextListItem",{},smalltalk.HLListWidget)})},
  591. messageSends: ["activateListItem:", "next", "jQuery:"]}),
  592. smalltalk.HLListWidget);
  593. smalltalk.addMethod(
  594. smalltalk.method({
  595. selector: "activatePreviousListItem",
  596. fn: function (){
  597. var self=this;
  598. return smalltalk.withContext(function($ctx1) {
  599. _st(self)._activateListItem_(_st(_st(window)._jQuery_(".focused .nav-pills .active"))._prev());
  600. return self}, function($ctx1) {$ctx1.fill(self,"activatePreviousListItem",{},smalltalk.HLListWidget)})},
  601. messageSends: ["activateListItem:", "prev", "jQuery:"]}),
  602. smalltalk.HLListWidget);
  603. smalltalk.addMethod(
  604. smalltalk.method({
  605. selector: "cssClassForItem:",
  606. fn: function (anObject){
  607. var self=this;
  608. return smalltalk.withContext(function($ctx1) {
  609. var $2,$1;
  610. $2=_st(_st(self)._selectedItem()).__eq(anObject);
  611. if(smalltalk.assert($2)){
  612. $1="active";
  613. } else {
  614. $1="inactive";
  615. };
  616. return $1;
  617. }, function($ctx1) {$ctx1.fill(self,"cssClassForItem:",{anObject:anObject},smalltalk.HLListWidget)})},
  618. messageSends: ["ifTrue:ifFalse:", "=", "selectedItem"]}),
  619. smalltalk.HLListWidget);
  620. smalltalk.addMethod(
  621. smalltalk.method({
  622. selector: "defaultItems",
  623. fn: function (){
  624. var self=this;
  625. return smalltalk.withContext(function($ctx1) {
  626. var $1;
  627. $1=[];
  628. return $1;
  629. }, function($ctx1) {$ctx1.fill(self,"defaultItems",{},smalltalk.HLListWidget)})},
  630. messageSends: []}),
  631. smalltalk.HLListWidget);
  632. smalltalk.addMethod(
  633. smalltalk.method({
  634. selector: "focus",
  635. fn: function (){
  636. var self=this;
  637. return smalltalk.withContext(function($ctx1) {
  638. var $1,$2;
  639. smalltalk.HLFocusableWidget.fn.prototype._focus.apply(_st(self), []);
  640. $1=_st(_st(self)._items())._isEmpty();
  641. if(! smalltalk.assert($1)){
  642. $2=_st(self)._selectedItem();
  643. if(($receiver = $2) == nil || $receiver == undefined){
  644. _st(self)._activateFirstListItem();
  645. } else {
  646. $2;
  647. };
  648. };
  649. return self}, function($ctx1) {$ctx1.fill(self,"focus",{},smalltalk.HLListWidget)})},
  650. messageSends: ["focus", "ifFalse:", "ifNil:", "activateFirstListItem", "selectedItem", "isEmpty", "items"]}),
  651. smalltalk.HLListWidget);
  652. smalltalk.addMethod(
  653. smalltalk.method({
  654. selector: "iconForItem:",
  655. fn: function (anObject){
  656. var self=this;
  657. return smalltalk.withContext(function($ctx1) {
  658. return "";
  659. }, function($ctx1) {$ctx1.fill(self,"iconForItem:",{anObject:anObject},smalltalk.HLListWidget)})},
  660. messageSends: []}),
  661. smalltalk.HLListWidget);
  662. smalltalk.addMethod(
  663. smalltalk.method({
  664. selector: "initialize",
  665. fn: function (){
  666. var self=this;
  667. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  668. return smalltalk.withContext(function($ctx1) {
  669. smalltalk.HLFocusableWidget.fn.prototype._initialize.apply(_st(self), []);
  670. self["@mapping"]=_st($Dictionary())._new();
  671. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLListWidget)})},
  672. messageSends: ["initialize", "new"]}),
  673. smalltalk.HLListWidget);
  674. smalltalk.addMethod(
  675. smalltalk.method({
  676. selector: "items",
  677. fn: function (){
  678. var self=this;
  679. return smalltalk.withContext(function($ctx1) {
  680. var $2,$1;
  681. $2=self["@items"];
  682. if(($receiver = $2) == nil || $receiver == undefined){
  683. self["@items"]=_st(self)._defaultItems();
  684. $1=self["@items"];
  685. } else {
  686. $1=$2;
  687. };
  688. return $1;
  689. }, function($ctx1) {$ctx1.fill(self,"items",{},smalltalk.HLListWidget)})},
  690. messageSends: ["ifNil:", "defaultItems"]}),
  691. smalltalk.HLListWidget);
  692. smalltalk.addMethod(
  693. smalltalk.method({
  694. selector: "items:",
  695. fn: function (aCollection){
  696. var self=this;
  697. return smalltalk.withContext(function($ctx1) {
  698. self["@items"]=aCollection;
  699. return self}, function($ctx1) {$ctx1.fill(self,"items:",{aCollection:aCollection},smalltalk.HLListWidget)})},
  700. messageSends: []}),
  701. smalltalk.HLListWidget);
  702. smalltalk.addMethod(
  703. smalltalk.method({
  704. selector: "positionOf:",
  705. fn: function (aListItem){
  706. var self=this;
  707. return smalltalk.withContext(function($ctx1) {
  708. return aListItem.parent().children().get().indexOf(aListItem.get(0)) + 1
  709. ;
  710. return self}, function($ctx1) {$ctx1.fill(self,"positionOf:",{aListItem:aListItem},smalltalk.HLListWidget)})},
  711. messageSends: []}),
  712. smalltalk.HLListWidget);
  713. smalltalk.addMethod(
  714. smalltalk.method({
  715. selector: "registerMappingFrom:to:",
  716. fn: function (anObject,aTag){
  717. var self=this;
  718. return smalltalk.withContext(function($ctx1) {
  719. _st(self["@mapping"])._at_put_(anObject,aTag);
  720. return self}, function($ctx1) {$ctx1.fill(self,"registerMappingFrom:to:",{anObject:anObject,aTag:aTag},smalltalk.HLListWidget)})},
  721. messageSends: ["at:put:"]}),
  722. smalltalk.HLListWidget);
  723. smalltalk.addMethod(
  724. smalltalk.method({
  725. selector: "renderButtonsOn:",
  726. fn: function (html){
  727. var self=this;
  728. return smalltalk.withContext(function($ctx1) {
  729. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.HLListWidget)})},
  730. messageSends: []}),
  731. smalltalk.HLListWidget);
  732. smalltalk.addMethod(
  733. smalltalk.method({
  734. selector: "renderContentOn:",
  735. fn: function (html){
  736. var self=this;
  737. return smalltalk.withContext(function($ctx1) {
  738. var $1,$2,$3,$4;
  739. $1=_st(html)._ul();
  740. _st($1)._class_("nav nav-pills nav-stacked");
  741. $2=_st($1)._with_((function(){
  742. return smalltalk.withContext(function($ctx2) {
  743. return _st(self)._renderListOn_(html);
  744. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  745. $3=_st(html)._div();
  746. _st($3)._class_("pane_actions form-actions");
  747. $4=_st($3)._with_((function(){
  748. return smalltalk.withContext(function($ctx2) {
  749. return _st(self)._renderButtonsOn_(html);
  750. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  751. _st(self)._setupKeyBindings();
  752. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLListWidget)})},
  753. messageSends: ["class:", "ul", "with:", "renderListOn:", "div", "renderButtonsOn:", "setupKeyBindings"]}),
  754. smalltalk.HLListWidget);
  755. smalltalk.addMethod(
  756. smalltalk.method({
  757. selector: "renderItem:on:",
  758. fn: function (anObject,html){
  759. var self=this;
  760. var li;
  761. return smalltalk.withContext(function($ctx1) {
  762. var $1,$3,$4,$2;
  763. li=_st(html)._li();
  764. _st(self)._registerMappingFrom_to_(anObject,li);
  765. $1=li;
  766. _st($1)._class_(_st(self)._cssClassForItem_(anObject));
  767. _st($1)._at_put_("list-data",_st(_st(_st(self)._items())._indexOf_(anObject))._asString());
  768. $2=_st($1)._with_((function(){
  769. return smalltalk.withContext(function($ctx2) {
  770. $3=_st(html)._a();
  771. _st($3)._with_((function(){
  772. return smalltalk.withContext(function($ctx3) {
  773. _st(_st(html)._tag_("i"))._class_(_st(self)._iconForItem_(anObject));
  774. return _st(self)._renderItemLabel_on_(anObject,html);
  775. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  776. $4=_st($3)._onClick_((function(){
  777. return smalltalk.withContext(function($ctx3) {
  778. return _st(self)._activateListItem_(_st(li)._asJQuery());
  779. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  780. return $4;
  781. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  782. return self}, function($ctx1) {$ctx1.fill(self,"renderItem:on:",{anObject:anObject,html:html,li:li},smalltalk.HLListWidget)})},
  783. messageSends: ["li", "registerMappingFrom:to:", "class:", "cssClassForItem:", "at:put:", "asString", "indexOf:", "items", "with:", "iconForItem:", "tag:", "renderItemLabel:on:", "a", "onClick:", "activateListItem:", "asJQuery"]}),
  784. smalltalk.HLListWidget);
  785. smalltalk.addMethod(
  786. smalltalk.method({
  787. selector: "renderItemLabel:on:",
  788. fn: function (anObject,html){
  789. var self=this;
  790. return smalltalk.withContext(function($ctx1) {
  791. _st(html)._with_(_st(anObject)._asString());
  792. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{anObject:anObject,html:html},smalltalk.HLListWidget)})},
  793. messageSends: ["with:", "asString"]}),
  794. smalltalk.HLListWidget);
  795. smalltalk.addMethod(
  796. smalltalk.method({
  797. selector: "renderListOn:",
  798. fn: function (html){
  799. var self=this;
  800. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  801. return smalltalk.withContext(function($ctx1) {
  802. self["@mapping"]=_st($Dictionary())._new();
  803. _st(_st(self)._items())._do_((function(each){
  804. return smalltalk.withContext(function($ctx2) {
  805. return _st(self)._renderItem_on_(each,html);
  806. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  807. return self}, function($ctx1) {$ctx1.fill(self,"renderListOn:",{html:html},smalltalk.HLListWidget)})},
  808. messageSends: ["new", "do:", "renderItem:on:", "items"]}),
  809. smalltalk.HLListWidget);
  810. smalltalk.addMethod(
  811. smalltalk.method({
  812. selector: "selectItem:",
  813. fn: function (anObject){
  814. var self=this;
  815. return smalltalk.withContext(function($ctx1) {
  816. _st(self)._selectedItem_(anObject);
  817. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{anObject:anObject},smalltalk.HLListWidget)})},
  818. messageSends: ["selectedItem:"]}),
  819. smalltalk.HLListWidget);
  820. smalltalk.addMethod(
  821. smalltalk.method({
  822. selector: "selectedItem",
  823. fn: function (){
  824. var self=this;
  825. return smalltalk.withContext(function($ctx1) {
  826. var $1;
  827. $1=self["@selectedItem"];
  828. return $1;
  829. }, function($ctx1) {$ctx1.fill(self,"selectedItem",{},smalltalk.HLListWidget)})},
  830. messageSends: []}),
  831. smalltalk.HLListWidget);
  832. smalltalk.addMethod(
  833. smalltalk.method({
  834. selector: "selectedItem:",
  835. fn: function (anObject){
  836. var self=this;
  837. return smalltalk.withContext(function($ctx1) {
  838. self["@selectedItem"]=anObject;
  839. return self}, function($ctx1) {$ctx1.fill(self,"selectedItem:",{anObject:anObject},smalltalk.HLListWidget)})},
  840. messageSends: []}),
  841. smalltalk.HLListWidget);
  842. smalltalk.addMethod(
  843. smalltalk.method({
  844. selector: "setupKeyBindings",
  845. fn: function (){
  846. var self=this;
  847. var active,interval,delay,repeatInterval;
  848. return smalltalk.withContext(function($ctx1) {
  849. var $1,$2,$3,$4,$5;
  850. active=false;
  851. repeatInterval=(70);
  852. _st(_st(_st(self)._wrapper())._asJQuery())._unbind_("keydown");
  853. _st(_st(_st(self)._wrapper())._asJQuery())._keydown_((function(e){
  854. return smalltalk.withContext(function($ctx2) {
  855. $1=_st(_st(_st(e)._which()).__eq((38)))._and_((function(){
  856. return smalltalk.withContext(function($ctx3) {
  857. return _st(active).__eq(false);
  858. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  859. if(smalltalk.assert($1)){
  860. active=true;
  861. active;
  862. _st(self)._activatePreviousListItem();
  863. delay=_st((function(){
  864. return smalltalk.withContext(function($ctx3) {
  865. interval=_st((function(){
  866. return smalltalk.withContext(function($ctx4) {
  867. return _st(self)._activatePreviousListItem();
  868. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}))._valueWithInterval_(repeatInterval);
  869. return interval;
  870. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}))._valueWithTimeout_((300));
  871. delay;
  872. };
  873. $2=_st(_st(_st(e)._which()).__eq((40)))._and_((function(){
  874. return smalltalk.withContext(function($ctx3) {
  875. return _st(active).__eq(false);
  876. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  877. if(smalltalk.assert($2)){
  878. active=true;
  879. active;
  880. _st(self)._activateNextListItem();
  881. delay=_st((function(){
  882. return smalltalk.withContext(function($ctx3) {
  883. interval=_st((function(){
  884. return smalltalk.withContext(function($ctx4) {
  885. return _st(self)._activateNextListItem();
  886. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}))._valueWithInterval_(repeatInterval);
  887. return interval;
  888. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}))._valueWithTimeout_((300));
  889. return delay;
  890. };
  891. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1)})}));
  892. _st(_st(_st(self)._wrapper())._asJQuery())._keyup_((function(e){
  893. return smalltalk.withContext(function($ctx2) {
  894. $3=active;
  895. if(smalltalk.assert($3)){
  896. active=false;
  897. active;
  898. $4=interval;
  899. if(($receiver = $4) == nil || $receiver == undefined){
  900. $4;
  901. } else {
  902. _st(interval)._clearInterval();
  903. };
  904. $5=delay;
  905. if(($receiver = $5) == nil || $receiver == undefined){
  906. return $5;
  907. } else {
  908. return _st(delay)._clearTimeout();
  909. };
  910. };
  911. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1)})}));
  912. return self}, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{active:active,interval:interval,delay:delay,repeatInterval:repeatInterval},smalltalk.HLListWidget)})},
  913. messageSends: ["unbind:", "asJQuery", "wrapper", "keydown:", "ifTrue:", "activatePreviousListItem", "valueWithTimeout:", "valueWithInterval:", "and:", "=", "which", "activateNextListItem", "keyup:", "ifNotNil:", "clearInterval", "clearTimeout"]}),
  914. smalltalk.HLListWidget);
  915. smalltalk.addClass('HLNavigationListWidget', smalltalk.HLListWidget, ['previous', 'next'], 'Helios-Core');
  916. smalltalk.addMethod(
  917. smalltalk.method({
  918. selector: "next",
  919. fn: function (){
  920. var self=this;
  921. return smalltalk.withContext(function($ctx1) {
  922. var $1;
  923. $1=self["@next"];
  924. return $1;
  925. }, function($ctx1) {$ctx1.fill(self,"next",{},smalltalk.HLNavigationListWidget)})},
  926. messageSends: []}),
  927. smalltalk.HLNavigationListWidget);
  928. smalltalk.addMethod(
  929. smalltalk.method({
  930. selector: "next:",
  931. fn: function (aWidget){
  932. var self=this;
  933. return smalltalk.withContext(function($ctx1) {
  934. var $1;
  935. self["@next"]=aWidget;
  936. $1=_st(_st(aWidget)._previous()).__eq(self);
  937. if(! smalltalk.assert($1)){
  938. _st(aWidget)._previous_(self);
  939. };
  940. return self}, function($ctx1) {$ctx1.fill(self,"next:",{aWidget:aWidget},smalltalk.HLNavigationListWidget)})},
  941. messageSends: ["ifFalse:", "previous:", "=", "previous"]}),
  942. smalltalk.HLNavigationListWidget);
  943. smalltalk.addMethod(
  944. smalltalk.method({
  945. selector: "nextFocus",
  946. fn: function (){
  947. var self=this;
  948. return smalltalk.withContext(function($ctx1) {
  949. var $1;
  950. $1=_st(self)._next();
  951. if(($receiver = $1) == nil || $receiver == undefined){
  952. $1;
  953. } else {
  954. _st(_st(self)._next())._focus();
  955. };
  956. return self}, function($ctx1) {$ctx1.fill(self,"nextFocus",{},smalltalk.HLNavigationListWidget)})},
  957. messageSends: ["ifNotNil:", "focus", "next"]}),
  958. smalltalk.HLNavigationListWidget);
  959. smalltalk.addMethod(
  960. smalltalk.method({
  961. selector: "previous",
  962. fn: function (){
  963. var self=this;
  964. return smalltalk.withContext(function($ctx1) {
  965. var $1;
  966. $1=self["@previous"];
  967. return $1;
  968. }, function($ctx1) {$ctx1.fill(self,"previous",{},smalltalk.HLNavigationListWidget)})},
  969. messageSends: []}),
  970. smalltalk.HLNavigationListWidget);
  971. smalltalk.addMethod(
  972. smalltalk.method({
  973. selector: "previous:",
  974. fn: function (aWidget){
  975. var self=this;
  976. return smalltalk.withContext(function($ctx1) {
  977. var $1;
  978. self["@previous"]=aWidget;
  979. $1=_st(_st(aWidget)._next()).__eq(self);
  980. if(! smalltalk.assert($1)){
  981. _st(aWidget)._next_(self);
  982. };
  983. return self}, function($ctx1) {$ctx1.fill(self,"previous:",{aWidget:aWidget},smalltalk.HLNavigationListWidget)})},
  984. messageSends: ["ifFalse:", "next:", "=", "next"]}),
  985. smalltalk.HLNavigationListWidget);
  986. smalltalk.addMethod(
  987. smalltalk.method({
  988. selector: "previousFocus",
  989. fn: function (){
  990. var self=this;
  991. return smalltalk.withContext(function($ctx1) {
  992. var $1;
  993. $1=_st(self)._previous();
  994. if(($receiver = $1) == nil || $receiver == undefined){
  995. $1;
  996. } else {
  997. _st(_st(self)._previous())._focus();
  998. };
  999. return self}, function($ctx1) {$ctx1.fill(self,"previousFocus",{},smalltalk.HLNavigationListWidget)})},
  1000. messageSends: ["ifNotNil:", "focus", "previous"]}),
  1001. smalltalk.HLNavigationListWidget);
  1002. smalltalk.addMethod(
  1003. smalltalk.method({
  1004. selector: "setupKeyBindings",
  1005. fn: function (){
  1006. var self=this;
  1007. return smalltalk.withContext(function($ctx1) {
  1008. var $1,$2;
  1009. smalltalk.HLListWidget.fn.prototype._setupKeyBindings.apply(_st(self), []);
  1010. _st(_st(_st(self)._wrapper())._asJQuery())._keydown_((function(e){
  1011. return smalltalk.withContext(function($ctx2) {
  1012. $1=_st(_st(e)._which()).__eq((39));
  1013. if(smalltalk.assert($1)){
  1014. _st(self)._nextFocus();
  1015. };
  1016. $2=_st(_st(e)._which()).__eq((37));
  1017. if(smalltalk.assert($2)){
  1018. return _st(self)._previousFocus();
  1019. };
  1020. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1)})}));
  1021. return self}, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{},smalltalk.HLNavigationListWidget)})},
  1022. messageSends: ["setupKeyBindings", "keydown:", "ifTrue:", "nextFocus", "=", "which", "previousFocus", "asJQuery", "wrapper"]}),
  1023. smalltalk.HLNavigationListWidget);
  1024. smalltalk.addClass('HLManager', smalltalk.HLWidget, ['tabs', 'activeTab', 'keyBinder', 'environment', 'history'], 'Helios-Core');
  1025. smalltalk.addMethod(
  1026. smalltalk.method({
  1027. selector: "activate:",
  1028. fn: function (aTab){
  1029. var self=this;
  1030. return smalltalk.withContext(function($ctx1) {
  1031. var $1,$2;
  1032. _st(_st(self)._keyBinder())._flushBindings();
  1033. _st(aTab)._registerBindings();
  1034. self["@activeTab"]=aTab;
  1035. $1=self;
  1036. _st($1)._refresh();
  1037. _st($1)._addToHistory_(aTab);
  1038. $2=_st($1)._show_(aTab);
  1039. return self}, function($ctx1) {$ctx1.fill(self,"activate:",{aTab:aTab},smalltalk.HLManager)})},
  1040. messageSends: ["flushBindings", "keyBinder", "registerBindings", "refresh", "addToHistory:", "show:"]}),
  1041. smalltalk.HLManager);
  1042. smalltalk.addMethod(
  1043. smalltalk.method({
  1044. selector: "activeTab",
  1045. fn: function (){
  1046. var self=this;
  1047. return smalltalk.withContext(function($ctx1) {
  1048. var $1;
  1049. $1=self["@activeTab"];
  1050. return $1;
  1051. }, function($ctx1) {$ctx1.fill(self,"activeTab",{},smalltalk.HLManager)})},
  1052. messageSends: []}),
  1053. smalltalk.HLManager);
  1054. smalltalk.addMethod(
  1055. smalltalk.method({
  1056. selector: "addTab:",
  1057. fn: function (aTab){
  1058. var self=this;
  1059. return smalltalk.withContext(function($ctx1) {
  1060. _st(_st(self)._tabs())._add_(aTab);
  1061. _st(self)._activate_(aTab);
  1062. return self}, function($ctx1) {$ctx1.fill(self,"addTab:",{aTab:aTab},smalltalk.HLManager)})},
  1063. messageSends: ["add:", "tabs", "activate:"]}),
  1064. smalltalk.HLManager);
  1065. smalltalk.addMethod(
  1066. smalltalk.method({
  1067. selector: "addToHistory:",
  1068. fn: function (aTab){
  1069. var self=this;
  1070. return smalltalk.withContext(function($ctx1) {
  1071. _st(self)._removeFromHistory_(aTab);
  1072. _st(_st(self)._history())._add_(aTab);
  1073. return self}, function($ctx1) {$ctx1.fill(self,"addToHistory:",{aTab:aTab},smalltalk.HLManager)})},
  1074. messageSends: ["removeFromHistory:", "add:", "history"]}),
  1075. smalltalk.HLManager);
  1076. smalltalk.addMethod(
  1077. smalltalk.method({
  1078. selector: "defaultEnvironment",
  1079. fn: function (){
  1080. var self=this;
  1081. function $HLLocalEnvironment(){return smalltalk.HLLocalEnvironment||(typeof HLLocalEnvironment=="undefined"?nil:HLLocalEnvironment)}
  1082. return smalltalk.withContext(function($ctx1) {
  1083. var $1;
  1084. $1=_st($HLLocalEnvironment())._new();
  1085. return $1;
  1086. }, function($ctx1) {$ctx1.fill(self,"defaultEnvironment",{},smalltalk.HLManager)})},
  1087. messageSends: ["new"]}),
  1088. smalltalk.HLManager);
  1089. smalltalk.addMethod(
  1090. smalltalk.method({
  1091. selector: "environment",
  1092. fn: function (){
  1093. var self=this;
  1094. return smalltalk.withContext(function($ctx1) {
  1095. var $2,$1;
  1096. $2=self["@environment"];
  1097. if(($receiver = $2) == nil || $receiver == undefined){
  1098. self["@environment"]=_st(self)._defaultEnvironment();
  1099. $1=self["@environment"];
  1100. } else {
  1101. $1=$2;
  1102. };
  1103. return $1;
  1104. }, function($ctx1) {$ctx1.fill(self,"environment",{},smalltalk.HLManager)})},
  1105. messageSends: ["ifNil:", "defaultEnvironment"]}),
  1106. smalltalk.HLManager);
  1107. smalltalk.addMethod(
  1108. smalltalk.method({
  1109. selector: "environment:",
  1110. fn: function (anEnvironment){
  1111. var self=this;
  1112. return smalltalk.withContext(function($ctx1) {
  1113. self["@environment"]=anEnvironment;
  1114. return self}, function($ctx1) {$ctx1.fill(self,"environment:",{anEnvironment:anEnvironment},smalltalk.HLManager)})},
  1115. messageSends: []}),
  1116. smalltalk.HLManager);
  1117. smalltalk.addMethod(
  1118. smalltalk.method({
  1119. selector: "history",
  1120. fn: function (){
  1121. var self=this;
  1122. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  1123. return smalltalk.withContext(function($ctx1) {
  1124. var $2,$1;
  1125. $2=self["@history"];
  1126. if(($receiver = $2) == nil || $receiver == undefined){
  1127. self["@history"]=_st($OrderedCollection())._new();
  1128. $1=self["@history"];
  1129. } else {
  1130. $1=$2;
  1131. };
  1132. return $1;
  1133. }, function($ctx1) {$ctx1.fill(self,"history",{},smalltalk.HLManager)})},
  1134. messageSends: ["ifNil:", "new"]}),
  1135. smalltalk.HLManager);
  1136. smalltalk.addMethod(
  1137. smalltalk.method({
  1138. selector: "history:",
  1139. fn: function (aCollection){
  1140. var self=this;
  1141. return smalltalk.withContext(function($ctx1) {
  1142. self["@history"]=aCollection;
  1143. return self}, function($ctx1) {$ctx1.fill(self,"history:",{aCollection:aCollection},smalltalk.HLManager)})},
  1144. messageSends: []}),
  1145. smalltalk.HLManager);
  1146. smalltalk.addMethod(
  1147. smalltalk.method({
  1148. selector: "initialize",
  1149. fn: function (){
  1150. var self=this;
  1151. return smalltalk.withContext(function($ctx1) {
  1152. smalltalk.HLWidget.fn.prototype._initialize.apply(_st(self), []);
  1153. _st(_st(self)._keyBinder())._setupEvents();
  1154. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLManager)})},
  1155. messageSends: ["initialize", "setupEvents", "keyBinder"]}),
  1156. smalltalk.HLManager);
  1157. smalltalk.addMethod(
  1158. smalltalk.method({
  1159. selector: "keyBinder",
  1160. fn: function (){
  1161. var self=this;
  1162. function $HLKeyBinder(){return smalltalk.HLKeyBinder||(typeof HLKeyBinder=="undefined"?nil:HLKeyBinder)}
  1163. return smalltalk.withContext(function($ctx1) {
  1164. var $2,$1;
  1165. $2=self["@keyBinder"];
  1166. if(($receiver = $2) == nil || $receiver == undefined){
  1167. self["@keyBinder"]=_st($HLKeyBinder())._new();
  1168. $1=self["@keyBinder"];
  1169. } else {
  1170. $1=$2;
  1171. };
  1172. return $1;
  1173. }, function($ctx1) {$ctx1.fill(self,"keyBinder",{},smalltalk.HLManager)})},
  1174. messageSends: ["ifNil:", "new"]}),
  1175. smalltalk.HLManager);
  1176. smalltalk.addMethod(
  1177. smalltalk.method({
  1178. selector: "refresh",
  1179. fn: function (){
  1180. var self=this;
  1181. return smalltalk.withContext(function($ctx1) {
  1182. _st(_st(window)._jQuery_(".navbar"))._remove();
  1183. _st(self)._appendToJQuery_(_st("body")._asJQuery());
  1184. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},smalltalk.HLManager)})},
  1185. messageSends: ["remove", "jQuery:", "appendToJQuery:", "asJQuery"]}),
  1186. smalltalk.HLManager);
  1187. smalltalk.addMethod(
  1188. smalltalk.method({
  1189. selector: "removeActiveTab",
  1190. fn: function (){
  1191. var self=this;
  1192. return smalltalk.withContext(function($ctx1) {
  1193. _st(self)._removeTab_(_st(self)._activeTab());
  1194. return self}, function($ctx1) {$ctx1.fill(self,"removeActiveTab",{},smalltalk.HLManager)})},
  1195. messageSends: ["removeTab:", "activeTab"]}),
  1196. smalltalk.HLManager);
  1197. smalltalk.addMethod(
  1198. smalltalk.method({
  1199. selector: "removeFromHistory:",
  1200. fn: function (aTab){
  1201. var self=this;
  1202. return smalltalk.withContext(function($ctx1) {
  1203. _st(self)._history_(_st(_st(self)._history())._reject_((function(each){
  1204. return smalltalk.withContext(function($ctx2) {
  1205. return _st(each).__eq_eq(aTab);
  1206. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})));
  1207. return self}, function($ctx1) {$ctx1.fill(self,"removeFromHistory:",{aTab:aTab},smalltalk.HLManager)})},
  1208. messageSends: ["history:", "reject:", "==", "history"]}),
  1209. smalltalk.HLManager);
  1210. smalltalk.addMethod(
  1211. smalltalk.method({
  1212. selector: "removeTab:",
  1213. fn: function (aTab){
  1214. var self=this;
  1215. return smalltalk.withContext(function($ctx1) {
  1216. var $1,$2;
  1217. $1=_st(_st(self)._tabs())._includes_(aTab);
  1218. if(! smalltalk.assert($1)){
  1219. $2=self;
  1220. return $2;
  1221. };
  1222. _st(self)._removeFromHistory_(aTab);
  1223. _st(_st(self)._tabs())._remove_(aTab);
  1224. _st(_st(self)._keyBinder())._flushBindings();
  1225. _st(aTab)._remove();
  1226. _st(self)._refresh();
  1227. _st(_st(self)._history())._ifNotEmpty_((function(){
  1228. return smalltalk.withContext(function($ctx2) {
  1229. return _st(_st(_st(self)._history())._last())._activate();
  1230. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1231. return self}, function($ctx1) {$ctx1.fill(self,"removeTab:",{aTab:aTab},smalltalk.HLManager)})},
  1232. messageSends: ["ifFalse:", "includes:", "tabs", "removeFromHistory:", "remove:", "flushBindings", "keyBinder", "remove", "refresh", "ifNotEmpty:", "activate", "last", "history"]}),
  1233. smalltalk.HLManager);
  1234. smalltalk.addMethod(
  1235. smalltalk.method({
  1236. selector: "renderAddOn:",
  1237. fn: function (html){
  1238. var self=this;
  1239. function $HLWidget(){return smalltalk.HLWidget||(typeof HLWidget=="undefined"?nil:HLWidget)}
  1240. return smalltalk.withContext(function($ctx1) {
  1241. var $1,$3,$4,$5,$7,$8,$6,$2;
  1242. $1=_st(html)._li();
  1243. _st($1)._class_("dropdown");
  1244. $2=_st($1)._with_((function(){
  1245. return smalltalk.withContext(function($ctx2) {
  1246. $3=_st(html)._a();
  1247. _st($3)._class_("dropdown-toggle");
  1248. _st($3)._at_put_("data-toggle","dropdown");
  1249. $4=_st($3)._with_((function(){
  1250. return smalltalk.withContext(function($ctx3) {
  1251. _st(html)._with_("Open...");
  1252. return _st(_st(html)._tag_("b"))._class_("caret");
  1253. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1254. $4;
  1255. $5=_st(html)._ul();
  1256. _st($5)._class_("dropdown-menu");
  1257. $6=_st($5)._with_((function(){
  1258. return smalltalk.withContext(function($ctx3) {
  1259. return _st(_st(_st(_st($HLWidget())._withAllSubclasses())._select_((function(each){
  1260. return smalltalk.withContext(function($ctx4) {
  1261. return _st(each)._canBeOpenAsTab();
  1262. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx1)})})))._sorted_((function(a,b){
  1263. return smalltalk.withContext(function($ctx4) {
  1264. return _st(_st(a)._tabPriority()).__lt(_st(b)._tabPriority());
  1265. }, function($ctx4) {$ctx4.fillBlock({a:a,b:b},$ctx1)})})))._do_((function(each){
  1266. return smalltalk.withContext(function($ctx4) {
  1267. return _st(_st(html)._li())._with_((function(){
  1268. return smalltalk.withContext(function($ctx5) {
  1269. $7=_st(html)._a();
  1270. _st($7)._with_(_st(each)._tabLabel());
  1271. $8=_st($7)._onClick_((function(){
  1272. return smalltalk.withContext(function($ctx6) {
  1273. return _st(each)._openAsTab();
  1274. }, function($ctx6) {$ctx6.fillBlock({},$ctx1)})}));
  1275. return $8;
  1276. }, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
  1277. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx1)})}));
  1278. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1279. return $6;
  1280. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1281. return self}, function($ctx1) {$ctx1.fill(self,"renderAddOn:",{html:html},smalltalk.HLManager)})},
  1282. messageSends: ["class:", "li", "with:", "a", "at:put:", "tag:", "ul", "do:", "tabLabel", "onClick:", "openAsTab", "sorted:", "<", "tabPriority", "select:", "canBeOpenAsTab", "withAllSubclasses"]}),
  1283. smalltalk.HLManager);
  1284. smalltalk.addMethod(
  1285. smalltalk.method({
  1286. selector: "renderContentOn:",
  1287. fn: function (html){
  1288. var self=this;
  1289. return smalltalk.withContext(function($ctx1) {
  1290. var $1,$3,$4,$2;
  1291. $1=_st(html)._div();
  1292. _st($1)._class_("navbar navbar-fixed-top");
  1293. $2=_st($1)._with_((function(){
  1294. return smalltalk.withContext(function($ctx2) {
  1295. $3=_st(html)._div();
  1296. _st($3)._class_("navbar-inner");
  1297. $4=_st($3)._with_((function(){
  1298. return smalltalk.withContext(function($ctx3) {
  1299. return _st(self)._renderTabsOn_(html);
  1300. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1301. return $4;
  1302. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1303. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLManager)})},
  1304. messageSends: ["class:", "div", "with:", "renderTabsOn:"]}),
  1305. smalltalk.HLManager);
  1306. smalltalk.addMethod(
  1307. smalltalk.method({
  1308. selector: "renderTabsOn:",
  1309. fn: function (html){
  1310. var self=this;
  1311. return smalltalk.withContext(function($ctx1) {
  1312. var $1,$3,$4,$6,$5,$8,$9,$7,$2;
  1313. $1=_st(html)._ul();
  1314. _st($1)._class_("nav");
  1315. $2=_st($1)._with_((function(){
  1316. return smalltalk.withContext(function($ctx2) {
  1317. _st(_st(self)._tabs())._do_((function(each){
  1318. return smalltalk.withContext(function($ctx3) {
  1319. $3=_st(html)._li();
  1320. $4=$3;
  1321. $6=_st(each)._isActive();
  1322. if(smalltalk.assert($6)){
  1323. $5="active";
  1324. } else {
  1325. $5="inactive";
  1326. };
  1327. _st($4)._class_($5);
  1328. $7=_st($3)._with_((function(){
  1329. return smalltalk.withContext(function($ctx4) {
  1330. $8=_st(html)._a();
  1331. _st($8)._with_((function(){
  1332. return smalltalk.withContext(function($ctx5) {
  1333. _st(_st(_st(html)._tag_("i"))._class_("icon-remove"))._onClick_((function(){
  1334. return smalltalk.withContext(function($ctx6) {
  1335. return _st(self)._removeTab_(each);
  1336. }, function($ctx6) {$ctx6.fillBlock({},$ctx1)})}));
  1337. return _st(html)._with_(_st(each)._displayLabel());
  1338. }, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
  1339. $9=_st($8)._onClick_((function(){
  1340. return smalltalk.withContext(function($ctx5) {
  1341. return _st(each)._activate();
  1342. }, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
  1343. return $9;
  1344. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  1345. return $7;
  1346. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
  1347. return _st(self)._renderAddOn_(html);
  1348. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1349. return self}, function($ctx1) {$ctx1.fill(self,"renderTabsOn:",{html:html},smalltalk.HLManager)})},
  1350. messageSends: ["class:", "ul", "with:", "do:", "ifTrue:ifFalse:", "isActive", "li", "onClick:", "removeTab:", "tag:", "displayLabel", "a", "activate", "tabs", "renderAddOn:"]}),
  1351. smalltalk.HLManager);
  1352. smalltalk.addMethod(
  1353. smalltalk.method({
  1354. selector: "show:",
  1355. fn: function (aTab){
  1356. var self=this;
  1357. return smalltalk.withContext(function($ctx1) {
  1358. var $1,$2;
  1359. _st(_st(self)._tabs())._do_((function(each){
  1360. return smalltalk.withContext(function($ctx2) {
  1361. return _st(each)._hide();
  1362. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1363. $1=aTab;
  1364. _st($1)._show();
  1365. $2=_st($1)._focus();
  1366. return self}, function($ctx1) {$ctx1.fill(self,"show:",{aTab:aTab},smalltalk.HLManager)})},
  1367. messageSends: ["do:", "hide", "tabs", "show", "focus"]}),
  1368. smalltalk.HLManager);
  1369. smalltalk.addMethod(
  1370. smalltalk.method({
  1371. selector: "tabs",
  1372. fn: function (){
  1373. var self=this;
  1374. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  1375. return smalltalk.withContext(function($ctx1) {
  1376. var $2,$1;
  1377. $2=self["@tabs"];
  1378. if(($receiver = $2) == nil || $receiver == undefined){
  1379. self["@tabs"]=_st($OrderedCollection())._new();
  1380. $1=self["@tabs"];
  1381. } else {
  1382. $1=$2;
  1383. };
  1384. return $1;
  1385. }, function($ctx1) {$ctx1.fill(self,"tabs",{},smalltalk.HLManager)})},
  1386. messageSends: ["ifNil:", "new"]}),
  1387. smalltalk.HLManager);
  1388. smalltalk.HLManager.klass.iVarNames = ['current'];
  1389. smalltalk.addMethod(
  1390. smalltalk.method({
  1391. selector: "current",
  1392. fn: function (){
  1393. var self=this;
  1394. return smalltalk.withContext(function($ctx1) {
  1395. var $2,$1;
  1396. $2=self["@current"];
  1397. if(($receiver = $2) == nil || $receiver == undefined){
  1398. self["@current"]=_st(_st(self)._basicNew())._initialize();
  1399. $1=self["@current"];
  1400. } else {
  1401. $1=$2;
  1402. };
  1403. return $1;
  1404. }, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.HLManager.klass)})},
  1405. messageSends: ["ifNil:", "initialize", "basicNew"]}),
  1406. smalltalk.HLManager.klass);
  1407. smalltalk.addMethod(
  1408. smalltalk.method({
  1409. selector: "initialize",
  1410. fn: function (){
  1411. var self=this;
  1412. return smalltalk.withContext(function($ctx1) {
  1413. _st(_st(self)._current())._appendToJQuery_(_st("body")._asJQuery());
  1414. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLManager.klass)})},
  1415. messageSends: ["appendToJQuery:", "asJQuery", "current"]}),
  1416. smalltalk.HLManager.klass);
  1417. smalltalk.addMethod(
  1418. smalltalk.method({
  1419. selector: "new",
  1420. fn: function (){
  1421. var self=this;
  1422. return smalltalk.withContext(function($ctx1) {
  1423. _st(self)._shouldNotImplement();
  1424. return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.HLManager.klass)})},
  1425. messageSends: ["shouldNotImplement"]}),
  1426. smalltalk.HLManager.klass);
  1427. smalltalk.addClass('HLSUnit', smalltalk.HLWidget, [], 'Helios-Core');
  1428. smalltalk.addMethod(
  1429. smalltalk.method({
  1430. selector: "canBeOpenAsTab",
  1431. fn: function (){
  1432. var self=this;
  1433. return smalltalk.withContext(function($ctx1) {
  1434. return true;
  1435. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLSUnit.klass)})},
  1436. messageSends: []}),
  1437. smalltalk.HLSUnit.klass);
  1438. smalltalk.addMethod(
  1439. smalltalk.method({
  1440. selector: "tabLabel",
  1441. fn: function (){
  1442. var self=this;
  1443. return smalltalk.withContext(function($ctx1) {
  1444. return "SUnit";
  1445. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLSUnit.klass)})},
  1446. messageSends: []}),
  1447. smalltalk.HLSUnit.klass);
  1448. smalltalk.addMethod(
  1449. smalltalk.method({
  1450. selector: "tabPriority",
  1451. fn: function (){
  1452. var self=this;
  1453. return smalltalk.withContext(function($ctx1) {
  1454. var $1;
  1455. $1=(1000);
  1456. return $1;
  1457. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLSUnit.klass)})},
  1458. messageSends: []}),
  1459. smalltalk.HLSUnit.klass);
  1460. smalltalk.addClass('HLTranscript', smalltalk.HLWidget, [], 'Helios-Core');
  1461. smalltalk.addMethod(
  1462. smalltalk.method({
  1463. selector: "canBeOpenAsTab",
  1464. fn: function (){
  1465. var self=this;
  1466. return smalltalk.withContext(function($ctx1) {
  1467. return true;
  1468. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLTranscript.klass)})},
  1469. messageSends: []}),
  1470. smalltalk.HLTranscript.klass);
  1471. smalltalk.addMethod(
  1472. smalltalk.method({
  1473. selector: "tabLabel",
  1474. fn: function (){
  1475. var self=this;
  1476. return smalltalk.withContext(function($ctx1) {
  1477. return "Transcript";
  1478. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLTranscript.klass)})},
  1479. messageSends: []}),
  1480. smalltalk.HLTranscript.klass);
  1481. smalltalk.addMethod(
  1482. smalltalk.method({
  1483. selector: "tabPriority",
  1484. fn: function (){
  1485. var self=this;
  1486. return smalltalk.withContext(function($ctx1) {
  1487. var $1;
  1488. $1=(600);
  1489. return $1;
  1490. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLTranscript.klass)})},
  1491. messageSends: []}),
  1492. smalltalk.HLTranscript.klass);