1
0

Helios-Core.deploy.js 52 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539
  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 active,selected,interval,repeatInterval;
  805. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  806. active=false;
  807. repeatInterval=(60);
  808. _st(_st(self["@hiddenInput"])._asJQuery())._unbind_("keydown");
  809. _st(_st(self["@hiddenInput"])._asJQuery())._keydown_((function(e){
  810. return smalltalk.withContext(function($ctx2) { $1=_st(_st(_st(e)._which()).__eq((38)))._and_((function(){
  811. return smalltalk.withContext(function($ctx3) { return _st(active).__eq(false);
  812. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  813. if(smalltalk.assert($1)){
  814. active=true;
  815. active;
  816. interval=_st((function(){
  817. return smalltalk.withContext(function($ctx3) { selected=_st(window)._jQuery_(".focused .nav-pills .active");
  818. selected;
  819. return _st(self)._activateListItem_(_st(selected)._prev());
  820. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}))._valueWithInterval_(repeatInterval);
  821. interval;
  822. };
  823. $2=_st(_st(_st(e)._which()).__eq((40)))._and_((function(){
  824. return smalltalk.withContext(function($ctx3) { return _st(active).__eq(false);
  825. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  826. if(smalltalk.assert($2)){
  827. active=true;
  828. active;
  829. interval=_st((function(){
  830. return smalltalk.withContext(function($ctx3) { selected=_st(window)._jQuery_(".focused .nav-pills .active");
  831. selected;
  832. return _st(self)._activateListItem_(_st(selected)._next());
  833. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}))._valueWithInterval_(repeatInterval);
  834. return interval;
  835. };
  836. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1)})}));
  837. _st(_st(self["@hiddenInput"])._asJQuery())._keyup_((function(e){
  838. return smalltalk.withContext(function($ctx2) { $3=active;
  839. if(smalltalk.assert($3)){
  840. active=false;
  841. active;
  842. return _st(interval)._clearInterval();
  843. };
  844. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1)})}));
  845. return self}, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{active:active,selected:selected,interval:interval,repeatInterval:repeatInterval},smalltalk.HLListWidget)})},
  846. messageSends: ["unbind:", "asJQuery", "keydown:", "ifTrue:", "valueWithInterval:", "jQuery:", "activateListItem:", "prev", "and:", "=", "which", "next", "keyup:", "clearInterval"]}),
  847. smalltalk.HLListWidget);
  848. smalltalk.addClass('HLNavigationListWidget', smalltalk.HLListWidget, ['previous', 'next'], 'Helios-Core');
  849. smalltalk.addMethod(
  850. "_next",
  851. smalltalk.method({
  852. selector: "next",
  853. fn: function (){
  854. var self=this;
  855. return smalltalk.withContext(function($ctx1) { var $1;
  856. $1=self["@next"];
  857. return $1;
  858. }, function($ctx1) {$ctx1.fill(self,"next",{}, smalltalk.HLNavigationListWidget)})},
  859. messageSends: []}),
  860. smalltalk.HLNavigationListWidget);
  861. smalltalk.addMethod(
  862. "_next_",
  863. smalltalk.method({
  864. selector: "next:",
  865. fn: function (aWidget){
  866. var self=this;
  867. return smalltalk.withContext(function($ctx1) { var $1;
  868. self["@next"]=aWidget;
  869. $1=_st(_st(aWidget)._previous()).__eq(self);
  870. if(! smalltalk.assert($1)){
  871. _st(aWidget)._previous_(self);
  872. };
  873. return self}, function($ctx1) {$ctx1.fill(self,"next:",{aWidget:aWidget}, smalltalk.HLNavigationListWidget)})},
  874. messageSends: ["ifFalse:", "previous:", "=", "previous"]}),
  875. smalltalk.HLNavigationListWidget);
  876. smalltalk.addMethod(
  877. "_nextFocus",
  878. smalltalk.method({
  879. selector: "nextFocus",
  880. fn: function (){
  881. var self=this;
  882. return smalltalk.withContext(function($ctx1) { var $1;
  883. $1=_st(self)._next();
  884. if(($receiver = $1) == nil || $receiver == undefined){
  885. $1;
  886. } else {
  887. _st(_st(self)._next())._focus();
  888. };
  889. return self}, function($ctx1) {$ctx1.fill(self,"nextFocus",{}, smalltalk.HLNavigationListWidget)})},
  890. messageSends: ["ifNotNil:", "focus", "next"]}),
  891. smalltalk.HLNavigationListWidget);
  892. smalltalk.addMethod(
  893. "_previous",
  894. smalltalk.method({
  895. selector: "previous",
  896. fn: function (){
  897. var self=this;
  898. return smalltalk.withContext(function($ctx1) { var $1;
  899. $1=self["@previous"];
  900. return $1;
  901. }, function($ctx1) {$ctx1.fill(self,"previous",{}, smalltalk.HLNavigationListWidget)})},
  902. messageSends: []}),
  903. smalltalk.HLNavigationListWidget);
  904. smalltalk.addMethod(
  905. "_previous_",
  906. smalltalk.method({
  907. selector: "previous:",
  908. fn: function (aWidget){
  909. var self=this;
  910. return smalltalk.withContext(function($ctx1) { var $1;
  911. self["@previous"]=aWidget;
  912. $1=_st(_st(aWidget)._next()).__eq(self);
  913. if(! smalltalk.assert($1)){
  914. _st(aWidget)._next_(self);
  915. };
  916. return self}, function($ctx1) {$ctx1.fill(self,"previous:",{aWidget:aWidget}, smalltalk.HLNavigationListWidget)})},
  917. messageSends: ["ifFalse:", "next:", "=", "next"]}),
  918. smalltalk.HLNavigationListWidget);
  919. smalltalk.addMethod(
  920. "_previousFocus",
  921. smalltalk.method({
  922. selector: "previousFocus",
  923. fn: function (){
  924. var self=this;
  925. return smalltalk.withContext(function($ctx1) { var $1;
  926. $1=_st(self)._previous();
  927. if(($receiver = $1) == nil || $receiver == undefined){
  928. $1;
  929. } else {
  930. _st(_st(self)._previous())._focus();
  931. };
  932. return self}, function($ctx1) {$ctx1.fill(self,"previousFocus",{}, smalltalk.HLNavigationListWidget)})},
  933. messageSends: ["ifNotNil:", "focus", "previous"]}),
  934. smalltalk.HLNavigationListWidget);
  935. smalltalk.addMethod(
  936. "_setupKeyBindings",
  937. smalltalk.method({
  938. selector: "setupKeyBindings",
  939. fn: function (){
  940. var self=this;
  941. return smalltalk.withContext(function($ctx1) { var $1,$2;
  942. smalltalk.HLListWidget.fn.prototype._setupKeyBindings.apply(_st(self), []);
  943. _st(_st(self["@hiddenInput"])._asJQuery())._keydown_((function(e){
  944. return smalltalk.withContext(function($ctx2) { $1=_st(_st(e)._which()).__eq((39));
  945. if(smalltalk.assert($1)){
  946. _st(self)._nextFocus();
  947. };
  948. $2=_st(_st(e)._which()).__eq((37));
  949. if(smalltalk.assert($2)){
  950. return _st(self)._previousFocus();
  951. };
  952. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1)})}));
  953. return self}, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{}, smalltalk.HLNavigationListWidget)})},
  954. messageSends: ["setupKeyBindings", "keydown:", "ifTrue:", "nextFocus", "=", "which", "previousFocus", "asJQuery"]}),
  955. smalltalk.HLNavigationListWidget);
  956. smalltalk.addClass('HLManager', smalltalk.HLWidget, ['tabs', 'activeTab', 'keyBinder', 'environment', 'history'], 'Helios-Core');
  957. smalltalk.addMethod(
  958. "_activate_",
  959. smalltalk.method({
  960. selector: "activate:",
  961. fn: function (aTab){
  962. var self=this;
  963. return smalltalk.withContext(function($ctx1) { var $1,$2;
  964. _st(_st(self)._keyBinder())._flushBindings();
  965. _st(aTab)._registerBindings();
  966. self["@activeTab"]=aTab;
  967. $1=self;
  968. _st($1)._refresh();
  969. _st($1)._addToHistory_(aTab);
  970. $2=_st($1)._show_(aTab);
  971. return self}, function($ctx1) {$ctx1.fill(self,"activate:",{aTab:aTab},smalltalk.HLManager)})},
  972. messageSends: ["flushBindings", "keyBinder", "registerBindings", "refresh", "addToHistory:", "show:"]}),
  973. smalltalk.HLManager);
  974. smalltalk.addMethod(
  975. "_activeTab",
  976. smalltalk.method({
  977. selector: "activeTab",
  978. fn: function (){
  979. var self=this;
  980. return smalltalk.withContext(function($ctx1) { var $1;
  981. $1=self["@activeTab"];
  982. return $1;
  983. }, function($ctx1) {$ctx1.fill(self,"activeTab",{}, smalltalk.HLManager)})},
  984. messageSends: []}),
  985. smalltalk.HLManager);
  986. smalltalk.addMethod(
  987. "_addTab_",
  988. smalltalk.method({
  989. selector: "addTab:",
  990. fn: function (aTab){
  991. var self=this;
  992. return smalltalk.withContext(function($ctx1) { _st(_st(self)._tabs())._add_(aTab);
  993. _st(self)._activate_(aTab);
  994. return self}, function($ctx1) {$ctx1.fill(self,"addTab:",{aTab:aTab}, smalltalk.HLManager)})},
  995. messageSends: ["add:", "tabs", "activate:"]}),
  996. smalltalk.HLManager);
  997. smalltalk.addMethod(
  998. "_addToHistory_",
  999. smalltalk.method({
  1000. selector: "addToHistory:",
  1001. fn: function (aTab){
  1002. var self=this;
  1003. return smalltalk.withContext(function($ctx1) { _st(self)._removeFromHistory_(aTab);
  1004. _st(_st(self)._history())._add_(aTab);
  1005. return self}, function($ctx1) {$ctx1.fill(self,"addToHistory:",{aTab:aTab}, smalltalk.HLManager)})},
  1006. messageSends: ["removeFromHistory:", "add:", "history"]}),
  1007. smalltalk.HLManager);
  1008. smalltalk.addMethod(
  1009. "_defaultEnvironment",
  1010. smalltalk.method({
  1011. selector: "defaultEnvironment",
  1012. fn: function (){
  1013. var self=this;
  1014. return smalltalk.withContext(function($ctx1) { var $1;
  1015. $1=_st((smalltalk.HLLocalEnvironment || HLLocalEnvironment))._new();
  1016. return $1;
  1017. }, function($ctx1) {$ctx1.fill(self,"defaultEnvironment",{}, smalltalk.HLManager)})},
  1018. messageSends: ["new"]}),
  1019. smalltalk.HLManager);
  1020. smalltalk.addMethod(
  1021. "_environment",
  1022. smalltalk.method({
  1023. selector: "environment",
  1024. fn: function (){
  1025. var self=this;
  1026. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1027. $2=self["@environment"];
  1028. if(($receiver = $2) == nil || $receiver == undefined){
  1029. self["@environment"]=_st(self)._defaultEnvironment();
  1030. $1=self["@environment"];
  1031. } else {
  1032. $1=$2;
  1033. };
  1034. return $1;
  1035. }, function($ctx1) {$ctx1.fill(self,"environment",{}, smalltalk.HLManager)})},
  1036. messageSends: ["ifNil:", "defaultEnvironment"]}),
  1037. smalltalk.HLManager);
  1038. smalltalk.addMethod(
  1039. "_environment_",
  1040. smalltalk.method({
  1041. selector: "environment:",
  1042. fn: function (anEnvironment){
  1043. var self=this;
  1044. return smalltalk.withContext(function($ctx1) { self["@environment"]=anEnvironment;
  1045. return self}, function($ctx1) {$ctx1.fill(self,"environment:",{anEnvironment:anEnvironment}, smalltalk.HLManager)})},
  1046. messageSends: []}),
  1047. smalltalk.HLManager);
  1048. smalltalk.addMethod(
  1049. "_history",
  1050. smalltalk.method({
  1051. selector: "history",
  1052. fn: function (){
  1053. var self=this;
  1054. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1055. $2=self["@history"];
  1056. if(($receiver = $2) == nil || $receiver == undefined){
  1057. self["@history"]=_st((smalltalk.OrderedCollection || OrderedCollection))._new();
  1058. $1=self["@history"];
  1059. } else {
  1060. $1=$2;
  1061. };
  1062. return $1;
  1063. }, function($ctx1) {$ctx1.fill(self,"history",{}, smalltalk.HLManager)})},
  1064. messageSends: ["ifNil:", "new"]}),
  1065. smalltalk.HLManager);
  1066. smalltalk.addMethod(
  1067. "_history_",
  1068. smalltalk.method({
  1069. selector: "history:",
  1070. fn: function (aCollection){
  1071. var self=this;
  1072. return smalltalk.withContext(function($ctx1) { self["@history"]=aCollection;
  1073. return self}, function($ctx1) {$ctx1.fill(self,"history:",{aCollection:aCollection}, smalltalk.HLManager)})},
  1074. messageSends: []}),
  1075. smalltalk.HLManager);
  1076. smalltalk.addMethod(
  1077. "_initialize",
  1078. smalltalk.method({
  1079. selector: "initialize",
  1080. fn: function (){
  1081. var self=this;
  1082. return smalltalk.withContext(function($ctx1) { smalltalk.HLWidget.fn.prototype._initialize.apply(_st(self), []);
  1083. _st(_st(self)._keyBinder())._setupEvents();
  1084. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.HLManager)})},
  1085. messageSends: ["initialize", "setupEvents", "keyBinder"]}),
  1086. smalltalk.HLManager);
  1087. smalltalk.addMethod(
  1088. "_keyBinder",
  1089. smalltalk.method({
  1090. selector: "keyBinder",
  1091. fn: function (){
  1092. var self=this;
  1093. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1094. $2=self["@keyBinder"];
  1095. if(($receiver = $2) == nil || $receiver == undefined){
  1096. self["@keyBinder"]=_st((smalltalk.HLKeyBinder || HLKeyBinder))._new();
  1097. $1=self["@keyBinder"];
  1098. } else {
  1099. $1=$2;
  1100. };
  1101. return $1;
  1102. }, function($ctx1) {$ctx1.fill(self,"keyBinder",{}, smalltalk.HLManager)})},
  1103. messageSends: ["ifNil:", "new"]}),
  1104. smalltalk.HLManager);
  1105. smalltalk.addMethod(
  1106. "_refresh",
  1107. smalltalk.method({
  1108. selector: "refresh",
  1109. fn: function (){
  1110. var self=this;
  1111. return smalltalk.withContext(function($ctx1) { _st(_st(window)._jQuery_(".navbar"))._remove();
  1112. _st(self)._appendToJQuery_(_st("body")._asJQuery());
  1113. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},smalltalk.HLManager)})},
  1114. messageSends: ["remove", "jQuery:", "appendToJQuery:", "asJQuery"]}),
  1115. smalltalk.HLManager);
  1116. smalltalk.addMethod(
  1117. "_removeActiveTab",
  1118. smalltalk.method({
  1119. selector: "removeActiveTab",
  1120. fn: function (){
  1121. var self=this;
  1122. return smalltalk.withContext(function($ctx1) { _st(self)._removeTab_(_st(self)._activeTab());
  1123. return self}, function($ctx1) {$ctx1.fill(self,"removeActiveTab",{}, smalltalk.HLManager)})},
  1124. messageSends: ["removeTab:", "activeTab"]}),
  1125. smalltalk.HLManager);
  1126. smalltalk.addMethod(
  1127. "_removeFromHistory_",
  1128. smalltalk.method({
  1129. selector: "removeFromHistory:",
  1130. fn: function (aTab){
  1131. var self=this;
  1132. return smalltalk.withContext(function($ctx1) { _st(self)._history_(_st(_st(self)._history())._reject_((function(each){
  1133. return smalltalk.withContext(function($ctx2) { return _st(each).__eq_eq(aTab);
  1134. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})));
  1135. return self}, function($ctx1) {$ctx1.fill(self,"removeFromHistory:",{aTab:aTab}, smalltalk.HLManager)})},
  1136. messageSends: ["history:", "reject:", "==", "history"]}),
  1137. smalltalk.HLManager);
  1138. smalltalk.addMethod(
  1139. "_removeTab_",
  1140. smalltalk.method({
  1141. selector: "removeTab:",
  1142. fn: function (aTab){
  1143. var self=this;
  1144. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1145. $1=_st(_st(self)._tabs())._includes_(aTab);
  1146. if(! smalltalk.assert($1)){
  1147. $2=self;
  1148. return $2;
  1149. };
  1150. _st(self)._removeFromHistory_(aTab);
  1151. _st(_st(self)._tabs())._remove_(aTab);
  1152. _st(_st(self)._keyBinder())._flushBindings();
  1153. _st(aTab)._remove();
  1154. _st(self)._refresh();
  1155. _st(_st(self)._history())._ifNotEmpty_((function(){
  1156. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(self)._history())._last())._activate();
  1157. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1158. return self}, function($ctx1) {$ctx1.fill(self,"removeTab:",{aTab:aTab},smalltalk.HLManager)})},
  1159. messageSends: ["ifFalse:", "includes:", "tabs", "removeFromHistory:", "remove:", "flushBindings", "keyBinder", "remove", "refresh", "ifNotEmpty:", "activate", "last", "history"]}),
  1160. smalltalk.HLManager);
  1161. smalltalk.addMethod(
  1162. "_renderAddOn_",
  1163. smalltalk.method({
  1164. selector: "renderAddOn:",
  1165. fn: function (html){
  1166. var self=this;
  1167. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$5,$7,$8,$6,$2;
  1168. $1=_st(html)._li();
  1169. _st($1)._class_("dropdown");
  1170. $2=_st($1)._with_((function(){
  1171. return smalltalk.withContext(function($ctx2) { $3=_st(html)._a();
  1172. _st($3)._class_("dropdown-toggle");
  1173. _st($3)._at_put_("data-toggle","dropdown");
  1174. $4=_st($3)._with_((function(){
  1175. return smalltalk.withContext(function($ctx3) { _st(html)._with_("Open...");
  1176. return _st(_st(html)._tag_("b"))._class_("caret");
  1177. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1178. $4;
  1179. $5=_st(html)._ul();
  1180. _st($5)._class_("dropdown-menu");
  1181. $6=_st($5)._with_((function(){
  1182. return smalltalk.withContext(function($ctx3) { return _st(_st(_st(_st((smalltalk.HLWidget || HLWidget))._withAllSubclasses())._select_((function(each){
  1183. return smalltalk.withContext(function($ctx4) { return _st(each)._canBeOpenAsTab();
  1184. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx1)})})))._sorted_((function(a,b){
  1185. return smalltalk.withContext(function($ctx4) { return _st(_st(a)._tabPriority()).__lt(_st(b)._tabPriority());
  1186. }, function($ctx4) {$ctx4.fillBlock({a:a,b:b},$ctx1)})})))._do_((function(each){
  1187. return smalltalk.withContext(function($ctx4) { return _st(_st(html)._li())._with_((function(){
  1188. return smalltalk.withContext(function($ctx5) { $7=_st(html)._a();
  1189. _st($7)._with_(_st(each)._tabLabel());
  1190. $8=_st($7)._onClick_((function(){
  1191. return smalltalk.withContext(function($ctx6) { return _st(each)._openAsTab();
  1192. }, function($ctx6) {$ctx6.fillBlock({},$ctx1)})}));
  1193. return $8;
  1194. }, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
  1195. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx1)})}));
  1196. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1197. return $6;
  1198. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1199. return self}, function($ctx1) {$ctx1.fill(self,"renderAddOn:",{html:html}, smalltalk.HLManager)})},
  1200. messageSends: ["class:", "li", "with:", "a", "at:put:", "tag:", "ul", "do:", "tabLabel", "onClick:", "openAsTab", "sorted:", "<", "tabPriority", "select:", "canBeOpenAsTab", "withAllSubclasses"]}),
  1201. smalltalk.HLManager);
  1202. smalltalk.addMethod(
  1203. "_renderContentOn_",
  1204. smalltalk.method({
  1205. selector: "renderContentOn:",
  1206. fn: function (html){
  1207. var self=this;
  1208. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$2;
  1209. $1=_st(html)._div();
  1210. _st($1)._class_("navbar navbar-fixed-top");
  1211. $2=_st($1)._with_((function(){
  1212. return smalltalk.withContext(function($ctx2) { $3=_st(html)._div();
  1213. _st($3)._class_("navbar-inner");
  1214. $4=_st($3)._with_((function(){
  1215. return smalltalk.withContext(function($ctx3) { return _st(self)._renderTabsOn_(html);
  1216. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1217. return $4;
  1218. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1219. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLManager)})},
  1220. messageSends: ["class:", "div", "with:", "renderTabsOn:"]}),
  1221. smalltalk.HLManager);
  1222. smalltalk.addMethod(
  1223. "_renderTabsOn_",
  1224. smalltalk.method({
  1225. selector: "renderTabsOn:",
  1226. fn: function (html){
  1227. var self=this;
  1228. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$6,$5,$8,$9,$7,$2;
  1229. $1=_st(html)._ul();
  1230. _st($1)._class_("nav");
  1231. $2=_st($1)._with_((function(){
  1232. return smalltalk.withContext(function($ctx2) { _st(_st(self)._tabs())._do_((function(each){
  1233. return smalltalk.withContext(function($ctx3) { $3=_st(html)._li();
  1234. $4=$3;
  1235. $6=_st(each)._isActive();
  1236. if(smalltalk.assert($6)){
  1237. $5="active";
  1238. } else {
  1239. $5="inactive";
  1240. };
  1241. _st($4)._class_($5);
  1242. $7=_st($3)._with_((function(){
  1243. return smalltalk.withContext(function($ctx4) { $8=_st(html)._a();
  1244. _st($8)._with_((function(){
  1245. return smalltalk.withContext(function($ctx5) { _st(_st(_st(html)._tag_("i"))._class_("icon-remove"))._onClick_((function(){
  1246. return smalltalk.withContext(function($ctx6) { return _st(self)._removeTab_(each);
  1247. }, function($ctx6) {$ctx6.fillBlock({},$ctx1)})}));
  1248. return _st(html)._with_(_st(each)._displayLabel());
  1249. }, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
  1250. $9=_st($8)._onClick_((function(){
  1251. return smalltalk.withContext(function($ctx5) { return _st(each)._activate();
  1252. }, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
  1253. return $9;
  1254. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  1255. return $7;
  1256. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
  1257. return _st(self)._renderAddOn_(html);
  1258. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1259. return self}, function($ctx1) {$ctx1.fill(self,"renderTabsOn:",{html:html},smalltalk.HLManager)})},
  1260. messageSends: ["class:", "ul", "with:", "do:", "ifTrue:ifFalse:", "isActive", "li", "onClick:", "removeTab:", "tag:", "displayLabel", "a", "activate", "tabs", "renderAddOn:"]}),
  1261. smalltalk.HLManager);
  1262. smalltalk.addMethod(
  1263. "_show_",
  1264. smalltalk.method({
  1265. selector: "show:",
  1266. fn: function (aTab){
  1267. var self=this;
  1268. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1269. _st(_st(self)._tabs())._do_((function(each){
  1270. return smalltalk.withContext(function($ctx2) { return _st(each)._hide();
  1271. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1272. $1=aTab;
  1273. _st($1)._show();
  1274. $2=_st($1)._focus();
  1275. return self}, function($ctx1) {$ctx1.fill(self,"show:",{aTab:aTab},smalltalk.HLManager)})},
  1276. messageSends: ["do:", "hide", "tabs", "show", "focus"]}),
  1277. smalltalk.HLManager);
  1278. smalltalk.addMethod(
  1279. "_tabs",
  1280. smalltalk.method({
  1281. selector: "tabs",
  1282. fn: function (){
  1283. var self=this;
  1284. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1285. $2=self["@tabs"];
  1286. if(($receiver = $2) == nil || $receiver == undefined){
  1287. self["@tabs"]=_st((smalltalk.OrderedCollection || OrderedCollection))._new();
  1288. $1=self["@tabs"];
  1289. } else {
  1290. $1=$2;
  1291. };
  1292. return $1;
  1293. }, function($ctx1) {$ctx1.fill(self,"tabs",{}, smalltalk.HLManager)})},
  1294. messageSends: ["ifNil:", "new"]}),
  1295. smalltalk.HLManager);
  1296. smalltalk.HLManager.klass.iVarNames = ['current'];
  1297. smalltalk.addMethod(
  1298. "_current",
  1299. smalltalk.method({
  1300. selector: "current",
  1301. fn: function (){
  1302. var self=this;
  1303. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1304. $2=self["@current"];
  1305. if(($receiver = $2) == nil || $receiver == undefined){
  1306. self["@current"]=_st(_st(self)._basicNew())._initialize();
  1307. $1=self["@current"];
  1308. } else {
  1309. $1=$2;
  1310. };
  1311. return $1;
  1312. }, function($ctx1) {$ctx1.fill(self,"current",{}, smalltalk.HLManager.klass)})},
  1313. messageSends: ["ifNil:", "initialize", "basicNew"]}),
  1314. smalltalk.HLManager.klass);
  1315. smalltalk.addMethod(
  1316. "_initialize",
  1317. smalltalk.method({
  1318. selector: "initialize",
  1319. fn: function (){
  1320. var self=this;
  1321. return smalltalk.withContext(function($ctx1) { _st(_st(self)._current())._appendToJQuery_(_st("body")._asJQuery());
  1322. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.HLManager.klass)})},
  1323. messageSends: ["appendToJQuery:", "asJQuery", "current"]}),
  1324. smalltalk.HLManager.klass);
  1325. smalltalk.addMethod(
  1326. "_new",
  1327. smalltalk.method({
  1328. selector: "new",
  1329. fn: function (){
  1330. var self=this;
  1331. return smalltalk.withContext(function($ctx1) { _st(self)._shouldNotImplement();
  1332. return self}, function($ctx1) {$ctx1.fill(self,"new",{}, smalltalk.HLManager.klass)})},
  1333. messageSends: ["shouldNotImplement"]}),
  1334. smalltalk.HLManager.klass);
  1335. smalltalk.addClass('HLSUnit', smalltalk.HLWidget, [], 'Helios-Core');
  1336. smalltalk.addMethod(
  1337. "_canBeOpenAsTab",
  1338. smalltalk.method({
  1339. selector: "canBeOpenAsTab",
  1340. fn: function (){
  1341. var self=this;
  1342. return smalltalk.withContext(function($ctx1) { return true;
  1343. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{}, smalltalk.HLSUnit.klass)})},
  1344. messageSends: []}),
  1345. smalltalk.HLSUnit.klass);
  1346. smalltalk.addMethod(
  1347. "_tabLabel",
  1348. smalltalk.method({
  1349. selector: "tabLabel",
  1350. fn: function (){
  1351. var self=this;
  1352. return smalltalk.withContext(function($ctx1) { return "SUnit";
  1353. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{}, smalltalk.HLSUnit.klass)})},
  1354. messageSends: []}),
  1355. smalltalk.HLSUnit.klass);
  1356. smalltalk.addMethod(
  1357. "_tabPriority",
  1358. smalltalk.method({
  1359. selector: "tabPriority",
  1360. fn: function (){
  1361. var self=this;
  1362. return smalltalk.withContext(function($ctx1) { return (1000);
  1363. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{}, smalltalk.HLSUnit.klass)})},
  1364. messageSends: []}),
  1365. smalltalk.HLSUnit.klass);
  1366. smalltalk.addClass('HLTranscript', smalltalk.HLWidget, [], 'Helios-Core');
  1367. smalltalk.addMethod(
  1368. "_canBeOpenAsTab",
  1369. smalltalk.method({
  1370. selector: "canBeOpenAsTab",
  1371. fn: function (){
  1372. var self=this;
  1373. return smalltalk.withContext(function($ctx1) { return true;
  1374. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{}, smalltalk.HLTranscript.klass)})},
  1375. messageSends: []}),
  1376. smalltalk.HLTranscript.klass);
  1377. smalltalk.addMethod(
  1378. "_tabLabel",
  1379. smalltalk.method({
  1380. selector: "tabLabel",
  1381. fn: function (){
  1382. var self=this;
  1383. return smalltalk.withContext(function($ctx1) { return "Transcript";
  1384. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{}, smalltalk.HLTranscript.klass)})},
  1385. messageSends: []}),
  1386. smalltalk.HLTranscript.klass);
  1387. smalltalk.addMethod(
  1388. "_tabPriority",
  1389. smalltalk.method({
  1390. selector: "tabPriority",
  1391. fn: function (){
  1392. var self=this;
  1393. return smalltalk.withContext(function($ctx1) { return (600);
  1394. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{}, smalltalk.HLTranscript.klass)})},
  1395. messageSends: []}),
  1396. smalltalk.HLTranscript.klass);
  1397. smalltalk.addMethod(
  1398. "_ajaxPutAt_data_",
  1399. smalltalk.method({
  1400. selector: "ajaxPutAt:data:",
  1401. fn: function (aURL,aString){
  1402. var self=this;
  1403. 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){
  1404. 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"));
  1405. }, function($ctx2) {$ctx2.fillBlock({xhr:xhr},$ctx1)})}))]));
  1406. return self}, function($ctx1) {$ctx1.fill(self,"ajaxPutAt:data:",{aURL:aURL,aString:aString},smalltalk.Package)})},
  1407. messageSends: ["ajax:options:", "->", "alert:", ",", "responseText"]}),
  1408. smalltalk.Package);
  1409. smalltalk.addMethod(
  1410. "_heliosCommit",
  1411. smalltalk.method({
  1412. selector: "heliosCommit",
  1413. fn: function (){
  1414. var self=this;
  1415. 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){
  1416. var fileContents;
  1417. return smalltalk.withContext(function($ctx2) { fileContents=_st(_st(_st(commitStrategy)._key())._new())._exportPackage_(_st(self)._name());
  1418. fileContents;
  1419. return _st(self)._ajaxPutAt_data_(_st(commitStrategy)._value(),fileContents);
  1420. }, function($ctx2) {$ctx2.fillBlock({commitStrategy:commitStrategy,fileContents:fileContents},$ctx1)})}));
  1421. return self}, function($ctx1) {$ctx1.fill(self,"heliosCommit",{},smalltalk.Package)})},
  1422. messageSends: ["do:", "exportPackage:", "name", "new", "key", "ajaxPutAt:data:", "value", "->", ",", "commitPathJs", "commitPathSt"]}),
  1423. smalltalk.Package);