Helios-Core.deploy.js 52 KB

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