+
+ addClass(string)
+ Adds a class to the element(s) specified by the current selector
+
+
+
+
+ removeClass(string)
+ Removes a class from the element(s) specified by the current selector
+
+
+
+
+ hide()
+ Hides the element(s) specified by the current selector
+
+
+
+
+ show(string)
+ Shows the element(s) specified by the current selector.
+
+
+
+
+ attr(string, 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.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Method Detail
+
+
+
+
+
+
+
+ $_.dom.addClass(string)
+
+
+
+ Adds a class to the element(s) specified by the current
+selector
+
+
+
+
+
+
+
+
+
+
Parameters:
+
+
+
+
+
+
+
+ string
+
+
+ class
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+
+
+
+
+ void
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $_.dom.removeClass(string)
+
+
+
+ Removes a class from the element(s) specified by the current
+selector
+
+
+
+
+
+
+
+
+
+
Parameters:
+
+
+
+
+
+
+
+ string
+
+
+ class
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+
+
+
+
+ void
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $_.dom.hide()
+
+
+
+ Hides the element(s) specified by the current selector
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+
+
+
+
+ void
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $_.dom.show(string)
+
+
+
+ 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:
+
+
+
+
+
+
+
+ string?, Default:
+
+
+ type
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+
+
+
+
+ void
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $_.dom.attr(string, string)
+ : 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:
+
+
+
+
+
+
+
+ string
+
+
+ name
+
+
+
+
+
+
+
+
+ string
+
+
+ value
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Documentation generated by JsDoc Toolkit 2.4.0 on Tue Nov 01 2011 18:52:39 GMT-0400 (EDT)
+
+
+ text(string)
+ Sets or retrieves the text content of the element specified by the current selector.
+
+
+
+
+ css(string, string)
+ Sets or retrieves a css property of the element specified by the current selector.
+
+
+
+
+ object_keys(object)
+ Retrieve the keys, or member names of an object
+
+
+
+
+ object_values(object)
+ Retrieves the values of an object, and returns them as an array
+
+
+
+
+ array_combine(array/object, array/object)
+ Creates an object, with the property names of the first array, and the values of the second.
+
+
+
+
+ object_merge(object)
+ Combines two or more objects/arrays.
+
+
+
+
+ str_trans(string, mixed, string)
+ Replaces sections of strings in a greedy fashion, starting with the longest replace pairs first.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Method Detail
+
+
+
+
+
+
+
+ $_.util.text(string)
+ : 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
+
+
+ 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
+
+
+ Creates an object, with the property names of the first array,
+and the values of the second. If objects are passed, the values
+of the object are used. If the arrays or objects passed are
+not the same size, the function will return false.
+
+
+
+
+
+
+
+
+
+
Parameters:
+
+
+
+
+
+
+
+ array/object
+
+
+ keys
+
+
+
+
+
+
+
+
+ array/object
+
+
+ vals
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+
+
+
+
+ object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $_.util.object_merge(object)
+ : object
+
+
+ Combines two or more objects/arrays. If the keys are numeric, the outputted
+object will have re-indexed keys. If a key/value pair exists in both objects,
+indentical values will be droped, but if a key exists with a different value,
+with the same key, the value in the second array will replace the value in the
+first
+
+
+
+
+
+
+
+ Replaces sections of strings in a greedy fashion,
+starting with the longest replace pairs first. Accepts
+one replace pair as two parameters, or an object, with
+from => to replacements as key/value pairs
+
+
+
+
+
+
+
+
+
+
Parameters:
+
+
+
+
+
+
+
+ string
+
+
+ input_string
+
+
+
+
+
+
+
+
+ mixed
+
+
+
+
+
+
+
+
+
+
+
+ string?, Default:
+
+
+ to
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Documentation generated by JsDoc Toolkit 2.4.0 on Tue Nov 01 2011 18:52:39 GMT-0400 (EDT)
+
1/**
+ 2 Kis JS Keep It Simple JS Library
+ 3 Copyright Timothy J. Warren
+ 4 License Public Domain
+ 5 Version 0.5.0-pre
+ 6 */
+ 7(function(){
+ 8
+ 9"use strict";
+ 10
+ 11//Browser requirements check
+ 12if(!document.querySelectorAll)
+ 13{
+ 14return;
+ 15}
+ 16
+ 17var$_,$,dcopy,sel,sel_string;
+ 18
+ 19
+ 20/**
+ 21 * $_
+ 22 *
+ 23 * Constructor function
+ 24 *
+ 25 * @constuctor
+ 26 * @namespace
+ 27 * @param string selector
+ 28 * @return object
+ 29 */
+ 30$_=function(s)
+ 31{
+ 32//Have documentElement be default selector, just in case
+ 33if(typeofs==="undefined")
+ 34{
+ 35//Defines a "global" selector for that instance
+ 36sel=(typeof$_.el!=="undefined")
+ 37?$_.el
+ 38:document.documentElement;
+ 39}
+ 40else
+ 41{
+ 42sel=(typeofs!=="object")?$(s):s;
+ 43}
+ 44
+ 45// Add the selector to the prototype
+ 46$_.prototype.el=sel;
+ 47
+ 48// Make a copy before adding properties
+ 49varself=dcopy($_);
+ 50
+ 51// Give sel to each extension.
+ 52for(variinself)
+ 53{
+ 54if(typeofself[i]==="object")
+ 55{
+ 56self[i].el=sel;
+ 57}
+ 58}
+ 59
+ 60self.el=sel;
+ 61
+ 62returnself;
+ 63};
+ 64
+ 65/**
+ 66 * $
+ 67 *
+ 68 * Simple DOM selector function
+ 69 *
+ 70 * @memberOf $_
+ 71 * @param string selector
+ 72 * @param string context
+ 73 * @return object
+ 74 * @type object
+ 75 */
+ 76$=function(a,context)
+ 77{
+ 78varx,c;
+ 79
+ 80if(typeofa!="string"||typeofa==="undefined"){returna;}
+ 81
+ 82//Check for a context of a specific element, otherwise, just run on the document
+ 83c=(context!=null&&context.nodeType===1)
+ 84?context
+ 85:document;
+ 86
+ 87//Pick the quickest method for each kind of selector
+ 88if(a.match(/^#([\w\-]+$)/))
+ 89{
+ 90returndocument.getElementById(a.split('#')[1]);
+ 91}
+ 92else
+ 93{
+ 94x=c.querySelectorAll(a);
+ 95}
+ 96
+ 97//Return the single object if applicable
+ 98return(x.length===1)?x[0]:x;
+ 99};
+100
+101/**
+102 * Deep copy/prototypical constructor function
+103 *
+104 * @param object obj
+105 * @private
+106 * @return object
+107 * @type object
+108 */
+109dcopy=function(obj)
+110{
+111vartype,F;
+112
+113if(typeofobj==="undefined")
+114{
+115return;
+116}
+117
+118if(typeofObject.create!=="undefined")
+119{
+120returnObject.create(obj);
+121}
+122
+123type=typeofobj;
+124
+125if(type!=="object"&&type!=="function")
+126{
+127return;
+128}
+129
+130/**
+131 * @private
+132 */
+133F=function(){};
+134
+135F.prototype=obj;
+136
+137returnnewF();
+138
+139};
+140
+141/**
+142 * Adds the property `obj` to the $_ object, calling it `name`
+143 *
+144 * @param string name
+145 * @param object obj
+146 * @return void
+147 */
+148$_.ext=function(name,obj)
+149{
+150obj.el=sel;
+151$_[name]=obj;
+152};
+153
+154/**
+155 * Iterates over a $_ object, applying a callback to each item
+156 *
+157 * @name $_.each
+158 * @function
+159 * @param function callback
+160 * @return void
+161 */
+162$_.ext('each',function(callback)
+163{
+164if(typeofsel.length!=="undefined"&&sel!==window)
+165{
+166varlen=sel.length;
+167
+168if(len===0)
+169{
+170return;
+171}
+172
+173varselx;
+174for(varx=0;x<len;x++)
+175{
+176selx=(sel.item(x))?sel.item(x):sel[x];
+177callback(selx);
+178}
+179}
+180else
+181{
+182callback(sel);
+183}
+184});
+185
+186/**
+187 * Retrieves the type of the passed variable
+188 *
+189 * @param mixed obj
+190 * @return string
+191 * @type string
+192 */
+193$_.type=function(obj)
+194{
+195if((function(){returnobj&&(obj!==this)}).call(obj))
+196{
+197//fallback on 'typeof' for truthy primitive values
+198return(typeofobj).toLowerCase();
+199}
+200
+201return({}).toString.call(obj).match(/\s([a-z|A-Z]+)/)[1].toLowerCase();
+202};
+203
+204//Set global variables
+205$_=window.$_=window.$_||$_;
+206$_.$=$;
+207
+208//console.log polyfill
+209if(typeofwindow.console==="undefined")
+210{
+211window.console={
+212log:function(){}
+213};
+214}
+215
+216/**
+217 * String trim function polyfill
+218 */
+219if(typeofString.prototype.trim==="undefined")
+220{
+221/**
+222 * @private
+223 */
+224String.prototype.trim=function(){
+225returnthis.replace(/^\s+|\s+$/g,"");
+226};
+227}
+228
+229}());
\ No newline at end of file
diff --git a/docs/symbols/src/kis-js_src_modules_DOM.js.html b/docs/symbols/src/kis-js_src_modules_DOM.js.html
new file mode 100755
index 0000000..43e8928
--- /dev/null
+++ b/docs/symbols/src/kis-js_src_modules_DOM.js.html
@@ -0,0 +1,485 @@
+
1/*
+ 2 * classList.js: Cross-browser full element.classList implementation.
+ 3 * 2011-06-15
+ 4 *
+ 5 * By Eli Grey, http://eligrey.com
+ 6 * Public Domain.
+ 7 * NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
+ 8 */
+ 9
+ 10if(typeofdocument!=="undefined"&&!("classList"indocument.createElement("a")))
+ 11{
+ 12(function(view){
+ 13
+ 14varclassListProp="classList",
+ 15protoProp="prototype",
+ 16elemCtrProto=(view.HTMLElement||view.Element)[protoProp],
+ 17objCtr=Object,
+ 18strTrim=String[protoProp].trim||
+ 19function()
+ 20{
+ 21returnthis.replace(/^\s+|\s+$/g,"");
+ 22},
+ 23arrIndexOf=Array[protoProp].indexOf||
+ 24function(item)
+ 25{
+ 26var
+ 27i=0,
+ 28len=this.length;
+ 29for(;i<len;i++)
+ 30{
+ 31if(iinthis&&this[i]===item)
+ 32{
+ 33returni;
+ 34}
+ 35}
+ 36return-1;
+ 37}
+ 38// Vendors: please allow content code to instantiate DOMExceptions
+ 39,
+ 40/**
+ 41 * @private
+ 42 */
+ 43DOMEx=function(type,message)
+ 44{
+ 45this.name=type;
+ 46this.code=DOMException[type];
+ 47this.message=message;
+ 48},
+ 49/**
+ 50 * @private
+ 51 */
+ 52checkTokenAndGetIndex=function(classList,token)
+ 53{
+ 54if(token==="")
+ 55{
+ 56thrownewDOMEx("SYNTAX_ERR","An invalid or illegal string was specified");
+ 57}
+ 58if(/\s/.test(token))
+ 59{
+ 60thrownewDOMEx("INVALID_CHARACTER_ERR","String contains an invalid character");
+ 61}
+ 62returnarrIndexOf.call(classList,token);
+ 63},
+ 64/**
+ 65 * @private
+ 66 */
+ 67ClassList=function(elem)
+ 68{
+ 69var
+ 70trimmedClasses=strTrim.call(elem.className),
+ 71classes=trimmedClasses?trimmedClasses.split(/\s+/):[],
+ 72i=0,
+ 73len=classes.length;
+ 74for(;i<len;i++)
+ 75{
+ 76this.push(classes[i]);
+ 77}
+ 78this._updateClassName=function()
+ 79{
+ 80elem.className=this.toString();
+ 81};
+ 82},
+ 83classListProto=ClassList[protoProp]=[],
+ 84/**
+ 85 * @private
+ 86 */
+ 87classListGetter=function()
+ 88{
+ 89returnnewClassList(this);
+ 90};
+ 91// Most DOMException implementations don't allow calling DOMException's toString()
+ 92// on non-DOMExceptions. Error's toString() is sufficient here.
+ 93DOMEx[protoProp]=Error[protoProp];
+ 94classListProto.item=function(i)
+ 95{
+ 96returnthis[i]||null;
+ 97};
+ 98classListProto.contains=function(token)
+ 99{
+100token+="";
+101returncheckTokenAndGetIndex(this,token)!==-1;
+102};
+103classListProto.add=function(token)
+104{
+105token+="";
+106if(checkTokenAndGetIndex(this,token)===-1)
+107{
+108this.push(token);
+109this._updateClassName();
+110}
+111};
+112classListProto.remove=function(token)
+113{
+114token+="";
+115varindex=checkTokenAndGetIndex(this,token);
+116if(index!==-1)
+117{
+118this.splice(index,1);
+119this._updateClassName();
+120}
+121};
+122classListProto.toggle=function(token)
+123{
+124token+="";
+125if(checkTokenAndGetIndex(this,token)===-1)
+126{
+127this.add(token);
+128}
+129else
+130{
+131this.remove(token);
+132}
+133};
+134classListProto.toString=function()
+135{
+136returnthis.join(" ");
+137};
+138
+139if(objCtr.defineProperty)
+140{
+141varclassListPropDesc={
+142get:classListGetter,
+143enumerable:true,
+144configurable:true
+145};
+146try
+147{
+148objCtr.defineProperty(elemCtrProto,classListProp,classListPropDesc);
+149}
+150catch(ex)
+151{// IE 8 doesn't support enumerable:true
+152if(ex.number===-0x7FF5EC54)
+153{
+154classListPropDesc.enumerable=false;
+155objCtr.defineProperty(elemCtrProto,classListProp,classListPropDesc);
+156}
+157}
+158}
+159elseif(objCtr[protoProp].__defineGetter__)
+160{
+161elemCtrProto.__defineGetter__(classListProp,classListGetter);
+162}
+163
+164}(self));
+165}
+166
+167// --------------------------------------------------------------------------
+168
+169(function(){
+170vard,tag_reg,class_reg;
+171
+172tag_reg=/^([\w\-]+)$/;
+173class_reg=/\.([\w\-]+)$/;
+174
+175
+176//Private function for getting/setting attributes
+177function_attr(sel,name,value)
+178{
+179varoldVal,doAttr;
+180
+181//Get the value of the attribute, if it exists
+182if(typeofsel.hasAttribute!=="undefined")
+183{
+184if(sel.hasAttribute(name))
+185{
+186oldVal=sel.getAttribute(name);
+187}
+188
+189doAttr=true;
+190}
+191elseif(typeofsel[name]!=="undefined")
+192{
+193oldVal=sel[name];
+194doAttr=false;
+195}
+196elseif(name==="class"&&typeofsel.className!=="undefined")//className attribute
+197{
+198name="className";
+199oldVal=sel.className;
+200doAttr=false;
+201}
+202
+203//Well, I guess that attribute doesn't exist
+204if(typeofoldVal==="undefined"&&(typeofvalue==="undefined"||value===null))
+205{
+206console.log(value);
+207console.log(sel);
+208console.log("Element does not have the selected attribute");
+209return;
+210}
+211
+212//No value to set? Return the current value
+213if(typeofvalue==="undefined")
+214{
+215returnoldVal;
+216}
+217
+218//Determine what to do with the attribute
+219if(typeofvalue!=="undefined"&&value!==null)
+220{
+221if(doAttr===true)
+222{
+223sel.setAttribute(name,value);
+224}
+225else
+226{
+227sel[name]=value;
+228}
+229}
+230elseif(value===null)
+231{
+232if(doAttr===true)
+233{
+234sel.removeAttribute(name);
+235}
+236else
+237{
+238deletesel[name];
+239}
+240}
+241
+242return(typeofvalue!=="undefined")?value:oldVal;
+243}
+244
+245function_toCamel(s)
+246{
+247returns.replace(/(\-[a-z])/g,function($1){
+248return$1.toUpperCase().replace('-','');
+249});
+250}
+251
+252function_css(sel,prop,val)
+253{
+254varequi;
+255
+256//Camel-case
+257prop=_toCamel(prop);
+258
+259//Equivalent properties for 'special' browsers
+260equi={
+261outerHeight:"offsetHeight",
+262outerWidth:"offsetWidth",
+263top:"posTop"
+264};
+265
+266
+267//If you don't define a value, try returning the existing value
+268if(typeofval==="undefined"&&sel.style[prop]!=="undefined")
+269{
+270returnsel.style[prop];
+271}
+272elseif(typeofval==="undefined"&&sel.style[equi[prop]]!=="undefined")
+273{
+274returnsel.style[equi[prop]];
+275}
+276
+277//Let's try the easy way first
+278if(typeofsel.style[prop]!=="undefined")
+279{
+280sel.style[prop]=val;
+281
+282//Short circuit
+283return;
+284}
+285elseif(sel.style[equi[prop]])
+286{
+287sel.style[equi[prop]]=val;
+288return;
+289}
+290
+291//No matches? Well, lets log it for now
+292console.log("Property "+prop+" nor an equivalent seems to exist");
+293}
+294
+295// --------------------------------------------------------------------------
+296
+297/**
+298 * DOM
+299 *
+300 * Dom manipulation module
+301 * @namespace
+302 * @memberOf $_
+303 * @name dom
+304 */
+305d={
+306/**
+307 * Adds a class to the element(s) specified by the current
+308 * selector
+309 *
+310 * @name addClass
+311 * @memberOf $_.dom
+312 * @function
+313 * @param string class
+314 * @return void
+315 */
+316addClass:function(c)
+317{
+318$_.each(function(e){
+319e.classList.add(c);
+320});
+321},
+322/**
+323 * Removes a class from the element(s) specified by the current
+324 * selector
+325 *
+326 * @name removeClass
+327 * @memberOf $_.dom
+328 * @function
+329 * @param string class
+330 * @return void
+331 */
+332removeClass:function(c)
+333{
+334$_.each(function(e){
+335e.classList.remove(c);
+336});
+337},
+338/**
+339 * Hides the element(s) specified by the current selector
+340 *
+341 * @name hide
+342 * @memberOf $_.dom
+343 * @function
+344 * @return void
+345 */
+346hide:function()
+347{
+348this.css('display','none');
+349},
+350/**
+351 * Shows the element(s) specified by the current selector.
+352 * if type is specified, the element will have it's style
+353 * property set to "display:[your type]". If type is not
+354 * specified, the element is set to "display:block".
+355 *
+356 * @name show
+357 * @memberOf $_.dom
+358 * @function
+359 * @param [string] type
+360 * @return void
+361 */
+362show:function(type)
+363{
+364if(typeoftype==="undefined")
+365{
+366type="block";
+367}
+368
+369this.css("display",type);
+370},
+371/**
+372 * Sets attributes on element(s) specified by the current
+373 * selector, or, if name is not specified, returns the
+374 * value of the attribute of the element specified by the
+375 * current selector.
+376 *
+377 * @name attr
+378 * @memberOf $_.dom
+379 * @function
+380 * @param string name
+381 * @param string value
+382 * @return string
+383 * @type string
+384 */
+385attr:function(name,value)
+386{
+387varsel=this.el;
+388
+389//Make sure you don't try to get a bunch of elements
+390if(sel.length>1&&typeofvalue==="undefined")
+391{
+392console.log(sel);
+393console.log("Must be a singular element");
+394return;
+395}
+396elseif(sel.length>1&&typeofvalue!=="undefined")//You can set a bunch, though
+397{
+398$_.each(function(e){
+399return_attr(e,name,value);
+400});
+401}
+402else//Normal behavior
+403{
+404return_attr(sel,name,value);
+405}
+406},
+407/**
+408 * Sets or retrieves the text content of the element
+409 * specified by the current selector. If a value is
+410 * passed, it will set that value on the current element,
+411 * otherwise it will return the value of the current element
+412 *
+413 * @name text
+414 * @memberOf $_.util
+415 * @function
+416 * @param [string] value
+417 * @returns string
+418 * @type string
+419 */
+420text:function(value)
+421{
+422varoldValue,set,type,sel;
+423
+424sel=this.el;
+425
+426set=(typeofvalue!=="undefined")?true:false;
+427
+428type=(typeofsel.innerText!=="undefined")
+429?"innerText"
+430:(typeofsel.textContent!=="undefined")
+431?"textContent"
+432:"innerHTML";
+433
+434oldValue=sel[type];
+435
+436if(set)
+437{
+438sel[type]=value;
+439returnvalue;
+440}
+441else
+442{
+443returnoldValue;
+444}
+445},
+446/**
+447 * Sets or retrieves a css property of the element
+448 * specified by the current selector. If a value is
+449 * passed, it will set that value on the current element,
+450 * otherwise it will return the value of the css property
+451 * on the current element
+452 *
+453 * @name css
+454 * @memberOf $_.util
+455 * @function
+456 * @param string property
+457 * @param [string] value
+458 * @returns string
+459 * @type string
+460 */
+461css:function(prop,val)
+462{
+463//Return the current value if a value is not set
+464if(typeofval==="undefined")
+465{
+466return_css(this.el,prop);
+467}
+468
+469$_.each(function(e){
+470_css(e,prop,val);
+471});
+472}
+473};
+474
+475$_.ext('dom',d);
+476
+477}());
+478
\ No newline at end of file
diff --git a/docs/symbols/src/kis-js_src_modules_ajax.js.html b/docs/symbols/src/kis-js_src_modules_ajax.js.html
new file mode 100755
index 0000000..957a9d8
--- /dev/null
+++ b/docs/symbols/src/kis-js_src_modules_ajax.js.html
@@ -0,0 +1,110 @@
+
\ No newline at end of file
diff --git a/docs/symbols/src/kis-js_src_modules_event.js.html b/docs/symbols/src/kis-js_src_modules_event.js.html
new file mode 100755
index 0000000..bbbba2e
--- /dev/null
+++ b/docs/symbols/src/kis-js_src_modules_event.js.html
@@ -0,0 +1,263 @@
+
1/**
+ 2 * Event
+ 3 *
+ 4 * Event api wrapper
+ 5 */
+ 6(function(){
+ 7
+ 8"use strict";
+ 9
+ 10// Property name for expandos on DOM objects
+ 11varkis_expando="KIS_0_5_0";
+ 12
+ 13var_attach,_remove,_add_remove,e,_attach_delegate;
+ 14
+ 15// Define the proper _attach and _remove functions
+ 16// based on browser support
+ 17if(typeofdocument.addEventListener!=="undefined")
+ 18{
+ 19/**
+ 20 * @private
+ 21 */
+ 22_attach=function(sel,event,callback)
+ 23{
+ 24if(typeofsel.addEventListener!=="undefined")
+ 25{
+ 26//Duplicated events are dropped, per the specification
+ 27sel.addEventListener(event,callback,false);
+ 28}
+ 29};
+ 30/**
+ 31 * @private
+ 32 */
+ 33_remove=function(sel,event,callback)
+ 34{
+ 35if(typeofsel.removeEventListener!=="undefined")
+ 36{
+ 37sel.removeEventListener(event,callback,false);
+ 38}
+ 39};
+ 40}
+ 41//typeof function doesn't work in IE where _attachEvent is available: brute force it
+ 42elseif(typeofdocument.attachEvent!=="undefined")
+ 43{
+ 44/**
+ 45 * @private
+ 46 */
+ 47_attach=function(sel,event,callback)
+ 48{
+ 49functionlistener(){
+ 50// Internet Explorer fails to correctly set the 'this' object
+ 51// for event listeners, so we need to set it ourselves.
+ 52callback.apply(arguments[0]);
+ 53}
+ 54
+ 55if(typeofsel.attachEvent!=="undefined")
+ 56{
+ 57_remove(event,callback);// Make sure we don't have duplicate listeners
+ 58
+ 59sel.attachEvent("on"+event,listener);
+ 60// Store our listener so we can _remove it later
+ 61varexpando=sel[kis_expando]=sel[kis_expando]||{};
+ 62expando.listeners=expando.listeners||{};
+ 63expando.listeners[event]=expando.listeners[event]||[];
+ 64expando.listeners[event].push({
+ 65callback:callback,
+ 66listener:listener
+ 67});
+ 68}
+ 69else
+ 70{
+ 71console.log("Failed to _attach event:"+event+" on "+sel);
+ 72}
+ 73};
+ 74/**
+ 75 * @private
+ 76 */
+ 77_remove=function(sel,event,callback)
+ 78{
+ 79if(typeofsel.detachEvent!=="undefined")
+ 80{
+ 81varexpando=sel[kis_expando];
+ 82if(expando&&expando.listeners
+ 83&&expando.listeners[event])
+ 84{
+ 85varlisteners=expando.listeners[event];
+ 86varlen=listeners.length;
+ 87for(vari=0;i<len;i++)
+ 88{
+ 89if(listeners[i].callback===callback)
+ 90{
+ 91sel.detachEvent("on"+event,listeners[i].listener);
+ 92listeners.splice(i,1);
+ 93if(listeners.length===0)
+ 94{
+ 95deleteexpando.listeners[event];
+ 96}
+ 97return;
+ 98}
+ 99}
+100}
+101}
+102};
+103}
+104
+105_add_remove=function(sel,event,callback,add)
+106{
+107vari,len;
+108
+109if(typeofsel==="undefined")
+110{
+111console.log(arguments);
+112console.log(event);
+113returnfalse;
+114}
+115
+116//Multiple events? Run recursively!
+117if(!event.match(/^([\w\-]+)$/))
+118{
+119event=event.split(" ");
+120
+121len=event.length;
+122
+123for(i=0;i<len;i++)
+124{
+125_add_remove(sel,event[i],callback,add);
+126}
+127
+128return;
+129}
+130
+131
+132if(add===true)
+133{
+134_attach(sel,event,callback);
+135}
+136else
+137{
+138_remove(sel,event,callback);
+139}
+140};
+141
+142_attach_delegate=function(sel,target,event,callback)
+143{
+144//_attach the listener to the parent object
+145_add_remove(target,event,function(e){
+146
+147vari,t;
+148
+149//Get the live version of the target selector
+150t=$_.$(target);
+151
+152console.log(t);
+153
+154//Check each element to see if it matches the target
+155for(iint)
+156{
+157if(t.hasOwnProperty(i))
+158{
+159//Fire target callback when event bubbles from target
+160if(e.target==i)
+161{
+162//Trigger the event callback
+163callback.call(i,e);
+164
+165//Stop event propegation
+166e.stopPropagation();
+167}
+168}
+169}
+170
+171
+172},true);
+173};
+174
+175// --------------------------------------------------------------------------
+176
+177/**
+178 * @namespace
+179 * @name event
+180 * @memberOf $_
+181 */
+182e={
+183/**
+184 * Adds an event that returns a callback when triggered on the selected
+185 * event and selector
+186 *
+187 * @memberOf $_.event
+188 * @name add
+189 * @function
+190 * @example Eg. $_("#selector").event.add("click", do_something());
+191 * @param string event
+192 * @param function callback
+193 * @return void
+194 */
+195add:function(event,callback)
+196{
+197$_.each(function(e){
+198_add_remove(e,event,callback,true);
+199});
+200},
+201/**
+202 * Removes an event bound the the specified selector, event type, and callback
+203 *
+204 * @memberOf $_.event
+205 * @name remove
+206 * @function
+207 * @example Eg. $_("#selector").event.remove("click", do_something());
+208 * @param string event
+209 * @param string callback
+210 * @return void
+211 */
+212remove:function(event,callback)
+213{
+214$_.each(function(e){
+215_add_remove(e,event,callback,false);
+216});
+217},
+218/**
+219 * Binds a persistent, delegated event
+220 *
+221 * @memberOf $_.event
+222 * @name live
+223 * @function
+224 * @example Eg. $_.event.live(".button", "click", do_something());
+225 * @param string target
+226 * @param string event
+227 * @param function callback
+228 * @return void
+229 */
+230live:function(target,event,callback)
+231{
+232_attach_delegate(document.documentElement,target,event,callback);
+233},
+234/**
+235 * Binds an event to a parent object
+236 *
+237 * @memberOf $_.event
+238 * @name delegate
+239 * @function
+240 * @example Eg. $_("#parent").delegate(".button", "click", do_something());
+241 * @param string target
+242 * @param string event_type
+243 * @parma function callback
+244 * @return void
+245 */
+246delegate:function(target,event,callback)
+247{
+248$_.each(function(e){
+249_attach_delegate(e,target,event,callback);
+250});
+251}
+252};
+253
+254$_.ext('event',e);
+255
+256}());
\ No newline at end of file
diff --git a/docs/symbols/src/kis-js_src_modules_store.js.html b/docs/symbols/src/kis-js_src_modules_store.js.html
new file mode 100755
index 0000000..8778919
--- /dev/null
+++ b/docs/symbols/src/kis-js_src_modules_store.js.html
@@ -0,0 +1,94 @@
+
1(function(){
+ 2"use strict";
+ 3
+ 4/**
+ 5 * Wrapper for localstorage data serialization
+ 6 *
+ 7 * @name store
+ 8 * @namespace
+ 9 * @memberOf $_
+ 10 */
+ 11varstore={
+ 12/**
+ 13 * Retrieves and deserializes a value from localstorage,
+ 14 * based on the specified key
+ 15 *
+ 16 * @param string key
+ 17 * @name get
+ 18 * @memberOf $_.store
+ 19 * @function
+ 20 * @return object
+ 21 */
+ 22get:function(key)
+ 23{
+ 24returnJSON.parse(localStorage.getItem(key));
+ 25},
+ 26/**
+ 27 * Puts a value into localstorage at the specified key,
+ 28 * and JSON-encodes the value if not a string
+ 29 *
+ 30 * @param string key
+ 31 * @param mixed value
+ 32 * @name set
+ 33 * @memberOf $_.store
+ 34 * @function
+ 35 * @return void
+ 36 */
+ 37set:function(key,value)
+ 38{
+ 39if(typeofvalue!=="string")
+ 40{
+ 41value=JSON.stringify(value);
+ 42}
+ 43localStorage.setItem(key,value);
+ 44},
+ 45/**
+ 46 * Removes the specified item from localstorage
+ 47 *
+ 48 * @param string key
+ 49 * @name remove
+ 50 * @memberOf $_.store
+ 51 * @function
+ 52 * @return void
+ 53 */
+ 54remove:function(key)
+ 55{
+ 56localStorage.removeItem(key);
+ 57},
+ 58/**
+ 59 * Returns an array of all the values in localstorage
+ 60 * in their raw form
+ 61 *
+ 62 * @name getAll
+ 63 * @member of $_.store
+ 64 * @function
+ 65 * @return object
+ 66 */
+ 67getAll:function()
+ 68{
+ 69vari,
+ 70len,
+ 71data;
+ 72len=localStorage.length;
+ 73data={};
+ 74
+ 75for(i=0;i<len;i++)
+ 76{
+ 77varname=localStorage.key(i);
+ 78varvalue=localStorage.getItem(name);
+ 79data[name]=value;
+ 80}
+ 81
+ 82returndata;
+ 83}
+ 84};
+ 85
+ 86$_.ext('store',store);
+ 87}());
\ No newline at end of file
diff --git a/docs/symbols/src/kis-js_src_modules_util.js.html b/docs/symbols/src/kis-js_src_modules_util.js.html
new file mode 100755
index 0000000..4a18275
--- /dev/null
+++ b/docs/symbols/src/kis-js_src_modules_util.js.html
@@ -0,0 +1,369 @@
+
1/**
+ 2 * Util Object
+ 3 *
+ 4 * Various object and string manipulation functions
+ 5 * Note: these are based on similar phpjs functions: http://phpjs.org
+ 6 */
+ 7(function(){
+ 8
+ 9"use strict";
+ 10
+ 11var
+ 12reverse_key_sort=function(o)
+ 13{
+ 14//Define some variables
+ 15varkeys=[],
+ 16num_keys=0,
+ 17new_o={},
+ 18i;
+ 19
+ 20//Extract the keys
+ 21keys=u.object_keys(o);
+ 22
+ 23//Sort the keys
+ 24keys.sort(function(b,a){
+ 25varaFloat=parseFloat(a),
+ 26bFloat=parseFloat(b),
+ 27aNumeric=aFloat+''===a,
+ 28bNumeric=bFloat+''===b;
+ 29
+ 30if(aNumeric&&bNumeric)
+ 31{
+ 32returnaFloat>bFloat?1:aFloat<bFloat?-1:0;
+ 33}
+ 34elseif(aNumeric&&!bNumeric)
+ 35{
+ 36return1;
+ 37}
+ 38elseif(!aNumeric&&bNumeric)
+ 39{
+ 40return-1;
+ 41}
+ 42
+ 43returna>b?1:a<b?-1:0;
+ 44});
+ 45
+ 46//cache object/array size
+ 47num_keys=keys.length;
+ 48
+ 49//Recreate the object/array
+ 50for(i=0;i<num_keys;i++)
+ 51{
+ 52new_o[keys[i]]=o[keys[i]];
+ 53}
+ 54
+ 55returnnew_o;
+ 56},
+ 57
+ 58/**
+ 59 * String and object manipulation utilities
+ 60 *
+ 61 * @namespace
+ 62 * @name util
+ 63 * @memberOf $_
+ 64 */
+ 65u={
+ 66/**
+ 67 * Retrieve the keys, or member names of an object
+ 68 *
+ 69 * @name object_keys
+ 70 * @memberOf $_.util
+ 71 * @function
+ 72 * @param object
+ 73 * @return array
+ 74 * @type array
+ 75 */
+ 76object_keys:function(o)
+ 77{
+ 78varkeys=[],
+ 79k;
+ 80
+ 81for(kino)
+ 82{
+ 83if(o.hasOwnProperty(k))
+ 84{
+ 85keys.push(k);
+ 86}
+ 87}
+ 88
+ 89returnkeys;
+ 90},
+ 91/**
+ 92 * Retrieves the values of an object, and returns
+ 93 * them as an array
+ 94 *
+ 95 * @name object_values
+ 96 * @memberOf $_.util
+ 97 * @function
+ 98 * @param object
+ 99 * @return array
+100 * @type array
+101 */
+102object_values:function(o)
+103{
+104varvals=[],
+105prop;
+106
+107for(propino)
+108{
+109vals.push(o[prop]);
+110}
+111
+112returnvals;
+113},
+114/**
+115 * Creates an object, with the property names of the first array,
+116 * and the values of the second. If objects are passed, the values
+117 * of the object are used. If the arrays or objects passed are
+118 * not the same size, the function will return false.
+119 *
+120 * @name array_combine
+121 * @memberOf $_.util
+122 * @function
+123 * @param array/object keys
+124 * @param array/object vals
+125 * @return object
+126 * @type object
+127 */
+128array_combine:function(keys,vals)
+129{
+130varnew_object={},
+131num_keys,
+132i=0;
+133
+134//Extract the keys or values if needed
+135if($_.type(keys)!=="array")
+136{
+137keys=this.object_values(keys);
+138}
+139if($_.type(vals)!=="array")
+140{
+141vals=this.object_values(vals);
+142}
+143
+144//cache the number of keys
+145num_keys=keys.length;
+146
+147if(num_keys!==vals.length)
+148{
+149console.log("Object combine requires two arrays of the same size");
+150returnfalse;
+151}
+152
+153//Create and return the new object
+154for(i=0;i<num_keys;i++)
+155{
+156new_object[keys[i]]=vals[i];
+157}
+158
+159returnnew_object;
+160},
+161/**
+162 * Combines two or more objects/arrays. If the keys are numeric, the outputted
+163 * object will have re-indexed keys. If a key/value pair exists in both objects,
+164 * indentical values will be droped, but if a key exists with a different value,
+165 * with the same key, the value in the second array will replace the value in the
+166 * first
+167 *
+168 * @name object_merge
+169 * @memberOf $_.util
+170 * @function
+171 * @param object [as many as you wish to combine]
+172 * @type object
+173 * @return object
+174 */
+175object_merge:function()
+176{
+177varargs=Array.prototype.slice.call(arguments),
+178arg_len=args.length,
+179new_obj={},
+180arg,
+181iarg_len=0,
+182i,
+183j,
+184x,
+185is_array=true;
+186
+187//Check for an array in the arguments
+188for(i=0;i<arg_len;i++)
+189{
+190if($_.type(args[i])!=="array")
+191{
+192is_array=false;
+193break;
+194}
+195}
+196
+197//If all the arguments are javascript arrays
+198if(is_array)
+199{
+200new_obj=[];
+201//Let javascript do all the work!
+202for(i=0;i<arg_len;i++)
+203{
+204new_obj=new_obj.contact(args[i]);
+205}
+206
+207//Return early
+208returnnew_obj;
+209}
+210
+211//No, there's at least one object
+212for(i=0,x=0;i<arg_len;i++)
+213{
+214arg=args[i];
+215
+216// If the argument is an array, add the array items as
+217// numeric object properties
+218if($_.type(arg)=="array")
+219{
+220for(j=0,iarg_len=arg.length;j<iarg_len;j++)
+221{
+222new_obj[x++]=arg[j];
+223}
+224}
+225else
+226{
+227for(jinarg)
+228{
+229if(arg.hasOwnProperty(j))
+230{
+231// If the key is numeric, add the property with
+232// a numeric key
+233if(parseInt(j,10)+''===j)
+234{
+235new_obj[x++]=arg[j];
+236}
+237else
+238{
+239new_obj[j]=arg[j];
+240}
+241}
+242}
+243}
+244}
+245
+246returnnew_obj;
+247},
+248/**
+249 * Replaces sections of strings in a greedy fashion,
+250 * starting with the longest replace pairs first. Accepts
+251 * one replace pair as two parameters, or an object, with
+252 * from => to replacements as key/value pairs
+253 *
+254 * @name str_trans
+255 * @memberOf $_.util
+256 * @function
+257 * @param string input_string
+258 * @param mixed
+259 * @param [string] to
+260 * @return string
+261 * @type string
+262 */
+263str_trans:function(str,from,to)
+264{
+265varfroms=[],
+266tos=[],
+267ret='',
+268match=false,
+269from_len=0,
+270str_len=0,
+271to_len=0,
+272to_is_str='',
+273from_is_str='',
+274strx='',
+275strw='',
+276stry='',
+277from_strx='',
+278new_str='',
+279f,
+280i,
+281j;
+282
+283//Replace pairs? add them to the internal arrays
+284if(typeoffrom==='object')
+285{
+286// Sort the keys in descending order for better
+287// replacement functionality
+288from=reverse_key_sort(from);
+289
+290for(finfrom)
+291{
+292if(from.hasOwnProperty(f))
+293{
+294froms.push(f);
+295tos.push(from[f]);
+296}
+297}
+298
+299from=froms;
+300to=tos;
+301}
+302
+303//Go through the string, and replace characters as needed
+304str_len=str.length;
+305from_len=from.length;
+306to_len=to.length;
+307to_is_str=typeofto==='string';
+308from_is_str=typeoffrom==='string';
+309
+310for(i=0;i<str_len;i++)
+311{
+312match=false;
+313if(from_is_str)
+314{
+315strw=str.charAt(i-1);
+316strx=str.charAt(i);
+317stry=str.charAt(i+1);
+318for(j=0;j<from_len;j++)
+319{
+320if(strx==from.charAt(j))
+321{
+322match=true;
+323break;
+324}
+325}
+326}
+327else
+328{
+329for(j=0;j<from_len;j++)
+330{
+331if(str.substr(i,from[j].length)==from[j])
+332{
+333match=true;
+334
+335//Go past the current match
+336i=(i+from[j].length)-1;
+337break;
+338
+339}
+340}
+341}
+342
+343if(match)
+344{
+345new_str+=(to_is_str)?to.charAt(j):to[j];
+346}
+347else
+348{
+349new_str+=str.charAt(i);
+350}
+351}
+352
+353returnnew_str;
+354
+355}
+356};
+357
+358//Add it to the $_ object
+359$_.ext('util',u);
+360}());
+361
+362