1
0

Helios-Core.deploy.js 51 KB

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