Helios-Core.js 66 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883
  1. smalltalk.addPackage('Helios-Core');
  2. smalltalk.addClass('HLTab', smalltalk.Object, ['widget', 'label'], 'Helios-Core');
  3. smalltalk.addMethod(
  4. "_activate",
  5. smalltalk.method({
  6. selector: "activate",
  7. category: 'accessing',
  8. fn: function (){
  9. var self=this;
  10. return smalltalk.withContext(function($ctx1) { _st(_st(self)._manager())._activate_(self);
  11. return self}, function($ctx1) {$ctx1.fill(self,"activate",{}, smalltalk.HLTab)})},
  12. args: [],
  13. source: "activate\x0a\x09self manager activate: self",
  14. messageSends: ["activate:", "manager"],
  15. referencedClasses: []
  16. }),
  17. smalltalk.HLTab);
  18. smalltalk.addMethod(
  19. "_add",
  20. smalltalk.method({
  21. selector: "add",
  22. category: 'accessing',
  23. fn: function (){
  24. var self=this;
  25. return smalltalk.withContext(function($ctx1) { _st(_st(self)._manager())._addTab_(self);
  26. return self}, function($ctx1) {$ctx1.fill(self,"add",{}, smalltalk.HLTab)})},
  27. args: [],
  28. source: "add\x0a\x09self manager addTab: self",
  29. messageSends: ["addTab:", "manager"],
  30. referencedClasses: []
  31. }),
  32. smalltalk.HLTab);
  33. smalltalk.addMethod(
  34. "_displayLabel",
  35. smalltalk.method({
  36. selector: "displayLabel",
  37. category: 'accessing',
  38. fn: function (){
  39. var self=this;
  40. return smalltalk.withContext(function($ctx1) { var $2,$1;
  41. $2=_st(_st(_st(self)._label())._size()).__gt((20));
  42. if(smalltalk.assert($2)){
  43. $1=_st(_st(_st(self)._label())._first_((20))).__comma("...");
  44. } else {
  45. $1=_st(self)._label();
  46. };
  47. return $1;
  48. }, function($ctx1) {$ctx1.fill(self,"displayLabel",{},smalltalk.HLTab)})},
  49. args: [],
  50. source: "displayLabel\x0a\x09^ self label size > 20 \x0a\x09\x09ifTrue: [ (self label first: 20), '...' ]\x0a\x09\x09ifFalse: [ self label ]",
  51. messageSends: ["ifTrue:ifFalse:", ",", "first:", "label", ">", "size"],
  52. referencedClasses: []
  53. }),
  54. smalltalk.HLTab);
  55. smalltalk.addMethod(
  56. "_focus",
  57. smalltalk.method({
  58. selector: "focus",
  59. category: 'accessing',
  60. fn: function (){
  61. var self=this;
  62. return smalltalk.withContext(function($ctx1) { var $1;
  63. $1=_st(_st(self)._widget())._canHaveFocus();
  64. if(smalltalk.assert($1)){
  65. _st(_st(self)._widget())._focus();
  66. };
  67. return self}, function($ctx1) {$ctx1.fill(self,"focus",{},smalltalk.HLTab)})},
  68. args: [],
  69. source: "focus\x0a\x09self widget canHaveFocus ifTrue: [\x0a\x09\x09self widget focus ]",
  70. messageSends: ["ifTrue:", "focus", "widget", "canHaveFocus"],
  71. referencedClasses: []
  72. }),
  73. smalltalk.HLTab);
  74. smalltalk.addMethod(
  75. "_isActive",
  76. smalltalk.method({
  77. selector: "isActive",
  78. category: 'testing',
  79. fn: function (){
  80. var self=this;
  81. return smalltalk.withContext(function($ctx1) { var $1;
  82. $1=_st(_st(_st(self)._manager())._activeTab()).__eq(self);
  83. return $1;
  84. }, function($ctx1) {$ctx1.fill(self,"isActive",{}, smalltalk.HLTab)})},
  85. args: [],
  86. source: "isActive\x0a\x09^ self manager activeTab = self",
  87. messageSends: ["=", "activeTab", "manager"],
  88. referencedClasses: []
  89. }),
  90. smalltalk.HLTab);
  91. smalltalk.addMethod(
  92. "_label",
  93. smalltalk.method({
  94. selector: "label",
  95. category: 'accessing',
  96. fn: function (){
  97. var self=this;
  98. return smalltalk.withContext(function($ctx1) { var $2,$1;
  99. $2=self["@label"];
  100. if(($receiver = $2) == nil || $receiver == undefined){
  101. $1="";
  102. } else {
  103. $1=$2;
  104. };
  105. return $1;
  106. }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.HLTab)})},
  107. args: [],
  108. source: "label\x0a\x09^ label ifNil: [ '' ]",
  109. messageSends: ["ifNil:"],
  110. referencedClasses: []
  111. }),
  112. smalltalk.HLTab);
  113. smalltalk.addMethod(
  114. "_label_",
  115. smalltalk.method({
  116. selector: "label:",
  117. category: 'accessing',
  118. fn: function (aString){
  119. var self=this;
  120. return smalltalk.withContext(function($ctx1) { self["@label"]=aString;
  121. return self}, function($ctx1) {$ctx1.fill(self,"label:",{aString:aString}, smalltalk.HLTab)})},
  122. args: ["aString"],
  123. source: "label: aString\x0a\x09label := aString",
  124. messageSends: [],
  125. referencedClasses: []
  126. }),
  127. smalltalk.HLTab);
  128. smalltalk.addMethod(
  129. "_manager",
  130. smalltalk.method({
  131. selector: "manager",
  132. category: 'accessing',
  133. fn: function (){
  134. var self=this;
  135. return smalltalk.withContext(function($ctx1) { var $1;
  136. $1=_st((smalltalk.HLManager || HLManager))._current();
  137. return $1;
  138. }, function($ctx1) {$ctx1.fill(self,"manager",{}, smalltalk.HLTab)})},
  139. args: [],
  140. source: "manager\x0a\x09^ HLManager current",
  141. messageSends: ["current"],
  142. referencedClasses: ["HLManager"]
  143. }),
  144. smalltalk.HLTab);
  145. smalltalk.addMethod(
  146. "_widget",
  147. smalltalk.method({
  148. selector: "widget",
  149. category: 'accessing',
  150. fn: function (){
  151. var self=this;
  152. return smalltalk.withContext(function($ctx1) { var $1;
  153. $1=self["@widget"];
  154. return $1;
  155. }, function($ctx1) {$ctx1.fill(self,"widget",{}, smalltalk.HLTab)})},
  156. args: [],
  157. source: "widget\x0a\x09^ widget",
  158. messageSends: [],
  159. referencedClasses: []
  160. }),
  161. smalltalk.HLTab);
  162. smalltalk.addMethod(
  163. "_widget_",
  164. smalltalk.method({
  165. selector: "widget:",
  166. category: 'accessing',
  167. fn: function (aWidget){
  168. var self=this;
  169. return smalltalk.withContext(function($ctx1) { self["@widget"]=aWidget;
  170. return self}, function($ctx1) {$ctx1.fill(self,"widget:",{aWidget:aWidget}, smalltalk.HLTab)})},
  171. args: ["aWidget"],
  172. source: "widget: aWidget\x0a\x09widget := aWidget",
  173. messageSends: [],
  174. referencedClasses: []
  175. }),
  176. smalltalk.HLTab);
  177. smalltalk.addMethod(
  178. "_on_labelled_",
  179. smalltalk.method({
  180. selector: "on:labelled:",
  181. category: 'instance creation',
  182. fn: function (aWidget,aString){
  183. var self=this;
  184. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  185. $2=_st(self)._new();
  186. _st($2)._widget_(aWidget);
  187. _st($2)._label_(aString);
  188. $3=_st($2)._yourself();
  189. $1=$3;
  190. return $1;
  191. }, function($ctx1) {$ctx1.fill(self,"on:labelled:",{aWidget:aWidget,aString:aString}, smalltalk.HLTab.klass)})},
  192. args: ["aWidget", "aString"],
  193. source: "on: aWidget labelled: aString\x0a\x09^ self new\x0a\x09\x09widget: aWidget;\x0a\x09\x09label: aString;\x0a\x09\x09yourself",
  194. messageSends: ["widget:", "new", "label:", "yourself"],
  195. referencedClasses: []
  196. }),
  197. smalltalk.HLTab.klass);
  198. smalltalk.addClass('HLWidget', smalltalk.Widget, ['wrapper'], 'Helios-Core');
  199. smalltalk.addMethod(
  200. "_alert_",
  201. smalltalk.method({
  202. selector: "alert:",
  203. category: 'actions',
  204. fn: function (aString){
  205. var self=this;
  206. return smalltalk.withContext(function($ctx1) { _st(window)._alert_(aString);
  207. return self}, function($ctx1) {$ctx1.fill(self,"alert:",{aString:aString}, smalltalk.HLWidget)})},
  208. args: ["aString"],
  209. source: "alert: aString\x0a\x09window alert: aString",
  210. messageSends: ["alert:"],
  211. referencedClasses: []
  212. }),
  213. smalltalk.HLWidget);
  214. smalltalk.addMethod(
  215. "_canHaveFocus",
  216. smalltalk.method({
  217. selector: "canHaveFocus",
  218. category: 'testing',
  219. fn: function (){
  220. var self=this;
  221. return smalltalk.withContext(function($ctx1) { return false;
  222. }, function($ctx1) {$ctx1.fill(self,"canHaveFocus",{},smalltalk.HLWidget)})},
  223. args: [],
  224. source: "canHaveFocus\x0a\x09^ false",
  225. messageSends: [],
  226. referencedClasses: []
  227. }),
  228. smalltalk.HLWidget);
  229. smalltalk.addMethod(
  230. "_confirm_",
  231. smalltalk.method({
  232. selector: "confirm:",
  233. category: 'actions',
  234. fn: function (aString){
  235. var self=this;
  236. return smalltalk.withContext(function($ctx1) { var $1;
  237. $1=_st(window)._confirm_(aString);
  238. return $1;
  239. }, function($ctx1) {$ctx1.fill(self,"confirm:",{aString:aString}, smalltalk.HLWidget)})},
  240. args: ["aString"],
  241. source: "confirm: aString\x0a\x09^ window confirm: aString",
  242. messageSends: ["confirm:"],
  243. referencedClasses: []
  244. }),
  245. smalltalk.HLWidget);
  246. smalltalk.addMethod(
  247. "_manager",
  248. smalltalk.method({
  249. selector: "manager",
  250. category: 'accessing',
  251. fn: function (){
  252. var self=this;
  253. return smalltalk.withContext(function($ctx1) { var $1;
  254. $1=_st((smalltalk.HLManager || HLManager))._current();
  255. return $1;
  256. }, function($ctx1) {$ctx1.fill(self,"manager",{}, smalltalk.HLWidget)})},
  257. args: [],
  258. source: "manager\x0a\x09^ HLManager current",
  259. messageSends: ["current"],
  260. referencedClasses: ["HLManager"]
  261. }),
  262. smalltalk.HLWidget);
  263. smalltalk.addMethod(
  264. "_refresh",
  265. smalltalk.method({
  266. selector: "refresh",
  267. category: 'updating',
  268. fn: function (){
  269. var self=this;
  270. return smalltalk.withContext(function($ctx1) { var $1,$2;
  271. $1=_st(self)._wrapper();
  272. if(($receiver = $1) == nil || $receiver == undefined){
  273. $2=self;
  274. return $2;
  275. } else {
  276. $1;
  277. };
  278. _st(_st(_st(self)._wrapper())._asJQuery())._empty();
  279. _st((function(html){
  280. return smalltalk.withContext(function($ctx2) { return _st(self)._renderContentOn_(html);
  281. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}))._appendToJQuery_(_st(_st(self)._wrapper())._asJQuery());
  282. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{}, smalltalk.HLWidget)})},
  283. args: [],
  284. source: "refresh\x0a\x09self wrapper ifNil: [ ^ self ].\x0a \x0a\x09self wrapper asJQuery empty.\x0a [ :html | self renderContentOn: html ] appendToJQuery: self wrapper asJQuery",
  285. messageSends: ["ifNil:", "wrapper", "empty", "asJQuery", "appendToJQuery:", "renderContentOn:"],
  286. referencedClasses: []
  287. }),
  288. smalltalk.HLWidget);
  289. smalltalk.addMethod(
  290. "_registerBindings",
  291. smalltalk.method({
  292. selector: "registerBindings",
  293. category: 'keybindings',
  294. fn: function (){
  295. var self=this;
  296. return smalltalk.withContext(function($ctx1) { _st(self)._registerBindingsOn_(_st(_st(_st(self)._manager())._keyBinder())._bindings());
  297. return self}, function($ctx1) {$ctx1.fill(self,"registerBindings",{}, smalltalk.HLWidget)})},
  298. args: [],
  299. source: "registerBindings\x0a\x09self registerBindingsOn: self manager keyBinder bindings",
  300. messageSends: ["registerBindingsOn:", "bindings", "keyBinder", "manager"],
  301. referencedClasses: []
  302. }),
  303. smalltalk.HLWidget);
  304. smalltalk.addMethod(
  305. "_registerBindingsOn_",
  306. smalltalk.method({
  307. selector: "registerBindingsOn:",
  308. category: 'keybindings',
  309. fn: function (aBindingGroup){
  310. var self=this;
  311. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"registerBindingsOn:",{aBindingGroup:aBindingGroup}, smalltalk.HLWidget)})},
  312. args: ["aBindingGroup"],
  313. source: "registerBindingsOn: aBindingGroup",
  314. messageSends: [],
  315. referencedClasses: []
  316. }),
  317. smalltalk.HLWidget);
  318. smalltalk.addMethod(
  319. "_renderContentOn_",
  320. smalltalk.method({
  321. selector: "renderContentOn:",
  322. category: 'rendering',
  323. fn: function (html){
  324. var self=this;
  325. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLWidget)})},
  326. args: ["html"],
  327. source: "renderContentOn: html\x0a",
  328. messageSends: [],
  329. referencedClasses: []
  330. }),
  331. smalltalk.HLWidget);
  332. smalltalk.addMethod(
  333. "_renderOn_",
  334. smalltalk.method({
  335. selector: "renderOn:",
  336. category: 'rendering',
  337. fn: function (html){
  338. var self=this;
  339. return smalltalk.withContext(function($ctx1) { _st(self)._registerBindings();
  340. self["@wrapper"]=_st(html)._div();
  341. _st((function(renderer){
  342. return smalltalk.withContext(function($ctx2) { return _st(self)._renderContentOn_(renderer);
  343. }, function($ctx2) {$ctx2.fillBlock({renderer:renderer},$ctx1)})}))._appendToJQuery_(_st(self["@wrapper"])._asJQuery());
  344. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html}, smalltalk.HLWidget)})},
  345. args: ["html"],
  346. source: "renderOn: html\x0a self registerBindings.\x0a\x0a\x09wrapper := html div.\x0a [ :renderer | self renderContentOn: renderer ] appendToJQuery: wrapper asJQuery",
  347. messageSends: ["registerBindings", "div", "appendToJQuery:", "asJQuery", "renderContentOn:"],
  348. referencedClasses: []
  349. }),
  350. smalltalk.HLWidget);
  351. smalltalk.addMethod(
  352. "_wrapper",
  353. smalltalk.method({
  354. selector: "wrapper",
  355. category: 'accessing',
  356. fn: function (){
  357. var self=this;
  358. return smalltalk.withContext(function($ctx1) { var $1;
  359. $1=self["@wrapper"];
  360. return $1;
  361. }, function($ctx1) {$ctx1.fill(self,"wrapper",{}, smalltalk.HLWidget)})},
  362. args: [],
  363. source: "wrapper\x0a\x09^ wrapper",
  364. messageSends: [],
  365. referencedClasses: []
  366. }),
  367. smalltalk.HLWidget);
  368. smalltalk.addMethod(
  369. "_canBeOpenAsTab",
  370. smalltalk.method({
  371. selector: "canBeOpenAsTab",
  372. category: 'testing',
  373. fn: function (){
  374. var self=this;
  375. return smalltalk.withContext(function($ctx1) { return false;
  376. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{}, smalltalk.HLWidget.klass)})},
  377. args: [],
  378. source: "canBeOpenAsTab\x0a\x09^ false",
  379. messageSends: [],
  380. referencedClasses: []
  381. }),
  382. smalltalk.HLWidget.klass);
  383. smalltalk.addMethod(
  384. "_openAsTab",
  385. smalltalk.method({
  386. selector: "openAsTab",
  387. category: 'accessing',
  388. fn: function (){
  389. var self=this;
  390. return smalltalk.withContext(function($ctx1) { var $1,$2;
  391. $1=_st(self)._canBeOpenAsTab();
  392. if(! smalltalk.assert($1)){
  393. $2=self;
  394. return $2;
  395. };
  396. _st(_st((smalltalk.HLManager || HLManager))._current())._addTab_(_st((smalltalk.HLTab || HLTab))._on_labelled_(_st(self)._new(),_st(self)._tabLabel()));
  397. return self}, function($ctx1) {$ctx1.fill(self,"openAsTab",{}, smalltalk.HLWidget.klass)})},
  398. args: [],
  399. source: "openAsTab\x0a\x09self canBeOpenAsTab ifFalse: [ ^ self ].\x0a\x09HLManager current addTab: (HLTab on: self new labelled: self tabLabel)",
  400. messageSends: ["ifFalse:", "canBeOpenAsTab", "addTab:", "on:labelled:", "new", "tabLabel", "current"],
  401. referencedClasses: ["HLTab", "HLManager"]
  402. }),
  403. smalltalk.HLWidget.klass);
  404. smalltalk.addMethod(
  405. "_tabLabel",
  406. smalltalk.method({
  407. selector: "tabLabel",
  408. category: 'accessing',
  409. fn: function (){
  410. var self=this;
  411. return smalltalk.withContext(function($ctx1) { return "Tab";
  412. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{}, smalltalk.HLWidget.klass)})},
  413. args: [],
  414. source: "tabLabel\x0a\x09^ 'Tab'",
  415. messageSends: [],
  416. referencedClasses: []
  417. }),
  418. smalltalk.HLWidget.klass);
  419. smalltalk.addMethod(
  420. "_tabPriority",
  421. smalltalk.method({
  422. selector: "tabPriority",
  423. category: 'accessing',
  424. fn: function (){
  425. var self=this;
  426. return smalltalk.withContext(function($ctx1) { return (500);
  427. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{}, smalltalk.HLWidget.klass)})},
  428. args: [],
  429. source: "tabPriority\x0a\x09^ 500",
  430. messageSends: [],
  431. referencedClasses: []
  432. }),
  433. smalltalk.HLWidget.klass);
  434. smalltalk.addClass('HLDebugger', smalltalk.HLWidget, [], 'Helios-Core');
  435. smalltalk.addClass('HLFocusableWidget', smalltalk.HLWidget, ['hiddenInput'], 'Helios-Core');
  436. smalltalk.addMethod(
  437. "_blur",
  438. smalltalk.method({
  439. selector: "blur",
  440. category: 'events',
  441. fn: function (){
  442. var self=this;
  443. return smalltalk.withContext(function($ctx1) { _st(_st(self["@hiddenInput"])._asJQuery())._blur();
  444. return self}, function($ctx1) {$ctx1.fill(self,"blur",{}, smalltalk.HLFocusableWidget)})},
  445. args: [],
  446. source: "blur\x0a\x09hiddenInput asJQuery blur",
  447. messageSends: ["blur", "asJQuery"],
  448. referencedClasses: []
  449. }),
  450. smalltalk.HLFocusableWidget);
  451. smalltalk.addMethod(
  452. "_canHaveFocus",
  453. smalltalk.method({
  454. selector: "canHaveFocus",
  455. category: 'testing',
  456. fn: function (){
  457. var self=this;
  458. return smalltalk.withContext(function($ctx1) { return true;
  459. }, function($ctx1) {$ctx1.fill(self,"canHaveFocus",{},smalltalk.HLFocusableWidget)})},
  460. args: [],
  461. source: "canHaveFocus\x0a\x09^ true",
  462. messageSends: [],
  463. referencedClasses: []
  464. }),
  465. smalltalk.HLFocusableWidget);
  466. smalltalk.addMethod(
  467. "_focus",
  468. smalltalk.method({
  469. selector: "focus",
  470. category: 'events',
  471. fn: function (){
  472. var self=this;
  473. return smalltalk.withContext(function($ctx1) { _st(_st(self["@hiddenInput"])._asJQuery())._focus();
  474. return self}, function($ctx1) {$ctx1.fill(self,"focus",{}, smalltalk.HLFocusableWidget)})},
  475. args: [],
  476. source: "focus\x0a\x09hiddenInput asJQuery focus",
  477. messageSends: ["focus", "asJQuery"],
  478. referencedClasses: []
  479. }),
  480. smalltalk.HLFocusableWidget);
  481. smalltalk.addMethod(
  482. "_focusClass",
  483. smalltalk.method({
  484. selector: "focusClass",
  485. category: 'accessing',
  486. fn: function (){
  487. var self=this;
  488. return smalltalk.withContext(function($ctx1) { return "focused";
  489. }, function($ctx1) {$ctx1.fill(self,"focusClass",{}, smalltalk.HLFocusableWidget)})},
  490. args: [],
  491. source: "focusClass\x0a\x09^ 'focused'",
  492. messageSends: [],
  493. referencedClasses: []
  494. }),
  495. smalltalk.HLFocusableWidget);
  496. smalltalk.addMethod(
  497. "_hasFocus",
  498. smalltalk.method({
  499. selector: "hasFocus",
  500. category: 'events',
  501. fn: function (){
  502. var self=this;
  503. return smalltalk.withContext(function($ctx1) { var $1;
  504. $1=_st(_st(_st(self)._wrapper())._notNil())._and_((function(){
  505. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(self)._wrapper())._asJQuery())._hasClass_(_st(self)._focusClass());
  506. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  507. return $1;
  508. }, function($ctx1) {$ctx1.fill(self,"hasFocus",{}, smalltalk.HLFocusableWidget)})},
  509. args: [],
  510. source: "hasFocus\x0a\x09^ self wrapper notNil and: [ self wrapper asJQuery hasClass: self focusClass ]",
  511. messageSends: ["and:", "hasClass:", "focusClass", "asJQuery", "wrapper", "notNil"],
  512. referencedClasses: []
  513. }),
  514. smalltalk.HLFocusableWidget);
  515. smalltalk.addMethod(
  516. "_renderContentOn_",
  517. smalltalk.method({
  518. selector: "renderContentOn:",
  519. category: 'rendering',
  520. fn: function (html){
  521. var self=this;
  522. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLFocusableWidget)})},
  523. args: ["html"],
  524. source: "renderContentOn: html",
  525. messageSends: [],
  526. referencedClasses: []
  527. }),
  528. smalltalk.HLFocusableWidget);
  529. smalltalk.addMethod(
  530. "_renderHiddenInputOn_",
  531. smalltalk.method({
  532. selector: "renderHiddenInputOn:",
  533. category: 'rendering',
  534. fn: function (html){
  535. var self=this;
  536. return smalltalk.withContext(function($ctx1) { var $1,$2;
  537. $1=_st(html)._input();
  538. _st($1)._style_("position: absolute; left: -100000px;");
  539. _st($1)._onBlur_((function(){
  540. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(self)._wrapper())._asJQuery())._removeClass_(_st(self)._focusClass());
  541. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  542. $2=_st($1)._onFocus_((function(){
  543. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(self)._wrapper())._asJQuery())._addClass_(_st(self)._focusClass());
  544. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  545. self["@hiddenInput"]=$2;
  546. return self}, function($ctx1) {$ctx1.fill(self,"renderHiddenInputOn:",{html:html}, smalltalk.HLFocusableWidget)})},
  547. args: ["html"],
  548. source: "renderHiddenInputOn: html\x0a\x09hiddenInput := html input\x0a \x09style: 'position: absolute; left: -100000px;';\x0a \x09onBlur: [ self wrapper asJQuery removeClass: self focusClass ];\x0a onFocus: [ self wrapper asJQuery addClass: self focusClass ]",
  549. messageSends: ["style:", "input", "onBlur:", "removeClass:", "focusClass", "asJQuery", "wrapper", "onFocus:", "addClass:"],
  550. referencedClasses: []
  551. }),
  552. smalltalk.HLFocusableWidget);
  553. smalltalk.addMethod(
  554. "_renderOn_",
  555. smalltalk.method({
  556. selector: "renderOn:",
  557. category: 'rendering',
  558. fn: function (html){
  559. var self=this;
  560. return smalltalk.withContext(function($ctx1) { var $1,$2;
  561. _st(self)._registerBindings();
  562. _st(self)._renderHiddenInputOn_(html);
  563. $1=_st(html)._div();
  564. _st($1)._class_("hl_widget");
  565. _st($1)._onClick_((function(){
  566. return smalltalk.withContext(function($ctx2) { return _st(_st(self["@hiddenInput"])._asJQuery())._focus();
  567. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  568. $2=_st($1)._with_((function(){
  569. return smalltalk.withContext(function($ctx2) { return _st(self)._renderContentOn_(html);
  570. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  571. self["@wrapper"]=$2;
  572. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html}, smalltalk.HLFocusableWidget)})},
  573. args: ["html"],
  574. source: "renderOn: html\x0a\x09self registerBindings.\x0a\x09self renderHiddenInputOn: html.\x0a \x0a wrapper := html div \x0a \x09class: 'hl_widget'; \x0a onClick: [ hiddenInput asJQuery focus ];\x0a with: [\x0a\x09\x09\x09self renderContentOn: html ]",
  575. messageSends: ["registerBindings", "renderHiddenInputOn:", "class:", "div", "onClick:", "focus", "asJQuery", "with:", "renderContentOn:"],
  576. referencedClasses: []
  577. }),
  578. smalltalk.HLFocusableWidget);
  579. smalltalk.addClass('HLListWidget', smalltalk.HLFocusableWidget, ['items', 'selectedItem', 'mapping'], 'Helios-Core');
  580. smalltalk.addMethod(
  581. "_activateFirstListItem",
  582. smalltalk.method({
  583. selector: "activateFirstListItem",
  584. category: 'actions',
  585. fn: function (){
  586. var self=this;
  587. return smalltalk.withContext(function($ctx1) { _st(self)._activateListItem_(_st(window)._jQuery_(_st(_st(_st(self["@wrapper"])._asJQuery())._find_("li"))._get_((0))));
  588. return self}, function($ctx1) {$ctx1.fill(self,"activateFirstListItem",{}, smalltalk.HLListWidget)})},
  589. args: [],
  590. source: "activateFirstListItem\x0a\x09self activateListItem: (window jQuery: ((wrapper asJQuery find: 'li') get: 0))",
  591. messageSends: ["activateListItem:", "jQuery:", "get:", "find:", "asJQuery"],
  592. referencedClasses: []
  593. }),
  594. smalltalk.HLListWidget);
  595. smalltalk.addMethod(
  596. "_activateItem_",
  597. smalltalk.method({
  598. selector: "activateItem:",
  599. category: 'actions',
  600. fn: function (anObject){
  601. var self=this;
  602. return smalltalk.withContext(function($ctx1) { var $1;
  603. var $early={};
  604. try {
  605. _st(self)._activateListItem_(_st(_st(self["@mapping"])._at_ifAbsent_(anObject,(function(){
  606. return smalltalk.withContext(function($ctx2) { $1=self;
  607. throw $early=[$1];
  608. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._asJQuery());
  609. return self}
  610. catch(e) {if(e===$early)return e[0]; throw e}
  611. }, function($ctx1) {$ctx1.fill(self,"activateItem:",{anObject:anObject},smalltalk.HLListWidget)})},
  612. args: ["anObject"],
  613. source: "activateItem: anObject\x0a\x09self activateListItem: (mapping \x0a\x09\x09at: anObject\x0a\x09\x09ifAbsent: [ ^ self ]) asJQuery",
  614. messageSends: ["activateListItem:", "asJQuery", "at:ifAbsent:"],
  615. referencedClasses: []
  616. }),
  617. smalltalk.HLListWidget);
  618. smalltalk.addMethod(
  619. "_activateListItem_",
  620. smalltalk.method({
  621. selector: "activateListItem:",
  622. category: 'actions',
  623. fn: function (aListItem){
  624. var self=this;
  625. var parent,position,item;
  626. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5;
  627. $1=_st(aListItem)._get_((0));
  628. if(($receiver = $1) == nil || $receiver == undefined){
  629. $2=self;
  630. return $2;
  631. } else {
  632. $1;
  633. };
  634. position=_st(self)._positionOf_(aListItem);
  635. parent=_st(aListItem)._parent();
  636. _st(_st(parent)._children())._removeClass_("active");
  637. _st(aListItem)._addClass_("active");
  638. $3=_st(_st(_st(aListItem)._position())._top()).__lt((0));
  639. if(smalltalk.assert($3)){
  640. _st(_st(parent)._get_((0)))._scrollTop_(_st(_st(_st(_st(parent)._get_((0)))._scrollTop()).__plus(_st(_st(aListItem)._position())._top())).__minus((10)));
  641. };
  642. $4=_st(_st(_st(_st(aListItem)._position())._top()).__plus(_st(aListItem)._height())).__gt(_st(parent)._height());
  643. if(smalltalk.assert($4)){
  644. _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)));
  645. };
  646. item=_st(_st(self)._items())._at_(_st(_st(aListItem)._attr_("list-data"))._asNumber());
  647. $5=_st(_st(self)._selectedItem()).__eq_eq(item);
  648. if(! smalltalk.assert($5)){
  649. _st(self)._selectItem_(item);
  650. };
  651. return self}, function($ctx1) {$ctx1.fill(self,"activateListItem:",{aListItem:aListItem,parent:parent,position:position,item:item},smalltalk.HLListWidget)})},
  652. args: ["aListItem"],
  653. source: "activateListItem: aListItem\x0a\x09| parent position item |\x0a \x0a\x09(aListItem get: 0) ifNil: [ ^self ].\x0a\x0a\x09position := self positionOf: aListItem.\x0a\x0a parent := aListItem parent.\x0a\x09parent children removeClass: 'active'.\x0a\x09aListItem addClass: 'active'.\x0a \x0a \x22Move the scrollbar to show the active element\x22\x0a aListItem position top < 0 ifTrue: [\x0a\x09\x09(parent get: 0) scrollTop: ((parent get: 0) scrollTop + aListItem position top - 10) ].\x0a aListItem position top + aListItem height > parent height ifTrue: [ \x0a\x09\x09(parent get: 0) scrollTop: ((parent get: 0) scrollTop + aListItem height - (parent height - aListItem position top)) +10 ].\x0a \x0a \x22Activate the corresponding item\x22\x0a item := (self items at: (aListItem attr: 'list-data') asNumber).\x0a self selectedItem == item ifFalse: [\x0a\x09 self selectItem: item ]",
  654. messageSends: ["ifNil:", "get:", "positionOf:", "parent", "removeClass:", "children", "addClass:", "ifTrue:", "scrollTop:", "-", "+", "top", "position", "scrollTop", "<", "height", ">", "at:", "asNumber", "attr:", "items", "ifFalse:", "selectItem:", "==", "selectedItem"],
  655. referencedClasses: []
  656. }),
  657. smalltalk.HLListWidget);
  658. smalltalk.addMethod(
  659. "_cssClassForItem_",
  660. smalltalk.method({
  661. selector: "cssClassForItem:",
  662. category: 'accessing',
  663. fn: function (anObject){
  664. var self=this;
  665. return smalltalk.withContext(function($ctx1) { var $2,$1;
  666. $2=_st(_st(self)._selectedItem()).__eq(anObject);
  667. if(smalltalk.assert($2)){
  668. $1="active";
  669. } else {
  670. $1="inactive";
  671. };
  672. return $1;
  673. }, function($ctx1) {$ctx1.fill(self,"cssClassForItem:",{anObject:anObject}, smalltalk.HLListWidget)})},
  674. args: ["anObject"],
  675. source: "cssClassForItem: anObject\x0a\x09^ self selectedItem = anObject\x0a\x09\x09\x09ifTrue: [ 'active' ]\x0a\x09\x09\x09ifFalse: [ 'inactive' ]",
  676. messageSends: ["ifTrue:ifFalse:", "=", "selectedItem"],
  677. referencedClasses: []
  678. }),
  679. smalltalk.HLListWidget);
  680. smalltalk.addMethod(
  681. "_defaultItems",
  682. smalltalk.method({
  683. selector: "defaultItems",
  684. category: 'defaults',
  685. fn: function (){
  686. var self=this;
  687. return smalltalk.withContext(function($ctx1) { return [];
  688. }, function($ctx1) {$ctx1.fill(self,"defaultItems",{}, smalltalk.HLListWidget)})},
  689. args: [],
  690. source: "defaultItems\x0a\x09^ #()",
  691. messageSends: [],
  692. referencedClasses: []
  693. }),
  694. smalltalk.HLListWidget);
  695. smalltalk.addMethod(
  696. "_focus",
  697. smalltalk.method({
  698. selector: "focus",
  699. category: 'actions',
  700. fn: function (){
  701. var self=this;
  702. return smalltalk.withContext(function($ctx1) { var $1,$2;
  703. smalltalk.HLFocusableWidget.fn.prototype._focus.apply(_st(self), []);
  704. $1=_st(_st(self)._items())._isEmpty();
  705. if(! smalltalk.assert($1)){
  706. $2=_st(self)._selectedItem();
  707. if(($receiver = $2) == nil || $receiver == undefined){
  708. _st(self)._activateFirstListItem();
  709. } else {
  710. $2;
  711. };
  712. };
  713. return self}, function($ctx1) {$ctx1.fill(self,"focus",{}, smalltalk.HLListWidget)})},
  714. args: [],
  715. source: "focus\x0a\x09super focus.\x0a self items isEmpty ifFalse: [ \x0a\x09\x09self selectedItem ifNil: [ self activateFirstListItem ] ]",
  716. messageSends: ["focus", "ifFalse:", "ifNil:", "activateFirstListItem", "selectedItem", "isEmpty", "items"],
  717. referencedClasses: []
  718. }),
  719. smalltalk.HLListWidget);
  720. smalltalk.addMethod(
  721. "_iconForItem_",
  722. smalltalk.method({
  723. selector: "iconForItem:",
  724. category: 'accessing',
  725. fn: function (anObject){
  726. var self=this;
  727. return smalltalk.withContext(function($ctx1) { return "";
  728. }, function($ctx1) {$ctx1.fill(self,"iconForItem:",{anObject:anObject}, smalltalk.HLListWidget)})},
  729. args: ["anObject"],
  730. source: "iconForItem: anObject\x0a\x09^ ''",
  731. messageSends: [],
  732. referencedClasses: []
  733. }),
  734. smalltalk.HLListWidget);
  735. smalltalk.addMethod(
  736. "_initialize",
  737. smalltalk.method({
  738. selector: "initialize",
  739. category: 'initialization',
  740. fn: function (){
  741. var self=this;
  742. return smalltalk.withContext(function($ctx1) { smalltalk.HLFocusableWidget.fn.prototype._initialize.apply(_st(self), []);
  743. self["@mapping"]=_st((smalltalk.Dictionary || Dictionary))._new();
  744. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLListWidget)})},
  745. args: [],
  746. source: "initialize\x0a\x09super initialize.\x0a\x09\x0a\x09mapping := Dictionary new.",
  747. messageSends: ["initialize", "new"],
  748. referencedClasses: ["Dictionary"]
  749. }),
  750. smalltalk.HLListWidget);
  751. smalltalk.addMethod(
  752. "_items",
  753. smalltalk.method({
  754. selector: "items",
  755. category: 'accessing',
  756. fn: function (){
  757. var self=this;
  758. return smalltalk.withContext(function($ctx1) { var $2,$1;
  759. $2=self["@items"];
  760. if(($receiver = $2) == nil || $receiver == undefined){
  761. self["@items"]=_st(self)._defaultItems();
  762. $1=self["@items"];
  763. } else {
  764. $1=$2;
  765. };
  766. return $1;
  767. }, function($ctx1) {$ctx1.fill(self,"items",{}, smalltalk.HLListWidget)})},
  768. args: [],
  769. source: "items\x0a\x09^ items ifNil: [ items := self defaultItems ]",
  770. messageSends: ["ifNil:", "defaultItems"],
  771. referencedClasses: []
  772. }),
  773. smalltalk.HLListWidget);
  774. smalltalk.addMethod(
  775. "_items_",
  776. smalltalk.method({
  777. selector: "items:",
  778. category: 'accessing',
  779. fn: function (aCollection){
  780. var self=this;
  781. return smalltalk.withContext(function($ctx1) { self["@items"]=aCollection;
  782. return self}, function($ctx1) {$ctx1.fill(self,"items:",{aCollection:aCollection}, smalltalk.HLListWidget)})},
  783. args: ["aCollection"],
  784. source: "items: aCollection\x0a\x09items := aCollection",
  785. messageSends: [],
  786. referencedClasses: []
  787. }),
  788. smalltalk.HLListWidget);
  789. smalltalk.addMethod(
  790. "_positionOf_",
  791. smalltalk.method({
  792. selector: "positionOf:",
  793. category: 'accessing',
  794. fn: function (aListItem){
  795. var self=this;
  796. return smalltalk.withContext(function($ctx1) {
  797. return aListItem.parent().children().get().indexOf(aListItem.get(0)) + 1
  798. ;
  799. return self}, function($ctx1) {$ctx1.fill(self,"positionOf:",{aListItem:aListItem}, smalltalk.HLListWidget)})},
  800. args: ["aListItem"],
  801. source: "positionOf: aListItem\x0a\x09<\x0a \x09return aListItem.parent().children().get().indexOf(aListItem.get(0)) + 1\x0a\x09>",
  802. messageSends: [],
  803. referencedClasses: []
  804. }),
  805. smalltalk.HLListWidget);
  806. smalltalk.addMethod(
  807. "_registerMappingFrom_to_",
  808. smalltalk.method({
  809. selector: "registerMappingFrom:to:",
  810. category: 'private',
  811. fn: function (anObject,aTag){
  812. var self=this;
  813. return smalltalk.withContext(function($ctx1) { _st(self["@mapping"])._at_put_(anObject,aTag);
  814. return self}, function($ctx1) {$ctx1.fill(self,"registerMappingFrom:to:",{anObject:anObject,aTag:aTag},smalltalk.HLListWidget)})},
  815. args: ["anObject", "aTag"],
  816. source: "registerMappingFrom: anObject to: aTag\x0a\x09mapping at: anObject put: aTag",
  817. messageSends: ["at:put:"],
  818. referencedClasses: []
  819. }),
  820. smalltalk.HLListWidget);
  821. smalltalk.addMethod(
  822. "_renderButtonsOn_",
  823. smalltalk.method({
  824. selector: "renderButtonsOn:",
  825. category: 'rendering',
  826. fn: function (html){
  827. var self=this;
  828. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html}, smalltalk.HLListWidget)})},
  829. args: ["html"],
  830. source: "renderButtonsOn: html",
  831. messageSends: [],
  832. referencedClasses: []
  833. }),
  834. smalltalk.HLListWidget);
  835. smalltalk.addMethod(
  836. "_renderContentOn_",
  837. smalltalk.method({
  838. selector: "renderContentOn:",
  839. category: 'rendering',
  840. fn: function (html){
  841. var self=this;
  842. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  843. $1=_st(html)._ul();
  844. _st($1)._class_("nav nav-pills nav-stacked");
  845. $2=_st($1)._with_((function(){
  846. return smalltalk.withContext(function($ctx2) { return _st(self)._renderListOn_(html);
  847. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  848. $3=_st(html)._div();
  849. _st($3)._class_("pane_actions form-actions");
  850. $4=_st($3)._with_((function(){
  851. return smalltalk.withContext(function($ctx2) { return _st(self)._renderButtonsOn_(html);
  852. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  853. _st(self)._setupKeyBindings();
  854. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLListWidget)})},
  855. args: ["html"],
  856. source: "renderContentOn: html\x0a\x09html ul \x0a \x09class: 'nav nav-pills nav-stacked';\x0a with: [ self renderListOn: html ].\x0a html div class: 'pane_actions form-actions'; with: [\x0a \x09self renderButtonsOn: html ].\x0a \x0a self setupKeyBindings",
  857. messageSends: ["class:", "ul", "with:", "renderListOn:", "div", "renderButtonsOn:", "setupKeyBindings"],
  858. referencedClasses: []
  859. }),
  860. smalltalk.HLListWidget);
  861. smalltalk.addMethod(
  862. "_renderItem_on_",
  863. smalltalk.method({
  864. selector: "renderItem:on:",
  865. category: 'rendering',
  866. fn: function (anObject,html){
  867. var self=this;
  868. var li;
  869. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$2;
  870. li=_st(html)._li();
  871. _st(self)._registerMappingFrom_to_(anObject,li);
  872. $1=li;
  873. _st($1)._class_(_st(self)._cssClassForItem_(anObject));
  874. _st($1)._at_put_("list-data",_st(_st(_st(self)._items())._indexOf_(anObject))._asString());
  875. $2=_st($1)._with_((function(){
  876. return smalltalk.withContext(function($ctx2) { $3=_st(html)._a();
  877. _st($3)._with_((function(){
  878. return smalltalk.withContext(function($ctx3) { _st(_st(html)._tag_("i"))._class_(_st(self)._iconForItem_(anObject));
  879. return _st(self)._renderItemLabel_on_(anObject,html);
  880. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  881. $4=_st($3)._onClick_((function(){
  882. return smalltalk.withContext(function($ctx3) { return _st(self)._activateListItem_(_st(li)._asJQuery());
  883. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  884. return $4;
  885. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  886. return self}, function($ctx1) {$ctx1.fill(self,"renderItem:on:",{anObject:anObject,html:html,li:li},smalltalk.HLListWidget)})},
  887. args: ["anObject", "html"],
  888. source: "renderItem: anObject on: html\x0a\x09| li |\x0a \x0a\x09li := html li.\x0a\x09self registerMappingFrom: anObject to: li.\x0a\x09\x0a li\x0a \x09class: (self cssClassForItem: anObject);\x0a at: 'list-data' put: (self items indexOf: anObject) asString;\x0a with: [ \x0a \x09html a\x0a \x09with: [ \x0a \x09\x09(html tag: 'i') class: (self iconForItem: anObject).\x0a \x09\x09\x09\x09\x09self renderItemLabel: anObject on: html ];\x0a\x09\x09\x09\x09onClick: [\x0a \x09self activateListItem: li asJQuery ] ]",
  889. messageSends: ["li", "registerMappingFrom:to:", "class:", "cssClassForItem:", "at:put:", "asString", "indexOf:", "items", "with:", "iconForItem:", "tag:", "renderItemLabel:on:", "a", "onClick:", "activateListItem:", "asJQuery"],
  890. referencedClasses: []
  891. }),
  892. smalltalk.HLListWidget);
  893. smalltalk.addMethod(
  894. "_renderItemLabel_on_",
  895. smalltalk.method({
  896. selector: "renderItemLabel:on:",
  897. category: 'rendering',
  898. fn: function (anObject,html){
  899. var self=this;
  900. return smalltalk.withContext(function($ctx1) { _st(html)._with_(_st(anObject)._asString());
  901. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{anObject:anObject,html:html}, smalltalk.HLListWidget)})},
  902. args: ["anObject", "html"],
  903. source: "renderItemLabel: anObject on: html\x0a\x09html with: anObject asString",
  904. messageSends: ["with:", "asString"],
  905. referencedClasses: []
  906. }),
  907. smalltalk.HLListWidget);
  908. smalltalk.addMethod(
  909. "_renderListOn_",
  910. smalltalk.method({
  911. selector: "renderListOn:",
  912. category: 'rendering',
  913. fn: function (html){
  914. var self=this;
  915. return smalltalk.withContext(function($ctx1) { self["@mapping"]=_st((smalltalk.Dictionary || Dictionary))._new();
  916. _st(_st(self)._items())._do_((function(each){
  917. return smalltalk.withContext(function($ctx2) { return _st(self)._renderItem_on_(each,html);
  918. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  919. return self}, function($ctx1) {$ctx1.fill(self,"renderListOn:",{html:html},smalltalk.HLListWidget)})},
  920. args: ["html"],
  921. source: "renderListOn: html\x0a\x09mapping := Dictionary new.\x0a\x09\x0a\x09self items do: [ :each | \x0a \x09self renderItem: each on: html ]",
  922. messageSends: ["new", "do:", "renderItem:on:", "items"],
  923. referencedClasses: ["Dictionary"]
  924. }),
  925. smalltalk.HLListWidget);
  926. smalltalk.addMethod(
  927. "_selectItem_",
  928. smalltalk.method({
  929. selector: "selectItem:",
  930. category: 'actions',
  931. fn: function (anObject){
  932. var self=this;
  933. return smalltalk.withContext(function($ctx1) { _st(self)._selectedItem_(anObject);
  934. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{anObject:anObject}, smalltalk.HLListWidget)})},
  935. args: ["anObject"],
  936. source: "selectItem: anObject\x0a\x09self selectedItem: anObject",
  937. messageSends: ["selectedItem:"],
  938. referencedClasses: []
  939. }),
  940. smalltalk.HLListWidget);
  941. smalltalk.addMethod(
  942. "_selectedItem",
  943. smalltalk.method({
  944. selector: "selectedItem",
  945. category: 'accessing',
  946. fn: function (){
  947. var self=this;
  948. return smalltalk.withContext(function($ctx1) { var $1;
  949. $1=self["@selectedItem"];
  950. return $1;
  951. }, function($ctx1) {$ctx1.fill(self,"selectedItem",{}, smalltalk.HLListWidget)})},
  952. args: [],
  953. source: "selectedItem\x0a\x09^ selectedItem",
  954. messageSends: [],
  955. referencedClasses: []
  956. }),
  957. smalltalk.HLListWidget);
  958. smalltalk.addMethod(
  959. "_selectedItem_",
  960. smalltalk.method({
  961. selector: "selectedItem:",
  962. category: 'accessing',
  963. fn: function (anObject){
  964. var self=this;
  965. return smalltalk.withContext(function($ctx1) { self["@selectedItem"]=anObject;
  966. return self}, function($ctx1) {$ctx1.fill(self,"selectedItem:",{anObject:anObject}, smalltalk.HLListWidget)})},
  967. args: ["anObject"],
  968. source: "selectedItem: anObject\x0a\x09selectedItem := anObject",
  969. messageSends: [],
  970. referencedClasses: []
  971. }),
  972. smalltalk.HLListWidget);
  973. smalltalk.addMethod(
  974. "_setupKeyBindings",
  975. smalltalk.method({
  976. selector: "setupKeyBindings",
  977. category: 'events',
  978. fn: function (){
  979. var self=this;
  980. var next;
  981. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  982. _st(_st(self["@hiddenInput"])._asJQuery())._unbind_("keydown");
  983. _st(_st(self["@hiddenInput"])._asJQuery())._keydown_((function(e){
  984. var selected;
  985. return smalltalk.withContext(function($ctx2) { selected=_st(window)._jQuery_(".focused .nav-pills .active");
  986. selected;
  987. $1=_st(_st(e)._which()).__eq((38));
  988. if(smalltalk.assert($1)){
  989. _st(self)._activateListItem_(_st(selected)._prev());
  990. };
  991. $2=_st(_st(e)._which()).__eq((40));
  992. if(smalltalk.assert($2)){
  993. next=_st(selected)._next();
  994. next;
  995. $3=_st(next)._get_((0));
  996. if(($receiver = $3) == nil || $receiver == undefined){
  997. next=_st(window)._jQuery_(".focused .nav-pills li:first-child");
  998. next;
  999. } else {
  1000. $3;
  1001. };
  1002. return _st(self)._activateListItem_(next);
  1003. };
  1004. }, function($ctx2) {$ctx2.fillBlock({e:e,selected:selected},$ctx1)})}));
  1005. return self}, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{next:next}, smalltalk.HLListWidget)})},
  1006. args: [],
  1007. source: "setupKeyBindings\x0a\x09| next |\x0a\x09hiddenInput asJQuery unbind: 'keydown'.\x0a\x0a\x09hiddenInput asJQuery keydown: [ :e | | selected |\x0a \x09selected := window jQuery: '.focused .nav-pills .active'.\x0a e which = 38 ifTrue: [ \x0a \x09self activateListItem: selected prev ].\x0a \x09e which = 40 ifTrue: [\x0a \x09next := selected next.\x0a (next get: 0) ifNil: [ next := window jQuery: '.focused .nav-pills li:first-child' ].\x0a\x09\x09\x09self activateListItem: next ] ]",
  1008. messageSends: ["unbind:", "asJQuery", "keydown:", "jQuery:", "ifTrue:", "activateListItem:", "prev", "=", "which", "next", "ifNil:", "get:"],
  1009. referencedClasses: []
  1010. }),
  1011. smalltalk.HLListWidget);
  1012. smalltalk.addClass('HLNavigationListWidget', smalltalk.HLListWidget, ['previous', 'next'], 'Helios-Core');
  1013. smalltalk.addMethod(
  1014. "_next",
  1015. smalltalk.method({
  1016. selector: "next",
  1017. category: 'accessing',
  1018. fn: function (){
  1019. var self=this;
  1020. return smalltalk.withContext(function($ctx1) { var $1;
  1021. $1=self["@next"];
  1022. return $1;
  1023. }, function($ctx1) {$ctx1.fill(self,"next",{}, smalltalk.HLNavigationListWidget)})},
  1024. args: [],
  1025. source: "next\x0a\x09^ next",
  1026. messageSends: [],
  1027. referencedClasses: []
  1028. }),
  1029. smalltalk.HLNavigationListWidget);
  1030. smalltalk.addMethod(
  1031. "_next_",
  1032. smalltalk.method({
  1033. selector: "next:",
  1034. category: 'accessing',
  1035. fn: function (aWidget){
  1036. var self=this;
  1037. return smalltalk.withContext(function($ctx1) { var $1;
  1038. self["@next"]=aWidget;
  1039. $1=_st(_st(aWidget)._previous()).__eq(self);
  1040. if(! smalltalk.assert($1)){
  1041. _st(aWidget)._previous_(self);
  1042. };
  1043. return self}, function($ctx1) {$ctx1.fill(self,"next:",{aWidget:aWidget}, smalltalk.HLNavigationListWidget)})},
  1044. args: ["aWidget"],
  1045. source: "next: aWidget\x0a\x09next := aWidget.\x0a aWidget previous = self ifFalse: [ aWidget previous: self ]",
  1046. messageSends: ["ifFalse:", "previous:", "=", "previous"],
  1047. referencedClasses: []
  1048. }),
  1049. smalltalk.HLNavigationListWidget);
  1050. smalltalk.addMethod(
  1051. "_nextFocus",
  1052. smalltalk.method({
  1053. selector: "nextFocus",
  1054. category: 'actions',
  1055. fn: function (){
  1056. var self=this;
  1057. return smalltalk.withContext(function($ctx1) { var $1;
  1058. $1=_st(self)._next();
  1059. if(($receiver = $1) == nil || $receiver == undefined){
  1060. $1;
  1061. } else {
  1062. _st(_st(self)._next())._focus();
  1063. };
  1064. return self}, function($ctx1) {$ctx1.fill(self,"nextFocus",{}, smalltalk.HLNavigationListWidget)})},
  1065. args: [],
  1066. source: "nextFocus\x0a\x09self next ifNotNil: [ self next focus ]",
  1067. messageSends: ["ifNotNil:", "focus", "next"],
  1068. referencedClasses: []
  1069. }),
  1070. smalltalk.HLNavigationListWidget);
  1071. smalltalk.addMethod(
  1072. "_previous",
  1073. smalltalk.method({
  1074. selector: "previous",
  1075. category: 'accessing',
  1076. fn: function (){
  1077. var self=this;
  1078. return smalltalk.withContext(function($ctx1) { var $1;
  1079. $1=self["@previous"];
  1080. return $1;
  1081. }, function($ctx1) {$ctx1.fill(self,"previous",{}, smalltalk.HLNavigationListWidget)})},
  1082. args: [],
  1083. source: "previous\x0a\x09^ previous",
  1084. messageSends: [],
  1085. referencedClasses: []
  1086. }),
  1087. smalltalk.HLNavigationListWidget);
  1088. smalltalk.addMethod(
  1089. "_previous_",
  1090. smalltalk.method({
  1091. selector: "previous:",
  1092. category: 'accessing',
  1093. fn: function (aWidget){
  1094. var self=this;
  1095. return smalltalk.withContext(function($ctx1) { var $1;
  1096. self["@previous"]=aWidget;
  1097. $1=_st(_st(aWidget)._next()).__eq(self);
  1098. if(! smalltalk.assert($1)){
  1099. _st(aWidget)._next_(self);
  1100. };
  1101. return self}, function($ctx1) {$ctx1.fill(self,"previous:",{aWidget:aWidget}, smalltalk.HLNavigationListWidget)})},
  1102. args: ["aWidget"],
  1103. source: "previous: aWidget\x0a\x09previous := aWidget.\x0a aWidget next = self ifFalse: [ aWidget next: self ]",
  1104. messageSends: ["ifFalse:", "next:", "=", "next"],
  1105. referencedClasses: []
  1106. }),
  1107. smalltalk.HLNavigationListWidget);
  1108. smalltalk.addMethod(
  1109. "_previousFocus",
  1110. smalltalk.method({
  1111. selector: "previousFocus",
  1112. category: 'actions',
  1113. fn: function (){
  1114. var self=this;
  1115. return smalltalk.withContext(function($ctx1) { var $1;
  1116. $1=_st(self)._previous();
  1117. if(($receiver = $1) == nil || $receiver == undefined){
  1118. $1;
  1119. } else {
  1120. _st(_st(self)._previous())._focus();
  1121. };
  1122. return self}, function($ctx1) {$ctx1.fill(self,"previousFocus",{}, smalltalk.HLNavigationListWidget)})},
  1123. args: [],
  1124. source: "previousFocus\x0a\x09self previous ifNotNil: [ self previous focus ]",
  1125. messageSends: ["ifNotNil:", "focus", "previous"],
  1126. referencedClasses: []
  1127. }),
  1128. smalltalk.HLNavigationListWidget);
  1129. smalltalk.addMethod(
  1130. "_setupKeyBindings",
  1131. smalltalk.method({
  1132. selector: "setupKeyBindings",
  1133. category: 'events',
  1134. fn: function (){
  1135. var self=this;
  1136. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1137. smalltalk.HLListWidget.fn.prototype._setupKeyBindings.apply(_st(self), []);
  1138. _st(_st(self["@hiddenInput"])._asJQuery())._keydown_((function(e){
  1139. return smalltalk.withContext(function($ctx2) { $1=_st(_st(e)._which()).__eq((39));
  1140. if(smalltalk.assert($1)){
  1141. _st(self)._nextFocus();
  1142. };
  1143. $2=_st(_st(e)._which()).__eq((37));
  1144. if(smalltalk.assert($2)){
  1145. return _st(self)._previousFocus();
  1146. };
  1147. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1)})}));
  1148. return self}, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{}, smalltalk.HLNavigationListWidget)})},
  1149. args: [],
  1150. source: "setupKeyBindings\x0a\x09super setupKeyBindings.\x0a\x0a\x09hiddenInput asJQuery keydown: [ :e |\x0a e which = 39 ifTrue: [ \x0a \x09self nextFocus ].\x0a\x09\x09e which = 37 ifTrue: [ \x0a \x09self previousFocus ] ]",
  1151. messageSends: ["setupKeyBindings", "keydown:", "ifTrue:", "nextFocus", "=", "which", "previousFocus", "asJQuery"],
  1152. referencedClasses: []
  1153. }),
  1154. smalltalk.HLNavigationListWidget);
  1155. smalltalk.addClass('HLManager', smalltalk.HLWidget, ['tabs', 'activeTab', 'keyBinder', 'environment', 'history'], 'Helios-Core');
  1156. smalltalk.addMethod(
  1157. "_activate_",
  1158. smalltalk.method({
  1159. selector: "activate:",
  1160. category: 'actions',
  1161. fn: function (aTab){
  1162. var self=this;
  1163. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1164. _st(_st(self)._keyBinder())._flushBindings();
  1165. self["@activeTab"]=aTab;
  1166. $1=self;
  1167. _st($1)._refresh();
  1168. _st($1)._addToHistory_(aTab);
  1169. $2=_st($1)._show_(aTab);
  1170. return self}, function($ctx1) {$ctx1.fill(self,"activate:",{aTab:aTab}, smalltalk.HLManager)})},
  1171. args: ["aTab"],
  1172. source: "activate: aTab\x0a\x09self keyBinder flushBindings.\x0a\x09activeTab := aTab.\x0a\x09\x0a\x09self \x0a\x09\x09refresh;\x0a\x09\x09addToHistory: aTab;\x0a\x09\x09show: aTab",
  1173. messageSends: ["flushBindings", "keyBinder", "refresh", "addToHistory:", "show:"],
  1174. referencedClasses: []
  1175. }),
  1176. smalltalk.HLManager);
  1177. smalltalk.addMethod(
  1178. "_activeTab",
  1179. smalltalk.method({
  1180. selector: "activeTab",
  1181. category: 'accessing',
  1182. fn: function (){
  1183. var self=this;
  1184. return smalltalk.withContext(function($ctx1) { var $1;
  1185. $1=self["@activeTab"];
  1186. return $1;
  1187. }, function($ctx1) {$ctx1.fill(self,"activeTab",{}, smalltalk.HLManager)})},
  1188. args: [],
  1189. source: "activeTab\x0a\x09^ activeTab",
  1190. messageSends: [],
  1191. referencedClasses: []
  1192. }),
  1193. smalltalk.HLManager);
  1194. smalltalk.addMethod(
  1195. "_addTab_",
  1196. smalltalk.method({
  1197. selector: "addTab:",
  1198. category: 'actions',
  1199. fn: function (aTab){
  1200. var self=this;
  1201. return smalltalk.withContext(function($ctx1) { _st(_st(self)._tabs())._add_(aTab);
  1202. _st(self)._activate_(aTab);
  1203. return self}, function($ctx1) {$ctx1.fill(self,"addTab:",{aTab:aTab}, smalltalk.HLManager)})},
  1204. args: ["aTab"],
  1205. source: "addTab: aTab\x0a\x09self tabs add: aTab.\x0a self activate: aTab",
  1206. messageSends: ["add:", "tabs", "activate:"],
  1207. referencedClasses: []
  1208. }),
  1209. smalltalk.HLManager);
  1210. smalltalk.addMethod(
  1211. "_addToHistory_",
  1212. smalltalk.method({
  1213. selector: "addToHistory:",
  1214. category: 'actions',
  1215. fn: function (aTab){
  1216. var self=this;
  1217. return smalltalk.withContext(function($ctx1) { _st(self)._removeFromHistory_(aTab);
  1218. _st(_st(self)._history())._add_(aTab);
  1219. return self}, function($ctx1) {$ctx1.fill(self,"addToHistory:",{aTab:aTab}, smalltalk.HLManager)})},
  1220. args: ["aTab"],
  1221. source: "addToHistory: aTab\x0a\x09self removeFromHistory: aTab.\x0a\x09self history add: aTab",
  1222. messageSends: ["removeFromHistory:", "add:", "history"],
  1223. referencedClasses: []
  1224. }),
  1225. smalltalk.HLManager);
  1226. smalltalk.addMethod(
  1227. "_defaultEnvironment",
  1228. smalltalk.method({
  1229. selector: "defaultEnvironment",
  1230. category: 'defaults',
  1231. fn: function (){
  1232. var self=this;
  1233. return smalltalk.withContext(function($ctx1) { var $1;
  1234. $1=_st((smalltalk.HLLocalEnvironment || HLLocalEnvironment))._new();
  1235. return $1;
  1236. }, function($ctx1) {$ctx1.fill(self,"defaultEnvironment",{}, smalltalk.HLManager)})},
  1237. args: [],
  1238. source: "defaultEnvironment\x0a\x09^ HLLocalEnvironment new",
  1239. messageSends: ["new"],
  1240. referencedClasses: ["HLLocalEnvironment"]
  1241. }),
  1242. smalltalk.HLManager);
  1243. smalltalk.addMethod(
  1244. "_environment",
  1245. smalltalk.method({
  1246. selector: "environment",
  1247. category: 'accessing',
  1248. fn: function (){
  1249. var self=this;
  1250. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1251. $2=self["@environment"];
  1252. if(($receiver = $2) == nil || $receiver == undefined){
  1253. self["@environment"]=_st(self)._defaultEnvironment();
  1254. $1=self["@environment"];
  1255. } else {
  1256. $1=$2;
  1257. };
  1258. return $1;
  1259. }, function($ctx1) {$ctx1.fill(self,"environment",{}, smalltalk.HLManager)})},
  1260. args: [],
  1261. source: "environment\x0a\x09\x22The default environment used by all Helios objects\x22\x0a \x0a\x09^ environment ifNil: [ environment := self defaultEnvironment ]",
  1262. messageSends: ["ifNil:", "defaultEnvironment"],
  1263. referencedClasses: []
  1264. }),
  1265. smalltalk.HLManager);
  1266. smalltalk.addMethod(
  1267. "_environment_",
  1268. smalltalk.method({
  1269. selector: "environment:",
  1270. category: 'accessing',
  1271. fn: function (anEnvironment){
  1272. var self=this;
  1273. return smalltalk.withContext(function($ctx1) { self["@environment"]=anEnvironment;
  1274. return self}, function($ctx1) {$ctx1.fill(self,"environment:",{anEnvironment:anEnvironment}, smalltalk.HLManager)})},
  1275. args: ["anEnvironment"],
  1276. source: "environment: anEnvironment\x0a\x09environment := anEnvironment",
  1277. messageSends: [],
  1278. referencedClasses: []
  1279. }),
  1280. smalltalk.HLManager);
  1281. smalltalk.addMethod(
  1282. "_history",
  1283. smalltalk.method({
  1284. selector: "history",
  1285. category: 'accessing',
  1286. fn: function (){
  1287. var self=this;
  1288. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1289. $2=self["@history"];
  1290. if(($receiver = $2) == nil || $receiver == undefined){
  1291. self["@history"]=_st((smalltalk.OrderedCollection || OrderedCollection))._new();
  1292. $1=self["@history"];
  1293. } else {
  1294. $1=$2;
  1295. };
  1296. return $1;
  1297. }, function($ctx1) {$ctx1.fill(self,"history",{}, smalltalk.HLManager)})},
  1298. args: [],
  1299. source: "history\x0a\x09^ history ifNil: [ history := OrderedCollection new ]",
  1300. messageSends: ["ifNil:", "new"],
  1301. referencedClasses: ["OrderedCollection"]
  1302. }),
  1303. smalltalk.HLManager);
  1304. smalltalk.addMethod(
  1305. "_history_",
  1306. smalltalk.method({
  1307. selector: "history:",
  1308. category: 'accessing',
  1309. fn: function (aCollection){
  1310. var self=this;
  1311. return smalltalk.withContext(function($ctx1) { self["@history"]=aCollection;
  1312. return self}, function($ctx1) {$ctx1.fill(self,"history:",{aCollection:aCollection}, smalltalk.HLManager)})},
  1313. args: ["aCollection"],
  1314. source: "history: aCollection\x0a\x09history := aCollection",
  1315. messageSends: [],
  1316. referencedClasses: []
  1317. }),
  1318. smalltalk.HLManager);
  1319. smalltalk.addMethod(
  1320. "_initialize",
  1321. smalltalk.method({
  1322. selector: "initialize",
  1323. category: 'initialization',
  1324. fn: function (){
  1325. var self=this;
  1326. return smalltalk.withContext(function($ctx1) { smalltalk.HLWidget.fn.prototype._initialize.apply(_st(self), []);
  1327. _st(_st(self)._keyBinder())._setupEvents();
  1328. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.HLManager)})},
  1329. args: [],
  1330. source: "initialize\x0a\x09super initialize.\x0a self keyBinder setupEvents",
  1331. messageSends: ["initialize", "setupEvents", "keyBinder"],
  1332. referencedClasses: []
  1333. }),
  1334. smalltalk.HLManager);
  1335. smalltalk.addMethod(
  1336. "_keyBinder",
  1337. smalltalk.method({
  1338. selector: "keyBinder",
  1339. category: 'accessing',
  1340. fn: function (){
  1341. var self=this;
  1342. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1343. $2=self["@keyBinder"];
  1344. if(($receiver = $2) == nil || $receiver == undefined){
  1345. self["@keyBinder"]=_st((smalltalk.HLKeyBinder || HLKeyBinder))._new();
  1346. $1=self["@keyBinder"];
  1347. } else {
  1348. $1=$2;
  1349. };
  1350. return $1;
  1351. }, function($ctx1) {$ctx1.fill(self,"keyBinder",{}, smalltalk.HLManager)})},
  1352. args: [],
  1353. source: "keyBinder\x0a\x09^ keyBinder ifNil: [ keyBinder := HLKeyBinder new ]",
  1354. messageSends: ["ifNil:", "new"],
  1355. referencedClasses: ["HLKeyBinder"]
  1356. }),
  1357. smalltalk.HLManager);
  1358. smalltalk.addMethod(
  1359. "_refresh",
  1360. smalltalk.method({
  1361. selector: "refresh",
  1362. category: 'rendering',
  1363. fn: function (){
  1364. var self=this;
  1365. return smalltalk.withContext(function($ctx1) { _st(_st(window)._jQuery_(".navbar"))._remove();
  1366. _st(_st(window)._jQuery_("#container"))._remove();
  1367. _st(self)._appendToJQuery_(_st("body")._asJQuery());
  1368. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{}, smalltalk.HLManager)})},
  1369. args: [],
  1370. source: "refresh\x0a\x09(window jQuery: '.navbar') remove.\x0a\x09(window jQuery: '#container') remove.\x0a\x09self appendToJQuery: 'body' asJQuery",
  1371. messageSends: ["remove", "jQuery:", "appendToJQuery:", "asJQuery"],
  1372. referencedClasses: []
  1373. }),
  1374. smalltalk.HLManager);
  1375. smalltalk.addMethod(
  1376. "_removeActiveTab",
  1377. smalltalk.method({
  1378. selector: "removeActiveTab",
  1379. category: 'actions',
  1380. fn: function (){
  1381. var self=this;
  1382. return smalltalk.withContext(function($ctx1) { _st(self)._removeTab_(_st(self)._activeTab());
  1383. return self}, function($ctx1) {$ctx1.fill(self,"removeActiveTab",{}, smalltalk.HLManager)})},
  1384. args: [],
  1385. source: "removeActiveTab\x0a\x09self removeTab: self activeTab",
  1386. messageSends: ["removeTab:", "activeTab"],
  1387. referencedClasses: []
  1388. }),
  1389. smalltalk.HLManager);
  1390. smalltalk.addMethod(
  1391. "_removeFromHistory_",
  1392. smalltalk.method({
  1393. selector: "removeFromHistory:",
  1394. category: 'actions',
  1395. fn: function (aTab){
  1396. var self=this;
  1397. return smalltalk.withContext(function($ctx1) { _st(self)._history_(_st(_st(self)._history())._reject_((function(each){
  1398. return smalltalk.withContext(function($ctx2) { return _st(each).__eq_eq(aTab);
  1399. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})));
  1400. return self}, function($ctx1) {$ctx1.fill(self,"removeFromHistory:",{aTab:aTab}, smalltalk.HLManager)})},
  1401. args: ["aTab"],
  1402. source: "removeFromHistory: aTab\x0a\x09self history: (self history reject: [ :each | each == aTab ])",
  1403. messageSends: ["history:", "reject:", "==", "history"],
  1404. referencedClasses: []
  1405. }),
  1406. smalltalk.HLManager);
  1407. smalltalk.addMethod(
  1408. "_removeTab_",
  1409. smalltalk.method({
  1410. selector: "removeTab:",
  1411. category: 'actions',
  1412. fn: function (aTab){
  1413. var self=this;
  1414. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1415. $1=_st(_st(self)._tabs())._includes_(aTab);
  1416. if(! smalltalk.assert($1)){
  1417. $2=self;
  1418. return $2;
  1419. };
  1420. _st(self)._removeFromHistory_(aTab);
  1421. _st(_st(self)._tabs())._remove_(aTab);
  1422. _st(_st(self)._keyBinder())._flushBindings();
  1423. _st(self)._refresh();
  1424. _st(_st(self)._history())._ifNotEmpty_((function(){
  1425. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(self)._history())._last())._activate();
  1426. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1427. return self}, function($ctx1) {$ctx1.fill(self,"removeTab:",{aTab:aTab},smalltalk.HLManager)})},
  1428. args: ["aTab"],
  1429. source: "removeTab: aTab\x0a\x09(self tabs includes: aTab) ifFalse: [ ^ self ].\x0a\x0a\x09self removeFromHistory: aTab.\x0a\x09self tabs remove: aTab.\x0a\x09self keyBinder flushBindings.\x0a\x09self refresh.\x0a\x09self history ifNotEmpty: [\x0a\x09\x09self history last activate ]",
  1430. messageSends: ["ifFalse:", "includes:", "tabs", "removeFromHistory:", "remove:", "flushBindings", "keyBinder", "refresh", "ifNotEmpty:", "activate", "last", "history"],
  1431. referencedClasses: []
  1432. }),
  1433. smalltalk.HLManager);
  1434. smalltalk.addMethod(
  1435. "_renderAddOn_",
  1436. smalltalk.method({
  1437. selector: "renderAddOn:",
  1438. category: 'rendering',
  1439. fn: function (html){
  1440. var self=this;
  1441. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$5,$7,$8,$6,$2;
  1442. $1=_st(html)._li();
  1443. _st($1)._class_("dropdown");
  1444. $2=_st($1)._with_((function(){
  1445. return smalltalk.withContext(function($ctx2) { $3=_st(html)._a();
  1446. _st($3)._class_("dropdown-toggle");
  1447. _st($3)._at_put_("data-toggle","dropdown");
  1448. $4=_st($3)._with_((function(){
  1449. return smalltalk.withContext(function($ctx3) { _st(html)._with_("Open...");
  1450. return _st(_st(html)._tag_("b"))._class_("caret");
  1451. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1452. $4;
  1453. $5=_st(html)._ul();
  1454. _st($5)._class_("dropdown-menu");
  1455. $6=_st($5)._with_((function(){
  1456. return smalltalk.withContext(function($ctx3) { return _st(_st(_st(_st((smalltalk.HLWidget || HLWidget))._withAllSubclasses())._select_((function(each){
  1457. return smalltalk.withContext(function($ctx4) { return _st(each)._canBeOpenAsTab();
  1458. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx1)})})))._sorted_((function(a,b){
  1459. return smalltalk.withContext(function($ctx4) { return _st(_st(a)._tabPriority()).__lt(_st(b)._tabPriority());
  1460. }, function($ctx4) {$ctx4.fillBlock({a:a,b:b},$ctx1)})})))._do_((function(each){
  1461. return smalltalk.withContext(function($ctx4) { return _st(_st(html)._li())._with_((function(){
  1462. return smalltalk.withContext(function($ctx5) { $7=_st(html)._a();
  1463. _st($7)._with_(_st(each)._tabLabel());
  1464. $8=_st($7)._onClick_((function(){
  1465. return smalltalk.withContext(function($ctx6) { return _st(each)._openAsTab();
  1466. }, function($ctx6) {$ctx6.fillBlock({},$ctx1)})}));
  1467. return $8;
  1468. }, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
  1469. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx1)})}));
  1470. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1471. return $6;
  1472. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1473. return self}, function($ctx1) {$ctx1.fill(self,"renderAddOn:",{html:html}, smalltalk.HLManager)})},
  1474. args: ["html"],
  1475. source: "renderAddOn: html\x0a html li \x0a \x09class: 'dropdown';\x0a with: [ \x0a\x09\x09\x09html a \x0a \x09\x09class: 'dropdown-toggle';\x0a \x09 \x09at: 'data-toggle' put: 'dropdown';\x0a \x09with: [ \x0a \x09\x09html with: 'Open...'.\x0a \x09\x09\x09\x09\x09(html tag: 'b') class: 'caret' ].\x0a html ul \x0a \x09\x09class: 'dropdown-menu';\x0a with: [\x0a \x09((HLWidget withAllSubclasses\x0a \x09select: [ :each | each canBeOpenAsTab ])\x0a sorted: [ :a :b | a tabPriority < b tabPriority ])\x0a do: [ :each |\x0a \x09\x09\x09\x09\x09\x09\x09html li with: [\x0a \x09\x09\x09html a \x0a \x09with: each tabLabel;\x0a \x09\x09\x09\x09\x09\x09\x09\x09onClick: [ each openAsTab ] ] ] ] ]",
  1476. messageSends: ["class:", "li", "with:", "a", "at:put:", "tag:", "ul", "do:", "tabLabel", "onClick:", "openAsTab", "sorted:", "<", "tabPriority", "select:", "canBeOpenAsTab", "withAllSubclasses"],
  1477. referencedClasses: ["HLWidget"]
  1478. }),
  1479. smalltalk.HLManager);
  1480. smalltalk.addMethod(
  1481. "_renderContentOn_",
  1482. smalltalk.method({
  1483. selector: "renderContentOn:",
  1484. category: 'rendering',
  1485. fn: function (html){
  1486. var self=this;
  1487. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$2;
  1488. $1=_st(html)._div();
  1489. _st($1)._class_("navbar navbar-fixed-top");
  1490. $2=_st($1)._with_((function(){
  1491. return smalltalk.withContext(function($ctx2) { $3=_st(html)._div();
  1492. _st($3)._class_("navbar-inner");
  1493. $4=_st($3)._with_((function(){
  1494. return smalltalk.withContext(function($ctx3) { return _st(self)._renderTabsOn_(html);
  1495. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1496. return $4;
  1497. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1498. _st(_st(html)._div())._id_("container");
  1499. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLManager)})},
  1500. args: ["html"],
  1501. source: "renderContentOn: html\x0a\x09html div \x0a\x09\x09class: 'navbar navbar-fixed-top';\x0a\x09\x09with: [ html div \x0a\x09\x09\x09class: 'navbar-inner';\x0a\x09\x09\x09with: [ self renderTabsOn: html ] ].\x0a\x09html div id: 'container'",
  1502. messageSends: ["class:", "div", "with:", "renderTabsOn:", "id:"],
  1503. referencedClasses: []
  1504. }),
  1505. smalltalk.HLManager);
  1506. smalltalk.addMethod(
  1507. "_renderTabsOn_",
  1508. smalltalk.method({
  1509. selector: "renderTabsOn:",
  1510. category: 'rendering',
  1511. fn: function (html){
  1512. var self=this;
  1513. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$6,$5,$8,$9,$7,$2;
  1514. $1=_st(html)._ul();
  1515. _st($1)._class_("nav");
  1516. $2=_st($1)._with_((function(){
  1517. return smalltalk.withContext(function($ctx2) { _st(_st(self)._tabs())._do_((function(each){
  1518. return smalltalk.withContext(function($ctx3) { $3=_st(html)._li();
  1519. $4=$3;
  1520. $6=_st(each)._isActive();
  1521. if(smalltalk.assert($6)){
  1522. $5="active";
  1523. } else {
  1524. $5="inactive";
  1525. };
  1526. _st($4)._class_($5);
  1527. $7=_st($3)._with_((function(){
  1528. return smalltalk.withContext(function($ctx4) { $8=_st(html)._a();
  1529. _st($8)._with_((function(){
  1530. return smalltalk.withContext(function($ctx5) { _st(_st(_st(html)._tag_("i"))._class_("icon-remove"))._onClick_((function(){
  1531. return smalltalk.withContext(function($ctx6) { return _st(self)._removeTab_(each);
  1532. }, function($ctx6) {$ctx6.fillBlock({},$ctx1)})}));
  1533. return _st(html)._with_(_st(each)._displayLabel());
  1534. }, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
  1535. $9=_st($8)._onClick_((function(){
  1536. return smalltalk.withContext(function($ctx5) { return _st(each)._activate();
  1537. }, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
  1538. return $9;
  1539. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  1540. return $7;
  1541. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
  1542. return _st(self)._renderAddOn_(html);
  1543. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1544. return self}, function($ctx1) {$ctx1.fill(self,"renderTabsOn:",{html:html},smalltalk.HLManager)})},
  1545. args: ["html"],
  1546. source: "renderTabsOn: html\x0a\x09html ul \x0a\x09\x09class: 'nav';\x0a\x09\x09with: [ \x0a \x09self tabs do: [ :each |\x0a\x09\x09\x09\x09html li \x0a\x09\x09\x09\x09\x09class: (each isActive ifTrue: [ 'active' ] ifFalse: [ 'inactive' ]);\x0a\x09\x09\x09\x09\x09with: [\x0a\x09\x09\x09\x09\x09\x09html a\x0a\x09\x09\x09\x09\x09\x09\x09with: [\x0a \x09\x09\x09\x09\x09\x09\x09((html tag: 'i') class: 'icon-remove')\x0a \x09\x09\x09\x09\x09\x09\x09\x09\x09onClick: [ self removeTab: each ].\x0a \x09html with: each displayLabel ];\x0a\x09\x09\x09\x09\x09\x09\x09onClick: [ each activate ] ] ].\x0a\x09\x09\x09self renderAddOn: html ]",
  1547. messageSends: ["class:", "ul", "with:", "do:", "ifTrue:ifFalse:", "isActive", "li", "onClick:", "removeTab:", "tag:", "displayLabel", "a", "activate", "tabs", "renderAddOn:"],
  1548. referencedClasses: []
  1549. }),
  1550. smalltalk.HLManager);
  1551. smalltalk.addMethod(
  1552. "_show_",
  1553. smalltalk.method({
  1554. selector: "show:",
  1555. category: 'rendering',
  1556. fn: function (aTab){
  1557. var self=this;
  1558. return smalltalk.withContext(function($ctx1) { _st(_st(window)._jQuery_("#container"))._empty();
  1559. _st(_st(aTab)._widget())._appendToJQuery_(_st("#container")._asJQuery());
  1560. _st(aTab)._focus();
  1561. return self}, function($ctx1) {$ctx1.fill(self,"show:",{aTab:aTab},smalltalk.HLManager)})},
  1562. args: ["aTab"],
  1563. source: "show: aTab\x0a\x09(window jQuery: '#container') empty.\x0a\x09aTab widget appendToJQuery: '#container' asJQuery.\x0a\x09aTab focus",
  1564. messageSends: ["empty", "jQuery:", "appendToJQuery:", "asJQuery", "widget", "focus"],
  1565. referencedClasses: []
  1566. }),
  1567. smalltalk.HLManager);
  1568. smalltalk.addMethod(
  1569. "_tabs",
  1570. smalltalk.method({
  1571. selector: "tabs",
  1572. category: 'accessing',
  1573. fn: function (){
  1574. var self=this;
  1575. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1576. $2=self["@tabs"];
  1577. if(($receiver = $2) == nil || $receiver == undefined){
  1578. self["@tabs"]=_st((smalltalk.OrderedCollection || OrderedCollection))._new();
  1579. $1=self["@tabs"];
  1580. } else {
  1581. $1=$2;
  1582. };
  1583. return $1;
  1584. }, function($ctx1) {$ctx1.fill(self,"tabs",{}, smalltalk.HLManager)})},
  1585. args: [],
  1586. source: "tabs\x0a\x09^ tabs ifNil: [ tabs := OrderedCollection new ]",
  1587. messageSends: ["ifNil:", "new"],
  1588. referencedClasses: ["OrderedCollection"]
  1589. }),
  1590. smalltalk.HLManager);
  1591. smalltalk.HLManager.klass.iVarNames = ['current'];
  1592. smalltalk.addMethod(
  1593. "_current",
  1594. smalltalk.method({
  1595. selector: "current",
  1596. category: 'accessing',
  1597. fn: function (){
  1598. var self=this;
  1599. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1600. $2=self["@current"];
  1601. if(($receiver = $2) == nil || $receiver == undefined){
  1602. self["@current"]=_st(_st(self)._basicNew())._initialize();
  1603. $1=self["@current"];
  1604. } else {
  1605. $1=$2;
  1606. };
  1607. return $1;
  1608. }, function($ctx1) {$ctx1.fill(self,"current",{}, smalltalk.HLManager.klass)})},
  1609. args: [],
  1610. source: "current\x0a\x09^ current ifNil: [ current := self basicNew initialize ]",
  1611. messageSends: ["ifNil:", "initialize", "basicNew"],
  1612. referencedClasses: []
  1613. }),
  1614. smalltalk.HLManager.klass);
  1615. smalltalk.addMethod(
  1616. "_initialize",
  1617. smalltalk.method({
  1618. selector: "initialize",
  1619. category: 'initialization',
  1620. fn: function (){
  1621. var self=this;
  1622. return smalltalk.withContext(function($ctx1) { _st(_st(self)._current())._appendToJQuery_(_st("body")._asJQuery());
  1623. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.HLManager.klass)})},
  1624. args: [],
  1625. source: "initialize\x0a\x09self current appendToJQuery: 'body' asJQuery",
  1626. messageSends: ["appendToJQuery:", "asJQuery", "current"],
  1627. referencedClasses: []
  1628. }),
  1629. smalltalk.HLManager.klass);
  1630. smalltalk.addMethod(
  1631. "_new",
  1632. smalltalk.method({
  1633. selector: "new",
  1634. category: 'instance creation',
  1635. fn: function (){
  1636. var self=this;
  1637. return smalltalk.withContext(function($ctx1) { _st(self)._shouldNotImplement();
  1638. return self}, function($ctx1) {$ctx1.fill(self,"new",{}, smalltalk.HLManager.klass)})},
  1639. args: [],
  1640. source: "new\x0a\x09\x22Use current instead\x22\x0a\x0a\x09self shouldNotImplement",
  1641. messageSends: ["shouldNotImplement"],
  1642. referencedClasses: []
  1643. }),
  1644. smalltalk.HLManager.klass);
  1645. smalltalk.addClass('HLSUnit', smalltalk.HLWidget, [], 'Helios-Core');
  1646. smalltalk.addMethod(
  1647. "_canBeOpenAsTab",
  1648. smalltalk.method({
  1649. selector: "canBeOpenAsTab",
  1650. category: 'testing',
  1651. fn: function (){
  1652. var self=this;
  1653. return smalltalk.withContext(function($ctx1) { return true;
  1654. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{}, smalltalk.HLSUnit.klass)})},
  1655. args: [],
  1656. source: "canBeOpenAsTab\x0a\x09^ true",
  1657. messageSends: [],
  1658. referencedClasses: []
  1659. }),
  1660. smalltalk.HLSUnit.klass);
  1661. smalltalk.addMethod(
  1662. "_tabLabel",
  1663. smalltalk.method({
  1664. selector: "tabLabel",
  1665. category: 'accessing',
  1666. fn: function (){
  1667. var self=this;
  1668. return smalltalk.withContext(function($ctx1) { return "SUnit";
  1669. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{}, smalltalk.HLSUnit.klass)})},
  1670. args: [],
  1671. source: "tabLabel\x0a\x09^ 'SUnit'",
  1672. messageSends: [],
  1673. referencedClasses: []
  1674. }),
  1675. smalltalk.HLSUnit.klass);
  1676. smalltalk.addMethod(
  1677. "_tabPriority",
  1678. smalltalk.method({
  1679. selector: "tabPriority",
  1680. category: 'accessing',
  1681. fn: function (){
  1682. var self=this;
  1683. return smalltalk.withContext(function($ctx1) { return (1000);
  1684. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{}, smalltalk.HLSUnit.klass)})},
  1685. args: [],
  1686. source: "tabPriority\x0a\x09^ 1000",
  1687. messageSends: [],
  1688. referencedClasses: []
  1689. }),
  1690. smalltalk.HLSUnit.klass);
  1691. smalltalk.addClass('HLTranscript', smalltalk.HLWidget, [], 'Helios-Core');
  1692. smalltalk.addMethod(
  1693. "_canBeOpenAsTab",
  1694. smalltalk.method({
  1695. selector: "canBeOpenAsTab",
  1696. category: 'testing',
  1697. fn: function (){
  1698. var self=this;
  1699. return smalltalk.withContext(function($ctx1) { return true;
  1700. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{}, smalltalk.HLTranscript.klass)})},
  1701. args: [],
  1702. source: "canBeOpenAsTab\x0a\x09^ true",
  1703. messageSends: [],
  1704. referencedClasses: []
  1705. }),
  1706. smalltalk.HLTranscript.klass);
  1707. smalltalk.addMethod(
  1708. "_tabLabel",
  1709. smalltalk.method({
  1710. selector: "tabLabel",
  1711. category: 'accessing',
  1712. fn: function (){
  1713. var self=this;
  1714. return smalltalk.withContext(function($ctx1) { return "Transcript";
  1715. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{}, smalltalk.HLTranscript.klass)})},
  1716. args: [],
  1717. source: "tabLabel\x0a\x09^ 'Transcript'",
  1718. messageSends: [],
  1719. referencedClasses: []
  1720. }),
  1721. smalltalk.HLTranscript.klass);
  1722. smalltalk.addMethod(
  1723. "_tabPriority",
  1724. smalltalk.method({
  1725. selector: "tabPriority",
  1726. category: 'accessing',
  1727. fn: function (){
  1728. var self=this;
  1729. return smalltalk.withContext(function($ctx1) { return (600);
  1730. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{}, smalltalk.HLTranscript.klass)})},
  1731. args: [],
  1732. source: "tabPriority\x0a\x09^ 600",
  1733. messageSends: [],
  1734. referencedClasses: []
  1735. }),
  1736. smalltalk.HLTranscript.klass);
  1737. smalltalk.addMethod(
  1738. "_ajaxPutAt_data_",
  1739. smalltalk.method({
  1740. selector: "ajaxPutAt:data:",
  1741. category: '*Helios-Core',
  1742. fn: function (aURL,aString){
  1743. var self=this;
  1744. return smalltalk.withContext(function($ctx1) { _st(jQuery)._ajax_options_(aURL,smalltalk.HashedCollection._fromPairs_([_st("type").__minus_gt("PUT"),_st("data").__minus_gt(aString),_st("contentType").__minus_gt("text/plain;charset=UTF-8"),_st("error").__minus_gt((function(xhr){
  1745. return smalltalk.withContext(function($ctx2) { return _st(window)._alert_(_st(_st(_st(_st("Commiting ").__comma(aURL)).__comma(" failed with reason: \x22")).__comma(_st(xhr)._responseText())).__comma("\x22"));
  1746. }, function($ctx2) {$ctx2.fillBlock({xhr:xhr},$ctx1)})}))]));
  1747. return self}, function($ctx1) {$ctx1.fill(self,"ajaxPutAt:data:",{aURL:aURL,aString:aString},smalltalk.Package)})},
  1748. args: ["aURL", "aString"],
  1749. source: "ajaxPutAt: aURL data: aString\x0a\x09jQuery\x0a\x09\x09ajax: aURL \x0a\x09\x09options: #{ 'type' -> 'PUT'.\x0a\x09\x09\x09\x09\x09'data' -> aString.\x0a\x09\x09\x09\x09\x09'contentType' -> 'text/plain;charset=UTF-8'.\x0a\x09\x09\x09\x09\x09'error' -> [:xhr | window \x0a\x09\x09\x09\x09\x09\x09alert: 'Commiting ' , aURL , ' failed with reason: \x22' , (xhr responseText) , '\x22'] }",
  1750. messageSends: ["ajax:options:", "->", "alert:", ",", "responseText"],
  1751. referencedClasses: []
  1752. }),
  1753. smalltalk.Package);
  1754. smalltalk.addMethod(
  1755. "_heliosCommit",
  1756. smalltalk.method({
  1757. selector: "heliosCommit",
  1758. category: '*Helios-Core',
  1759. fn: function (){
  1760. var self=this;
  1761. return smalltalk.withContext(function($ctx1) { _st([_st((smalltalk.Exporter || Exporter)).__minus_gt(_st(_st(_st(_st(self)._commitPathJs()).__comma("/")).__comma(_st(self)._name())).__comma(".js")),_st((smalltalk.StrippedExporter || StrippedExporter)).__minus_gt(_st(_st(_st(_st(self)._commitPathJs()).__comma("/")).__comma(_st(self)._name())).__comma(".deploy.js")),_st((smalltalk.ChunkExporter || ChunkExporter)).__minus_gt(_st(_st(_st(_st(self)._commitPathSt()).__comma("/")).__comma(_st(self)._name())).__comma(".st"))])._do_((function(commitStrategy){
  1762. var fileContents;
  1763. return smalltalk.withContext(function($ctx2) { fileContents=_st(_st(_st(commitStrategy)._key())._new())._exportPackage_(_st(self)._name());
  1764. fileContents;
  1765. return _st(self)._ajaxPutAt_data_(_st(commitStrategy)._value(),fileContents);
  1766. }, function($ctx2) {$ctx2.fillBlock({commitStrategy:commitStrategy,fileContents:fileContents},$ctx1)})}));
  1767. return self}, function($ctx1) {$ctx1.fill(self,"heliosCommit",{},smalltalk.Package)})},
  1768. args: [],
  1769. source: "heliosCommit\x0a\x0a\x09{ Exporter -> (self commitPathJs, '/', self name, '.js').\x0a\x09\x09\x09StrippedExporter -> (self commitPathJs, '/', self name, '.deploy.js').\x0a\x09\x09\x09ChunkExporter -> (self commitPathSt, '/', self name, '.st')\x0a\x09\x09} do: [ :commitStrategy || fileContents |\x0a\x09\x09\x09fileContents := (commitStrategy key new exportPackage: self name).\x0a\x09\x09\x09self ajaxPutAt: commitStrategy value data: fileContents ]",
  1770. messageSends: ["do:", "exportPackage:", "name", "new", "key", "ajaxPutAt:data:", "value", "->", ",", "commitPathJs", "commitPathSt"],
  1771. referencedClasses: ["Exporter", "StrippedExporter", "ChunkExporter"]
  1772. }),
  1773. smalltalk.Package);