From 3f3956a3458d3b45e8f494f752e7b3b87dcaeff6 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Fri, 6 Apr 2012 10:40:53 -0400 Subject: [PATCH] Misc cleanup --- docs/files.html | 2 +- docs/index.html | 2 +- docs/symbols/$_.dom.html | 2 +- docs/symbols/$_.event.html | 2 +- docs/symbols/$_.html | 2 +- docs/symbols/$_.store.html | 2 +- docs/symbols/$_.util.html | 2 +- docs/symbols/_global_.html | 2 +- docs/symbols/src/kis-js_src_core.js.html | 2 +- .../src/kis-js_src_modules_ajax.js.html | 4 +- kis-all.js | 122 +----------------- kis-lite-dom-min.js | 2 +- kis-lite-dom.js | 6 +- kis-lite-min.js | 2 +- kis-lite.js | 6 +- kis-min.js | 41 +++--- src/core.js | 2 +- src/modules/ajax.js | 4 +- tests/index.html | 2 +- 19 files changed, 46 insertions(+), 163 deletions(-) diff --git a/docs/files.html b/docs/files.html index ab0a978..52f1e19 100755 --- a/docs/files.html +++ b/docs/files.html @@ -1 +1 @@ -JsDoc Reference - File Index
 
Project Outline
 
$_
$(string, object)
ext(string, object)
each(function)
type(mixed)
get(string, object, function)
post(string, object, function)
sse(string, function, int)
addClass(string)
removeClass(string)
show(string)
attr(string, string)
text(string)
css(string, string)
append(string)
prepend(string)
html(string)
add(string, function)
remove(string, string)
live(string, string, function)
delegate(string, string, function)
connect(string, int, function)
create_store(string, string, bool)
delete_store(string)
get(string, bool)
set(string, mixed, bool)
remove(string, bool)
getAll(bool)
clear(bool)
object_keys(object)
array_combine(array/object, array/object)
object_merge(object)
str_trans(string, mixed, string)
«
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
indexedDB.js../kis-js/src/modules/event.js
store.js../kis-js/src/modules/event.js
util.js../kis-js/src/modules/event.js
\ No newline at end of file +JsDoc Reference - File Index
 
Project Outline
 
$_
$(string, object)
ext(string, object)
each(function)
type(mixed)
get(string, object, function)
post(string, object, function)
sse(string, function, int)
addClass(string)
removeClass(string)
show(string)
attr(string, string)
text(string)
css(string, string)
append(string)
prepend(string)
html(string)
add(string, function)
remove(string, string)
live(string, string, function)
delegate(string, string, function)
get(string, bool)
set(string, mixed, bool)
remove(string, bool)
getAll(bool)
clear(bool)
object_keys(object)
array_combine(array/object, array/object)
object_merge(object)
str_trans(string, mixed, string)
«
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
util.js../kis-js/src/modules/event.js
\ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 965cc32..340720e 100755 --- a/docs/index.html +++ b/docs/index.html @@ -1 +1 @@ -JsDoc Reference - Index
 
Project Outline
 
$_
$(string, object)
ext(string, object)
each(function)
type(mixed)
get(string, object, function)
post(string, object, function)
sse(string, function, int)
addClass(string)
removeClass(string)
show(string)
attr(string, string)
text(string)
css(string, string)
append(string)
prepend(string)
html(string)
add(string, function)
remove(string, string)
live(string, string, function)
delegate(string, string, function)
connect(string, int, function)
create_store(string, string, bool)
delete_store(string)
get(string, bool)
set(string, mixed, bool)
remove(string, bool)
getAll(bool)
clear(bool)
object_keys(object)
array_combine(array/object, array/object)
object_merge(object)
str_trans(string, mixed, string)
«
Kis JS Docs

Class Index

_global_

Global namespace.

\ No newline at end of file +JsDoc Reference - Index
 
Project Outline
 
$_
$(string, object)
ext(string, object)
each(function)
type(mixed)
get(string, object, function)
post(string, object, function)
sse(string, function, int)
addClass(string)
removeClass(string)
show(string)
attr(string, string)
text(string)
css(string, string)
append(string)
prepend(string)
html(string)
add(string, function)
remove(string, string)
live(string, string, function)
delegate(string, string, function)
get(string, bool)
set(string, mixed, bool)
remove(string, bool)
getAll(bool)
clear(bool)
object_keys(object)
array_combine(array/object, array/object)
object_merge(object)
str_trans(string, mixed, string)
«
Kis JS Docs

Class Index

_global_

Global namespace.

\ No newline at end of file diff --git a/docs/symbols/$_.dom.html b/docs/symbols/$_.dom.html index a0c69b9..cb98a9f 100755 --- a/docs/symbols/$_.dom.html +++ b/docs/symbols/$_.dom.html @@ -1 +1 @@ -JsDoc Reference - $_.dom
 
Project Outline
 
$_
$(string, object)
ext(string, object)
each(function)
type(mixed)
get(string, object, function)
post(string, object, function)
sse(string, function, int)
addClass(string)
removeClass(string)
show(string)
attr(string, string)
text(string)
css(string, string)
append(string)
prepend(string)
html(string)
add(string, function)
remove(string, string)
live(string, string, function)
delegate(string, string, function)
connect(string, int, function)
create_store(string, string, bool)
delete_store(string)
get(string, bool)
set(string, mixed, bool)
remove(string, bool)
getAll(bool)
clear(bool)
object_keys(object)
array_combine(array/object, array/object)
object_merge(object)
str_trans(string, mixed, string)
«
Kis JS Docs

Module $_.dom

Defined in: DOM.js.

Method Summary
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.
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.
append(string)Adds to the innerHTML of the current element, after the last child.
prepend(string)Adds to the innerHTML of the selected element, before the current children
html(string)Sets or gets the innerHTML propery of the element(s) passed
Method Detail
$_.dom.addClass(string)
Adds a class to the element(s) specified by the current selector
Parameters:
string class
$_.dom.removeClass(string)
Removes a class from the element(s) specified by the current selector
Parameters:
string class
$_.dom.hide()
Hides the element(s) specified by the current selector
$_.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
$_.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?, Default: value
Returns:
string
$_.dom.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
Parameters:
string?, Default: value
Returns:
string
$_.dom.css(string, string): 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
Parameters:
string property
string?, Default: value
Returns:
string
$_.dom.append(string)
Adds to the innerHTML of the current element, after the last child.
$_("ul").dom.append("<li></li>") adds an li element to the end of the selected ul element
Parameters:
string htm
$_.dom.prepend(string)
Adds to the innerHTML of the selected element, before the current children
Parameters:
string htm
$_.dom.html(string): string
Sets or gets the innerHTML propery of the element(s) passed
Parameters:
string?, Default: htm
Returns:
string
\ No newline at end of file +JsDoc Reference - $_.dom
 
Project Outline
 
$_
$(string, object)
ext(string, object)
each(function)
type(mixed)
get(string, object, function)
post(string, object, function)
sse(string, function, int)
addClass(string)
removeClass(string)
show(string)
attr(string, string)
text(string)
css(string, string)
append(string)
prepend(string)
html(string)
add(string, function)
remove(string, string)
live(string, string, function)
delegate(string, string, function)
get(string, bool)
set(string, mixed, bool)
remove(string, bool)
getAll(bool)
clear(bool)
object_keys(object)
array_combine(array/object, array/object)
object_merge(object)
str_trans(string, mixed, string)
«
Kis JS Docs

Module $_.dom

Defined in: DOM.js.

Method Summary
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.
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.
append(string)Adds to the innerHTML of the current element, after the last child.
prepend(string)Adds to the innerHTML of the selected element, before the current children
html(string)Sets or gets the innerHTML propery of the element(s) passed
Method Detail
$_.dom.addClass(string)
Adds a class to the element(s) specified by the current selector
Parameters:
string class
$_.dom.removeClass(string)
Removes a class from the element(s) specified by the current selector
Parameters:
string class
$_.dom.hide()
Hides the element(s) specified by the current selector
$_.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
$_.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?, Default: value
Returns:
string
$_.dom.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
Parameters:
string?, Default: value
Returns:
string
$_.dom.css(string, string): 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
Parameters:
string property
string?, Default: value
Returns:
string
$_.dom.append(string)
Adds to the innerHTML of the current element, after the last child.
$_("ul").dom.append("<li></li>") adds an li element to the end of the selected ul element
Parameters:
string htm
$_.dom.prepend(string)
Adds to the innerHTML of the selected element, before the current children
Parameters:
string htm
$_.dom.html(string): string
Sets or gets the innerHTML propery of the element(s) passed
Parameters:
string?, Default: htm
Returns:
string
\ No newline at end of file diff --git a/docs/symbols/$_.event.html b/docs/symbols/$_.event.html index 27a0503..5b60aff 100755 --- a/docs/symbols/$_.event.html +++ b/docs/symbols/$_.event.html @@ -1 +1 @@ -JsDoc Reference - $_.event
 
Project Outline
 
$_
$(string, object)
ext(string, object)
each(function)
type(mixed)
get(string, object, function)
post(string, object, function)
sse(string, function, int)
addClass(string)
removeClass(string)
show(string)
attr(string, string)
text(string)
css(string, string)
append(string)
prepend(string)
html(string)
add(string, function)
remove(string, string)
live(string, string, function)
delegate(string, string, function)
connect(string, int, function)
create_store(string, string, bool)
delete_store(string)
get(string, bool)
set(string, mixed, bool)
remove(string, bool)
getAll(bool)
clear(bool)
object_keys(object)
array_combine(array/object, array/object)
object_merge(object)
str_trans(string, mixed, string)
«
Kis JS Docs

Module $_.event

Defined in: event.js.

Method Summary
add(string, function)Adds an event that returns a callback when triggered on the selected event and selector
remove(string, string)Removes an event bound the the specified selector, event type, and callback
live(string, string, function)Binds a persistent event to the document
delegate(string, string, function)Binds an event to a parent object
Method Detail
$_.event.add(string, function)
Adds an event that returns a callback when triggered on the selected event and selector
Eg. $_("#selector").event.add("click", do_something());
Parameters:
string event
function callback
$_.event.remove(string, string)
Removes an event bound the the specified selector, event type, and callback
Eg. $_("#selector").event.remove("click", do_something());
Parameters:
string event
string callback
$_.event.live(string, string, function)
Binds a persistent event to the document
Eg. $_.event.live(".button", "click", do_something());
Parameters:
string target
string event
function callback
$_.event.delegate(string, string, function)
Binds an event to a parent object
Eg. $_("#parent").delegate(".button", "click", do_something());
Parameters:
string target
string event_type
function callback
\ No newline at end of file +JsDoc Reference - $_.event
 
Project Outline
 
$_
$(string, object)
ext(string, object)
each(function)
type(mixed)
get(string, object, function)
post(string, object, function)
sse(string, function, int)
addClass(string)
removeClass(string)
show(string)
attr(string, string)
text(string)
css(string, string)
append(string)
prepend(string)
html(string)
add(string, function)
remove(string, string)
live(string, string, function)
delegate(string, string, function)
get(string, bool)
set(string, mixed, bool)
remove(string, bool)
getAll(bool)
clear(bool)
object_keys(object)
array_combine(array/object, array/object)
object_merge(object)
str_trans(string, mixed, string)
«
Kis JS Docs

Module $_.event

Defined in: event.js.

Method Summary
add(string, function)Adds an event that returns a callback when triggered on the selected event and selector
remove(string, string)Removes an event bound the the specified selector, event type, and callback
live(string, string, function)Binds a persistent event to the document
delegate(string, string, function)Binds an event to a parent object
Method Detail
$_.event.add(string, function)
Adds an event that returns a callback when triggered on the selected event and selector
Eg. $_("#selector").event.add("click", do_something());
Parameters:
string event
function callback
$_.event.remove(string, string)
Removes an event bound the the specified selector, event type, and callback
Eg. $_("#selector").event.remove("click", do_something());
Parameters:
string event
string callback
$_.event.live(string, string, function)
Binds a persistent event to the document
Eg. $_.event.live(".button", "click", do_something());
Parameters:
string target
string event
function callback
$_.event.delegate(string, string, function)
Binds an event to a parent object
Eg. $_("#parent").delegate(".button", "click", do_something());
Parameters:
string target
string event_type
function callback
\ No newline at end of file diff --git a/docs/symbols/$_.html b/docs/symbols/$_.html index 30f34b7..a6aa548 100755 --- a/docs/symbols/$_.html +++ b/docs/symbols/$_.html @@ -1 +1 @@ -JsDoc Reference - $_
 
Project Outline
 
$_
$(string, object)
ext(string, object)
each(function)
type(mixed)
get(string, object, function)
post(string, object, function)
sse(string, function, int)
addClass(string)
removeClass(string)
show(string)
attr(string, string)
text(string)
css(string, string)
append(string)
prepend(string)
html(string)
add(string, function)
remove(string, string)
live(string, string, function)
delegate(string, string, function)
connect(string, int, function)
create_store(string, string, bool)
delete_store(string)
get(string, bool)
set(string, mixed, bool)
remove(string, bool)
getAll(bool)
clear(bool)
object_keys(object)
array_combine(array/object, array/object)
object_merge(object)
str_trans(string, mixed, string)
«
Kis JS Docs

Module $_

Defined in: core.js.

Field Summary
domDOM Dom manipulation module
storeWrapper for localstorage / sessionstorage data serialization.
indexedDBModule for simplifying Indexed DB access
utilString and object manipulation utilities
eventEvent Listener module
Method Summary
$(string, object)Simple DOM selector function
ext(string, object)Adds the property `obj` to the $_ object, calling it `name`
each(function)Iterates over a $_ object, applying a callback to each item
type(mixed)Retrieves the type of the passed variable
get(string, object, function)Sends a GET type ajax request
post(string, object, function)Sends a POST type ajax request
sse(string, function, int)Watches for server-sent events, or falls back to ajax polling - defaults to 30 second intervals
Field Detail
$_.dom
DOM Dom manipulation module

Defined in: DOM.js.

$_.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.

Defined in: store.js.

$_.indexedDB
Module for simplifying Indexed DB access

Defined in: indexedDB.js.

$_.util
String and object manipulation utilities

Defined in: util.js.

$_.event
Event Listener module

Defined in: event.js.

Method Detail
$_.$(string, object): object
Simple DOM selector function
Parameters:
string selector
object context
Returns:
object
$_.ext(string, object)
Adds the property `obj` to the $_ object, calling it `name`
Parameters:
string name
object obj
$_.each(function)
Iterates over a $_ object, applying a callback to each item
Parameters:
function callback
$_.type(mixed): string
Retrieves the type of the passed variable
Parameters:
mixed obj
Returns:
string
$_.get(string, object, function)
Sends a GET type ajax request

Defined in: ajax.js.

Parameters:
string url
object data
function callback
$_.post(string, object, function)
Sends a POST type ajax request

Defined in: ajax.js.

Parameters:
string url
object data
function callback
$_.sse(string, function, int)
Watches for server-sent events, or falls back to ajax polling - defaults to 30 second intervals

Defined in: ajax.js.

Parameters:
string url
function callback
int?, Default: 30000
\ No newline at end of file +JsDoc Reference - $_
 
Project Outline
 
$_
$(string, object)
ext(string, object)
each(function)
type(mixed)
get(string, object, function)
post(string, object, function)
sse(string, function, int)
addClass(string)
removeClass(string)
show(string)
attr(string, string)
text(string)
css(string, string)
append(string)
prepend(string)
html(string)
add(string, function)
remove(string, string)
live(string, string, function)
delegate(string, string, function)
get(string, bool)
set(string, mixed, bool)
remove(string, bool)
getAll(bool)
clear(bool)
object_keys(object)
array_combine(array/object, array/object)
object_merge(object)
str_trans(string, mixed, string)
«
Kis JS Docs

Module $_

Defined in: core.js.

Field Summary
domDOM Dom manipulation module
storeWrapper for localstorage / sessionstorage data serialization.
utilString and object manipulation utilities
eventEvent Listener module
Method Summary
$(string, object)Simple DOM selector function
ext(string, object)Adds the property `obj` to the $_ object, calling it `name`
each(function)Iterates over a $_ object, applying a callback to each item
type(mixed)Retrieves the type of the passed variable
get(string, object, function)Sends a GET type ajax request
post(string, object, function)Sends a POST type ajax request
sse(string, function, int)Watches for server-sent events, or falls back to ajax polling - defaults to 30 second intervals
Field Detail
$_.dom
DOM Dom manipulation module

Defined in: DOM.js.

$_.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.

Defined in: store.js.

$_.util
String and object manipulation utilities

Defined in: util.js.

$_.event
Event Listener module

Defined in: event.js.

Method Detail
$_.$(string, object): object
Simple DOM selector function
Parameters:
string selector
object context
Returns:
object
$_.ext(string, object)
Adds the property `obj` to the $_ object, calling it `name`
Parameters:
string name
object obj
$_.each(function)
Iterates over a $_ object, applying a callback to each item
Parameters:
function callback
$_.type(mixed): string
Retrieves the type of the passed variable
Parameters:
mixed obj
Returns:
string
$_.get(string, object, function)
Sends a GET type ajax request

Defined in: ajax.js.

Parameters:
string url
object data
function callback
$_.post(string, object, function)
Sends a POST type ajax request

Defined in: ajax.js.

Parameters:
string url
object data
function callback
$_.sse(string, function, int)
Watches for server-sent events, or falls back to ajax polling - defaults to 30 second intervals

Defined in: ajax.js.

Parameters:
string url
function callback
int?, Default: 30000
\ No newline at end of file diff --git a/docs/symbols/$_.store.html b/docs/symbols/$_.store.html index 72ae61a..391a4aa 100755 --- a/docs/symbols/$_.store.html +++ b/docs/symbols/$_.store.html @@ -1 +1 @@ -JsDoc Reference - $_.store
 
Project Outline
 
$_
$(string, object)
ext(string, object)
each(function)
type(mixed)
get(string, object, function)
post(string, object, function)
sse(string, function, int)
addClass(string)
removeClass(string)
show(string)
attr(string, string)
text(string)
css(string, string)
append(string)
prepend(string)
html(string)
add(string, function)
remove(string, string)
live(string, string, function)
delegate(string, string, function)
connect(string, int, function)
create_store(string, string, bool)
delete_store(string)
get(string, bool)
set(string, mixed, bool)
remove(string, bool)
getAll(bool)
clear(bool)
object_keys(object)
array_combine(array/object, array/object)
object_merge(object)
str_trans(string, mixed, string)
«
Kis JS Docs

Module $_.store

Defined in: store.js.

Method Summary
get(string, bool)Retrieves and deserializes a value from localstorage, based on the specified key
set(string, mixed, bool)Puts a value into localstorage at the specified key, and JSON-encodes the value if not a string
remove(string, bool)Removes the specified item from storage
getAll(bool)Returns an object of all the raw values in storage
clear(bool)Removes all values from the same domain storage
Method Detail
$_.store.get(string, bool): object
Retrieves and deserializes a value from localstorage, based on the specified key
Parameters:
string key
bool session
Returns:
object
$_.store.set(string, mixed, bool)
Puts a value into localstorage at the specified key, and JSON-encodes the value if not a string
Parameters:
string key
mixed value
bool session
$_.store.remove(string, bool)
Removes the specified item from storage
Parameters:
string key
bool session
$_.store.getAll(bool): object
Returns an object of all the raw values in storage
Parameters:
bool session
Returns:
object
$_.store.clear(bool)
Removes all values from the same domain storage
Parameters:
bool session
\ No newline at end of file +JsDoc Reference - $_.store
 
Project Outline
 
$_
$(string, object)
ext(string, object)
each(function)
type(mixed)
get(string, object, function)
post(string, object, function)
sse(string, function, int)
addClass(string)
removeClass(string)
show(string)
attr(string, string)
text(string)
css(string, string)
append(string)
prepend(string)
html(string)
add(string, function)
remove(string, string)
live(string, string, function)
delegate(string, string, function)
get(string, bool)
set(string, mixed, bool)
remove(string, bool)
getAll(bool)
clear(bool)
object_keys(object)
array_combine(array/object, array/object)
object_merge(object)
str_trans(string, mixed, string)
«
Kis JS Docs

Module $_.store

Defined in: store.js.

Method Summary
get(string, bool)Retrieves and deserializes a value from localstorage, based on the specified key
set(string, mixed, bool)Puts a value into localstorage at the specified key, and JSON-encodes the value if not a string
remove(string, bool)Removes the specified item from storage
getAll(bool)Returns an object of all the raw values in storage
clear(bool)Removes all values from the same domain storage
Method Detail
$_.store.get(string, bool): object
Retrieves and deserializes a value from localstorage, based on the specified key
Parameters:
string key
bool session
Returns:
object
$_.store.set(string, mixed, bool)
Puts a value into localstorage at the specified key, and JSON-encodes the value if not a string
Parameters:
string key
mixed value
bool session
$_.store.remove(string, bool)
Removes the specified item from storage
Parameters:
string key
bool session
$_.store.getAll(bool): object
Returns an object of all the raw values in storage
Parameters:
bool session
Returns:
object
$_.store.clear(bool)
Removes all values from the same domain storage
Parameters:
bool session
\ No newline at end of file diff --git a/docs/symbols/$_.util.html b/docs/symbols/$_.util.html index 3e6924a..2fe2a1f 100755 --- a/docs/symbols/$_.util.html +++ b/docs/symbols/$_.util.html @@ -1 +1 @@ -JsDoc Reference - $_.util
 
Project Outline
 
$_
$(string, object)
ext(string, object)
each(function)
type(mixed)
get(string, object, function)
post(string, object, function)
sse(string, function, int)
addClass(string)
removeClass(string)
show(string)
attr(string, string)
text(string)
css(string, string)
append(string)
prepend(string)
html(string)
add(string, function)
remove(string, string)
live(string, string, function)
delegate(string, string, function)
connect(string, int, function)
create_store(string, string, bool)
delete_store(string)
get(string, bool)
set(string, mixed, bool)
remove(string, bool)
getAll(bool)
clear(bool)
object_keys(object)
array_combine(array/object, array/object)
object_merge(object)
str_trans(string, mixed, string)
«
Kis JS Docs

Module $_.util

Defined in: util.js.

Method Summary
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.object_keys(object): array
Retrieve the keys, or member names of an object
Parameters:
object
Returns:
array
$_.util.object_values(object): array
Retrieves the values of an object, and returns them as an array
Parameters:
object
Returns:
array
$_.util.array_combine(array/object, array/object): object
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
Parameters:
object [as many as you wish to combine]
Returns:
object
$_.util.str_trans(string, mixed, string): string
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 from (string)/replace pairs (object)
string?, Default:
Returns:
string
\ No newline at end of file +JsDoc Reference - $_.util
 
Project Outline
 
$_
$(string, object)
ext(string, object)
each(function)
type(mixed)
get(string, object, function)
post(string, object, function)
sse(string, function, int)
addClass(string)
removeClass(string)
show(string)
attr(string, string)
text(string)
css(string, string)
append(string)
prepend(string)
html(string)
add(string, function)
remove(string, string)
live(string, string, function)
delegate(string, string, function)
get(string, bool)
set(string, mixed, bool)
remove(string, bool)
getAll(bool)
clear(bool)
object_keys(object)
array_combine(array/object, array/object)
object_merge(object)
str_trans(string, mixed, string)
«
Kis JS Docs

Module $_.util

Defined in: util.js.

Method Summary
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.object_keys(object): array
Retrieve the keys, or member names of an object
Parameters:
object
Returns:
array
$_.util.object_values(object): array
Retrieves the values of an object, and returns them as an array
Parameters:
object
Returns:
array
$_.util.array_combine(array/object, array/object): object
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
Parameters:
object [as many as you wish to combine]
Returns:
object
$_.util.str_trans(string, mixed, string): string
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 from (string)/replace pairs (object)
string?, Default:
Returns:
string
\ No newline at end of file diff --git a/docs/symbols/_global_.html b/docs/symbols/_global_.html index d00b041..91dee21 100755 --- a/docs/symbols/_global_.html +++ b/docs/symbols/_global_.html @@ -1 +1 @@ -JsDoc Reference - _global_
 
Project Outline
 
$_
$(string, object)
ext(string, object)
each(function)
type(mixed)
get(string, object, function)
post(string, object, function)
sse(string, function, int)
addClass(string)
removeClass(string)
show(string)
attr(string, string)
text(string)
css(string, string)
append(string)
prepend(string)
html(string)
add(string, function)
remove(string, string)
live(string, string, function)
delegate(string, string, function)
connect(string, int, function)
create_store(string, string, bool)
delete_store(string)
get(string, bool)
set(string, mixed, bool)
remove(string, bool)
getAll(bool)
clear(bool)
object_keys(object)
array_combine(array/object, array/object)
object_merge(object)
str_trans(string, mixed, string)
«
Kis JS Docs

Built-In Module _global_

\ No newline at end of file +JsDoc Reference - _global_
 
Project Outline
 
$_
$(string, object)
ext(string, object)
each(function)
type(mixed)
get(string, object, function)
post(string, object, function)
sse(string, function, int)
addClass(string)
removeClass(string)
show(string)
attr(string, string)
text(string)
css(string, string)
append(string)
prepend(string)
html(string)
add(string, function)
remove(string, string)
live(string, string, function)
delegate(string, string, function)
get(string, bool)
set(string, mixed, bool)
remove(string, bool)
getAll(bool)
clear(bool)
object_keys(object)
array_combine(array/object, array/object)
object_merge(object)
str_trans(string, mixed, string)
«
Kis JS Docs

Built-In Module _global_

\ No newline at end of file diff --git a/docs/symbols/src/kis-js_src_core.js.html b/docs/symbols/src/kis-js_src_core.js.html index 860877c..738beac 100755 --- a/docs/symbols/src/kis-js_src_core.js.html +++ b/docs/symbols/src/kis-js_src_core.js.html @@ -57,7 +57,7 @@ 50 // Add the selector to the prototype 51 $_.prototype.el = sel; 52 - 53 // Make a copy before adding properties + 53 // Use the $_ object as it's own prototype 54 var self = dcopy($_); 55 56 // Give sel to each extension. diff --git a/docs/symbols/src/kis-js_src_modules_ajax.js.html b/docs/symbols/src/kis-js_src_modules_ajax.js.html index e5336b7..32b2a19 100755 --- a/docs/symbols/src/kis-js_src_modules_ajax.js.html +++ b/docs/symbols/src/kis-js_src_modules_ajax.js.html @@ -146,8 +146,8 @@ 139 140 setInterval($_.get, poll_rate, url, {}, function(res){ 141 res.trim().replace(/data:/gim, ''); -142 res.replace(/^event|id|retry?:(.*)$/gim, ''); -143 callback(res); +142 res.replace(/^(event|id|retry)?\:(.*)$/gim, ''); +143 callback.call(res, res); 144 }); 145 } 146 }); diff --git a/kis-all.js b/kis-all.js index 6bb79c4..aa9e873 100755 --- a/kis-all.js +++ b/kis-all.js @@ -50,7 +50,7 @@ // Add the selector to the prototype $_.prototype.el = sel; - // Make a copy before adding properties + // Use the $_ object as it's own prototype var self = dcopy($_); // Give sel to each extension. @@ -969,8 +969,8 @@ if (typeof document !== "undefined" && !("classList" in document.createElement(" setInterval($_.get, poll_rate, url, {}, function(res){ res.trim().replace(/data:/gim, ''); - res.replace(/^event|id|retry?:(.*)$/gim, ''); - callback(res); + res.replace(/^(event|id|retry)?\:(.*)$/gim, ''); + callback.call(res, res); }); } }); @@ -1233,122 +1233,6 @@ if (typeof document !== "undefined" && !("classList" in document.createElement(" -// -------------------------------------------------------------------------- - -/** - * Module for simplifying Indexed DB access - */ - - var db = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB || window.msIndexedDB, - indexedDB = {}; - - //Well, some browsers don't support it yet - if(typeof db === "undefined") - { - return; - } - - /** - * Module for simplifying Indexed DB access - * - * @namespace - * @name indexedDB - * @memberOf $_ - */ - indexedDB = { - current_db: null, - /** - * Connects to an indexedDB database - * - * @memberOf $_.indexedDB - * @name connect - * @function - * @param string dbname - * @param [int] version - * @param [function] onupgradeneeded - */ - connect: function(dbname, version, onupgradeneeded) - { - var request = {}; - - version = version || 1; - - // Ask for permission to use db - request = db.open(dbname, version); - - // Assign onupgradeneeded callback - if(typeof onupgradeneeded !== "undefined") - { - request.onupgradeneeded = onupgradeneeded; - } - - /** - * @private - */ - request.onerror = function(event) - { - console.log("IndexedDB disallowed."); - }; - - /** - * @private - */ - request.onsuccess = function(event) - { - // Connect to the specified db - indexedDB.current_db = request.result; - }; - }, - /** - * Helper function to create a new object store - * - * @memberOf $_.indexedDB - * @name create_store - * @function - * @param string name - * @param [string] key - * @param [bool] generator - * @return IDBDataStore object - */ - create_store: function(name, key, generator) - { - var params = {}; - - if(typeof key !== "undefined") - { - params.keyPath = key; - } - - if(typeof generator !== "undefined") - { - // Cast to a boolean value - params.autoIncrement = !! generator; - } - - return db.createObjectStore(name, params); - }, - /** - * Delete an object store - * - * @memberOf $_.indexedDB - * @name delete_store - * @function - * @param string name - */ - delete_store: function(name) - { - var request = db.deleteObjectStore(); - - // Pass the error up - request.onerror = db.onerror; - } - - }; - - $_.ext('indexedDB', indexedDB); - - - // -------------------------------------------------------------------------- /** diff --git a/kis-lite-dom-min.js b/kis-lite-dom-min.js index e5244ae..e255f72 100755 --- a/kis-lite-dom-min.js +++ b/kis-lite-dom-min.js @@ -3,7 +3,7 @@ return 1===b.length?b[0]:b};e=function(a){var d;if("undefined"!==typeof a){if("u b)});c.type=function(a){return function(){return a&&a!==this}.call(a)?(typeof a).toLowerCase():{}.toString.call(a).match(/\s([a-z|A-Z]+)/)[1].toLowerCase()};c=window.$_=window.$_||c;c.$=g}})();"undefined"===typeof window.console&&(window.console={log:function(){}});"undefined"===typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,"")}); "undefined"===typeof Event.preventDefault&&"undefined"!==typeof window.event&&(Event.prototype.preventDefault=function(){window.event.returnValue=false},Event.prototype.stopPropagation=function(){window.event.cancelBubble=true});"undefined"===typeof Array.isArray&&(Array.isArray=function(c){return Object.prototype.toString.apply(c)==="[object Array]"}); (function(){if(typeof window.XMLHttpRequest!=="undefined"){var c={_do:function(g,c,b,a){var d=new XMLHttpRequest;typeof b==="undefined"&&(b=function(){});a=a?"POST":"GET";g=g+(a==="GET"?"?"+this._serialize(c):"");d.open(a,g);d.onreadystatechange=function(){d.readyState===4&&b(d.responseText)};if(a==="POST"){d.setRequestHeader("Content-Type","application/x-www-form-urlencoded");d.send(this._serialize(c))}else d.send(null)},_serialize:function(c){var e,b,a=[];for(e in c)if(c.hasOwnProperty(e)&&typeof c[e]!== -"function"){b=c[e].toString();e=encodeURIComponent(e);b=encodeURIComponent(b);a.push(e+"="+b)}return a.join("&")}};$_.ext("get",function(g,e,b){c._do(g,e,b,false)});$_.ext("post",function(g,e,b){c._do(g,e,b,true)});$_.ext("sse",function(c,e,b){if(typeof EventSource!=="undefined"){c=new EventSource(c);c.onmessage=function(a){e(a.data)}}else setInterval($_.get,b||3E4,c,{},function(a){a.trim().replace(/data:/gim,"");a.replace(/^event|id|retry?:(.*)$/gim,"");e(a)})})}})(); +"function"){b=c[e].toString();e=encodeURIComponent(e);b=encodeURIComponent(b);a.push(e+"="+b)}return a.join("&")}};$_.ext("get",function(g,e,b){c._do(g,e,b,false)});$_.ext("post",function(g,e,b){c._do(g,e,b,true)});$_.ext("sse",function(c,e,b){if(typeof EventSource!=="undefined"){c=new EventSource(c);c.onmessage=function(a){e(a.data)}}else setInterval($_.get,b||3E4,c,{},function(a){a.trim().replace(/data:/gim,"");a.replace(/^(event|id|retry)?\:(.*)$/gim,"");e.call(a,a)})})}})(); (function(){var c,g,e,b;if(typeof document.addEventListener!=="undefined"){c=function(a,d,b){typeof a.addEventListener!=="undefined"&&a.addEventListener(d,b,false)};g=function(a,d,b){typeof a.removeEventListener!=="undefined"&&a.removeEventListener(d,b,false)}}else if(typeof document.attachEvent!=="undefined"){c=function(a,b,h){function c(a){h.apply(a)}if(typeof a.attachEvent!=="undefined"){g(b,h);a.attachEvent("on"+b,c);a=a.KIS_0_6_0=a.KIS_0_6_0||{};a.listeners=a.listeners||{};a.listeners[b]=a.listeners[b]|| [];a.listeners[b].push({callback:h,_listener:c})}else console.log("Failed to _attach event:"+b+" on "+a)};g=function(a,b,c){if(typeof a.detachEvent!=="undefined"){var f=a.KIS_0_6_0;if(f&&f.listeners&&f.listeners[b])for(var e=f.listeners[b],g=e.length,i=0;i1&&typeof b==="undefined"){console.log(c);console.log("Must be a singular element")}else if(c.length> -1&&typeof b!=="undefined")e.each(function(c){return n(c,a,b)});else return n(c,a,b)},text:function(a){var b,c,d;d=this.el;c=typeof d.textContent!=="undefined"?"textContent":typeof d.innerText!=="undefined"?"innerText":"innerHTML";b=d[c];if(typeof a!=="undefined")return d[c]=a;return b},css:function(a,b){if(typeof b==="undefined")return f(this.el,a);e.each(function(c){f(c,a,b)})},append:function(a){typeof document.insertAdjacentHTML!=="undefined"?this.el.insertAdjacentHTML("beforeend",a):this.el.innerHTML= -this.el.innerHTML+a},prepend:function(a){typeof document.insertAdjacentHTML!=="undefined"?this.el.insertAdjacentHTML("afterbegin",a):this.el.innerHTML=a+this.el.innerHTML},html:function(a){if(typeof a!=="undefined")this.el.innerHTML=a;return this.el.innerHTML}});if(typeof window.XMLHttpRequest!=="undefined"){var g={_do:function(a,b,c,d){var h=new XMLHttpRequest;typeof c==="undefined"&&(c=function(){});d=d?"POST":"GET";a=a+(d==="GET"?"?"+this._serialize(b):"");h.open(d,a);h.onreadystatechange=function(){h.readyState=== -4&&c(h.responseText)};if(d==="POST"){h.setRequestHeader("Content-Type","application/x-www-form-urlencoded");h.send(this._serialize(b))}else h.send(null)},_serialize:function(a){var b,c,d=[];for(b in a)if(a.hasOwnProperty(b)&&typeof a[b]!=="function"){c=a[b].toString();b=encodeURIComponent(b);c=encodeURIComponent(c);d.push(b+"="+c)}return d.join("&")}};e.ext("get",function(a,b,c){g._do(a,b,c,false)});e.ext("post",function(a,b,c){g._do(a,b,c,true)});e.ext("sse",function(a,b,c){if(typeof EventSource!== -"undefined"){a=new EventSource(a);a.onmessage=function(a){b(a.data)}}else setInterval(e.get,c||3E4,a,{},function(a){a.trim().replace(/data:/gim,"");a.replace(/^event|id|retry?:(.*)$/gim,"");b(a)})});var i,k,j,r;if(typeof document.addEventListener!=="undefined"){i=function(a,b,c){typeof a.addEventListener!=="undefined"&&a.addEventListener(b,c,false)};k=function(a,b,c){typeof a.removeEventListener!=="undefined"&&a.removeEventListener(b,c,false)}}else if(typeof document.attachEvent!=="undefined"){i= -function(a,b,c){function d(a){c.apply(a)}if(typeof a.attachEvent!=="undefined"){k(b,c);a.attachEvent("on"+b,d);a=a.KIS_0_6_0=a.KIS_0_6_0||{};a.listeners=a.listeners||{};a.listeners[b]=a.listeners[b]||[];a.listeners[b].push({callback:c,_listener:d})}else console.log("Failed to _attach event:"+b+" on "+a)};k=function(a,b,c){if(typeof a.detachEvent!=="undefined"){var d=a.KIS_0_6_0;if(d&&d.listeners&&d.listeners[b])for(var h=d.listeners[b],e=h.length,f=0;fd?1:ca?1:b1&&typeof b==="undefined"){console.log(c);console.log("Must be a singular element")}else if(c.length> +1&&typeof b!=="undefined")e.each(function(c){return k(c,a,b)});else return k(c,a,b)},text:function(a){var b,c,d;d=this.el;c=typeof d.textContent!=="undefined"?"textContent":typeof d.innerText!=="undefined"?"innerText":"innerHTML";b=d[c];if(typeof a!=="undefined")return d[c]=a;return b},css:function(a,b){if(typeof b==="undefined")return f(this.el,a);e.each(function(c){f(c,a,b)})},append:function(a){typeof document.insertAdjacentHTML!=="undefined"?this.el.insertAdjacentHTML("beforeend",a):this.el.innerHTML= +this.el.innerHTML+a},prepend:function(a){typeof document.insertAdjacentHTML!=="undefined"?this.el.insertAdjacentHTML("afterbegin",a):this.el.innerHTML=a+this.el.innerHTML},html:function(a){if(typeof a!=="undefined")this.el.innerHTML=a;return this.el.innerHTML}});if(typeof window.XMLHttpRequest!=="undefined"){var h={_do:function(a,b,c,d){var g=new XMLHttpRequest;typeof c==="undefined"&&(c=function(){});d=d?"POST":"GET";a=a+(d==="GET"?"?"+this._serialize(b):"");g.open(d,a);g.onreadystatechange=function(){g.readyState=== +4&&c(g.responseText)};if(d==="POST"){g.setRequestHeader("Content-Type","application/x-www-form-urlencoded");g.send(this._serialize(b))}else g.send(null)},_serialize:function(a){var b,c,d=[];for(b in a)if(a.hasOwnProperty(b)&&typeof a[b]!=="function"){c=a[b].toString();b=encodeURIComponent(b);c=encodeURIComponent(c);d.push(b+"="+c)}return d.join("&")}};e.ext("get",function(a,b,c){h._do(a,b,c,false)});e.ext("post",function(a,b,c){h._do(a,b,c,true)});e.ext("sse",function(a,b,c){if(typeof EventSource!== +"undefined"){a=new EventSource(a);a.onmessage=function(a){b(a.data)}}else setInterval(e.get,c||3E4,a,{},function(a){a.trim().replace(/data:/gim,"");a.replace(/^(event|id|retry)?\:(.*)$/gim,"");b.call(a,a)})});var i,l,j,q;if(typeof document.addEventListener!=="undefined"){i=function(a,b,c){typeof a.addEventListener!=="undefined"&&a.addEventListener(b,c,false)};l=function(a,b,c){typeof a.removeEventListener!=="undefined"&&a.removeEventListener(b,c,false)}}else if(typeof document.attachEvent!=="undefined"){i= +function(a,b,c){function d(a){c.apply(a)}if(typeof a.attachEvent!=="undefined"){l(b,c);a.attachEvent("on"+b,d);a=a.KIS_0_6_0=a.KIS_0_6_0||{};a.listeners=a.listeners||{};a.listeners[b]=a.listeners[b]||[];a.listeners[b].push({callback:c,_listener:d})}else console.log("Failed to _attach event:"+b+" on "+a)};l=function(a,b,c){if(typeof a.detachEvent!=="undefined"){var d=a.KIS_0_6_0;if(d&&d.listeners&&d.listeners[b])for(var g=d.listeners[b],e=g.length,f=0;fd?1:ca?1:b - +