From d9b0cc5f01e19440cd46fde463e93b34068a44bd Mon Sep 17 00:00:00 2001 From: rolux Date: Sat, 2 Jun 2012 15:07:29 +0200 Subject: [PATCH] update/fix documentation --- source/Ox.UI/js/List/List.js | 2 +- source/Ox/js/Array.js | 43 ++++++++++++++++++++++++++++++++---- 2 files changed, 40 insertions(+), 5 deletions(-) diff --git a/source/Ox.UI/js/List/List.js b/source/Ox.UI/js/List/List.js index ff92dab0..b1f4c60a 100644 --- a/source/Ox.UI/js/List/List.js +++ b/source/Ox.UI/js/List/List.js @@ -30,7 +30,7 @@ Ox.List List constructor draganddropenter Fires when entering an item during drag draganddropleave Fires when leaving an item during drag draganddroppause Fires when the mouse stops during drag - draganddropstart Fires when drag starts + draganddropstart Fires when drag starts copy copy paste paste move move item diff --git a/source/Ox/js/Array.js b/source/Ox/js/Array.js index dea07539..a4956dc9 100644 --- a/source/Ox/js/Array.js +++ b/source/Ox/js/Array.js @@ -4,15 +4,50 @@ Ox.api Turns an array into a list API `Ox.api` takes an array and returns a function that allows you to run complex queries against it. See the examples below for details. - (items, options) -> List API items <[o]> An array of objects (key/value stores) - options Options object + options API Options cache If true, cache results enums Enumerables, for example `{size: ['S', 'M', 'L']}` geo If true, return combined area with totals sort <[o]|[s]> Default sort, for example `['+name', '-age']` sums <[s]> List of keys to be included in totals unique The name of the unique key + (items, options) -> List API + (options) -> Results + (options, callback) -> Results + area Combined area + Present if `keys` was undefined and the `geo` option was set + east Longitude + north Latitude + south Latitude + west Longitude + items Number of items or array of items + Present if `positions` was not passed. Number if `keys` was + undefined, otherwise array + positions Position (value) for each id (key) + Present if `positions` was passed + * Sum of the values of any key specified in `sums` + Present if `keys` was undefined + options Request options + keys <[s]> Array of keys to be returned, or empty array for all keys + Leaving `keys` undefined returns totals, not items + positions <[s]> Array of ids + Passing `positions` returns positions, not items + query Query object + conditions <[o]> Array of condition objects and/or query objects + Passing a query object instead of a condition object inserts + a subcondition + key Key + operator Operator, like `'='` or `'!='` + Can be `'='` (contains) `'=='` (is), `'^'` (starts + with), `'$'` (ends with), `'<'`, `'<='`, `'>'`, `'>='`, + optionally prefixed with `'!'` (not) + value <*> Value + operator `'&'` or `'|'` + range <[n]> Range of results, like `[100, 200]` + sort <[s]> Array of sort strings, like `['+name', '-age']` + callback Callback function + results Results