2
0

Helios-Core.deploy.js 51 KB

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