JQuery.js 31 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003
  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. '_do_',
  579. smalltalk.method({
  580. selector: 'do:',
  581. category: 'enumerating',
  582. fn: function (aBlock){
  583. var self=this;
  584. smalltalk.send(self, "_elementsDo_", [(function(anElement){return smalltalk.send(aBlock, "_value_", [smalltalk.send(smalltalk.JQuery, "_fromElement_", [anElement])]);})]);
  585. return self;},
  586. source: unescape('do%3A%20aBlock%0A%20%20%20%20self%20elementsDo%3A%20%5B%3AanElement%7C%20%20aBlock%20value%3A%20%28JQuery%20fromElement%3A%20anElement%29%5D'),
  587. messageSends: ["elementsDo:", "value:", "fromElement:"],
  588. referencedClasses: [smalltalk.JQuery]
  589. }),
  590. smalltalk.JQuery);
  591. smalltalk.addMethod(
  592. '_elementsDo_',
  593. smalltalk.method({
  594. selector: 'elementsDo:',
  595. category: 'private',
  596. fn: function (aBlock){
  597. var self=this;
  598. self['@jquery'].each(function(index, element){aBlock(element, self)});
  599. return self;},
  600. source: unescape('elementsDo%3A%20aBlock%0A%20%20%20%20%22Iterate%20over%20a%20jQuery%20object%2C%20executing%20a%20function%20for%20each%20matched%20element.%22%0A%20%20%20%20%3Cself%5B%27@jquery%27%5D.each%28function%28index%2C%20element%29%7BaBlock%28element%2C%20self%29%7D%29%3E'),
  601. messageSends: [],
  602. referencedClasses: []
  603. }),
  604. smalltalk.JQuery);
  605. smalltalk.addMethod(
  606. '_attrAt_put_',
  607. smalltalk.method({
  608. selector: 'attrAt:put:',
  609. category: 'attributes',
  610. fn: function (aString, anotherString){
  611. var self=this;
  612. self['@jquery'].attr(aString, anotherString);
  613. return self;},
  614. source: unescape('attrAt%3A%20aString%20put%3A%20anotherString%0A%20%20%20%20%22Set%20the%20value%20of%20an%20attribute%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20%3Cself%5B%27@jquery%27%5D.attr%28aString%2C%20anotherString%29%3E'),
  615. messageSends: [],
  616. referencedClasses: []
  617. }),
  618. smalltalk.JQuery);
  619. smalltalk.addMethod(
  620. '_find_',
  621. smalltalk.method({
  622. selector: 'find:',
  623. category: 'traversing',
  624. fn: function (aSelector){
  625. var self=this;
  626. return smalltalk.send(self, "_call_withArgument_", ["find", aSelector]);
  627. return self;},
  628. source: unescape('find%3A%20aSelector%0A%20%20%20%20%22Get%20the%20descendants%20of%20each%20element%20in%20the%20current%20set%20of%20matched%20elements%2C%20filtered%20by%20a%20selector%2C%20jQuery%20object%2C%20or%20element.%22%0A%20%20%20%20%5E%20self%20call%3A%20%27find%27%20withArgument%3A%20aSelector'),
  629. messageSends: ["call:withArgument:"],
  630. referencedClasses: []
  631. }),
  632. smalltalk.JQuery);
  633. smalltalk.addMethod(
  634. '_fromString_',
  635. smalltalk.method({
  636. selector: 'fromString:',
  637. category: 'instance creation',
  638. fn: function (aString){
  639. var self=this;
  640. var newJQuery=nil;
  641. newJQuery = jQuery(String(aString));
  642. return smalltalk.send(self, "_from_", [newJQuery]);
  643. return self;},
  644. 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'),
  645. messageSends: ["from:"],
  646. referencedClasses: []
  647. }),
  648. smalltalk.JQuery.klass);
  649. smalltalk.addMethod(
  650. '_from_',
  651. smalltalk.method({
  652. selector: 'from:',
  653. category: 'instance creation',
  654. fn: function (anObject){
  655. var self=this;
  656. return (function($rec){smalltalk.send($rec, "_initializeWithJQueryObject_", [anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  657. return self;},
  658. source: unescape('from%3A%20anObject%0A%20%20%20%20%5Eself%20new%0A%09initializeWithJQueryObject%3A%20anObject%3B%0A%09yourself'),
  659. messageSends: ["initializeWithJQueryObject:", "yourself", "new"],
  660. referencedClasses: []
  661. }),
  662. smalltalk.JQuery.klass);
  663. smalltalk.addMethod(
  664. '_window',
  665. smalltalk.method({
  666. selector: 'window',
  667. category: 'instance creation',
  668. fn: function (){
  669. var self=this;
  670. return self._from_(jQuery(window));
  671. return self;},
  672. source: unescape('window%0A%09%3Creturn%20self._from_%28jQuery%28window%29%29%3E'),
  673. messageSends: [],
  674. referencedClasses: []
  675. }),
  676. smalltalk.JQuery.klass);
  677. smalltalk.addMethod(
  678. '_body',
  679. smalltalk.method({
  680. selector: 'body',
  681. category: 'instance creation',
  682. fn: function (){
  683. var self=this;
  684. return self._from_(jQuery('body'));
  685. return self;},
  686. source: unescape('body%0A%09%3Creturn%20self._from_%28jQuery%28%27body%27%29%29%3E'),
  687. messageSends: [],
  688. referencedClasses: []
  689. }),
  690. smalltalk.JQuery.klass);
  691. smalltalk.addMethod(
  692. '_document',
  693. smalltalk.method({
  694. selector: 'document',
  695. category: 'instance creation',
  696. fn: function (){
  697. var self=this;
  698. return self._from_(jQuery(document));
  699. return self;},
  700. source: unescape('document%0A%09%3Creturn%20self._from_%28jQuery%28document%29%29%3E'),
  701. messageSends: [],
  702. referencedClasses: []
  703. }),
  704. smalltalk.JQuery.klass);
  705. smalltalk.addMethod(
  706. '_fromElement_',
  707. smalltalk.method({
  708. selector: 'fromElement:',
  709. category: 'instance creation',
  710. fn: function (anElement){
  711. var self=this;
  712. var newJQuery=nil;
  713. newJQuery = jQuery(anElement);
  714. return smalltalk.send(self, "_from_", [newJQuery]);
  715. return self;},
  716. 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'),
  717. messageSends: ["from:"],
  718. referencedClasses: []
  719. }),
  720. smalltalk.JQuery.klass);
  721. smalltalk.addMethod(
  722. '_documentReady_',
  723. smalltalk.method({
  724. selector: 'documentReady:',
  725. category: 'instance creation',
  726. fn: function (aBlock){
  727. var self=this;
  728. jQuery(document).ready(aBlock);
  729. return self;},
  730. source: unescape('documentReady%3A%20aBlock%0A%09%3CjQuery%28document%29.ready%28aBlock%29%3E'),
  731. messageSends: [],
  732. referencedClasses: []
  733. }),
  734. smalltalk.JQuery.klass);
  735. smalltalk.addClass('Ajax', smalltalk.Object, ['settings'], 'JQuery');
  736. 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/')
  737. smalltalk.addMethod(
  738. '_at_',
  739. smalltalk.method({
  740. selector: 'at:',
  741. category: 'accessing',
  742. fn: function (aKey){
  743. var self=this;
  744. return smalltalk.send(self['@settings'], "_at_ifAbsent_", [aKey, (function(){return nil;})]);
  745. return self;},
  746. source: unescape('at%3A%20aKey%0A%20%20%20%20%5Esettings%20at%3A%20aKey%20ifAbsent%3A%20%5Bnil%5D'),
  747. messageSends: ["at:ifAbsent:"],
  748. referencedClasses: []
  749. }),
  750. smalltalk.Ajax);
  751. smalltalk.addMethod(
  752. '_at_put_',
  753. smalltalk.method({
  754. selector: 'at:put:',
  755. category: 'accessing',
  756. fn: function (aKey, aValue){
  757. var self=this;
  758. smalltalk.send(self['@settings'], "_at_put_", [aKey, aValue]);
  759. return self;},
  760. source: unescape('at%3A%20aKey%20put%3A%20aValue%0A%20%20%20%20settings%20at%3A%20aKey%20put%3A%20aValue'),
  761. messageSends: ["at:put:"],
  762. referencedClasses: []
  763. }),
  764. smalltalk.Ajax);
  765. smalltalk.addMethod(
  766. '_url',
  767. smalltalk.method({
  768. selector: 'url',
  769. category: 'accessing',
  770. fn: function (){
  771. var self=this;
  772. return smalltalk.send(self, "_at_", ["url"]);
  773. return self;},
  774. source: unescape('url%0A%20%20%20%20%5Eself%20at%3A%20%27url%27'),
  775. messageSends: ["at:"],
  776. referencedClasses: []
  777. }),
  778. smalltalk.Ajax);
  779. smalltalk.addMethod(
  780. '_url_',
  781. smalltalk.method({
  782. selector: 'url:',
  783. category: 'accessing',
  784. fn: function (aString){
  785. var self=this;
  786. smalltalk.send(self, "_at_put_", ["url", aString]);
  787. return self;},
  788. source: unescape('url%3A%20aString%0A%20%20%20%20self%20at%3A%20%27url%27%20put%3A%20aString'),
  789. messageSends: ["at:put:"],
  790. referencedClasses: []
  791. }),
  792. smalltalk.Ajax);
  793. smalltalk.addMethod(
  794. '_send',
  795. smalltalk.method({
  796. selector: 'send',
  797. category: 'actions',
  798. fn: function (){
  799. var self=this;
  800. jQuery.ajax(self['@settings']);
  801. return self;},
  802. source: unescape('send%0A%20%20%20%20%3CjQuery.ajax%28self%5B%27@settings%27%5D%29%3E'),
  803. messageSends: [],
  804. referencedClasses: []
  805. }),
  806. smalltalk.Ajax);
  807. smalltalk.addMethod(
  808. '_initialize',
  809. smalltalk.method({
  810. selector: 'initialize',
  811. category: 'initialization',
  812. fn: function (){
  813. var self=this;
  814. smalltalk.send(self, "_initialize", [], smalltalk.Object);
  815. self['@settings']=smalltalk.send(smalltalk.Dictionary, "_new", []);
  816. return self;},
  817. source: unescape('initialize%0A%20%20%20%20super%20initialize.%0A%20%20%20%20settings%20%3A%3D%20Dictionary%20new'),
  818. messageSends: ["initialize", "new"],
  819. referencedClasses: [smalltalk.Dictionary]
  820. }),
  821. smalltalk.Ajax);
  822. smalltalk.addMethod(
  823. '_onSuccessDo_',
  824. smalltalk.method({
  825. selector: 'onSuccessDo:',
  826. category: 'callbacks',
  827. fn: function (aBlock){
  828. var self=this;
  829. smalltalk.send(self, "_at_put_", ["success", aBlock]);
  830. return self;},
  831. source: unescape('onSuccessDo%3A%20aBlock%0A%09%22Set%20action%20to%20execute%20when%20Ajax%20request%20is%20successful.%20Pass%20received%20data%20as%20block%20argument.%20Block%20arguments%3A%20data%2C%20textStatus%2C%20jqXHR%22%0A%09self%20at%3A%20%27success%27%20put%3A%20aBlock'),
  832. messageSends: ["at:put:"],
  833. referencedClasses: []
  834. }),
  835. smalltalk.Ajax);
  836. smalltalk.addMethod(
  837. '_onCompleteDo_',
  838. smalltalk.method({
  839. selector: 'onCompleteDo:',
  840. category: 'callbacks',
  841. fn: function (aBlock){
  842. var self=this;
  843. smalltalk.send(self, "_at_put_", ["complete", aBlock]);
  844. return self;},
  845. source: unescape('onCompleteDo%3A%20aBlock%0A%09%22A%20block%20to%20be%20called%20when%20the%20request%20finishes%20%28after%20success%20and%20error%20callbacks%20are%20executed%29.%20Block%20arguments%3A%20jqXHR%2C%20textStatus%22%0A%09self%20at%3A%20%27complete%27%20put%3A%20aBlock'),
  846. messageSends: ["at:put:"],
  847. referencedClasses: []
  848. }),
  849. smalltalk.Ajax);
  850. smalltalk.addMethod(
  851. '_onErrorDo_',
  852. smalltalk.method({
  853. selector: 'onErrorDo:',
  854. category: 'callbacks',
  855. fn: function (aBlock){
  856. var self=this;
  857. smalltalk.send(self, "_at_put_", ["error", aBlock]);
  858. return self;},
  859. source: unescape('onErrorDo%3A%20aBlock%0A%09%22A%20block%20to%20be%20called%20if%20the%20request%20fails.Block%20arguments%3A%20jqXHR%2C%20textStatus%2C%20errorThrown%22%0A%09self%20at%3A%20%27error%27%20put%3A%20aBlock'),
  860. messageSends: ["at:put:"],
  861. referencedClasses: []
  862. }),
  863. smalltalk.Ajax);
  864. smalltalk.addMethod(
  865. '_url_',
  866. smalltalk.method({
  867. selector: 'url:',
  868. category: 'instance creation',
  869. fn: function (aString){
  870. var self=this;
  871. return (function($rec){smalltalk.send($rec, "_url_", [aString]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  872. return self;},
  873. source: unescape('url%3A%20aString%0A%20%20%20%20%5Eself%20new%0A%09url%3A%20aString%3B%0A%09yourself'),
  874. messageSends: ["url:", "yourself", "new"],
  875. referencedClasses: []
  876. }),
  877. smalltalk.Ajax.klass);
  878. smalltalk.addMethod(
  879. '_appendToJQuery_',
  880. smalltalk.method({
  881. selector: 'appendToJQuery:',
  882. category: '*JQuery',
  883. fn: function (aJQuery){
  884. var self=this;
  885. smalltalk.send(self, "_value_", [smalltalk.send(smalltalk.HTMLCanvas, "_onJQuery_", [aJQuery])]);
  886. return self;},
  887. source: unescape('appendToJQuery%3A%20aJQuery%0A%09self%20value%3A%20%28HTMLCanvas%20onJQuery%3A%20aJQuery%29'),
  888. messageSends: ["value:", "onJQuery:"],
  889. referencedClasses: [smalltalk.HTMLCanvas]
  890. }),
  891. smalltalk.BlockClosure);
  892. smalltalk.addMethod(
  893. '_asJQuery',
  894. smalltalk.method({
  895. selector: 'asJQuery',
  896. category: '*JQuery',
  897. fn: function (){
  898. var self=this;
  899. return smalltalk.send(smalltalk.JQuery, "_fromString_", [self]);
  900. return self;},
  901. source: unescape('asJQuery%0A%20%20%20%20%5EJQuery%20fromString%3A%20self'),
  902. messageSends: ["fromString:"],
  903. referencedClasses: [smalltalk.JQuery]
  904. }),
  905. smalltalk.String);
  906. smalltalk.addMethod(
  907. '_appendToJQuery_',
  908. smalltalk.method({
  909. selector: 'appendToJQuery:',
  910. category: '*JQuery',
  911. fn: function (aJQuery){
  912. var self=this;
  913. aJQuery._appendElement_(String(self));
  914. return self;},
  915. source: unescape('appendToJQuery%3A%20aJQuery%0A%20%20%20%20%3CaJQuery._appendElement_%28String%28self%29%29%3E'),
  916. messageSends: [],
  917. referencedClasses: []
  918. }),
  919. smalltalk.String);
  920. smalltalk.addMethod(
  921. '_appendToJQuery_',
  922. smalltalk.method({
  923. selector: 'appendToJQuery:',
  924. category: '*JQuery',
  925. fn: function (aJQuery){
  926. var self=this;
  927. smalltalk.send(aJQuery, "_appendElement_", [smalltalk.send(self['@root'], "_element", [])]);
  928. return self;},
  929. source: unescape('appendToJQuery%3A%20aJQuery%0A%20%20%20%20aJQuery%20appendElement%3A%20root%20element'),
  930. messageSends: ["appendElement:", "element"],
  931. referencedClasses: []
  932. }),
  933. smalltalk.HTMLCanvas);