From 6b2fab7b46d94851b4eaf5f35751c73d853e2c5a Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Wed, 8 Feb 2012 11:36:43 -0500 Subject: [PATCH] Started indexedDB module --- docs/files.html | 2 +- docs/index.html | 2 +- docs/symbols/$_.dom.html | 2 +- docs/symbols/$_.event.html | 2 +- docs/symbols/$_.html | 2 +- docs/symbols/$_.indexedDB.html | 1 + docs/symbols/$_.store.html | 2 +- docs/symbols/$_.template.html | 2 +- docs/symbols/$_.util.html | 2 +- docs/symbols/_global_.html | 2 +- .../src/kis-js_src_modules_indexedDB.js.html | 70 +++++++++++++++++++ kis-all.js | 66 +++++++++++++++++ kis-lite-min.js | 10 +-- kis-min.js | 30 ++++---- src/modules/indexedDB.js | 63 +++++++++++++++++ 15 files changed, 229 insertions(+), 29 deletions(-) create mode 100644 docs/symbols/$_.indexedDB.html create mode 100644 docs/symbols/src/kis-js_src_modules_indexedDB.js.html create mode 100644 src/modules/indexedDB.js diff --git a/docs/files.html b/docs/files.html index 3a702c6..4c726cc 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)
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)
get(string)
parse(string, object)
apply(string, string, object)
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/template.js
ajax.js../kis-js/src/modules/template.js
DOM.js../kis-js/src/modules/template.js
event.js../kis-js/src/modules/template.js
store.js../kis-js/src/modules/template.js
template.js../kis-js/src/modules/template.js
util.js../kis-js/src/modules/template.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)
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)
get(string, bool)
set(string, mixed, bool)
remove(string, bool)
getAll(bool)
clear(bool)
get(string)
parse(string, object)
apply(string, string, object)
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/template.js
ajax.js../kis-js/src/modules/template.js
DOM.js../kis-js/src/modules/template.js
event.js../kis-js/src/modules/template.js
indexedDB.js../kis-js/src/modules/template.js
store.js../kis-js/src/modules/template.js
template.js../kis-js/src/modules/template.js
util.js../kis-js/src/modules/template.js
\ No newline at end of file diff --git a/docs/index.html b/docs/index.html index f48f044..d189a0d 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)
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)
get(string)
parse(string, object)
apply(string, string, object)
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)
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)
get(string, bool)
set(string, mixed, bool)
remove(string, bool)
getAll(bool)
clear(bool)
get(string)
parse(string, object)
apply(string, string, object)
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 328df77..56ca59b 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)
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)
get(string)
parse(string, object)
apply(string, string, object)
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)
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)
get(string, bool)
set(string, mixed, bool)
remove(string, bool)
getAll(bool)
clear(bool)
get(string)
parse(string, object)
apply(string, string, object)
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 b5d8405..2ae0c56 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)
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)
get(string)
parse(string, object)
apply(string, string, object)
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)
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)
get(string, bool)
set(string, mixed, bool)
remove(string, bool)
getAll(bool)
clear(bool)
get(string)
parse(string, object)
apply(string, string, object)
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 e131a5b..034d936 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)
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)
get(string)
parse(string, object)
apply(string, string, object)
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
templateModule for html templating.
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
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.

$_.template
Module for html templating. Requires ajax module.

Defined in: template.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
\ 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)
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)
get(string, bool)
set(string, mixed, bool)
remove(string, bool)
getAll(bool)
clear(bool)
get(string)
parse(string, object)
apply(string, string, object)
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
templateModule for html templating.
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
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.

$_.template
Module for html templating. Requires ajax module.

Defined in: template.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
\ No newline at end of file diff --git a/docs/symbols/$_.indexedDB.html b/docs/symbols/$_.indexedDB.html new file mode 100644 index 0000000..5584e75 --- /dev/null +++ b/docs/symbols/$_.indexedDB.html @@ -0,0 +1 @@ +JsDoc Reference - $_.indexedDB
 
Project Outline
 
$_
$(string, object)
ext(string, object)
each(function)
type(mixed)
get(string, object, function)
post(string, object, function)
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)
get(string, bool)
set(string, mixed, bool)
remove(string, bool)
getAll(bool)
clear(bool)
get(string)
parse(string, object)
apply(string, string, object)
object_keys(object)
array_combine(array/object, array/object)
object_merge(object)
str_trans(string, mixed, string)
«
Kis JS Docs

Module $_.indexedDB

Defined in: indexedDB.js.

Method Summary
connect(string, int, function)Connects to an indexedDB database
Method Detail
$_.indexedDB.connect(string, int, function)
Connects to an indexedDB database
Parameters:
string dbname
int?, Default: version
function?, Default: onupgradeneeded
\ No newline at end of file diff --git a/docs/symbols/$_.store.html b/docs/symbols/$_.store.html index dff5708..9bd85f2 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)
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)
get(string)
parse(string, object)
apply(string, string, object)
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)
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)
get(string, bool)
set(string, mixed, bool)
remove(string, bool)
getAll(bool)
clear(bool)
get(string)
parse(string, object)
apply(string, string, object)
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/$_.template.html b/docs/symbols/$_.template.html index 0ae5115..380ee4d 100755 --- a/docs/symbols/$_.template.html +++ b/docs/symbols/$_.template.html @@ -1 +1 @@ -JsDoc Reference - $_.template
 
Project Outline
 
$_
$(string, object)
ext(string, object)
each(function)
type(mixed)
get(string, object, function)
post(string, object, function)
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)
get(string)
parse(string, object)
apply(string, string, object)
object_keys(object)
array_combine(array/object, array/object)
object_merge(object)
str_trans(string, mixed, string)
«
Kis JS Docs

Module $_.template

Defined in: template.js.

Method Summary
get(string)Retrieves a template
parse(string, object)Formats a template
apply(string, string, object)Inserts the formatted template into the page.
Method Detail
$_.template.get(string): string
Retrieves a template
Parameters:
string name
Returns:
string
$_.template.parse(string, object): string
Formats a template
Parameters:
string template_name
object replace_data
Returns:
string
$_.template.apply(string, string, object)
Inserts the formatted template into the page. If the url and data parameters are passed, it will retrieve a template file from the same domain, parse, and insert the template into the page.
Parameters:
string parsed_template/template_name
string?, Default: url
object?, Default: data
\ No newline at end of file +JsDoc Reference - $_.template
 
Project Outline
 
$_
$(string, object)
ext(string, object)
each(function)
type(mixed)
get(string, object, function)
post(string, object, function)
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)
get(string, bool)
set(string, mixed, bool)
remove(string, bool)
getAll(bool)
clear(bool)
get(string)
parse(string, object)
apply(string, string, object)
object_keys(object)
array_combine(array/object, array/object)
object_merge(object)
str_trans(string, mixed, string)
«
Kis JS Docs

Module $_.template

Defined in: template.js.

Method Summary
get(string)Retrieves a template
parse(string, object)Formats a template
apply(string, string, object)Inserts the formatted template into the page.
Method Detail
$_.template.get(string): string
Retrieves a template
Parameters:
string name
Returns:
string
$_.template.parse(string, object): string
Formats a template
Parameters:
string template_name
object replace_data
Returns:
string
$_.template.apply(string, string, object)
Inserts the formatted template into the page. If the url and data parameters are passed, it will retrieve a template file from the same domain, parse, and insert the template into the page.
Parameters:
string parsed_template/template_name
string?, Default: url
object?, Default: data
\ No newline at end of file diff --git a/docs/symbols/$_.util.html b/docs/symbols/$_.util.html index 74bf3a2..420f492 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)
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)
get(string)
parse(string, object)
apply(string, string, object)
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)
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)
get(string, bool)
set(string, mixed, bool)
remove(string, bool)
getAll(bool)
clear(bool)
get(string)
parse(string, object)
apply(string, string, object)
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 8085fbd..3b55736 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)
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)
get(string)
parse(string, object)
apply(string, string, object)
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)
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)
get(string, bool)
set(string, mixed, bool)
remove(string, bool)
getAll(bool)
clear(bool)
get(string)
parse(string, object)
apply(string, string, object)
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_modules_indexedDB.js.html b/docs/symbols/src/kis-js_src_modules_indexedDB.js.html new file mode 100644 index 0000000..7f81b6d --- /dev/null +++ b/docs/symbols/src/kis-js_src_modules_indexedDB.js.html @@ -0,0 +1,70 @@ +
  1 /**
+  2  * Module for simplifying Indexed DB access
+  3  */
+  4 (function() {
+  5 	"use strict";
+  6 	
+  7 	var db = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB || window.msIndexedDB,
+  8 		request = null;
+  9 		indexedDB = {};
+ 10 	
+ 11 	/**
+ 12 	 * @private
+ 13 	 */	
+ 14 	request.onerror = function(event)
+ 15 	{
+ 16 		console.log("IndexedDB disallowed.");
+ 17 	};
+ 18 	
+ 19 	/**
+ 20 	 * @private
+ 21 	 */
+ 22 	request.onsuccess = function(event)
+ 23 	{
+ 24 		// Connect to the specified db
+ 25 		indexedDB.current_db = request.result;
+ 26 	};
+ 27 
+ 28 	/**
+ 29 	 * Module for simplifying Indexed DB access
+ 30 	 *
+ 31 	 * @namespace
+ 32 	 * @name indexedDB
+ 33 	 * @memberOf $_
+ 34 	 */
+ 35 	indexedDB = {
+ 36 		current_db: null,
+ 37 		/**
+ 38 		 * Connects to an indexedDB database
+ 39 		 *
+ 40 		 * @memberOf $_.indexedDB
+ 41 		 * @name connect
+ 42 		 * @function
+ 43 		 * @param string dbname
+ 44 		 * @param [int] version
+ 45 		 * @param [function] onupgradeneeded
+ 46 		 */
+ 47 		connect: function(dbname, version, onupgradeneeded)
+ 48 		{
+ 49 			version = version || 0;
+ 50 			
+ 51 			if(typeof onupgradeneeded !== "undefined")
+ 52 			{
+ 53 				request.onupgradeneeded = onupgradeneeded;
+ 54 			}
+ 55 		
+ 56 			// Ask for permission to use db
+ 57 			this.current_db = db.open(dbname, version);
+ 58 		}
+ 59 	};
+ 60 	
+ 61 	$_.ext('indexedDB', indexedDB);
+ 62 	
+ 63 }());
\ No newline at end of file diff --git a/kis-all.js b/kis-all.js index 362451d..1177a4c 100755 --- a/kis-all.js +++ b/kis-all.js @@ -1044,6 +1044,72 @@ if (typeof document !== "undefined" && !("classList" in document.createElement(" // -------------------------------------------------------------------------- +/** + * Module for simplifying Indexed DB access + */ +(function() { + "use strict"; + + var db = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB || window.msIndexedDB, + request = null; + indexedDB = {}; + + /** + * @private + */ + request.onerror = function(event) + { + console.log("IndexedDB disallowed."); + }; + + /** + * @private + */ + request.onsuccess = function(event) + { + // Connect to the specified db + indexedDB.current_db = request.result; + }; + + /** + * 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) + { + version = version || 0; + + if(typeof onupgradeneeded !== "undefined") + { + request.onupgradeneeded = onupgradeneeded; + } + + // Ask for permission to use db + this.current_db = db.open(dbname, version); + } + }; + + $_.ext('indexedDB', indexedDB); + +}()); + +// -------------------------------------------------------------------------- + /** * Util Object * diff --git a/kis-lite-min.js b/kis-lite-min.js index 2e91afc..3dddcaf 100755 --- a/kis-lite-min.js +++ b/kis-lite-min.js @@ -1,9 +1,9 @@ -(function(){if("undefined"!==typeof document.querySelector){var e,f,d,c;e=function(a){c="undefined"===typeof a?"undefined"!==typeof e.el?e.el:document.documentElement:"object"!==typeof a?f(a):a;e.prototype.el=c;var a=d(e),b;for(b in a)if("object"===typeof a[b])a[b].el=c;a.el=c;return a};f=function(a,b){var g;if("string"!=typeof a||"undefined"===typeof a)return a;g=null!=b&&1===b.nodeType?b:document;if(a.match(/^#([\w\-]+$)/))return document.getElementById(a.split("#")[1]);g=g.querySelectorAll(a); +(function(){if("undefined"!==typeof document.querySelector){var e,f,d,c;e=function(a){c="undefined"===typeof a?"undefined"!==typeof e.el?e.el:document.documentElement:"object"!==typeof a?f(a):a;e.prototype.el=c;var a=d(e),b;for(b in a)"object"===typeof a[b]&&(a[b].el=c);a.el=c;return a};f=function(a,b){var g;if("string"!=typeof a||"undefined"===typeof a)return a;g=null!=b&&1===b.nodeType?b:document;if(a.match(/^#([\w\-]+$)/))return document.getElementById(a.split("#")[1]);g=g.querySelectorAll(a); return 1===g.length?g[0]:g};d=function(a){var b;if("undefined"!==typeof a){if("undefined"!==typeof Object.create)return Object.create(a);b=typeof a;if(!("object"!==b&&"function"!==b))return b=function(){},b.prototype=a,new b}};e.ext=function(a,b){b.el=c;e[a]=b};e.ext("each",function(a){if("undefined"!==typeof c.length&&c!==window){var b=c.length;if(0!==b)for(var g,d=0;de?1:ba?1:c\s+<"),a=a.replace(/>\s+\{/gim,">{"),a=a.replace(/\}\s+\s+<"),a=a.replace(/>\s+\{/gim,">{"),a=a.replace(/\}\s+