<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>add_script_add_stylesheet.js</filename>
    </added>
    <added>
      <filename>array.extensions.js</filename>
    </added>
    <added>
      <filename>element.methods.js</filename>
    </added>
    <added>
      <filename>form.element.methods.js</filename>
    </added>
    <added>
      <filename>form.methods.js</filename>
    </added>
    <added>
      <filename>ie_ajax_cache_fix.js</filename>
    </added>
    <added>
      <filename>object.extensions.js</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -17,12 +17,33 @@ Function.prototype.negate = function() {
 /**
  * Calls and returns function
  *
+ * // old way
  * myElement.toggle();
- * input.observe('change', myElement.toggle); // runs handler only when event occurs
+ * input.observe('change', myElement.toggle);
  * 
- * input.observe('change', myElement.toggle.runOnce()); // using invoke
+ * // new way
+ * input.observe('change', myElement.toggle.runOnce());
  */
 Function.prototype.runOnce = function() {
   this.apply(this, arguments);
   return this;
-}
\ No newline at end of file
+}
+
+/**
+ * Invokes function as a constructor
+ *
+ * var Person = Class.create({
+ *   initialize: function(name){
+ *     this.name = name;
+ *   }
+ * })
+ * 
+ * Person._new('Foo Bar');
+ *
+ */
+Function.prototype._new = function() {
+  var __method = this, args = arguments;
+  function C() { return __method.apply(this, args); };
+  C.prototype = __method.prototype;
+  return new C;
+};
\ No newline at end of file</diff>
      <filename>function.extensions.js</filename>
    </modified>
    <modified>
      <diff>@@ -1,257 +0,0 @@
-/**
- *  Element#contains(@element, pattern) -&gt; Boolean
- *  - @element(Element): element which content will be tested
- *  - pattern(String|RegExp): pattern to test element's content against
- *  
- *  Tests whether element's content contains specified string (or matches agains regular expression)
- *  
- *      $(&quot;myElement&quot;).contains(&quot;some text...&quot;);
- *      $(&quot;otherElement&quot;).contains(/(foo|bar)/i)
- **/ 
-Element.Methods.contains = function(element, pattern) { 
-  element = $(element);
-  if (!pattern) return false;
-  pattern = pattern.constructor == RegExp ? pattern : RegExp.escape(pattern);
-  return !!element.innerHTML.stripTags().match(pattern);
-}
-
-/**
- *  Array#namespace(parrent=window) -&gt; Array
- *  - parent(Object): top level object to start injection from
- *  
- *  Creates a nested chain of objects, based on the value of array items
- *  
- *      ['foo', 'bar', 'baz'].namespace();
- *      typeof foo.bar.baz; // =&gt; 'object'
- *      ['util', 'DOM', 'dimensions'].namespace(Prototype);
- *      typeof Prototype.util.DOM.dimensions; // =&gt; 'object'
- **/
-Array.prototype.namespace = function(parent) {
-  this.inject(parent || window, function(object, property) {
-    return object[property] = object[property] || { };
-  })
-};
-
-/**
- * Preventing IE from caching Ajax requests
- *
- */
-Ajax.Responders.register({
-  onCreate: function(req) {
-    req.url += (/\?/.test(req.url) ? '&amp;' : '?') + '_token=' + Date.now();
-  }
-});
-
-/**
- * Removes element from the document, returning it's HTML representation
- *
- */
-Element.Methods.toTemplate = function(element) {
-  if (!(element = $(element))) return null;
-  return element.wrap().show().up().remove().innerHTML;
-};
-
-
-/**
- * Are any of the form fields empty?
- *
- */
-Field.Methods.isEmpty = function(element) {
-  return $(element).getElements().any(Element.present);
-};
-
-
-/**
- * Little helper to change element's attribute given pattern and replacement (RegExp object)
- * Encapsulates verbose el.writeAttribute(attr, el.readAttribute(attr))
- *
- */ 
-Element.Methods.replaceAttribute = function(element, attr, pattern, replacement) {
-  element = $(element);
-  return el.writeAttribute(attr, element.readAttribute(attr)
-    .replace(new RegExp(pattern), replacement)
-  )
-};
-
-
-/**
- * Replaces innerHTML of an element given pattern and replacement
- *
- */
-Element.Methods.replaceHTML = function(element, pattern, replacement) {
-  element = $(element);
-  return element.update(
-    element.innerHTML.replace(new RegExp(pattern), replacement)
-  );
-};
-
-
-Element.Methods.toHTML = function(element) {
-  element = $(element);
-  try {
-    var xmlSerializer = new XMLSerializer();
-    return element.nodeType == 4
-      ? element.nodeValue
-      : xmlSerializer.serializeToString(element);
-  } catch(e) {
-    return (element.xml 
-      || element.outerHTML
-      || element.cloneNode(true).wrap().innerHTML);
-  }
-};
-
-/**
- * Boosts Field#present to work somewhat more reasonably 
- * with any form control (element with type attribute)
- * 
- * - &quot;reset, submit, button and hidden&quot; always return true
- * - &quot;text, password and file&quot; return true if value attribute is anything but whitespace
- * - &quot;checkbox&quot; return true if checked attribute is not false
- * - &quot;radio&quot; return true if either checked attribute is not false 
- *   or any of the input elements with the same name have checked attribute and it's not false
- * - &quot;select&quot; return true if selectedIndex attribute is not -1
- *
- */
-Field.Methods.present = function(element) {
-  if (!(element = $(element)) &amp;&amp; !element.type) return;
-  var t = element.type;
-  return ((/text|password|file/.test(t) &amp;&amp; !element.value.blank()) ||
-    /reset|submit|button|hidden/.test(t) ||
-    (t == 'checkbox' &amp;&amp; element.checked) ||
-    (t == 'radio' &amp;&amp; (element.checked || $$('input[name=' + element.name + ']:checked').length))
-    (/select-one|select-multiple/.test(t) &amp;&amp; element.selectedIndex != -1));
-};
-
-/**
- * Change Element#observe to imlicitly stop event when executing event handler
- *
- * $(someLink)._observe('click', function(e) { ... }) // &lt;= event is stopped automatically
- */
-Element.addMethods({
-  _observe: Element.observe.wrap(function(proceed, element, eventName, handler) {
-    return proceed.call(proceed, element, eventName, function(e) {
-      Event.stop(e); handler.call(e.target, e);
-    })
-  })
-});
-
-/**
- * Simple helpers for injecting script/link elements into the document
- *
- */ 
-Prototype.addScript = function(url) {
-  // caching head element as a function property
-  (arguments.callee._head = arguments.callee._head || $$('head')[0])
-    .insert(new Element('script', { type: 'text/javascript', src: url }))
-};
-
-Prototype.addStylesheet = function() {
-  // caching head element as a function property
-  (arguments.callee._head = arguments.callee._head || $$('head')[0])
-    .insert(new Element('style', { type: 'text/css', rel: 'stylesheet', href: url }))
-};
-
-Function.prototype._new = function() {
-  var __method = this, args = arguments;
-  function C() { return __method.apply(this, args); };
-  C.prototype = __method.prototype;
-  return new C;
-};
-
-/** 
- *  Object._isFunction(object) -&gt; Boolean
- *  - object(Any): an object to test against
- *  Tests whether an object is a Function object.
- *  
- *  As per ECMA-262, ed3; 15.3.4.2: &quot;The toString function is not generic; 
- *  it throws a TypeError exception if its this value is not a Function object...&quot;
- *  
- *  
- **/
-Object._isFunction = function(o) {
-  try {
-    Function.prototype.toString.call(o);
-  } catch(e) {
-    return false;
-  };
-  return true;
-};
-
-// Experimental
-Object._isFunction2 = function(o) {
-  return Object.prototype.toString
-    .call(o).indexOf('Function') != -1;
-}
-
-/**
- * Form#unserialize(@element, source) -&gt; Element
- * - @element(FormElement): Form element to fill with values
- * - source(Object | String): Source object where field values are taken from
- *
- * Fills form with values of a given object `source`. 
- * Each propertie name of `source` is compared to name attribute of a form element.
- *
- *    $('myForm').unserialize()
- *
- **/
-Form.Methods.unserialize = function(element, source) {
-  if (!(element = $(element)))
-    throw new Error('DOMElement is required');
-  
-  source = Object.isString(source) 
-    ? source.toQueryParams() 
-    : source;
-  
-  element.getElements().each(function(element) {
-    for (var name in source) {
-      if (name == element.name)
-        element.setValue(source[name]);
-    }
-  })
-  return element;
-}
-
-/**
- * Element.addHoverClassName(@element, className) -&gt; @element
- * 
- * Observes element's mouseover/mouseout to add/remove specified className respectively
- *
- *    $('foo').addHoverClassName('over);
- *
- **/
-Form.Methods.addHoverClassName = function(element, className) {
-  return $(element).observe('mouseover', Element.addClassName.curry(element, className))
-    .observe('mouseout', Element.removeClassName.curry(element, className));
-}
-
-/**
- * Element.setProperty(@element, name, value) =&gt; @element
- *
- * - @element(Element): Element which property is to be set to a value
- * - name(String): Name of a property
- * - value(Any): Value of a property
- *
- * Dead simple helper for setting specified property of an element to a specified value.
- * This might seem like an overkill, but it's quite useful in conjunction with #invoke,
- * when modifying native properties of an element or creating new ones (a.k.a. expandos) in a batch.
- * This method is somewhat similar to writeAttribute, but is intended to operate on properties, rather than attributes.
- *
- *
- *    // An example of dropdown elements &quot;bound&quot; to each other
- *    // (i.e. changing value of one element results in other ones &quot;changed&quot; to the same value)
- *
- *    var dropdowns = $$('select');
- *    dropdowns.invoke('observe', 'change', function(e) {
- *      var index = e.element().selectedIndex;
- *      dropdowns.invoke('setProperty', 'selectedIndex', index);
- *    })
- *
- *
- **/
-Element.Methods.setProperty = function(element, name, value) {
-  if (!(element = $(element))) return;
-  element[name] = value;
-  return element;
-}
-
-Element.addMethods();
\ No newline at end of file</diff>
      <filename>helpers.js</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>prototype_faq.txt</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>f7c0d4b43d75f1dc9e2578301a700e803b6e8636</id>
    </parent>
  </parents>
  <author>
    <name>kangax</name>
    <email>juriyzaytsev@ny3-dhcp-94.ithaka.org</email>
  </author>
  <url>http://github.com/kangax/protolicious/commit/d4caf25c31300dcc55c63636ce5b055728bbb2cd</url>
  <id>d4caf25c31300dcc55c63636ce5b055728bbb2cd</id>
  <committed-date>2008-05-14T09:33:09-07:00</committed-date>
  <authored-date>2008-05-14T09:33:09-07:00</authored-date>
  <message>Revamp</message>
  <tree>8c8df64466d2f5ba32f2d7ed1829b815900ae818</tree>
  <committer>
    <name>kangax</name>
    <email>juriyzaytsev@ny3-dhcp-94.ithaka.org</email>
  </committer>
</commit>
