JQuery.js 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898
  1. smalltalk.addClass('JQuery', smalltalk.Object, ['jquery'], 'JQuery');
  2. smalltalk.addMethod(
  3. '_append_',
  4. smalltalk.method({
  5. selector: 'append:',
  6. category: 'DOM insertion',
  7. fn: function (anObject){
  8. var self=this;
  9. smalltalk.send(anObject, "_appendToJQuery_", [self]);
  10. return self;},
  11. source: unescape('append%3A%20anObject%0A%20%20%20%20%22Append%20anObject%20at%20the%20end%20of%20the%20element.%22%0A%20%20%20%20anObject%20appendToJQuery%3A%20self'),
  12. messageSends: ["appendToJQuery:"],
  13. referencedClasses: []
  14. }),
  15. smalltalk.JQuery);
  16. smalltalk.addMethod(
  17. '_appendElement_',
  18. smalltalk.method({
  19. selector: 'appendElement:',
  20. category: 'DOM insertion',
  21. fn: function (anElement){
  22. var self=this;
  23. smalltalk.send(self, "_call_withArgument_", ["append", anElement]);
  24. return self;},
  25. source: unescape('appendElement%3A%20anElement%0A%20%20%20%20%22Append%20anElement%20at%20the%20end%20of%20the%20element.%0A%20%20%20%20%20Dont%27t%20call%20this%20method%20directly%2C%20use%20%23append%3A%20instead%22%0A%20%20%20%20self%20call%3A%20%27append%27%20withArgument%3A%20anElement'),
  26. messageSends: ["call:withArgument:"],
  27. referencedClasses: []
  28. }),
  29. smalltalk.JQuery);
  30. smalltalk.addMethod(
  31. '_appendToJQuery_',
  32. smalltalk.method({
  33. selector: 'appendToJQuery:',
  34. category: 'DOM insertion',
  35. fn: function (aJQuery){
  36. var self=this;
  37. smalltalk.send(aJQuery, "_appendElement_", [self['@jquery']]);
  38. return self;},
  39. source: unescape('appendToJQuery%3A%20aJQuery%0A%20%20%20%20aJQuery%20appendElement%3A%20jquery'),
  40. messageSends: ["appendElement:"],
  41. referencedClasses: []
  42. }),
  43. smalltalk.JQuery);
  44. smalltalk.addMethod(
  45. '_contents_',
  46. smalltalk.method({
  47. selector: 'contents:',
  48. category: 'DOM insertion',
  49. fn: function (anObject){
  50. var self=this;
  51. smalltalk.send(self, "_empty", []);
  52. smalltalk.send(self, "_append_", [anObject]);
  53. return self;},
  54. source: unescape('contents%3A%20anObject%0A%20%20%20%20self%20empty.%0A%20%20%20%20self%20append%3A%20anObject'),
  55. messageSends: ["empty", "append:"],
  56. referencedClasses: []
  57. }),
  58. smalltalk.JQuery);
  59. smalltalk.addMethod(
  60. '_empty',
  61. smalltalk.method({
  62. selector: 'empty',
  63. category: 'DOM insertion',
  64. fn: function (){
  65. var self=this;
  66. return smalltalk.send(self, "_call_", ["empty"]);
  67. return self;},
  68. source: unescape('empty%0A%20%20%20%20%5Eself%20call%3A%20%27empty%27'),
  69. messageSends: ["call:"],
  70. referencedClasses: []
  71. }),
  72. smalltalk.JQuery);
  73. smalltalk.addMethod(
  74. '_jquery',
  75. smalltalk.method({
  76. selector: 'jquery',
  77. category: 'accessing',
  78. fn: function (){
  79. var self=this;
  80. return self['@jquery'];
  81. return self;},
  82. source: unescape('jquery%0A%09%5Ejquery'),
  83. messageSends: [],
  84. referencedClasses: []
  85. }),
  86. smalltalk.JQuery);
  87. smalltalk.addMethod(
  88. '_removeAttribute_',
  89. smalltalk.method({
  90. selector: 'removeAttribute:',
  91. category: 'attributes',
  92. fn: function (aString){
  93. var self=this;
  94. return smalltalk.send(self, "_call_withArgument_", ["removeAttribute", aString]);
  95. return self;},
  96. source: unescape('removeAttribute%3A%20aString%0A%20%20%20%20%22Remove%20an%20attribute%20from%20each%20element%20in%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20%5Eself%20call%3A%20%27removeAttribute%27%20withArgument%3A%20aString'),
  97. messageSends: ["call:withArgument:"],
  98. referencedClasses: []
  99. }),
  100. smalltalk.JQuery);
  101. smalltalk.addMethod(
  102. '_attr_',
  103. smalltalk.method({
  104. selector: 'attr:',
  105. category: 'attributes',
  106. fn: function (aString){
  107. var self=this;
  108. return smalltalk.send(self, "_call_withArgument_", ["attr", aString]);
  109. return self;},
  110. source: unescape('attr%3A%20aString%0A%20%20%20%20%22Get%20the%20value%20of%20an%20attribute%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20%5Eself%20call%3A%20%27attr%27%20withArgument%3A%20aString'),
  111. messageSends: ["call:withArgument:"],
  112. referencedClasses: []
  113. }),
  114. smalltalk.JQuery);
  115. smalltalk.addMethod(
  116. '_val',
  117. smalltalk.method({
  118. selector: 'val',
  119. category: 'attributes',
  120. fn: function (){
  121. var self=this;
  122. return smalltalk.send(self, "_call_", ["val"]);
  123. return self;},
  124. source: unescape('val%0A%20%20%20%20%22Get%20the%20current%20value%20of%20the%20first%20element%20in%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20%5Eself%20call%3A%20%27val%27'),
  125. messageSends: ["call:"],
  126. referencedClasses: []
  127. }),
  128. smalltalk.JQuery);
  129. smalltalk.addMethod(
  130. '_val_',
  131. smalltalk.method({
  132. selector: 'val:',
  133. category: 'attributes',
  134. fn: function (aString){
  135. var self=this;
  136. smalltalk.send(self, "_call_withArgument_", ["val", aString]);
  137. return self;},
  138. source: unescape('val%3A%20aString%0A%20%20%20%20self%20call%3A%20%27val%27%20withArgument%3A%20aString'),
  139. messageSends: ["call:withArgument:"],
  140. referencedClasses: []
  141. }),
  142. smalltalk.JQuery);
  143. smalltalk.addMethod(
  144. '_cssAt_',
  145. smalltalk.method({
  146. selector: 'cssAt:',
  147. category: 'css',
  148. fn: function (aString){
  149. var self=this;
  150. return self['@jquery'].css(aString);
  151. return self;},
  152. source: unescape('cssAt%3A%20aString%0A%09%3Creturn%20self%5B%27@jquery%27%5D.css%28aString%29%3E'),
  153. messageSends: [],
  154. referencedClasses: []
  155. }),
  156. smalltalk.JQuery);
  157. smalltalk.addMethod(
  158. '_cssAt_put_',
  159. smalltalk.method({
  160. selector: 'cssAt:put:',
  161. category: 'css',
  162. fn: function (aString, anotherString){
  163. var self=this;
  164. self['@jquery'].css(aString, anotherString);
  165. return self;},
  166. source: unescape('cssAt%3A%20aString%20put%3A%20anotherString%0A%20%20%20%20%3Cself%5B%27@jquery%27%5D.css%28aString%2C%20anotherString%29%3E'),
  167. messageSends: [],
  168. referencedClasses: []
  169. }),
  170. smalltalk.JQuery);
  171. smalltalk.addMethod(
  172. '_addClass_',
  173. smalltalk.method({
  174. selector: 'addClass:',
  175. category: 'css',
  176. fn: function (aString){
  177. var self=this;
  178. smalltalk.send(self, "_call_withArgument_", ["addClass", aString]);
  179. return self;},
  180. source: unescape('addClass%3A%20aString%0A%20%20%20%20%22Adds%20the%20specified%20class%28es%29%20to%20each%20of%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20self%20call%3A%20%27addClass%27%20withArgument%3A%20aString'),
  181. messageSends: ["call:withArgument:"],
  182. referencedClasses: []
  183. }),
  184. smalltalk.JQuery);
  185. smalltalk.addMethod(
  186. '_removeClass_',
  187. smalltalk.method({
  188. selector: 'removeClass:',
  189. category: 'css',
  190. fn: function (aString){
  191. var self=this;
  192. smalltalk.send(self, "_call_withArgument_", ["removeClass", aString]);
  193. return self;},
  194. source: unescape('removeClass%3A%20aString%0A%20%20%20%20%22Remove%20a%20single%20class%2C%20multiple%20classes%2C%20or%20all%20classes%20from%20each%20element%20in%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20self%20call%3A%20%27removeClass%27%20withArgument%3A%20aString'),
  195. messageSends: ["call:withArgument:"],
  196. referencedClasses: []
  197. }),
  198. smalltalk.JQuery);
  199. smalltalk.addMethod(
  200. '_toggleClass_',
  201. smalltalk.method({
  202. selector: 'toggleClass:',
  203. category: 'css',
  204. fn: function (aString){
  205. var self=this;
  206. smalltalk.send(self, "_call_withArgument_", ["toggleClass", aString]);
  207. return self;},
  208. source: unescape('toggleClass%3A%20aString%0A%20%20%20%20%22Add%20or%20remove%20one%20or%20more%20classes%20from%20each%20element%20in%20the%20set%20of%20matched%20elements%2C%20depending%20on%20either%20the%20class%27s%20presence%20or%20the%20value%20of%20the%20switch%20argument.%22%0A%20%20%20%20self%20call%3A%20%27toggleClass%27%20withArgument%3A%20aString'),
  209. messageSends: ["call:withArgument:"],
  210. referencedClasses: []
  211. }),
  212. smalltalk.JQuery);
  213. smalltalk.addMethod(
  214. '_height',
  215. smalltalk.method({
  216. selector: 'height',
  217. category: 'css',
  218. fn: function (){
  219. var self=this;
  220. return smalltalk.send(self, "_call_", ["height"]);
  221. return self;},
  222. source: unescape('height%20%0A%20%20%20%20%22Get%20the%20current%20computed%20height%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20%5Eself%20call%3A%20%27height%27'),
  223. messageSends: ["call:"],
  224. referencedClasses: []
  225. }),
  226. smalltalk.JQuery);
  227. smalltalk.addMethod(
  228. '_height_',
  229. smalltalk.method({
  230. selector: 'height:',
  231. category: 'css',
  232. fn: function (anInteger){
  233. var self=this;
  234. smalltalk.send(self, "_call_withArgument_", ["height", anInteger]);
  235. return self;},
  236. source: unescape('height%3A%20anInteger%0A%20%20%20%20self%20call%3A%20%27height%27%20withArgument%3A%20anInteger'),
  237. messageSends: ["call:withArgument:"],
  238. referencedClasses: []
  239. }),
  240. smalltalk.JQuery);
  241. smalltalk.addMethod(
  242. '_width_',
  243. smalltalk.method({
  244. selector: 'width:',
  245. category: 'css',
  246. fn: function (anInteger){
  247. var self=this;
  248. smalltalk.send(self, "_call_withArgument_", ["width", anInteger]);
  249. return self;},
  250. source: unescape('width%3A%20anInteger%0A%20%20%20%20self%20call%3A%20%27width%27%20withArgument%3A%20anInteger'),
  251. messageSends: ["call:withArgument:"],
  252. referencedClasses: []
  253. }),
  254. smalltalk.JQuery);
  255. smalltalk.addMethod(
  256. '_width',
  257. smalltalk.method({
  258. selector: 'width',
  259. category: 'css',
  260. fn: function (){
  261. var self=this;
  262. return smalltalk.send(self, "_call_", ["width"]);
  263. return self;},
  264. source: unescape('width%0A%20%20%20%20%22Get%20the%20current%20computed%20width%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20%5Eself%20call%3A%20%27width%27'),
  265. messageSends: ["call:"],
  266. referencedClasses: []
  267. }),
  268. smalltalk.JQuery);
  269. smalltalk.addMethod(
  270. '_innerHeight',
  271. smalltalk.method({
  272. selector: 'innerHeight',
  273. category: 'css',
  274. fn: function (){
  275. var self=this;
  276. return smalltalk.send(self, "_call_", ["innerHeight"]);
  277. return self;},
  278. source: unescape('innerHeight%0A%20%20%20%20%22Get%20the%20current%20computed%20height%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements%2C%20including%20padding%20but%20not%20border.%22%0A%20%20%20%20%5Eself%20call%3A%20%27innerHeight%27'),
  279. messageSends: ["call:"],
  280. referencedClasses: []
  281. }),
  282. smalltalk.JQuery);
  283. smalltalk.addMethod(
  284. '_innerWidth',
  285. smalltalk.method({
  286. selector: 'innerWidth',
  287. category: 'css',
  288. fn: function (){
  289. var self=this;
  290. return smalltalk.send(self, "_call_", ["innerWidth"]);
  291. return self;},
  292. source: unescape('innerWidth%0A%20%20%20%20%22Get%20the%20current%20computed%20width%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements%2C%20including%20padding%20but%20not%20border.%22%0A%20%20%20%20%5Eself%20call%3A%20%27innerWidth%27'),
  293. messageSends: ["call:"],
  294. referencedClasses: []
  295. }),
  296. smalltalk.JQuery);
  297. smalltalk.addMethod(
  298. '_outerHeight',
  299. smalltalk.method({
  300. selector: 'outerHeight',
  301. category: 'css',
  302. fn: function (){
  303. var self=this;
  304. return smalltalk.send(self, "_call_", ["outerHeight"]);
  305. return self;},
  306. source: unescape('outerHeight%0A%20%20%20%20%22Get%20the%20current%20computed%20height%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements%2C%20including%20padding%2C%20border%2C%20and%20optionally%20margin.%22%0A%20%20%20%20%5Eself%20call%3A%20%27outerHeight%27'),
  307. messageSends: ["call:"],
  308. referencedClasses: []
  309. }),
  310. smalltalk.JQuery);
  311. smalltalk.addMethod(
  312. '_outerWidth',
  313. smalltalk.method({
  314. selector: 'outerWidth',
  315. category: 'css',
  316. fn: function (){
  317. var self=this;
  318. return smalltalk.send(self, "_call_", ["outerWidth"]);
  319. return self;},
  320. source: unescape('outerWidth%0A%20%20%20%20%22Get%20the%20current%20computed%20width%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements%2C%20including%20padding%20and%20border.%22%0A%20%20%20%20%5Eself%20call%3A%20%27outerWidth%27'),
  321. messageSends: ["call:"],
  322. referencedClasses: []
  323. }),
  324. smalltalk.JQuery);
  325. smalltalk.addMethod(
  326. '_top',
  327. smalltalk.method({
  328. selector: 'top',
  329. category: 'css',
  330. fn: function (){
  331. var self=this;
  332. return smalltalk.send(smalltalk.send(self, "_call_", ["position"]), "_basicAt_", ["top"]);
  333. return self;},
  334. source: unescape('top%0A%20%20%20%20%22Get%20the%20current%20y%20coordinate%20of%20the%20first%20element%20in%20the%20set%20of%20matched%20elements%2C%20relative%20to%20the%20offset%20parent.%22%0A%20%20%20%20%5E%28self%20call%3A%20%27position%27%29%20basicAt%3A%20%27top%27'),
  335. messageSends: ["basicAt:", "call:"],
  336. referencedClasses: []
  337. }),
  338. smalltalk.JQuery);
  339. smalltalk.addMethod(
  340. '_left',
  341. smalltalk.method({
  342. selector: 'left',
  343. category: 'css',
  344. fn: function (){
  345. var self=this;
  346. return smalltalk.send(smalltalk.send(self, "_call_", ["position"]), "_basicAt_", ["left"]);
  347. return self;},
  348. source: unescape('left%0A%20%20%20%20%22Get%20the%20current%20x%20coordinate%20of%20the%20first%20element%20in%20the%20set%20of%20matched%20elements%2C%20relative%20to%20the%20offset%20parent.%22%0A%20%20%20%20%5E%28self%20call%3A%20%27position%27%29%20basicAt%3A%20%27left%27'),
  349. messageSends: ["basicAt:", "call:"],
  350. referencedClasses: []
  351. }),
  352. smalltalk.JQuery);
  353. smalltalk.addMethod(
  354. '_offsetLeft',
  355. smalltalk.method({
  356. selector: 'offsetLeft',
  357. category: 'css',
  358. fn: function (){
  359. var self=this;
  360. return smalltalk.send(smalltalk.send(self, "_call_", ["offset"]), "_basicAt_", ["left"]);
  361. return self;},
  362. source: unescape('offsetLeft%0A%20%20%20%20%22Get%20the%20current%20coordinates%20of%20the%20first%20element%20in%20the%20set%20of%20matched%20elements%2C%20relative%20to%20the%20document.%22%0A%20%20%20%20%5E%28self%20call%3A%20%27offset%27%29%20basicAt%3A%20%27left%27'),
  363. messageSends: ["basicAt:", "call:"],
  364. referencedClasses: []
  365. }),
  366. smalltalk.JQuery);
  367. smalltalk.addMethod(
  368. '_offsetTop',
  369. smalltalk.method({
  370. selector: 'offsetTop',
  371. category: 'css',
  372. fn: function (){
  373. var self=this;
  374. return smalltalk.send(smalltalk.send(self, "_call_", ["offset"]), "_basicAt_", ["top"]);
  375. return self;},
  376. source: unescape('offsetTop%0A%20%20%20%20%22Get%20the%20current%20coordinates%20of%20the%20first%20element%20in%20the%20set%20of%20matched%20elements%2C%20relative%20to%20the%20document.%22%0A%20%20%20%20%5E%28self%20call%3A%20%27offset%27%29%20basicAt%3A%20%27top%27'),
  377. messageSends: ["basicAt:", "call:"],
  378. referencedClasses: []
  379. }),
  380. smalltalk.JQuery);
  381. smalltalk.addMethod(
  382. '_scrollLeft',
  383. smalltalk.method({
  384. selector: 'scrollLeft',
  385. category: 'css',
  386. fn: function (){
  387. var self=this;
  388. return smalltalk.send(self, "_call_", ["scrollLeft"]);
  389. return self;},
  390. source: unescape('scrollLeft%0A%20%20%20%20%22Get%20the%20current%20horizontal%20position%20of%20the%20scroll%20bar%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20%5Eself%20call%3A%20%27scrollLeft%27'),
  391. messageSends: ["call:"],
  392. referencedClasses: []
  393. }),
  394. smalltalk.JQuery);
  395. smalltalk.addMethod(
  396. '_scrollTop',
  397. smalltalk.method({
  398. selector: 'scrollTop',
  399. category: 'css',
  400. fn: function (){
  401. var self=this;
  402. return smalltalk.send(self, "_call_", ["scrollTop"]);
  403. return self;},
  404. source: unescape('scrollTop%0A%20%20%20%20%22Get%20the%20current%20vertical%20position%20of%20the%20scroll%20bar%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20%5Eself%20call%3A%20%27scrollTop%27'),
  405. messageSends: ["call:"],
  406. referencedClasses: []
  407. }),
  408. smalltalk.JQuery);
  409. smalltalk.addMethod(
  410. '_scrollLeft_',
  411. smalltalk.method({
  412. selector: 'scrollLeft:',
  413. category: 'css',
  414. fn: function (anInteger){
  415. var self=this;
  416. smalltalk.send(self, "_call_withArgument_", ["scrollLeft", anInteger]);
  417. return self;},
  418. source: unescape('scrollLeft%3A%20anInteger%0A%20%20%20%20self%20call%3A%20%27scrollLeft%27%20withArgument%3A%20anInteger'),
  419. messageSends: ["call:withArgument:"],
  420. referencedClasses: []
  421. }),
  422. smalltalk.JQuery);
  423. smalltalk.addMethod(
  424. '_scrollTop_',
  425. smalltalk.method({
  426. selector: 'scrollTop:',
  427. category: 'css',
  428. fn: function (anInteger){
  429. var self=this;
  430. smalltalk.send(self, "_call_withArgument_", ["scrollTop", anInteger]);
  431. return self;},
  432. source: unescape('scrollTop%3A%20anInteger%0A%20%20%20%20self%20call%3A%20%27scrollTop%27%20withArgument%3A%20anInteger'),
  433. messageSends: ["call:withArgument:"],
  434. referencedClasses: []
  435. }),
  436. smalltalk.JQuery);
  437. smalltalk.addMethod(
  438. '_focus',
  439. smalltalk.method({
  440. selector: 'focus',
  441. category: 'events',
  442. fn: function (){
  443. var self=this;
  444. smalltalk.send(self, "_call_", ["focus"]);
  445. return self;},
  446. source: unescape('focus%0A%20%20%20%20self%20call%3A%20%27focus%27'),
  447. messageSends: ["call:"],
  448. referencedClasses: []
  449. }),
  450. smalltalk.JQuery);
  451. smalltalk.addMethod(
  452. '_show',
  453. smalltalk.method({
  454. selector: 'show',
  455. category: 'events',
  456. fn: function (){
  457. var self=this;
  458. smalltalk.send(self, "_call_", ["show"]);
  459. return self;},
  460. source: unescape('show%0A%20%20%20%20self%20call%3A%20%27show%27'),
  461. messageSends: ["call:"],
  462. referencedClasses: []
  463. }),
  464. smalltalk.JQuery);
  465. smalltalk.addMethod(
  466. '_hide',
  467. smalltalk.method({
  468. selector: 'hide',
  469. category: 'events',
  470. fn: function (){
  471. var self=this;
  472. smalltalk.send(self, "_call_", ["hide"]);
  473. return self;},
  474. source: unescape('hide%0A%20%20%20%20self%20call%3A%20%27hide%27'),
  475. messageSends: ["call:"],
  476. referencedClasses: []
  477. }),
  478. smalltalk.JQuery);
  479. smalltalk.addMethod(
  480. '_remove',
  481. smalltalk.method({
  482. selector: 'remove',
  483. category: 'events',
  484. fn: function (){
  485. var self=this;
  486. smalltalk.send(self, "_call_", ["remove"]);
  487. return self;},
  488. source: unescape('remove%0A%20%20%20%20self%20call%3A%20%27remove%27'),
  489. messageSends: ["call:"],
  490. referencedClasses: []
  491. }),
  492. smalltalk.JQuery);
  493. smalltalk.addMethod(
  494. '_on_do_',
  495. smalltalk.method({
  496. selector: 'on:do:',
  497. category: 'events',
  498. fn: function (anEventString, aBlock){
  499. var self=this;
  500. self['@jquery'].bind(anEventString, function(e){aBlock(e, self)});
  501. return self;},
  502. source: unescape('on%3A%20anEventString%20do%3A%20aBlock%0A%20%20%20%20%22Attach%20aBlock%20for%20anEventString%20on%20the%20element%22%0A%20%20%20%20%3Cself%5B%27@jquery%27%5D.bind%28anEventString%2C%20function%28e%29%7BaBlock%28e%2C%20self%29%7D%29%3E'),
  503. messageSends: [],
  504. referencedClasses: []
  505. }),
  506. smalltalk.JQuery);
  507. smalltalk.addMethod(
  508. '_removeEvents_',
  509. smalltalk.method({
  510. selector: 'removeEvents:',
  511. category: 'events',
  512. fn: function (aString){
  513. var self=this;
  514. smalltalk.send(self, "_call_withArgument_", ["unbind", aString]);
  515. return self;},
  516. source: unescape('removeEvents%3A%20aString%0A%20%20%20%20%22Unbind%20all%20handlers%20attached%20to%20the%20event%20aString%22%0A%20%20%20%20self%20call%3A%20%27unbind%27%20withArgument%3A%20aString'),
  517. messageSends: ["call:withArgument:"],
  518. referencedClasses: []
  519. }),
  520. smalltalk.JQuery);
  521. smalltalk.addMethod(
  522. '_initializeWithJQueryObject_',
  523. smalltalk.method({
  524. selector: 'initializeWithJQueryObject:',
  525. category: 'initialization',
  526. fn: function (anObject){
  527. var self=this;
  528. self['@jquery']=anObject;
  529. return self;},
  530. source: unescape('initializeWithJQueryObject%3A%20anObject%0A%20%20%20%20jquery%20%3A%3D%20anObject'),
  531. messageSends: [],
  532. referencedClasses: []
  533. }),
  534. smalltalk.JQuery);
  535. smalltalk.addMethod(
  536. '_call_',
  537. smalltalk.method({
  538. selector: 'call:',
  539. category: 'private',
  540. fn: function (aString){
  541. var self=this;
  542. return self['@jquery'][aString]();
  543. return self;},
  544. source: unescape('call%3A%20aString%0A%09%3Creturn%20self%5B%27@jquery%27%5D%5BaString%5D%28%29%3E'),
  545. messageSends: [],
  546. referencedClasses: []
  547. }),
  548. smalltalk.JQuery);
  549. smalltalk.addMethod(
  550. '_call_withArgument_',
  551. smalltalk.method({
  552. selector: 'call:withArgument:',
  553. category: 'private',
  554. fn: function (aString, anObject){
  555. var self=this;
  556. return self['@jquery'][aString](anObject);
  557. return self;},
  558. source: unescape('call%3A%20aString%20withArgument%3A%20anObject%0A%20%20%20%20%3Creturn%20self%5B%27@jquery%27%5D%5BaString%5D%28anObject%29%3E'),
  559. messageSends: [],
  560. referencedClasses: []
  561. }),
  562. smalltalk.JQuery);
  563. smalltalk.addMethod(
  564. '_hasClass_',
  565. smalltalk.method({
  566. selector: 'hasClass:',
  567. category: 'testing',
  568. fn: function (aString){
  569. var self=this;
  570. return smalltalk.send(self, "_call_withArgument_", ["hasClass", aString]);
  571. return self;},
  572. source: unescape('hasClass%3A%20aString%0A%20%20%20%20%22Determine%20whether%20any%20of%20the%20matched%20elements%20are%20assigned%20the%20given%20class.%22%0A%20%20%20%20%5Eself%20call%3A%20%27hasClass%27%20withArgument%3A%20aString'),
  573. messageSends: ["call:withArgument:"],
  574. referencedClasses: []
  575. }),
  576. smalltalk.JQuery);
  577. smalltalk.addMethod(
  578. '_fromString_',
  579. smalltalk.method({
  580. selector: 'fromString:',
  581. category: 'instance creation',
  582. fn: function (aString){
  583. var self=this;
  584. var newJQuery=nil;
  585. newJQuery = jQuery(String(aString));
  586. return smalltalk.send(self, "_from_", [newJQuery]);
  587. return self;},
  588. source: unescape('fromString%3A%20aString%0A%20%20%20%20%7C%20newJQuery%20%7C%0A%20%20%20%20%3CnewJQuery%20%3D%20jQuery%28String%28aString%29%29%3E.%0A%20%20%20%20%5Eself%20from%3A%20newJQuery'),
  589. messageSends: ["from:"],
  590. referencedClasses: []
  591. }),
  592. smalltalk.JQuery.klass);
  593. smalltalk.addMethod(
  594. '_from_',
  595. smalltalk.method({
  596. selector: 'from:',
  597. category: 'instance creation',
  598. fn: function (anObject){
  599. var self=this;
  600. return (function($rec){smalltalk.send($rec, "_initializeWithJQueryObject_", [anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  601. return self;},
  602. source: unescape('from%3A%20anObject%0A%20%20%20%20%5Eself%20new%0A%09initializeWithJQueryObject%3A%20anObject%3B%0A%09yourself'),
  603. messageSends: ["initializeWithJQueryObject:", "yourself", "new"],
  604. referencedClasses: []
  605. }),
  606. smalltalk.JQuery.klass);
  607. smalltalk.addMethod(
  608. '_window',
  609. smalltalk.method({
  610. selector: 'window',
  611. category: 'instance creation',
  612. fn: function (){
  613. var self=this;
  614. return self._from_(jQuery(window));
  615. return self;},
  616. source: unescape('window%0A%09%3Creturn%20self._from_%28jQuery%28window%29%29%3E'),
  617. messageSends: [],
  618. referencedClasses: []
  619. }),
  620. smalltalk.JQuery.klass);
  621. smalltalk.addMethod(
  622. '_body',
  623. smalltalk.method({
  624. selector: 'body',
  625. category: 'instance creation',
  626. fn: function (){
  627. var self=this;
  628. return self._from_(jQuery('body'));
  629. return self;},
  630. source: unescape('body%0A%09%3Creturn%20self._from_%28jQuery%28%27body%27%29%29%3E'),
  631. messageSends: [],
  632. referencedClasses: []
  633. }),
  634. smalltalk.JQuery.klass);
  635. smalltalk.addMethod(
  636. '_document',
  637. smalltalk.method({
  638. selector: 'document',
  639. category: 'instance creation',
  640. fn: function (){
  641. var self=this;
  642. return self._from_(jQuery(document));
  643. return self;},
  644. source: unescape('document%0A%09%3Creturn%20self._from_%28jQuery%28document%29%29%3E'),
  645. messageSends: [],
  646. referencedClasses: []
  647. }),
  648. smalltalk.JQuery.klass);
  649. smalltalk.addMethod(
  650. '_fromElement_',
  651. smalltalk.method({
  652. selector: 'fromElement:',
  653. category: 'instance creation',
  654. fn: function (anElement){
  655. var self=this;
  656. var newJQuery=nil;
  657. newJQuery = jQuery(anElement);
  658. return smalltalk.send(self, "_from_", [newJQuery]);
  659. return self;},
  660. source: unescape('fromElement%3A%20anElement%0A%20%20%20%20%7C%20newJQuery%20%7C%0A%20%20%20%20%3CnewJQuery%20%3D%20jQuery%28anElement%29%3E.%0A%20%20%20%20%5Eself%20from%3A%20newJQuery'),
  661. messageSends: ["from:"],
  662. referencedClasses: []
  663. }),
  664. smalltalk.JQuery.klass);
  665. smalltalk.addMethod(
  666. '_documentReady_',
  667. smalltalk.method({
  668. selector: 'documentReady:',
  669. category: 'instance creation',
  670. fn: function (aBlock){
  671. var self=this;
  672. jQuery(document).ready(aBlock);
  673. return self;},
  674. source: unescape('documentReady%3A%20aBlock%0A%09%3CjQuery%28document%29.ready%28aBlock%29%3E'),
  675. messageSends: [],
  676. referencedClasses: []
  677. }),
  678. smalltalk.JQuery.klass);
  679. smalltalk.addClass('Ajax', smalltalk.Object, ['settings'], 'JQuery');
  680. smalltalk.Ajax.comment=unescape('instance%20variable%20names%3A%0A-%20settings%20%20A%20set%20of%20key/value%20pairs%20that%20configure%20the%20Ajax%20request.%20All%20settings%20are%20optional.%0A%0AFull%20list%20of%20settings%20options%20at%20http%3A//api.jquery.com/jQuery.ajax/')
  681. smalltalk.addMethod(
  682. '_at_',
  683. smalltalk.method({
  684. selector: 'at:',
  685. category: 'accessing',
  686. fn: function (aKey){
  687. var self=this;
  688. return smalltalk.send(self['@settings'], "_at_ifAbsent_", [aKey, (function(){return nil;})]);
  689. return self;},
  690. source: unescape('at%3A%20aKey%0A%20%20%20%20%5Esettings%20at%3A%20aKey%20ifAbsent%3A%20%5Bnil%5D'),
  691. messageSends: ["at:ifAbsent:"],
  692. referencedClasses: []
  693. }),
  694. smalltalk.Ajax);
  695. smalltalk.addMethod(
  696. '_at_put_',
  697. smalltalk.method({
  698. selector: 'at:put:',
  699. category: 'accessing',
  700. fn: function (aKey, aValue){
  701. var self=this;
  702. smalltalk.send(self['@settings'], "_at_put_", [aKey, aValue]);
  703. return self;},
  704. source: unescape('at%3A%20aKey%20put%3A%20aValue%0A%20%20%20%20settings%20at%3A%20aKey%20put%3A%20aValue'),
  705. messageSends: ["at:put:"],
  706. referencedClasses: []
  707. }),
  708. smalltalk.Ajax);
  709. smalltalk.addMethod(
  710. '_url',
  711. smalltalk.method({
  712. selector: 'url',
  713. category: 'accessing',
  714. fn: function (){
  715. var self=this;
  716. return smalltalk.send(self, "_at_", ["url"]);
  717. return self;},
  718. source: unescape('url%0A%20%20%20%20%5Eself%20at%3A%20%27url%27'),
  719. messageSends: ["at:"],
  720. referencedClasses: []
  721. }),
  722. smalltalk.Ajax);
  723. smalltalk.addMethod(
  724. '_url_',
  725. smalltalk.method({
  726. selector: 'url:',
  727. category: 'accessing',
  728. fn: function (aString){
  729. var self=this;
  730. smalltalk.send(self, "_at_put_", ["url", aString]);
  731. return self;},
  732. source: unescape('url%3A%20aString%0A%20%20%20%20self%20at%3A%20%27url%27%20put%3A%20aString'),
  733. messageSends: ["at:put:"],
  734. referencedClasses: []
  735. }),
  736. smalltalk.Ajax);
  737. smalltalk.addMethod(
  738. '_send',
  739. smalltalk.method({
  740. selector: 'send',
  741. category: 'actions',
  742. fn: function (){
  743. var self=this;
  744. jQuery.ajax(self['@settings']);
  745. return self;},
  746. source: unescape('send%0A%20%20%20%20%3CjQuery.ajax%28self%5B%27@settings%27%5D%29%3E'),
  747. messageSends: [],
  748. referencedClasses: []
  749. }),
  750. smalltalk.Ajax);
  751. smalltalk.addMethod(
  752. '_initialize',
  753. smalltalk.method({
  754. selector: 'initialize',
  755. category: 'initialization',
  756. fn: function (){
  757. var self=this;
  758. smalltalk.send(self, "_initialize", [], smalltalk.Object);
  759. self['@settings']=smalltalk.send(smalltalk.Dictionary, "_new", []);
  760. return self;},
  761. source: unescape('initialize%0A%20%20%20%20super%20initialize.%0A%20%20%20%20settings%20%3A%3D%20Dictionary%20new'),
  762. messageSends: ["initialize", "new"],
  763. referencedClasses: [smalltalk.Dictionary]
  764. }),
  765. smalltalk.Ajax);
  766. smalltalk.addMethod(
  767. '_url_',
  768. smalltalk.method({
  769. selector: 'url:',
  770. category: 'instance creation',
  771. fn: function (aString){
  772. var self=this;
  773. return (function($rec){smalltalk.send($rec, "_url_", [aString]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  774. return self;},
  775. source: unescape('url%3A%20aString%0A%20%20%20%20%5Eself%20new%0A%09url%3A%20aString%3B%0A%09yourself'),
  776. messageSends: ["url:", "yourself", "new"],
  777. referencedClasses: []
  778. }),
  779. smalltalk.Ajax.klass);
  780. smalltalk.addMethod(
  781. '_appendToJQuery_',
  782. smalltalk.method({
  783. selector: 'appendToJQuery:',
  784. category: '*JQuery',
  785. fn: function (aJQuery){
  786. var self=this;
  787. smalltalk.send(self, "_value_", [smalltalk.send(smalltalk.HTMLCanvas, "_onJQuery_", [aJQuery])]);
  788. return self;},
  789. source: unescape('appendToJQuery%3A%20aJQuery%0A%09self%20value%3A%20%28HTMLCanvas%20onJQuery%3A%20aJQuery%29'),
  790. messageSends: ["value:", "onJQuery:"],
  791. referencedClasses: [smalltalk.HTMLCanvas]
  792. }),
  793. smalltalk.BlockClosure);
  794. smalltalk.addMethod(
  795. '_asJQuery',
  796. smalltalk.method({
  797. selector: 'asJQuery',
  798. category: '*JQuery',
  799. fn: function (){
  800. var self=this;
  801. return smalltalk.send(smalltalk.JQuery, "_fromString_", [self]);
  802. return self;},
  803. source: unescape('asJQuery%0A%20%20%20%20%5EJQuery%20fromString%3A%20self'),
  804. messageSends: ["fromString:"],
  805. referencedClasses: [smalltalk.JQuery]
  806. }),
  807. smalltalk.String);
  808. smalltalk.addMethod(
  809. '_appendToJQuery_',
  810. smalltalk.method({
  811. selector: 'appendToJQuery:',
  812. category: '*JQuery',
  813. fn: function (aJQuery){
  814. var self=this;
  815. aJQuery._appendElement_(String(self));
  816. return self;},
  817. source: unescape('appendToJQuery%3A%20aJQuery%0A%20%20%20%20%3CaJQuery._appendElement_%28String%28self%29%29%3E'),
  818. messageSends: [],
  819. referencedClasses: []
  820. }),
  821. smalltalk.String);
  822. smalltalk.addMethod(
  823. '_appendToJQuery_',
  824. smalltalk.method({
  825. selector: 'appendToJQuery:',
  826. category: '*JQuery',
  827. fn: function (aJQuery){
  828. var self=this;
  829. smalltalk.send(aJQuery, "_appendElement_", [smalltalk.send(self['@root'], "_element", [])]);
  830. return self;},
  831. source: unescape('appendToJQuery%3A%20aJQuery%0A%20%20%20%20aJQuery%20appendElement%3A%20root%20element'),
  832. messageSends: ["appendElement:", "element"],
  833. referencedClasses: []
  834. }),
  835. smalltalk.HTMLCanvas);