JQuery.deploy.js 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826
  1. smalltalk.addClass('JQuery', smalltalk.Object, ['jquery'], 'JQuery');
  2. smalltalk.addMethod(
  3. '_append_',
  4. smalltalk.method({
  5. selector: 'append:',
  6. fn: function (anObject){
  7. var self=this;
  8. smalltalk.send(anObject, "_appendToJQuery_", [self]);
  9. return self;}
  10. }),
  11. smalltalk.JQuery);
  12. smalltalk.addMethod(
  13. '_appendElement_',
  14. smalltalk.method({
  15. selector: 'appendElement:',
  16. fn: function (anElement){
  17. var self=this;
  18. smalltalk.send(self, "_call_withArgument_", ["append", anElement]);
  19. return self;}
  20. }),
  21. smalltalk.JQuery);
  22. smalltalk.addMethod(
  23. '_appendToJQuery_',
  24. smalltalk.method({
  25. selector: 'appendToJQuery:',
  26. fn: function (aJQuery){
  27. var self=this;
  28. smalltalk.send(aJQuery, "_appendElement_", [self['@jquery']]);
  29. return self;}
  30. }),
  31. smalltalk.JQuery);
  32. smalltalk.addMethod(
  33. '_contents_',
  34. smalltalk.method({
  35. selector: 'contents:',
  36. fn: function (anObject){
  37. var self=this;
  38. smalltalk.send(self, "_empty", []);
  39. smalltalk.send(self, "_append_", [anObject]);
  40. return self;}
  41. }),
  42. smalltalk.JQuery);
  43. smalltalk.addMethod(
  44. '_empty',
  45. smalltalk.method({
  46. selector: 'empty',
  47. fn: function (){
  48. var self=this;
  49. return smalltalk.send(self, "_call_", ["empty"]);
  50. return self;}
  51. }),
  52. smalltalk.JQuery);
  53. smalltalk.addMethod(
  54. '_jquery',
  55. smalltalk.method({
  56. selector: 'jquery',
  57. fn: function (){
  58. var self=this;
  59. return self['@jquery'];
  60. return self;}
  61. }),
  62. smalltalk.JQuery);
  63. smalltalk.addMethod(
  64. '_removeAttribute_',
  65. smalltalk.method({
  66. selector: 'removeAttribute:',
  67. fn: function (aString){
  68. var self=this;
  69. return smalltalk.send(self, "_call_withArgument_", ["removeAttribute", aString]);
  70. return self;}
  71. }),
  72. smalltalk.JQuery);
  73. smalltalk.addMethod(
  74. '_attr_',
  75. smalltalk.method({
  76. selector: 'attr:',
  77. fn: function (aString){
  78. var self=this;
  79. return smalltalk.send(self, "_call_withArgument_", ["attr", aString]);
  80. return self;}
  81. }),
  82. smalltalk.JQuery);
  83. smalltalk.addMethod(
  84. '_val',
  85. smalltalk.method({
  86. selector: 'val',
  87. fn: function (){
  88. var self=this;
  89. return smalltalk.send(self, "_call_", ["val"]);
  90. return self;}
  91. }),
  92. smalltalk.JQuery);
  93. smalltalk.addMethod(
  94. '_val_',
  95. smalltalk.method({
  96. selector: 'val:',
  97. fn: function (aString){
  98. var self=this;
  99. smalltalk.send(self, "_call_withArgument_", ["val", aString]);
  100. return self;}
  101. }),
  102. smalltalk.JQuery);
  103. smalltalk.addMethod(
  104. '_attrAt_put_',
  105. smalltalk.method({
  106. selector: 'attrAt:put:',
  107. fn: function (aString, anotherString){
  108. var self=this;
  109. self['@jquery'].attr(aString, anotherString);
  110. return self;}
  111. }),
  112. smalltalk.JQuery);
  113. smalltalk.addMethod(
  114. '_cssAt_',
  115. smalltalk.method({
  116. selector: 'cssAt:',
  117. fn: function (aString){
  118. var self=this;
  119. return self['@jquery'].css(aString);
  120. return self;}
  121. }),
  122. smalltalk.JQuery);
  123. smalltalk.addMethod(
  124. '_cssAt_put_',
  125. smalltalk.method({
  126. selector: 'cssAt:put:',
  127. fn: function (aString, anotherString){
  128. var self=this;
  129. self['@jquery'].css(aString, anotherString);
  130. return self;}
  131. }),
  132. smalltalk.JQuery);
  133. smalltalk.addMethod(
  134. '_addClass_',
  135. smalltalk.method({
  136. selector: 'addClass:',
  137. fn: function (aString){
  138. var self=this;
  139. smalltalk.send(self, "_call_withArgument_", ["addClass", aString]);
  140. return self;}
  141. }),
  142. smalltalk.JQuery);
  143. smalltalk.addMethod(
  144. '_removeClass_',
  145. smalltalk.method({
  146. selector: 'removeClass:',
  147. fn: function (aString){
  148. var self=this;
  149. smalltalk.send(self, "_call_withArgument_", ["removeClass", aString]);
  150. return self;}
  151. }),
  152. smalltalk.JQuery);
  153. smalltalk.addMethod(
  154. '_toggleClass_',
  155. smalltalk.method({
  156. selector: 'toggleClass:',
  157. fn: function (aString){
  158. var self=this;
  159. smalltalk.send(self, "_call_withArgument_", ["toggleClass", aString]);
  160. return self;}
  161. }),
  162. smalltalk.JQuery);
  163. smalltalk.addMethod(
  164. '_height',
  165. smalltalk.method({
  166. selector: 'height',
  167. fn: function (){
  168. var self=this;
  169. return smalltalk.send(self, "_call_", ["height"]);
  170. return self;}
  171. }),
  172. smalltalk.JQuery);
  173. smalltalk.addMethod(
  174. '_height_',
  175. smalltalk.method({
  176. selector: 'height:',
  177. fn: function (anInteger){
  178. var self=this;
  179. smalltalk.send(self, "_call_withArgument_", ["height", anInteger]);
  180. return self;}
  181. }),
  182. smalltalk.JQuery);
  183. smalltalk.addMethod(
  184. '_width_',
  185. smalltalk.method({
  186. selector: 'width:',
  187. fn: function (anInteger){
  188. var self=this;
  189. smalltalk.send(self, "_call_withArgument_", ["width", anInteger]);
  190. return self;}
  191. }),
  192. smalltalk.JQuery);
  193. smalltalk.addMethod(
  194. '_width',
  195. smalltalk.method({
  196. selector: 'width',
  197. fn: function (){
  198. var self=this;
  199. return smalltalk.send(self, "_call_", ["width"]);
  200. return self;}
  201. }),
  202. smalltalk.JQuery);
  203. smalltalk.addMethod(
  204. '_innerHeight',
  205. smalltalk.method({
  206. selector: 'innerHeight',
  207. fn: function (){
  208. var self=this;
  209. return smalltalk.send(self, "_call_", ["innerHeight"]);
  210. return self;}
  211. }),
  212. smalltalk.JQuery);
  213. smalltalk.addMethod(
  214. '_innerWidth',
  215. smalltalk.method({
  216. selector: 'innerWidth',
  217. fn: function (){
  218. var self=this;
  219. return smalltalk.send(self, "_call_", ["innerWidth"]);
  220. return self;}
  221. }),
  222. smalltalk.JQuery);
  223. smalltalk.addMethod(
  224. '_outerHeight',
  225. smalltalk.method({
  226. selector: 'outerHeight',
  227. fn: function (){
  228. var self=this;
  229. return smalltalk.send(self, "_call_", ["outerHeight"]);
  230. return self;}
  231. }),
  232. smalltalk.JQuery);
  233. smalltalk.addMethod(
  234. '_outerWidth',
  235. smalltalk.method({
  236. selector: 'outerWidth',
  237. fn: function (){
  238. var self=this;
  239. return smalltalk.send(self, "_call_", ["outerWidth"]);
  240. return self;}
  241. }),
  242. smalltalk.JQuery);
  243. smalltalk.addMethod(
  244. '_top',
  245. smalltalk.method({
  246. selector: 'top',
  247. fn: function (){
  248. var self=this;
  249. return smalltalk.send(smalltalk.send(self, "_call_", ["position"]), "_basicAt_", ["top"]);
  250. return self;}
  251. }),
  252. smalltalk.JQuery);
  253. smalltalk.addMethod(
  254. '_left',
  255. smalltalk.method({
  256. selector: 'left',
  257. fn: function (){
  258. var self=this;
  259. return smalltalk.send(smalltalk.send(self, "_call_", ["position"]), "_basicAt_", ["left"]);
  260. return self;}
  261. }),
  262. smalltalk.JQuery);
  263. smalltalk.addMethod(
  264. '_offsetLeft',
  265. smalltalk.method({
  266. selector: 'offsetLeft',
  267. fn: function (){
  268. var self=this;
  269. return smalltalk.send(smalltalk.send(self, "_call_", ["offset"]), "_basicAt_", ["left"]);
  270. return self;}
  271. }),
  272. smalltalk.JQuery);
  273. smalltalk.addMethod(
  274. '_offsetTop',
  275. smalltalk.method({
  276. selector: 'offsetTop',
  277. fn: function (){
  278. var self=this;
  279. return smalltalk.send(smalltalk.send(self, "_call_", ["offset"]), "_basicAt_", ["top"]);
  280. return self;}
  281. }),
  282. smalltalk.JQuery);
  283. smalltalk.addMethod(
  284. '_scrollLeft',
  285. smalltalk.method({
  286. selector: 'scrollLeft',
  287. fn: function (){
  288. var self=this;
  289. return smalltalk.send(self, "_call_", ["scrollLeft"]);
  290. return self;}
  291. }),
  292. smalltalk.JQuery);
  293. smalltalk.addMethod(
  294. '_scrollTop',
  295. smalltalk.method({
  296. selector: 'scrollTop',
  297. fn: function (){
  298. var self=this;
  299. return smalltalk.send(self, "_call_", ["scrollTop"]);
  300. return self;}
  301. }),
  302. smalltalk.JQuery);
  303. smalltalk.addMethod(
  304. '_scrollLeft_',
  305. smalltalk.method({
  306. selector: 'scrollLeft:',
  307. fn: function (anInteger){
  308. var self=this;
  309. smalltalk.send(self, "_call_withArgument_", ["scrollLeft", anInteger]);
  310. return self;}
  311. }),
  312. smalltalk.JQuery);
  313. smalltalk.addMethod(
  314. '_scrollTop_',
  315. smalltalk.method({
  316. selector: 'scrollTop:',
  317. fn: function (anInteger){
  318. var self=this;
  319. smalltalk.send(self, "_call_withArgument_", ["scrollTop", anInteger]);
  320. return self;}
  321. }),
  322. smalltalk.JQuery);
  323. smalltalk.addMethod(
  324. '_fadeIn',
  325. smalltalk.method({
  326. selector: 'fadeIn',
  327. fn: function (){
  328. var self=this;
  329. smalltalk.send(self, "_call_", ["fadeIn"]);
  330. return self;}
  331. }),
  332. smalltalk.JQuery);
  333. smalltalk.addMethod(
  334. '_slideDown',
  335. smalltalk.method({
  336. selector: 'slideDown',
  337. fn: function (){
  338. var self=this;
  339. smalltalk.send(self, "_call_", ["slideDown"]);
  340. return self;}
  341. }),
  342. smalltalk.JQuery);
  343. smalltalk.addMethod(
  344. '_fadeInSlow',
  345. smalltalk.method({
  346. selector: 'fadeInSlow',
  347. fn: function (){
  348. var self=this;
  349. smalltalk.send(self, "_call_withArgument_", ["fadeIn", "slow"]);
  350. return self;}
  351. }),
  352. smalltalk.JQuery);
  353. smalltalk.addMethod(
  354. '_fadeOut',
  355. smalltalk.method({
  356. selector: 'fadeOut',
  357. fn: function (){
  358. var self=this;
  359. smalltalk.send(self, "_call_", ["fadeOut"]);
  360. return self;}
  361. }),
  362. smalltalk.JQuery);
  363. smalltalk.addMethod(
  364. '_fadeOutSlow',
  365. smalltalk.method({
  366. selector: 'fadeOutSlow',
  367. fn: function (){
  368. var self=this;
  369. smalltalk.send(self, "_call_withArgument_", ["fadeOut", "slow"]);
  370. return self;}
  371. }),
  372. smalltalk.JQuery);
  373. smalltalk.addMethod(
  374. '_slideUp',
  375. smalltalk.method({
  376. selector: 'slideUp',
  377. fn: function (){
  378. var self=this;
  379. smalltalk.send(self, "_call_", ["slideUp"]);
  380. return self;}
  381. }),
  382. smalltalk.JQuery);
  383. smalltalk.addMethod(
  384. '_fadeOut_do_',
  385. smalltalk.method({
  386. selector: 'fadeOut:do:',
  387. fn: function (aString, aBlock){
  388. var self=this;
  389. self['@jquery'].fadeOut(aString, aBlock);
  390. return self;}
  391. }),
  392. smalltalk.JQuery);
  393. smalltalk.addMethod(
  394. '_do_',
  395. smalltalk.method({
  396. selector: 'do:',
  397. fn: function (aBlock){
  398. var self=this;
  399. smalltalk.send(self, "_elementsDo_", [(function(anElement){return smalltalk.send(aBlock, "_value_", [smalltalk.send((smalltalk.JQuery || JQuery), "_fromElement_", [anElement])]);})]);
  400. return self;}
  401. }),
  402. smalltalk.JQuery);
  403. smalltalk.addMethod(
  404. '_focus',
  405. smalltalk.method({
  406. selector: 'focus',
  407. fn: function (){
  408. var self=this;
  409. smalltalk.send(self, "_call_", ["focus"]);
  410. return self;}
  411. }),
  412. smalltalk.JQuery);
  413. smalltalk.addMethod(
  414. '_show',
  415. smalltalk.method({
  416. selector: 'show',
  417. fn: function (){
  418. var self=this;
  419. smalltalk.send(self, "_call_", ["show"]);
  420. return self;}
  421. }),
  422. smalltalk.JQuery);
  423. smalltalk.addMethod(
  424. '_hide',
  425. smalltalk.method({
  426. selector: 'hide',
  427. fn: function (){
  428. var self=this;
  429. smalltalk.send(self, "_call_", ["hide"]);
  430. return self;}
  431. }),
  432. smalltalk.JQuery);
  433. smalltalk.addMethod(
  434. '_remove',
  435. smalltalk.method({
  436. selector: 'remove',
  437. fn: function (){
  438. var self=this;
  439. smalltalk.send(self, "_call_", ["remove"]);
  440. return self;}
  441. }),
  442. smalltalk.JQuery);
  443. smalltalk.addMethod(
  444. '_on_do_',
  445. smalltalk.method({
  446. selector: 'on:do:',
  447. fn: function (anEventString, aBlock){
  448. var self=this;
  449. self['@jquery'].bind(anEventString, function(e){aBlock(e, self)});
  450. return self;}
  451. }),
  452. smalltalk.JQuery);
  453. smalltalk.addMethod(
  454. '_removeEvents_',
  455. smalltalk.method({
  456. selector: 'removeEvents:',
  457. fn: function (aString){
  458. var self=this;
  459. smalltalk.send(self, "_call_withArgument_", ["unbind", aString]);
  460. return self;}
  461. }),
  462. smalltalk.JQuery);
  463. smalltalk.addMethod(
  464. '_onLoadDo_',
  465. smalltalk.method({
  466. selector: 'onLoadDo:',
  467. fn: function (aBlock){
  468. var self=this;
  469. smalltalk.send(self, "_call_withArgument_", ["load", aBlock]);
  470. return self;}
  471. }),
  472. smalltalk.JQuery);
  473. smalltalk.addMethod(
  474. '_initializeWithJQueryObject_',
  475. smalltalk.method({
  476. selector: 'initializeWithJQueryObject:',
  477. fn: function (anObject){
  478. var self=this;
  479. self['@jquery']=anObject;
  480. return self;}
  481. }),
  482. smalltalk.JQuery);
  483. smalltalk.addMethod(
  484. '_call_',
  485. smalltalk.method({
  486. selector: 'call:',
  487. fn: function (aString){
  488. var self=this;
  489. return self['@jquery'][aString]();
  490. return self;}
  491. }),
  492. smalltalk.JQuery);
  493. smalltalk.addMethod(
  494. '_call_withArgument_',
  495. smalltalk.method({
  496. selector: 'call:withArgument:',
  497. fn: function (aString, anObject){
  498. var self=this;
  499. return self['@jquery'][aString](anObject);
  500. return self;}
  501. }),
  502. smalltalk.JQuery);
  503. smalltalk.addMethod(
  504. '_elementsDo_',
  505. smalltalk.method({
  506. selector: 'elementsDo:',
  507. fn: function (aBlock){
  508. var self=this;
  509. self['@jquery'].each(function(index, element){aBlock(element, self)});
  510. return self;}
  511. }),
  512. smalltalk.JQuery);
  513. smalltalk.addMethod(
  514. '_hasClass_',
  515. smalltalk.method({
  516. selector: 'hasClass:',
  517. fn: function (aString){
  518. var self=this;
  519. return smalltalk.send(self, "_call_withArgument_", ["hasClass", aString]);
  520. return self;}
  521. }),
  522. smalltalk.JQuery);
  523. smalltalk.addMethod(
  524. '_find_',
  525. smalltalk.method({
  526. selector: 'find:',
  527. fn: function (aSelector){
  528. var self=this;
  529. return smalltalk.send(self, "_call_withArgument_", ["find", aSelector]);
  530. return self;}
  531. }),
  532. smalltalk.JQuery);
  533. smalltalk.addMethod(
  534. '_fromString_',
  535. smalltalk.method({
  536. selector: 'fromString:',
  537. fn: function (aString){
  538. var self=this;
  539. var newJQuery=nil;
  540. newJQuery = jQuery(String(aString));
  541. return smalltalk.send(self, "_from_", [newJQuery]);
  542. return self;}
  543. }),
  544. smalltalk.JQuery.klass);
  545. smalltalk.addMethod(
  546. '_from_',
  547. smalltalk.method({
  548. selector: 'from:',
  549. fn: function (anObject){
  550. var self=this;
  551. return (function($rec){smalltalk.send($rec, "_initializeWithJQueryObject_", [anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  552. return self;}
  553. }),
  554. smalltalk.JQuery.klass);
  555. smalltalk.addMethod(
  556. '_window',
  557. smalltalk.method({
  558. selector: 'window',
  559. fn: function (){
  560. var self=this;
  561. return self._from_(jQuery(window));
  562. return self;}
  563. }),
  564. smalltalk.JQuery.klass);
  565. smalltalk.addMethod(
  566. '_body',
  567. smalltalk.method({
  568. selector: 'body',
  569. fn: function (){
  570. var self=this;
  571. return self._from_(jQuery('body'));
  572. return self;}
  573. }),
  574. smalltalk.JQuery.klass);
  575. smalltalk.addMethod(
  576. '_document',
  577. smalltalk.method({
  578. selector: 'document',
  579. fn: function (){
  580. var self=this;
  581. return self._from_(jQuery(document));
  582. return self;}
  583. }),
  584. smalltalk.JQuery.klass);
  585. smalltalk.addMethod(
  586. '_fromElement_',
  587. smalltalk.method({
  588. selector: 'fromElement:',
  589. fn: function (anElement){
  590. var self=this;
  591. var newJQuery=nil;
  592. newJQuery = jQuery(anElement);
  593. return smalltalk.send(self, "_from_", [newJQuery]);
  594. return self;}
  595. }),
  596. smalltalk.JQuery.klass);
  597. smalltalk.addMethod(
  598. '_documentReady_',
  599. smalltalk.method({
  600. selector: 'documentReady:',
  601. fn: function (aBlock){
  602. var self=this;
  603. jQuery(document).ready(aBlock);
  604. return self;}
  605. }),
  606. smalltalk.JQuery.klass);
  607. smalltalk.addClass('Ajax', smalltalk.Object, ['settings'], 'JQuery');
  608. smalltalk.addMethod(
  609. '_at_',
  610. smalltalk.method({
  611. selector: 'at:',
  612. fn: function (aKey){
  613. var self=this;
  614. return smalltalk.send(self['@settings'], "_at_ifAbsent_", [aKey, (function(){return nil;})]);
  615. return self;}
  616. }),
  617. smalltalk.Ajax);
  618. smalltalk.addMethod(
  619. '_at_put_',
  620. smalltalk.method({
  621. selector: 'at:put:',
  622. fn: function (aKey, aValue){
  623. var self=this;
  624. smalltalk.send(self['@settings'], "_at_put_", [aKey, aValue]);
  625. return self;}
  626. }),
  627. smalltalk.Ajax);
  628. smalltalk.addMethod(
  629. '_url',
  630. smalltalk.method({
  631. selector: 'url',
  632. fn: function (){
  633. var self=this;
  634. return smalltalk.send(self, "_at_", ["url"]);
  635. return self;}
  636. }),
  637. smalltalk.Ajax);
  638. smalltalk.addMethod(
  639. '_url_',
  640. smalltalk.method({
  641. selector: 'url:',
  642. fn: function (aString){
  643. var self=this;
  644. smalltalk.send(self, "_at_put_", ["url", aString]);
  645. return self;}
  646. }),
  647. smalltalk.Ajax);
  648. smalltalk.addMethod(
  649. '_send',
  650. smalltalk.method({
  651. selector: 'send',
  652. fn: function (){
  653. var self=this;
  654. jQuery.ajax(self['@settings']);
  655. return self;}
  656. }),
  657. smalltalk.Ajax);
  658. smalltalk.addMethod(
  659. '_onSuccessDo_',
  660. smalltalk.method({
  661. selector: 'onSuccessDo:',
  662. fn: function (aBlock){
  663. var self=this;
  664. smalltalk.send(self, "_at_put_", ["success", aBlock]);
  665. return self;}
  666. }),
  667. smalltalk.Ajax);
  668. smalltalk.addMethod(
  669. '_onCompleteDo_',
  670. smalltalk.method({
  671. selector: 'onCompleteDo:',
  672. fn: function (aBlock){
  673. var self=this;
  674. smalltalk.send(self, "_at_put_", ["complete", aBlock]);
  675. return self;}
  676. }),
  677. smalltalk.Ajax);
  678. smalltalk.addMethod(
  679. '_onErrorDo_',
  680. smalltalk.method({
  681. selector: 'onErrorDo:',
  682. fn: function (aBlock){
  683. var self=this;
  684. smalltalk.send(self, "_at_put_", ["error", aBlock]);
  685. return self;}
  686. }),
  687. smalltalk.Ajax);
  688. smalltalk.addMethod(
  689. '_initialize',
  690. smalltalk.method({
  691. selector: 'initialize',
  692. fn: function (){
  693. var self=this;
  694. smalltalk.send(self, "_initialize", [], smalltalk.Object);
  695. self['@settings']=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []);
  696. return self;}
  697. }),
  698. smalltalk.Ajax);
  699. smalltalk.addMethod(
  700. '_url_',
  701. smalltalk.method({
  702. selector: 'url:',
  703. fn: function (aString){
  704. var self=this;
  705. return (function($rec){smalltalk.send($rec, "_url_", [aString]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  706. return self;}
  707. }),
  708. smalltalk.Ajax.klass);
  709. smalltalk.addMethod(
  710. '_appendToJQuery_',
  711. smalltalk.method({
  712. selector: 'appendToJQuery:',
  713. fn: function (aJQuery){
  714. var self=this;
  715. smalltalk.send(self, "_value_", [smalltalk.send((smalltalk.HTMLCanvas || HTMLCanvas), "_onJQuery_", [aJQuery])]);
  716. return self;}
  717. }),
  718. smalltalk.BlockClosure);
  719. smalltalk.addMethod(
  720. '_asJQuery',
  721. smalltalk.method({
  722. selector: 'asJQuery',
  723. fn: function (){
  724. var self=this;
  725. return smalltalk.send((smalltalk.JQuery || JQuery), "_fromString_", [self]);
  726. return self;}
  727. }),
  728. smalltalk.String);
  729. smalltalk.addMethod(
  730. '_appendToJQuery_',
  731. smalltalk.method({
  732. selector: 'appendToJQuery:',
  733. fn: function (aJQuery){
  734. var self=this;
  735. aJQuery._appendElement_(String(self));
  736. return self;}
  737. }),
  738. smalltalk.String);
  739. smalltalk.addMethod(
  740. '_appendToJQuery_',
  741. smalltalk.method({
  742. selector: 'appendToJQuery:',
  743. fn: function (aJQuery){
  744. var self=this;
  745. smalltalk.send(aJQuery, "_appendElement_", [smalltalk.send(self['@root'], "_element", [])]);
  746. return self;}
  747. }),
  748. smalltalk.HTMLCanvas);