diff --git a/README.md b/README.md index e81cb8e..499c6d0 100755 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ src directory, and running the "combine.php" script. This will output a "kis-custom.js" file. (Be careful, as the script will overwrite any "kis-custom.js" file that already exists). -Browser support: IE9+, Latest versions of Firefox, Chrome, Safari, Opera +Browser support: IE10+, Latest versions of Firefox, Chrome, Safari, Opera ## Basic Use: ## diff --git a/docs/$_.dom.html b/docs/$_.dom.html new file mode 100644 index 0000000..7f7dbf8 --- /dev/null +++ b/docs/$_.dom.html @@ -0,0 +1,1500 @@ + + + + + JSDoc: Namespace: dom + + + + + + + + + + +
+ +

Namespace: dom

+ + + + + +
+ +
+

+ $_. + + dom +

+ +
+ +
+
+ + + + +
DOM + +Dom manipulation module
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

<static> addClass(class)

+ + +
+
+ + +
+ Adds a class to the element(s) specified by the current +selector +
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
class + + +string + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+

<static> append(htm)

+ + +
+
+ + +
+ Adds to the innerHTML of the current element, after the last child. +
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
htm + + +string + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Example
+ +
$_("ul").dom.append("&lt;li&gt;&lt;/li&gt;") adds an li element to the end of the selected ul element
+ + +
+ + + +
+

<static> attr(name, value) → {string}

+ + +
+
+ + +
+ Sets attributes on element(s) specified by the current +selector, or, if name is not specified, returns the +value of the attribute of the element specified by the +current selector. +
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
name + + +string + + + + + + + + + +
value + + +string + + + + + + <optional>
+ + + + <nullable>
+ + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + +
+
+ + + + +
+ + + +
+

<static> css(property, value) → {string}

+ + +
+
+ + +
+ Sets or retrieves a css property of the element +specified by the current selector. If a value is +passed, it will set that value on the current element, +otherwise it will return the value of the css property +on the current element. + +Accepts either key/value arguments, or an object with +multiple key/value pairs. +
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
property + + +string +| + +Object + + + + + + + + + +
value + + +string + + + + + + <optional>
+ + + + <nullable>
+ + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + +
+
+ + + + +
+ + + +
+

<static> hide()

+ + +
+
+ + +
+ Hides the element(s) specified by the current selector +
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+

<static> html(htm) → {string}

+ + +
+
+ + +
+ Sets or gets the innerHTML propery of the element(s) passed +
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
htm + + +string + + + + + + <optional>
+ + + + <nullable>
+ + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + +
+
+ + + + +
+ + + +
+

<static> prepend(htm)

+ + +
+
+ + +
+ Adds to the innerHTML of the selected element, before the current children +
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
htm + + +string + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+

<static> removeClass(class)

+ + +
+
+ + +
+ Removes a class from the element(s) specified by the current +selector +
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
class + + +string + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+

<static> show(type)

+ + +
+
+ + +
+ Shows the element(s) specified by the current selector. +if type is specified, the element will have it's style +property set to "display:[your type]". If type is not +specified, the element is set to "display:block". +
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
type + + +string + + + + + + <optional>
+ + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+

<static> text(value) → {string}

+ + +
+
+ + +
+ Sets or retrieves the text content of the element +specified by the current selector. If a value is +passed, it will set that value on the current element, +otherwise it will return the value of the current element +
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
value + + +string + + + + + + <optional>
+ + + + <nullable>
+ + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + +
+
+ + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ + + +
+ + + + + + + \ No newline at end of file diff --git a/docs/$_.event.html b/docs/$_.event.html new file mode 100644 index 0000000..8726161 --- /dev/null +++ b/docs/$_.event.html @@ -0,0 +1,1090 @@ + + + + + JSDoc: Namespace: event + + + + + + + + + + +
+ +

Namespace: event

+ + + + + +
+ +
+

+ $_. + + event +

+ +
+ +
+
+ + + + +
Event Listener module
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

<static> add(event, callback)

+ + +
+
+ + +
+ Adds an event that returns a callback when triggered on the selected +event and selector +
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
event + + +string + + + +
callback + + +function + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Example
+ +
Eg. $_("#selector").event.add("click", do_something());
+ + +
+ + + +
+

<static> create(name, data) → {Object}

+ + +
+
+ + +
+ Create a custom event +
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
name + + +string + + + + + + + + + +
data + + +object + + + + + + <optional>
+ + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +Object + + +
+
+ + + + +
Example
+ +
Eg. var event = $_("#selector").event.create('foo', {});
+ + +
+ + + +
+

<static> delegate(target, event, callback)

+ + +
+
+ + +
+ Binds an event to a parent object +
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
target + + +string + + + +
event + + +string + + + +
callback + + +function + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Example
+ +
Eg. $_("#parent").delegate(".button", "click", do_something());
+ + +
+ + + +
+

<static> live(target, event, callback)

+ + +
+
+ + +
+ Binds a persistent event to the document +
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
target + + +string + + + +
event + + +string + + + +
callback + + +function + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Example
+ +
Eg. $_.event.live(".button", "click", do_something());
+ + +
+ + + +
+

<static> remove(event, callback)

+ + +
+
+ + +
+ Removes an event bound the the specified selector, event type, and callback +
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
event + + +string + + + +
callback + + +string + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Example
+ +
Eg. $_("#selector").event.remove("click", do_something());
+ + +
+ + + +
+

<static> trigger(event) → {boolean}

+ + +
+
+ + +
+ Trigger an event to fire +
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
event + + +object + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +boolean + + +
+
+ + + + +
Example
+ +
Eg. $_("#my_id").trigger('click');
+ + +
+ +
+ + + + + +
+ +
+ + + + +
+ + + +
+ + + + + + + \ No newline at end of file diff --git a/docs/$_.html b/docs/$_.html new file mode 100644 index 0000000..25c36ae --- /dev/null +++ b/docs/$_.html @@ -0,0 +1,888 @@ + + + + + JSDoc: Namespace: $_ + + + + + + + + + + +
+ +

Namespace: $_

+ + + + + +
+ +
+

+ $_ +

+ +
+ +
+
+ + + + +
$_ + +Constructor function
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + +
+ + + + + + + + + + +

Namespaces

+ +
+
dom
+
+ +
event
+
+ +
store
+
+
+ + + + + +

Methods

+ +
+ +
+

<static> $(selector, context) → {Object}

+ + +
+
+ + +
+ Simple DOM selector function +
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
selector + + +string + + + + + + + + + +
context + + +Object + + + + + + <optional>
+ + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +Object + + +
+
+ + + + +
+ + + +
+

<static> each(callback)

+ + +
+
+ + +
+ Iterates over a $_ object, applying a callback to each item +
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
callback + + +function + + + + iteration callback
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+

<static> get(url, data, success_callback, error_callback)

+ + +
+
+ + +
+ Sends a GET type ajax request +
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
url + + +string + + + + + + + + + + The url to retrieve
data + + +Object + + + + + + + + + + get parameters to send
success_callback + + +function + + + + + + + + + + callback called on success
error_callback + + +function + + + + + + <optional>
+ + + + + +
callback called if there is an error
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+

<static> post(url, data, success_callback, error_callback)

+ + +
+
+ + +
+ Sends a POST type ajax request +
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
url + + +string + + + + + + + + + + The url to post to
data + + +Object + + + + + + + + + + post parameters to send
success_callback + + +function + + + + + + + + + + callback called on success
error_callback + + +function + + + + + + <optional>
+ + + + + +
callback called if there is an error
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ + + +
+ + + + + + + \ No newline at end of file diff --git a/docs/$_.store.html b/docs/$_.store.html new file mode 100644 index 0000000..0efe944 --- /dev/null +++ b/docs/$_.store.html @@ -0,0 +1,855 @@ + + + + + JSDoc: Namespace: store + + + + + + + + + + +
+ +

Namespace: store

+ + + + + +
+ +
+

+ $_. + + store +

+ +
+ +
+
+ + + + +
Wrapper for localstorage / sessionstorage data serialization. +Each method has a boolean parameter, that when set as true switches the method +to use sessionStorage rather than the default localStorage.
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

<static> clear(session)

+ + +
+
+ + +
+ Removes all values from the same domain storage +
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
session + + +bool + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+

<static> get(key, session) → {Object}

+ + +
+
+ + +
+ Retrieves and deserializes a value from localstorage, +based on the specified key +
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string + + + +
session + + +bool + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +Object + + +
+
+ + + + +
+ + + +
+

<static> getAll(session) → {Object}

+ + +
+
+ + +
+ Returns an object of all the raw values in storage +
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
session + + +bool + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +Object + + +
+
+ + + + +
+ + + +
+

<static> remove(key, session)

+ + +
+
+ + +
+ Removes the specified item from storage +
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string + + + +
session + + +bool + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+

<static> set(key, value, session)

+ + +
+
+ + +
+ Puts a value into localstorage at the specified key, +and JSON-encodes the value if not a string +
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string + + + +
value + + +mixed + + + +
session + + +bool + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ + + +
+ + + + + + + \ No newline at end of file diff --git a/docs/DOM.js.html b/docs/DOM.js.html new file mode 100644 index 0000000..c3e5996 --- /dev/null +++ b/docs/DOM.js.html @@ -0,0 +1,377 @@ + + + + + JSDoc: Source: modules/DOM.js + + + + + + + + + + +
+ +

Source: modules/DOM.js

+ + + + + +
+
+
/**
+ * DOM
+ *
+ * Dom manipulation module
+ */
+(function (undefined){
+
+	"use strict";
+
+	var d;
+
+	//Private function for getting/setting attributes/properties
+	function _attr(sel, name, value)
+	{
+		var oldVal;
+
+		//Get the value of the attribute, if it exists
+		if (sel.hasAttribute(name))
+		{
+			oldVal = sel.getAttribute(name);
+		}
+
+		//Well, I guess that attribute doesn't exist
+		if (oldVal === undefined && (value === undefined || value === null))
+		{
+			return null;
+		}
+
+		//No value to set? Return the current value
+		if (value === undefined)
+		{
+			return oldVal;
+		}
+
+		//Determine what to do with the attribute
+		if (value !== undefined && value !== null)
+		{
+			sel.setAttribute(name, value);
+		}
+		else if (value === null)
+		{
+			sel.removeAttribute(name);
+		}
+
+		return (value !== undefined) ? value : oldVal;
+	}
+
+	/**
+	 * Change css property name to it's
+	 * javascript camel case equivalent
+	 */
+	function _toCamel(s)
+	{
+		return String(s).replace(/(\-[a-z])/g, function($1){
+			return $1.toUpperCase().replace('-','');
+		});
+	}
+
+	function _css(sel, prop, val)
+	{
+		var equi;
+
+		//Camel-case
+		prop = _toCamel(prop);
+
+		//Equivalent properties for 'special' browsers
+		equi = {
+			outerHeight: "offsetHeight",
+			outerWidth: "offsetWidth",
+			top: "posTop"
+		};
+
+
+		//If you don't define a value, try returning the existing value
+		if(val === undefined && sel.style[prop] !== undefined)
+		{
+			return sel.style[prop];
+		}
+		else if(val === undefined && sel.style[equi[prop]] !== undefined)
+		{
+			return sel.style[equi[prop]];
+		}
+
+		//Let's try the easy way first
+		if(sel.style[prop] !== undefined)
+		{
+			sel.style[prop] = val;
+
+			//Short circuit
+			return null;
+		}
+		else if(sel.style[equi[prop]])
+		{
+			sel.style[equi[prop]] = val;
+			return null;
+		}
+	}
+
+	// --------------------------------------------------------------------------
+
+	/**
+	 * DOM
+	 *
+	 * Dom manipulation module
+	 * @namespace
+	 * @memberOf $_
+	 * @name dom
+	 */
+	d = {
+		/**
+		 * Adds a class to the element(s) specified by the current
+		 * selector
+		 *
+		 * @name addClass
+		 * @memberOf $_.dom
+		 * @function
+		 * @param {string} class
+		 */
+		addClass: function (c)
+		{
+			$_.each(function (e){
+				e.classList.add(c);
+			});
+		},
+		/**
+		 * Removes a class from the element(s) specified by the current
+		 * selector
+		 *
+		 * @name removeClass
+		 * @memberOf $_.dom
+		 * @function
+		 * @param {string} class
+		 */
+		removeClass: function (c)
+		{
+			$_.each(function (e){
+				e.classList.remove(c);
+			});
+		},
+		/**
+		 * Hides the element(s) specified by the current selector
+		 *
+		 * @name hide
+		 * @memberOf $_.dom
+		 * @function
+		 */
+		hide: function ()
+		{
+			this.css('display', 'none');
+		},
+		/**
+		 * Shows the element(s) specified by the current selector.
+		 * if type is specified, the element will have it's style
+		 * property set to "display:[your type]". If type is not
+		 * specified, the element is set to "display:block".
+		 *
+		 * @name  show
+		 * @memberOf $_.dom
+		 * @function
+		 * @param {string} [type]
+		 */
+		show: function (type)
+		{
+			if (type === undefined)
+			{
+				type = "block";
+			}
+
+			this.css("display", type);
+		},
+		/**
+		 * Sets attributes on element(s) specified by the current
+		 * selector, or, if name is not specified, returns the
+		 * value of the attribute of the element specified by the
+		 * current selector.
+		 *
+		 * @name attr
+		 * @memberOf $_.dom
+		 * @function
+		 * @param {string} name
+		 * @param {?string}[value]
+		 * @return {?string}
+		 */
+		attr: function (name, value)
+		{
+			var sel = this.el;
+
+			//Make sure you don't try to get a bunch of elements
+			if (sel.length > 1 && value === undefined)
+			{
+				return null;
+			}
+			else if (sel.length > 1 && value !== undefined) //You can set a bunch, though
+			{
+				$_.each(function (e){
+					return _attr(e, name, value);
+				});
+			}
+			else //Normal behavior
+			{
+				return _attr(sel, name, value);
+			}
+		},
+		/**
+		 * Sets or retrieves the text content of the element
+		 * specified by the current selector. If a value is
+		 * passed, it will set that value on the current element,
+		 * otherwise it will return the value of the current element
+		 *
+		 * @name text
+		 * @memberOf $_.dom
+		 * @function
+		 * @param {?string} [value]
+		 * @return {?string}
+		 */
+		text: function (value)
+		{
+			var oldValue, set, sel;
+
+			sel = this.el;
+
+			set = (value !== undefined) ? true : false;
+
+			oldValue = sel.textContent;
+
+			if(set)
+			{
+				sel.textContent = value;
+				return value;
+			}
+			else
+			{
+				return oldValue;
+			}
+		},
+		/**
+		 * Sets or retrieves a css property of the element
+		 * specified by the current selector. If a value is
+		 * passed, it will set that value on the current element,
+		 * otherwise it will return the value of the css property
+		 * on the current element.
+		 *
+		 * Accepts either key/value arguments, or an object with
+		 * multiple key/value pairs.
+		 *
+		 * @name css
+		 * @memberOf $_.dom
+		 * @function
+		 * @param {(string|Object)} property
+		 * @param {?string} [value]
+		 * @return {?string}
+		 */
+		css: function (prop, val)
+		{
+			var prop_key = null;
+
+			// If passed an object, recurse!
+			if($_.type(prop) === 'object')
+			{
+				for (prop_key in prop)
+				{
+					if ( ! prop.hasOwnProperty(prop_key)) continue;
+
+					$_.each(function (e){
+						_css(e, prop_key, prop[prop_key]);
+					});
+				}
+			}
+			//Return the current value if a value is not set
+			else if(val === undefined && $_.type(prop) !== 'object')
+			{
+				return _css(this.el, prop);
+			}
+
+			$_.each(function (e){
+				_css(e, prop, val);
+			});
+		},
+		/**
+		 * Adds to the innerHTML of the current element, after the last child.
+		 *
+		 * @example $_("ul").dom.append("&lt;li&gt;&lt;/li&gt;") adds an li element to the end of the selected ul element
+		 * @name append
+		 * @memberOf $_.dom
+		 * @function
+		 * @param {string} htm
+		 */
+		append: function(htm)
+		{
+			this.el.insertAdjacentHTML('beforeend', htm);
+		},
+		/**
+		 * Adds to the innerHTML of the selected element, before the current children
+		 *
+		 * @name prepend
+		 * @memberOf $_.dom
+		 * @function
+		 * @param {string} htm
+		 */
+		 prepend: function(htm)
+		 {
+			this.el.insertAdjacentHTML('afterbegin', htm);
+		 },
+		/**
+		 * Sets or gets the innerHTML propery of the element(s) passed
+		 *
+		 * @name html
+		 * @memberOf $_.dom
+		 * @function
+		 * @param {?string} [htm]
+		 * @return {?string}
+		 */
+		html: function(htm)
+		{
+
+			if(htm !== undefined)
+			{
+				this.el.innerHTML = htm;
+			}
+
+			//If the parameter is undefined, just return the current value
+			return this.el.innerHTML;
+		}
+	};
+
+	$_.ext('dom', d);
+
+}());
+
+
+ + + + +
+ + + +
+ + + + + + + diff --git a/docs/ajax.js.html b/docs/ajax.js.html new file mode 100644 index 0000000..ccaefbb --- /dev/null +++ b/docs/ajax.js.html @@ -0,0 +1,175 @@ + + + + + JSDoc: Source: modules/ajax.js + + + + + + + + + + +
+ +

Source: modules/ajax.js

+ + + + + +
+
+
/**
+ * Ajax
+ *
+ * Module for making ajax requests
+ */
+(function (undefined){
+
+	"use strict";
+
+	var ajax = {
+		_do: function (url, data, success_callback, error_callback, isPost)
+		{
+			var type,
+				request = new XMLHttpRequest();
+
+			if (success_callback === undefined)
+			{
+				/**
+				 * @private
+				 */
+				success_callback = function (){};
+			}
+
+			type = (isPost) ? "POST" : "GET";
+
+			if (type === "GET")
+			{
+				url += (url.match(/\?/))
+					? this._serialize(data)
+					: "?" + this._serialize(data);
+			}
+
+			request.open(type, url);
+
+			request.onreadystatechange = function ()
+			{
+				if (request.readyState === 4)
+				{
+					if (request.status === 200)
+					{
+						success_callback.call(request.responseText, request.responseText);
+					}
+					else
+					{
+						if (error_callback !== undefined)
+						{
+							error_callback.call(request.status, request.status);
+						}
+					}
+
+				}
+			};
+
+			if (type === "POST")
+			{
+				request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
+				request.send(this._serialize(data));
+			}
+			else
+			{
+				request.send(null);
+			}
+		},
+		/**
+		 * Url encoding for non-get requests
+		 *
+		 * @param data
+		 * @returns {string}
+		 * @private
+		 */
+		_serialize: function (data)
+		{
+			var name,
+				value,
+				pairs = [];
+
+			for (name in data)
+			{
+				if ( ! data.hasOwnProperty(name) || $_.type(data[name]) === "function")
+				{
+					continue;
+				}
+
+				value = data[name].toString();
+
+				name = encodeURIComponent(name);
+				value = encodeURIComponent(value);
+
+				pairs.push(name + "=" + value);
+			}
+
+			return pairs.join("&");
+		}
+	};
+
+	/**
+	 * Sends a GET type ajax request
+	 *
+	 * @name get
+	 * @function
+	 * @memberOf $_
+	 * @param {string} url - The url to retrieve
+	 * @param {Object} data - get parameters to send
+	 * @param {function} success_callback - callback called on success
+	 * @param {function} [error_callback] - callback called if there is an error
+	 */
+	$_.ext('get', function (url, data, success_callback, error_callback){
+		ajax._do(url, data, success_callback, error_callback, false);
+	});
+
+	/**
+	 * Sends a POST type ajax request
+	 *
+	 * @name post
+	 * @function
+	 * @memberOf $_
+	 * @param {string} url - The url to post to
+	 * @param {Object} data - post parameters to send
+	 * @param {function} success_callback - callback called on success
+	 * @param {function} [error_callback] - callback called if there is an error
+	 */
+	$_.ext('post', function (url, data, success_callback, error_callback){
+		ajax._do(url, data, success_callback, error_callback, true);
+	});
+}());
+
+
+
+ + + + +
+ + + +
+ + + + + + + diff --git a/docs/code.css b/docs/code.css deleted file mode 100755 index 3375058..0000000 --- a/docs/code.css +++ /dev/null @@ -1,16 +0,0 @@ -body { - margin: 0; -} -.KEYW { color: #6277AA; font-weight: bold; } -.COMM { color: #008200; } -.NUMB { color: #393;} -.STRN { color: #00d; } -.REGX { color: #339;} -.linenumber { - border-right: 7px solid #8DA6C6; - color: #fff; - font-style: normal; - font-weight: bold; - padding: 0 7px; - background: #6277AA; -} \ No newline at end of file diff --git a/docs/core.js.html b/docs/core.js.html new file mode 100644 index 0000000..30ec522 --- /dev/null +++ b/docs/core.js.html @@ -0,0 +1,194 @@ + + + + + JSDoc: Source: core.js + + + + + + + + + + +
+ +

Source: core.js

+ + + + + +
+
+
/**
+	Kis JS		Keep It Simple JS Library
+	Copyright	Timothy J. Warren
+	License		Public Domain
+	Version		0.8.0
+ */
+(function (undefined){
+
+	"use strict";
+
+	var $_, $, sel;
+
+
+	/**
+	 * $_
+	 *
+	 * Constructor function
+	 *
+	 * @constructor
+	 * @namespace $_
+	 * @param {string} selector - The dom selector string
+	 * @return {Object}
+	 */
+	$_ = function(s)
+	{
+		// Have documentElement be default selector, just in case
+		if (s === undefined)
+		{
+			// Defines a "global" selector for that instance
+			sel = ($_.el !== undefined)
+				? $_.el
+				: document.documentElement;
+		}
+		else
+		{
+			sel = $(s);
+		}
+
+		// Add the selector to the prototype
+		$_.prototype.el = sel;
+
+		// Use the $_ object as it's own prototype
+		var self = Object.create($_);
+
+		// Give sel to each extension.
+		for(var i in self)
+		{
+			if(typeof self[i] === "object")
+			{
+				self[i].el = sel;
+			}
+		}
+
+		self.el = sel;
+
+		return self;
+	};
+
+	/**
+	 * Simple DOM selector function
+	 *
+	 * @memberOf $_
+	 * @param {string} selector
+	 * @param {Object} [context]
+	 * @return {Object}
+	 */
+	$ = function (a, context)
+	{
+		var x, c;
+
+		if (typeof a != "string" || a === undefined){ return a;}
+
+		//Check for a context of a specific element, otherwise, just run on the document
+		c  = (context != null && context.nodeType === 1)
+			? context
+			: document;
+
+		//Pick the quickest method for each kind of selector
+		if (a.match(/^#([\w\-]+$)/))
+		{
+			return document.getElementById(a.split('#')[1]);
+		}
+		else
+		{
+			x = c.querySelectorAll(a);
+		}
+
+		//Return the single object if applicable
+		return (x.length === 1) ? x[0] : x;
+	};
+
+	/**
+	 * Adds the property `obj` to the $_ object, calling it `name`
+	 *
+	 * @param {string} name - name of the module
+	 * @param {object} obj - the object to add
+	 */
+	$_.ext = function(name, obj)
+	{
+		obj.el = sel;
+		$_[name] = obj;
+	};
+
+	/**
+	 * Iterates over a $_ object, applying a callback to each item
+	 *
+	 * @name $_.each
+	 * @function
+	 * @param {function} callback - iteration callback
+	 */
+	$_.ext('each', function (callback)
+	{
+		if(sel.length !== undefined && sel !== window)
+		{
+			[].forEach.call(sel, callback);
+		}
+		else
+		{
+			callback.call(sel, sel);
+		}
+	});
+
+	/**
+	 * Retrieves the type of the passed variable
+	 *
+	 * @param {*} obj
+	 * @return {string}
+	 */
+	$_.type = function(obj)
+	{
+		if((function() {return obj && (obj !== this)}).call(obj))
+		{
+			//fallback on 'typeof' for truthy primitive values
+			return (typeof obj).toLowerCase();
+		}
+
+		//Strip x from [object x] and return
+		return ({}).toString.call(obj).match(/\s([a-z|A-Z]+)/)[1].toLowerCase();
+	};
+
+	//Set global variables
+	$_ = window.$_ = window.$_ || $_;
+	$_.$ = $;
+}());
+
+
+
+ + + + +
+ + + +
+ + + + + + + diff --git a/docs/css/all.css b/docs/css/all.css deleted file mode 100755 index c253cb0..0000000 --- a/docs/css/all.css +++ /dev/null @@ -1,358 +0,0 @@ -/* TABLE OF CONTENTS: - * - Browser reset - * - HTML elements - * - JsDoc styling - */ - - - - - - -/* - * BEGIN BROWSER RESET - */ - -body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,p,pre,form,fieldset,input,textarea,p,blockquote,th,td { - margin:0; - padding:0 -} -html { - height:100%; - overflow:-moz-scrollbars-vertical; - overflow-x:auto -} -table { - border:0; - border-collapse:collapse; - border-spacing:0 -} -fieldset,img { - border:0 -} -address,caption,cite,code,dfn,em,strong,th,var { - font-style:normal; - font-weight:normal -} -em,cite { - font-style:italic -} -strong { - font-weight:bold -} -ol,ul { - list-style:none -} -caption,th { - text-align:left -} -h1,h2,h3,h4,h5,h6 { - font-size:100%; - font-weight:normal; - margin:0; - padding:0 -} -q:before,q:after { - content:'' -} -abbr,acronym { - border:0 -} -section,article,header,footer,nav,aside,hgroup { - display:block -} - -/* - * END BROWSER RESET - */ - - - - - - -/* - * HTML ELEMENTS - */ - -@font-face { - font-family: 'M1m'; - src: url('fonts/mplus-1m-regular-webfont.eot'); - src: local('☺'), url('fonts/mplus-1m-regular-webfont.woff') format('woff'), url('fonts/mplus-1m-regular-webfont.ttf') format('truetype'), url('fonts/mplus-1m-regular-webfont.svg#webfontVd14f4NN') format('svg'); - font-weight: normal; - font-style: normal; -} - -@font-face { - font-family: 'M1m'; - src: url('fonts/mplus-1m-bold-webfont.eot'); - src: local('☺'), url('fonts/mplus-1m-bold-webfont.woff') format('woff'), url('fonts/mplus-1m-bold-webfont.ttf') format('truetype'), url('fonts/mplus-1m-bold-webfont.svg#webfontIjI5mZqE') format('svg'); - font-weight: bold; - font-style: normal; -} - - - -* { - line-height: 1.4em; -} - -html { - font-size: 100%; -} - -body { - font-size: 0.75em; - padding: 15px 0; - background: #eee; - background-image: -moz-linear-gradient(left, #dddddd, #f9f9f9) fixed; - background-image: -webkit-gradient(linear,left bottom,right bottom,color-stop(0, #dddddd),color-stop(1, #f9f9f9)) fixed; - } - -body, -input, -select, -textarea { - color: #000; - font-family: Arial, Geneva, sans-serif; -} - -a:link, -a:hover, -a:active, -a:visited { - color: #19199e; -} -a:hover, -a:focus { - color: #00f; - text-decoration: none; -} - -p { - margin: 0 0 1.5em 0; -} - -/* - * END HTML ELEMENTS - */ - - - -/* - * BEGIN HACK - */ - -div.containerMain:after, -div.safeBox:after { - content:""; - display:block; - height:0; - clear:both; -} - -/* - * END HACK - */ - - - -/* - * BEGIN JSDOC - */ - -/* Start menu */ -div.index *.heading1 { - margin-bottom: 0.5em; - border-bottom: 1px solid #999999; - font-family: M1m, Arial, sans-serif; - font-size: 1.6em; - letter-spacing: 1px; - line-height: 1.3em; -} - -div.index div.menu { - background-color: #FFFFFF; -} -*+html div.index div.menu { - background-color: #FFFFFF; -} -* html div.index div.menu { - background-color: #FFFFFF; -} - -div.index div.menu div { - text-align: left; -} - -div.index div.menu a { - text-decoration: none; -} -div.index div.menu a:hover { - text-decoration: underline; -} - -div.index ul.classList { - padding-left: 0; -} - -div.index ul.classList a { - display: block; - margin: 1px 0; - padding: 4px 0 2px 10px; - text-indent: -10px; -} - -div.index div.fineprint { - color: #777; - font-size: 0.9em; -} -div.index div.fineprint a { - color: #777; -} -/* End menu */ - - - -/* Start content */ -div.content ul { - padding-left: 0; -} - -div.content *.classTitle { - font-size: 1.2em; - font-weight: bold; - line-height: 1em; -} - -div.content *.classTitle span { - display: block; - font-size: 2em; - letter-spacing: 2px; - line-height: 1em; - padding-top: 5px; - text-shadow: 1px 1px 1px #999999; - word-wrap: break-word; -} - -div.content p.summary { - font-size: 1.25em; -} - -div.content ul *.classname a, -div.content ul *.filename a { - font-family: Consolas, "Courier New", Courier, monospace; - text-decoration: none; - font-weight: bold; -} -div.content ul *.classname a:hover, -div.content ul *.filename a:hover { - text-decoration: underline; -} - -div.content div.props { - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - border-radius: 5px; - background: #fff; - background: -moz-linear-gradient(top, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.2)); /* FF3.6 */ - background: -webkit-gradient(linear,left top,left bottom,color-stop(0, rgba(255, 255, 255, 0.7)),color-stop(1, rgba(255, 255, 255, 0.2))); - -moz-box-shadow: 0px 0px 10px #ccc; - -webkit-box-shadow: 0px 0px 5px #bbb; - box-shadow: 0px 0px 5px #bbb; -} - - - -*.sectionTitle { - font-family: M1m, sans-serif; - font-size: 1.6em; - letter-spacing: 1px; -} - -table.summaryTable td, -table.summaryTable th { - vertical-align: top; -} -table.summaryTable tr:last-child td { - padding-bottom: 0; -} - -table.summaryTable th { - font-weight: bold; -} - -table.summaryTable td.attributes { - font-family: Consolas, "Courier New", Courier, monospace; - color: #666; -} - -table.summaryTable td.nameDescription div.fixedFont { - font-weight: bold; -} - -table.summaryTable div.description { - color: #333; -} - - - -dl.detailList dt { - font-weight: bold; -} - -dl.inheritsList dd + dt { - margin-top: 10px; -} - -dl.inheritsList dd { - display: inline; -} - - - -.fixedFont { - font-family: Consolas, "Courier New", Courier, monospace; -} - -.fixedFont.heading { - font-size: 1.25em; - line-height: 1.1em -} - -.fixedFont.heading + .description { - font-size: 1.2em; -} - -.fixedFont.heading .light, -.fixedFont.heading .lighter { - font-weight: bold; -} - -pre.code { - overflow: auto; - font-family: Consolas, "Courier New", Courier, monospace; - background: #eee; -} -/* Start content */ - - - -/* Start general styles */ -.light { - color: #666; -} - -.lighter { - color: #999; -} - -span.break { - font-size: 1px; - line-height: 1px; -} -/* End general styles */ - -/* - * END JSDOC - */ diff --git a/docs/css/fonts/mplus-1m-bold-webfont.eot b/docs/css/fonts/mplus-1m-bold-webfont.eot deleted file mode 100755 index 6c64f8d..0000000 Binary files a/docs/css/fonts/mplus-1m-bold-webfont.eot and /dev/null differ diff --git a/docs/css/fonts/mplus-1m-bold-webfont.svg b/docs/css/fonts/mplus-1m-bold-webfont.svg deleted file mode 100755 index 5129512..0000000 --- a/docs/css/fonts/mplus-1m-bold-webfont.svg +++ /dev/null @@ -1,134 +0,0 @@ - - - - -This is a custom SVG webfont generated by Font Squirrel. -Foundry URL : http://mplus-fonts.sourceforge.jp - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/css/fonts/mplus-1m-bold-webfont.ttf b/docs/css/fonts/mplus-1m-bold-webfont.ttf deleted file mode 100755 index 0cf54cb..0000000 Binary files a/docs/css/fonts/mplus-1m-bold-webfont.ttf and /dev/null differ diff --git a/docs/css/fonts/mplus-1m-bold-webfont.woff b/docs/css/fonts/mplus-1m-bold-webfont.woff deleted file mode 100755 index f90475d..0000000 Binary files a/docs/css/fonts/mplus-1m-bold-webfont.woff and /dev/null differ diff --git a/docs/css/fonts/mplus-1m-regular-webfont.eot b/docs/css/fonts/mplus-1m-regular-webfont.eot deleted file mode 100755 index a53f8b5..0000000 Binary files a/docs/css/fonts/mplus-1m-regular-webfont.eot and /dev/null differ diff --git a/docs/css/fonts/mplus-1m-regular-webfont.svg b/docs/css/fonts/mplus-1m-regular-webfont.svg deleted file mode 100755 index 3c835a3..0000000 --- a/docs/css/fonts/mplus-1m-regular-webfont.svg +++ /dev/null @@ -1,134 +0,0 @@ - - - - -This is a custom SVG webfont generated by Font Squirrel. -Foundry URL : http://mplus-fonts.sourceforge.jp - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/css/fonts/mplus-1m-regular-webfont.ttf b/docs/css/fonts/mplus-1m-regular-webfont.ttf deleted file mode 100755 index 684abfd..0000000 Binary files a/docs/css/fonts/mplus-1m-regular-webfont.ttf and /dev/null differ diff --git a/docs/css/fonts/mplus-1m-regular-webfont.woff b/docs/css/fonts/mplus-1m-regular-webfont.woff deleted file mode 100755 index 49585d8..0000000 Binary files a/docs/css/fonts/mplus-1m-regular-webfont.woff and /dev/null differ diff --git a/docs/css/handheld.css b/docs/css/handheld.css deleted file mode 100755 index 073c0d1..0000000 --- a/docs/css/handheld.css +++ /dev/null @@ -1,217 +0,0 @@ -/* - * TABLE OF CONTENTS: - * - Browser reset - * - HTML elements - * - JsDoc styling - * - Media query check - */ - - - - - - -/* - * HTML ELEMENTS - */ - -body { - padding: 1% 4% 1% 4%; -} - -/* - * HTML ELEMENTS - */ - - - - - -/* - * BEGIN JSDOC - */ - -/* Start menu */ -div.index div.menu { - position: fixed; - top: 0; - right: 0; - -moz-border-radius-bottomleft: 15px; - -webkit-border-bottom-left-radius: 15px; - -border-bottom-left-radius: 15px; - padding: 4px 5px 8px 10px; - -moz-box-shadow: 0px 0px 10px #c4c4c4; - -webkit-box-shadow: 0px 0px 10px #c4c4c4; - box-shadow: 0px 0px 10px #c4c4c4; - background-color: rgba(255, 255, 255, 0.9); -} - -div.index input.classFilter { - display: none; -} - -div.index div.indexLinks a { - float: right; - clear: both; - font-size: 1.1em; -} - -div.index *.heading1 { - display:none; -} - -div.index ul.classList { - display:none; -} - -div.index div.fineprint { - display:none; -} - -div.indexStatic { - display: none; -} -/* End menu */ - - - -/* Start content */ -div.content *.classTitle { - margin-right: 60px; - margin-bottom: 15px; -} - -div.content div.intro { - margin: 15px 0 35px; -} - -div.content p.description.summary { - margin-bottom: 0.2em; -} - -div.content div.props { - margin: 1.5em -2% 0 -2%; - padding: 2%; -} - -table.summaryTable { - position: relative; - left: -10px; - width: 100%; - border-collapse: collapse; - box-sizing: content-box; - -moz-box-sizing: content-box; - -webkit-box-sizing: content-box; - -ms-box-sizing: content-box; - -o-box-sizing: content-box; - -icab-box-sizing: content-box; - -khtml-box-sizing: content-box; -} - -*.sectionTitle { - padding: 0 10px 10px 0; -} -caption.sectionTitle { - padding-left: 10px; -} - -table.summaryTable td, -table.summaryTable th { - padding: 0px 10px 10px 10px; -} -table.summaryTable tr:last-child td { - padding-bottom: 0; -} - -table.summaryTable td.attributes { - width: 35%; -} - -table.summaryTable td.nameDescription { - width: 65% -} - - - -dl.detailList { - margin-top: 0.5em; -} - -dl.detailList.nomargin + dl.detailList.nomargin { - margin-top: 0; -} - -dl.detailList dt { - display: inline; - margin-right: 5px; -} - -dl.detailList dt:before { - display: block; - content: ""; -} - -dl.detailList dd { - display: inline; -} - -dl.detailList.params dt { - display: block; -} -dl.detailList.params dd { - display: block; - padding-left: 2em; - padding-bottom: 0.4em; -} - - - - -ul.fileList li { - margin-bottom: 1.5em; -} - - - -.fixedFont.heading { - margin-bottom: 0.5em; -} - -pre.code { - margin: 10px 0 10px 0; - padding: 10px; - border: 1px solid #ccc; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; - border-radius: 2px; -} -/* End content */ - -/* - * END JSDOC - */ - - - - - - - -/* - * START MEDIA QUERY CHECK - */ - -.cssLoadCheck { - position: absolute; - top: -99999px; - left: -99999px; - border: 0; - width: 100px; - padding: 0; - overflow: hidden; -} - -/* - * END MEDIA QUERY CHECK - */ - diff --git a/docs/css/screen.css b/docs/css/screen.css deleted file mode 100755 index 8cb4bba..0000000 --- a/docs/css/screen.css +++ /dev/null @@ -1,297 +0,0 @@ -/* - * TABLE OF CONTENTS: - * - JsDoc styling - * - Media query check - */ - - - - - - -/* - * BEGIN JSDOC - */ - -/* Start menu */ -div.index { - position: fixed; - top: 0; - bottom: 0; - float: left; - width: 30%; - min-width: 100px; - max-width: 300px; - padding: 0 0 10px 0; - overflow: auto; -} - -div.index *.heading1 { - padding: 8px 0 0 0; -} - -div.index div.menu { - margin: 0 15px 0 -15px; - -moz-border-radius-bottomright: 15px; - -webkit-border-bottom-right-radius: 15px; - -border-bottom-right-radius: 15px; - padding: 15px 15px 15px 30px; - -moz-box-shadow: 0px 0px 10px #c4c4c4; - -webkit-box-shadow: 0px 0px 10px #c4c4c4; - box-shadow: 0px 0px 10px #c4c4c4; - background-color: rgba(255, 255, 255, 0.5); -} - -div.index div.indexLinks { - margin-top: 13px; - position: absolute; - right: 30px; -} - -div.index div.indexLinks a { - color: #999999; - text-transform: lowercase; -} - -div.index div.indexLinks a:first-child { - margin-right: 3px; - border-right: 1px solid #999999; - padding-right: 5px; -} - -div.index input.classFilter { - margin-bottom: 4px; - width: 100%; - border-width: 1px; - border-style: solid; - border-color: #CCCCCC #999999 #999999 #CCCCCC; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - -border-radius: 3px; -} - -div.index ul.classList a { - line-height: 1.3em; -} - -div.index ul.classList a + a { - margin-left: 0.5em; -} - -div.index div.fineprint { - margin: 1em 0 0 15px; - color: #777; - font-size: 0.9em; -} - -div.index div.fineprint a { - color: #777; -} - -div.indexStatic { - position: static; - min-height: 1em; -} -/* End menu */ - - -/* Start content */ -div.content { - float: left; - width: 70%; - min-width: 300px; - max-width: 600px; -} -div.innerContent { - padding: 0 0 0 2.5em; -} - -div.content ul, -div.content ol { - margin-bottom: 3em; -} - -div.content ul.methodDetail { - margin-bottom: 0; -} - -div.content *.classTitle { - position: relative; - left: -10px; - margin: -30px 0 15px 0; - -moz-border-radius: 15px; - -webkit-border-radius: 15px; - border-radius: 15px; - padding: 25px 15px 15px 15px; - background-color: #FFFFFF; - background-color: rgba(255, 255, 255, 0.5); - -moz-box-shadow: 0px 0px 10px #c4c4c4; - -webkit-box-shadow: 0px 0px 10px #c4c4c4; - box-shadow: 0px 0px 10px #c4c4c4; -} - -div.content div.intro { - margin: 15px 0 45px -} - -div.content p.summary { - margin-bottom: 0.5em; -} - -div.content ul.summary { - margin-bottom: 1.5em; -} - -div.content ul *.classname a, -div.content ul *.filename a { - font-family: Consolas, "Courier New", Courier, monospace; - text-decoration: none; - font-weight: bold; -} -div.content ul *.classname a:hover, -div.content ul *.filename a:hover { - text-decoration: underline; -} - -div.content div.props { - position: relative; - left: -10px; - margin-bottom: 2.5em; - padding: 10px 15px 15px 15px; - overflow: hidden; -} - -div.content div.hr { - margin: 0 10px 0 0; - height: 4em; -} - - - -table.summaryTable { - position: relative; - left: -10px; - width: 100%; - border-collapse: collapse; - box-sizing: content-box; - -moz-box-sizing: content-box; - -webkit-box-sizing: content-box; - -ms-box-sizing: content-box; - -o-box-sizing: content-box; - -icab-box-sizing: content-box; - -khtml-box-sizing: content-box; -} - -*.sectionTitle { - padding: 0 10px 10px 0; -} -caption.sectionTitle { - padding-left: 10px; -} - -table.summaryTable td, -table.summaryTable th { - padding: 0px 10px 10px 10px; -} -table.summaryTable tr:last-child td { - padding-bottom: 0; -} - -table.summaryTable td.attributes { - width: 35%; -} - -table.summaryTable td.nameDescription { - width: 65% -} - - - -dl.detailList { - margin-top: 0.5em; -} - -dl.detailList.nomargin + dl.detailList.nomargin { - margin-top: 0; -} - -dl.detailList dt { - display: inline; - margin-right: 5px; -} - -dl.detailList dt:before { - display: block; - content: ""; -} - -dl.detailList dd { - display: inline; -} - -dl.detailList.params dt { - display: block; -} -dl.detailList.params dd { - display: block; - padding-left: 2em; - padding-bottom: 0.4em; -} - - - - -ul.fileList li { - margin-bottom: 1.5em; -} - - - -.fixedFont.heading { - margin-bottom: 0.5em; -} - -pre.code { - margin: 10px 0 10px 0; - padding: 10px; - border: 1px solid #ccc; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; - border-radius: 2px; -} -/* End content */ - -.clear { - clear: both; - width: 100%; - min-height: 0; -} - -/* - * END JSDOC - */ - - - - - - - -/* - * START MEDIA QUERY CHECK - */ - -.cssLoadCheck { - position: absolute; - top: -99999px; - left: -99999px; - border: 0; - width: 100px; - padding: 0; - overflow: hidden; -} - -/* - * END MEDIA QUERY CHECK - */ - diff --git a/docs/default.css b/docs/default.css deleted file mode 100755 index 184ee4f..0000000 --- a/docs/default.css +++ /dev/null @@ -1,440 +0,0 @@ -/* --- Basic Layout -------------------------------------------------------- */ -/* For IE for Windows \*/ -* html{ - width: 100%; - height: 100%; - overflow: hidden; -} -* html body{ - width: 100%; - height: 100%; - overflow: auto; -} - -* html .fixed{ - position: absolute; -} -.fixed { - position: fixed; - overflow: auto; -} -/* */ -/* --- Basic Layout -------------------------------------------------------- */ -body { - padding: 0; - margin: 0; - background: #fafafa; - font: 100% Verdana, Arial, Helvetica, sans-serif; -} - -#main { - border-left: 0.625em #356aa0 solid; - margin-left: 16.25em; -} - -#index { - top: 0; - left: 0; - width: 16.25em; - height: 100%; - overflow: auto; - overflow-x: hidden; - border-right: 0.625em solid #356aa0; -} -/* --- General layout ------------------------------------------------------ */ -h1 { - margin: 0.625em 0 0.625em; - font-size: 1.5em; - font-weight: bold; -} - -h1.classTitle { - color: #007b00; - font-size: 1.5em; - line-height:130%; -} - -h2 { - font-size: 1.25em; - color: #6277AA; - margin: 2em 0pt 1em; -} - -h3 { - font-size: 1.1em; - color: #6277AA; -} - -p { - margin: 1em 0; - text-align: justify; -} - -a:link { - color: #001C58; -} - -a:visited { - color: #6277AA; -} - -hr { - border: none 0; - border-top: 0.0625em solid #7f8fb1; - height: 0.0625em; -} - -.invisible { - display: none !important; -} - -.clear { - clear: both; - line-height: 0.0625em; -} - -.description { - font: 0.8125em Verdana, Arial; - line-height: 0.9375em; - padding: 0.25em; - padding-left: 0.25em; -} - -.fineprint { - padding-top: 1.25em; - text-align: right; - font-size: 0.625em; -} - -div.sectionTitle { - background-color: #356aa0; - color: #fff; - font-size: 1.1em; - font-weight: bold; - text-align: left; - padding: 0.125em 0.5em 0.125em 0.5em; - border: 0.0625em #7F8FB1 solid; -} - -/* --- Index toggler ------------------------------------------------------- */ -#index-toggler { - width: 1em; - top: 0.25em; - left: 16.25em; - cursor: pointer; - font-weight: bold; - font-family: Arial; - font-size: 1em; - color: #fff; - z-index: 100; -} -#index-close { - background: url(images/never_translate.png) no-repeat left; - height: 1em; - width: 1em; - float: left; - cursor: pointer; - margin: 0.0625em 0.25em; - display: inline; -} -body.index-collapsed { background-position: 0; } -body.index-collapsed #main { margin-left: 0; } -body.index-collapsed #index { width: 0; } -body.index-collapsed #index-wrapper { display: none; } -body.index-collapsed #index-toggler { left: 0; } - -/* --- Module Filter ------------------------------------------------------- */ -.module-filter { - display: inline; - float: left; - cursor: pointer; - width: 4em; - font-size: 0.8em; - text-align: center; - padding-top: 0.125em; -} -.module-filter, .module-filter a { - text-decoration: none; - color: #007B00 !important; -} -body.filter .sectionItem { display: none; } -body.filter .module-filter, body.filter .module-filter a { color: red !important; } -body.filter.module-core .module-core { display: block; } -body.filter.module-dom .module-dom { display: block; } -body.filter.module-css .module-css { display: block; } -body.filter.module-ajax .module-ajax { display: block; } -body.filter.module-event .module-event { display: block; } - -/* --- Method Toggler ------------------------------------------------------ */ -.method-toggler { - background: url(images/minus.gif) no-repeat left; - cursor: pointer; - float: left; - width: 0.875em; - height: 0.875em; -} -.method-toggler.toggled { - background: url(images/plus.gif) no-repeat left; -} - -/* --- Class Name and File Name Icons -------------------------------------- */ -.itemName .icon, .itemName .icon a { - color: #007B00 !important; -} -.itemName .icon { - font-size: 1em; - font-weight: bold; - padding: 0 0 0.125em 1.5em; -} - -.itemName .icon { - background: url(images/class_obj.png) no-repeat left; -} - -.itemName.namespace .icon { - background-image: url(images/namespace_obj.png) !important; -} - -.itemName.namespace-function .icon { - background-image: url(images/namespace_function_obj.png) !important; -} - -.fileName .icon { - background: url(images/file_obj.png) no-repeat left !important; -} - -/* --- Class Method and Property Icons ------------------------------------- */ -div.classMethod .icon { - padding-left: 1.275em; - background: url(images/method_public_obj.png) no-repeat left; -} - -div.classMethod .private { - background-image: url(images/method_private_obj.png) !important; -} - -div.classProperty .icon { - padding-left: 1.275em; - background: url(images/field_public_obj.png) no-repeat left; -} - -div.classProperty .private { - background-image: url(images/field_private_obj.png) !important; -} - - -/* --- Headers ------------------------------------------------------------- */ -.header { - color: #fff; - font-weight: bold; - font-size: 1.4em; - height: 1.2em; - background: #356aa0; - padding: 0.15em 0.4375em; -} - -#index .header { - padding: 0.5em 0 0 0; - height: 1.625em; - font-size: 1em; - background: #356aa0; -} - -/* --- Main/Index Shared Layouts ------------------------------------------- */ -#content .section { - margin-top: 1.5em; -} - -div.classList { - padding: 0.625em; - font-family: arial, sans-serif; - font-size: 0.75em; -} - -div.sectionItem .signature { - color: #000; - margin-left: 0.250em; - font-weight: normal; -} - -.help, div.sectionItem .signature span { - cursor: help; -} - -/* --- Main layout --------------------------------------------------------- */ -#main .full-description { - font-size: 0.9em; - line-height: 135%; -} - -#main code { - font-size: 1.1em; - font-weight: bold; - color: #666; -} - -html:not([lang*=""]) #main code { - font-size: 1.4em !important; /* Firefox hack */ -} - -#main p p, #main .full-description p, #main span a { - font-size: 1em; -} - -#content { - padding: 0 1.25em 1.25em 1.25em; -} - -#main .sectionItem { - background: #fff; - padding-left: 0.8em; -} - -#main .sectionItem .description { - font-size: 0.8em; - padding-left: 0.4375em; - color: #777; -} - -#main .summary .sectionItems, #main .details .sectionItem { - border: 0.25em #8DA6C6 solid; - padding: 0.625em; -} - -/* --- Summary layout ------------------------------------------------------ */ -#main .summary { - background: #fff; -} - -#main .summary .sectionItems { - border-width: 0.125em 0.125em 0.250em; -} - -#main .summary .sectionItem { - padding: 0 0 0.3em 1.6em; - font-family: Verdana, Arial; - font-size: 0.875em; -} - -#main .summary .sectionItem b { - margin-left: -1.4286em; -} - -#main .summary .module-filter { - margin-left: -5.3571em; -} - -/* --- Details layout ------------------------------------------------------ */ -#main .details .module-filter { - font-size: 70%; -} - -#main .details .sectionItem { - border-width: 0.125em 0.125em 0.250em; - margin-bottom: 0.75em; -} - -#main .details .itemTitle { - color: #001C58; - font-family: Verdana; - font-weight: bold; - font-size: 1em; - display: inline; -} - -#main .details .itemTitle .light { - font-size: 0.9em; -} - -#main .details .full-description { - padding: 0 0.625em; -} - - -.light, .light a:link, .light a:visited { - color: #777; - font-weight: normal; - font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; -} - -/* --- Details data -------------------------------------------------------- */ -table.methodItem { - font-size: 0.8em; -} -table.methodItem p { - margin: 0; -} -table.methodItem td { - padding: 0 0.1em 0.1em; - vertical-align: text-top; -} -table.methodItem .methodItemType { - text-align: center; -} -div.heading { - color: #6277AA; - font-size: 0.875em; - font-weight: bold; - margin: 0.625em 0 0; -} - -/* --- Index Layout -------------------------------------------------------- */ -#index-wrapper { - width: 100%; -} - -#index-menu { - background: #8DA6C6; - color: #fff; - text-align: center; - padding: 0.125em 0 0.25em; - font-weight: bold; - font-size: 0.9em; -} - -#index-menu a:link, #index-menu a:visited { - color: #fff; -} - -#index-title { - float: left; -} - -#index-content { - background: #fff; - border: 0 #8DA6C6 solid; - border-width: 0 0 0.25em; - font-size: 1.1em; -} - -#index-content .signature { - font-size: 0.85em; -} - -#index .section { - padding-bottom: 0.625em; -} - -/* --- Class index / File index layout ------------------------------------- */ -* html #content.index-page { - width: 92%; /* IE only hack para evitar bug no layout */ -} - -#content.index-page .sectionItem { - padding: 0.125em; -} - -#content.index-page .sectionItems { - border-top-width: 0.125em; -} - -#content.index-page .summary { - margin: 0; -} - -/* --- Hide private members ------------------------------------------------ */ -/* -div.sectionItem.private { - display: none !important; -} -/**/ diff --git a/docs/event.js.html b/docs/event.js.html new file mode 100644 index 0000000..596493c --- /dev/null +++ b/docs/event.js.html @@ -0,0 +1,237 @@ + + + + + JSDoc: Source: modules/event.js + + + + + + + + + + +
+ +

Source: modules/event.js

+ + + + + +
+
+
/**
+ * Event
+ *
+ * Event api wrapper
+ * @todo Add method for triggering events
+ */
+(function (undefined){
+
+	"use strict";
+
+	var _add_remove, e, _attach_delegate;
+
+	_add_remove = function (sel, event, callback, add)
+	{
+		var i, len;
+
+		// Multiple events? Run recursively!
+		if ( ! event.match(/^([\w\-]+)$/))
+		{
+			event = event.split(" ");
+
+			len = event.length;
+
+			for (i = 0; i < len; i++)
+			{
+				_add_remove(sel, event[i], callback, add);
+			}
+
+			return;
+		}
+
+		// Bind the event
+		(add === true)
+			? sel.addEventListener(event, callback, false)
+			: sel.removeEventListener(event, callback, false);
+	};
+
+	_attach_delegate = function(sel, target, event, callback)
+	{
+		// attach the listener to the parent object
+		_add_remove(sel, event, function(e){
+
+			var elem, t;
+
+			// Get the live version of the target selector
+			t = $_.$(target, sel);
+
+			// Check each element to see if it matches the target
+			for(elem in t)
+			{
+				// Fire target callback when event bubbles from target
+				if(e.target == t[elem])
+				{
+					// Trigger the event callback
+					callback.call(t[elem], e);
+
+					// Stop event propegation
+					e.stopPropagation();
+				}
+			}
+
+		}, true);
+	};
+
+	// --------------------------------------------------------------------------
+
+	/**
+	 * Event Listener module
+	 *
+	 * @namespace
+	 * @name event
+	 * @memberOf $_
+	 */
+	e = {
+		/**
+		 * Create a custom event
+		 *
+		 * @memberOf $_.event
+		 * @name create
+		 * @function
+		 * @example Eg. var event = $_("#selector").event.create('foo', {});
+		 * @param {string} name
+		 * @param {object} [data]
+		 * @return {Object}
+		 */
+		create: function(name, data)
+		{
+			// Do a terrible browser-sniffic hack because I don't know of a good
+			// feature test
+			if (/MSIE|Trident/i.test(navigator.userAgent))
+			{
+				// Okay, I guess we have to do this the hard way... :(
+				// Microsoft, your browser still sucks
+				var e = document.createEvent('CustomEvent');
+				e.initCustomEvent(name, true, true, data);
+
+				return e;
+			}
+			else
+			{
+				return new CustomEvent(name, data);
+			}
+		},
+		/**
+		 * Adds an event that returns a callback when triggered on the selected
+		 * event and selector
+		 *
+		 * @memberOf $_.event
+		 * @name add
+		 * @function
+		 * @example Eg. $_("#selector").event.add("click", do_something());
+		 * @param {string} event
+		 * @param {function} callback
+		 */
+		add: function (event, callback)
+		{
+			$_.each(function(e){
+				_add_remove(e, event, callback, true);
+			});
+		},
+		/**
+		 * Removes an event bound the the specified selector, event type, and callback
+		 *
+		 * @memberOf $_.event
+		 * @name remove
+		 * @function
+		 * @example Eg. $_("#selector").event.remove("click", do_something());
+		 * @param {string} event
+		 * @param {string} callback
+		 */
+		remove: function (event, callback)
+		{
+			$_.each(function(e){
+				_add_remove(e, event, callback, false);
+			});
+		},
+		/**
+		 * Binds a persistent event to the document
+		 *
+		 * @memberOf $_.event
+		 * @name live
+		 * @function
+		 * @example Eg. $_.event.live(".button", "click", do_something());
+		 * @param {string} target
+		 * @param {string} event
+		 * @param {function} callback
+		 */
+		live: function (target, event, callback)
+		{
+			_attach_delegate(document.documentElement, target, event, callback);
+		},
+		/**
+		 * Binds an event to a parent object
+		 *
+		 * @memberOf $_.event
+		 * @name delegate
+		 * @function
+		 * @example Eg. $_("#parent").delegate(".button", "click", do_something());
+		 * @param {string} target
+		 * @param {string} event
+		 * @param {function} callback
+		 */
+		delegate: function (target, event, callback)
+		{
+			$_.each(function(e){
+				_attach_delegate(e, target, event, callback);
+			});
+		},
+		/**
+		 * Trigger an event to fire
+		 *
+		 * @memberOf $_.event
+		 * @name trigger
+		 * @function
+		 * @example Eg. $_("#my_id").trigger('click');
+		 * @param {object} event
+		 * @return {boolean}
+		 */
+		trigger: function(event)
+		{
+			var target = this.el;
+			return target.dispatchEvent(event);
+		}
+	};
+
+	$_.ext('event', e);
+
+}());
+
+
+ + + + +
+ + + +
+ + + + + + + diff --git a/docs/files.html b/docs/files.html deleted file mode 100755 index 72cfddf..0000000 --- a/docs/files.html +++ /dev/null @@ -1 +0,0 @@ -JsDoc Reference - File Index
 
Project Outline
 
$_
$(string, object)
ext(string, object)
each(function)
type(mixed)
get(string, object, function, function)
post(string, object, function, function)
addClass(string)
removeClass(string)
show(string)
attr(string, string)
text(string)
css(string, string)
append(string)
prepend(string)
html(string)
create(string, object)
add(string, function)
remove(string, string)
live(string, string, function)
delegate(string, string, function)
trigger(string, object)
get(string, bool)
set(string, mixed, bool)
remove(string, bool)
getAll(bool)
clear(bool)
«
Kis JS Docs

File Index

core.js../kis-js/src/modules/event.js
ajax.js../kis-js/src/modules/event.js
DOM.js../kis-js/src/modules/event.js
event.js../kis-js/src/modules/event.js
store.js../kis-js/src/modules/event.js
\ No newline at end of file diff --git a/docs/global.html b/docs/global.html new file mode 100644 index 0000000..475f6eb --- /dev/null +++ b/docs/global.html @@ -0,0 +1,177 @@ + + + + + JSDoc: Global + + + + + + + + + + +
+ +

Global

+ + + + + +
+ +
+

+ +

+ +
+ +
+
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + + + + + + + +

Members

+ +
+ +
+

data[undefined]

+ + +
+
+ +
+ Ajax + +Module for making ajax requests +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
+ +
+ + + + + + + +
+ +
+ + + + +
+ + + +
+ + + + + + + \ No newline at end of file diff --git a/docs/images/bg.png b/docs/images/bg.png deleted file mode 100644 index 2a69cea..0000000 Binary files a/docs/images/bg.png and /dev/null differ diff --git a/docs/images/class_default_obj.png b/docs/images/class_default_obj.png deleted file mode 100644 index 8d42ac8..0000000 Binary files a/docs/images/class_default_obj.png and /dev/null differ diff --git a/docs/images/class_obj.png b/docs/images/class_obj.png deleted file mode 100644 index b763245..0000000 Binary files a/docs/images/class_obj.png and /dev/null differ diff --git a/docs/images/collapsebtn.gif b/docs/images/collapsebtn.gif deleted file mode 100644 index baa80eb..0000000 Binary files a/docs/images/collapsebtn.gif and /dev/null differ diff --git a/docs/images/expandbtn.gif b/docs/images/expandbtn.gif deleted file mode 100644 index 39737e3..0000000 Binary files a/docs/images/expandbtn.gif and /dev/null differ diff --git a/docs/images/field_private_obj.png b/docs/images/field_private_obj.png deleted file mode 100644 index e88e002..0000000 Binary files a/docs/images/field_private_obj.png and /dev/null differ diff --git a/docs/images/field_public_obj.png b/docs/images/field_public_obj.png deleted file mode 100644 index 6c163f5..0000000 Binary files a/docs/images/field_public_obj.png and /dev/null differ diff --git a/docs/images/file_obj.png b/docs/images/file_obj.png deleted file mode 100644 index 24ed3ea..0000000 Binary files a/docs/images/file_obj.png and /dev/null differ diff --git a/docs/images/method_private_obj.png b/docs/images/method_private_obj.png deleted file mode 100644 index bf432c0..0000000 Binary files a/docs/images/method_private_obj.png and /dev/null differ diff --git a/docs/images/method_public_obj.png b/docs/images/method_public_obj.png deleted file mode 100644 index a032863..0000000 Binary files a/docs/images/method_public_obj.png and /dev/null differ diff --git a/docs/images/minus.gif b/docs/images/minus.gif deleted file mode 100644 index 90d1d34..0000000 Binary files a/docs/images/minus.gif and /dev/null differ diff --git a/docs/images/namespace_function_obj.png b/docs/images/namespace_function_obj.png deleted file mode 100644 index 3b3b7ef..0000000 Binary files a/docs/images/namespace_function_obj.png and /dev/null differ diff --git a/docs/images/namespace_obj.png b/docs/images/namespace_obj.png deleted file mode 100644 index 3021c8a..0000000 Binary files a/docs/images/namespace_obj.png and /dev/null differ diff --git a/docs/images/never_translate.png b/docs/images/never_translate.png deleted file mode 100644 index 204f5e7..0000000 Binary files a/docs/images/never_translate.png and /dev/null differ diff --git a/docs/images/plus.gif b/docs/images/plus.gif deleted file mode 100644 index 014671f..0000000 Binary files a/docs/images/plus.gif and /dev/null differ diff --git a/docs/index.html b/docs/index.html old mode 100755 new mode 100644 index cbec70e..b0abbb1 --- a/docs/index.html +++ b/docs/index.html @@ -1 +1,146 @@ -JsDoc Reference - Index
 
Project Outline
 
$_
$(string, object)
ext(string, object)
each(function)
type(mixed)
get(string, object, function, function)
post(string, object, function, function)
addClass(string)
removeClass(string)
show(string)
attr(string, string)
text(string)
css(string, string)
append(string)
prepend(string)
html(string)
create(string, object)
add(string, function)
remove(string, string)
live(string, string, function)
delegate(string, string, function)
trigger(string, object)
get(string, bool)
set(string, mixed, bool)
remove(string, bool)
getAll(bool)
clear(bool)
«
Kis JS Docs

Class Index

_global_

Global namespace.

\ No newline at end of file + + + + + JSDoc: Index + + + + + + + + + + +
+ +

Index

+ + + + + + + +

+ + + + + + + + + + + + + + + + + + + + + +
+ +
+

+ polyfill.js +

+ +
+ +
+
+ + + + +
polyfill.js
+ + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ + + + + + + \ No newline at end of file diff --git a/docs/javascript/all.js b/docs/javascript/all.js deleted file mode 100755 index 5b6876a..0000000 --- a/docs/javascript/all.js +++ /dev/null @@ -1,326 +0,0 @@ -/** - * @fileOverview Contains standard code in the namespace 'wbos' and code specifically written for Codeview in the namespace 'codeview' - * @author Wouter Bos (www.thebrightlines.com) - * @since 1.0 - 2010-09-10 - * @version 1.0 - 2010-09-10 - */ - - - - - - -if (typeof(wbos) == "undefined") { - /** - * @namespace Standard code of Wouter Bos (wbos) - */ - wbos = {} -} -if (typeof(wbos.CssTools) == "undefined") { - /** - * @namespace Namespace for CSS-related functionality - */ - wbos.CssTools = {} -} - - - - -/** - * @namespace Fallback for CSS advanced media query - * @class - * @since 1.0 - 2010-09-10 - * @version 1.0 - 2010-09-10 - */ -wbos.CssTools.MediaQueryFallBack = ( function() { - var config = { - cssScreen: "/css/screen.css", - cssHandheld: "/css/handheld.css", - mobileMaxWidth: 660, - testDivClass: "cssLoadCheck", - dynamicCssLinkId: "DynCssLink", - resizeDelay: 30 - } - var noMediaQuery = false; - var delay; - var currentCssMediaType; - - // Adding events to elements in the DOM without overwriting it - function addEvent(element, newFunction, eventType) { - var oldEvent = eval("element." + eventType); - var eventContentType = eval("typeof element." + eventType) - - if ( eventContentType != 'function' ) { - eval("element." + eventType + " = newFunction") - } else { - eval("element." + eventType + " = function(e) { oldEvent(e); newFunction(e); }") - } - } - - // Get the the inner width of the browser window - function getWindowWidth() { - if (window.innerWidth) { - return window.innerWidth; - } else if (document.documentElement.clientWidth) { - return document.documentElement.clientWidth; - } else if (document.body.clientWidth) { - return document.body.clientWidth; - } else{ - return 0; - } - } - - function addCssLink(cssHref) { - var cssNode = document.createElement('link'); - var windowWidth; - cssNode.type = 'text/css'; - cssNode.rel = 'stylesheet'; - cssNode.media = 'screen, handheld, fallback'; - cssNode.href = cssHref; - document.getElementsByTagName("head")[0].appendChild(cssNode); - } - - - - /* Start public */ - return { - /** - * Adds link to CSS in the head if no CSS is loaded - * - * @since 1.0 - 2010-08-21 - * @version 1.0 - 2010-08-21 - * @param {String|Object} cssScreen URL to CSS file for larger screens - * @param {String|Object} cssHandheld URL to CSS file for smaller screens - * @param {Number} mobileMaxWidth Maximum width for handheld devices - * @example - * wbos.CssTools.MediaQueryFallBack.LoadCss(['screen.css', 'screen2.css'], 'mobile.css', 480) - */ - LoadCss: function(cssScreen, cssHandheld, mobileMaxWidth) { - // Set config values - if (typeof(cssScreen) != "undefined") { - config.cssScreen = cssScreen; - } - if (typeof(cssHandheld) != "undefined") { - config.cssHandheld = cssHandheld; - } - if (typeof(mobileMaxWidth) != "undefined") { - config.mobileMaxWidth = mobileMaxWidth; - } - - // Check if CSS is loaded - var cssloadCheckNode = document.createElement('div'); - cssloadCheckNode.className = config.testDivClass; - document.getElementsByTagName("body")[0].appendChild(cssloadCheckNode); - if (cssloadCheckNode.offsetWidth != 100 && noMediaQuery == false) { - noMediaQuery = true; - } - cssloadCheckNode.parentNode.removeChild(cssloadCheckNode) - - if (noMediaQuery == true) { - // Browser does not support Media Queries, so JavaScript will supply a fallback - var cssHref = ""; - - // Determines what CSS file to load - if (getWindowWidth() <= config.mobileMaxWidth) { - cssHref = config.cssHandheld; - newCssMediaType = "handheld"; - } else { - cssHref = config.cssScreen; - newCssMediaType = "screen"; - } - - // Add CSS link to of page - if (cssHref != "" && currentCssMediaType != newCssMediaType) { - var currentCssLinks = document.styleSheets - for (var i = 0; i < currentCssLinks.length; i++) { - for (var ii = 0; ii < currentCssLinks[i].media.length; ii++) { - if (typeof(currentCssLinks[i].media) == "object") { - if (currentCssLinks[i].media.item(ii) == "fallback") { - currentCssLinks[i].ownerNode.parentNode.removeChild(currentCssLinks[i].ownerNode) - i-- - break; - } - } else { - if (currentCssLinks[i].media.indexOf("fallback") >= 0) { - currentCssLinks[i].owningElement.parentNode.removeChild(currentCssLinks[i].owningElement) - i-- - break; - } - } - } - } - if (typeof(cssHref) == "object") { - for (var i = 0; i < cssHref.length; i++) { - addCssLink(cssHref[i]) - } - } else { - addCssLink(cssHref) - } - - currentCssMediaType = newCssMediaType; - } - - - // Check screen size again if user resizes window - addEvent(window, wbos.CssTools.MediaQueryFallBack.LoadCssDelayed, 'onresize') - } - }, - - /** - * Runs LoadCSS after a short delay - * - * @since 1.0 - 2010-08-21 - * @version 1.0 - 2010-08-21 - * @example - * wbos.CssTools.MediaQueryFallBack.LoadCssDelayed() - */ - LoadCssDelayed: function() { - clearTimeout(delay); - delay = setTimeout( "wbos.CssTools.MediaQueryFallBack.LoadCss()", config.resizeDelay) - } - - } - /* End public */ -})(); - - - - - - -/** - * @namespace Adds a function to an event of a single element. Use this if - * you don't want to use jQuery - * @class - * @since 1.0 - 2010-02-23 - * @version 1.0 - 2010-02-23 - */ -wbos.Events = ( function() { - /* Start public */ - return { - /** - * Adds a function to an event of a single element - * - * @since 1.0 - 2010-02-23 - * @version 1.0 - 2010-02-23 - * @param {Object} element The element on which the event is placed - * @param {Function} newFunction The function that has to be linked to the event - * @param {String} eventType Name of the event - * @example - * wbos.Events.AddEvent( document.getElementById('elementId'), functionName, "onclick" ) - */ - AddEvent: function( element, newFunction, eventType ) { - var oldEvent = eval("element." + eventType); - var eventContentType = eval("typeof element." + eventType) - - if ( eventContentType != 'function' ) { - eval("element." + eventType + " = newFunction") - } else { - eval("element." + eventType + " = function(e) { oldEvent(e); newFunction(e); }") - } - } - } - /* End public */ -})(); - - - - - - -if (typeof(codeview) == "undefined") { - /** - * @namespace Code written for the Codeview template - */ - codeview = {} -} - - - - - - - -/** - * @namespace Enables filtering in class lists - * @class - * @since 1.0 - 2010-11-08 - * @version 1.0 - 2010-11-08 - */ -codeview.classFilter = ( function() { - function onkeyup_ClassFilter() { - var listItems - var search = document.getElementById('ClassFilter').value - search = search.toLowerCase() - if (document.getElementById('ClassList')) { - listItems = document.getElementById('ClassList').getElementsByTagName('li') - filterList(listItems, search) - } - if (document.getElementById('ClassList2')) { - listItems = document.getElementById('ClassList2').getElementsByTagName('li') - filterList(listItems, search) - } - if (document.getElementById('FileList')) { - listItems = document.getElementById('FileList').getElementsByTagName('li') - filterList(listItems, search) - } - if (document.getElementById('MethodsListInherited')) { - var links = document.getElementById('MethodsListInherited').getElementsByTagName('a') - var linksSelected = new Array() - for (var i=0; i < links.length; i++) { - if (links[i].parentNode.parentNode.tagName == "DD") { - linksSelected.push(links[i]) - } - } - filterList(linksSelected, search) - } - if (document.getElementById('MethodsList')) { - listItems = document.getElementById('MethodsList').getElementsByTagName('tbody')[0].getElementsByTagName('tr') - filterList(listItems, search, document.getElementById('MethodDetail').getElementsByTagName('li')) - } - } - - function filterList(listItems, search, relatedElements) { - var itemContent = "" - for (var i=0; i < listItems.length; i++) { - itemContent = listItems[i].textContent||listItems[i].innerText - if (itemContent != undefined) { - itemContent = itemContent.toLowerCase() - itemContent = itemContent.replace(/\s/g, "") - if (itemContent.indexOf(search) >= 0 || itemContent == "") { - listItems[i].style.display = "" - } else { - listItems[i].style.display = "none" - } - if (relatedElements != null) { - filterRelatedList(listItems[i], search, relatedElements) - } - } - } - } - - function filterRelatedList(listItem, search, relatedElements) { - var itemIndex = parseInt(listItem.className.replace('item', '')) - if (itemIndex <= relatedElements.length) { - if (relatedElements[itemIndex].className == "item"+ itemIndex) { - relatedElements[itemIndex].style.display = listItem.style.display - } - } - } - - - - - - /* Start public */ - return { - Init: function() { - wbos.Events.AddEvent( - document.getElementById('ClassFilter'), - onkeyup_ClassFilter, - "onkeyup" - ) - } - } - /* End public */ -})(); diff --git a/docs/javascript/html5.js b/docs/javascript/html5.js deleted file mode 100755 index 3587bf7..0000000 --- a/docs/javascript/html5.js +++ /dev/null @@ -1,6 +0,0 @@ -// html5shiv MIT @rem remysharp.com/html5-enabling-script -// iepp v1.6.2 MIT @jon_neal iecss.com/print-protector -/*@cc_on(function(m,c){var z="abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video";function n(d){for(var a=-1;++ai";if(g.childNodes.length!==1){var i=z.split("|"),o=i.length,s=RegExp("(^|\\s)("+z+")", -"gi"),t=RegExp("<(/*)("+z+")","gi"),u=RegExp("(^|[^\\n]*?\\s)("+z+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),r=c.createDocumentFragment(),k=c.documentElement;g=k.firstChild;var h=c.createElement("body"),l=c.createElement("style"),f;n(c);n(r);g.insertBefore(l, -g.firstChild);l.media="print";m.attachEvent("onbeforeprint",function(){var d=-1,a=p(c.styleSheets,"all"),e=[],b;for(f=f||c.body;(b=u.exec(a))!=null;)e.push((b[1]+b[2]+b[3]).replace(s,"$1.iepp_$2")+b[4]);for(l.styleSheet.cssText=e.join("\n");++d1){ai++;target=t=a0}for(;source=arguments[ai];ai++){for(var prop in source){p=source[prop];if(prop.charAt(0)!="@"){if(p&&p.splice){var tp=t[prop];t[prop]=tp&&tp.splice?tp.concat(p):new Array().concat(p)}else{if(p&&typeof p=="object"){t[prop]=jProton.extend(t[prop]||{},p)}else{t[prop]=p}}}else{if(prop=="@init"){p.call(t)}else{if(prop=="@require"){for(var ext in p){var v=p[ext];o=t.extensions[ext]||null;if(!o){throw'A extensão "'+ext+'" deve estar instalada.'}else{if(o=0){this.removeClass(e,name)}else{this.addClass(e,name)}},css:function(e,name,val){if(e){if(val){e.style[name]=val}else{var type=typeof name;if(type=="object"){for(p in name){e.style[p]=name[p]}}else{return window.getComputedStyle?document.defaultView.getComputedStyle(e,null)[name]||e.style[name]:e.currentStyle?e.currentStyle[name]||e.style[name]:undefined}}}else{return undefined}}});set.extend({"@extension":{css:"0.3.0a"},hasClass:function(name){return this[0]?(" "+this[0].className+" ").indexOf(" "+name+" ")!=-1:undefined},addClass:function(name){for(var i=0,ei;ei=this[i];i++){element.addClass(ei,name)}return this},removeClass:function(name){for(var i=0,ei;ei=this[i];i++){element.removeClass(ei,name)}return this},toggleClass:function(name){for(var i=0,ei;ei=this[i];i++){element.toggleClass(ei,name)}return this},css:function(name,val){if(val){for(var i=0,ei;ei=this[i];i++){element.css(ei,name,val)}return this}else{return element.css(this[0],name)}}});jProton.event=function(){var _events=new Array();var addEventListener=typeof document.addEventListener!="undefined";var attachEvent=typeof document.attachEvent!="undefined";return{version:"jProton.event.0.3.9a",add:function(e,type,fn){_events.push({e:e,type:type,fn:fn});if(addEventListener){e.addEventListener(type,fn,false)}else{if(attachEvent){e["e"+type+fn]=fn;e[type+fn]=function(){e["e"+type+fn](window.event)};e.attachEvent("on"+type,e[type+fn])}}},remove:function(e,type,fn){var l,fs=fn.toString();for(var i=0,li;li=_events[i];i++){if(li.e==e&&li.type==type&&(li.fn==fn||li.fn.toString()==fs)){l=_events.splice(i,1)[0];break}}if(l){fn=l.fn;if(addEventListener){e.removeEventListener(type,fn,false)}else{if(attachEvent){e.detachEvent("on"+type,e[type+fn]);e[type+fn]=null;e["e"+type+fn]=null}}}},removeAll:function(){for(var i=0;li=_events[i];i++){this.remove(li.e,li.type,li.fn)}}}}();set.extend({"@extension":{event:"0.3.0a"},on:function(type,fn){return this.each(function(){jProton.event.add(this,type,fn)})},un:function(type,fn){return this.each(function(){jProton.event.remove(this,type,fn)})}});jProton.ajax=function(options){return this.ajax.request(options)};var ajax=jProton.ajax;jProton.extend(ajax,function(){var _requests=new Array();var _transport=null;var _callback=null;var _states=["Uninitialized","Loading","Loaded","Interactive","Complete"];var _sendRequest=function(){var t=_transport,r=_requests.shift(),data;t.open(r.type,r.url,r.async);t.setRequestHeader("X-Requested-With","XMLHttpRequest");if(data=jProton.serialize(r.data)){t.setRequestHeader("Content-Type",r.contentType)}t.onreadystatechange=function(){_onStateChange(r)};t.send(data)};var _onStateChange=function(options){var fn,o=options,t=_transport;var state=_getState(t);if(fn=o["on"+state]){fn(_getResponse(o),o)}if(state=="Complete"){var success=t.status==200,response=_getResponse(o);if(fn=o.onUpdate){fn(response,o)}if(fn=o["on"+(success?"Success":"Failure")]){fn(response,o)}t.onreadystatechange=jProton.emptyFn;if(_requests.length>0){setTimeout(_sendRequest,10)}}};var _getResponse=function(options){var t=_transport,type=options.dataType;if(t.status!=200){return t.statusText}else{if(type=="text"){return t.responseText}else{if(type=="html"){return t.responseText}else{if(type=="xml"){return t.responseXML}else{if(type=="json"){return eval("("+t.responseText+")")}}}}}};var _getState=function(){return _states[_transport.readyState]};return{"@extension":{ajax:"0.3.0a"},"@init":function(){_transport=null;try{_transport=new XMLHttpRequest()}catch(e){try{_transport=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{_transport=new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}}},request:function(options){var o=options||{};o.type=o.type&&o.type.toLowerCase()||"get";o.async=o.async||true;o.dataType=o.dataType||"text";o.contentType=o.contentType||"application/x-www-form-urlencoded";_requests.push(o);var s=_getState();if(s=="Uninitialized"||s=="Complete"){_sendRequest()}}}}());set.extend({"@require":{dom:"0.3"},"@extension":{ajax:"0.3.0a"},load:function(url,data,callback){var d=data||null,fn=callback||null;if((typeof data=="function")&&(typeof callback=="undefined")){d=null;fn=data}ajax.request({url:url,data:d,onSuccess:fn,elements:this,onUpdate:function(r,o){$(o.elements).html(r)}});return this}});jProton.extend({"@extension":{ajax:"0.2.0a"},serialize:function(data){var r=[""],rl=0;if(data){if(typeof data=="string"){r[rl++]=data}else{if(data.innerHTML&&data.elements){for(var i=0,el,l=(el=data.elements).length;i+~]\s?|\s|$)/,reTag=/^(#)?([\w-\*]+)/,reNth=/(\d*)n\+?(\d*)/,reNth2=/\D/,isIE=!!window.ActiveXObject,key=30803;eval("var batch = 30803;");function _quickId(e,mode,context,val){if(e==context){var d=context.ownerDocument||context;return d.getElementById(val)}e=_getNodes(e,mode,"*");return _byId(e,val)}var _byId=function(e,val){if(e.tagName||e==document){e=[e]}var r=new Array(),rl=-1;for(var i=0,ei;ei=e[i];i++){if(ei&&ei.id==val){r[++rl]=ei;return r}}return r};var _byTag=function(e,val){if(e.tagName||e==document){e=[e]}var r=new Array(),rl=-1;val=val.toLowerCase();for(var i=0,ei;ei=e[i];i++){if(ei.nodeType==1&&ei.tagName.toLowerCase()==val){r[++rl]=ei}}return r};var _byClass=function(e,val){if(!val){return e}var r=new Array(),rl=-1;for(var i=0,ei;ei=e[i];i++){if((" "+ei.className+" ").indexOf(val)!=-1){r[++rl]=ei}}return r};var _byAttr=function(e,attr,op,val){var r=new Array(),rl=-1,f=query.operators[op];for(var i=0,ei,a;ei=e[i];i++){if(attr=="class"||attr=="className"){a=ei.className}else{if(attr=="for"){a=ei.htmlFor}else{if(attr=="href"){a=ei.getAttribute("href",2)}else{a=ei.getAttribute(attr)}}}if((f&&f(a,val))||(!f&&a)){r[++rl]=ei}}return r};var _byPseudo=function(e,name,val){return query.pseudos[name](e,val)};var _getNodes=function(e,mode,name){var r=new Array(),rl=-1;if(!e){return r}name=name||"*";if(typeof e.getElementsByTagName!="undefined"){e=[e]}if(!mode){for(var i=0,ei,n;ei=e[i];i++){n=ei.getElementsByTagName(name);for(var j=0,nj;nj=n[j];j++){r[++rl]=nj}}}else{if(mode=="/"||mode==">"){var utag=name.toUpperCase();for(var i=0,ei,n;ei=e[i];i++){n=ei.children||ei.childNodes;for(var j=0,nj;nj=n[j];j++){if(nj.nodeName==utag||nj.nodeName==name||name=="*"){r[++rl]=nj}}}}else{if(mode=="+"){var utag=name.toUpperCase();for(var i=0,ei;ei=e[i];i++){while((ei=ei.nextSibling)&&ei.nodeType!=1){}if(ei&&(ei.nodeName==utag||ei.nodeName==name||name=="*")){r[++rl]=ei}}}else{if(mode=="~"){for(var i=0,ei;ei=e[i];i++){while((ei=ei.nextSibling)&&(ei.nodeType!=1||(name=="*"||ei.tagName.toLowerCase()!=name))){}if(ei){r[++rl]=ei}}}}}}return r};var _unique=function(e){if(!e){return new Array()}var len=e.length,i,r=e,ei;if(!len||typeof e.nodeType!="undefined"||len==1){return e}if(isIE&&typeof e[0].selectSingleNode!="undefined"){var d=++key;e[0].setAttribute("__unique",d);var r=[e[0]],rl=0;for(var i=1,ei;ei=e[i];i++){if(!ei.getAttribute("__unique")!=d){ei.setAttribute("__unique",d);r[++rl]=ei}}for(var i=0;ei=e[i];i++){ei.removeAttribute("__unique")}return r}var d=++key;e[0].__unique=d;for(i=1,ei;ei=e[i];i++){if(ei.__unique!=d){ei.__unique=d}else{r=new Array(),rl=-1;for(var j=0;j1){return _unique(results)}return results},is:function(e,ss){if(typeof e=="string"){e=document.getElementById(e)}var isArray=!!e.splice,result=query.filter(isArray?e:[e],ss);return isArray?(result.length==e.length):(result.length>0)},filter:function(e,ss,nonMatches){ss=ss.replace(reTrim,"");if(!simpleCache[ss]){simpleCache[ss]=query.compile(ss,"simple")}var result=simpleCache[ss](e);return nonMatches?_diff(result,e):result},rules:[{re:/^\.([\w-]+)/,select:'e = _byClass(e, " {1} ");'},{re:/^\:([\w-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:'e = _byPseudo(e, "{1}", "{2}");'},{re:/^\[([\w-]+)(?:(.?=)["']?(.+?)["']?)?\]/,select:'e = _byAttr(e, "{1}", "{2}", "{3}");'},{re:/^#([\w-]+)/,select:'e = _byId(e, "{1}");'}],operators:{"=":function(attr,val){return attr==val},"!=":function(attr,val){return attr!=val},"^=":function(attr,val){return attr&&attr.substr(0,val.length)==val},"$=":function(attr,val){return attr&&attr.substr(attr.length-val.length)==val},"*=":function(attr,val){return attr&&attr.indexOf(val)!==-1},"%=":function(attr,val){return(attr%val)==0},"|=":function(attr,val){return attr&&(attr==val||attr.substr(0,val.length+1)==val+"-")},"~=":function(attr,val){return attr&&(" "+attr+" ").indexOf(" "+val+" ")!=-1}},pseudos:{"first-child":function(e){var r=new Array(),rl=-1,n;for(var i=0,ei;ei=n=e[i];i++){while((n=n.previousSibling)&&n.nodeType!=1){}if(!n){r[++rl]=ei}}return r},"last-child":function(e){var r=new Array(),rl=-1,n;for(var i=0,ei;ei=n=e[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(!n){r[++rl]=ei}}return r},"nth-child":function(e,val){var r=new Array(),rl=-1,m=reNth.exec(val=="even"&&"2n"||val=="odd"&&"2n+1"||!reNth2.test(val)&&"n+"+val||val),f=(m[1]||1)-0,l=m[2]-0;for(var i=0,ei;ei=e[i];i++){var p=ei.parentNode;if(batch!=p._batch){var j=0;for(var n=p.firstChild;n;n=n.nextSibling){if(n.nodeType==1){n.nodeIndex=++j}}p._batch=batch}if(f==1){if(l==0||ei.nodeIndex==l){r[++rl]=ei}}else{if((ei.nodeIndex+l)%f==0){r[++rl]=ei}}}return r},"only-child":function(e){var r=new Array(),rl=-1;for(var i=0,ei;ei=e[i];i++){if(!_prev(ei)&&!_next(ei)){r[++rl]=ei}}return r},empty:function(e){var r=new Array(),rl=-1;for(var i=0,ei;ei=e[i];i++){var n=ei.childNodes,j=-1,nj,empty=true;while(nj=n[++j]){if(nj.nodeType==1||nj.nodeType==3){empty=false;break}}if(empty){r[++rl]=ei}}return r},contains:function(e,val){var r=new Array(),rl=-1;for(var i=0,ei;ei=e[i];i++){if((ei.textContent||ei.innerText||"").indexOf(val)!=-1){r[++rl]=ei}}return r},nodeValue:function(e,val){var r=new Array(),rl=-1;for(var i=0,ei;ei=e[i];i++){if(ei.firstChild&&ei.firstChild.nodeValue==val){r[++rl]=ei}}return r},checked:function(e){var r=new Array(),rl=-1;for(var i=0,ei;ei=e[i];i++){if(ei.checked==true){r[++rl]=ei}}return r},not:function(e,val){return query.filter(e,val,true)},any:function(e,val){var r=new Array(),rl=-1,s,ss=val.split("|");for(var i=0,ei;ei=e[i];i++){for(var j=0;s=ss[j];j++){if(query.is(ei,s)){r[++rl]=ei;break}}}return r},odd:function(e){return this["nth-child"](e,"odd")},even:function(e){return this["nth-child"](e,"even")},nth:function(e,val){return e[val-1]||new Array()},first:function(e){return e[0]||new Array()},last:function(e){return e[e.length-1]||new Array()},has:function(e,val){var r=new Array(),rl=-1,s=query.select;for(var i=0,ei;ei=e[i];i++){if(s(val,ei).length>0){r[++rl]=ei}}return r},next:function(e,val){var r=new Array(),rl=-1,is=query.is;for(var i=0,ei;ei=e[i];i++){var n=_next(ei);if(n&&is(n,val)){r[++rl]=ei}}return r},prev:function(e,val){var r=new Array(),rl=-1,is=query.is;for(var i=0,ei;ei=e[i];i++){var n=_prev(ei);if(n&&is(n,val)){r[++rl]=ei}}return r}}}}();var query=jProton.query})(); \ No newline at end of file diff --git a/docs/polyfill.js.html b/docs/polyfill.js.html new file mode 100644 index 0000000..3780d75 --- /dev/null +++ b/docs/polyfill.js.html @@ -0,0 +1,58 @@ + + + + + JSDoc: Source: polyfill.js + + + + + + + + + + +
+ +

Source: polyfill.js

+ + + + + +
+
+
/**
+ * A module of various browser polyfills
+ * @file polyfill.js
+ */
+
+/**
+ * Promise.prototype.done polyfill
+ */
+if (!Promise.prototype.done) { Promise.prototype.done = function (cb, eb) { this.then(cb, eb).then(null, function (err) { setTimeout(function () { throw err; }, 0); }); }; }
+
+
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.3.0-alpha5 on Fri Sep 05 2014 11:56:00 GMT-0400 (EDT) +
+ + + + + diff --git a/docs/promise.js.html b/docs/promise.js.html new file mode 100644 index 0000000..8a225e4 --- /dev/null +++ b/docs/promise.js.html @@ -0,0 +1,162 @@ + + + + + JSDoc: Source: modules/promise.js + + + + + + + + + + +
+ +

Source: modules/promise.js

+ + + + + +
+
+
/**
+ * Module for polyfilling promises
+ */
+(function(w, undefined) {
+
+	if (typeof Promise === "undefined")
+	{
+		/**
+		 * Promise constructor
+		 *
+		 * @constructor
+		 * @namespace
+		 * @param function fn
+		 */
+		w.Promise = function(fn)
+		{
+			var state = 'pending';
+			var value;
+			var deferred = null;
+
+			function resolve(newValue)
+			{
+				try
+				{
+					if (newValue && typeof newValue.then === 'function')
+					{
+						newValue.then(resolve);
+						return;
+					}
+
+					state = 'resolved';
+					value = newValue;
+
+					if (deferred)
+					{
+						handle(deferred);
+					}
+				}
+				catch(e)
+				{
+					reject(e);
+				}
+			}
+
+			function reject(reason)
+			{
+				state = 'rejected';
+				value = reason;
+
+				if (deferred)
+				{
+					handle(deferred);
+				}
+
+			}
+
+			function handle(handler)
+			{
+				if (state === 'pending')
+				{
+					deferred = onResolved;
+					return;
+				}
+
+				var handlerCallback;
+
+				setTimeout(function() {
+					handlerCallback = (state === 'resolved')
+						? handler.onResolved
+						: handler.onRejected;
+
+
+					if ( ! handlerCallback)
+					{
+
+						(state === 'resolved')
+							? handler.resolve(value)
+							: handler.reject(value);
+
+						return;
+					}
+
+					try
+					{
+						ret = handlerCallback(value);
+					}
+					catch(e)
+					{
+						handler.reject(e);
+						return;
+					}
+
+					handler.resolve(ret);
+				}, 1);
+			}
+
+			this.then = function(onResolved, onRejected) {
+				return new Promise(function(resolve, reject) {
+					handle({
+						onResolved: onResolved,
+						onRejected: onRejected,
+						resolve: resolve,
+						reject: reject
+					});
+				});
+			};
+
+			fn(resolve, reject);
+		}
+	}
+
+})(window);
+
+
+
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.3.0-alpha5 on Fri Sep 05 2014 11:37:54 GMT-0400 (EDT) +
+ + + + + diff --git a/docs/scripts/linenumber.js b/docs/scripts/linenumber.js new file mode 100644 index 0000000..8d52f7e --- /dev/null +++ b/docs/scripts/linenumber.js @@ -0,0 +1,25 @@ +/*global document */ +(function() { + var source = document.getElementsByClassName('prettyprint source linenums'); + var i = 0; + var lineNumber = 0; + var lineId; + var lines; + var totalLines; + var anchorHash; + + if (source && source[0]) { + anchorHash = document.location.hash.substring(1); + lines = source[0].getElementsByTagName('li'); + totalLines = lines.length; + + for (; i < totalLines; i++) { + lineNumber++; + lineId = 'line' + lineNumber; + lines[i].id = lineId; + if (lineId === anchorHash) { + lines[i].className += ' selected'; + } + } + } +})(); diff --git a/docs/scripts/prettify/Apache-License-2.0.txt b/docs/scripts/prettify/Apache-License-2.0.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/docs/scripts/prettify/Apache-License-2.0.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/docs/scripts/prettify/lang-css.js b/docs/scripts/prettify/lang-css.js new file mode 100644 index 0000000..041e1f5 --- /dev/null +++ b/docs/scripts/prettify/lang-css.js @@ -0,0 +1,2 @@ +PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", +/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); diff --git a/docs/scripts/prettify/prettify.js b/docs/scripts/prettify/prettify.js new file mode 100644 index 0000000..eef5ad7 --- /dev/null +++ b/docs/scripts/prettify/prettify.js @@ -0,0 +1,28 @@ +var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; +(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a= +[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;ci[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m), +l=[],p={},d=0,g=e.length;d=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, +q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/, +q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g, +"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a), +a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e} +for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], +"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"], +H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], +J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+ +I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]), +["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css", +/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}), +["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes", +hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p=0){var k=k.match(g),f,b;if(b= +!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p