Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

update docs

  • Loading branch information...
commit bee9402ffec1156b28b97763bfce12970cd47098 1 parent 6e708db
@rhysbrettbowen authored
View
2  docs/index.html
@@ -1 +1 @@
-<!doctype html><html><head><title>Generated Files</title><link href="stylesheet.css" rel="stylesheet" type="text/css"></head><body><h1>All Classes</h1><a href="mvc/AjaxSync.html">mvc/AjaxSync.html</a><br><a href="mvc/Collection.html">mvc/Collection.html</a><br><a href="mvc/Control.html">mvc/Control.html</a><br><a href="mvc/Mediator.html">mvc/Mediator.html</a><br><a href="mvc/Model.html">mvc/Model.html</a><br><a href="mvc/Router.html">mvc/Router.html</a><br><a href="mvc/Store.html">mvc/Store.html</a><br></body></html>
+<!doctype html><html><head><title>Generated Files</title><link href="stylesheet.css" rel="stylesheet" type="text/css"></head><body><h1>All Classes</h1><a href="mvc/AjaxSync.html">mvc/AjaxSync.html</a><br><a href="mvc/Collection.html">mvc/Collection.html</a><br><a href="mvc/Control.html">mvc/Control.html</a><br><a href="mvc/LocalSync.html">mvc/LocalSync.html</a><br><a href="mvc/Mediator.html">mvc/Mediator.html</a><br><a href="mvc/Model.html">mvc/Model.html</a><br><a href="mvc/Model/ValidateError.html">mvc/Model/ValidateError.html</a><br><a href="mvc/Router.html">mvc/Router.html</a><br><a href="mvc/Store.html">mvc/Store.html</a><br></body></html>
View
2  docs/mvc/AjaxSync.html
@@ -1,4 +1,4 @@
-<!doctype html><html><head><title>mvc.AjaxSync</title><link href="../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../index.html">Home</a><h1>Class mvc.AjaxSync</h1><table class="method-list"><tr><td colspan="2"><strong>Instance Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>create()</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>del()</code><br></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>onCreateComplete_(?mvc.Model model, ?Function callback, ?goog.events.Event e)</code><br><p class="method-description">override this to do processing on returned data</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>onDelComplete_(?mvc.Model model, ?Function callback, ?Event e)</code><br><p class="method-description">override this to do processing on returned data</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>onReadComplete_(?mvc.Model model, ?Function callback, ?goog.events.Event e)</code><br><p class="method-description">override this to do processing on returned data</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>onUpdateComplete_(?mvc.Model model, ?Function callback, ?Event e)</code><br><p class="method-description">override this to do processing on returned data</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>read()</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>update()</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>urlifyString(string val) &#8658; function ((mvc.Model|null)): string</code><br><p class="method-description">takes a string defining a url where :attribute will return that models
+<!doctype html><html><head><title>mvc.AjaxSync</title><link href="../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../index.html">Home</a><h1>Class mvc.AjaxSync</h1><table class="method-list"><tr><td colspan="2"><strong>Instance Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>create()</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>del()</code><br></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>onCreateComplete_(?mvc.Model model, ?Function callback, ?goog.events.Event e)</code><br><p class="method-description">override this to do processing on returned data</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>onDelComplete_(?mvc.Model model, ?Function callback, ?goog.events.Event e)</code><br><p class="method-description">override this to do processing on returned data</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>onReadComplete_(?mvc.Model model, ?Function callback, ?goog.events.Event e)</code><br><p class="method-description">override this to do processing on returned data</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>onUpdateComplete_(?mvc.Model model, ?Function callback, ?goog.events.Event e)</code><br><p class="method-description">override this to do processing on returned data</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>read()</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>update()</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>urlifyString(string val) &#8658; function ((mvc.Model|null)): string</code><br><p class="method-description">takes a string defining a url where :attribute will return that models
attribute. e.g.
var obj = new mvc.Model({attrs:{'id': 'fred'}});
View
6 docs/mvc/Collection.html
@@ -1,6 +1,6 @@
<!doctype html><html><head><title>mvc.Collection</title><link href="../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../index.html">Home</a><h1>Class mvc.Collection</h1><p>A collection of models. Extends model so it has it's own values</p>extends <a href="../mvc/Model.html">mvc.Model</a><table class="method-list"><tr><td colspan="2"><strong>Instance Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>add((Array|mvc.Model|null) model, number= opt_ind, boolean= opt_silent) &#8658; boolean</code><br><p class="method-description">accepts a model or array of models and adds them at the end unless an index
-to insert is given.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>at(number index) &#8658; ?mvc.Model</code><br><p class="method-description">get a model by it's index in the collection</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>change_()</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>clear(boolean= opt_silent)</code><br><p class="method-description">remove all models from the collection</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getById(string id) &#8658; ?mvc.Model</code><br><p class="method-description">get a model by it's ID</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getLength() &#8658; number</code><br><p class="method-description">returns the number of models in the collection</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getModels((function ((mvc.Model|null)): (Boolean|null)=) opt_filter) &#8658; ?Array</code><br><p class="method-description">get all the models, optionally filter by function</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>modelChange(?Function fn, ?Object= opt_handler) &#8658; number</code><br><p class="method-description">use this to bind functions to a change in any of the collections models</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>newModel(?Object= opt_options, boolean= opt_silent) &#8658; ?mvc.Model</code><br><p class="method-description">add a new model with the given options. The type of model is given by the
+to insert is given</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>anyModelChange(?Function fn, ?Object= opt_handler) &#8658; {fire: (Function|null), id: number, unbind: (Function|null)}</code><br><p class="method-description">use this to bind functions to a change in any of the collections models</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>at(number index) &#8658; ?mvc.Model</code><br><p class="method-description">get a model by it's index in the collection</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>bindAdd(?Function fn, ?Object= opt_handler) &#8658; {fire: (Function|null), id: number, unbind: (Function|null)}</code><br><p class="method-description">use this to bind function when a model is added</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>bindRemove(?Function fn, ?Object= opt_handler) &#8658; {fire: (Function|null), id: number, unbind: (Function|null)}</code><br><p class="method-description">use this to bind functions when a model is removed</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>change_()</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>clear(boolean= opt_silent)</code><br><p class="method-description">remove all models from the collection</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getById(string id) &#8658; ?mvc.Model</code><br><p class="method-description">get a model by it's ID</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getLength() &#8658; number</code><br><p class="method-description">returns the number of models in the collection</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getModels((function ((mvc.Model|null)): (Boolean|null)=) opt_filter) &#8658; ?Array</code><br><p class="method-description">get all the models, optionally filter by function</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>indexOf(?mvc.Model model) &#8658; number</code><br><p class="method-description">return the index of a given model</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>modelChange(?Function fn, ?Object= opt_handler) &#8658; {fire: (Function|null), id: number, unbind: (Function|null)}</code><br><p class="method-description">use this to bind functions to a change that effects the order or collection</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>newModel(?Object= opt_options, boolean= opt_silent, (function ((Object|null)=): ?=) opt_modelType) &#8658; ?mvc.Model</code><br><p class="method-description">add a new model with the given options. The type of model is given by the
modelType of the collection</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>pluck((Array|null|string) key) &#8658; ?Array.&lt;(Object.&lt;*&gt;|null)&gt;</code><br><p class="method-description">plucks an attribute from each model and returns as an array. If you pass
an array of keys then the array will contain a map of each key and it's
-value</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>remove((Array|mvc.Model|null) model, boolean= opt_silent)</code><br><p class="method-description">remove the given model from the collection</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setComparator(function ((mvc.Model|null), (mvc.Model|null)): number fn, boolean= opt_silent)</code><br><p class="method-description">function to sort models by. Function should take two models and
-return -1, 0 or 1. Also takes whether to fire a change event after sorting</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>sort(boolean= opt_silent)</code><br><p class="method-description">tells the collection to sort it's models. This is used internally</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>unbind(number id) &#8658; boolean</code><br><p class="method-description">unbind a listener by id</p></td></tr></table></body></html>
+value</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>remove((Array|mvc.Model|null) model, boolean= opt_silent) &#8658; boolean</code><br><p class="method-description">remove the given model from the collection</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setComparator(function ((mvc.Model|null), (mvc.Model|null)): number fn, boolean= opt_silent)</code><br><p class="method-description">function to sort models by. Function should take two models and
+return -1, 0 or 1. Also takes whether to fire a change event after sorting</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>sort(boolean= opt_silent)</code><br><p class="method-description">tells the collection to sort it's models. This is used internally</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>unbind((Object|null|number) id) &#8658; boolean</code><br><p class="method-description">unbind a listener by id</p></td></tr></table></body></html>
View
12 docs/mvc/Control.html
@@ -1,5 +1,11 @@
-<!doctype html><html><head><title>mvc.Control</title><link href="../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../index.html">Home</a><h1>Class mvc.Control</h1><p>instantiate with a mvc.Model</p>extends <a href="../goog/ui/Component.html">goog.ui.Component</a><table class="method-list"><tr><td colspan="2"><strong>Instance Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>click(?Function fn, (Array.&lt;string&gt;|Function|null|string=) opt_className, &lt;Any Type&gt; opt_handler, number= opt_priority) &#8658; number</code><br><p class="method-description">same as on but assumes the event type is a click</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getEls(string selector) &#8658; ?goog.array.ArrayLike</code><br><p class="method-description">pass in a string like "#elementId", ".className" or "tagName[ .className]"
-to get array of elements with the id, class or tag and class name</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>handleEvents_(string type, ?Event e)</code><br><p class="method-description">Internal use. Handles and delegates events</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>off(string uid)</code><br><p class="method-description">take off a lister by it's id</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>on(string eventName, ?Function fn, (Array.&lt;string&gt;|Function|null|string=) opt_className, &lt;Any Type&gt; opt_handler, number= opt_priority) &#8658; number</code><br><p class="method-description">delegating events. An event type is needed as well as a handling function.
+<!doctype html><html><head><title>mvc.Control</title><link href="../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../index.html">Home</a><h1>Class mvc.Control</h1><p>instantiate with a mvc.Model</p>extends <a href="../goog/ui/Component.html">goog.ui.Component</a><table class="method-list"><tr><td colspan="2"><strong>Instance Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>anyModelChange(?Function fn, ?Object= opt_handler) &#8658; {fire: (Function|null), id: number, unbind: (Function|null)}</code><br><p class="method-description">use this to bind functions to a change in any of the collections models</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>bind((Array|null|string) name, ?Function fn, ?Object= opt_handler) &#8658; {fire: (Function|null), id: number, unbind: (Function|null)}</code><br><p class="method-description">Allows easy binding of a model's attribute to an element or a function.
+bind('name', function(value), handler) allows you to run a function and
+optionally bind it to the handler. You can also pass in an array of names
+to listen for a change on any of the attributes.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>bindAdd(?Function fn, ?Object= opt_handler) &#8658; {fire: (Function|null), id: number, unbind: (Function|null)}</code><br><p class="method-description">bind to any change event</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>bindAll(?Function fn, ?Object= opt_handler) &#8658; {fire: (Function|null), id: number, unbind: (Function|null)}</code><br><p class="method-description">bind to any change event</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>bindRemove(?Function fn, ?Object= opt_handler) &#8658; {fire: (Function|null), id: number, unbind: (Function|null)}</code><br><p class="method-description">bind to any change event</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>bindUnload(?Function fn, ?Object= opt_handler) &#8658; {fire: (Function|null), id: number, unbind: (Function|null)}</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>click(?Function fn, (Array.&lt;string&gt;|Function|null|string=) opt_className, ?Object= opt_handler, number= opt_priority) &#8658; {fire: (Function|null), id: number, off: (Function|null)}</code><br><p class="method-description">same as on but assumes the event type is a click</p></td></tr><tr><td class="method-list-cell method-access method-protected"></td><td class="method-list-cell method-cell"><code>disposeInternal()</code><br><p class="method-description">Disposes of the component. Calls {@code exitDocument}, which is expected to
+remove event handlers and clean up the component. Propagates the call to
+the component's children, if any. Removes the component's DOM from the
+document unless it was decorated.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getEls(string selector) &#8658; ?goog.array.ArrayLike</code><br><p class="method-description">pass in a string like "#elementId", ".className" or "tagName[ .className]"
+to get array of elements with the id, class or tag and class name</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>handleEvents_(string type, ?Event e)</code><br><p class="method-description">Internal use. Handles and delegates events</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>modelChange(?Function fn, ?Object= opt_handler) &#8658; {fire: (Function|null), id: number, unbind: (Function|null)}</code><br><p class="method-description">use this to bind functions to a change in any of the collections models</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>off((Object|null|string) uid)</code><br><p class="method-description">take off a lister by it's id</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>on(string eventName, ?Function fn, (Array.&lt;string&gt;|Function|null|string=) opt_className, ?Object= opt_handler, number= opt_priority) &#8658; {fire: (Function|null), id: number, off: (Function|null)}</code><br><p class="method-description">delegating events. An event type is needed as well as a handling function.
if a third parameter is passed then elements with that class will be
listened to, otherwise the whole component. Returns a uid that can be used
-to end the listener with the off method</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>once(string eventName, ?Function fn, (Array.&lt;string&gt;|Function|null|string=) opt_className, &lt;Any Type&gt; opt_handler, number= opt_priority) &#8658; number</code><br><p class="method-description">same as on, but will only fire once</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>remove()</code><br><p class="method-description">remove the element and dispose</p></td></tr></table></body></html>
+to end the listener with the off method</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>once(string eventName, ?Function fn, (Array.&lt;string&gt;|Function|null|string=) opt_className, ?Object= opt_handler, number= opt_priority) &#8658; {fire: (Function|null), id: number, off: (Function|null)}</code><br><p class="method-description">same as on, but will only fire once</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>remove()</code><br><p class="method-description">remove the element and dispose</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>unbind((Object|null|number) id) &#8658; boolean</code><br><p class="method-description">unbind a listener by id</p></td></tr></table></body></html>
View
9 docs/mvc/Model.html
@@ -1,9 +1,9 @@
<!doctype html><html><head><title>mvc.Model</title><link href="../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../index.html">Home</a><h1>Class mvc.Model</h1><p>Pass an object with key value pairs for the attributes of the model</p>extends <a href="../goog/events/EventTarget.html">goog.events.EventTarget</a><table class="method-list"><tr><td colspan="2"><strong>Instance Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>addSchemaRules(?Object schema)</code><br><p class="method-description">adds more rules to the schema</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>alias(string newName, string oldName)</code><br><p class="method-description">Can be used to create an alias, e.g:
-model.alias('surname', 'lastName');</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>bind((Array|null|string) name, ?Function fn, &lt;Any Type&gt; opt_handler) &#8658; number</code><br><p class="method-description">Allows easy binding of a model's attribute to an element or a function.
+model.alias('surname', 'lastName');</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>bind((Array|null|string) name, ?Function fn, ?Object= opt_handler) &#8658; {fire: (Function|null), id: number, unbind: (Function|null)}</code><br><p class="method-description">Allows easy binding of a model's attribute to an element or a function.
bind('name', function(value), handler) allows you to run a function and
optionally bind it to the handler. You can also pass in an array of names
-to listen for a change on any of the attributes.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>bindAll(?Function fn, ?Object= opt_handler) &#8658; number</code><br><p class="method-description">bind to any change event</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>bindUnload(?Function fn, ?Object= opt_handler) &#8658; number</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>change()</code><br><p class="method-description">fires the change event for the model</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>change_()</code><br><p class="method-description">function called when a change is detected on the object. Call the model's
-.change() function to fire manually</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>dispose(boolean= opt_sync)</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>fetch((function ((Object|null), number, (mvc.Model|null)): ?=) opt_callback)</code><br><p class="method-description">reads an object fomr an external source using sync</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>format(string attr, ?Function fn)</code><br><p class="method-description">Can be used to change format returned when using get, e.g:
+to listen for a change on any of the attributes.</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>bindAll(?Function fn, ?Object= opt_handler) &#8658; {fire: (Function|null), id: number, unbind: (Function|null)}</code><br><p class="method-description">bind to any change event</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>bindUnload(?Function fn, ?Object= opt_handler) &#8658; {fire: (Function|null), id: number, unbind: (Function|null)}</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>change()</code><br><p class="method-description">fires the change event for the model</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>change_()</code><br><p class="method-description">function called when a change is detected on the object. Call the model's
+.change() function to fire manually</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>dispose(boolean= opt_sync, ?Function= opt_callback)</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>errorHandler(?Function fn)</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>fetch((function ((Object|null), number, (mvc.Model|null)): ?=) opt_callback)</code><br><p class="method-description">reads an object fomr an external source using sync</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>format(string attr, ?Function fn)</code><br><p class="method-description">Can be used to change format returned when using get, e.g:
model.format('date', function(date) {return date.toDateString();});</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>get(string key, &lt;Any Type&gt; opt_default) &#8658; &lt;Any Type&gt;</code><br><p class="method-description">gets the value for an attribute</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getBinder(string key) &#8658; ?Function</code><br><p class="method-description">can use this to construct setters. For instance if you would set a value
like:
model.set('location:latitude', number);
@@ -16,5 +16,6 @@
model.meta('fullName', ['firstName', 'lastName'],
function(firstName, lastName){
return firstName + " " + lastName;
-});</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>parseSchemaFn_(&lt;Any Type&gt; fn) &#8658; ?Function</code><br><p class="method-description">used internally to parse strings and regexes in to functions</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>prev(string key) &#8658; &lt;Any Type&gt;</code><br><p class="method-description">returns the previous value of the attribute</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>reset(boolean= opt_silent)</code><br><p class="method-description">removes all attributes</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>revert(boolean= opt_silent) &#8658; ?mvc.Model</code><br><p class="method-description">reverts an object's values to it's last fetch</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>save()</code><br><p class="method-description">pushes the object to the sync</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>set((Object|null|string) key, &lt;Any Type&gt; opt_val, boolean= opt_silent) &#8658; boolean</code><br><p class="method-description">set either a map of key values or a key value</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setSchema(?Object schema)</code><br><p class="method-description">sets the schema</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setSync(?mvc.Sync sync)</code><br><p class="method-description">sets the sync for the model</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setter(string attr, ?Function fn)</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>toJson() &#8658; !Object</code><br><p class="method-description">returns full copy of the attributes</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>unbind(number id) &#8658; boolean</code><br><p class="method-description">unbind a listener by id</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>unset(string key, boolean= opt_silent) &#8658; boolean</code><br></td></tr></table><table class="method-list"><tr><td colspan="2"><strong>Static Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>create(?Object= opt_options) &#8658; ?mvc.Model</code><br><p class="method-description">instead of doing: model = new mvc.Model(options);
+});</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>parseSchemaFn_(&lt;Any Type&gt; fn) &#8658; ?Function</code><br><p class="method-description">used internally to parse strings and regexes in to functions</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>prev(string key) &#8658; &lt;Any Type&gt;</code><br><p class="method-description">returns the previous value of the attribute</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>reset(boolean= opt_silent)</code><br><p class="method-description">removes all attributes</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>revert(boolean= opt_silent) &#8658; ?mvc.Model</code><br><p class="method-description">reverts an object's values to it's last fetch
+TODO: allow to revert only certain keys</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>save(?Function= opt_callback)</code><br><p class="method-description">pushes the object to the sync</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>set((Object|null|string) key, &lt;Any Type&gt; opt_val, boolean= opt_silent) &#8658; boolean</code><br><p class="method-description">set either a map of key values or a key value</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setSchema(?Object schema)</code><br><p class="method-description">sets the schema</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setSync(?mvc.Sync sync)</code><br><p class="method-description">sets the sync for the model</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>setter(string attr, ?Function fn)</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>toJson() &#8658; !Object</code><br><p class="method-description">returns full copy of the attributes</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>unbind((Object|null|number) id) &#8658; boolean</code><br><p class="method-description">unbind a listener by id</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>unset(string key, boolean= opt_silent) &#8658; boolean</code><br></td></tr></table><table class="method-list"><tr><td colspan="2"><strong>Static Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>create(?Object= opt_options) &#8658; ?mvc.Model</code><br><p class="method-description">instead of doing: model = new mvc.Model(options);
you can do: mvc.Model.create(options);</p></td></tr></table></body></html>
View
1  docs/mvc/Model/ValidateError.html
@@ -0,0 +1 @@
+<!doctype html><html><head><title>mvc.Model.ValidateError</title><link href="../../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../../index.html">Home</a><h1>Class mvc.Model.ValidateError</h1><p>Validate Error class.</p>extends <a href="../../Error.html">Error</a></body></html>
View
4 docs/mvc/Router.html
@@ -1,2 +1,2 @@
-<!doctype html><html><head><title>mvc.Router</title><link href="../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../index.html">Home</a><h1>Class mvc.Router</h1><table class="method-list"><tr><td colspan="2"><strong>Instance Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>navigate(string fragment)</code><br><p class="method-description">pass through the fragment for the URL</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>onChange_()</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>route((RegExp|null|string) route, ?Function fn)</code><br><p class="method-description">define route as string or regex. /:abc/ will pass "abc" through as an
-argument. *abc/def will pass through all after the * as an argument</p></td></tr></table></body></html>
+<!doctype html><html><head><title>mvc.Router</title><link href="../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../index.html">Home</a><h1>Class mvc.Router</h1>extends <a href="../goog/events/EventTarget.html">goog.events.EventTarget</a><table class="method-list"><tr><td colspan="2"><strong>Instance Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getFragment() &#8658; string</code><br><p class="method-description">returns current routed fragment</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>navigate(string fragment)</code><br><p class="method-description">pass through the fragment for the URL</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>onChange_()</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>route((RegExp|null|string) route, function (string, ...[string]): ? fn, ?Object= opt_context)</code><br><p class="method-description">define route as string or regex. /:abc/ will pass "abc" through as an
+argument. *abc/def will pass through all after the * as an argument</p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>runRouteIfMatches_(?Object route, string fragment)</code><br><p class="method-description">run route callback if route regexp matches fragment</p></td></tr></table></body></html>
View
2  plovr/config.js
@@ -1,6 +1,6 @@
{
"id": "v4",
- "inputs": ["../collection.js", "../control.js", "../mediator.js", "../model.js", "../router.js", "../store.js", "../sync/sync.js", "../sync/ajax.js"],
+ "inputs": ["../collection.js", "../control.js", "../mediator.js", "../model.js", "../router.js", "../store.js", "../sync/sync.js", "../sync/ajax.js", "../sync/sync.js", "../sync/local.js"],
"paths": ".",
"mode": "ADVANCED",
"level": "VERBOSE",
Please sign in to comment.
Something went wrong with that request. Please try again.