Home | History | Annotate | Download | only in parse-only

Lines Matching refs:function

35   emptyFunction: function() { },
36 K: function(x) { return x }
45 create: function() {
50 function klass() {
59 var subclass = function() { };
78 addMethods: function(source) {
90 value = (function(m) {
91 return function() { return ancestor[m].apply(this, arguments) };
106 Object.extend = function(destination, source) {
113 inspect: function(object) {
124 toJSON: function(object) {
128 case 'function':
147 toQueryString: function(object) {
151 toHTML: function(object) {
155 keys: function(object) {
162 values: function(object) {
169 clone: function(object) {
173 isElement: function(object) {
177 isArray: function(object) {
182 isHash: function(object) {
186 isFunction: function(object) {
187 return typeof object == "function";
190 isString: function(object) {
194 isNumber: function(object) {
198 isUndefined: function(object) {
203 Object.extend(Function.prototype, {
204 argumentNames: function() {
205 var names = this.toString().match(/^[\s\(]*function[^(]*\(([^\)]*)\)/)[1]
210 bind: function() {
213 return function() {
218 bindAsEventListener: function() {
220 return function(event) {
225 curry: function() {
228 return function() {
233 delay: function() {
235 return window.setTimeout(function() {
240 defer: function() {
245 wrap: function(wrapper) {
247 return function() {
252 methodize: function() {
255 return this._methodized = function() {
261 Date.prototype.toJSON = function() {
271 these: function() {
288 RegExp.escape = function(str) {
295 initialize: function(callback, frequency) {
303 registerCallback: function() {
307 execute: function() {
311 stop: function() {
317 onTimerEvent: function() {
329 interpret: function(value) {
343 gsub: function(pattern, replacement) {
359 sub: function(pattern, replacement, count) {
363 return this.gsub(pattern, function(match) {
369 scan: function(pattern, iterator) {
374 truncate: function(length, truncation) {
381 strip: function() {
385 stripTags: function() {
389 stripScripts: function() {
393 extractScripts: function() {
396 return (this.match(matchAll) || []).map(function(scriptTag) {
401 evalScripts: function() {
402 return this.extractScripts().map(function(script) { return eval(script) });
405 escapeHTML: function() {
411 unescapeHTML: function() {
415 $A(div.childNodes).inject('', function(memo, node) { return memo+node.nodeValue }) :
419 toQueryParams: function(separator) {
423 return match[1].split(separator || '&').inject({ }, function(hash, pair) {
439 toArray: function() {
443 succ: function() {
448 times: function(count) {
452 camelize: function() {
466 capitalize: function() {
470 underscore: function() {
474 dasherize: function() {
478 inspect: function(useDoubleQuotes) {
479 var escapedString = this.gsub(/[\x00-\x1f\\]/, function(match) {
487 toJSON: function() {
491 unfilterJSON: function(filter) {
495 isJSON: function() {
502 evalJSON: function(sanitize) {
510 include: function(pattern) {
514 startsWith: function(pattern) {
518 endsWith: function(pattern) {
523 empty: function() {
527 blank: function() {
531 interpolate: function(object, pattern) {
537 escapeHTML: function() {
540 unescapeHTML: function() {
545 String.prototype.gsub.prepareReplacement = function(replacement) {
548 return function(match) { return template.evaluate(match) };
561 initialize: function(template, pattern) {
566 evaluate: function(object) {
570 return this.template.gsub(this.pattern, function(match) {
598 each: function(iterator, context) {
601 this._each(function(value) {
610 eachSlice: function(number, iterator, context) {
618 all: function(iterator, context) {
621 this.each(function(value, index) {
628 any: function(iterator, context) {
631 this.each(function(value, index) {
638 collect: function(iterator, context) {
641 this.each(function(value, index) {
647 detect: function(iterator, context) {
649 this.each(function(value, index) {
658 findAll: function(iterator, context) {
660 this.each(function(value, index) {
667 grep: function(filter, iterator, context) {
674 this.each(function(value, index) {
681 include: function(object) {
686 this.each(function(value) {
695 inGroupsOf: function(number, fillWith) {
697 return this.eachSlice(number, function(slice) {
703 inject: function(memo, iterator, context) {
704 this.each(function(value, index) {
710 invoke: function(method) {
712 return this.map(function(value) {
717 max: function(iterator, context) {
720 this.each(function(value, index) {
728 min: function(iterator, context) {
731 this.each(function(value, index) {
739 partition: function(iterator, context) {
742 this.each(function(value, index) {
749 pluck: function(property) {
751 this.each(function(value) {
757 reject: function(iterator, context) {
759 this.each(function(value, index) {
766 sortBy: function(iterator, context) {
767 return this.map(function(value, index) {
772 }).sort(function(left, right) {
778 toArray: function() {
782 zip: function() {
788 return this.map(function(value, index) {
793 size: function() {
797 inspect: function() {
812 function $A(iterable) {
821 $A = function(iterable) {
824 // A NodeList is a function, has an function `item` property, and a numeric
826 if (!(typeof iterable === 'function' && typeof iterable.length ===
827 'number' && typeof iterable.item === 'function') && iterable.toArray)
842 _each: function(iterator) {
847 clear: function() {
852 first: function() {
856 last: function() {
860 compact: function() {
861 return this.select(function(value) {
866 flatten: function() {
867 return this.inject([], function(array, value) {
873 without: function() {
875 return this.select(function(value) {
880 reverse: function(inline) {
884 reduce: function() {
888 uniq: function(sorted) {
889 return this.inject([], function(array, value, index) {
896 intersect: function(array) {
897 return this.uniq().findAll(function(item) {
898 return array.detect(function(value) { return item === value });
902 clone: function() {
906 size: function() {
910 inspect: function() {
914 toJSON: function() {
916 this.each(function(object) {
928 if (!Array.prototype.indexOf) Array.prototype.indexOf = function(item, i) {
937 if (!Array.prototype.lastIndexOf) Array.prototype.lastIndexOf = function(item, i) {
945 function $w(string) {
952 Array.prototype.concat = function() {
967 toColorPart: function() {
971 succ: function() {
975 times: function(iterator, context) {
980 toPaddedString: function(length, radix) {
985 toJSON: function() {
990 $w('abs round ceil floor').each(function(method){
993 function $H(object) {
997 var Hash = Class.create(Enumerable, (function() {
999 function toQueryPair(key, value) {
1005 initialize: function(object) {
1009 _each: function(iterator) {
1018 set: function(key, value) {
1022 get: function(key) {
1028 unset: function(key) {
1034 toObject: function() {
1038 keys: function() {
1042 values: function() {
1046 index: function(value) {
1047 var match = this.detect(function(pair) {
1053 merge: function(object) {
1057 update: function(object) {
1058 return new Hash(object).inject(this, function(result, pair) {
1064 toQueryString: function() {
1065 return this.inject([], function(results, pair) {
1076 inspect: function() {
1077 return '#<Hash:{' + this.map(function(pair) {
1082 toJSON: function() {
1086 clone: function() {
1095 initialize: function(start, end, exclusive) {
1101 _each: function(iterator) {
1109 include: function(value) {
1118 var $R = function(start, end, exclusive) {
1123 getTransport: function() {
1125 function() {return new XMLHttpRequest()},
1126 function() {return new ActiveXObject('Msxml2.XMLHTTP')},
1127 function() {return new ActiveXObject('Microsoft.XMLHTTP')}
1137 _each: function(iterator) {
1141 register: function(responder) {
1146 unregister: function(responder) {
1150 dispatch: function(callback, request, transport, json) {
1151 this.each(function(responder) {
1164 onCreate: function() { Ajax.activeRequestCount++ },
1165 onComplete: function() { Ajax.activeRequestCount-- }
1169 initialize: function(options) {
1193 initialize: function($super, url, options) {
1199 request: function(url) {
1246 onStateChange: function() {
1252 setRequestHeaders: function() {
1280 $H(extras).each(function(pair) { headers[pair.key] = pair.value });
1287 success: function() {
1292 getStatus: function() {
1298 respondToReadyState: function(readyState) {
1331 isSameOrigin: function() {
1340 getHeader: function(name) {
1346 evalResponse: function() {
1354 dispatchException: function(exception) {
1364 initialize: function(request){
1388 getStatusText: function() {
1396 getAllHeaders: function() {
1402 getResponseHeader: function(name) {
1406 getAllResponseHeaders: function() {
1410 _getHeaderJSON: function() {
1422 _getResponseJSON: function() {
1438 initialize: function($super, container, url, options) {
1446 options.onComplete = (function(response, json) {
1454 updateContent: function(responseText) {
1474 initialize: function($super, container, url, options) {
1488 start: function() {
1493 stop: function() {
1499 updateComplete: function(response) {
1509 onTimerEvent: function() {
1513 function $(element) {
1525 document._getElementsByXPath = function(expression, parentElement) {
1557 (function() {
1559 this.Element = function(tagName, attributes) {
1578 visible: function(element) {
1582 toggle: function(element) {
1588 hide: function(element) {
1594 show: function(element) {
1600 remove: function(element) {
1606 update: function(element, content) {
1616 replace: function(element, content) {
1630 insert: function(element, insertions) {
1666 wrap: function(element, wrapper, attributes) {
1678 inspect: function(element) {
1681 $H({'id': 'id', 'className': 'class'}).each(function(pair) {
1689 recursivelyCollect: function(element, property) {
1698 ancestors: function(element) {
1702 descendants: function(element) {
1706 firstDescendant: function(element) {
1712 immediateDescendants: function(element) {
1719 previousSiblings: function(element) {
1723 nextSiblings: function(element) {
1727 siblings: function(element) {
1732 match: function(element, selector) {
1738 up: function(element, expression, index) {
1746 down: function(element, expression, index) {
1753 previous: function(element, expression, index) {
1761 next: function(element, expression, index) {
1769 select: function() {
1774 adjacent: function() {
1779 identify: function(element) {
1788 readAttribute: function(element, name) {
1802 writeAttribute: function(element, name, value) {
1822 getHeight: function(element) {
1826 getWidth: function(element) {
1830 classNames: function(element) {
1834 hasClassName: function(element, className) {
1841 addClassName: function(element, className) {
1848 removeClassName: function(element, className) {
1855 toggleClassName: function(element, className) {
1862 cleanWhitespace: function(element) {
1874 empty: function(element) {
1878 descendantOf: function(element, ancestor) {
1893 scrollTo: function(element) {
1900 getStyle: function(element, style) {
1912 getOpacity: function(element) {
1916 setStyle: function(element, styles) {
1934 setOpacity: function(element, value) {
1941 getDimensions: function(element) {
1964 makePositioned: function(element) {
1980 undoPositioned: function(element) {
1993 makeClipping: function(element) {
2002 undoClipping: function(element) {
2010 cumulativeOffset: function(element) {
2020 positionedOffset: function(element) {
2035 absolutize: function(element) {
2059 relativize: function(element) {
2075 cumulativeScrollOffset: function(element) {
2085 getOffsetParent: function(element) {
2096 viewportOffset: function(forElement) {
2121 clonePosition: function(element, source) {
2180 function(proceed, element, style) {
2204 return properties.inject(dim, function(memo, property) {
2214 function(proceed, element, attribute) {
2225 function(proceed, element) {
2239 $w('positionedOffset viewportOffset').each(function(method) {
2241 function(proceed, element) {
2261 function(proceed, element) {
2268 Element.Methods.getStyle = function(element, style) {
2288 Element.Methods.setOpacity = function(element, value) {
2289 function stripAlpha(filter){
2316 _getAttr: function(element, attribute) {
2319 _getAttrNode: function(element, attribute) {
2323 _getEv: function(element, attribute) {
2327 _flag: function(element, attribute) {
2330 style: function(element) {
2333 title: function(element) {
2346 checked: function(element, value) {
2350 style: function(element, value) {
2359 'encType maxLength readOnly longDesc frameBorder').each(function(attr) {
2364 (function(v) {
2397 Element.Methods.setOpacity = function(element, value) {
2406 Element.Methods.setOpacity = function(element, value) {
2426 Element.Methods.cumulativeOffset = function(element) {
2443 Element.Methods.update = function(element, content) {
2453 $A(element.childNodes).each(function(node) { element.removeChild(node) });
2455 .each(function(node) { element.appendChild(node) });
2465 Element.Methods.replace = function(element, content) {
2482 fragments.each(function(node) { parent.insertBefore(node, nextSibling) });
2484 fragments.each(function(node) { parent.appendChild(node) });
2493 Element._returnOffset = function(l, t) {
2500 Element._getContentFromAnonymousElement = function(tagName, html) {
2504 t[2].times(function() { div = div.firstChild });
2510 before: function(element, node) {
2513 top: function(element, node) {
2516 bottom: function(element, node) {
2519 after: function(element, node) {
2531 (function() {
2540 hasAttribute: function(element, attribute) {
2558 Element.extend = (function() {
2564 var extend = Object.extend(function(element) {
2584 refresh: function() {
2597 Element.hasAttribute = function(element, attribute) {
2602 Element.addMethods = function(methods) {
2627 function extend(tagName) {
2634 function copy(methods, destination, onlyIfAbsent) {
2644 function findDOMClass(tagName) {
2690 getDimensions: function() {
2692 $w('width height').each(function(d) {
2707 getWidth: function() {
2711 getHeight: function() {
2715 getScrollOffsets: function() {
2726 initialize: function(expression) {
2741 shouldUseXPath: function() {
2759 shouldUseSelectorsAPI: function() {
2775 compileMatcher: function() {
2784 this.matcher = ["this.matcher = function(root) {",
2805 compileXPathMatcher: function() {
2830 findElements: function(root) {
2855 match: function(element) {
2891 toString: function() {
2895 inspect: function() {
2908 tagName: function(m) {
2915 attrPresence: function(m) {
2919 attr: function(m) {
2924 pseudo: function(m) {
2947 'not': function(m) {
2965 'nth-child': function(m) {
2968 'nth-last-child': function(m) {
2971 'nth-of-type': function(m) {
2974 'nth-last-of-type': function(m) {
2977 'first-of-type': function(m) {
2980 'last-of-type': function(m) {
2983 'only-of-type': function(m) {
2986 nth: function(fragment, m) {
3010 attr: function(m) {
3014 pseudo: function(m) {
3044 tagName: function(element, matches) {
3048 className: function(element, matches) {
3052 id: function(element, matches) {
3056 attrPresence: function(element, matches) {
3060 attr: function(element, matches) {
3069 concat: function(a, b) {
3076 mark: function(nodes) {
3083 unmark: function(nodes) {
3092 index: function(parentNode, reverse, ofType) {
3106 unique: function(nodes) {
3118 descendant: function(nodes) {
3125 child: function(nodes) {
3134 adjacent: function(nodes) {
3142 laterSibling: function(nodes) {
3149 nextElementSibling: function(node) {
3155 previousElementSibling: function(node) {
3162 tagName: function(nodes, root, tagName, combinator) {
3181 id: function(nodes, root, id, combinator) {
3206 className: function(nodes, root, className, combinator) {
3211 byClassName: function(nodes, root, className) {
3223 attrPresence: function(nodes, root, attr, combinator) {
3232 attr: function(nodes, root, attr, value, operator, combinator) {
3244 pseudo: function(nodes, name, value, root, combinator) {
3252 'first-child': function(nodes, value, root) {
3259 'last-child': function(nodes, value, root) {
3266 'only-child': function(nodes, value, root) {
3273 'nth-child': function(nodes, formula, root) {
3276 function(nodes, formula, root) {
3279 'nth-of-type': function(nodes, formula, root) {
3282 'nth-last-of-type': function(nodes, formula, root) {
3285 'first-of-type': function(nodes, formula, root) {
3288 'last-of-type': function(nodes, formula, root) {
3291 'only-of-type': function(nodes, formula, root) {
3297 getIndices: function(a, b, total) {
3299 return $R(1, total).inject([], function(memo, i) {
3306 nth: function(nodes, formula, root, reverse, ofType) {
3337 'empty': function(nodes, value, root) {
3346 'not': function(nodes, selector, root) {
3356 'enabled': function(nodes, value, root) {
3363 'disabled': function(nodes, value, root) {
3369 'checked': function(nodes, value, root) {
3377 '=': function(nv, v) { return nv == v; },
3378 '!=': function(nv, v) { return nv != v; },
3379 '^=': function(nv, v) { return nv == v || nv && nv.startsWith(v); },
3380 '$=': function(nv, v) { return nv == v || nv && nv.endsWith(v); },
3381 '*=': function(nv, v) { return nv == v || nv && nv.include(v); },
3382 '$=': function(nv, v) { return nv.endsWith(v); },
3383 '*=': function(nv, v) { return nv.include(v); },
3384 '~=': function(nv, v) { return (' ' + nv + ' ').include(' ' + v + ' '); },
3385 '|=': function(nv, v) { return ('-' + (nv || "").toUpperCase() +
3389 split: function(expression) {
3391 expression.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/, function(m) {
3397 matchElements: function(elements, expression) {
3406 findElement: function(elements, expression, index) {
3413 findChildElements: function(element, expressions) {
3428 concat: function(a, b) {
3435 unmark: function(nodes) {
3443 function $$() {
3447 reset: function(form) {
3452 serializeElements: function(elements, options) {
3457 var data = elements.inject({ }, function(result, element) {
3478 serialize: function(form, options) {
3482 getElements: function(form) {
3484 function(elements, child) {
3492 getInputs: function(form, typeName, name) {
3508 disable: function(form) {
3514 enable: function(form) {
3520 findFirstElement: function(form) {
3521 var elements = $(form).getElements().findAll(function(element) {
3524 var firstByIndex = elements.findAll(function(element) {
3526 }).sortBy(function(element) { return element.tabIndex }).first();
3528 return firstByIndex ? firstByIndex : elements.find(function(element) {
3533 focusFirstElement: function(form) {
3539 request: function(form, options) {
3561 focus: function(element) {
3566 select: function(element) {
3573 serialize: function(element) {
3586 getValue: function(element) {
3592 setValue: function(element, value) {
3599 clear: function(element) {
3604 present: function(element) {
3608 activate: function(element) {
3619 disable: function(element) {
3625 enable: function(element) {
3640 input: function(element, value) {
3650 inputSelector: function(element, value) {
3655 textarea: function(element, value) {
3660 select: function(element, value) {
3680 selectOne: function(element) {
3685 selectMany: function(element) {
3696 optionValue: function(opt) {
3705 initialize: function($super, element, frequency, callback) {
3711 execute: function() {
3722 getValue: function() {
3728 getValue: function() {
3736 initialize: function(element, callback) {
3747 onElementEvent: function() {
3755 registerFormCallbacks: function() {
3759 registerCallback: function(element) {
3775 getValue: function() {
3781 getValue: function() {
3805 relatedTarget: function(event) {
3816 Event.Methods = (function() {
3821 isButton = function(event, code) {
3826 function(event, code) {
3835 isButton = function(event, code) {
3841 isLeftClick: function(event) { return isButton(event, 0) },
3842 isMiddleClick: function(event) { return isButton(event, 1) },
3843 isRightClick: function(event) { return isButton(event, 2) },
3845 element: function(event) {
3865 findElement: function(event, expression) {
3872 pointer: function(event) {
3885 pointerX: function(event) { return Event.pointer(event).x },
3886 pointerY: function(event) { return Event.pointer(event).y },
3888 stop: function(event) {
3897 Event.extend = (function() {
3898 var methods = Object.keys(Event.Methods).inject({ }, function(m, name) {
3905 stopPropagation: function() { this.cancelBubble = true },
3906 preventDefault: function() { this.returnValue = false },
3907 inspect: function() { return "[object Event]" }
3910 return function(event) {
3932 Object.extend(Event, (function() {
3935 function getEventID(element) {
3941 function getDOMEventName(eventName) {
3946 function getCacheForID(id) {
3950 function getWrappersForEventName(id, eventName) {
3955 function createWrapper(element, eventName, handler) {
3960 var wrapper = function(event) {
3974 function findWrapper(id, eventName, handler) {
3976 return c.find(function(wrapper) { return wrapper.handler == handler });
3979 function destroyWrapper(id, eventName, handler) {
3985 function destroyCache() {
4006 observe: function(element, eventName, handler) {
4022 stopObserving: function(element, eventName, handler) {
4027 getWrappersForEventName(id, eventName).each(function(wrapper) {
4033 Object.keys(getCacheForID(id)).each(function(eventName) {
4053 fire: function(element, eventName, memo) {
4096 (function() {
4102 function fireContentLoadedEvent() {
4111 timer = window.setInterval(function() {
4125 $("__onDOMContentLoaded").onreadystatechange = function() {
4142 Before: function(element, content) {
4146 Top: function(element, content) {
4150 Bottom: function(element, content) {
4154 After: function(element, content) {
4171 prepare: function() {
4183 within: function(element, x, y) {
4196 withinIncludingScrolloffsets: function(element, x, y) {
4210 overlap: function(mode, element) {
4226 absolutize: function(element) {
4231 relativize: function(element) {
4242 clone: function(source, target, options) {
4250 if (!document.getElementsByClassName) document.getElementsByClassName = function(instanceMethods){
4251 function iter(name) {
4256 function(element, className) {
4260 } : function(element, className) {
4270 (classNames && classNames.all(function(name) {
4278 return function(className, parentElement) {
4287 initialize: function(element) {
4291 _each: function(iterator) {
4292 this.element.className.split(/\s+/).select(function(name) {
4297 set: function(className) {
4301 add: function(classNameToAdd) {
4306 remove: function(classNameToRemove) {
4311 toString: function() {