diff --git a/src/ajax.js b/src/ajax.js index 439c680..84974c4 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -8,7 +8,7 @@ var Ajax = { }, activeRequestCount: 0 -} +}; Ajax.Responders = { responders: [], @@ -59,7 +59,7 @@ Ajax.Base.prototype = { parameters: '', evalJSON: true, evalJS: true - } + }; Object.extend(this.options, options || {}); this.options.method = this.options.method.toLowerCase(); @@ -310,7 +310,7 @@ Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), { this.container = { success: (container.success || container), failure: (container.failure || (container.success ? null : container)) - } + }; this.transport = Ajax.getTransport(); this.setOptions(options); diff --git a/src/array.js b/src/array.js index c868136..b38abee 100644 --- a/src/array.js +++ b/src/array.js @@ -124,13 +124,13 @@ if (!Array.prototype.indexOf) Array.prototype.indexOf = function(item, i) { for (; i < length; i++) if (this[i] === item) return i; return -1; -} +}; if (!Array.prototype.lastIndexOf) Array.prototype.lastIndexOf = function(item, i) { i = isNaN(i) ? this.length : (i < 0 ? this.length + i : i) + 1; var n = this.slice(0, i).reverse().indexOf(item); return (n < 0) ? n : i - n - 1; -} +}; Array.prototype.toArray = Array.prototype.clone; @@ -152,5 +152,5 @@ if (Prototype.Browser.Opera){ } } return array; - } + }; } diff --git a/src/dom.js b/src/dom.js index 5069973..563b7da 100644 --- a/src/dom.js +++ b/src/dom.js @@ -389,7 +389,7 @@ Element.Methods = { element.setOpacity(styles.match(/opacity:\s*(\d?\.?\d*)/)[1]) : element; } for (var property in styles) - if (property == 'opacity') element.setOpacity(styles[property]) + if (property == 'opacity') element.setOpacity(styles[property]); else elementStyle[(property == 'float' || property == 'cssFloat') ? (elementStyle.styleFloat === undefined ? 'cssFloat' : 'styleFloat') : @@ -712,7 +712,7 @@ if (!document.createRange || Prototype.Browser.Opera) { } return element; - } + }; } if (Prototype.Browser.Opera) { @@ -879,7 +879,7 @@ else if (Prototype.Browser.WebKit) { } catch (e) { } return element; - } + }; // Safari returns margins on body which is incorrect if the child is absolutely // positioned. For performance reasons, redefine Position.cumulativeOffset for @@ -896,7 +896,7 @@ else if (Prototype.Browser.WebKit) { } while (element); return [valueL, valueT]; - } + }; } if (Prototype.Browser.IE || Prototype.Browser.Opera) { @@ -959,7 +959,7 @@ Element._returnOffset = function(l, t) { }; Element._getContentFromAnonymousElement = function(tagName, html) { - var div = new Element('div'); t = Element._insertionTranslations.tags[tagName] + var div = new Element('div'), t = Element._insertionTranslations.tags[tagName]; div.innerHTML = t[0] + html + t[1]; t[2].times(function() { div = div.firstChild }); return $A(div.childNodes); diff --git a/src/enumerable.js b/src/enumerable.js index 1dba505..e4e9936 100644 --- a/src/enumerable.js +++ b/src/enumerable.js @@ -206,7 +206,7 @@ var Enumerable = { inspect: function() { return '#'; } -} +}; Object.extend(Enumerable, { map: Enumerable.collect, diff --git a/src/form.js b/src/form.js index b0bf231..6040e34 100644 --- a/src/form.js +++ b/src/form.js @@ -108,7 +108,7 @@ Form.Methods = { return new Ajax.Request(action, options); } -} +}; /*--------------------------------------------------------------------------*/ @@ -122,7 +122,7 @@ Form.Element = { $(element).select(); return element; } -} +}; Form.Element.Methods = { serialize: function(element) { @@ -183,7 +183,7 @@ Form.Element.Methods = { element.disabled = false; return element; } -} +}; /*--------------------------------------------------------------------------*/ @@ -253,11 +253,11 @@ Form.Element.Serializers = { // extend element because hasAttribute may not be native return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text; } -} +}; /*--------------------------------------------------------------------------*/ -Abstract.TimedObserver = function() {} +Abstract.TimedObserver = function() {}; Abstract.TimedObserver.prototype = { initialize: function(element, frequency, callback) { this.frequency = frequency; @@ -281,7 +281,7 @@ Abstract.TimedObserver.prototype = { this.lastValue = value; } } -} +}; Form.Element.Observer = Class.create(); Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { @@ -299,7 +299,7 @@ Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { /*--------------------------------------------------------------------------*/ -Abstract.EventObserver = function() {} +Abstract.EventObserver = function() {}; Abstract.EventObserver.prototype = { initialize: function(element, callback) { this.element = $(element); @@ -337,7 +337,7 @@ Abstract.EventObserver.prototype = { } } } -} +}; Form.Element.EventObserver = Class.create(); Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { diff --git a/src/hash.js b/src/hash.js index 0867f24..963c3f6 100644 --- a/src/hash.js +++ b/src/hash.js @@ -38,7 +38,7 @@ Hash.toQueryString.addPair = function(key, value, prefix) { key = encodeURIComponent(key); if (value === undefined) this.push(key); else this.push(key + '=' + (value == null ? '' : encodeURIComponent(value))); -} +}; Object.extend(Hash.prototype, Enumerable); Object.extend(Hash.prototype, { @@ -84,7 +84,7 @@ Object.extend(Hash.prototype, { if (result === undefined) result = value; else { if (!Object.isArray(result)) result = [result]; - result.push(value) + result.push(value); } } delete this[arguments[i]]; diff --git a/src/number.js b/src/number.js index 240461a..5a2b939 100644 --- a/src/number.js +++ b/src/number.js @@ -23,5 +23,5 @@ Object.extend(Number.prototype, { }); $w('abs round ceil floor').each(function(method){ - Number.prototype[method] = Math[method].methodize() + Number.prototype[method] = Math[method].methodize(); }); \ No newline at end of file diff --git a/src/range.js b/src/range.js index 3f412c4..373d5b1 100644 --- a/src/range.js +++ b/src/range.js @@ -26,4 +26,4 @@ Object.extend(ObjectRange.prototype, { var $R = function(start, end, exclusive) { return new ObjectRange(start, end, exclusive); -} \ No newline at end of file +}; \ No newline at end of file diff --git a/src/selector.js b/src/selector.js index 3880b1d..3eeeed0 100644 --- a/src/selector.js +++ b/src/selector.js @@ -44,7 +44,7 @@ Selector.prototype = { compileXPathMatcher: function() { var e = this.expression, ps = Selector.patterns, - x = Selector.xpath, le, m; + x = Selector.xpath, le, m; if (Selector._cache[e]) { this.xpath = Selector._cache[e]; return; @@ -228,7 +228,7 @@ Object.extend(Selector, { m[3] = (m[5] || m[6]); return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}"); c = false;').evaluate(m); }, - pseudo: function(m) { + pseudo: function(m) { if (m[6]) m[6] = m[6].replace(/"/g, '\\"'); return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(m); }, diff --git a/src/string.js b/src/string.js index 26811d7..a1f6607 100644 --- a/src/string.js +++ b/src/string.js @@ -219,7 +219,7 @@ String.prototype.gsub.prepareReplacement = function(replacement) { if (typeof replacement == 'function') return replacement; var template = new Template(replacement); return function(match) { return template.evaluate(match) }; -} +}; String.prototype.parseQuery = String.prototype.toQueryParams;