Helios-Core.deploy.js 52 KB

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